:root {
  --bg-deep: #07111e;
  --glass-bg: rgba(10, 20, 35, 0.78);
  --glass-bg-strong: rgba(8, 16, 29, 0.9);
  --glass-border: rgba(148, 184, 228, 0.18);
  --glass-highlight: rgba(56, 189, 248, 0.35);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-violet: #a855f7;
  --shadow-hud: 0 14px 36px rgba(2, 8, 20, 0.55);
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

#airfield-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#airfield-canvas:active {
  cursor: grabbing;
}

#labels-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* Floating 3D Aircraft & Runway Labels */
.ac-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -130%);
  pointer-events: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(7, 15, 28, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  color: #e2e8f0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ac-label:hover,
.ac-label.selected {
  background: rgba(12, 27, 48, 0.96);
  border-color: var(--accent-cyan);
  z-index: 30;
}

.ac-label.selected {
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 8px 20px rgba(0, 0, 0, 0.6);
}

.ac-label .swatch {
  width: 5px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}

.ac-label .cs {
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  color: #f8fafc;
}

.ac-label .meta {
  color: #94a3b8;
  font-size: 10px;
}

.ac-label .rwy-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 9.5px;
  font-weight: 700;
}

.ac-label .rwy-tag.dep {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
}

/* Top Command Bar */
.hud-topbar {
  position: fixed;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  pointer-events: none;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-hud);
}

.brand-radar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.brand-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.brand-title span {
  color: var(--accent-cyan);
  margin-left: 2px;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  min-height: 38px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-hud);
  color: var(--text-primary);
  font-size: 12px;
}

.airport-switcher-wrap {
  position: relative;
}

.airport-pill {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.airport-pill:hover {
  border-color: var(--glass-highlight);
  background: var(--glass-bg-strong);
}

.airport-code {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.13);
  padding: 3px 7px;
  border-radius: 6px;
}

.airport-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.airport-meta strong {
  font-size: 12px;
  font-weight: 600;
}

.airport-meta small {
  font-size: 10px;
  color: var(--text-secondary);
}

.caret {
  color: var(--text-secondary);
  font-size: 11px;
}

/* Airport Switcher Popover */
.hud-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(8, 17, 31, 0.96);
  border: 1px solid rgba(148, 184, 228, 0.25);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65);
  z-index: 40;
}

.popover-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.popover-header strong {
  font-size: 12.5px;
}

.popover-header span {
  font-size: 11px;
  color: var(--text-secondary);
}

.airport-roster-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 340px;
  overflow-y: auto;
}

.roster-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 12px;
  background: rgba(15, 28, 48, 0.55);
  border: 1px solid transparent;
}

.roster-item.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  cursor: pointer;
}

.roster-item.upcoming {
  opacity: 0.72;
}

.roster-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.roster-rank {
  width: 20px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.roster-iata {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #f8fafc;
}

.roster-city {
  color: var(--text-secondary);
  font-size: 11.5px;
}

.roster-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 600;
}

.roster-badge.live {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.roster-badge.phase2 {
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
}

/* Active Flow & Weather Pills */
.pill-kicker {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.runway-badges {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 7px;
  border-radius: 5px;
}

.flt-cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
}

.flt-cat.vfr {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}
.flt-cat.mvfr {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}
.flt-cat.ifr,
.flt-cat.lifr {
  background: rgba(244, 63, 94, 0.24);
  color: #fda4af;
}

.qnh-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

/* Segmented Controls & Feed Controls */
.sky-selector,
.mode-switch {
  display: inline-flex;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 3px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-hud);
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.active {
  background: rgba(56, 189, 248, 0.22);
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.42);
}

.feed-controls {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.feed-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  min-height: 36px;
  border-radius: 10px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-hud);
}

