/* ================================================================ tokens */
:root, :root[data-theme="dark"] {
    --bg: #0b0916;
    --bg-2: #100d1e;
    --panel: rgba(21, 17, 38, 0.74);
    --panel-solid: #15112a;
    --panel-2: rgba(255, 255, 255, 0.035);
    --hover: rgba(255, 255, 255, 0.06);
    --input-bg: rgba(7, 5, 15, 0.55);
    --line: rgba(255, 255, 255, 0.075);
    --line-2: rgba(255, 255, 255, 0.14);
    --text: #f4f1ff;
    --muted: #a39dc0;
    --faint: #6f6991;
    --accent: #8b5cf6;
    --accent-2: #a78bfa;
    --accent-text: #c4b5fd;
    --accent-soft: rgba(139, 92, 246, 0.16);
    --accent-line: rgba(139, 92, 246, 0.4);
    --good: #22c55e;
    --good-text: #4ade80;
    --good-soft: rgba(34, 197, 94, 0.12);
    --warn: #f59e0b;
    --warn-text: #fcd34d;
    --warn-soft: rgba(245, 158, 11, 0.12);
    --bad: #f43f5e;
    --bad-text: #fb7185;
    --bad-soft: rgba(244, 63, 94, 0.13);
    --cyan-text: #67e8f9;
    --cyan-soft: rgba(34, 211, 238, 0.1);
    --log-text: #c0bbd8;
    --log-soft: rgba(163, 157, 192, 0.12);
    --grad: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 45%, #7c3aed 100%);
    --grad-text: linear-gradient(100deg, #c4b5fd 0%, #a78bfa 40%, #8b5cf6 100%);
    --header-bg: rgba(11, 9, 22, 0.72);
    --glow-a: #6d28d9;
    --glow-b: #4c1d95;
    --glow-c: #312e81;
    --glow-opacity: .42;
    --grid-line: rgba(255, 255, 255, 0.045);
    --shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--line);
    --shadow-float: 0 30px 80px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--line-2);
    --on-accent: #ffffff;
    color-scheme: dark;
}
:root[data-theme="light"] {
    --bg: #f6f4ff;
    --bg-2: #ffffff;
    --panel: rgba(255, 255, 255, 0.84);
    --panel-solid: #ffffff;
    --panel-2: rgba(91, 33, 182, 0.035);
    --hover: rgba(91, 33, 182, 0.06);
    --input-bg: #ffffff;
    --line: rgba(40, 24, 90, 0.08);
    --line-2: rgba(40, 24, 90, 0.15);
    --text: #15112b;
    --muted: #5d5878;
    --faint: #958fae;
    --accent: #7c3aed;
    --accent-2: #8b5cf6;
    --accent-text: #6d28d9;
    --accent-soft: rgba(124, 58, 237, 0.1);
    --accent-line: rgba(124, 58, 237, 0.32);
    --good: #16a34a;
    --good-text: #15803d;
    --good-soft: rgba(22, 163, 74, 0.1);
    --warn: #d97706;
    --warn-text: #b45309;
    --warn-soft: rgba(217, 119, 6, 0.1);
    --bad: #e11d48;
    --bad-text: #be123c;
    --bad-soft: rgba(225, 29, 72, 0.08);
    --cyan-text: #0e7490;
    --cyan-soft: rgba(8, 145, 178, 0.09);
    --log-text: #57527a;
    --log-soft: rgba(87, 82, 122, 0.08);
    --grad: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 55%, #6d28d9 100%);
    --grad-text: linear-gradient(100deg, #8b5cf6 0%, #7c3aed 50%, #5b21b6 100%);
    --header-bg: rgba(255, 255, 255, 0.78);
    --glow-a: #c4b5fd;
    --glow-b: #ddd6fe;
    --glow-c: #bae6fd;
    --glow-opacity: .55;
    --grid-line: rgba(60, 30, 140, 0.05);
    --shadow: 0 22px 60px -28px rgba(60, 30, 140, 0.28), 0 0 0 1px var(--line);
    --shadow-float: 0 30px 80px -30px rgba(60, 30, 140, 0.35), 0 0 0 1px var(--line);
    color-scheme: light;
}
:root {
    --radius: 18px;
    --radius-sm: 12px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font: 14px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .4s var(--ease), color .4s var(--ease);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(139, 92, 246, 0.4); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--faint); }
