:root {
  --bg-top: #061018;
  --bg-bottom: #02060a;
  --panel: rgba(8, 18, 26, 0.9);
  --panel-strong: rgba(10, 22, 32, 0.96);
  --panel-soft: rgba(13, 27, 39, 0.78);
  --line: #89f7d2;
  --line-soft: rgba(137, 247, 210, 0.2);
  --line-faint: rgba(137, 247, 210, 0.08);
  --accent: #ffb347;
  --accent-strong: #ff7d4a;
  --alert: #ff6b7c;
  --info: #7ad8ff;
  --text: #f4fff8;
  --muted: #a8c9bf;
  --shadow: rgba(0, 0, 0, 0.42);
  --leo: #ffb347;
  --meo: #7ad8ff;
  --geo: #ff6b7c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(122, 216, 255, 0.12), transparent 32%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
}

body {
  position: relative;
  overflow-x: hidden;
}

.starfield {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.85) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 14%, rgba(255, 179, 71, 0.85) 0 1px, transparent 1px),
    radial-gradient(circle at 64% 66%, rgba(137, 247, 210, 0.75) 0 1px, transparent 1px),
    radial-gradient(circle at 86% 74%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px);
  background-size: 180px 180px, 240px 240px, 200px 200px, 260px 260px;
  opacity: 0.5;
  pointer-events: none;
  animation: drift 34s linear infinite;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1380px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 12px 0 28px;
}

.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--panel);
  border: 1px solid rgba(137, 247, 210, 0.42);
  box-shadow:
    0 0 0 1px rgba(255, 179, 71, 0.18),
    0 20px 40px var(--shadow);
  padding: 16px;
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--line-faint);
  pointer-events: none;
}

.command-panel,
.filter-panel,
.table-panel,
.overhead-panel {
  margin-bottom: 14px;
}

.brand-line,
.panel-head,
.filter-row,
.location-line,
.selected-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow,
h1,
h2,
.pixel-button,
th,
.stat-label,
.filter-block span,
.filter-chip,
.overhead-rank,
.meta-label,
.summary-label,
.metric-label {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.62rem;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.4rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.deck-copy,
.panel-copy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.1;
  max-width: 58ch;
}

.panel-copy {
  max-width: 44ch;
}

.pixel-button,
.filter-chip,
.action-link,
.name-link,
.overhead-card {
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    box-shadow 120ms ease;
}

.pixel-button {
  border: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #201108;
  padding: 13px 16px;
  font-size: 0.56rem;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(49, 19, 4, 0.92);
  text-transform: uppercase;
}

.pixel-button:hover,
.action-link:hover,
.name-link:hover,
.filter-chip:hover,
.overhead-card:hover {
  transform: translate(1px, 1px);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.status-chip {
  background: linear-gradient(180deg, rgba(255, 179, 71, 0.14), rgba(137, 247, 210, 0.06));
  border: 1px solid rgba(255, 179, 71, 0.38);
  padding: 12px;
  min-height: 92px;
}

.status-chip-wide {
  grid-column: span 2;
}

.stat-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.5rem;
  text-transform: uppercase;
}

.status-chip strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
}

.status-chip small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

#status-line {
  font-size: 1.05rem;
  line-height: 1.08;
}

.filter-row {
  align-items: end;
  flex-wrap: wrap;
}

.filter-block {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.search-block {
  flex: 1 1 320px;
}

.filter-block span {
  font-size: 0.48rem;
  color: var(--muted);
  text-transform: uppercase;
}

input,
select {
  height: 46px;
  border: 1px solid rgba(137, 247, 210, 0.25);
  background: rgba(2, 9, 14, 0.92);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  font-size: 0.98rem;
}

input::placeholder {
  color: rgba(168, 201, 191, 0.65);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 1px solid rgba(137, 247, 210, 0.25);
  background: rgba(137, 247, 210, 0.06);
  color: var(--text);
  min-height: 46px;
  min-width: 74px;
  padding: 10px 12px;
  font-size: 0.5rem;
  cursor: pointer;
  text-transform: uppercase;
}

.filter-chip.active {
  border-color: var(--accent);
  background: rgba(255, 179, 71, 0.16);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.92fr);
  gap: 14px;
  align-items: start;
}

.main-stack {
  display: grid;
  gap: 14px;
}

.dossier-panel {
  position: sticky;
  top: 10px;
}

h2 {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.clock,
.table-note,
.location-subtitle,
.selected-meta,
.selected-copy,
.warning-note,
.meta-copy {
  color: var(--muted);
}

.clock {
  font-size: 1.08rem;
  color: var(--accent);
  font-weight: 600;
}

.overhead-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.overhead-card,
.overhead-empty {
  position: relative;
  border: 1px solid rgba(137, 247, 210, 0.2);
  background: linear-gradient(135deg, rgba(137, 247, 210, 0.08), rgba(255, 179, 71, 0.06));
  padding: 12px;
}

.overhead-card {
  cursor: pointer;
}

.overhead-card.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 179, 71, 0.35);
}

