/* ============================================================================
   AEGIS — Behavioural Identity Control
   Design language: deep-black command HUD · glass · hairline cyan · mono data
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg0: #03050a;
  --bg1: #060a12;
  --panel: rgba(9, 15, 23, 0.55);
  --panel-2: rgba(12, 19, 28, 0.7);
  --line: rgba(74, 226, 199, 0.14);
  --line-2: rgba(74, 226, 199, 0.32);
  --txt: #cfe3e8;
  --mut: #62798a;
  --dim: #33444f;
  --cyan: #3ff0d2;
  --cyan-2: #16c7ac;
  --glow: rgba(63, 240, 210, 0.45);
  --blue: #5aa6ff;
  --green: #2ee08a;
  --amber: #ffb45a;
  --red: #ff5470;
  --violet: #9a7bff;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --disp: 'Orbitron', sans-serif;
  --ui: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(1200px 800px at 70% -10%, #0a1622 0%, var(--bg1) 40%, var(--bg0) 100%);
  color: var(--txt);
  font-family: var(--ui);
  font-size: 14px;
  overflow: hidden;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(63, 240, 210, 0.25); }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: rgba(63, 240, 210, 0.18); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── background layers ──────────────────────────────────────────────────── */
#rain { position: fixed; inset: 0; z-index: 0; opacity: 0.14; }
.grid-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(63, 240, 210, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 240, 210, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 85%);
}
.vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 240px 40px rgba(0, 0, 0, 0.85);
  background: radial-gradient(circle at 50% 120%, rgba(63, 240, 210, 0.06), transparent 60%);
}

