    :root{
      --bg:#0b0f14;
      --panel:#101824;
      --panel2:#0f1722;
      --text:#e7eef7;
      --muted:#9fb0c3;
      --border:rgba(255,255,255,.08);
      --onlineBg:rgba(34,197,94,.14);
      --onlineText:#5ee28f;
      --shadow:0 12px 30px rgba(0,0,0,.35);
      --accent:#6aa7ff;
    }

    body{
      font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
      margin:24px;
      background:var(--bg);
      color:var(--text);
    }

    header{
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap:16px;
      flex-wrap:wrap;
    }

h1{margin:0;font-size:22px;}
.muted{color:var(--muted);font-size:13px;}
.titleWrap{display:flex;align-items:center;gap:10px;}
.iconLg{width:28px;height:28px;display:block;filter:drop-shadow(0 2px 4px rgba(0,0,0,.35));}
.iconSm{width:18px;height:18px;display:inline-block;vertical-align:middle;transform:translateY(2px);}

    .topRight{display:flex;gap:12px;align-items:center;flex-wrap:wrap;}
    .clockWrap{
      display:flex;
      flex-direction:column;
      gap:2px;
      font-variant-numeric: tabular-nums;
      color:var(--text);
    }
    .clockLine{
      display:flex;
      gap:6px;
      align-items:baseline;
    }
    .clockValue{
      font-size:18px;
      font-weight:900;
    }
    .clockLabelInline{
      color:var(--muted);
      font-size:12px;
    }

    .countdown{
      padding:8px 12px;
      border:1px solid var(--border);
      border-radius:12px;
      background:rgba(255,255,255,.04);
      display:flex;
      gap:6px;
      align-items:center;
    }

    .countNum{
      font-weight:900;
      color:var(--accent);
      min-width:22px;
      text-align:right;
      font-variant-numeric: tabular-nums;
    }

    button{
      padding:10px 14px;
      border-radius:12px;
      border:1px solid rgba(106,167,255,.35);
      background:rgba(106,167,255,.12);
      color:var(--text);
      cursor:pointer;
      white-space: nowrap;
    }
    button:hover{ background:rgba(106,167,255,.18); }

input{
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  min-width:260px;
  outline:none;
}
input:focus{ border-color: rgba(106,167,255,.45); box-shadow: 0 0 0 3px rgba(106,167,255,.14); }

    .row{margin-top:14px;display:flex;gap:12px;flex-wrap:wrap;align-items:center;}

    /* GRID: max 4 → 3 → 2 → 1 */
    .grid{
      margin-top:18px;
      display:grid;
      gap:14px;
      grid-template-columns:repeat(3, minmax(0, 1fr));
    }
    @media(max-width:1400px){ .grid{grid-template-columns:repeat(2, minmax(0,1fr));} }
    @media(max-width:960px){
      .grid{grid-template-columns:1fr;}
      body{margin:14px;}
    }

    .card{
      background:linear-gradient(180deg,var(--panel),var(--panel2));
      border:1px solid var(--border);
      border-radius:16px;
      box-shadow:var(--shadow);
      overflow:hidden;
    }

    .cardHead{
      padding:12px 14px;
      display:flex;
      justify-content:space-between;
      align-items:center;
      border-bottom:1px solid var(--border);
      gap: 10px;
    }

    .airportTitle .code{
      font-size:16px;
      font-weight:900;
      letter-spacing:.6px;
    }
    .airportTitle .sub{
      font-size:12px;
      color:var(--muted);
    }

.pill{
  padding:2px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--border);
      background:var(--onlineBg);
      color:var(--onlineText);
      font-weight:700;
      white-space: nowrap;
    }

    table{width:100%;border-collapse:collapse;}
    th,td{
      padding:10px 12px;
      border-bottom:1px solid var(--border);
      text-align:left;
      vertical-align:top;
    }

    th{
      font-size:11px;
      color:var(--muted);
      text-transform:uppercase;
      letter-spacing:.06em;
    }

    .callsign{
      font-size:18px;
      font-weight:900;
      letter-spacing:.5px;
      white-space:nowrap;
    }

    .frequency{
      font-size:22px;
      font-weight:900;
      font-family:ui-monospace,Menlo,Consolas,monospace;
      white-space:nowrap;
    }
    .freqTools{
      display:flex;
      gap:8px;
      align-items:center;
    }
    .smallBtn{
      padding:6px 10px;
      border-radius:10px;
      border:1px solid rgba(106,167,255,.35);
      background:rgba(106,167,255,.08);
      color:var(--text);
      font-size:12px;
      cursor:pointer;
    }
    .smallBtn:hover{background:rgba(106,167,255,.16);}
