/* ==============================================================================
   ✈️ SAKTHI AVIATION TRACKING STATION - UNIFIED COMPACT STYLESHEET
   ============================================================================== */

/* Reset & Root Variables */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #080c14;
  --bg-card: rgba(16, 23, 38, 0.75);
  --bg-card-hover: rgba(22, 32, 54, 0.85);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.5);
  --border-glow: rgba(56, 189, 248, 0.15);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.15);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.15);
  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.15);
  --color-info: #0284c7;
  --color-accent: #38bdf8;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-title: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.45;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Atmosphere Glows */
.bg-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.1;
  pointer-events: none;
}
.bg-glow-1 {
  background: radial-gradient(circle, #0284c7 0%, transparent 70%);
  top: -150px;
  left: -150px;
}
.bg-glow-2 {
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
}

/* App Container */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-card);
  flex-wrap: wrap;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-container {
  position: relative;
  width: 42px;
  height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-svg {
  width: 26px;
  height: 26px;
  color: var(--color-accent);
}

.pulse-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--color-success);
}

.header-title h1 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.header-title .subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 23, 38, 0.6);
  border: 1px solid var(--border-card);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.76rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status-dot-connected { background-color: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.status-dot-checking { background-color: var(--color-warning); }

.uptime-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 23, 38, 0.6);
  border: 1px solid var(--border-card);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.76rem;
}
.uptime-badge .label { color: var(--text-muted); }
.uptime-badge .value { color: var(--color-accent); font-family: var(--font-mono); font-weight: 500; }

.power-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.power-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

/* Alert Banner */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-error-bg);
  border: 1px solid var(--color-error);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  color: #fca5a5;
  font-size: 0.8rem;
}
.hidden { display: none !important; }

/* ==============================================================================
   TIER 1: TOP STATS RIBBON (4 UNIFORM COMPACT TILES)
   ============================================================================== */