/* ── shell ──────────────────────────────────────────────────────────────── */
.app { position: relative; z-index: 3; height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 13, 20, 0.8), rgba(8, 13, 20, 0.2));
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.sigil {
  width: 26px; height: 26px; align-self: center; position: relative;
  border: 1.5px solid var(--cyan); border-radius: 50%;
  box-shadow: 0 0 14px var(--glow), inset 0 0 10px rgba(63, 240, 210, 0.25);
  animation: spin 9s linear infinite;
}
.sigil::before, .sigil::after {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  border: 1px solid rgba(63, 240, 210, 0.4); border-top-color: transparent; border-left-color: transparent;
}
.sigil::after { inset: 8px; animation: spin 4s linear infinite reverse; border-color: rgba(90, 166, 255, 0.5); border-bottom-color: transparent; border-right-color: transparent; }
.wordmark { font-family: var(--disp); font-weight: 900; font-size: 19px; letter-spacing: 6px; color: #eafffb; text-shadow: 0 0 18px var(--glow); }
.wordmark b { color: var(--cyan); }
.tagline { font-family: var(--mono); font-size: 10px; letter-spacing: 3px; color: var(--mut); text-transform: uppercase; }

.topbar .spacer { flex: 1; }
.stat-chip {
  display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px;
  color: var(--mut); padding: 5px 12px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--panel);
}
.stat-chip b { color: var(--txt); font-weight: 500; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); animation: blink 2.2s ease-in-out infinite; }
.dot.live { background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.dot.demo { background: var(--amber); box-shadow: 0 0 9px var(--amber); }
.clock { font-family: var(--mono); font-size: 13px; color: var(--cyan); letter-spacing: 1px; min-width: 86px; text-align: right; text-shadow: 0 0 10px var(--glow); }

/* ── HUD grid ───────────────────────────────────────────────────────────── */
.hud {
  flex: 1; display: grid; gap: 14px; padding: 14px 18px; min-height: 0;
  grid-template-columns: 232px 1fr 332px;
  grid-template-rows: 1fr;
}
.rail { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.core { display: grid; grid-template-rows: 1.35fr 1fr; gap: 14px; min-height: 0; }
.core-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 0; }

/* ── panel ──────────────────────────────────────────────────────────────── */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 18px 50px -28px #000, inset 0 1px 0 rgba(255, 255, 255, 0.02);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
/* HUD corner brackets */
.panel::before, .panel::after {
  content: ''; position: absolute; width: 13px; height: 13px; pointer-events: none; opacity: 0.7;
}
.panel::before { top: -1px; left: -1px; border-top: 1px solid var(--cyan); border-left: 1px solid var(--cyan); }
.panel::after { bottom: -1px; right: -1px; border-bottom: 1px solid var(--cyan); border-right: 1px solid var(--cyan); }

.phead {
  display: flex; align-items: center; gap: 9px; padding: 9px 13px;
  border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.phead h2 {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--mut);
}
.phead .tick { color: var(--cyan); }
.phead .meta { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 1px; }
.pbody { flex: 1; min-height: 0; position: relative; }

/* ── system vitals (left rail) ──────────────────────────────────────────── */
.vitals { flex: 0 0 auto; }
.vitals .pbody { padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.subsys {
  display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 10px; border: 1px solid transparent; border-radius: 3px;
  font-family: var(--mono); cursor: default; transition: 0.25s;
}
.subsys:hover { background: rgba(63, 240, 210, 0.04); border-color: var(--line); }
.subsys .led { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.subsys.warn .led { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.subsys .name { font-size: 11px; letter-spacing: 1.5px; color: var(--txt); text-transform: uppercase; }
.subsys .name small { display: block; color: var(--dim); font-size: 9px; letter-spacing: 1px; }
.subsys .val { font-size: 13px; color: var(--cyan); font-weight: 500; }

.metrics { flex: 1; }
.metrics .pbody { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.metric { border: 1px solid var(--line); border-radius: 3px; padding: 11px 12px; background: rgba(6, 11, 18, 0.4); }
.metric .k { font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--mut); text-transform: uppercase; }
.metric .v { font-family: var(--disp); font-weight: 700; font-size: 23px; color: #eafffb; margin-top: 4px; line-height: 1; }
.metric .v small { font-size: 11px; color: var(--mut); font-family: var(--mono); font-weight: 400; }
.metric.accent .v { color: var(--cyan); text-shadow: 0 0 16px var(--glow); }

/* ── flow canvas ────────────────────────────────────────────────────────── */
.flow .pbody { padding: 0; }
#flow { width: 100%; height: 100%; display: block; }

/* ── fingerprint ────────────────────────────────────────────────────────── */
.fp .pbody { display: grid; grid-template-columns: 1fr; }
#radar { width: 100%; height: 100%; display: block; }
.fp-foot {
  position: absolute; left: 12px; bottom: 10px; right: 12px;
  display: flex; gap: 16px; font-family: var(--mono); font-size: 10px; color: var(--mut);
}
.fp-foot b { color: var(--cyan); }
.legend { display: flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 2px; display: inline-block; border-radius: 2px; }

/* ── verdict ────────────────────────────────────────────────────────────── */
.verdict .pbody { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.gauge-wrap { display: flex; align-items: center; gap: 14px; }
#gauge { width: 116px; height: 116px; flex: 0 0 auto; }
.gauge-side { flex: 1; min-width: 0; }
.subj { font-family: var(--mono); font-size: 11px; color: var(--mut); }
.subj b { color: var(--txt); }
.tier {
  display: inline-block; margin-top: 7px; font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 3px; border: 1px solid;
}
.tier.low { color: var(--green); border-color: rgba(46, 224, 138, 0.4); background: rgba(46, 224, 138, 0.07); }
.tier.medium { color: var(--amber); border-color: rgba(255, 180, 90, 0.4); background: rgba(255, 180, 90, 0.07); }
.tier.high { color: var(--red); border-color: rgba(255, 84, 112, 0.45); background: rgba(255, 84, 112, 0.08); }
.action { margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--mut); }
.action b { color: var(--txt); letter-spacing: 1px; }

.proxies { display: flex; flex-direction: column; gap: 7px; }
.proxy { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 9px; font-family: var(--mono); font-size: 10px; }
.proxy .pl { color: var(--mut); letter-spacing: 1px; text-transform: uppercase; }
.bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--cyan-2), var(--cyan)); transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.proxy.hot .bar > i { background: linear-gradient(90deg, var(--amber), var(--red)); }
.proxy .pv { text-align: right; color: var(--txt); }
.explain { font-family: var(--mono); font-size: 10.5px; line-height: 1.6; color: var(--mut); border-left: 2px solid var(--line-2); padding: 2px 0 2px 10px; }
.explain b { color: var(--cyan); }

/* ── stream / alerts / drift (right rail) ───────────────────────────────── */
.stream { flex: 1.2; }
.stream .pbody, .alerts .pbody { overflow-y: auto; padding: 4px 0; }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 8px 13px;
  border-bottom: 1px solid rgba(63, 240, 210, 0.05); font-family: var(--mono);
  animation: slidein 0.4s ease both;
}
.row .a { display: flex; align-items: center; gap: 8px; }
.row .sid { font-size: 11px; color: var(--txt); }
.row .sub { font-size: 9px; color: var(--dim); }
.row .b { text-align: right; }
.row .conf { font-size: 14px; font-weight: 700; }
.row .rt { font-size: 8.5px; letter-spacing: 1.5px; text-transform: uppercase; }
.conf.low, .rt.low { color: var(--green); }
.conf.medium, .rt.medium { color: var(--amber); }
.conf.high, .rt.high { color: var(--red); }
.spark { width: 30px; height: 14px; }

.alerts { flex: 1; }
.alert {
  padding: 9px 13px; border-bottom: 1px solid rgba(255, 84, 112, 0.08);
  font-family: var(--mono); animation: slidein 0.4s ease both;
}
.alert .top { display: flex; justify-content: space-between; font-size: 10px; }
.alert .top .nm { color: var(--red); letter-spacing: 1px; }
.alert .top .tm { color: var(--dim); }
.alert .dsc { font-size: 10px; color: var(--mut); margin-top: 4px; line-height: 1.5; }
.alert .dsc b { color: var(--txt); }

.drift { flex: 0 0 132px; }
.drift .pbody { padding: 0; }
#driftc { width: 100%; height: 100%; display: block; }

/* ── gate ───────────────────────────────────────────────────────────────── */
.gate {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center;
  background: rgba(3, 5, 10, 0.82); backdrop-filter: blur(10px);
}
.gate.hidden { display: none; }
.gate .box { width: 380px; padding: 26px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--panel-2); box-shadow: 0 0 60px -10px var(--glow); }
.gate h3 { font-family: var(--disp); font-weight: 700; letter-spacing: 3px; color: #eafffb; font-size: 15px; }
.gate p { font-family: var(--mono); font-size: 10.5px; color: var(--mut); margin: 8px 0 16px; line-height: 1.6; }
.gate input { width: 100%; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); color: var(--txt); font-family: var(--mono); font-size: 12px; padding: 10px 12px; border-radius: 3px; margin-bottom: 10px; }
.gate input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 1px var(--glow); }
.gate .btns { display: flex; gap: 9px; }
.gate button {
  flex: 1; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 10px; border-radius: 3px; cursor: pointer; transition: 0.2s; border: 1px solid var(--line-2);
  background: rgba(63, 240, 210, 0.06); color: var(--cyan);
}
.gate button.ghost { background: transparent; border-color: var(--line); color: var(--mut); }
.gate button:hover { background: rgba(63, 240, 210, 0.16); box-shadow: 0 0 18px -4px var(--glow); }