.smallBtn.copied{
  border-color:rgba(126,237,173,.55);
  background:rgba(126,237,173,.18);
  color:#7dedad;
}
.smallBtn.atisBtn{border-color:rgba(126,237,173,.35);background:rgba(126,237,173,.12);color:#7dedad;}
.smallBtn.atisBtn:hover{background:rgba(126,237,173,.18);}

    .emptyFull{
      margin-top:18px;
      padding:14px;
      border:1px solid var(--border);
      border-radius:16px;
      background:rgba(255,255,255,.03);
      color:var(--muted);
    }

    /* ---------- TRAFFIC LISTS ---------- */
    .section{
      margin-top:28px;
      border:1px solid var(--border);
      border-radius:16px;
      background:linear-gradient(180deg,var(--panel),var(--panel2));
      box-shadow:var(--shadow);
      overflow:hidden;
    }
    .sectionHead{
      padding:12px 14px;
      border-bottom:1px solid var(--border);
      display:flex;
      gap:12px;
      justify-content:space-between;
      align-items:center;
      flex-wrap:wrap;
    }
    .sectionTitle{
      font-weight:900;
      letter-spacing:.4px;
      display:flex;
      align-items:center;
      gap:10px;
    }
    .sectionTitle .muted{
      font-size:12px;
    }
    .sectionFilters{
      display:flex;
      gap:10px;
      align-items:center;
      flex-wrap:wrap;
    }
    .timeRange{
      display:flex;
      flex-direction:column;
      gap:2px;
      font-size:12px;
    }
    .timeInputs{
      display:flex;
      align-items:center;
      gap:4px;
    }
    .timeInputs input{
      width:70px;
      padding:6px 8px;
    }
    .timeInputs .dash{
      color:#888;
      font-size:12px;
    }
    .defaultHint{
      font-size:11px;
      color:var(--muted);
    }
    .trafficList{
      max-height:520px;
      overflow:auto;
    }
    .trafficRow{
      padding:14px;
      border-bottom:1px solid var(--border);
      display:grid;
      grid-template-columns: 0.5fr 2.5fr 0.9fr 0.4fr 0.8fr 1.1fr 1fr;
      gap:12px;
      align-items:center;
      background:rgba(255,255,255,.02);
    }
    .trafficRow:nth-child(odd){ background:rgba(255,255,255,.01); }
    .trafficRow:last-child{border-bottom:none;}
    .trafficHead{
      font-size:11px;
      letter-spacing:.08em;
      text-transform:uppercase;
      color:var(--muted);
      padding:12px 14px;
      display:grid;
      grid-template-columns: 0.5fr 2.5fr 0.9fr 0.4fr 0.8fr 1.1fr 1fr;
      gap:12px;
      background:rgba(255,255,255,.04);
      border-bottom:1px solid var(--border);
    }
    .callsignCell{
      display:flex;
      align-items:flex-start;
      gap:10px;
      font-weight:900;
      letter-spacing:.4px;
      flex-direction:column;
    }
    .csSmall{color:var(--muted);font-size:12px;font-weight:700;}
    .airlineSmall{color:var(--muted);font-size:12px;font-weight:700;}
    .route{
      color:var(--muted);
      font-size:13px;
      line-height:1.4;
      display:flex;
      flex-direction:column;
      gap:4px;
    }
    .routeLine{
      display:flex;
      gap:8px;
      align-items:flex-start;
    }
    .routeLabel{
      font-size:11px;
      text-transform:uppercase;
      letter-spacing:.06em;
      color:var(--muted);
      min-width:56px;
    }
    .route strong{color:var(--text);}
    .aircraft{
      font-weight:800;
    }
    .aircraftWrap{
      display:flex;
      flex-direction:column;
      gap:2px;
    }
    .aircraftSub{
      color:var(--muted);
      font-size:12px;
    }
    .dirOk{color:#7dedad;font-size:12px;}
    .dirWarn{color:#f87171;font-size:12px;font-weight:800;}
    .heavyBadge{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      padding:2px 6px;
      margin-left:6px;
      border-radius:8px;
      background:rgba(255,165,0,.12);
      border:1px solid rgba(255,165,0,.45);
      color:#ffb347;
      font-size:11px;
      font-weight:900;
      letter-spacing:.08em;
    }
    .flCell{
      display:flex;
      flex-direction:column;
      gap:2px;
      font-variant-numeric: tabular-nums;
    }
    .flVal{
      font-weight:900;
    }
    .flCap{
      font-size:12px;
      letter-spacing:.02em;
    }
    .flWarn{
      color:#ffb3b3;
    }
    .flCapOk{
      color:#7dedad;
    }
    .flCapWarn{
      color:#ffb3b3;
    }
    .divider{
      margin:26px 0 18px;
      border:none;
      border-top:1px solid var(--border);
      opacity:.8;
    }
    .timeDual{
      display:flex;
      flex-direction:column;
      gap:2px;
      font-variant-numeric: tabular-nums;
    }
    .utcSmall{
      font-size:12px;
      color:var(--muted);
    }
    .delayed{
      color:#f87171;
      font-weight:900;
    }
    .badge{
      display:inline-flex;
      align-items:center;
      gap:6px;
      padding:6px 10px;
      border-radius:10px;
      font-size:12px;
      background:rgba(255,255,255,.06);
      border:1px solid var(--border);
      font-weight:700;
    }
    .metaBadge{
      display:inline-flex;
      align-items:center;
      gap:6px;
      padding:6px 10px;
      border-radius:10px;
      border:1px solid var(--border);
      background:rgba(255,255,255,.04);
      font-size:12px;
      font-weight:700;
      color:var(--text);
      white-space:nowrap;
    }
    .metaBadge.good{border-color:rgba(126,237,173,.35);background:rgba(126,237,173,.1);}
    .metaBadge.warn{border-color:rgba(255,165,0,.35);background:rgba(255,165,0,.08);}
    .metaBadge.bad{border-color:rgba(248,113,113,.45);background:rgba(248,113,113,.08);}
.metaBadge .muted{color:var(--muted);font-size:11px;}
.stale{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,165,0,.45);
  background:rgba(255,165,0,.1);
  color:#ffb347;
  font-weight:800;
  display:none;
}
.atisBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:10px;
  border:1px solid rgba(126,237,173,.35);
  background:rgba(126,237,173,.12);
  color:#7dedad;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.trendBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:10px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  border:1px solid rgba(255,255,255,.08);
}
.trendBadge.up{color:#7dedad;border-color:rgba(126,237,173,.35);background:rgba(126,237,173,.12);}
.trendBadge.down{color:#f87171;border-color:rgba(248,113,113,.35);background:rgba(248,113,113,.12);}
.labelMini{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:3px 6px;
  border-radius:8px;
  font-size:11px;
  font-weight:700;
  color:var(--text);
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
  white-space:nowrap;
}
.labelMini.warn{color:#fbbf24;border-color:rgba(251,191,36,.4);background:rgba(251,191,36,.12);}
.labelMini.danger{color:#f87171;border-color:rgba(248,113,113,.4);background:rgba(248,113,113,.12);}
.labelMini.good{color:#7dedad;border-color:rgba(126,237,173,.35);background:rgba(126,237,173,.12);}
    .dot{
      width:8px;height:8px;border-radius:50%;
      background:#7dedad;
      display:inline-block;
    }
    .dot.info{background:#60a5fa;}
    .dot.warn{background:#f59e0b;}
    .dot.danger{background:#f87171;}
    .dot.success{background:#7dedad;}
    .dot.landed{background:#c084fc;}
    .badge.success{color:#7dedad;border-color:rgba(126,237,173,.35);background:rgba(126,237,173,.12);}
    .remark{
      font-weight:800;
      color:var(--muted);
    }
    .radTag{
      display:inline-block;
      padding:4px 10px;
      border-radius:10px;
      border:1px solid var(--border);
      background:rgba(255,255,255,.03);
      color:var(--muted);
      font-size:12px;
      margin-left:8px;
    }
    .radTag.warn{
      color:#ffb3b3;
      border-color:rgba(255,80,80,.4);
      background:rgba(255,80,80,.1);
      font-weight:900;
    }
    .timeCell{
      font-variant-numeric: tabular-nums;
    }

    /* ---------- RAD MODAL ---------- */
    .modalOverlay{
      display:none;
      position:fixed;
      inset:0;
      background:rgba(0,0,0,.65);
      z-index:9999;
      padding: 20px;
    }
    .modal{
      max-width: 1100px;
      height: 82vh;
      margin: 4vh auto;
      background:linear-gradient(180deg,var(--panel),var(--panel2));
      border:1px solid var(--border);
      border-radius:16px;
      box-shadow:var(--shadow);
      overflow:hidden;
      display:flex;
      flex-direction:column;
    }
    .modalHeader{
      padding:12px 14px;
      border-bottom:1px solid var(--border);
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .modalTitle{
      display:flex;
      flex-direction:column;
      gap:2px;
    }
    .modalTitle .t{
      font-weight: 900;
      letter-spacing: .4px;
    }

    .modalBody{
      padding: 12px 14px;
      display:flex;
      flex-direction:column;
      gap: 12px;
      overflow:auto;
    }
.infoPre{
  white-space:pre-wrap;
  font-family:ui-monospace,Menlo,Consolas,monospace;
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  line-height:1.4;
}

.radForm{
  display:flex;
  flex-direction:column;
  
  gap:12px;
}
.radFormRow{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap:16px;
  align-items:end;
}
.radFormRow .field input{
  min-width:0;
  width: 70%;
}
.radForm input,
.radForm button{
  min-width:0;
}
.radActions{
  display:flex;
  gap:10px;
  align-items:flex-end;
  white-space:nowrap;
  justify-self:flex-start;
}

.field label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:8px;
}
.field input{
  min-width: 0;
  width:100%;
  padding:12px 14px;
}
.radActions{
  display:flex;
  gap:10px;
  align-items:flex-end;
  flex-wrap:wrap;
}

    .radStatus{
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: rgba(255,255,255,.03);
      color: var(--muted);
      font-size: 13px;
    }

    /* NEW: FL banner */
    .radCapBanner{
      margin: 6px 0 0 0;
      padding: 12px 16px;
      border-radius: 14px;
      background: linear-gradient(180deg, rgba(255,80,80,.18), rgba(255,80,80,.08));
      border: 1px solid rgba(255,80,80,.35);
      font-weight: 800;
      letter-spacing: .5px;
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap: 12px;
    }
    .radCapLabel{
      color: var(--text);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: .12em;
      opacity: .95;
    }
    .radCapValue{
      font-size: 26px;
      font-weight: 900;
      color: #ffb3b3;
      font-family: ui-monospace, Menlo, Consolas, monospace;
      white-space: nowrap;
    }

    .results{
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow:hidden;
    }
    .resultsHeader{
      padding: 10px 12px;
      border-bottom: 1px solid var(--border);
      display:flex;
      justify-content:space-between;
      gap: 10px;
      flex-wrap: wrap;
      background: rgba(255,255,255,.02);
    }
    .resultsBody{
      max-height: 46vh;
      overflow:auto;
    }

    /* NEW: better result layout */
    .resultRow{
      padding: 12px 12px;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
      color: var(--text);
    }
    .resultRow:last-child{ border-bottom:none; }

    .radRowHeader{
      display:flex;
      gap:8px;
      flex-wrap:wrap;
      align-items:center;
      margin-bottom:10px;
    }

    .radRowLine{
      display:grid;
      grid-template-columns: 60px 1fr;
      gap:10px;
      margin-top:6px;
      line-height: 1.35;
    }

    .radLabel{
      color: var(--muted);
      font-weight: 800;
      letter-spacing: .12em;
      font-size: 11px;
    }
    .radValue{
      color: var(--text);
      word-break: break-word;
    }

    .chip{
      display:inline-block;
      padding: 2px 8px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: rgba(255,255,255,.04);
      color: var(--muted);
      font-size: 12px;
      margin-right: 0;
      white-space: nowrap;
    }
    .mono{
      font-family: ui-monospace, Menlo, Consolas, monospace;
      font-variant-numeric: tabular-nums;
    }

    /* NEW: FL chip */
    .chipFL{
      background: rgba(255,80,80,.15);
      border-color: rgba(255,80,80,.4);
      color: #ffb3b3;
      font-weight: 900;
      letter-spacing: .06em;
    }
