:root {
  --bg: #050b08;
  --bg-soft: rgba(10, 20, 15, 0.78);
  --panel: rgba(8, 18, 13, 0.84);
  --panel-border: rgba(85, 255, 157, 0.16);
  --text: #e9fff0;
  --muted: #9dc8ab;
  --accent: #58ff9e;
  --accent-2: #1ad66f;
  --danger: #ff6666;
  --warn: #ffd166;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(35, 102, 59, 0.20), transparent 30%), var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(88,255,158,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88,255,158,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black, transparent 88%);
}

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

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  padding: 34px 0 24px;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(88,255,158,0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2 { margin: 0 0 10px; }
h1 { font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1.02; margin-top: 14px; }
h2 { font-size: 1.35rem; }
.lede, .section-head p, .receiver-subtitle, .notes-list, .status-row, code { color: var(--muted); }
.lede { font-size: 1.05rem; line-height: 1.7; max-width: 780px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.badge, .footer-chip, .button {
  border: 1px solid var(--panel-border);
  background: rgba(88,255,158,0.07);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.88rem;
}
.button { text-decoration: none; font-weight: 600; }
.button:hover { background: rgba(88,255,158,0.15); }

.panel {
  background: linear-gradient(180deg, rgba(12, 24, 18, 0.95), rgba(8, 16, 12, 0.88));
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.glow { box-shadow: 0 0 0 1px rgba(88,255,158,0.05), 0 0 28px rgba(26,214,111,0.10), var(--shadow); }
.stat-panel { padding: 22px; height: 100%; }
.panel-title { color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; font-weight: 700; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.top-grid { grid-template-columns: repeat(2, 1fr); }
.metric {
  background: rgba(88,255,158,0.045);
  border: 1px solid rgba(88,255,158,0.10);
  border-radius: 16px;
  padding: 14px;
}
.metric .label { display: block; color: var(--muted); font-size: 0.78rem; margin-bottom: 8px; }
.metric strong { font-size: 1.4rem; }
.status-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: var(--warn);
  box-shadow: 0 0 12px currentColor;
}
.status-dot.online { background: var(--accent); color: var(--accent); }
.status-dot.offline { background: var(--danger); color: var(--danger); }
.status-dot.warn { background: var(--warn); color: var(--warn); }

.map-panel { padding: 18px; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.section-head.compact { margin-bottom: 16px; }
.map-frame-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 540px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(88,255,158,0.12);
  background: #06110b;
}
#map-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #06110b;
}

.cards-section { margin-top: 24px; }
.receiver-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.receiver-card { padding: 20px; }
.receiver-head, .receiver-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.receiver-name { font-size: 1.08rem; font-weight: 800; }
.receiver-subtitle { margin-top: 6px; font-size: 0.92rem; }
.receiver-status { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.receiver-footer { margin-top: 16px; flex-wrap: wrap; }

.lower-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  margin-bottom: 36px;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.mini-card {
  background: rgba(88,255,158,0.045);
  border: 1px solid rgba(88,255,158,0.10);
  border-radius: 16px;
  padding: 16px;
}
.mini-card span { display: block; color: var(--muted); margin-bottom: 8px; font-size: 0.82rem; }
.mini-card strong { font-size: 1.3rem; }
.notes-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(88,255,158,0.07);
  padding: 2px 6px;
  border-radius: 8px;
}

@media (max-width: 1080px) {
  .hero,
  .lower-grid,
  .receiver-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 20px, 1380px); }
  .section-head, .receiver-head, .receiver-footer { flex-direction: column; align-items: flex-start; }
  .stat-grid, .top-grid, .mini-grid { grid-template-columns: 1fr 1fr; }
  .map-frame-wrap { min-height: 380px; }
}

@media (max-width: 520px) {
  .stat-grid, .top-grid, .mini-grid { grid-template-columns: 1fr; }
}
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.map-container iframe {
  width: 100%;
  height: 500px;
  border-radius: 10px;
}

.map-container h3 {
  margin-bottom: 10px;
  color: #00ff9c;
}
.aircraft-panel {
  margin-top: 24px;
}

.aircraft-table-wrap {
  overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid rgba(0, 255, 156, 0.12);
  border-radius: 14px;
  background: rgba(0, 20, 12, 0.45);
}

.aircraft-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.aircraft-table thead th {
  position: sticky;
  top: 0;
  background: rgba(0, 30, 20, 0.96);
  color: #8df5c6;
  text-align: left;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 255, 156, 0.14);
}