/* ── motion ─────────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes slidein { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.flash-red { animation: flashred 0.9s ease; }
@keyframes flashred { 0%, 100% { box-shadow: 0 18px 50px -28px #000; } 30% { box-shadow: 0 0 40px -6px rgba(255, 84, 112, 0.55); border-color: rgba(255, 84, 112, 0.5); } }

/* ── scanline + cursor glow ─────────────────────────────────────────────── */
.scanline {
  position: fixed; left: 0; right: 0; height: 180px; z-index: 2; pointer-events: none; top: -200px;
  background: linear-gradient(180deg, transparent, rgba(63, 240, 210, 0.05) 45%, rgba(63, 240, 210, 0.10) 50%, rgba(63, 240, 210, 0.05) 55%, transparent);
  animation: sweep 9s linear infinite; mix-blend-mode: screen;
}
@keyframes sweep { 0% { top: -200px; } 100% { top: 100vh; } }
.cursor-glow {
  position: fixed; z-index: 2; width: 460px; height: 460px; pointer-events: none; left: 0; top: 0;
  transform: translate(-50%, -50%); border-radius: 50%; opacity: 0.5;
  background: radial-gradient(circle, rgba(63, 240, 210, 0.07), transparent 60%);
  transition: opacity 0.4s;
}

/* ── boot sequence ──────────────────────────────────────────────────────── */
.boot {
  position: fixed; inset: 0; z-index: 60; background: #03050a;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.boot.gone { opacity: 0; transform: scale(1.05); pointer-events: none; }
.boot-core { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.boot-ring { position: absolute; inset: 0; border: 1px solid rgba(63, 240, 210, 0.5); border-radius: 50%; border-top-color: var(--cyan); border-right-color: transparent; animation: spin 1.6s linear infinite; box-shadow: 0 0 40px -6px var(--glow); }
.boot-ring.r2 { inset: 16px; border-color: rgba(90, 166, 255, 0.4); border-top-color: transparent; border-bottom-color: var(--blue); animation: spin 2.4s linear infinite reverse; }
.boot-ring.r3 { inset: 32px; border-color: rgba(46, 224, 138, 0.35); border-left-color: var(--green); border-right-color: transparent; animation: spin 3.4s linear infinite; }
.boot-mark { font-family: var(--disp); font-weight: 900; font-size: 26px; letter-spacing: 6px; color: #eafffb; text-shadow: 0 0 22px var(--glow); }
.boot-mark b { color: var(--cyan); }
.boot-term { font-family: var(--mono); font-size: 11px; line-height: 1.75; color: var(--green); width: min(560px, 80vw); height: 168px; overflow: hidden; white-space: pre-wrap; text-shadow: 0 0 8px rgba(46, 224, 138, 0.4); }
.boot-term .ok { color: var(--cyan); }
.boot-term .dim { color: var(--mut); }
.boot-bar { width: min(560px, 80vw); height: 2px; background: rgba(63, 240, 210, 0.12); border-radius: 2px; overflow: hidden; }
.boot-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan-2), var(--cyan)); box-shadow: 0 0 14px var(--glow); transition: width 0.2s linear; }

