/* ───────────────────────── Zeus Core UI ───────────────────────── */
@font-face { font-family: "Inter"; src: url("vendor/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("vendor/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("vendor/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #f4f5f7; --bg-2: #eceef2; --panel: #ffffff; --panel-2: #f8f9fb; --line: #e2e5ea; --line-2: #d3d8e0;
  --ink: #0d1117; --ink-2: #3c4452; --ink-3: #6b7484; --ink-4: #98a0ad;
  --bolt: #c98a00; --bolt-soft: #fff4d6; --bolt-ink: #6b4a00;
  --sky: #0f8fb3; --sky-soft: #e0f5fb;
  --ok: #12925f; --ok-soft: #e1f6ec; --warn: #b7791f; --warn-soft: #fdf2dc; --bad: #d23b3b; --bad-soft: #fde7e7; --info: #3a64d8; --info-soft: #e6ecfc;
  --t0: #12925f; --t1: #3a64d8; --t2: #b7791f; --t3: #d23b3b;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px -12px rgba(16, 24, 40, .25);
  --r: 14px; --r-sm: 9px;
  --rail: 232px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #07090d; --bg-2: #0b0e14; --panel: #0f131b; --panel-2: #131925; --line: #1c2330; --line-2: #263043;
  --ink: #e9edf3; --ink-2: #b6bfcc; --ink-3: #7d8797; --ink-4: #566072;
  --bolt: #f5c542; --bolt-soft: rgba(245, 197, 66, .12); --bolt-ink: #f5c542;
  --sky: #4de2ff; --sky-soft: rgba(77, 226, 255, .1);
  --ok: #3ddc97; --ok-soft: rgba(61, 220, 151, .12); --warn: #f0b44c; --warn-soft: rgba(240, 180, 76, .12); --bad: #ff6464; --bad-soft: rgba(255, 100, 100, .13); --info: #7aa2ff; --info-soft: rgba(122, 162, 255, .13);
  --t0: #3ddc97; --t1: #7aa2ff; --t2: #f0b44c; --t3: #ff6464;
  --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 24px 60px -10px rgba(0,0,0,.7);
}}
:root[data-theme="dark"] {
  --bg: #07090d; --bg-2: #0b0e14; --panel: #0f131b; --panel-2: #131925; --line: #1c2330; --line-2: #263043;
  --ink: #e9edf3; --ink-2: #b6bfcc; --ink-3: #7d8797; --ink-4: #566072;
  --bolt: #f5c542; --bolt-soft: rgba(245, 197, 66, .12); --bolt-ink: #f5c542;
  --sky: #4de2ff; --sky-soft: rgba(77, 226, 255, .1);
  --ok: #3ddc97; --ok-soft: rgba(61, 220, 151, .12); --warn: #f0b44c; --warn-soft: rgba(240, 180, 76, .12); --bad: #ff6464; --bad-soft: rgba(255, 100, 100, .13); --info: #7aa2ff; --info-soft: rgba(122, 162, 255, .13);
  --t0: #3ddc97; --t1: #7aa2ff; --t2: #f0b44c; --t3: #ff6464;
  --shadow: 0 0 0 1px rgba(255,255,255,.02); --shadow-lg: 0 24px 60px -10px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[x-cloak] { display: none !important; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; font-family: "Inter", sans-serif; }
.muted { color: var(--ink-3); }
.faint { color: var(--ink-4); }
.small { font-size: 12px; }

/* ── Shell ── */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--ink); color: var(--bolt); }
:root[data-theme="dark"] .brand .mark, :root:not([data-theme="light"]) .brand .mark { background: var(--bolt-soft); }
.brand b { font-family: var(--display); font-size: 18px; letter-spacing: .02em; }
.brand small { display: block; font-size: 10.5px; color: var(--ink-4); letter-spacing: .08em; text-transform: uppercase; margin-top: -3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 500; position: relative; }
.nav a:hover { background: var(--panel); color: var(--ink); }
.nav a.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--bolt); }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav .badge { margin-left: auto; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-4); padding: 16px 10px 6px; }
.rail-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.cmd { flex: 1; max-width: 640px; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-3); cursor: text; box-shadow: var(--shadow); }
.cmd:hover { border-color: var(--line-2); }
.cmd svg { width: 16px; height: 16px; color: var(--bolt); }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--ink-3); background: var(--panel-2); }
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }

