:root {
  --bg: #0b1622;
  --bg-2: #0f1e30;
  --panel: #13273c;
  --ink: #eaf1f8;
  --muted: #9db2c9;
  --accent: #38bdf8;
  --amber: #f5b301;
  --danger: #f2557a;
  --high: #ff8a3d;
  --line: rgba(157, 178, 201, 0.18);
  --radius: 14px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(56,189,248,0.12), transparent 60%),
    radial-gradient(900px 500px at 0% 8%, rgba(245,179,1,0.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: url("/n167da.jpg") no-repeat center center; background-size: cover;
  opacity: 0.05; filter: grayscale(1) contrast(0.85); pointer-events: none;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.boot { padding: 80px; text-align: center; color: var(--muted); }

/* Brand */
.brand-mark { font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.brand-accent { color: var(--accent); }

/* App shell */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side {
  border-right: 1px solid var(--line);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 6px;
  background: rgba(11,22,34,0.6); position: sticky; top: 0; height: 100vh;
}
.side .logo { font-size: 22px; font-weight: 800; padding: 6px 10px 16px; }
.side a.nav { display: block; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.side a.nav:hover { background: var(--bg-2); color: var(--ink); text-decoration: none; }
.side a.nav.active { background: rgba(56,189,248,0.14); color: var(--ink); }
.side .navhead { margin: 16px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber); border-top: 1px solid var(--line); padding-top: 14px; }
.side .spacer { flex: 1; }
.side .who { font-size: 12px; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--line); }

.main { padding: 26px 30px 60px; max-width: var(--max); }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
h1.page { font-size: 26px; letter-spacing: -0.02em; margin: 0; }
.sub { color: var(--muted); font-size: 14px; margin: 4px 0 0; }

/* Cards / grid */
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2,1fr); }
.grid.cols-3 { grid-template-columns: repeat(3,1fr); }
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card .meta { color: var(--muted); font-size: 13px; }
.card.link { cursor: pointer; transition: border-color .15s ease, transform .05s ease; }
.card.link:hover { border-color: var(--accent); }
.card.link:active { transform: translateY(1px); }

/* Buttons + forms */
.btn {
  display: inline-block; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #04121d; border-color: var(--accent); }
.btn.primary:hover { background: #5cc9fa; }
.btn.danger { color: var(--danger); border-color: rgba(242,85,122,0.5); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
input, select, textarea {
  padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--ink); font: inherit; font-size: 14px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
label { font-size: 13px; color: var(--muted); display: block; margin: 0 0 6px; }
.field { margin-bottom: 14px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* Chips / badges */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); }
.chip.info { color: var(--accent); border-color: rgba(56,189,248,0.4); }
.chip.medium { color: var(--amber); border-color: rgba(245,179,1,0.4); }
.chip.high { color: var(--high); border-color: rgba(255,138,61,0.45); }
.chip.critical { color: var(--danger); border-color: rgba(242,85,122,0.5); background: rgba(242,85,122,0.08); }
.chip.role { color: var(--muted); }
.badge-cat { display:inline-block; font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }

.fc { display:inline-block; padding:2px 8px; border-radius:6px; font-weight:700; font-size:12px; }
.fc.VFR { background: rgba(56,189,248,0.18); color:#7dd3fc; }
.fc.MVFR { background: rgba(96,165,250,0.18); color:#93c5fd; }
.fc.IFR { background: rgba(242,85,122,0.18); color:#fda4af; }
.fc.LIFR { background: rgba(216,180,254,0.18); color:#e9d5ff; }

/* Transmission stream */
.tx { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: var(--panel); }
.tx.own { border-color: rgba(56,189,248,0.5); box-shadow: inset 3px 0 0 var(--accent); }
.tx .raw { color: var(--muted); font-size: 13px; margin-top: 6px; font-family: ui-monospace, Menlo, monospace; }
.tx .rendered { font-size: 15px; }
.tx .tx-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:4px; }
.tx .seq { color: var(--muted); font-size: 12px; }
.tx audio { width: 100%; margin-top: 10px; height: 34px; }
.alerts { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }

/* Checklist runner */
.cl-item { display:flex; align-items:center; gap:12px; padding:10px 12px; border-bottom:1px solid var(--line); }
.cl-item .ck { width:22px;height:22px;border-radius:6px;border:1px solid var(--line); display:grid;place-items:center; cursor:pointer; flex:0 0 auto;}
.cl-item.checked .ck { background: var(--accent); color:#04121d; border-color: var(--accent); }
.cl-item .resp { color: var(--amber); font-weight:600; margin-left:auto; font-size:13px; }
.cl-item.label { color: var(--muted); font-style: italic; }
.section-h { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing:.06em; color: var(--muted); }

/* Misc */
.notice { background: rgba(56,189,248,0.08); border:1px solid rgba(56,189,248,0.3); padding:10px 14px; border-radius:10px; font-size:13px; color: var(--ink); margin-bottom:16px; }
.empty { color: var(--muted); padding: 30px; text-align:center; border:1px dashed var(--line); border-radius:12px; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--panel); border:1px solid var(--line); padding:12px 16px; border-radius:10px; font-size:14px; z-index:50; }
.divider { height:1px; background: var(--line); margin: 18px 0; }
.kv { display:grid; grid-template-columns: 140px 1fr; gap:6px 14px; font-size:14px; }
.kv .k { color: var(--muted); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; }
.login-card .logo { font-size: 30px; font-weight: 800; text-align:center; margin-bottom: 6px; }
.login-card .tag { text-align:center; color: var(--muted); font-size: 14px; margin-bottom: 22px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .side .spacer, .side .who { display: none; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .main { padding: 20px; }
}
