@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg:     #0a0e14;
  --bg2:    #0f1724;
  --bg3:    #111825;
  --border: #1e2a38;
  --border2:#2a3a50;
  --text:   #c8d6e5;
  --text2:  #7a8fa6;
  --text3:  #2e3f52;
  --cyan:   #00d4ff;
  --green:  #00c985;
  --amber:  #f5a623;
  --red:    #ff5a5a;
  --purple: #b48eff;
  --yellow: #f5c842;
  --orange: #ff7a3d;
  --mono:   'IBM Plex Mono', 'Courier New', monospace;
  --fs-xs:  11px;
  --fs-sm:  13px;
  --fs-md:  15px;
  --fs-lg:  17px;
  --fs-xl:  20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--mono); font-size: var(--fs-sm);
  line-height: 1.5; overflow-x: hidden; width: 100%;
}

/* ── Header ──────────────────────────────────────────────────────────────────── */
header {
  display: flex; align-items: center; flex-direction: row;
  padding: 8px 16px; background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100; width: 100%;
  flex-wrap: nowrap;
}
.header-top    { display: flex; align-items: center; flex-shrink: 0; }
.header-center { flex: 1; display: flex; justify-content: center; }
.header-right  { display: flex; align-items: center; flex-shrink: 0; }
.logo     { font-size: var(--fs-xl); font-weight: 600; color: #f0f4f8; letter-spacing: .10em; white-space: nowrap; }
.logo-sub { font-size: var(--fs-xs); color: var(--text2); letter-spacing: .06em; margin-left: 8px; }
.clock    { font-size: 20px; color: var(--cyan); letter-spacing: .06em; font-weight: 500; white-space: nowrap; }
.clock-sub { font-size: var(--fs-xs); color: var(--text2); margin-left: 3px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; margin-left: 6px; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }
.header-left { display: flex; align-items: center; flex-shrink: 0; }

/* ── Tabs ─────────────────────────────────────────────────────────────────────── */

.tabs { display: flex; }
.tab {
  background: none; border: none; color: var(--text2);
  font-family: var(--mono); font-size: var(--fs-sm); letter-spacing: .05em;
  padding: 8px 14px; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.tab:hover  { color: var(--text); }
.tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.tab-content { display: none; padding: 14px 20px; width: 100%; overflow-x: hidden; }
.tab-content.active { display: block; }

/* ── FIDS bar ───────────────────────────────────────────────────────────────── */
.fids-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 6px; }
.fids-bar-right { display: flex; align-items: center; gap: 8px; }
.fids-refresh { font-size: var(--fs-xs); color: var(--text3); }
.fids-ctrl-btn {
  font-size: var(--fs-xs); color: var(--text2);
  background: none; border: 1px solid var(--border2);
  padding: 3px 10px; border-radius: 3px; cursor: pointer;
  font-family: var(--mono); letter-spacing: .04em;
}
.fids-ctrl-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.atc-pill { display: inline-block; font-size: var(--fs-xs); padding: 2px 8px; border: 1px solid #00d4ff44; color: var(--cyan); border-radius: 3px; margin-right: 4px; letter-spacing: .05em; }

/* ── Airport block ───────────────────────────────────────────────────────────── */
.airport-block { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 10px; width: 100%; }
.airport-block.collapsed .fids-split { display: none; }
.airport-block.collapsed .apt-header { border-bottom: none; }
.apt-header {
  background: #003a5c;
  padding: 7px 16px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid #005a8c;
  border-top: 1px solid #005a8c;
  cursor: pointer; user-select: none;
}
.apt-header:hover { background: #004a75; }
.apt-toggle { color: #a8d4f0; font-size: 13px; flex-shrink: 0; line-height: 1; transition: transform .2s; display: inline-block; }
.airport-block.collapsed .apt-toggle { transform: rotate(180deg); }
.apt-icao   { font-size: 22px; font-weight: 600; color: #ffffff; letter-spacing: .14em; flex-shrink: 0; }
.apt-name   { font-size: var(--fs-sm); color: #a8d4f0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apt-counts { display: flex; gap: 16px; font-size: var(--fs-md); font-weight: 600; flex-shrink: 0; }
.cnt-arr { color: #00ff9d; }
.cnt-dep { color: var(--amber); }
.cnt-gnd { color: #a8d4f0; }

/* FIDS split: arrivals left, departures right — equal width */
.fids-split { display: flex; width: 100%; overflow: hidden; }
.fids-arr   { flex: 1; border-right: 1px solid var(--border); min-width: 0; overflow: hidden; }
.fids-dep   { flex: 1; min-width: 0; overflow: hidden; }
/* Legacy aliases */
.fids-main  { flex: 1; border-right: 1px solid var(--border); min-width: 0; overflow: hidden; }
.fids-gnd   { width: 280px; flex-shrink: 0; }

.fids-tab-bar { display: flex; background: #080f18; border-bottom: 1px solid var(--border); }
.fids-tab { padding: 6px 14px; font-size: var(--fs-sm); letter-spacing: .06em; color: var(--text2); border-bottom: 2px solid transparent; font-weight: 500; }
.fids-tab.on { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ── Tables ──────────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th { padding: 6px 10px; font-size: var(--fs-sm); color: var(--text2); letter-spacing: .05em; border-bottom: 1px solid var(--border); text-align: left; font-weight: 400; white-space: nowrap; background: #080c12; }
td { padding: 7px 10px; border-bottom: 1px solid #111825; font-size: var(--fs-sm); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg2); }

/* FIDS arrivals table — fixed column widths, responsive */
.fids-arr table, .fids-dep table { table-layout: fixed; width: 100%; }
.fids-arr th:nth-child(1), .fids-arr td:nth-child(1),
.fids-dep th:nth-child(1), .fids-dep td:nth-child(1) { width: 28%; }  /* callsign */
.fids-arr th:nth-child(2), .fids-arr td:nth-child(2),
.fids-dep th:nth-child(2), .fids-dep td:nth-child(2) { width: 18%; }  /* from/to */
.fids-arr th:nth-child(3), .fids-arr td:nth-child(3),
.fids-dep th:nth-child(3), .fids-dep td:nth-child(3) { width: 15%; }  /* type */
.fids-arr th:nth-child(4), .fids-arr td:nth-child(4),
.fids-dep th:nth-child(4), .fids-dep td:nth-child(4) { width: 20%; }  /* status */
.fids-arr th:nth-child(5), .fids-arr td:nth-child(5),
.fids-dep th:nth-child(5), .fids-dep td:nth-child(5) { width: 10%; }  /* dist */
.fids-arr th:nth-child(6), .fids-arr td:nth-child(6),
.fids-dep th:nth-child(6), .fids-dep td:nth-child(6) { width: auto; } /* eta */

/* Legacy */
.fids-main table { table-layout: fixed; }
.fids-main th:nth-child(1), .fids-main td:nth-child(1) { width: 100px; }
.fids-main th:nth-child(2), .fids-main td:nth-child(2) { width: 100px; }
.fids-main th:nth-child(3), .fids-main td:nth-child(3) { width: 65px; }
.fids-main th:nth-child(4), .fids-main td:nth-child(4) { width: 120px; }
.fids-main th:nth-child(5), .fids-main td:nth-child(5) { width: 65px; }
.fids-main th:nth-child(6), .fids-main td:nth-child(6) { width: auto; }

/* All cells same font size — only weight differs */
.cs    { color: #f0f4f8; font-weight: 600; letter-spacing: .05em; font-size: var(--fs-sm); }
.muted { color: var(--text2); font-size: var(--fs-sm); }
.eta   { color: #f0f4f8; font-weight: 600; font-size: var(--fs-sm); }
.dist  { color: var(--text2); font-size: var(--fs-sm); }
.dir-arr { color: var(--green); font-size: var(--fs-sm); font-weight: 500; margin-right: 3px; }
.dir-dep { color: var(--amber); font-size: var(--fs-sm); font-weight: 500; margin-right: 3px; }

/* ── Status badges ───────────────────────────────────────────────────────────── */
.st { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: var(--fs-xs); font-weight: 500; letter-spacing: .04em; border: 1px solid; white-space: nowrap; }
.s-arr  { background:#001a2e; color:var(--cyan);   border-color:#003a5c; }
.s-app  { background:#1a0a2e; color:var(--purple); border-color:#3a1a5c; }
.s-land { background:#1a1200; color:var(--yellow); border-color:#3a2c00; }
.s-park { background:#001a0a; color:var(--green);  border-color:#003a1c; }
.s-dep  { background:#1a0900; color:var(--orange); border-color:#3a1800; }
.s-taxi { background:#1a1400; color:var(--amber);  border-color:#3a2c00; }
.s-enr  { background:#111825; color:var(--text2);  border-color:var(--border); }

.more-row { padding: 6px 14px; font-size: var(--fs-xs); color: var(--text3); cursor: pointer; border-top: 1px solid var(--border); }
.more-row:hover { color: var(--text2); }
.empty-state { text-align: center; color: var(--text2); padding: 28px; font-size: var(--fs-sm); }

/* ── ATC OPS ─────────────────────────────────────────────────────────────────── */
.sector-card { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 14px; width: 100%; }
.sector-hdr  { background: var(--bg2); padding: 9px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sec-cs      { font-size: var(--fs-lg); font-weight: 600; color: #f0f4f8; letter-spacing: .1em; }
.sec-name    { font-size: var(--fs-xs); color: var(--text2); flex: 1; min-width: 0; }
.sec-online  { font-size: var(--fs-xs); color: var(--green); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.sec-dot     { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: blink 1.4s ease-in-out infinite; }

.alert-strip { padding: 8px 14px; font-size: var(--fs-sm); display: flex; align-items: center; gap: 8px; border-bottom: 1px solid; }
.a-ok   { background:#001a0a; color:var(--green); border-color:#003a1c; }
.a-warn { background:#1a1000; color:var(--amber); border-color:#2e2000; }
.a-crit { background:#1a0000; color:var(--red);   border-color:#3a0000; }

.sector-body { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.sec-col     { padding: 10px 14px; border-right: 1px solid var(--border); min-width: 0; }
.sec-col:last-child { border-right: none; }
.col-hdr { font-size: var(--fs-sm); letter-spacing: .05em; color: var(--text2); margin-bottom: 8px; }

.stat-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #111825; font-size: var(--fs-sm); }
.stat-row:last-child { border-bottom: none; }
.stat-lbl { color: var(--text2); } .stat-val { color: #f0f4f8; font-weight: 600; }

.bar-bg   { height: 5px; background: #111825; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.bar-fill { height: 5px; border-radius: 3px; transition: width .5s; }
.b-green  { background: var(--green); }
.b-amber  { background: var(--amber); }
.b-red    { background: var(--red); }

.ac-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid #111825; min-width: 0; }
.ac-row:last-child { border-bottom: none; }
.ac-cs   { color: #f0f4f8; font-weight: 600; letter-spacing: .05em; min-width: 75px; font-size: var(--fs-sm); flex-shrink: 0; }
.ac-dest { color: var(--text2); flex: 1; font-size: var(--fs-xs); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge   { display: inline-block; padding: 2px 7px; border-radius: 3px; font-size: var(--fs-xs); border: 1px solid; letter-spacing: .03em; white-space: nowrap; flex-shrink: 0; }
.b-app  { background:#1a0a2e; color:var(--purple); border-color:#3a1a5c; }
.b-land { background:#1a1200; color:var(--yellow); border-color:#3a2c00; }
.b-arr  { background:#001a2e; color:var(--cyan);   border-color:#003a5c; }
.b-dep  { background:#1a0900; color:var(--orange); border-color:#3a1800; }
.b-taxi { background:#1a1400; color:var(--amber);  border-color:#3a2c00; }
.b-park { background:#001a0a; color:var(--green);  border-color:#003a1c; }
.b-enr  { background:#111825; color:var(--text2);  border-color:var(--border); }
.eta-sm { margin-left: auto; color: #f0f4f8; font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; flex-shrink: 0; }

.forecast-section { padding: 10px 14px; border-top: 1px solid var(--border); }
.forecast-bars  { display: flex; align-items: flex-end; gap: 2px; height: 44px; margin: 6px 0 3px; }
.fb             { flex: 1; border-radius: 2px 2px 0 0; min-width: 0; }
.fb-labels      { display: flex; gap: 2px; }
.fb-lbl         { flex: 1; font-size: 9px; color: var(--text3); text-align: center; min-width: 0; }
.fb-now         { color: var(--cyan); }
.forecast-legend{ display: flex; gap: 12px; font-size: var(--fs-sm); color: var(--text2); margin-top: 5px; flex-wrap: wrap; }
.leg-dot        { display: inline-block; width: 8px; height: 8px; border-radius: 2px; vertical-align: -1px; margin-right: 3px; }

/* ── STATS ───────────────────────────────────────────────────────────────────── */
.stats-controls { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.stats-controls label { color: var(--text2); font-size: var(--fs-sm); display: flex; flex-direction: column; gap: 4px; }

input[type=text], input[type=date] {
  background: var(--bg2); border: 1px solid var(--border2); color: var(--text);
  padding: 6px 10px; border-radius: 4px; font-family: var(--mono);
  font-size: var(--fs-sm); width: 160px; max-width: 100%;
}
input[type=text]:focus, input[type=date]:focus { outline: none; border-color: var(--cyan); }
input[type=text]::placeholder { color: var(--text3); }

button {
  background: var(--bg2); border: 1px solid var(--border2); color: var(--text);
  padding: 6px 14px; border-radius: 4px; font-family: var(--mono);
  font-size: var(--fs-sm); cursor: pointer; letter-spacing: .04em;
}
button:hover { border-color: var(--cyan); color: var(--cyan); }
.preset-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.preset      { padding: 6px 10px; font-size: var(--fs-sm); }
.preset-now  { background: var(--bg2); border: 1px solid var(--cyan); color: var(--cyan); padding: 6px 12px; border-radius: 4px; font-family: var(--mono); font-size: var(--fs-sm); cursor: pointer; }
.preset-now:hover { background: #001a2e; }
.preset.active-preset, .preset-now.active-preset {
  border-color: var(--cyan); color: var(--cyan); background: #001a2e;
}
.period-label { font-size: var(--fs-xs); color: var(--amber); font-family: var(--mono); padding: 4px 8px; letter-spacing: .04em; }

.stats-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 10px; margin-bottom: 18px; }
.sum-card  {
  background: var(--bg2); border-radius: 6px; padding: 12px 14px;
  font-family: var(--mono); display: flex; flex-direction: column;
}
.sum-label {
  font-size: var(--fs-sm); font-family: var(--mono); color: var(--text2);
  letter-spacing: .02em; margin-bottom: 5px;
  min-height: 2.8em; line-height: 1.4;
  display: flex; align-items: flex-end; justify-content: center;
  text-align: center;
}
.sum-value {
  font-size: 26px; color: #f0f4f8; font-weight: 600;
  font-family: var(--mono); text-align: center; width: 100%;
}
.sum-value.cyan  { color: var(--cyan); }
.sum-value.green { color: var(--green); }
.sum-value.amber { color: var(--amber); }

.stats-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats-card  { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 14px; overflow: hidden; min-width: 0; }
.stats-card.wide { grid-column: 1 / -1; }
.card-title  { font-size: var(--fs-sm); color: var(--text2); letter-spacing: .06em; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-title select { background: var(--bg3); border: 1px solid var(--border); color: var(--text); font-family: var(--mono); font-size: var(--fs-sm); padding: 3px 7px; border-radius: 3px; }

.rank-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #111825; font-size: var(--fs-sm); min-width: 0; }
.rank-row:last-child { border-bottom: none; }
.rank-num  { color: var(--text3); min-width: 20px; text-align: right; font-size: var(--fs-sm); flex-shrink: 0; }
.rank-name { color: #f0f4f8; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val  { color: var(--amber); font-weight: 600; flex-shrink: 0; }
.rank-sub  { color: var(--text2); font-size: var(--fs-sm); flex-shrink: 0; }

.apt-row      { display: flex; align-items: center; padding: 6px 0; border-bottom: 1px solid #111825; font-size: var(--fs-sm); min-width: 0; }
.apt-row:last-child { border-bottom: none; }
.apt-row-icao { color: var(--cyan); min-width: 50px; font-weight: 600; font-size: var(--fs-md); flex-shrink: 0; }
.apt-row-name { color: var(--text2); flex: 1; font-size: var(--fs-xs); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apt-row-dep  { color: var(--amber); min-width: 36px; text-align: right; flex-shrink: 0; }
.apt-row-arr  { color: var(--green); min-width: 36px; text-align: right; flex-shrink: 0; }
.apt-row-tot  { color: #f0f4f8; min-width: 40px; text-align: right; font-weight: 600; flex-shrink: 0; }


/* ── Datetime Picker ─────────────────────────────────────────────────────────── */
.dt-wrap { position: relative; display: inline-block; }
.dt-input {
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text); padding: 6px 10px; border-radius: 4px;
  font-family: var(--mono); font-size: var(--fs-sm);
  width: 160px; cursor: pointer; user-select: none;
}
.dt-input:focus { outline: none; border-color: var(--cyan); }
.dt-popup {
  display: none; position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 6px; z-index: 1000; min-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.dt-popup.open { display: block; }
.dt-cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.dt-nav { background: none; border: none; color: var(--text2); font-size: 16px;
  cursor: pointer; padding: 2px 6px; border-radius: 3px; font-family: var(--mono); }
.dt-nav:hover { color: var(--cyan); background: var(--bg3); }
.dt-month-label { color: #f0f4f8; font-size: var(--fs-sm); font-weight: 500; font-family: var(--mono); }
.dt-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; padding: 8px; }
.dt-dow { text-align: center; font-size: 10px; color: var(--text3); padding: 2px 0; font-family: var(--mono); }
.dt-day {
  text-align: center; padding: 5px 2px; font-size: var(--fs-sm);
  border-radius: 3px; cursor: pointer; color: var(--text); font-family: var(--mono);
}
.dt-day:hover { background: var(--bg3); color: var(--cyan); }
.dt-day.today { color: var(--cyan); }
.dt-day.selected { background: var(--cyan); color: #000; font-weight: 600; }
.dt-day.other-month { color: var(--text3); }
.dt-day.disabled { color: var(--text3); cursor: default; pointer-events: none; }
.dt-time-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-top: 1px solid var(--border);
}
.dt-time-label { font-size: var(--fs-xs); color: var(--text2); font-family: var(--mono); white-space: nowrap; }
.dt-time-sel {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: var(--fs-sm);
  padding: 4px 6px; border-radius: 3px; cursor: pointer; flex: 1;
}
.dt-time-sep { color: var(--text2); font-size: var(--fs-md); font-family: var(--mono); }
.dt-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-top: 1px solid var(--border);
}
.dt-now-btn {
  font-size: var(--fs-xs); color: var(--cyan); background: none;
  border: 1px solid var(--border); border-radius: 3px;
  padding: 3px 8px; cursor: pointer; font-family: var(--mono);
}
.dt-now-btn:hover { border-color: var(--cyan); }
.dt-ok-btn {
  font-size: var(--fs-xs); color: #000; background: var(--cyan);
  border: none; border-radius: 3px; padding: 3px 10px;
  cursor: pointer; font-family: var(--mono); font-weight: 600;
}
.dt-ok-btn:hover { background: #00b8e0; }

/* Custom period indicator */
.period-label {
  font-size: var(--fs-xs); color: var(--amber); font-family: var(--mono);
  padding: 4px 8px; letter-spacing: .04em;
}


/* ── Tablet 1024px ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --fs-md: 14px; }
  .clock { font-size: 20px; }
  .logo-sub { display: none; }
  .fids-gnd { width: 240px; }
  .fids-main th:nth-child(1), .fids-main td:nth-child(1) { width: 90px; }
  .fids-main th:nth-child(2), .fids-main td:nth-child(2) { width: 90px; }
  .fids-main th:nth-child(3), .fids-main td:nth-child(3) { width: 60px; }
  .fids-main th:nth-child(4), .fids-main td:nth-child(4) { width: 110px; }
  .fids-main th:nth-child(5), .fids-main td:nth-child(5) { width: 60px; }
}

/* ── Mobile 768px ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --fs-xs: 10px; --fs-sm: 11px; --fs-md: 12px; --fs-lg: 14px; --fs-xl: 15px; }

  /* Mobile header: flex-wrap so top row = logo+clock, bottom row = tabs */
  header { flex-wrap: wrap; padding: 0; }
  .header-top   { order: 1; flex: 1; display: flex; align-items: center; padding: 7px 0 7px 12px; }
  .header-right { order: 2; display: flex; align-items: center; padding: 7px 12px 7px 6px; }
  .header-center {
    order: 3; width: 100%; border-top: 1px solid var(--border);
    justify-content: stretch;
  }
  .tabs { width: 100%; justify-content: stretch; }
  .tab  { flex: 1; text-align: center; padding: 7px 2px; font-size: 11px; letter-spacing: .02em; }
  .logo     { font-size: 13px; letter-spacing: .05em; }
  .logo-sub { display: none; }
  .clock    { font-size: 14px; letter-spacing: .03em; }
  .clock-sub { display: none; }

  .tab-content { padding: 8px 10px; }

  /* FIDS — stack ARR above DEP */
  .fids-split { flex-direction: column; }
  .fids-arr   { border-right: none; border-bottom: 1px solid var(--border); overflow: hidden; width: 100%; }
  .fids-dep   { overflow: hidden; width: 100%; }

  /* Each table fills full width, hide TYPE and DIST */
  .fids-arr table, .fids-dep table { table-layout: fixed; width: 100%; }
  .fids-arr th:nth-child(1), .fids-arr td:nth-child(1),
  .fids-dep th:nth-child(1), .fids-dep td:nth-child(1) { width: 28%; }  /* callsign */
  .fids-arr th:nth-child(2), .fids-arr td:nth-child(2),
  .fids-dep th:nth-child(2), .fids-dep td:nth-child(2) { width: 20%; }  /* from/to */
  .fids-arr th:nth-child(3), .fids-arr td:nth-child(3),
  .fids-dep th:nth-child(3), .fids-dep td:nth-child(3) { display: none; } /* TYPE hidden */
  .fids-arr th:nth-child(4), .fids-arr td:nth-child(4),
  .fids-dep th:nth-child(4), .fids-dep td:nth-child(4) { width: 30%; }  /* status */
  .fids-arr th:nth-child(5), .fids-arr td:nth-child(5),
  .fids-dep th:nth-child(5), .fids-dep td:nth-child(5) { display: none; } /* DIST hidden */
  .fids-arr th:nth-child(6), .fids-arr td:nth-child(6),
  .fids-dep th:nth-child(6), .fids-dep td:nth-child(6) { width: auto; }  /* eta */

  .fids-main { border-right: none; overflow: hidden; }
  .fids-gnd  { width: 100%; }
  .apt-icao  { font-size: 14px; flex: 1; }
  .apt-name  { display: none; }
  .apt-counts { gap: 8px; font-size: 11px; }
  .wx-strip  { display: none !important; }

  /* ATC OPS */
  .sector-body { grid-template-columns: 1fr; }
  .sec-col { border-right: none; border-bottom: 1px solid var(--border); }
  .sec-col:last-child { border-bottom: none; }

  /* Stats controls */
  .stats-controls { gap: 6px; align-items: flex-end; }
  .stats-controls label { flex-direction: column; align-items: flex-start; gap: 4px; }
  input[type=text], input[type=date] { width: 100%; max-width: 175px; }
  .preset-btns { gap: 3px; }

  /* Stats grid */
  .stats-grid { grid-template-columns: 1fr; gap: 10px; }
  .stats-card.wide { grid-column: 1; overflow-x: auto; }
  .stats-card.wide table { min-width: 480px; }
  .stats-summary { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .sum-value { font-size: 18px; }

  .fb-lbl:nth-child(odd) { visibility: hidden; }
  .apt-row-name { display: none; }
}

@media (max-width: 420px) {
  :root { --fs-xs: 10px; --fs-sm: 11px; }
  header { padding: 5px 8px; }
  .logo  { font-size: 12px; }
  .tab   { padding: 5px 6px; font-size: 10px; }
  .tab-content { padding: 6px 8px; }
  .apt-icao  { font-size: 13px; }
  .apt-counts { font-size: 10px; gap: 6px; }
  .sum-value { font-size: 16px; }
}