/* ── Primitives ── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3, .g-main { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .shell { grid-template-columns: 1fr; } .rail { display: none; } .g2, .g4 { grid-template-columns: 1fr; } .content { padding: 18px 16px 60px; } .topbar { padding: 10px 16px; } }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .spread { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.row > .input.grow { min-width: 140px; }
.stack { display: grid; gap: 10px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font-weight: 550; font-size: 13px; cursor: pointer; white-space: nowrap; transition: transform .06s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--ink-4); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.btn.bolt { background: var(--bolt); color: #1a1300; border-color: var(--bolt); }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.icon { width: 34px; padding: 0; }

.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--ink-4); }
.input, .select, .textarea { width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--bolt); box-shadow: 0 0 0 3px var(--bolt-soft); }
.textarea { min-height: 90px; resize: vertical; }
.otp { font-family: var(--mono); font-size: 26px; letter-spacing: .5em; text-align: center; padding: 12px; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.bolt { background: var(--bolt-soft); color: var(--bolt-ink); border-color: transparent; }
.badge.sky { background: var(--sky-soft); color: var(--sky); border-color: transparent; }
.tier { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; border: 1px solid currentColor; }
.tier-0 { color: var(--t0); } .tier-1 { color: var(--t1); } .tier-2 { color: var(--t2); } .tier-3 { color: var(--t3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.dot.online, .dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.degraded, .dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.dot.offline, .dot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); animation: pulse 1.6s infinite; }
.dot.maintenance { background: var(--info); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); font-weight: 600; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click:hover td { background: var(--panel-2); cursor: pointer; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); }
.empty svg { width: 30px; height: 30px; color: var(--ink-4); margin-bottom: 8px; }

/* ── Stats & health ── */
.stat { padding: 16px 18px; }
.stat .k { font-size: 12px; color: var(--ink-3); font-weight: 550; display: flex; align-items: center; gap: 7px; }
.stat .v { font-family: var(--display); font-size: 28px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--ink-4); }
.meter { height: 6px; border-radius: 6px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--line); }
.meter > i { display: block; height: 100%; border-radius: 6px; background: var(--ok); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.meter.warn > i { background: var(--warn); } .meter.bad > i { background: var(--bad); }

.hero { display: grid; grid-template-columns: 260px 1fr; gap: 0; overflow: hidden; }
.hero .gauge { padding: 22px; display: grid; place-items: center; border-right: 1px solid var(--line); background: radial-gradient(120% 100% at 50% 0%, var(--bolt-soft), transparent 70%); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .hero .gauge { border-right: 0; border-bottom: 1px solid var(--line); } }

/* Constellation: the fleet as a living map */
.constellation { position: relative; min-height: 290px; padding: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; }
.node { position: relative; display: grid; justify-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: 14px; border: 1px solid transparent; transition: border-color .2s, background .2s, transform .2s; cursor: pointer; text-align: center; }
.node:hover { background: var(--panel-2); border-color: var(--line-2); transform: translateY(-2px); }
.node .ring { width: 74px; height: 74px; }
.node .name { font-weight: 600; font-size: 13px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node .meta { font-size: 11px; color: var(--ink-4); }
.node.alerting .ring { filter: drop-shadow(0 0 10px var(--bad)); animation: breathe 2s infinite; }
@keyframes breathe { 50% { filter: drop-shadow(0 0 2px var(--bad)); } }

/* Council */
.seat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.seat .glyph { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; }
.seat .glyph.anthropic { background: #f3e3d3; color: #8a4b18; } .seat .glyph.openai { background: #d9f2e9; color: #0d6b4c; } .seat .glyph.none { background: var(--bad-soft); color: var(--bad); }
:root[data-theme="dark"] .seat .glyph.anthropic { background: rgba(217, 119, 87, .18); color: #e8a07f; } :root[data-theme="dark"] .seat .glyph.openai { background: rgba(16, 163, 127, .18); color: #4fd1a8; }

/* Kill switch */
.kill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 10px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 650; font-size: 12.5px; cursor: pointer; }
.kill .sw { width: 30px; height: 18px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; }
.kill .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.kill.on { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.kill.on .sw { background: var(--bad); } .kill.on .sw::after { transform: translateX(12px); }
.frozen-banner { background: repeating-linear-gradient(-45deg, var(--bad), var(--bad) 12px, #b52d2d 12px, #b52d2d 24px); color: #fff; text-align: center; font-weight: 700; padding: 6px; font-size: 12.5px; letter-spacing: .03em; }

/* Live pulse */
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: live 2s infinite; }
.live.off i { background: var(--ink-4); animation: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }

/* Event stream */
.stream { max-height: 420px; overflow: auto; }
.ev { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--line); font-size: 12.5px; animation: slidein .35s ease-out; }
.ev:last-child { border-bottom: 0; }
.ev .t { color: var(--ink-4); font-family: var(--mono); font-size: 11px; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); background: var(--bolt-soft); } }

/* Charts */
.spark { width: 100%; height: 120px; display: block; }
.spark .area { opacity: .10; } .spark .line { fill: none; stroke-width: 1.8; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); }
.chart-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* AI run */
.run { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .run { grid-template-columns: 1fr; } }
.timeline { position: relative; padding: 6px 0 6px 6px; }
.tl { position: relative; padding: 0 0 14px 22px; font-size: 12.5px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 1px; background: var(--line-2); }
.tl:last-child::before { display: none; }
.tl::after { content: ""; position: absolute; left: 1px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink-4); }
.tl.k-action::after { border-color: var(--bolt); } .tl.k-done::after { border-color: var(--ok); background: var(--ok); } .tl.k-error::after { border-color: var(--bad); background: var(--bad); }
.tl.k-thought::after { border-color: var(--sky); } .tl.k-user::after { border-color: var(--info); }
.msg { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.msg .who { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--ink-4); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.msg.assistant .who { color: var(--sky); }
.prose { white-space: pre-wrap; word-wrap: break-word; line-height: 1.6; }
.prose strong { font-weight: 650; }
.toolcall { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.toolcall .h { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--panel-2); font-family: var(--mono); font-size: 12px; }
.toolcall pre, pre.code { margin: 0; padding: 10px 12px; font-family: var(--mono); font-size: 11.5px; line-height: 1.55; overflow: auto; max-height: 260px; color: var(--ink-2); background: var(--bg-2); }
.thinking { display: inline-flex; gap: 4px; } .thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--sky); animation: think 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes think { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Approvals */
.approval { display: grid; grid-template-columns: 4px 1fr; overflow: hidden; }
.approval .stripe { background: var(--t2); } .approval.t3 .stripe { background: var(--t3); } .approval.t1 .stripe { background: var(--t1); }
.verdict { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px dashed var(--line-2); font-size: 12.5px; }

/* Command palette & modals */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(5, 8, 12, .55); backdrop-filter: blur(3px); display: grid; place-items: start center; padding-top: 12vh; }
.palette { width: min(680px, 92vw); background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.palette .q { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.palette .q input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; }
.palette .q svg { width: 20px; height: 20px; color: var(--bolt); }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.palette li.on { background: var(--panel-2); }
.palette li .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); }
.palette li.on .ic { border-color: var(--bolt); color: var(--bolt); }
.palette .foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-4); }
.modal { width: min(560px, 94vw); background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal .mh { padding: 18px 22px 0; } .modal .mb { padding: 16px 22px; display: grid; gap: 14px; } .modal .mf { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* Toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 8px; width: min(380px, 92vw); }
.toast { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--panel); box-shadow: var(--shadow-lg); font-size: 13px; animation: toastin .25s ease-out; }
.toast.bad { background: var(--bad); color: #fff; } .toast.warn { background: var(--warn); color: #1a1300; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--ink-3); font-weight: 550; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--bolt); }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: #07090d; color: #e9edf3; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(40% 40% at 70% 30%, rgba(245, 197, 66, .22), transparent 70%), radial-gradient(35% 35% at 20% 80%, rgba(77, 226, 255, .14), transparent 70%); }
.auth-art .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); }
.auth-art > * { position: relative; }
.auth-art h1 { font-size: 44px; line-height: 1.05; max-width: 460px; font-weight: 600; }
.auth-art h1 em { font-style: normal; color: #f5c542; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-form .box { width: min(380px, 100%); display: grid; gap: 16px; }
.err { color: var(--bad); font-size: 12.5px; }
.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; justify-self: start; }
.qr svg, .qr img { display: block; width: 180px; height: 180px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

.posture li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.posture { list-style: none; margin: 0; padding: 0; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 210px; }
.bars i { flex: 1; background: var(--bolt); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.secret-box { font-family: var(--mono); font-size: 12.5px; padding: 12px; border-radius: 10px; background: var(--bolt-soft); border: 1px dashed var(--bolt); word-break: break-all; }

/* ── Insights & briefing ── */
.briefing { display: flex; gap: 22px; padding: 22px 24px; align-items: flex-start; background: radial-gradient(90% 140% at 0% 0%, var(--sky-soft), transparent 60%), var(--panel); }
.briefing .headline { font-size: 21px; line-height: 1.3; max-width: 60ch; }
.briefing p { margin: 4px 0 0; color: var(--ink-2); line-height: 1.6; }
.briefing h3 { color: var(--sky); }
.todo { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); }
.todo li::marker { color: var(--bolt); font-weight: 700; font-family: var(--mono); }
.orb { position: relative; flex: none; width: 54px; height: 54px; margin-top: 4px; }
.orb i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--sky); opacity: .75; }
.orb i:nth-child(1) { animation: orb 7s linear infinite; border-color: var(--sky) transparent var(--sky) transparent; }
.orb i:nth-child(2) { inset: 8px; animation: orb 5s linear infinite reverse; border-color: transparent var(--bolt) transparent var(--bolt); }
.orb i:nth-child(3) { inset: 19px; border: 0; background: radial-gradient(circle, var(--sky), transparent 70%); animation: orbpulse 3s ease-in-out infinite; }
.orb.speaking i:nth-child(3) { animation-duration: .5s; }
@keyframes orb { to { transform: rotate(360deg); } }
@keyframes orbpulse { 50% { transform: scale(1.5); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .orb i { animation: none !important; } }
@media (max-width: 760px) { .briefing { flex-direction: column; } }
.insight { border-left: 3px solid var(--info); }
.insight.sev-warning { border-left-color: var(--warn); } .insight.sev-critical { border-left-color: var(--bad); }
.eta b { font-family: var(--display); font-size: 20px; }

/* ── The three questions ── */
.answer { padding: 18px 20px; display: grid; gap: 8px; align-content: start; border-top: 3px solid var(--ok); }
.answer.bad { border-top-color: var(--bad); } .answer.warn { border-top-color: var(--warn); } .answer.bolt { border-top-color: var(--bolt); }
.answer .q { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.answer .a { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.1; }
.answer.good .a { color: var(--ok); } .answer.bad .a { color: var(--bad); }
.answer .item { display: grid; gap: 1px; padding: 9px 11px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.answer .item:hover { border-color: var(--line-2); } .answer .item b { font-weight: 550; } .answer .item span { font-size: 12px; color: var(--ink-3); }
.answer .none { color: var(--ink-3); font-size: 13px; }

/* ── Phone: bottom tab bar + single approval ── */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 10.5px; font-weight: 600; color: var(--ink-3); border-radius: 10px; }
  .tabbar a.on { color: var(--ink); background: var(--panel-2); } .tabbar svg { width: 20px; height: 20px; }
  .tabbar i { position: absolute; top: 2px; left: 56%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-style: normal; font-size: 10px; display: grid; place-items: center; }
  .content { padding-bottom: 96px; } .kill span:not(.sw) { display: none; } .cmd .kbd { display: none; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
}
.approve-one { max-width: 640px; margin: 0 auto; }
.btn.big { height: 54px; font-size: 16px; border-radius: 14px; }
.approve-bar { position: sticky; bottom: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
@media (max-width: 760px) {
  .approve-bar { position: fixed; left: 10px; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 39; }
  .approve-one { padding-bottom: 90px; }
  .cmd .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar { gap: 8px; } .kill { padding: 0 8px; }
}
@media (max-width: 760px) { .cmd { min-width: 0; } .topbar > .grow { display: none; } .page-head h1 { font-size: 22px; } }