svg { width: 16px; height: 16px; flex: none; }
.badge svg { width: 12px; height: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hidden { display: none !important; }

/* ================================================================ background */
.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora span {
    position: absolute; width: 58vmax; height: 58vmax; border-radius: 50%;
    filter: blur(110px); opacity: var(--glow-opacity);
    animation: drift 30s var(--ease) infinite alternate;
    transition: background .5s, opacity .5s;
}
.aurora span:nth-child(1) { background: var(--glow-a); top: -28vmax; left: -18vmax; }
.aurora span:nth-child(2) { background: var(--glow-b); bottom: -32vmax; right: -22vmax; animation-duration: 36s; animation-delay: -8s; }
.aurora span:nth-child(3) { background: var(--glow-c); top: 35%; left: 45%; width: 36vmax; height: 36vmax; opacity: calc(var(--glow-opacity) * .45); animation-duration: 42s; animation-delay: -16s; }
body.in-app .aurora span { opacity: calc(var(--glow-opacity) * .5); }
@keyframes drift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(7vmax, 5vmax, 0) scale(1.12); }
    100% { transform: translate3d(-5vmax, 9vmax, 0) scale(.95); }
}
.grid-bg {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 60% 20%, #000 10%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 60% 20%, #000 10%, transparent 72%);
}
#app { position: relative; z-index: 1; min-height: 100vh; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-logo { width: 54px; height: 54px; border-radius: 16px; background: var(--grad); animation: pulse-logo 1.4s var(--ease) infinite; }
@keyframes pulse-logo { 0%, 100% { transform: scale(.9); opacity: .6; } 50% { transform: scale(1.05); opacity: 1; } }

/* ================================================================ logo */
.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.035em; font-size: 18px; white-space: nowrap; }
.logo-mark {
    width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center;
    box-shadow: 0 10px 30px -8px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .35);
    position: relative; overflow: hidden; flex: none;
}
.logo-mark::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
    transform: translateX(-120%); animation: shine 4.5s var(--ease) infinite;
}
.logo-mark svg { width: 19px; height: 19px; color: #fff; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.logo small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }

/* ================================================================ shared bits */
.eyebrow {
    display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px; border-radius: 99px;
    font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text);
    background: var(--accent-soft); border: 1px solid var(--accent-line);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eyebrow .dot { width: 7px; height: 7px; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.label-up { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.icon-btn {
    width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; cursor: pointer;
    background: var(--panel); border: 1px solid var(--line-2); color: var(--text);
    transition: transform .3s var(--spring), border-color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--accent-line); background: var(--hover); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-btn svg { transition: transform .6s var(--spring); }
.theme-btn:hover svg { transform: rotate(-30deg); }

/* ================================================================ auth (hero) */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px clamp(16px, 4vw, 44px); }
.auth-hero {
    flex: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px);
    align-items: center; width: min(1240px, 100%); margin: 0 auto; padding: 20px clamp(16px, 4vw, 44px) 50px;
}
.hero-copy > * { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.hero-copy h1 {
    font-size: clamp(36px, 4.4vw, 66px); line-height: 1.03; letter-spacing: -.05em; font-weight: 800; margin: 22px 0 20px;
}
.hero-copy h1 .period { color: var(--text); margin-left: -.06em; }
.hero-copy .lead { font-size: clamp(15px, 1.4vw, 17.5px); color: var(--muted); max-width: 560px; margin: 0 0 30px; line-height: 1.7; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 38px; margin-bottom: 26px; }
.hero-stats b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.04em; line-height: 1.2; }
.hero-stats span { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-tag {
    display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600;
    background: var(--panel); border: 1px solid var(--line-2);
}
.pill-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }

.hero-stage { position: relative; min-height: 520px; display: grid; place-items: center; }
.auth-card {
    width: min(420px, 100%); padding: 30px 30px 26px; border-radius: 26px; position: relative; z-index: 2;
    background: var(--panel); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    box-shadow: var(--shadow-float);
    animation: rise .9s .15s var(--ease) both;
}
.auth-card .window-bar { margin: -6px -8px 20px; }
.auth-card h2 { font-size: 26px; letter-spacing: -.04em; margin: 0 0 4px; font-weight: 800; }
.auth-card p.lead { margin: 0 0 22px; color: var(--muted); }
.auth-card form > * { animation: rise .8s var(--ease) both; animation-delay: calc(.25s + var(--i, 0) * .06s); }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--faint); display: flex; align-items: center; justify-content: center; gap: 7px; }
.auth-foot svg { width: 13px; height: 13px; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* floating decoration cards around the login card */
.float {
    position: absolute; z-index: 3; border-radius: 18px; background: var(--panel); border: 1px solid var(--line-2);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow-float);
    animation: rise 1s var(--ease) both, bob 7s ease-in-out infinite;
    pointer-events: none;
}
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
/* the card sits bottom-left of the stage, the floats only overlap its decorative top bar / edges */
.hero-stage .auth-card { justify-self: start; margin: 96px 0 30px; }
.float.f-feed { top: 0; right: -20px; width: 270px; padding: 14px; animation-delay: .45s, -2s; }
.float.f-toggle { top: 30px; left: -10px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 13.5px; animation-delay: .55s, -4s; }
.float.f-stat { bottom: 0; right: -30px; width: 160px; padding: 16px; animation-delay: .65s, -1s; }
.float.f-radar { top: 42%; right: -40px; width: 150px; padding: 14px; animation-delay: .75s, -5s; z-index: 1; }
.float .label-up { font-size: 10.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.float.f-stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.04em; color: var(--good-text); line-height: 1.1; margin-top: 4px; }
.mini-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12.5px; margin-top: 6px; }
.mini-row b { font-weight: 800; }
.mini-row svg { width: 12px; height: 12px; color: var(--bad); }
.mini-row .r { margin-left: auto; color: var(--faint); font-size: 11.5px; }
.on-text { color: var(--good-text); font-weight: 800; font-size: 12px; }
.fake-switch { width: 38px; height: 22px; border-radius: 99px; background: var(--accent); position: relative; }
.fake-switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.radar { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--accent-line); position: relative; overflow: hidden;
    background: radial-gradient(circle, transparent 32%, var(--accent-line) 33%, transparent 34%, transparent 64%, var(--line-2) 65%, transparent 66%); }