.aircraft-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 255, 156, 0.08);
  color: #dfffee;
  font-size: 0.95rem;
}

.aircraft-table tbody tr:nth-child(even) {
  background: rgba(0, 255, 156, 0.03);
}

.aircraft-table tbody tr:hover {
  background: rgba(0, 255, 156, 0.08);
}
/* ===== Aircraft Table Enhancements ===== */

.airliner { 
  color: #4dd0ff; 
}

.regional { 
  color: #a0ff7a; 
}

.unknown { 
  color: #ffaa66; 
}

.military {
  color: #ff4d4d;
  font-weight: bold;
}

/* Row hover + animation */
.aircraft-table tbody tr {
  transition: background 0.2s ease, transform 0.1s ease;
}

.aircraft-table tbody tr:hover {
  background: rgba(0, 255, 156, 0.08);
  transform: scale(1.01);
}

/* Subtle glow effect */
.aircraft-table tbody tr td {
  text-shadow: 0 0 6px rgba(0, 255, 156, 0.15);
}
/* ===== Feeder Status Panel ===== */

.feeder-panel {
  margin-top: 24px;
}

.feeder-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.feeder-card {
  border: 1px solid rgba(0, 255, 156, 0.12);
  border-radius: 14px;
  background: rgba(0, 20, 12, 0.45);
  padding: 16px;
  box-shadow: 0 0 16px rgba(0, 255, 156, 0.06);
}

.feeder-card.online {
  border-color: rgba(0, 255, 156, 0.35);
}

.feeder-card.offline {
  border-color: rgba(255, 77, 77, 0.35);
}

.feeder-card.warn {
  border-color: rgba(255, 186, 73, 0.35);
}

.feeder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.feeder-name {
  font-weight: 700;
  color: #dfffee;
}

.feeder-badge {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,156,0.2);
  background: rgba(0,255,156,0.08);
  color: #8df5c6;
}

.feeder-card.offline .feeder-badge {
  border-color: rgba(255,77,77,0.3);
  background: rgba(255,77,77,0.08);
  color: #ff9e9e;
}

.feeder-card.warn .feeder-badge {
  border-color: rgba(255,186,73,0.3);
  background: rgba(255,186,73,0.08);
  color: #ffd48d;
}

.feeder-meta {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: #bfead6;
}

.feeder-meta span {
  color: #8df5c6;
}

.feeder-status-empty {
  color: #8df5c6;
  opacity: 0.8;
}
/* ===== Mobile / Responsive Layout ===== */

img,
iframe {
  max-width: 100%;
}

.aircraft-table-wrap {
  -webkit-overflow-scrolling: touch;
}

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

  .map-container iframe {
    height: 420px;
  }

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

@media (max-width: 900px) {
  .shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero,
  .cards-section,
  .lower-grid,
  .feeder-status-grid,
  .map-grid {
    gap: 16px;
  }

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

  .map-container iframe {
    height: 360px;
  }

  .aircraft-table {
    min-width: 700px;
  }
}

@media (max-width: 768px) {
  .shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: 2.3rem !important;
    line-height: 1.05;
  }

  h2 {
    font-size: 1.4rem;
  }

  .hero {
    grid-template-columns: 1fr !important;
  }

  .hero-copy,
  .hero-panel,
  .panel,
  .map-panel,
  .cards-section,
  .lower-grid {
    width: 100%;
  }

  .summary-grid,
  .mini-grid,
  .lower-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .button-row,
  .hero-actions,
  .map-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .button,
  .hero-actions .button,
  .map-actions .button {
    width: auto;
    min-height: 42px;
  }

  .map-container iframe {
    height: 300px;
  }

  .aircraft-table-wrap {
    max-height: 360px;
  }

  .aircraft-table th,
  .aircraft-table td {
    padding: 9px 10px;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .receiver-grid,
  .feeder-status-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  h1 {
    font-size: 1.9rem !important;
  }

  .summary-grid,
  .mini-grid,
  .lower-grid {
    grid-template-columns: 1fr !important;
  }

  .map-container iframe {
    height: 240px;
  }

  .aircraft-table {
    min-width: 640px;
  }

  .aircraft-table-wrap {
    max-height: 320px;
  }

  .feeder-card,
  .panel {
    padding: 14px;
  }

  .feeder-meta {
    font-size: 0.85rem;
  }
}