.overhead-topline,
.overhead-main,
.overhead-metrics,
.selected-hero,
.meta-grid,
.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.overhead-topline,
.summary-head {
  align-items: flex-start;
}

.overhead-rank,
.meta-label,
.summary-label,
.metric-label {
  color: var(--accent);
  font-size: 0.46rem;
  text-transform: uppercase;
}

.overhead-name,
.meta-value {
  font-size: 1.18rem;
  font-weight: 600;
}

.overhead-project {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.06;
}

.overhead-metrics {
  flex-wrap: wrap;
  margin-top: 12px;
}

.metric {
  min-width: 88px;
}

.metric-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
}

.metric-sub {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 7px;
  border: 1px solid var(--line-soft);
  background: rgba(137, 247, 210, 0.1);
  text-transform: uppercase;
}

.badge.leo {
  border-color: rgba(255, 179, 71, 0.45);
  background: rgba(255, 179, 71, 0.16);
}

.badge.meo {
  border-color: rgba(122, 216, 255, 0.45);
  background: rgba(122, 216, 255, 0.14);
}

.badge.geo {
  border-color: rgba(255, 107, 124, 0.45);
  background: rgba(255, 107, 124, 0.14);
}

.badge.designation {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.status-badge.non-operational,
.status-badge.partial,
.status-badge.standby {
  border-color: rgba(255, 107, 124, 0.4);
  background: rgba(255, 107, 124, 0.15);
}

#radar-canvas {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  margin-top: 14px;
  background:
    radial-gradient(circle, rgba(137, 247, 210, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(2, 8, 12, 0.95), rgba(2, 8, 12, 0.78));
  border: 1px solid var(--line-soft);
  image-rendering: pixelated;
  cursor: crosshair;
}

.radar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
  font-size: 1.12rem;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
}

.dot-leo {
  background: var(--leo);
}

.dot-meo {
  background: var(--meo);
  transform: rotate(45deg);
}

.dot-geo {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 12px solid var(--geo);
  margin-right: 10px;
}

.dot-center {
  background: var(--line);
}

.location-card,
.selected-card {
  border: 1px solid var(--line-soft);
  background: var(--panel-strong);
  padding: 14px;
}

.location-card {
  margin: 14px 0 12px;
}

.location-label {
  color: var(--accent);
  font-size: 1.1rem;
}

#location-title {
  font-size: 1.12rem;
  font-weight: 600;
}

.location-subtitle {
  margin: 10px 0 0;
  font-size: 0.92rem;
}

.selected-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.selected-meta {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.selected-copy {
  margin: 12px 0 0;
  font-size: 0.98rem;
  line-height: 1.12;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.meta-item,
.summary-panel,
.selected-grid .stat-tile {
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  padding: 10px 12px;
}

.meta-copy,
.summary-panel p {
  margin: 6px 0 0;
  font-size: 0.92rem;
  line-height: 1.08;
}

.selected-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.stat-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.stat-tile strong {
  font-size: 1.02rem;
  font-weight: 600;
}

.track-panel {
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  padding: 10px 12px 12px;
}

.track-canvas {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 10px;
  border: 1px solid rgba(137, 247, 210, 0.16);
  background:
    radial-gradient(circle at 20% 20%, rgba(122, 216, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(5, 20, 31, 0.94), rgba(4, 11, 18, 0.98));
}

.track-caption {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.1;
}

.selected-actions {
  margin-top: 14px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 179, 71, 0.4);
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 179, 71, 0.14);
}

.action-link.secondary {
  border-color: rgba(137, 247, 210, 0.3);
  background: rgba(137, 247, 210, 0.08);
}

.warning-note {
  margin: 12px 0 0;
  font-size: 1.04rem;
}

.empty-card p,
.overhead-empty {
  margin: 0;
  color: var(--muted);
  font-size: 1.2rem;
}

.table-wrap {
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--line-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  background: var(--panel-strong);
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(137, 247, 210, 0.12);
}

th {
  font-size: 0.46rem;
  color: var(--accent);
  text-transform: uppercase;
}

td {
  font-size: 0.94rem;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.is-selected {
  background: rgba(137, 247, 210, 0.08);
}

.empty-row {
  text-align: center;
  color: var(--muted);
}

.name-link {
  color: var(--text);
  text-decoration: none;
}

.name-link:hover {
  color: var(--accent);
}

.name-subline {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

a {
  color: var(--line);
}

@keyframes drift {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(180px);
  }
}

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

  .dossier-panel {
    position: static;
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-chip-wide {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(100vw - 14px, 1380px);
  }

  .panel {
    padding: 12px;
  }

  .brand-line,
  .panel-head,
  .location-line,
  .selected-actions,
  .overhead-topline,
  .overhead-main,
  .summary-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .status-chip-wide {
    grid-column: span 1;
  }

  .pixel-button,
  .filter-chip {
    width: 100%;
  }

  .overhead-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .metric {
    min-width: 0;
  }
}
