:root {
  --bg: #062a33; --card: #0a3540; --ink: #e6f4f6; --muted: #8fb6bd; --line: #14505e;
  --brand: #22d3ee; --brand-2: #2dd4bf; --ok: #4ade80; --warn: #fbbf24; --late: #f87171;
  --shadow: 0 4px 20px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at 15% 0%, rgba(34,211,238,.14), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(45,212,191,.1), transparent 55%), var(--bg);
  min-height: 100vh; -webkit-text-size-adjust: 100%;
}
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: linear-gradient(120deg, #0e7490, #0d9488); position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 14px rgba(0,0,0,.4); }
.logo { font-size: 28px; }
.topbar h1 { font-size: 18px; margin: 0; font-weight: 750; }
.sub { margin: 2px 0 0; font-size: 12.5px; opacity: .9; }
.layout { display: flex; align-items: flex-start; }
.tabs { display: flex; flex-direction: column; gap: 4px; width: 200px; flex-shrink: 0;
  padding: 14px 10px; position: sticky; top: 76px; min-height: calc(100vh - 120px); }
.tabs button { border: 1px solid transparent; background: transparent; color: var(--muted);
  padding: 10px 14px; border-radius: 12px; font-size: 13.5px; cursor: pointer; text-align: left; font-weight: 600; }
.tabs button:hover { background: rgba(34,211,238,.1); color: var(--brand); }
.tabs button.active { background: linear-gradient(120deg, #0e7490, #0d9488); color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.app { flex: 1; min-width: 0; padding: 16px; max-width: 1080px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 15px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card h2 { font-size: 14px; margin: 0 0 10px; }
.section-title { font-size: 15.5px; font-weight: 750; margin: 20px 4px 10px;
  display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
.grid { display: grid; gap: 14px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 800; }
.stat .d { font-size: 11.5px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 9px; border: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted);
  font-weight: 800; text-align: center; background: rgba(34,211,238,.08); }
td { text-align: center; }
td.l { text-align: left; }
.table-wrap { overflow-x: auto; border-radius: 12px; }
.badge { display: inline-block; font-size: 11px; font-weight: 750; padding: 3px 10px; border-radius: 999px; }
.b-ok { background: rgba(74,222,128,.14); color: var(--ok); }
.b-warn { background: rgba(251,191,36,.14); color: var(--warn); }
.b-bad { background: rgba(248,113,113,.14); color: var(--late); }
.b-off { background: rgba(143,182,189,.12); color: var(--muted); }
.btn { border: 1px solid var(--brand); background: var(--brand); color: #042a31;
  padding: 8px 14px; border-radius: 10px; font-size: 13px; cursor: pointer; font-weight: 700; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.mini { padding: 5px 10px; font-size: 12px; }
.btn.danger { background: transparent; color: var(--late); border-color: var(--late); }
input, select, textarea { font: inherit; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #062a33; color: var(--ink); width: 100%; }
label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 3px; font-weight: 550; }
form .row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; }
.chrow { display: grid; grid-template-columns: 110px 1fr 44px; gap: 8px; align-items: center; font-size: 12px; margin: 3px 0; }
.chbar { height: 8px; border-radius: 6px; background: #062a33; overflow: hidden; }
.chfill { display: block; height: 100%; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: var(--brand); color: #042a31; padding: 10px 18px; border-radius: 12px;
  font-weight: 700; opacity: 0; transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.muted { color: var(--muted); } .small { font-size: 12px; } .tiny { font-size: 11px; }
@media (max-width: 860px) {
  .layout { display: block; }
  .tabs { flex-direction: row; width: auto; min-height: 0; top: 62px; overflow-x: auto;
    background: rgba(6,42,51,.92); }
  .tabs button { width: auto; white-space: nowrap; }
  .cols-4 { grid-template-columns: 1fr 1fr; }
}

/* ---------- glow-up ---------- */
body {
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(34,211,238,.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 110%, rgba(45,212,191,.12), transparent 60%),
    radial-gradient(ellipse 50% 30% at 10% 100%, rgba(168,85,247,.08), transparent 60%),
    var(--bg);
}
.topbar {
  background: linear-gradient(120deg, rgba(14,116,144,.92), rgba(13,148,136,.92));
  backdrop-filter: blur(14px); border-bottom: 1px solid rgba(34,211,238,.25);
}
.topbar h1 { letter-spacing: .3px; }
.logo { filter: drop-shadow(0 0 8px rgba(34,211,238,.6)); }
.tabs button { transition: all .15s; border: 1px solid transparent; }
.tabs button:hover { background: rgba(34,211,238,.1); color: var(--brand); transform: translateX(2px); }
.tabs button.active { background: linear-gradient(120deg, #0e7490, #0d9488); color: #fff;
  box-shadow: 0 3px 12px rgba(34,211,238,.35); border-color: rgba(34,211,238,.4); }
.card { background: linear-gradient(160deg, rgba(16,60,72,.92), rgba(10,53,64,.92));
  border-color: rgba(34,211,238,.16); transition: box-shadow .2s, transform .15s; }
.card:hover { box-shadow: 0 6px 26px rgba(0,0,0,.45), 0 0 0 1px rgba(34,211,238,.08); }
.card h2 { font-weight: 750; letter-spacing: .2px; }
.grid.cols-4 .card.stat { position: relative; overflow: hidden; }
.grid.cols-4 .card.stat::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); opacity: .7; }
.stat .v { background: linear-gradient(180deg, #fff, #a5f3fc); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent; font-size: 24px; }
th { background: rgba(34,211,238,.1); padding: 10px 9px; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(34,211,238,.06); }
.btn { background: linear-gradient(120deg, var(--brand), var(--brand-2)); border: none;
  box-shadow: 0 2px 10px rgba(34,211,238,.35); transition: filter .15s, transform .08s; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; border: 1px solid var(--line); box-shadow: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
.chbar { background: rgba(0,0,0,.4); box-shadow: inset 0 1px 3px rgba(0,0,0,.5); }
.chfill { box-shadow: 0 0 8px currentColor; border-radius: 6px; }
.badge { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