/* ── threat level ───────────────────────────────────────────────────────── */
.threat-lvl {
  display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  color: var(--mut); padding: 5px 13px; border-radius: 3px; border: 1px solid var(--line); background: var(--panel); transition: 0.4s;
}
.threat-lvl b { letter-spacing: 2px; }
.threat-lvl .tl-dot { width: 8px; height: 8px; border-radius: 50%; }
.threat-lvl[data-l="calm"] { color: var(--green); border-color: rgba(46, 224, 138, 0.3); }
.threat-lvl[data-l="calm"] .tl-dot { background: var(--green); box-shadow: 0 0 9px var(--green); }
.threat-lvl[data-l="guarded"] { color: var(--blue); border-color: rgba(90, 166, 255, 0.35); }
.threat-lvl[data-l="guarded"] .tl-dot { background: var(--blue); box-shadow: 0 0 9px var(--blue); }
.threat-lvl[data-l="elevated"] { color: var(--amber); border-color: rgba(255, 180, 90, 0.4); }
.threat-lvl[data-l="elevated"] .tl-dot { background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: blink 1s infinite; }
.threat-lvl[data-l="critical"] { color: var(--red); border-color: rgba(255, 84, 112, 0.5); background: rgba(255, 84, 112, 0.06); }
.threat-lvl[data-l="critical"] .tl-dot { background: var(--red); box-shadow: 0 0 12px var(--red); animation: blink 0.55s infinite; }