.overview-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .overview-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  transition: border-color 0.2s ease;
}
.metric-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.metric-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.metric-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.metric-pill.pill-online {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.metric-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-main-val {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.val-number {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.val-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.mini-bar-bg {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 9999px;
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 9999px;
  transition: width 0.3s ease;
}
.mini-bar-fill.disk-fill {
  background: linear-gradient(90deg, #6366f1, #a855f7);
}
.mini-bar-fill.cpu-fill {
  background: linear-gradient(90deg, #10b981, #0284c7);
}

.mini-status-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.mini-status-row .sub-val {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: 600;
}

.mini-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.mini-bar-item .bar-info {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sdr-duo-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sdr-duo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
}

.sdr-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.sdr-tag-1090 {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.sdr-tag-airband {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.sdr-detail {
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.sdr-detail strong {
  color: #ffffff;
}

/* ==============================================================================
   TIER 2: DUAL BALANCED STATIONS GRID (1:1 SYMMETRY)
   ============================================================================== */
.dual-stations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

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

.station-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.station-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.station-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.station-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-adsb {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.icon-airband {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.station-title-wrap h3 {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}
.station-title-wrap .card-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Left Station: Feeder List */
.unified-feeder-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.feeder-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.85rem;
  background: rgba(10, 15, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  transition: all 0.15s ease;
}
.feeder-row:hover {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
}

.feeder-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.feeder-bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status-bullet-active { background: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.status-bullet-inactive { background: var(--text-muted); }

.feeder-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.feeder-alias {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.feeder-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.feeder-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  min-width: 68px;
  text-align: center;
}
.status-label-active { background: var(--color-success-bg); color: var(--color-success); border: 1px solid rgba(16, 185, 129, 0.25); }
.status-label-inactive { background: rgba(255, 255, 255, 0.04); color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.06); }

.mlat-status-pill {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.mlat-status-pill.status-active { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.mlat-status-pill.status-inactive { background: rgba(255, 255, 255, 0.03); color: var(--text-muted); }

/* Right Station: Airband & ACARS */
.airband-station-card {
  border-color: rgba(56, 189, 248, 0.2);
}

.mode-toggle-group {
  display: inline-flex;
  background: rgba(10, 15, 26, 0.7);
  border: 1px solid var(--border-card);
  border-radius: 9999px;
  padding: 2px;
  gap: 3px;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mode-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-weight: 600;
}

.mode-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.dot-active { background: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.dot-inactive { background: var(--text-muted); }

/* Compact Audio Bar */
.compact-audio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 15, 26, 0.7);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  gap: 0.85rem;
}

.play-btn-large {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: 9999px;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-state-paused {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}
.btn-state-paused:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
}
.btn-state-playing {
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
}
.btn-state-playing:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
}

.player-status-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 140px;
}

.audio-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  width: fit-content;
}
.audio-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.badge-playing {
  background: var(--color-success-bg);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.badge-playing .audio-dot {
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  animation: pulse-dot 1.2s infinite ease-in-out;
}
.badge-paused {
  background: var(--color-warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.badge-paused .audio-dot {
  background: var(--color-warning);
}
.badge-buffering {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}
.badge-buffering .audio-dot {
  background: #38bdf8;
  animation: pulse-dot 0.6s infinite alternate;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.current-channel-info {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.current-channel-info strong {
  color: #38bdf8;
  font-family: var(--font-mono);
}

/* Equalizer Visualizer */
.stream-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.wave-bar {
  width: 2px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 1px;
  opacity: 0.25;
  transition: height 0.15s ease;
}
.stream-visualizer.playing .wave-bar {
  opacity: 1;
  animation: wave 1s ease-in-out infinite alternate;
}
.stream-visualizer.playing .wave-bar:nth-child(2) { animation-delay: 0.15s; }
.stream-visualizer.playing .wave-bar:nth-child(3) { animation-delay: 0.3s; }
.stream-visualizer.playing .wave-bar:nth-child(4) { animation-delay: 0.45s; }
.stream-visualizer.playing .wave-bar:nth-child(5) { animation-delay: 0.2s; }
.stream-visualizer.playing .wave-bar:nth-child(6) { animation-delay: 0.35s; }
.stream-visualizer.playing .wave-bar:nth-child(7) { animation-delay: 0.1s; }
.stream-visualizer.playing .wave-bar:nth-child(8) { animation-delay: 0.25s; }

@keyframes wave {
  0% { height: 3px; }
  100% { height: 14px; }
}

.mini-volume-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.mini-volume-control input[type="range"] {
  width: 65px;
  accent-color: var(--color-accent);
  cursor: pointer;
}
.mini-volume-control .vol-percent {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 28px;
}

.external-stream-link {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-family: var(--font-mono);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  transition: all 0.15s ease;
}
.external-stream-link:hover {
  color: #38bdf8;
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

/* Channel Cards Grid (Uniform 3x2) */
.channel-selector-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.channel-selector-header .selector-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.channel-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

@media (max-width: 640px) {
  .channel-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.channel-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: rgba(10, 15, 26, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.channel-card:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}
.channel-card.active {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.ch-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.2rem;
}

.ch-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
.ch-badge-scan { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.ch-badge-twr  { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.ch-badge-app  { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }
.ch-badge-gnd  { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.ch-badge-radar{ background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.ch-badge-atis { background: rgba(16, 185, 129, 0.2); color: #4ade80; }

.ch-freq-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  color: #93c5fd;
}
.ch-state-indicator {
  font-size: 0.6rem;
  font-weight: 700;
  color: #4ade80;
  font-family: var(--font-mono);
}

.ch-card-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.ch-card-freq {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ==============================================================================
   TIER 3: FULL-WIDTH ACTIVE FLIGHTS RADAR TABLE
   ============================================================================== */
.flights-section.full-width {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.flights-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.flights-header h2 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}
.flights-header .card-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.flights-stats {
  display: flex;
  gap: 0.6rem;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid var(--border-card);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.74rem;
}
.stat-badge .label { color: var(--text-muted); }
.stat-badge .value { color: var(--text-primary); font-family: var(--font-mono); font-weight: 600; }

.table-container {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  background: rgba(10, 15, 26, 0.45);
  max-height: 380px;
  overflow-y: auto;
}

.flights-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.flights-table th {
  position: sticky;
  top: 0;
  background: #0d1322;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-card);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
}

.flights-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.flights-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.05);
}

.hex-cell { color: #94a3b8; }
.callsign-cell { font-weight: 700; color: #ffffff; }
.altitude-cell { color: #38bdf8; font-weight: 600; }

/* Signal Bars */
.signal-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}
.signal-bars .bar {
  width: 2.5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1px;
}
.signal-bars .bar-1 { height: 3px; }
.signal-bars .bar-2 { height: 5px; }
.signal-bars .bar-3 { height: 7px; }
.signal-bars .bar-4 { height: 9px; }
.signal-bars .bar-5 { height: 11px; }

.signal-bars.signal-bars-1 .bar-1,
.signal-bars.signal-bars-2 .bar-1, .signal-bars.signal-bars-2 .bar-2,
.signal-bars.signal-bars-3 .bar-1, .signal-bars.signal-bars-3 .bar-2, .signal-bars.signal-bars-3 .bar-3,
.signal-bars.signal-bars-4 .bar-1, .signal-bars.signal-bars-4 .bar-2, .signal-bars.signal-bars-4 .bar-3, .signal-bars.signal-bars-4 .bar-4,
.signal-bars.signal-bars-5 .bar,
.signal-bars.strength-1 .bar-1,
.signal-bars.strength-2 .bar-1, .signal-bars.strength-2 .bar-2,
.signal-bars.strength-3 .bar-1, .signal-bars.strength-3 .bar-2, .signal-bars.strength-3 .bar-3,
.signal-bars.strength-4 .bar-1, .signal-bars.strength-4 .bar-2, .signal-bars.strength-4 .bar-3, .signal-bars.strength-4 .bar-4,
.signal-bars.strength-5 .bar {
  background-color: var(--color-success) !important;
  box-shadow: 0 0 4px var(--color-success);
}

/* ACARS Panel */
.acars-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  background: rgba(10, 15, 26, 0.6);
  border-radius: 6px;
}
.acars-table th, .acars-table td {
  padding: 0.5rem 0.75rem;
  font-size: 0.76rem;
}
.acars-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.acars-table tbody tr:hover {
  background-color: rgba(56, 189, 248, 0.12) !important;
}
.acars-table td:nth-child(6) {
  max-width: 400px;
  word-break: break-all;
  white-space: normal;
  color: #cbd5e1;
}
.acars-click-hint {
  font-size: 0.72rem;
  color: var(--color-accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  animation: pulseHint 3s infinite;
}
@keyframes pulseHint {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; border-color: rgba(56, 189, 248, 0.5); }
}

/* ==============================================================================
   ACARS Breakdown Modal Popup Styles
   ============================================================================== */
.acars-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.acars-modal-overlay.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}
.acars-modal-card {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.acars-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-card);
}
.acars-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.acars-modal-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
}
.acars-modal-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}
.acars-modal-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}
.acars-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.acars-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.acars-modal-body {
  padding: 1.15rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Plain English Explanation Box */
.acars-summary-card {
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-left: 4px solid var(--color-accent);
  padding: 0.75rem 1rem;
  border-radius: 8px;
}
.acars-summary-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.acars-summary-text {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #f1f5f9;
}

/* Parsed Details Grid */
.acars-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
}
.acars-field-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
}
.acars-field-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}
.acars-field-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f8fafc;
  word-break: break-word;
}
.acars-field-val.accent {
  color: var(--color-accent);
}
.acars-field-val.highlight {
  color: var(--color-success);
}
.acars-field-val a {
  color: var(--color-accent);
  text-decoration: none;
}
.acars-field-val a:hover {
  text-decoration: underline;
}

/* Raw Message Block */
.acars-raw-block {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}
.acars-raw-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.acars-raw-content {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.45;
  color: #94a3b8;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 140px;
  overflow-y: auto;
  user-select: all;
}

.acars-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--border-card);
}
.btn-copy-raw {
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-copy-raw:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--color-accent);
}
.btn-modal-close {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