.feed-pill .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.feed-pill.demo .status-dot {
  background: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

.feed-pill.hybrid .status-dot,
.feed-pill.local .status-dot {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.hud-btn {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  color: var(--text-primary);
  padding: 7px 12px;
  min-height: 36px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.hud-btn:hover {
  border-color: var(--glass-highlight);
  background: rgba(20, 38, 66, 0.92);
}

.hud-btn.primary-btn {
  background: rgba(14, 165, 233, 0.25);
  border-color: rgba(56, 189, 248, 0.55);
  color: #e0f2fe;
}

.hud-btn.primary-btn.active {
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(16, 185, 129, 0.65);
  color: #d1fae5;
}

.receiver-btn.connected {
  border-color: rgba(56, 189, 248, 0.6);
  color: #7dd3fc;
}

/* Right Traffic Panel */
.hud-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-hud);
  border-radius: 14px;
}

.traffic-panel {
  position: fixed;
  top: 64px;
  right: 14px;
  bottom: 72px;
  width: 318px;
  z-index: 18;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: height 0.2s ease;
}

.traffic-panel.collapsed {
  bottom: auto;
}

.traffic-panel.collapsed .stats-strip,
.traffic-panel.collapsed .filter-tabs,
.traffic-panel.collapsed .search-row,
.traffic-panel.collapsed .flight-list {
  display: none;
}

.panel-head {
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title-row h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.panel-toggle-btn {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 28, 48, 0.6);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.stat-chip {
  background: rgba(12, 24, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  padding: 6px 6px;
  text-align: center;
}

.stat-chip strong {
  display: block;
  font-size: 15px;
  font-family: var(--font-mono);
  color: #f8fafc;
}

.stat-chip span {
  font-size: 10px;
  color: var(--text-secondary);
}

.stat-chip.muted strong {
  color: #94a3b8;
}

.filter-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  background: rgba(8, 16, 29, 0.68);
  padding: 3px;
  border-radius: 8px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 2px;
  border-radius: 6px;
  cursor: pointer;
}

.tab-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #f8fafc;
}

.search-row input {
  width: 100%;
  background: rgba(8, 16, 29, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.search-row input:focus {
  border-color: var(--accent-cyan);
}

.flight-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.flight-row {
  display: grid;
  grid-template-columns: 4px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(13, 25, 44, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.flight-row:hover {
  background: rgba(20, 37, 64, 0.85);
  border-color: rgba(148, 184, 228, 0.3);
}

.flight-row.selected {
  background: rgba(14, 42, 74, 0.92);
  border-color: var(--accent-cyan);
}

.flight-bar {
  width: 4px;
  height: 100%;
  min-height: 28px;
  border-radius: 99px;
}

.flight-main {
  min-width: 0;
}

.flight-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.flight-cs {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12.5px;
  color: #f8fafc;
}

.flight-type {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.16);
  padding: 1px 5px;
  border-radius: 4px;
}

.flight-sub {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.flight-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.phase-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
}

.phase-pill.FINAL,
.phase-pill.LANDING {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.phase-pill.TAKEOFF,
.phase-pill.DEPARTURE {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.phase-pill.APPROACH {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}

.phase-pill.TAXI,
.phase-pill.PARKED {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}

.phase-pill.OVERFLIGHT,
.phase-pill.OTHER_SURFACE {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.flight-telemetry {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
}

.empty-state {
  padding: 24px 12px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

/* Selected Flight Inspector (Bottom-Left) */
.inspector-card {
  position: fixed;
  left: 14px;
  bottom: 72px;
  width: 356px;
  padding: 14px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.inspector-header {
  display: grid;
  grid-template-columns: 5px 1fr auto;
  gap: 10px;
  align-items: start;
}

.inspector-airline-bar {
  width: 5px;
  height: 40px;
  border-radius: 99px;
  background: var(--accent-cyan);
}

.inspector-callsign-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.inspector-callsign-row h2 {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.type-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.phase-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

#insp-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.inspector-route {
  background: rgba(14, 28, 50, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #bae6fd;
  text-align: center;
}

.inspector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.metric-cell {
  background: rgba(9, 18, 33, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.metric-cell strong {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #f8fafc;
}

.metric-cell small {
  font-size: 10.5px;
  color: var(--text-secondary);
}

.inspector-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.inspector-actions .hud-btn {
  flex: 1;
  padding: 7px 9px;
  font-size: 11.5px;
}

.icon-close-btn {
  border: none;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-secondary);
  width: 26px;
  height: 26px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
}

.icon-close-btn:hover {
  background: rgba(244, 63, 94, 0.24);
  color: #fecdd3;
}

/* Bottom Camera & Layer Dock */
.camera-dock {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-hud);
  max-width: calc(100vw - 24px);
  overflow-x: auto;
}

.dock-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dock-divider {
  width: 1px;
  height: 22px;
  background: rgba(148, 163, 184, 0.22);
}

.dock-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.dock-btn:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.1);
}

.dock-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.48);
  color: #f8fafc;
}

.dock-kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 8, 18, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 490px;
  background: rgba(10, 20, 36, 0.98);
  border: 1px solid rgba(148, 184, 228, 0.28);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-header h2 {
  font-size: 17px;
  margin-top: 2px;
}

.modal-copy {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.modal-copy code,
.modal-examples code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
  padding: 2px 5px;
  border-radius: 4px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}

.text-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(6, 13, 24, 0.9);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 12.5px;
  outline: none;
}

.text-input:focus {
  border-color: var(--accent-cyan);
}

.modal-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

.receiver-feedback {
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.receiver-feedback.ok {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.receiver-feedback.err {
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fecdd3;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 1024px) {
  .plan-pill {
    display: none;
  }
  .traffic-panel {
    width: 280px;
    top: 108px;
  }
  .inspector-card {
    width: 310px;
  }
}

@media (max-width: 720px) {
  .sky-selector {
    display: none;
  }
  .traffic-panel {
    left: 12px;
    right: 12px;
    width: auto;
    top: auto;
    bottom: 68px;
    max-height: 38vh;
  }
  .inspector-card {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 68px;
    z-index: 25;
  }
}

/* Phase 3: ATC Radio Popover, Cockpit HUD & Share Toast */
.atc-wrap {
  position: relative;
}

.atc-popover {
  left: auto;
  right: 0;
  width: 344px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.atc-freq-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.atc-freq-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(13, 25, 44, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 11.5px;
}

.atc-freq-item.recommended {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.48);
}

.atc-role {
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.atc-match-pill {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  letter-spacing: 0.04em;
}

.atc-note {
  display: block;
  font-size: 10.5px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.atc-mhz {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
  font-size: 12px;
}

.atc-links-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.atc-links-row .hud-btn {
  padding: 6px 6px;
  font-size: 11px;
  min-height: 32px;
}

.local-airband-box {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding-top: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.airband-input-row {
  display: flex;
  gap: 6px;
}

.text-input.compact {
  padding: 6px 9px;
  font-size: 11.5px;
}

.cockpit-hud {
  position: fixed;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(6, 20, 34, 0.88);
  border: 1px solid rgba(16, 185, 129, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  font-size: 12px;
}

.cockpit-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.18);
  padding: 2px 7px;
  border-radius: 999px;
}

#cockpit-telemetry {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #bae6fd;
}

.cockpit-exit-btn {
  border: 1px solid rgba(248, 250, 252, 0.25);
  background: rgba(244, 63, 94, 0.22);
  color: #fecdd3;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}

.share-toast {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(12, 34, 56, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Phase 4: 1-Hour Replay DVR Bar & Pro Surface / FAA SWIM Modal */
.replay-trigger-btn.active {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(245, 158, 11, 0.65);
  color: #fef3c7;
}

.replay-bar {
  position: fixed;
  bottom: 66px;
  left: 50%;
  transform: translateX(-50%);
  width: min(676px, calc(100vw - 36px));
  padding: 10px 14px;
  z-index: 23;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(8, 18, 34, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.42);
}

.replay-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.replay-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.22);
  color: #fef3c7;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.replay-play-btn:hover {
  background: rgba(245, 158, 11, 0.36);
}

.replay-speeds {
  display: inline-flex;
  background: rgba(4, 10, 20, 0.72);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.speed-pill {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 6px;
  cursor: pointer;
}

.speed-pill.active {
  background: rgba(245, 158, 11, 0.28);
  color: #fef3c7;
}

.replay-scrubber-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.replay-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}

.replay-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.16);
  padding: 2px 6px;
  border-radius: 4px;
}

#replay-clock {
  font-family: var(--font-mono);
  color: #f8fafc;
}

.replay-offset {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  margin-left: auto;
}

.scrubber-track-wrap {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}

#replay-sparkline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: rgba(6, 13, 24, 0.72);
  pointer-events: none;
}

.replay-slider {
  position: relative;
  z-index: 2;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  height: 28px;
}

.replay-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(148, 163, 184, 0.25);
  border-radius: 99px;
}

.replay-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 22px;
  margin-top: -9px;
  border-radius: 4px;
  background: #fbbf24;
  border: 2px solid #0f172a;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.65);
}

.go-live-btn {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  white-space: nowrap;
  flex-shrink: 0;
}

.modal-card.wide-modal {
  max-width: 560px;
}

.surface-snap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.surface-snap-row strong {
  font-size: 13px;
  color: #ecfdf5;
}

.modal-subcopy {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-top: 2px;
}

.modal-subcopy code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(56, 189, 248, 0.14);
  color: #bae6fd;
  padding: 1px 5px;
  border-radius: 4px;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #6ee7b7;
  cursor: pointer;
  white-space: nowrap;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.swim-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.swim-badge.active {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}

.inline-field-row {
  display: flex;
  gap: 8px;
}

.inline-field-row .text-input {
  flex: 1;
}

/* Phase 2: SFO Runway Status & 3D Zones Popover + Feeder Pipeline Matrix */
.sfo-zones-popover {
  width: 356px;
}

.popover-header.sub-header {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.runway-status-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.rwy-status-card {
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(13, 25, 44, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rwy-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rwy-status-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
}

.rwy-role-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.rwy-role-tag.arr {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}

.rwy-role-tag.dep {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}

.rwy-wind-meta {
  font-size: 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.zone-jump-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(13, 25, 44, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  cursor: pointer;
  transition: all 0.14s ease;
}

.zone-jump-item:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
}

.zone-jump-title {
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
}

.zone-jump-note {
  font-size: 10.5px;
  color: var(--text-secondary);
}

.zone-arrow {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-size: 12px;
}

.modal-card.feeder-modal {
  max-width: 610px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

.provider-health-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.provider-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(8, 16, 29, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.provider-name {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #f8fafc;
}

.provider-role {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}

.provider-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.provider-badge.active,
.provider-badge.online {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}

.provider-badge.feeder-only,
.provider-badge.rate-limited {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.provider-badge.standby,
.provider-badge.unreachable {
  background: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
}

.feeder-keys-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 2px;
}

.compact-btn {
  padding: 5px 10px;
  min-height: 31px;
  font-size: 11px;
}

.osm-attr {
  margin-right: auto;
  font-size: 10.5px;
  color: var(--text-muted);
}