.radar::before { content: ""; position: absolute; inset: 0; background: conic-gradient(from 0deg, transparent 0 75%, rgba(139, 92, 246, .55) 100%); animation: spin 4s linear infinite; }
.radar i { position: absolute; width: 7px; height: 7px; border-radius: 50%; }
.radar i:nth-child(1) { top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.radar i:nth-child(2) { top: 28%; left: 66%; background: var(--bad); }
.radar i:nth-child(3) { top: 64%; left: 30%; background: var(--bad); }
.radar i:nth-child(4) { top: 70%; left: 64%; background: var(--good); }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; position: relative;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 12px; padding: 0 22px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.marquee-track span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* window bar (dashboard mock look) */
.window-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 11.5px; color: var(--faint); font-family: var(--mono); min-width: 0; }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.window-bar i:nth-child(1) { background: #ff5f57; } .window-bar i:nth-child(2) { background: #febc2e; } .window-bar i:nth-child(3) { background: #28c840; }
.window-bar span { margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================ forms */
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.input, select.input, textarea.input {
    width: 100%; padding: 12px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
    background: var(--input-bg); outline: none; transition: border-color .2s, box-shadow .25s var(--ease), background .2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder { color: var(--faint); }
.input:disabled { opacity: .6; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: var(--panel-solid); color: var(--text); }
textarea.input { resize: vertical; min-height: 70px; }
.input.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 99px; border: 1px solid var(--line-2);
    background: var(--panel); cursor: pointer; font-weight: 700; font-size: 13.5px; white-space: nowrap; color: var(--text);
    position: relative; overflow: hidden; isolation: isolate;
    transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .3s var(--ease), opacity .2s, filter .2s;
}
.btn:hover { border-color: var(--accent-line); background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 14px 34px -12px rgba(139, 92, 246, .9); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 0 0 5px var(--accent-soft), 0 18px 44px -12px rgba(139, 92, 246, 1); }
.btn.danger { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad-text); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 22%, transparent); }
.btn.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn-text); }
.btn.warn:hover { background: color-mix(in srgb, var(--warn) 20%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { padding: 6px 13px; font-size: 12.5px; }
.btn.icon { padding: 8px; border-radius: 50%; }
.btn.block { width: 100%; padding: 13px; font-size: 14.5px; }
.btn .ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .35); transform: scale(0); animation: ripple .6s var(--ease); pointer-events: none; z-index: -1; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn:not(.primary).loading::after { border-color: var(--line-2); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.error-line { color: var(--bad-text); font-size: 13px; min-height: 18px; margin: -4px 0 10px; font-weight: 600; }
.error-line:not(:empty) { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* toggle */
.switch { position: relative; width: 46px; height: 26px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span {
    position: absolute; inset: 0; border-radius: 99px; background: var(--line-2);
    border: 1px solid var(--line-2); transition: background .35s var(--ease), border-color .35s, box-shadow .35s;
}
.switch span::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .45s var(--spring), width .2s;
}
.switch input:checked + span { background: var(--accent); border-color: transparent; box-shadow: 0 0 18px -4px var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:active + span::after { width: 24px; }
.switch input:checked:active + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-soft); }
.switch input:disabled + span { opacity: .5; }

/* ================================================================ app header */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.header {
    position: sticky; top: 0; z-index: 30;
    background: var(--header-bg); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 22px; height: 72px; width: min(1480px, 100%); margin: 0 auto; padding: 0 clamp(16px, 2.6vw, 32px); }
.header .logo { font-size: 18px; }
.header .logo small { display: none; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.header .logo { flex: none; }

.nav { display: flex; align-items: center; gap: 2px; position: relative; min-width: 0; }
.nav a {
    display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 99px; color: var(--muted);
    font-weight: 600; font-size: 13.5px; position: relative; z-index: 1; white-space: nowrap; transition: color .2s;
}
.nav a svg { width: 15px; height: 15px; display: none; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--accent-text); }
.nav a .count { font-size: 10.5px; font-weight: 800; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; line-height: 17px; }
.nav-pill {
    position: absolute; top: 0; left: 0; width: 0; height: 36px; border-radius: 99px; z-index: 0; pointer-events: none;
    background: var(--accent-soft); border: 1px solid var(--accent-line);
    transition: transform .5s var(--spring), width .5s var(--spring), height .3s, opacity .3s;
}

.server-switch {
    display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 99px; cursor: pointer; max-width: 230px;
    background: var(--panel); border: 1px solid var(--line-2); transition: border-color .2s, background .2s;
}
.server-switch:hover { border-color: var(--accent-line); background: var(--hover); }
.server-switch .avatar { width: 30px; height: 30px; border-radius: 50%; font-size: 11px; }
.server-switch > div:not(.avatar) { min-width: 0; flex: 1 1 auto; line-height: 1.25; }
.server-switch .name { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-switch .sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-switch > svg { color: var(--muted); width: 14px; height: 14px; }

.account { position: relative; }
.account-btn { padding: 5px 16px 5px 5px; gap: 9px; }
.account-btn .avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .3); color: #fff; font-size: 11px; }
.account-btn > svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.account.open .account-btn > svg { transform: rotate(180deg); }
.menu {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 8px; border-radius: 18px; z-index: 40;
    background: var(--panel-solid); box-shadow: var(--shadow-float);
    opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none;
    transition: opacity .2s, transform .3s var(--ease);
}
.account.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu .menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .menu-head b { display: block; font-size: 14px; }
.menu .menu-head span { font-size: 12px; color: var(--muted); }
.menu a, .menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 11px; border: 0; background: transparent;
    cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--text); text-align: left;
}
.menu a:hover, .menu button:hover { background: var(--hover); }
.menu svg { color: var(--muted); }
.menu .danger-item { color: var(--bad-text); }
.menu .danger-item svg { color: var(--bad-text); }

