/* ==========================================================================================================
   NEURAL DECK -- the visual style of Vicki's status page, as a standalone theme.
   Dark-only by design: it's a control-room display. Values are copied from the real status.css
   (reference/status.css); the alert pieces at the end (severity, alert cards) are new, built from the same parts.
   Fonts: ../fonts (Orbitron for headings/brand/numbers, Share Tech Mono for everything else). See DESIGN.md.
   ========================================================================================================== */

@font-face {
  font-family: "Orbitron"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../fonts/Orbitron-Variable.woff2") format("woff2");
}
@font-face {
  font-family: "Share Tech Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ShareTechMono-Regular.woff2") format("woff2");
}

/* ---------------------------------------------------------------------------------------------- tokens */
:root {
  color-scheme: dark;
  --bg: #03060c;                          /* page, bottom of the gradient */
  --bg2: #070d18;                         /* page, top of the gradient */
  --panel: rgba(8, 18, 32, 0.72);         /* glassy panel fill */
  --panel-edge: rgba(80, 220, 255, 0.22); /* panel border */
  --border: rgba(80, 220, 255, 0.18);     /* hairlines, inputs, tiles */
  --text: #d8f4ff;
  --muted: #6f93a8;
  --faint: #3d5a6c;
  --log: #86b8c9;                         /* plain terminal/log lines */
  --pre: #a9d8e8;                         /* expanded JSON / detail text */

  --cyan: #38e1ff;                        /* the primary accent */
  --magenta: #ff3dcb;                     /* timestamps, the second gradient stop */
  --amber: #ffb547;                       /* warning */
  --lime: #7dff9b;                        /* ok / live / on */
  --red: #ff4d6a;                         /* error / critical / offline */
  --violet: #b98cff;                      /* a fourth category colour */

  --ok: var(--lime);
  --warn: var(--amber);
  --bad: var(--red);
  --info: var(--cyan);

  --accent: var(--cyan);                  /* one live accent: brand, panel top edge, corner brackets */

  --font-display: "Orbitron", "Share Tech Mono", sans-serif;
  --font-mono: "Share Tech Mono", "SFMono-Regular", Consolas, monospace;
}
/* swap the whole page's accent with one class (Vicki's page does this from her mood) */
body.accent-lime    { --accent: #7dff9b; }
body.accent-amber   { --accent: #ffb547; }
body.accent-red     { --accent: #ff4d6a; }
body.accent-magenta { --accent: #ff6fd8; }
body.accent-violet  { --accent: #c77dff; }

/* ---------------------------------------------------------------------------------------------- base */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 700px at 50% 38%, rgba(56, 225, 255, 0.08), transparent 70%),
    radial-gradient(900px 600px at 85% 90%, rgba(255, 61, 203, 0.06), transparent 70%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; border-bottom: 1px dotted rgba(56, 225, 255, 0.5); }
.mono { font-family: var(--font-mono); }
.dim { color: var(--muted); }
.faint { color: var(--faint); }
.hidden { display: none !important; }

/* CRT overlay: two fixed layers over everything (pointer-events none) */
#scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
#vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 49;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------------------------------------------------------------------------------------------- top bar */
#topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(3, 8, 16, 0.95), rgba(3, 8, 16, 0.75));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 0 24px rgba(56, 225, 255, 0.08);
  backdrop-filter: blur(6px);
}
.brand {
  font-family: var(--font-display); font-weight: 900; letter-spacing: 0.22em;
  font-size: 18px; color: var(--accent); text-shadow: 0 0 12px var(--accent);
  white-space: nowrap;
}
.brand-glyph { display: inline-block; animation: spin 12s linear infinite; margin-right: 6px; }
.brand-sub { color: var(--muted); font-weight: 500; letter-spacing: 0.12em; font-size: 12px; text-shadow: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.topbar-mid { color: var(--muted); display: flex; gap: 10px; align-items: center; }
.topbar-mid .sep { color: var(--faint); }
.topbar-mid .rate { color: var(--cyan); }
.topbar-right { display: flex; gap: 10px; align-items: center; }
.pill {
  padding: 3px 10px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--accent); color: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 40%, transparent) inset;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.conn-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.conn-dot.online { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: blink 2.4s infinite; }
.conn-dot.offline { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
@keyframes blink { 50% { opacity: 0.45; } }
.mini-link { color: var(--faint); text-decoration: none; font-size: 11px; border-bottom: 1px dotted var(--faint); }
.mini-link:hover { color: var(--cyan); }

/* title glitch: two offset colour ghosts that twitch every few seconds. <span class="glitch" data-text="X">X</span> */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; opacity: 0;
}
.glitch::before { color: var(--magenta); animation: glitchA 6s infinite steps(1); }
.glitch::after { color: var(--cyan); animation: glitchB 6s infinite steps(1); }
@keyframes glitchA { 0%, 92%, 100% { opacity: 0; } 93% { opacity: 0.8; transform: translate(-2px, 1px); clip-path: inset(0 0 55% 0); } 95% { opacity: 0.8; transform: translate(2px, -1px); clip-path: inset(40% 0 0 0); } }
@keyframes glitchB { 0%, 93%, 100% { opacity: 0; } 94% { opacity: 0.8; transform: translate(2px, 0); clip-path: inset(20% 0 40% 0); } 96% { opacity: 0.8; transform: translate(-1px, 1px); clip-path: inset(60% 0 0 0); } }

/* ---------------------------------------------------------------------------------------------- tabs (groups + sub-tabs) */
/* <nav id="tabs"><div class="tab-groups"> .tab-group (style="--gc:#38e1ff") ... <span class="tg-ink"></span></div>
   <div class="tab-subs"><div class="tab-sub open"> .tab ... </div></div></nav>   --gc = that group's colour */
#tabs { max-width: 2200px; margin: 0 auto; padding: 12px 18px 0; position: relative; }
#tabs .tab-groups { display: flex; gap: 8px; position: relative; padding-bottom: 7px; --ink-x: 0px; --ink-w: 0px; --ink-c: var(--cyan); }
#tabs .tab-group {
  --gc: var(--cyan);
  position: relative; display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto;
  font: 700 12px var(--font-display); letter-spacing: .26em; color: var(--muted);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 255, 255, .07); padding: 9px 22px 9px 10px; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition: color .25s, background .3s, border-color .3s, box-shadow .3s, transform .2s;
}
#tabs .tab-group::after {      /* the cut corner's edge */
  content: ""; position: absolute; top: 6px; right: -2px; width: 20px; height: 1px; transform: rotate(45deg);
  background: color-mix(in srgb, var(--gc) 55%, transparent); opacity: .35; transition: opacity .3s;
}
.tg-glyph {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px;
  color: var(--gc); background: color-mix(in srgb, var(--gc) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gc) 45%, transparent); transition: all .35s;
}
#tabs .tab-group:hover { color: var(--text); border-color: color-mix(in srgb, var(--gc) 45%, transparent); transform: translateY(-1px); }
#tabs .tab-group:hover .tg-glyph { transform: rotate(-12deg) scale(1.08); }
#tabs .tab-group.active {
  color: var(--gc); border-color: color-mix(in srgb, var(--gc) 60%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gc) 20%, transparent), color-mix(in srgb, var(--gc) 3%, transparent));
  text-shadow: 0 0 12px color-mix(in srgb, var(--gc) 75%, transparent);
  box-shadow: 0 0 26px -8px var(--gc), inset 0 1px 0 color-mix(in srgb, var(--gc) 45%, transparent);
}
#tabs .tab-group.active::after { opacity: 1; }
#tabs .tab-group.active .tg-glyph { background: var(--gc); color: #03060c; box-shadow: 0 0 16px var(--gc); animation: tgPulse 2.6s ease-in-out infinite; }
@keyframes tgPulse { 50% { box-shadow: 0 0 26px var(--gc), 0 0 6px var(--gc); } }
.tg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: blink 1.1s infinite; }
.tg-ink {   /* the glowing underline that slides to the active group: set --ink-x / --ink-w / --ink-c from JS */
  position: absolute; left: 0; bottom: 0; height: 3px; width: var(--ink-w); transform: translateX(var(--ink-x));
  background: linear-gradient(90deg, transparent, var(--ink-c) 20%, #fff 50%, var(--ink-c) 80%, transparent);
  box-shadow: 0 0 14px var(--ink-c), 0 0 3px var(--ink-c); border-radius: 2px; pointer-events: none;
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.15), width .5s cubic-bezier(.2, .9, .25, 1.15), background .5s;
}
#tabs .tab-subs {
  position: relative; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(8, 18, 32, .75), rgba(8, 18, 32, .2) 70%, transparent);
}
#tabs .tab-sub { display: none; gap: 8px; padding: 9px 4px 9px 0; align-items: center; }
#tabs .tab-sub.open { display: flex; animation: subIn .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes subIn { from { opacity: 0; transform: translateY(-5px); clip-path: inset(0 100% 0 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
#tabs .tab-sub::before {
  content: ""; width: 4px; align-self: stretch; flex: none; margin-right: 6px;
  background: linear-gradient(180deg, var(--gc, var(--cyan)), transparent); box-shadow: 0 0 10px var(--gc, var(--cyan));
}
#tabs .tab {
  font: 500 10.5px var(--font-display); letter-spacing: .18em; color: var(--muted); flex: 0 0 auto;
  background: rgba(255, 255, 255, .025); border: 1px solid rgba(255, 255, 255, .08); border-radius: 999px;
  padding: 6px 15px; cursor: pointer; position: relative; overflow: hidden; transition: all .22s;
}
#tabs .tab::after {             /* a sweep of light on hover */
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .18) 50%, transparent 70%); transition: transform .6s;
}
#tabs .tab:hover::after { transform: translateX(120%); }
#tabs .tab:hover { color: var(--text); border-color: color-mix(in srgb, var(--gc, var(--cyan)) 55%, transparent); box-shadow: 0 0 12px -4px var(--gc, var(--cyan)); }
#tabs .tab.active { color: #03060c; background: var(--gc, var(--cyan)); border-color: var(--gc, var(--cyan)); font-weight: 700; box-shadow: 0 0 18px -2px var(--gc, var(--cyan)), 0 0 2px var(--gc, var(--cyan)); }
#tabs .tab.active .tab-badge { color: #03060c; border-color: #03060c; }
.tab-badge { font-size: 9px; padding: 1px 6px; margin-left: 6px; border: 1px solid var(--amber); color: var(--amber); letter-spacing: 0.1em; }
.tab-badge.live { animation: stFlashY 1.4s ease-in-out infinite; }