/* ── log console ────────────────────────────────────────────────────────── */
.logbar {
  flex: 0 0 30px; display: flex; align-items: center; gap: 9px; padding: 0 20px;
  border-top: 1px solid var(--line); background: linear-gradient(0deg, rgba(8, 13, 20, 0.8), transparent);
  font-family: var(--mono); font-size: 10.5px;
}
.log-prompt { color: var(--cyan); }
.log-line { color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-line .sv-red { color: var(--red); } .log-line .sv-amber { color: var(--amber); } .log-line .sv-cyan { color: var(--cyan); }
.log-cursor { color: var(--cyan); animation: blink 1.1s steps(1) infinite; }
.log-spacer { flex: 1; }
.log-meta { color: var(--dim); letter-spacing: 1px; white-space: nowrap; }
.log-meta b { color: var(--mut); }

/* ── pinned session ─────────────────────────────────────────────────────── */
.row { cursor: pointer; transition: background 0.2s; }
.row:hover { background: rgba(63, 240, 210, 0.05); }
.row.pinned { background: rgba(63, 240, 210, 0.09); box-shadow: inset 2px 0 0 var(--cyan); }
.pinbadge { display: none; margin-left: auto; font-family: var(--mono); font-size: 8.5px; letter-spacing: 1.5px; color: var(--cyan); border: 1px solid var(--line-2); border-radius: 2px; padding: 1px 5px; cursor: pointer; }
.verdict.pinned .pinbadge { display: inline-block; }
.verdict.pinned::before, .verdict.pinned::after { border-color: var(--amber); }

/* ── shell: sidebar + stage + pages ─────────────────────────────────────── */
.body { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: 190px; flex: 0 0 auto; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(8, 13, 20, 0.6), rgba(8, 13, 20, 0.15));
  padding: 12px 10px; gap: 6px;
}
#nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.navitem {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 4px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 1.5px; color: var(--mut); text-transform: uppercase;
  cursor: pointer; transition: 0.2s; border: 1px solid transparent; user-select: none;
}
.navitem .ic { font-size: 14px; width: 16px; text-align: center; color: var(--mut); transition: 0.2s; }
.navitem:hover { background: rgba(63, 240, 210, 0.05); color: var(--txt); }
.navitem:hover .ic { color: var(--cyan); }
.navitem.active { background: rgba(63, 240, 210, 0.08); color: #eafffb; border-color: var(--line); }
.navitem.active .ic { color: var(--cyan); text-shadow: 0 0 12px var(--glow); }
.navitem.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 2px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); border-radius: 2px; }
.navitem .badge { margin-left: auto; min-width: 16px; text-align: center; font-size: 9px; padding: 1px 5px; border-radius: 8px; background: rgba(63, 240, 210, 0.14); color: var(--cyan); display: none; }
.navitem .badge.warn { background: rgba(255, 84, 112, 0.16); color: var(--red); }
.navitem .badge.on { display: inline-block; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.sf-row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9.5px; letter-spacing: 1px; color: var(--dim); }
.sf-row b { color: var(--mut); } .sf-row b.ok { color: var(--green); }

.stage { flex: 1; position: relative; min-height: 0; overflow: hidden; }
.page { position: absolute; inset: 0; display: none; flex-direction: column; padding: 14px 18px; gap: 14px; }
.page.active { display: flex; animation: pagein 0.45s cubic-bezier(.2,.8,.2,1); }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#page-overview { padding: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex: 0 0 auto; }
.page-head h1 { font-family: var(--disp); font-weight: 700; font-size: 17px; letter-spacing: 2px; color: #eafffb; text-shadow: 0 0 18px rgba(63, 240, 210, 0.25); }
.page-head p { font-family: var(--mono); font-size: 10.5px; color: var(--mut); margin-top: 4px; }
.page-ctl { display: flex; gap: 9px; align-items: center; }
.page-grid { flex: 1; min-height: 0; display: grid; gap: 14px; }
.page-grid > .panel, .page canvas { width: 100%; height: 100%; }
.page canvas { display: block; }
.fleet-grid { grid-template-columns: 1fr 332px; }
.fleet-side { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; min-height: 0; }
.net-grid { grid-template-columns: 1fr 320px; }
.subj-grid { grid-template-columns: 1fr 360px; }
.data-grid { grid-template-columns: 1fr 380px; }
.model-grid { grid-template-columns: 1fr 1fr; }
.an-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

/* kpi chips in page heads */
.kpi { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--mut); padding: 6px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); text-transform: uppercase; }
.kpi b { color: var(--cyan); font-size: 14px; font-weight: 700; margin-left: 5px; }
.kpi.red b { color: var(--red); } .kpi.amber b { color: var(--amber); } .kpi.green b { color: var(--green); }

/* search */
.search { font-family: var(--mono); font-size: 11px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); color: var(--txt); padding: 8px 12px; border-radius: 3px; width: 240px; }
.search:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 1px var(--glow); }

