/* St. Pete Staff Panel — "Bayfront" design system.
   Neutral, high-contrast surfaces, one accent colour, Geist typography. Dark is default; html[data-theme="light"] swaps tokens. */
:root {
  --font: 'Geist', 'Inter', 'Segoe UI', system-ui, sans-serif; --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --bg: #07080b; --side: #0b0c10; --surface: #101116; --surface-2: #15161c; --raised: #1a1b22; --hover: rgba(255, 255, 255, .045);
  --border: #1f2028; --border-2: #2a2b35; --ring: rgba(255, 255, 255, .06);
  --text: #ededf0; --text-2: #a3a3ad; --text-3: #6e6e78;
  --accent: #6366f1; --accent-2: #8b5cf6; --accent-rgb: 99, 102, 241; --on-accent: #fff;
  --green: #22c55e; --amber: #f59e0b; --red: #ef4444; --sky: #38bdf8; --violet: #a855f7; --pink: #ec4899; --orange: #f97316;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 0 var(--ring) inset, 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px var(--border-2);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f6f6f8; --side: #fbfbfc; --surface: #ffffff; --surface-2: #f8f8fa; --raised: #ffffff; --hover: rgba(15, 15, 30, .04);
  --border: #e8e8ec; --border-2: #dcdce2; --ring: rgba(255, 255, 255, .8);
  --text: #16161c; --text-2: #5b5b66; --text-3: #8f8f9a;
  --shadow: 0 1px 2px rgba(16, 16, 32, .05), 0 1px 1px rgba(16, 16, 32, .03);
  --shadow-lg: 0 24px 60px rgba(16, 16, 32, .16), 0 0 0 1px var(--border);
  color-scheme: light;
}
html[data-accent="ocean"] { --accent: #3b82f6; --accent-2: #06b6d4; --accent-rgb: 59, 130, 246; }
html[data-accent="emerald"] { --accent: #10b981; --accent-2: #84cc16; --accent-rgb: 16, 185, 129; }
html[data-accent="sunset"] { --accent: #f97316; --accent-2: #ec4899; --accent-rgb: 249, 115, 22; }
html[data-accent="rose"] { --accent: #f43f5e; --accent-2: #f97316; --accent-rgb: 244, 63, 94; }
html[data-accent="violet"] { --accent: #a855f7; --accent-2: #ec4899; --accent-rgb: 168, 85, 247; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); letter-spacing: -.006em; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .25s, color .25s; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: rgba(var(--accent-rgb), .3); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
:focus-visible { outline: 2px solid rgba(var(--accent-rgb), .7); outline-offset: 2px; border-radius: 6px; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 14px; height: 14px; } .ic.lg { width: 20px; height: 20px; }
.aurora, .gridlines { display: none; }
.mono { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.muted { color: var(--text-2); } .dim { color: var(--text-3); } .right { text-align: right; } .center { text-align: center; }
code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font: 12px var(--mono); }
kbd { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--surface-2); font: 500 11px var(--mono); color: var(--text-2); }

/* ───────── shell ───────── */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; transition: grid-template-columns .3s var(--ease); }
.shell.collapsed { grid-template-columns: 72px 1fr; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 10px; padding: 12px 10px; background: var(--side); border-right: 1px solid var(--border); z-index: 20; }
.ws { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 18px rgba(var(--accent-rgb), .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; background: #0b0c10; }
.brand-mark b { font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.ws-text { min-width: 0; } .ws-text b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ws-text small { color: var(--text-3); font-size: 12px; }
.srv { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.srv-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.srv-top b { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.srv-n { display: flex; align-items: baseline; gap: 6px; } .srv-n b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .srv-n small { color: var(--text-3); font-size: 12px; }
.srv-bar { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; } .srv-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s var(--ease); }
.srv small.aop { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: ping 2s infinite; }
.pulse-dot.off { background: var(--red); animation: none; }
.side-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); font-size: 13px; transition: border-color .2s; }
.side-search:hover { border-color: var(--border-2); color: var(--text-2); } .side-search kbd { margin-left: auto; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; display: grid; align-content: start; gap: 1px; padding: 2px; }
.nav h6 { margin: 14px 10px 4px; font-size: 11px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.nav a.on .ic { color: var(--accent); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .16); color: var(--accent); font-size: 11.5px; font-weight: 600; }
.side-foot { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--border); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.me img { width: 32px; height: 32px; border-radius: 50%; }
.me b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; } .me small { color: var(--text-3); font-size: 12px; }
.me .btn { margin-left: auto; }
.side-foot .row-btn { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 13px; }
.side-foot .row-btn:hover { background: var(--hover); color: var(--text); }
.shell.collapsed .ws-text, .shell.collapsed .srv, .shell.collapsed .side-search span, .shell.collapsed .side-search kbd, .shell.collapsed .nav h6, .shell.collapsed .nav a span,
.shell.collapsed .nav .count, .shell.collapsed .me div, .shell.collapsed .me .btn, .shell.collapsed .row-btn span { display: none; }
.shell.collapsed .nav a, .shell.collapsed .side-search, .shell.collapsed .row-btn, .shell.collapsed .me, .shell.collapsed .ws { justify-content: center; padding: 0; }
.shell.collapsed .nav h6 { margin: 8px 0; height: 1px; background: var(--border); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px) saturate(140%); border-bottom: 1px solid var(--border); }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-3); white-space: nowrap; }
.crumb b { color: var(--text); font-weight: 500; } .crumb .ic { width: 14px; height: 14px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.live { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: ping 2s infinite; }
.live.off i { background: var(--red); animation: none; }
.icon-btn { position: relative; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn .dotn { position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.clock { font: 500 12.5px var(--mono); color: var(--text-3); padding: 0 6px; }
.content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 28px 32px 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.page-head p { margin-top: 4px; color: var(--text-2); font-size: 14px; }
.page-head .meta { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.page { animation: pageIn .35s var(--ease); }
#routebar { position: fixed; left: 0; top: 0; z-index: 90; height: 2px; width: 0; opacity: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
#routebar.run { opacity: 1; width: 80%; transition: width 2.5s cubic-bezier(.1, .7, .2, 1); }
#routebar.done { opacity: 0; width: 100%; transition: width .2s ease, opacity .35s .2s; }

/* ───────── layout grids ───────── */
.row { display: grid; gap: 16px; margin-bottom: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.cols-3-1 { grid-template-columns: minmax(0, 2.15fr) minmax(300px, 1fr); }
.cols-1-2 { grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) { .cols-3-1, .cols-1-2, .cols-3 { grid-template-columns: 1fr; } }

/* ───────── surfaces ───────── */
.glass { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { overflow: hidden; }
.card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.card > header h3 { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.card > header h3 .ic { color: var(--text-3); }
.card > header small { color: var(--text-3); font-size: 12.5px; }
.card .body { padding: 16px 18px; }

/* KPI */
.kpi { position: relative; overflow: hidden; padding: 16px 18px 18px; transition: border-color .2s, transform .2s var(--ease); }
.kpi:hover { border-color: var(--border-2); }
.kpi-top { position: absolute; top: 14px; right: 14px; }
.kpi-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--tint, rgba(var(--accent-rgb), .12)); color: var(--c, var(--accent)); }
.kpi-ic .ic { width: 15px; height: 15px; }
.kpi small { display: block; color: var(--text-2); font-size: 13px; font-weight: 500; }
.kpi b { display: block; margin-top: 10px; font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi em { display: block; max-width: 60%; margin-top: 6px; font-style: normal; color: var(--text-3); font-size: 12.5px; }
.kpi .spark { position: absolute; right: 0; bottom: 0; width: 46%; height: 44px; opacity: .9; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 6px; font-size: 11.5px; font-weight: 600; }
.delta.up { color: var(--green); background: rgba(34, 197, 94, .12); } .delta.down { color: var(--red); background: rgba(239, 68, 68, .12); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { position: sticky; top: 0; z-index: 1; height: 38px; padding: 0 16px; text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { height: 48px; padding: 8px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover, tbody tr:hover { background: var(--hover); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .who small { display: block; color: var(--text-3); font-size: 12px; }
.av { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; overflow: hidden; font-weight: 600; font-size: 11.5px; color: #fff; background: linear-gradient(135deg, var(--c1, var(--accent)), var(--c2, var(--accent-2))); }
.av img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.av.round { border-radius: 50%; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--text-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.badge.ok { color: #16a34a; background: rgba(34, 197, 94, .1); box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .22); }
.badge.bad { color: #e5484d; background: rgba(239, 68, 68, .1); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .22); }
.badge.warn { color: #d97706; background: rgba(245, 158, 11, .1); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .24); }
.badge.info { color: var(--accent); background: rgba(var(--accent-rgb), .1); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .24); }
.badge.violet { color: #9333ea; background: rgba(168, 85, 247, .1); box-shadow: inset 0 0 0 1px rgba(168, 85, 247, .24); }
.badge.gold { color: #ca8a04; background: rgba(234, 179, 8, .1); box-shadow: inset 0 0 0 1px rgba(234, 179, 8, .24); }
html:not([data-theme="light"]) .badge.ok { color: #4ade80; } html:not([data-theme="light"]) .badge.bad { color: #f87171; } html:not([data-theme="light"]) .badge.warn { color: #fbbf24; }
html:not([data-theme="light"]) .badge.violet { color: #c084fc; } html:not([data-theme="light"]) .badge.gold { color: #facc15; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.prio { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; font: 600 11.5px var(--mono); color: #fff; }
.p1 { background: var(--red); box-shadow: 0 0 14px rgba(239, 68, 68, .45); } .p2 { background: var(--amber); color: #1c1100; } .p3 { background: var(--accent); }
.plate { display: inline-block; padding: 1px 8px; border-radius: 5px; background: linear-gradient(180deg, #fff, #e8ecf3); color: #0b2a6b; font: 700 12.5px var(--mono); letter-spacing: 1.5px; border: 1.5px solid #b8c3d8; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--radius-sm); font-weight: 500; font-size: 13px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: 0 1px 0 var(--ring) inset; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, box-shadow .2s; }
.btn:hover { background: var(--raised); border-color: var(--text-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { color: var(--on-accent); background: var(--accent); border-color: transparent; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 4px 14px rgba(var(--accent-rgb), .35); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.red { color: #fff; background: var(--red); border-color: transparent; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 4px 14px rgba(239, 68, 68, .3); }
.btn.green { color: #fff; background: #16a34a; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 32px; padding: 0; } .btn.icon.sm { width: 28px; }
.btn:disabled { opacity: .45; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.danger-h:hover { color: var(--red); background: rgba(239, 68, 68, .1); }
.input, .field input, .field select, .field textarea { width: 100%; height: 34px; padding: 0 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border-2); outline: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.field textarea { height: auto; min-height: 100px; padding: 10px 12px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(var(--accent-rgb), .8); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field { display: grid; gap: 6px; margin-bottom: 14px; } .field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .search-box { position: relative; flex: 1; min-width: 240px; max-width: 520px; }
.search-box .ic, .search-inline .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-box input { padding-left: 34px; }
.search-inline { position: relative; display: flex; align-items: center; }
.search-inline .input { width: 230px; height: 30px; padding-left: 32px; font-size: 13px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { height: 28px; padding: 0 12px; border-radius: 7px; font-weight: 500; font-size: 13px; color: var(--text-2); transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 0 0 1px var(--border-2); }

/* lists / progress / empty */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); }
.list-item:first-child { border-top: 0; }
.list-item .grow { flex: 1; min-width: 0; } .list-item b { font-weight: 500; } .list-item small { display: block; color: var(--text-3); font-size: 12.5px; }
.progress { height: 6px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 6px; background: var(--c, var(--accent)); transition: width .6s var(--ease); }
.empty { display: grid; justify-items: center; gap: 10px; padding: 44px 20px; text-align: center; color: var(--text-3); font-size: 13.5px; }
.empty .ic { width: 22px; height: 22px; padding: 10px; box-sizing: content-box; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.kv:first-child { border-top: 0; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart path[stroke], .spark path[stroke] { vector-effect: non-scaling-stroke; }
.chart .axis { font: 11px var(--font); fill: var(--text-3); }
.chart .grid-l { stroke: var(--border); stroke-dasharray: 3 4; }
.chart circle { stroke: var(--surface); }
.chart .tip { position: absolute; pointer-events: none; padding: 9px 12px; border-radius: 10px; background: var(--raised); border: 1px solid var(--border-2); box-shadow: var(--shadow-lg); font-size: 12px; white-space: nowrap; transform: translate(-50%, -115%); opacity: 0; transition: opacity .12s; z-index: 3; }
.chart .tip b { display: block; margin-bottom: 3px; font-weight: 600; } .chart .tip span { display: flex; align-items: center; gap: 7px; color: var(--text-2); } .chart .tip i { width: 8px; height: 8px; border-radius: 3px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); } .legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 8px; height: 8px; border-radius: 3px; }

/* records profile */
.hero { display: flex; gap: 22px; padding: 22px; align-items: center; flex-wrap: wrap; background: linear-gradient(120deg, rgba(var(--accent-rgb), .08), transparent 60%); }
.mug { width: 112px; height: 140px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center; font-size: 36px; font-weight: 600; color: #fff; background: linear-gradient(160deg, var(--accent), #111827); box-shadow: 0 0 0 1px var(--border-2), 0 12px 30px rgba(0, 0, 0, .35); }
.mug img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hero h2 { font-size: 26px; font-weight: 600; letter-spacing: -.025em; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 22px; margin-top: 12px; }
.facts small { display: block; color: var(--text-3); font-size: 12px; }
.banner-alert { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; font-weight: 500; font-size: 13.5px; }
.banner-alert.red { background: rgba(239, 68, 68, .08); border: 1px solid rgba(239, 68, 68, .3); color: #ef4444; }
.banner-alert.gold { background: rgba(245, 158, 11, .08); border: 1px solid rgba(245, 158, 11, .3); color: #d97706; }
html:not([data-theme="light"]) .banner-alert.red { color: #fca5a5; } html:not([data-theme="light"]) .banner-alert.gold { color: #fcd34d; }

/* drawer / modal / palette / toasts */
.drawer-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px); animation: fade .2s; }
.drawer { position: absolute; right: 10px; top: 10px; bottom: 10px; width: min(540px, calc(100vw - 20px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); animation: slideIn .35s var(--ease); }
.drawer > header { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer > header h3 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; } .drawer > header small { color: var(--text-3); text-transform: capitalize; }
.drawer .scroll { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer h5 { margin: 20px 0 10px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.action { display: grid; justify-items: center; gap: 7px; padding: 12px 6px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 500; color: var(--text-2); transition: background .15s, border-color .15s, color .15s; }
.action:hover { border-color: var(--border-2); color: var(--text); background: var(--raised); }
.action .ic { width: 18px; height: 18px; color: var(--c, var(--accent)); }
.action.danger { --c: var(--red); } .action.danger:hover { border-color: rgba(239, 68, 68, .4); }
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); animation: fade .15s; }
.modal { width: min(460px, 100%); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .22s var(--ease); }
.modal header { display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px 4px; }
.modal h3 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; } .modal header small { display: block; color: var(--text-2); margin-top: 3px; font-size: 13.5px; }
.modal .body { padding: 14px 22px 2px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; margin-top: 8px; background: var(--surface-2); border-top: 1px solid var(--border); }
.palette-wrap { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); animation: fade .12s; }
.palette { width: min(620px, 100%); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s var(--ease); }
.palette-in { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.palette-in input { flex: 1; background: none; border: 0; outline: none; font-size: 15.5px; }
.palette-res { max-height: 56vh; overflow-y: auto; padding: 6px; }
.palette-res h6 { padding: 10px 12px 6px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.p-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border-radius: 9px; text-align: left; color: var(--text-2); font-size: 13.5px; }
.p-item.sel, .p-item:hover { background: var(--hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.p-item small { margin-left: auto; color: var(--text-3); font-size: 12px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; gap: 8px; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--raised); box-shadow: var(--shadow-lg); font-size: 13.5px; animation: toastIn .3s var(--ease); }
.toast .ic { color: var(--c, var(--accent)); margin-top: 2px; }
.toast.success { --c: var(--green); } .toast.error { --c: var(--red); }

/* skeleton */
.sk { position: relative; overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--hover), transparent); animation: shimmer 1.3s infinite; }

/* live map */
.map { position: relative; height: calc(100vh - 220px); min-height: 460px; border-radius: var(--radius); overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #0d1424, #07090f); cursor: grab; }
html[data-theme="light"] .map { background: radial-gradient(ellipse at 50% 40%, #eef2fa, #dde3ee); }
.map:active { cursor: grabbing; }
.map svg { width: 100%; height: 100%; display: block; }
.map .gl { stroke: rgba(var(--accent-rgb), .08); } .map .gl.axis { stroke: rgba(var(--accent-rgb), .25); }
.map .lbl { font: 600 12px var(--font); fill: var(--text); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.map .pulse { animation: mapPulse 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.map-overlay { position: absolute; display: flex; gap: 8px; }
.map-legend { left: 14px; bottom: 14px; padding: 9px 13px; } .map-tools { right: 14px; top: 14px; flex-direction: column; }

/* applications / timeline */
.qa { display: grid; gap: 10px; margin-top: 12px; }
.qa div { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.qa b { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-3); margin-bottom: 4px; } .qa p { white-space: pre-wrap; }
.timeline { position: relative; padding: 8px 18px 8px 50px; }
.timeline::before { content: ''; position: absolute; left: 31px; top: 18px; bottom: 18px; width: 1px; background: var(--border-2); }
.t-item { position: relative; padding: 10px 0; }
.t-item .t-dot { position: absolute; left: -30px; top: 11px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--c, var(--accent)); box-shadow: 0 0 0 1px var(--border-2), 0 0 0 4px var(--surface); }
.t-item .t-dot .ic { width: 11px; height: 11px; }
.t-item b { font-weight: 500; } .t-item p { color: var(--text-2); font-size: 13px; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; color: #fff;
  background: radial-gradient(80% 60% at 20% 20%, rgba(var(--accent-rgb), .55), transparent 60%), radial-gradient(70% 60% at 90% 80%, rgba(236, 72, 153, .35), transparent 60%), radial-gradient(60% 50% at 70% 10%, rgba(249, 115, 22, .3), transparent 60%), #0a0a12; }
.login-art::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%); }
.login-art > * { position: relative; z-index: 1; }
.login-art h2 { max-width: 460px; font-size: 40px; font-weight: 600; letter-spacing: -.035em; line-height: 1.08; }
.login-art p { max-width: 420px; margin-top: 14px; color: rgba(255, 255, 255, .72); font-size: 15px; }
.login-stats { display: flex; gap: 28px; } .login-stats b { display: block; font-size: 22px; font-weight: 600; } .login-stats small { color: rgba(255, 255, 255, .6); font-size: 12.5px; }
.login-side { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(400px, 100%); }
.login-card .brand-mark { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 22px; }
.login-card h1 { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.login-card > p { margin: 8px 0 24px; color: var(--text-2); }
.discord { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; border-radius: 10px; background: #5865f2; color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 8px 24px rgba(88, 101, 242, .35); transition: filter .15s, transform .1s; }
.discord:hover { filter: brightness(1.08); } .discord:active { transform: translateY(1px); }
.features { display: grid; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.features div { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13.5px; } .features .ic { color: var(--accent); }
.login-err { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: rgba(239, 68, 68, .08); border: 1px solid rgba(239, 68, 68, .3); color: #ef4444; font-size: 13px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ───────── overview ───────── */
.ov-greet { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.ov-greet h1 { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.ov-greet p { margin-top: 4px; color: var(--text-2); }
.status-strip { display: flex; gap: 0; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.status-strip > div { padding: 9px 16px; border-left: 1px solid var(--border); } .status-strip > div:first-child { border-left: 0; }
.status-strip small { display: block; color: var(--text-3); font-size: 11.5px; } .status-strip b { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.health { display: grid; gap: 18px; }
.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 104px; height: 104px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; } .ring .track { stroke: var(--surface-2); } .ring .fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; } .ring b { font-size: 24px; font-weight: 600; letter-spacing: -.03em; } .ring small { color: var(--text-3); font-size: 11.5px; }
.ring-meta { display: grid; gap: 8px; font-size: 13px; } .ring-meta span { display: flex; justify-content: space-between; gap: 20px; color: var(--text-2); } .ring-meta b { color: var(--text); font-weight: 500; }
.dept-rows { display: grid; gap: 12px; }
.dept-row { display: grid; grid-template-columns: 70px 1fr 46px; align-items: center; gap: 12px; font-size: 13px; }
.dept-row b { font-weight: 600; font-size: 12.5px; } .dept-row span { text-align: right; color: var(--text-2); font: 12px var(--mono); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
.quick a, .quick button { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: left; transition: border-color .15s, background .15s, transform .15s var(--ease); }
.quick a:hover, .quick button:hover { border-color: var(--border-2); background: var(--raised); transform: translateY(-1px); }
.quick .qi { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--tint); color: var(--c); }
.quick b { font-size: 13.5px; font-weight: 600; } .quick small { color: var(--text-3); font-size: 12px; margin-top: -4px; }

/* ───────── community pages ───────── */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.media-tile { position: relative; padding: 0; overflow: hidden; aspect-ratio: 1; cursor: pointer; text-align: left; }
.media-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.media-tile:hover img { transform: scale(1.05); }
.mt-kind { position: absolute; top: 8px; left: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px); color: #fff; font-size: 11.5px; font-weight: 600; }
.mt-kind.video { background: rgba(239, 68, 68, .85); }
.mt-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 34px 11px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #fff; }
.mt-foot b { display: block; font-size: 13px; font-weight: 600; } .mt-foot small { font-size: 12px; opacity: .8; }
.mv-stage { display: grid; place-items: center; margin-bottom: 14px; border-radius: 12px; overflow: hidden; background: #000; }
.mv-stage img, .mv-stage video { max-width: 100%; max-height: 60vh; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 16px; }
.post-tile { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); transition: border-color .2s, transform .2s var(--ease); }
.post-tile:hover { border-color: var(--border-2); transform: translateY(-2px); }
.pt-media { position: relative; aspect-ratio: 4 / 3; background: var(--raised); } .pt-media img { width: 100%; height: 100%; object-fit: cover; }
.pt-body { flex: 1; padding: 10px 12px 4px; } .pt-body b { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; }
.pt-body p { margin: 4px 0 6px; font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pt-body small { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-size: 12px; }
.pt-act { display: flex; justify-content: flex-end; gap: 2px; padding: 0 8px 8px; }
.vb { color: var(--sky); display: inline-flex; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; } .tag-cloud .badge b { margin-left: 2px; opacity: .65; font-weight: 600; }
.perm-card .body { display: grid; gap: 14px; }
.role-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 500; }
.role-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); } .role-chip small { color: var(--text-3); font-weight: 600; } .role-chip.missing { opacity: .55; border-style: dashed; }
.caps { list-style: none; display: grid; gap: 7px; font-size: 13px; color: var(--text-2); }
.caps li { display: flex; gap: 8px; align-items: center; } .caps .ic { color: var(--green); }
.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(34, 197, 94, .12); color: var(--green); }

/* accent picker */
.pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 200px; padding: 6px; border-radius: 12px; background: var(--raised); box-shadow: var(--shadow-lg); animation: pop .15s var(--ease); }
.pop small { display: block; padding: 6px 8px; font-size: 11.5px; color: var(--text-3); }
.pop button { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 8px; border-radius: 7px; font-size: 13px; color: var(--text-2); text-align: left; }
.pop button:hover, .pop button.on { background: var(--hover); color: var(--text); }
.pop button i { width: 16px; height: 16px; border-radius: 5px; }
.pop button.on::after { content: '✓'; margin-left: auto; color: var(--accent); }

/* responsive */
.burger { display: none; }
@media (max-width: 960px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .shell.mobile-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .burger { display: inline-grid; } .collapse-btn { display: none; }
  .topbar { padding: 0 14px; } .content { padding: 20px 16px 40px; }
  .clock, .live span { display: none; }
  .action-grid { grid-template-columns: repeat(3, 1fr); }
  .page-head { flex-direction: column; align-items: flex-start; }
  .status-strip { width: 100%; overflow-x: auto; }
}

@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(4px); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes mapPulse { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(3); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