/* ---------------------------------------------------------------------------------------------- layout */
.deck { display: grid; gap: 12px; padding: 12px; max-width: 2200px; margin: 0 auto; grid-template-columns: minmax(0, 1fr); }
.deck.cols-3 { grid-template-columns: 340px minmax(0, 1fr) 330px; }
.deck .span-all { grid-column: 1 / -1; }

/* ---------------------------------------------------------------------------------------------- panels */
/* <section class="panel"><div class="corner tl"></div><div class="corner tr"></div><div class="corner bl"></div>
   <div class="corner br"></div><h2>TITLE</h2> ... </section> */
.panel {
  position: relative; min-width: 0;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  padding: 12px 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6) inset, 0 0 30px rgba(56, 225, 255, 0.05);
  backdrop-filter: blur(4px);
  overflow: hidden;
}
.panel::before {   /* a lit top edge in the accent colour */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}
.corner { position: absolute; width: 12px; height: 12px; border-color: var(--accent); border-style: solid; opacity: 0.85; pointer-events: none; }
.corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 11.5px; letter-spacing: 0.24em;
  color: var(--cyan); margin: 0 0 10px; text-shadow: 0 0 8px rgba(56, 225, 255, 0.55);
}
.panel-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.panel-head-row h2 { margin: 0; }
.section-label {
  font-size: 10px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase;
  margin: 12px 0 6px; border-top: 1px solid var(--border); padding-top: 8px;
}

