:root {
  --bg: #09111d;
  --bg-2: #0e1726;
  --panel: rgba(14, 23, 38, 0.88);
  --panel-2: rgba(21, 34, 54, 0.96);
  --line: rgba(151, 168, 197, 0.18);
  --line-strong: rgba(151, 168, 197, 0.28);
  --text: #edf3ff;
  --muted: #97a8c5;
  --accent: #79e7c4;
  --accent-2: #8fc2ff;
  --warn: #ffbf69;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(121, 231, 196, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(143, 194, 255, 0.1), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  font-family: "Segoe UI", "Avenir Next", sans-serif;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto 40px;
}

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

.title-block {
  max-width: 560px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.status-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
}

.status-box,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.status-box {
  padding: 14px 16px;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.pill-live {
  color: var(--accent);
}

.pill-warn,
.pill-neutral {
  color: var(--warn);
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding: 20px 22px 0;
}

.panel-kicker {
  margin: 0 0 6px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.telemetry-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

.trajectory-wrap {
  padding: 18px 22px 22px;
  display: grid;
  gap: 18px;
}

.trajectory-map {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.leaflet-container {
  background: #0f1726;
}

.leaflet-tooltip.trajectory-tooltip {
  background: rgba(14, 23, 38, 0.95);
  border: 1px solid var(--line-strong);
  color: var(--text);
  box-shadow: var(--shadow);
}

.trajectory-tooltip strong {
  color: var(--accent);
}

.trajectory-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
}

.telemetry-table th,
.telemetry-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.telemetry-table th {
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.telemetry-table tr:last-child td {
  border-bottom: 0;
}

.telemetry-table tbody tr {
  transition: background 140ms ease;
}

.telemetry-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.axis-name {
  font-weight: 600;
  color: var(--accent);
}

.source-id {
  font-family: "Cascadia Code", "Consolas", monospace;
  color: #c2d5f5;
}

.angle {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1;
}

.status-chip-live {
  color: var(--accent);
  background: rgba(121, 231, 196, 0.08);
}

.status-chip-warn {
  color: var(--warn);
  background: rgba(255, 191, 105, 0.08);
}

.status-chip-neutral {
  color: var(--muted);
  background: rgba(151, 168, 197, 0.08);
}

.muted {
  color: var(--muted);
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .status-group {
    grid-template-columns: 1fr;
  }

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

  .trajectory-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 16px, 1120px);
    margin: 16px auto;
  }

  .telemetry-table {
    display: block;
    overflow-x: auto;
  }
}