/* maturity / risk bars */
.hbars { padding: 12px; display: flex; flex-direction: column; gap: 11px; }
.hbar { font-family: var(--mono); font-size: 10px; }
.hbar .lab { display: flex; justify-content: space-between; color: var(--mut); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.hbar .lab b { color: var(--txt); }
.hbar .track { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.hbar .track > i { display: block; height: 100%; border-radius: 4px; transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.hbar.learning i { background: linear-gradient(90deg, #2a6, var(--blue)); }
.hbar.active i { background: linear-gradient(90deg, var(--cyan-2), var(--cyan)); }
.hbar.degraded i, .hbar.high i { background: linear-gradient(90deg, var(--amber), var(--red)); }
.hbar.medium i { background: linear-gradient(90deg, #b80, var(--amber)); }
.hbar.low i { background: linear-gradient(90deg, #1a7, var(--green)); }

/* tables */
.table-wrap { overflow: auto; }
table.grid { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 11px; }
table.grid th { position: sticky; top: 0; text-align: left; padding: 9px 12px; color: var(--mut); font-weight: 500; letter-spacing: 1px; text-transform: uppercase; font-size: 9px; background: rgba(8, 13, 20, 0.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
table.grid td { padding: 8px 12px; border-bottom: 1px solid rgba(63, 240, 210, 0.05); color: var(--txt); }
table.grid tr { cursor: pointer; transition: background 0.15s; }
table.grid tbody tr:hover { background: rgba(63, 240, 210, 0.05); }
table.grid tr.sel { background: rgba(63, 240, 210, 0.09); box-shadow: inset 2px 0 0 var(--cyan); }
.pill-s { padding: 2px 7px; border-radius: 3px; font-size: 8.5px; letter-spacing: 1px; text-transform: uppercase; border: 1px solid; }
.pill-s.low, .pill-s.active { color: var(--green); border-color: rgba(46, 224, 138, 0.35); }
.pill-s.medium, .pill-s.learning { color: var(--amber); border-color: rgba(255, 180, 90, 0.35); }
.pill-s.high, .pill-s.degraded { color: var(--red); border-color: rgba(255, 84, 112, 0.4); }
.mono-dim { color: var(--dim); }

/* ring list / cases */
.ring-row, .case-row { padding: 11px 13px; border-bottom: 1px solid rgba(63, 240, 210, 0.06); font-family: var(--mono); cursor: pointer; transition: 0.15s; }
.ring-row:hover, .case-row:hover { background: rgba(63, 240, 210, 0.05); }
.ring-row .rt { display: flex; justify-content: space-between; font-size: 11px; color: var(--txt); }
.ring-row .rt b { color: var(--red); }
.ring-row .rm { font-size: 9.5px; color: var(--mut); margin-top: 3px; }
.case-actions { display: flex; gap: 6px; margin-top: 7px; }
.case-actions button { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; padding: 4px 9px; border-radius: 3px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--mut); transition: 0.2s; }
.case-actions button.fraud:hover { border-color: var(--red); color: var(--red); }
.case-actions button.genuine:hover { border-color: var(--green); color: var(--green); }
.case-row.done { opacity: 0.4; }

/* subject detail */
.sd { padding: 14px; display: flex; flex-direction: column; gap: 12px; font-family: var(--mono); }
.sd .sd-id { font-size: 13px; color: #eafffb; }
.sd .sd-row { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--mut); border-bottom: 1px solid var(--line); padding: 6px 0; }
.sd .sd-row b { color: var(--txt); }
.sd canvas { height: 190px; }
.sd .empty { color: var(--dim); text-align: center; padding: 40px 0; font-size: 11px; }
.sd .sd-sub { color: var(--mut); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }

/* proxy rates / zone bars reuse hbars */
.soon .pbody { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.soon-mark { font-size: 44px; color: var(--cyan); opacity: 0.4; text-shadow: 0 0 30px var(--glow); }
.soon h2 { font-family: var(--disp); letter-spacing: 3px; color: var(--txt); font-size: 14px; }
.soon p { font-family: var(--mono); font-size: 10.5px; color: var(--mut); max-width: 380px; line-height: 1.7; }

@media (max-width: 1180px) {
  .hud { grid-template-columns: 1fr; grid-template-rows: auto; overflow-y: auto; }
  body { overflow: auto; }
}