/* ---------------------------------------------------------------------------------------------- buttons + inputs */
.btn-row { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.mini-btn {
  background: rgba(56, 225, 255, 0.06); color: var(--cyan); border: 1px solid rgba(56, 225, 255, 0.35);
  font-family: inherit; font-size: 10.5px; letter-spacing: 0.08em; padding: 3px 7px; border-radius: 2px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.mini-btn:hover { background: rgba(56, 225, 255, 0.18); box-shadow: 0 0 10px rgba(56, 225, 255, 0.4); }
.mini-btn.sel { color: #031208; background: var(--cyan); border-color: var(--cyan); }        /* selected filter */
.mini-btn.go, .mini-btn.on { color: #031208; background: var(--lime); border-color: var(--lime); }
.mini-btn.warnon { color: #1a0f00; background: var(--amber); border-color: var(--amber); }
.mini-btn.no { color: var(--red); border-color: rgba(255, 77, 106, 0.6); background: rgba(255, 77, 106, 0.05); }
.mini-btn:focus-visible, .tab:focus-visible, .tab-group:focus-visible { outline: 1px solid var(--cyan); outline-offset: 2px; }
input, select, textarea {
  background: rgba(0, 0, 0, 0.4); color: var(--text); border: 1px solid var(--border);
  padding: 6px 8px; font-family: inherit; font-size: 12px; min-width: 0; border-radius: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 10px rgba(56, 225, 255, 0.25); }

/* ---------------------------------------------------------------------------------------------- chips (status tags) */
.chip { font-size: 10px; letter-spacing: 0.12em; padding: 2px 7px; border: 1px solid; text-transform: uppercase; white-space: nowrap; }
.chip.c-cyan   { color: var(--cyan); border-color: var(--cyan); }
.chip.c-amber  { color: var(--amber); border-color: var(--amber); }
.chip.c-red    { color: var(--red); border-color: var(--red); }
.chip.c-violet { color: var(--violet); border-color: var(--violet); }
.chip.c-muted  { color: var(--muted); border-color: var(--faint); }
.chip.live     { color: #031208; background: var(--lime); border-color: var(--lime); }   /* filled = "on/live" */
.chip.awaiting { color: var(--amber); border-color: var(--amber); animation: stFlashY 1.4s ease-in-out infinite; }
.chip.danger   { color: #1a0308; background: var(--red); border-color: var(--red); }
@keyframes stFlashY { 50% { background: var(--amber); color: #1a1003; box-shadow: 0 0 12px rgba(255, 181, 71, 0.6); } }
@keyframes stFlashR { 50% { background: var(--red); color: #1a0308; box-shadow: 0 0 12px rgba(255, 77, 106, 0.7); } }

/* ---------------------------------------------------------------------------------------------- key/value, bars, tiles */
.kv-row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; font-size: 12px; }
.kv-row .k { color: var(--muted); }
.kv-row .v { color: var(--text); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 65%; }
.bar-track { height: 5px; background: rgba(255, 255, 255, 0.06); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--magenta)); box-shadow: 0 0 8px var(--cyan); transition: width 0.6s ease; }
/* big-number stat tiles: <div class="stat" style="--c:var(--red)"><b>3</b><span>CRITICAL</span></div> */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--border); padding: 10px 12px; background: rgba(0, 0, 0, 0.25); }
.stat b { display: block; font-family: var(--font-display); font-size: 24px; color: var(--c, var(--cyan)); text-shadow: 0 0 10px var(--c, var(--cyan)); }
.stat span { font-size: 10px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
/* small service tiles + a service list */
.sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin-bottom: 8px; }
.sys-tile { border: 1px solid var(--border); padding: 6px 8px; background: rgba(56, 225, 255, 0.03); }
.sys-tile .l { font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.sys-tile .n { font-size: 16px; }
.sys-tile.warn .n { color: var(--amber); } .sys-tile.bad .n { color: var(--red); }
.svc { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-bottom: 1px dashed rgba(56, 225, 255, 0.08); }
.svc .ok { color: var(--lime); } .svc .bad { color: var(--red); }

/* ---------------------------------------------------------------------------------------------- log table */
/* one row per entry: time | level | source | message | right-hand status. <details> under it spans the message column */
.log-row { display: grid; grid-template-columns: 78px 72px 150px minmax(0, 1fr) 70px; gap: 10px; align-items: baseline;
  padding: 6px 4px; border-bottom: 1px dashed rgba(80, 220, 255, 0.08); font-size: 12px; }
.log-row:hover { background: rgba(56, 225, 255, 0.03); }
.log-row .tm { color: var(--muted); font-size: 11px; }
.log-row .src { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row .msg { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.log-row .st { text-align: right; font-size: 11px; color: var(--muted); }
.log-row .st.bad { color: var(--red); }
.log-row details { grid-column: 4 / -1; color: var(--muted); font-size: 11px; }
.log-row summary { cursor: pointer; }
pre, .log-row pre { white-space: pre-wrap; word-break: break-word; max-height: 280px; overflow: auto; background: rgba(0, 0, 0, 0.35);
  padding: 6px; margin: 4px 0 0; color: var(--pre); font-family: var(--font-mono); font-size: 11.5px; }

/* severity tag (the "level" column, and anywhere else) */
.sev { font-size: 10px; letter-spacing: 0.12em; padding: 1px 6px; border: 1px solid; text-align: center; text-transform: uppercase; }
.sev.debug { color: var(--faint); border-color: var(--faint); }
.sev.info  { color: var(--cyan); border-color: var(--cyan); }
.sev.ok    { color: var(--lime); border-color: var(--lime); }
.sev.warn  { color: var(--amber); border-color: var(--amber); }
.sev.error { color: var(--red); border-color: var(--red); }
.sev.crit  { color: #1a0308; background: var(--red); border-color: var(--red); animation: stFlashR 1.4s ease-in-out infinite; }

/* ---------------------------------------------------------------------------------------------- live terminal + event tape */
.terminal { min-height: 0; overflow-y: auto; font-size: 11.5px; line-height: 1.45; background: rgba(0, 0, 0, 0.35);
  padding: 6px 8px; border: 1px solid rgba(80, 220, 255, 0.1); }
.term-line { white-space: pre-wrap; word-break: break-word; color: var(--log); }
.term-line.hit { color: var(--cyan); text-shadow: 0 0 6px rgba(56, 225, 255, 0.5); }
.term-line.warn { color: var(--amber); }
.term-line.err { color: var(--red); }
.tape { list-style: none; margin: 0; padding: 0; overflow-y: auto; font-size: 11.5px; }
.tape li { padding: 3px 0; border-bottom: 1px dashed rgba(80, 220, 255, 0.08); animation: slideIn 0.35s ease; }
.tape li .ts { color: var(--magenta); margin-right: 8px; }
.tape li.empty { color: var(--faint); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } }

/* ---------------------------------------------------------------------------------------------- alert cards */
/* built from the status page's approval card (.a-appr): bordered box, amber glow while it needs someone */
.alert { border: 1px solid var(--border); border-left-width: 3px; padding: 10px 12px; margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.25); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; animation: slideIn 0.35s ease; }
.alert > .sev { align-self: start; justify-self: end; }
.alert .title { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.08em; color: var(--text); }
.alert .meta { font-size: 11px; color: var(--muted); }
.alert .body { grid-column: 1 / -1; font-size: 12px; color: var(--text); overflow-wrap: anywhere; }
.alert .acts { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.alert.info  { border-left-color: var(--cyan); }
.alert.ok    { border-left-color: var(--lime); }
.alert.warn  { border-color: var(--amber); box-shadow: 0 0 14px rgba(255, 181, 71, 0.2); }
.alert.crit  { border-color: var(--red); box-shadow: 0 0 18px rgba(255, 77, 106, 0.3); }
.alert.crit .title { color: var(--red); text-shadow: 0 0 8px rgba(255, 77, 106, 0.6); }
.alert.acked { opacity: 0.55; box-shadow: none; border-color: var(--border); }
.alert img { width: 100%; max-width: 220px; border: 1px solid var(--border); background: #000; }

/* ---------------------------------------------------------------------------------------------- drawer (side detail panel) */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 60;
  background: rgba(4, 10, 20, 0.97); border-left: 1px solid var(--cyan);
  box-shadow: -10px 0 40px rgba(56, 225, 255, 0.15);
  display: flex; flex-direction: column; animation: drawerIn 0.25s ease;
}
@keyframes drawerIn { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.18em; color: var(--cyan); }
.drawer-close { background: none; border: 1px solid var(--border); color: var(--text); cursor: pointer; padding: 2px 8px; font-family: inherit; }
.drawer-body { padding: 14px; overflow-y: auto; }

/* ---------------------------------------------------------------------------------------------- scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(56, 225, 255, 0.3) transparent; }

/* ---------------------------------------------------------------------------------------------- responsive */
@media (max-width: 1400px) {
  .deck.cols-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .deck, .deck.cols-3 { grid-template-columns: minmax(0, 1fr); padding: 8px 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-row { grid-template-columns: 64px 64px minmax(0, 1fr); }
  .log-row .src { grid-column: 3; } .log-row .st { display: none; }
  .log-row .msg, .log-row details { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .topbar-mid, .mini-link, .brand-sub { display: none; }
  #topbar { padding: 8px 16px; }
  .brand { font-size: 14px; }
  #tabs { padding: 8px 10px 0; }
  #tabs .tab-groups, #tabs .tab-sub { overflow-x: auto; scrollbar-width: none; }
  #tabs .tab-groups::-webkit-scrollbar, #tabs .tab-sub::-webkit-scrollbar { display: none; }
  #tabs .tab-groups { gap: 4px; }
  #tabs .tab-group { padding: 7px 14px 7px 7px; font-size: 10px; letter-spacing: .16em; gap: 6px; }
  .tg-glyph { width: 22px; height: 22px; font-size: 11px; }
  #tabs .tab { padding: 6px 11px; font-size: 9.5px; letter-spacing: .12em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