.avatar {
    width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none;
    background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-text);
}

.scrim { display: none; }
.menu-btn { display: none; }
.main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.content { padding: 8px clamp(16px, 2.6vw, 32px) 70px; max-width: 1480px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding: 34px 0 26px; }
.page-head > div:first-child { min-width: 0; }
.page-head h1 { margin: 14px 0 0; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -.05em; font-weight: 800; }
.page-head h1::after { content: "."; color: var(--accent); }
.page-head h1:empty::after { content: ""; }
.page-head .spacer { flex: 1; }
.page-head #top-right { padding-bottom: 6px; }

.view { animation: view-in .55s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.stagger > * { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* status pill */
.status-pill { display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px; border-radius: 99px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line-2); background: var(--panel); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); position: relative; flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 10px var(--good); }
.dot.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--good); animation: ping 1.8s var(--ease) infinite; }
.dot.off { background: var(--bad); }
@keyframes ping { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }

/* ================================================================ cards */
.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: relative;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
}
:root[data-theme="light"] .card { box-shadow: 0 12px 40px -28px rgba(60, 30, 140, .35); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.card-head .spacer { flex: 1; }
.card-body { padding: 20px; }
.grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

.stat { padding: 20px 22px; overflow: hidden; transition: transform .35s var(--ease), border-color .3s; }
.stat:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.stat .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.stat .label svg { width: 15px; height: 15px; color: var(--accent-text); }
.stat .value { font-size: 40px; font-weight: 800; letter-spacing: -.05em; margin-top: 10px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 12px; color: var(--faint); margin-top: 4px; font-weight: 500; }
.stat .glow { position: absolute; width: 150px; height: 150px; right: -50px; top: -60px; border-radius: 50%; filter: blur(46px); opacity: .32; pointer-events: none; }
.glow.violet { background: #8b5cf6; } .glow.cyan { background: #22d3ee; } .glow.red { background: #f43f5e; } .glow.green { background: #22c55e; }

/* chart */
.chart { display: flex; align-items: flex-end; gap: 5px; height: 180px; padding-top: 10px; }
.chart .bar-wrap { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.chart .bar {
    border-radius: 7px 7px 3px 3px; min-height: 3px; background: linear-gradient(180deg, var(--accent-2), color-mix(in srgb, var(--accent) 25%, transparent));
    transform-origin: bottom; animation: grow .9s var(--ease) both; animation-delay: calc(var(--i) * 25ms);
    transition: filter .2s;
}
.chart .bar-wrap:hover .bar { filter: brightness(1.3) saturate(1.2); }
.chart .bar-wrap .tip {
    position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translate(-50%, 4px); opacity: 0; pointer-events: none; z-index: 2;
    background: var(--panel-solid); border: 1px solid var(--line-2); padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; white-space: nowrap;
    transition: opacity .2s, transform .2s var(--ease);
}
.chart .bar-wrap:hover .tip { opacity: 1; transform: translate(-50%, 0); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; font-weight: 600; margin-top: 8px; }

.top-list { display: grid; gap: 12px; }
.top-row { display: grid; gap: 6px; }
.top-row .t { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transform-origin: left; animation: grow-x 1s var(--ease) both; }
@keyframes grow-x { from { transform: scaleX(0); } }

/* ================================================================ tables */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .search, .search { position: relative; flex: 1; min-width: 220px; max-width: 440px; }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.search .input { padding-left: 42px; border-radius: 99px; }
.seg { display: inline-flex; padding: 4px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line-2); position: relative; }
.seg button { border: 0; background: transparent; padding: 7px 15px; border-radius: 99px; cursor: pointer; color: var(--muted); font-weight: 700; font-size: 12.5px; position: relative; z-index: 1; transition: color .2s, background .25s; }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--on-accent); background: var(--accent); box-shadow: 0 6px 18px -8px var(--accent); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); font-weight: 800; padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .2s; animation: row-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
.table tbody tr:hover { background: var(--hover); }
.table tbody tr:last-child td { border-bottom: 0; }
@keyframes row-in { from { opacity: 0; transform: translateX(-8px); } }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.player-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.player-cell b { display: block; font-weight: 700; }
.player-cell small { color: var(--faint); font-size: 11.5px; }
.empty { padding: 54px 20px; text-align: center; color: var(--muted); font-weight: 500; }
.empty svg { width: 40px; height: 40px; color: var(--accent-text); opacity: .6; margin-bottom: 10px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .03em; border: 1px solid transparent; white-space: nowrap; }
.badge.ban { background: var(--bad-soft); color: var(--bad-text); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.badge.kick { background: var(--warn-soft); color: var(--warn-text); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge.log { background: var(--log-soft); color: var(--log-text); border-color: var(--line-2); }
.badge.ok { background: var(--good-soft); color: var(--good-text); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.badge.cyan { background: var(--cyan-soft); color: var(--cyan-text); border-color: color-mix(in srgb, var(--cyan-text) 30%, transparent); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 600; }

/* ================================================================ feed (killfeed look) */
.feed { display: grid; gap: 8px; }
.feed-item {
    display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 11px 14px;
    border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer;
    transition: border-color .2s, background .2s, transform .3s var(--ease);
}
.feed-item:hover { border-color: var(--accent-line); background: var(--hover); transform: translateX(3px); }
.feed-item.fresh { animation: fresh 1.6s var(--ease) both; }
@keyframes fresh {
    0% { opacity: 0; transform: translateY(-14px) scale(.98); box-shadow: 0 0 0 1px var(--bad), 0 0 30px color-mix(in srgb, var(--bad) 40%, transparent); }
    20% { opacity: 1; transform: none; }
    100% { box-shadow: 0 0 0 1px transparent, 0 0 0 transparent; }
}
.feed-item .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--bad-soft); color: var(--bad-text); }
.feed-item .ico.log { background: var(--log-soft); color: var(--log-text); }
.feed-item .ico.kick { background: var(--warn-soft); color: var(--warn-text); }
.feed-item .ico svg { width: 17px; height: 17px; }
.feed-item .title { font-weight: 800; font-size: 13.5px; letter-spacing: -.01em; }
.feed-item .meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item > div { min-width: 0; }
.time { font-size: 11.5px; color: var(--faint); white-space: nowrap; font-weight: 600; }

/* ================================================================ config */
.config-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.config-layout .search { max-width: none; }
.cat-list { position: sticky; top: 92px; display: grid; gap: 3px; }
.cat-list button {
    display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 99px; border: 1px solid transparent;
    background: transparent; cursor: pointer; color: var(--muted); font-weight: 600; text-align: left; transition: all .25s var(--ease);
}
.cat-list button svg { width: 16px; height: 16px; flex: none; }
.cat-list button:hover { color: var(--text); background: var(--hover); }
.cat-list button.on { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent-line); }
.cat-list button .n { margin-left: auto; font-size: 11px; color: var(--faint); font-weight: 700; }
.cat-list button .mod { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.setting {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 20px;
    border-bottom: 1px solid var(--line); transition: background .3s;
}
.setting:last-child { border-bottom: 0; }
.setting:hover { background: var(--hover); }
.setting .name { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.setting .desc { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.setting .key { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 4px; }
.setting .ctrl { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.setting .ctrl .input { width: 130px; }
.setting .ctrl .input.wide { width: 320px; }
.setting.flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 0% { background: var(--good-soft); } 100% { background: transparent; } }
.setting.flash-bad { animation: flash-bad 1.4s var(--ease); }
@keyframes flash-bad { 0% { background: var(--bad-soft); } 100% { background: transparent; } }
.apply-state { font-size: 11.5px; min-width: 64px; text-align: right; color: var(--faint); font-weight: 700; transition: color .2s; }
.apply-state.ok { color: var(--good-text); }
.apply-state.bad { color: var(--bad-text); }
.apply-state.wait { color: var(--warn-text); }
.reset-btn { opacity: 0; transition: opacity .2s; }
.setting:hover .reset-btn, .setting.overridden .reset-btn { opacity: 1; }

/* ================================================================ modal */
.modal-back {
    position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
    background: rgba(6, 4, 14, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .3s var(--ease) both;
}
:root[data-theme="light"] .modal-back { background: rgba(40, 24, 90, .22); }
.modal-back.out { animation: fade .25s var(--ease) reverse both; }
.modal {
    width: min(540px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 24px;
    background: var(--panel-solid); box-shadow: var(--shadow-float), 0 40px 120px -30px rgba(0, 0, 0, .6);
    animation: pop .45s var(--spring) both;
}
.modal.wide { width: min(1100px, 100%); }
.modal-back.out .modal { animation: pop .25s var(--ease) reverse both; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 18px; flex: 1; letter-spacing: -.03em; font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 9px 14px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; word-break: break-all; }
.video-box { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.video-box video { width: 100%; height: 100%; object-fit: contain; display: block; }
.video-box .overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #a39dc0; gap: 10px; pointer-events: none; transition: opacity .4s; }
.video-box .live-tag { position: absolute; top: 12px; left: 12px; display: flex; gap: 7px; align-items: center; padding: 4px 11px; border-radius: 99px; background: rgba(244, 63, 94, .92); color: #fff; font-weight: 800; font-size: 11.5px; letter-spacing: .1em; }
.video-box .live-tag i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 0 auto; }

/* ================================================================ toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 10px; width: min(360px, calc(100vw - 36px)); }
.toast {
    display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 16px; border-radius: 16px; overflow: hidden; position: relative; cursor: pointer;
    background: var(--panel-solid); box-shadow: var(--shadow-float);
    animation: toast-in .5s var(--spring) both;
}
.toast.out { animation: toast-out .35s var(--ease) both; }
.toast svg { width: 18px; height: 18px; margin-top: 1px; }
.toast.ok svg { color: var(--good-text); } .toast.bad svg { color: var(--bad-text); } .toast.info svg { color: var(--accent-text); } .toast.alert svg { color: var(--bad-text); }
.toast b { display: block; font-size: 13.5px; font-weight: 800; }
.toast span { font-size: 12.5px; color: var(--muted); }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--grad); transform-origin: left; animation: toast-life var(--life, 4s) linear both; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.95); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px) scale(.95); } }
@keyframes toast-life { to { transform: scaleX(0); } }

/* ================================================================ servers page */
.servers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.server-card { padding: 14px 14px 18px; cursor: pointer; overflow: hidden; text-align: left; transition: transform .4s var(--ease), border-color .3s, box-shadow .4s var(--ease); }
.server-card:hover { transform: translateY(-5px); border-color: var(--accent-line); box-shadow: 0 28px 60px -28px rgba(139, 92, 246, .7); }
.server-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.server-card:hover::before { opacity: 1; }
.server-card .window-bar { margin-bottom: 16px; }
.server-card > *:not(.window-bar) { padding: 0 6px; }
.server-card h3 { margin: 14px 0 2px; font-size: 22px; letter-spacing: -.04em; font-weight: 800; }
.server-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.server-card .meta { display: flex; gap: 22px; margin: 18px 6px 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.server-card .meta b { color: var(--text); display: block; font-size: 22px; letter-spacing: -.04em; text-transform: none; }
.new-card { display: grid; place-items: center; text-align: center; border: 1.5px dashed var(--accent-line); min-height: 220px; color: var(--muted); background: transparent; font: inherit; }
.new-card svg { width: 26px; height: 26px; color: var(--on-accent); }
.new-card .plus { width: 52px; height: 52px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; margin: 0 auto 12px; box-shadow: 0 0 0 6px var(--accent-soft); }
.new-card b { color: var(--text); font-size: 16px; }
.key-box { display: flex; gap: 8px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--input-bg); border: 1.5px dashed var(--accent-line); font-family: var(--mono); font-size: 15px; letter-spacing: .04em; word-break: break-all; }
.key-box span { flex: 1; }
.code { font-family: var(--mono); font-size: 12.5px; background: var(--input-bg); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; white-space: pre-wrap; word-break: break-all; color: var(--accent-text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 13px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; animation: pop .35s var(--spring) both; }
label.chip { font-family: var(--font); font-weight: 600; cursor: pointer; padding-right: 13px; }
label.chip input { accent-color: var(--accent); margin: 0; }
.chip button { border: 0; background: var(--hover); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.chip button:hover { background: var(--bad); color: #fff; }
.chip button svg { width: 12px; height: 12px; }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--panel-2) 25%, var(--hover) 37%, var(--panel-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn-text); font-size: 13px; margin-bottom: 16px; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice.info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }

/* ================================================================ responsive */
@media (max-width: 1240px) {
    .nav a { padding: 8px 10px; font-size: 13px; }
    .server-switch { max-width: 180px; }
}
@media (max-width: 1180px) {
    .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cols-main { grid-template-columns: 1fr; }
}
@media (max-width: 1180px) {
    .float.f-feed, .float.f-radar, .float.f-stat { display: none; }
    .hero-stage .auth-card { margin-top: 60px; }
}
@media (max-width: 1100px) {
    .menu-btn { display: inline-grid; }
    .header-in { gap: 12px; }
    .header .nav-wrap {
        position: fixed; top: 72px; left: 0; right: 0; z-index: 29; padding: 12px clamp(16px, 2.6vw, 32px) 18px;
        background: var(--panel-solid); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5);
        transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .35s var(--ease), opacity .25s;
        max-height: calc(100vh - 72px); overflow-y: auto;
    }
    body.nav-open .header .nav-wrap { transform: none; opacity: 1; pointer-events: auto; }
    .nav { flex-direction: column; align-items: stretch; gap: 2px; }
    .nav a { padding: 11px 14px; font-size: 14px; }
    .nav a svg { display: block; }
    .nav a .count { margin-left: auto; }
    .scrim { display: block; position: fixed; inset: 72px 0 0; background: rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 28; }
    body.nav-open .scrim { opacity: 1; pointer-events: auto; }
    .nav-wrap .server-switch { display: flex; max-width: none; margin-bottom: 10px; }
    .header-right .server-switch { display: none; }
}
@media (min-width: 1101px) {
    .nav-wrap { display: contents; }
    .nav-wrap .server-switch { display: none; }
}
@media (max-width: 960px) {
    .auth-hero { grid-template-columns: 1fr; padding-top: 0; }
    .hero-stage { min-height: 0; padding: 10px 0 20px; }
    .hero-stage { order: -1; }
    .hero-stage .auth-card { justify-self: center; margin: 0; }
    .hero-stage .float { display: none; }
    .config-layout { grid-template-columns: 1fr; }
    .cat-list { position: static; display: flex; overflow-x: auto; padding-bottom: 6px; }
    .cat-list button { white-space: nowrap; }
    .cat-list button .n { display: none; }
    .setting { grid-template-columns: 1fr; gap: 10px; }
    .setting .ctrl { justify-content: flex-start; flex-wrap: wrap; }
    .setting .ctrl .input.wide { width: 100%; }
    .kv { grid-template-columns: 1fr; gap: 2px; }
    .kv dt { margin-top: 8px; }
}
@media (max-width: 600px) {
    .cols-4, .cols-2 { grid-template-columns: 1fr; }
    .header-in { height: 64px; }
    .header .nav-wrap { top: 64px; max-height: calc(100vh - 64px); }
    .scrim { inset: 64px 0 0; }
    .header .logo span.logo-text { display: none; }
    .account-btn .uname { display: none; }
    .account-btn { padding: 5px 10px 5px 5px; }
    .page-head { padding: 24px 0 20px; }
    .page-head #top-right { padding-bottom: 0; }
    .status-pill { font-size: 11.5px; padding: 6px 12px; }
    .table th, .table td { padding: 10px 12px; }
    .hide-sm { display: none; }
    .hero-stats { gap: 14px 26px; }
    .hero-stats b { font-size: 22px; }
    .auth-card { padding: 24px 20px 22px; }
    .servers-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- evidence videos */
.video-wrap { display: grid; gap: 10px; }
.video-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.video-error { background: rgba(0, 0, 0, .78); color: #e9e6f5; pointer-events: auto; padding: 20px; }
.video-error svg { width: 30px; height: 30px; }
.video-missing { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 16px; border: 1px dashed var(--line-2); background: var(--panel-2); color: var(--muted); }
.video-missing svg { width: 26px; height: 26px; color: var(--accent-2); flex: none; }
.video-missing b { display: block; color: var(--text); }
.video-missing span { font-size: 12.5px; }
.linked-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.linked-row > svg { color: var(--accent-2); flex: none; }
.linked-row > div { flex: 1; min-width: 0; display: grid; }
.linked-row span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.section-title { margin: 22px 0 10px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.evidence-card { overflow: hidden; cursor: pointer; padding: 0; animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); transition: transform .35s var(--ease), border-color .3s, box-shadow .35s var(--ease); }
.evidence-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 22px 50px -24px rgba(139, 92, 246, .55); }
.evidence-thumb { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.evidence-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.evidence-card:hover .evidence-thumb video { transform: scale(1.05); }
.evidence-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .55)); opacity: .85; transition: opacity .25s; }
.evidence-thumb .play svg { width: 40px; height: 40px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); transition: transform .35s var(--spring); }
.evidence-card:hover .play svg { transform: scale(1.15); }
.evidence-thumb .badge { position: absolute; top: 10px; left: 10px; }
.evidence-info { display: grid; gap: 3px; padding: 12px 14px 14px; }
.evidence-info b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-info > span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-grid > .empty { grid-column: 1 / -1; }
