:root {
  --bg: #0e1a22;
  --panel: rgba(13, 27, 35, 0.88);
  --panel-border: rgba(183, 202, 214, 0.12);
  --ink: #ecf4f7;
  --muted: #9eb2bd;
  --accent: #f2b84b;
  --good: #41c784;
  --warn: #ff8b5c;
  --bad: #ff5f5f;
  --neutral: #617685;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(242, 184, 75, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(65, 199, 132, 0.14), transparent 22%),
    linear-gradient(160deg, #081118 0%, #0c1720 45%, #121f28 100%);
  font-family: Bahnschrift, "Aptos", "Trebuchet MS", sans-serif;
}

.page-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-copy {
  margin: 10px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
}

.hero-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.panel-head p {
  margin: 0 0 18px;
  color: var(--muted);
}

.control-panel,
.timeline-panel,
.webhook-panel,
.watchlist-panel {
  grid-column: 1 / -1;
}

.control-row,
.halt-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

button,
input,
select {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font: inherit;
}

button {
  padding: 12px 16px;
  background: linear-gradient(135deg, #173042, #204860);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
}

button.secondary {
  background: linear-gradient(135deg, #243543, #314859);
}

button.danger {
  background: linear-gradient(135deg, #52272a, #6b2c31);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  min-width: 170px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.hint-box {
  margin: 0;
  padding: 14px;
  min-height: 66px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  white-space: pre-wrap;
}

.state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.state-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.state-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.state-card strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.details-list {
  margin: 0;
}

.details-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.details-list dt {
  color: var(--muted);
}

.details-list dd {
  margin: 0;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.pill.good {
  background: rgba(65, 199, 132, 0.18);
  color: #b8f5d1;
  border-color: rgba(65, 199, 132, 0.28);
}

.pill.warn {
  background: rgba(255, 139, 92, 0.18);
  color: #ffd3c2;
  border-color: rgba(255, 139, 92, 0.28);
}

.pill.bad {
  background: rgba(255, 95, 95, 0.18);
  color: #ffc5c5;
  border-color: rgba(255, 95, 95, 0.28);
}

.pill.neutral {
  background: rgba(97, 118, 133, 0.2);
  color: #cad6dd;
  border-color: rgba(97, 118, 133, 0.26);
}

.timeline {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.timeline-event,
.event-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-event h3,
.event-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.timeline-event p,
.event-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.timeline-event time,
.event-card time {
  color: var(--accent);
  font-size: 12px;
}

.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.watchlist-item {
  width: 100%;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.watchlist-item.selected {
  border-color: rgba(242, 184, 75, 0.6);
  background: rgba(242, 184, 75, 0.1);
}

.watchlist-item-head,
.watchlist-item-body,
.watchlist-item-badges {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.watchlist-item-body {
  margin-top: 8px;
  flex-direction: column;
  color: var(--muted);
  font-size: 12px;
}

.watchlist-item-badges {
  margin-top: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.watchlist-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.watchlist-badge.good {
  background: rgba(65, 199, 132, 0.18);
  color: #b8f5d1;
}

.watchlist-badge.warn {
  background: rgba(255, 139, 92, 0.18);
  color: #ffd3c2;
}

.watchlist-badge.bad {
  background: rgba(255, 95, 95, 0.18);
  color: #ffc5c5;
}

.severity-info {
  border-color: rgba(65, 199, 132, 0.25);
}

.severity-warning {
  border-color: rgba(255, 139, 92, 0.25);
}

.severity-critical {
  border-color: rgba(255, 95, 95, 0.28);
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: start;
  }

  .hero-status {
    justify-content: start;
  }
}
