/* ==========================================================================================
   AlphaStudio Console — ambient dark-glass design system.
   Same visual language as the AlphaStudio portfolio site (docs/project-site skill): near-black
   canvas, blurred glowing blobs, grain, cursor glow, glass panels. Brand red drives the chrome;
   status colours (green / amber / red) are reserved for meaning, never decoration.
   ========================================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');

/* ============================================================
   CONFIG — the only block that should change between projects
   ============================================================ */
:root {
    --accent1: #ff3b3b;            /* primary accent, bright stop */
    --accent2: #c40000;            /* primary accent, deep stop */
    --accent1-rgb: 255, 59, 59;    /* accent1 as r,g,b — needed for rgba() tints */
    --accent-soft: #ff9c9c;        /* muted tertiary accent, used sparingly */
    --glow: #ff6b6b;               /* bright highlight for icons/particles */
}

/* Semantic palette — meaning only. approved = green, pending = amber, blocked = red. */
:root {
    --ok: #00ff12;       --ok-rgb: 0, 255, 18;
    --warn: #ffb020;     --warn-rgb: 255, 176, 32;
    --danger: #ff4d4d;   --danger-rgb: 255, 77, 77;
    --info: #7aa7ff;     --info-rgb: 122, 167, 255;

    --bg: #050505;
    --bg1: #0a0a0b;
    --bg2: #101012;
    --text: #ffffff;
    --text-2: #c9ccd2;
    --text-dim: #8b909a;
    --line: rgba(255, 255, 255, 0.075);
    --line-strong: rgba(255, 255, 255, 0.14);
    --glass: rgba(255, 255, 255, 0.035);
    --glass-2: rgba(255, 255, 255, 0.06);

    --radius: 16px;
    --radius-sm: 10px;
    --sidebar-w: 248px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --font-head: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
    --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(var(--accent1-rgb), 0.35); }
:focus-visible { outline: 2px solid rgba(var(--accent1-rgb), 0.7); outline-offset: 2px; border-radius: 6px; }

/* ===== Ambient layer ============================================================== */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient .blob { position: absolute; border-radius: 50%; filter: blur(110px); will-change: transform; }
.ambient .b1 {
    width: 700px; height: 700px; top: -300px; right: -180px; opacity: 0.5;
    background: radial-gradient(circle, rgba(var(--accent1-rgb), 0.34), transparent 70%);
    animation: drift-a 26s ease-in-out infinite alternate;
}
.ambient .b2 {
    width: 560px; height: 560px; top: 38%; left: -240px; opacity: 0.32;
    background: radial-gradient(circle, rgba(var(--accent1-rgb), 0.26), transparent 70%);
    animation: drift-b 32s ease-in-out infinite alternate;
}
.ambient .b3 {
    width: 460px; height: 460px; bottom: -220px; right: 18%; opacity: 0.22;
    background: radial-gradient(circle, rgba(var(--info-rgb), 0.2), transparent 70%);
    animation: drift-a 38s ease-in-out infinite alternate-reverse;
}
@keyframes drift-a { to { transform: translate3d(-70px, 50px, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(90px, -40px, 0) scale(1.12); } }
#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#cursorGlow {
    position: fixed; top: 0; left: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px;
    z-index: 0; pointer-events: none; border-radius: 50%; mix-blend-mode: screen;
    background: radial-gradient(circle, rgba(var(--accent1-rgb), 0.11), transparent 62%);
    opacity: 0; transition: opacity 0.4s;
}
.grain {
    position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ===== App shell ================================================================== */
.app { position: relative; z-index: 2; display: flex; min-height: 100vh; }

.sidebar {
    position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex: none;
    display: flex; flex-direction: column; gap: 6px; padding: 18px 14px;
    background: linear-gradient(180deg, rgba(12, 12, 14, 0.82), rgba(8, 8, 9, 0.9));
    border-right: 1px solid var(--line);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; }
.brand img { height: 30px; width: auto; filter: drop-shadow(0 0 14px rgba(var(--accent1-rgb), 0.55)); }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand .brand-text b { font-family: var(--font-head); font-size: 15px; letter-spacing: -0.01em; }
.brand .brand-text span { font-size: 11px; color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label { padding: 14px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.nav a {
    position: relative; display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: 11px; color: var(--text-2); font-weight: 600; font-size: 13.5px;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.75; transition: opacity 0.25s, color 0.25s; }
.nav a:hover { background: var(--glass-2); color: var(--text); }
.nav a:hover svg { opacity: 1; }
.nav a.active {
    color: var(--text);
    background: linear-gradient(90deg, rgba(var(--accent1-rgb), 0.2), rgba(var(--accent1-rgb), 0.04));
    box-shadow: inset 0 0 0 1px rgba(var(--accent1-rgb), 0.28);
}
.nav a.active svg { color: var(--glow); opacity: 1; }
.nav a.active::before {
    content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--accent1), var(--accent2)); box-shadow: 0 0 14px rgba(var(--accent1-rgb), 0.8);
}
.nav .count {
    margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center;
    font-size: 11px; font-weight: 800; color: #1a1100; background: var(--warn);
    box-shadow: 0 0 14px rgba(var(--warn-rgb), 0.45);
}
.nav .count[data-zero='true'] { display: none; }

.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.me .avatar { width: 34px; height: 34px; font-size: 13px; }
.me .who { min-width: 0; flex: 1; line-height: 1.25; }
.me .who b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.icon-btn {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line);
    background: var(--glass); color: var(--text-2); cursor: pointer; transition: all 0.2s var(--ease);
}
.icon-btn:hover { background: var(--glass-2); color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }

.col { flex: 1; min-width: 0; }
.main { flex: 1; min-width: 0; padding: 28px clamp(18px, 3.2vw, 44px) 56px; }
.mobilebar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-family: var(--font-head); font-size: 28px; letter-spacing: -0.02em; line-height: 1.1; }
.page-head p { margin: 6px 0 0; color: var(--text-dim); max-width: 60ch; }
.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; color: var(--text-dim); }
.crumbs a:hover { color: var(--text); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ===== Cards ====================================================================== */
.card {
    position: relative; border: 1px solid var(--line); border-radius: var(--radius);
    background: linear-gradient(168deg, var(--glass-2), rgba(255, 255, 255, 0.012));
    box-shadow: 0 22px 50px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-family: var(--font-head); font-size: 15px; letter-spacing: -0.005em; }
.card-head .sub { color: var(--text-dim); font-size: 12.5px; }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.grid.two { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.grid.detail { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.stat { padding: 18px 20px; overflow: hidden; }
.stat::after {
    content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--tint, var(--accent1-rgb)), 0.22), transparent 70%); pointer-events: none;
}
.stat .label { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.stat .label i { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--tint, var(--accent1-rgb))); box-shadow: 0 0 12px rgb(var(--tint, var(--accent1-rgb))); }
.stat .value { margin-top: 10px; font-family: var(--font-head); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .hint { margin-top: 8px; color: var(--text-dim); font-size: 12.5px; }
.stat.pending { --tint: var(--warn-rgb); }
.stat.approved { --tint: var(--ok-rgb); }
.stat.blocked { --tint: var(--danger-rgb); }
.stat.online { --tint: var(--info-rgb); }
a.stat { display: block; transition: transform 0.3s var(--ease), border-color 0.3s; }
a.stat:hover { transform: translateY(-3px); border-color: var(--line-strong); }

/* ===== Buttons ==================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px;
    border-radius: 11px; border: 1px solid var(--line-strong); background: var(--glass-2); color: var(--text);
    font-size: 13px; font-weight: 700; letter-spacing: 0.005em; cursor: pointer; white-space: nowrap;
    transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s, opacity 0.2s;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.1); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn.primary {
    color: #fff; border-color: rgba(var(--accent1-rgb), 0.5);
    background: linear-gradient(180deg, var(--accent1), var(--accent2));
    box-shadow: 0 10px 28px -10px rgba(var(--accent1-rgb), 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn.primary:hover { box-shadow: 0 14px 34px -10px rgba(var(--accent1-rgb), 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn.approve {
    color: #02130a; border-color: rgba(var(--ok-rgb), 0.55);
    background: linear-gradient(180deg, color-mix(in srgb, var(--ok) 88%, white), color-mix(in srgb, var(--ok) 72%, black));
    box-shadow: 0 10px 26px -12px rgba(var(--ok-rgb), 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn.approve:hover { box-shadow: 0 14px 32px -12px rgba(var(--ok-rgb), 1), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.btn.danger { color: #ffd9d9; border-color: rgba(var(--danger-rgb), 0.45); background: rgba(var(--danger-rgb), 0.12); }
.btn.danger:hover { background: rgba(var(--danger-rgb), 0.22); }
.btn.ghost { background: transparent; }
.btn.iconic { width: 32px; height: 32px; padding: 0; }
.btn.iconic svg { width: 16px; height: 16px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Pills & chips ============================================================== */
.pill {
    display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 9px; border-radius: 999px;
    font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
    color: rgb(var(--c)); background: rgba(var(--c), 0.12); border: 1px solid rgba(var(--c), 0.32);
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--c)); box-shadow: 0 0 10px rgb(var(--c)); }
.pill.approved { --c: var(--ok-rgb); }
.pill.pending { --c: var(--warn-rgb); }
.pill.pending::before { animation: blink 1.6s ease-in-out infinite; }
.pill.blocked { --c: var(--danger-rgb); }
.pill.owner { --c: var(--accent1-rgb); }
.pill.support { --c: var(--info-rgb); }
.pill.off { --c: 139, 144, 154; }
@keyframes blink { 50% { opacity: 0.25; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 340px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 600;
    color: var(--text-2); background: var(--glass-2); border: 1px solid var(--line);
}
.chip small { color: var(--text-dim); font-family: var(--font-mono); font-size: 10.5px; }
.chip.blocked { color: var(--text-dim); text-decoration: line-through; border-color: rgba(var(--danger-rgb), 0.35); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); display: inline-block; flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 10px var(--ok); }

.avatar {
    display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
    font-family: var(--font-head); font-weight: 700; font-size: 15px; color: #fff;
    background: linear-gradient(135deg, hsl(var(--h, 0) 70% 46%), hsl(calc(var(--h, 0) + 40) 75% 30%));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 18px -8px hsl(var(--h, 0) 80% 40%);
}

/* ===== Tables ===================================================================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    padding: 11px 14px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-dim); border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background 0.2s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
.cell-server { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.cell-server .t { min-width: 0; line-height: 1.3; }
.cell-server .t b { display: block; font-weight: 700; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-server .t span { color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; }
.muted { color: var(--text-dim); }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn { margin-left: 4px; }
td.actions { width: 1%; }

/* ===== Forms ====================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
input, select, textarea {
    width: 100%; padding: 10px 13px; border-radius: 11px; font: inherit; font-size: 14px; color: var(--text);
    background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line-strong);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: rgba(var(--accent1-rgb), 0.65); box-shadow: 0 0 0 4px rgba(var(--accent1-rgb), 0.16); background: rgba(0, 0, 0, 0.55);
}
textarea { resize: vertical; min-height: 96px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.search {
    position: relative; flex: 1; min-width: 220px; max-width: 420px;
}
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.search input { padding-left: 38px; padding-right: 44px; }
.search kbd {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 1px 7px; border-radius: 6px;
    border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
}
.inline-edit { font-family: var(--font-head); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; padding: 2px 8px; margin-left: -8px; background: transparent; border-color: transparent; border-radius: 10px; width: min(100%, 520px); }
.inline-edit:hover { border-color: var(--line-strong); }

/* switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(var(--danger-rgb), 0.25); border: 1px solid rgba(var(--danger-rgb), 0.5); transition: all 0.25s var(--ease); }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--ease); }
.switch input:checked + span { background: rgba(var(--ok-rgb), 0.28); border-color: rgba(var(--ok-rgb), 0.6); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px rgba(var(--accent1-rgb), 0.2); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + span { opacity: 0.4; }

/* ===== Toolbar & tabs ============================================================= */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tabs { display: inline-flex; padding: 4px; gap: 2px; border-radius: 13px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9px; color: var(--text-dim); font-weight: 700; font-size: 12.5px; transition: all 0.2s; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tabs a b { font-variant-numeric: tabular-nums; font-size: 11px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.tabs a.t-pending.active b { background: rgba(var(--warn-rgb), 0.22); color: var(--warn); }
.bulkbar {
    position: sticky; bottom: 18px; z-index: 20; display: none; align-items: center; gap: 12px; margin: 16px auto 0;
    width: fit-content; max-width: 100%; padding: 10px 12px 10px 18px; border-radius: 16px;
    background: rgba(14, 14, 16, 0.92); border: 1px solid var(--line-strong); backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px -20px #000;
}
.bulkbar.show { display: flex; animation: rise 0.35s var(--ease); }
input[type='checkbox'].check { width: 17px; height: 17px; padding: 0; accent-color: var(--accent1); cursor: pointer; }

/* ===== Queue (needs approval) ===================================================== */
.queue { display: flex; flex-direction: column; }
.queue-item { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); transition: background 0.2s; }
.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: rgba(255, 255, 255, 0.022); }
.queue-item .t { flex: 1; min-width: 0; }
.queue-item .t a { font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item .t a:hover { color: var(--glow); }
.queue-item .t .m { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; }
.queue-item .chips { margin-top: 8px; }

/* ===== Key/value + timeline ======================================================= */
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; }
.kv > div { padding: 12px 14px; background: var(--bg1); }
.kv dt { margin: 0 0 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.kv .wide { grid-column: 1 / -1; }
.plugin-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.plugin-row:last-child { border-bottom: 0; }
.plugin-row .t { flex: 1; min-width: 0; }
.plugin-row .t b { display: block; }
.plugin-row .t span { color: var(--text-dim); font-size: 12.5px; }
.timeline { padding: 8px 20px 16px; }
.tl-item { position: relative; display: flex; gap: 14px; padding: 12px 0 12px 22px; }
.tl-item::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.tl-item:first-child::before { top: 20px; }
.tl-item:last-child::before { bottom: calc(100% - 20px); }
.tl-item::after { content: ''; position: absolute; left: 0; top: 19px; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--text-dim)); box-shadow: 0 0 10px var(--c, transparent); }
.tl-item.registered { --c: var(--warn); } .tl-item.status { --c: var(--accent1); } .tl-item.plugin_added { --c: var(--ok); }
.tl-item.ip_changed { --c: var(--info); } .tl-item.plugin_status { --c: var(--glow); }
.tl-item .b { flex: 1; min-width: 0; line-height: 1.4; }
.tl-item .b b { font-weight: 700; }
.tl-item .b span { display: block; color: var(--text-dim); font-size: 12.5px; word-break: break-word; }
.tl-item time { color: var(--text-dim); font-size: 12px; white-space: nowrap; }

.bars { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
.bar-row .top { display: flex; justify-content: space-between; margin-bottom: 7px; font-weight: 600; font-size: 13px; }
.bar-row .top span { color: var(--text-dim); font-weight: 500; font-variant-numeric: tabular-nums; }
.bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent2), var(--accent1)); box-shadow: 0 0 14px rgba(var(--accent1-rgb), 0.55); transition: width 0.8s var(--ease); }

.empty { padding: 46px 20px; text-align: center; color: var(--text-dim); }
.empty svg { width: 38px; height: 38px; opacity: 0.55; margin-bottom: 10px; color: var(--glow); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; font-family: var(--font-head); }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--text-dim); font-size: 12.5px; }

.note { padding: 12px 14px; border-radius: 12px; font-size: 13px; color: var(--text-2); background: rgba(var(--info-rgb), 0.08); border: 1px solid rgba(var(--info-rgb), 0.25); }
.note.warn { background: rgba(var(--warn-rgb), 0.08); border-color: rgba(var(--warn-rgb), 0.3); }

/* ===== Toasts & modal ============================================================= */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
    pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 380px; padding: 12px 16px; border-radius: 14px;
    background: rgba(16, 16, 18, 0.94); border: 1px solid var(--line-strong); border-left: 3px solid var(--c, var(--accent1));
    backdrop-filter: blur(16px); box-shadow: 0 20px 50px -18px #000; font-weight: 600; animation: rise 0.4s var(--ease);
}
.toast.ok { --c: var(--ok); } .toast.err { --c: var(--danger); } .toast.warn { --c: var(--warn); }
.toast a { color: var(--glow); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all 0.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } }

.modal-back { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(6px); animation: fade 0.25s; }
.modal { width: min(440px, 100%); padding: 24px; border-radius: 20px; animation: rise 0.35s var(--ease); }
.modal h3 { margin: 0 0 6px; font-family: var(--font-head); font-size: 18px; }
.modal p { margin: 0 0 16px; color: var(--text-2); }
.modal .btn-row { justify-content: flex-end; margin-top: 8px; }
.secret { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 10px 0 4px; border-radius: 12px; font-family: var(--font-mono); font-size: 15px; background: rgba(0, 0, 0, 0.5); border: 1px dashed rgba(var(--accent1-rgb), 0.55); word-break: break-all; }
@keyframes fade { from { opacity: 0; } }

/* ===== Sign-in ==================================================================== */
.login-shell { position: relative; z-index: 2; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 34px 32px 30px; border-radius: 24px; animation: rise 0.7s var(--ease); }
.login-card::before {
    content: ''; position: absolute; inset: -1px; border-radius: 24px; padding: 1px; pointer-events: none;
    background: linear-gradient(160deg, rgba(var(--accent1-rgb), 0.6), transparent 40%, transparent 65%, rgba(var(--accent1-rgb), 0.25));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.login-card .mark { display: block; height: 54px; width: auto; margin: 0 auto 18px; filter: drop-shadow(0 0 22px rgba(var(--accent1-rgb), 0.6)); }
.login-card h1 { margin: 0; text-align: center; font-family: var(--font-head); font-size: 24px; letter-spacing: -0.02em; }
.login-card .lede { margin: 6px 0 24px; text-align: center; color: var(--text-dim); }
.login-card .btn { width: 100%; padding: 12px; font-size: 14px; }
.login-card .err { min-height: 20px; margin-top: 12px; text-align: center; color: var(--danger); font-weight: 600; font-size: 13px; }
.login-foot { margin-top: 18px; text-align: center; color: var(--text-dim); font-size: 12px; }

/* ===== Responsive ================================================================= */
@media (max-width: 1180px) {
    .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.two, .grid.detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 880px) {
    .app { flex-direction: column; }
    .sidebar { position: fixed; z-index: 60; inset: 0 auto 0 0; transform: translateX(-102%); transition: transform 0.35s var(--ease); width: min(82vw, 290px); }
    body.nav-open .sidebar { transform: none; box-shadow: 30px 0 80px #000; }
    .navscrim { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.55); display: none; }
    body.nav-open .navscrim { display: block; }
    .mobilebar {
        position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
        background: rgba(8, 8, 9, 0.8); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px);
    }
    .mobilebar img { height: 24px; }
    .mobilebar b { font-family: var(--font-head); }
    .main { padding-top: 20px; }
    .page-head h1, .inline-edit { font-size: 23px; }
}
@media (max-width: 560px) {
    .grid.stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat { padding: 14px; } .stat .value { font-size: 30px; }
    .kv { grid-template-columns: 1fr; }
    .queue-item { flex-wrap: wrap; } .queue-item .btn-row { width: 100%; }
    .toolbar { padding: 12px; }
    .tabs { width: 100%; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================================
   Royal Violet theme (2026-10): matches the M19 portfolio redesign. Visual only; status colours
   keep their meaning (green approved, amber pending, red blocked).
   ========================================================================================== */
:root {
    --accent1: #9d3bff;
    --accent2: #4f2dff;
    --accent1-rgb: 157, 59, 255;
    --accent-soft: #c4b5fd;
    --glow: #c084fc;
    --pink: #d14dff;
    --grad: linear-gradient(90deg, #4f2dff 0%, #9d3bff 55%, #d14dff 100%);
    --grad-text: linear-gradient(95deg, #7c5cff 0%, #b14dff 50%, #ef8cff 100%);

    --bg: #05040d;
    --bg1: #0a0819;
    --bg2: #0f0c22;
    --text: #f7f5ff;
    --text-2: #c9c2e3;
    --text-dim: #8b84a9;
    --line: rgba(167, 139, 250, 0.12);
    --line-strong: rgba(167, 139, 250, 0.24);
    --glass: rgba(140, 110, 255, 0.04);
    --glass-2: rgba(140, 110, 255, 0.07);

    --font-head: 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
}
body {
    background:
        radial-gradient(ellipse 60% 45% at 100% 0%, rgba(147, 3, 197, .16), transparent 60%) fixed,
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(79, 45, 255, .12), transparent 60%) fixed,
        var(--bg);
}
/* quiet grid instead of noise; violet sparks */
.grain { opacity: 1; background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%); }
.ambient .b1 { background: radial-gradient(circle, rgba(147, 3, 197, .32), transparent 70%); }
.ambient .b2 { background: radial-gradient(circle, rgba(79, 45, 255, .26), transparent 70%); }
.ambient .b3 { background: radial-gradient(circle, rgba(209, 77, 255, .18), transparent 70%); }
#cursorGlow { background: radial-gradient(circle, rgba(157, 59, 255, .12), transparent 62%); }

/* sidebar */
.sidebar { background: linear-gradient(180deg, rgba(12, 9, 28, .85), rgba(7, 5, 18, .92)); }
.brand img { filter: hue-rotate(262deg) saturate(.75) brightness(2.3) drop-shadow(0 0 14px rgba(157, 59, 255, .45)); }
.brand .brand-text b { font-weight: 700; }
.nav a.active { background: linear-gradient(90deg, rgba(157, 59, 255, .22), rgba(79, 45, 255, .05)); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .28); }
.nav a.active::before { background: var(--grad); box-shadow: 0 0 14px rgba(157, 59, 255, .8); }
.nav a { transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease); }
.nav a:hover { transform: translateX(2px); }
.mobilebar img { filter: hue-rotate(262deg) saturate(.75) brightness(2.3); }
.mobilebar { background: rgba(7, 5, 18, .8); }

/* page headings in the site's display face */
.page-head h1 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; font-size: 40px; line-height: 1; }
.page-head h1 em, .gradient-word { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.inline-edit { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; font-size: 36px; }
.card-head h2 { font-weight: 700; }

/* cards: glass with a gradient ring on hover */
.card { background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%), rgba(14, 11, 32, .72); }
.card::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0;
    background: linear-gradient(140deg, rgba(79,45,255,.7), rgba(157,59,255,.35) 40%, transparent 60%, rgba(209,77,255,.5));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    transition: opacity .35s var(--ease); }
a.card:hover::after, .stat:hover::after { opacity: 1; }
.stat::after { width: 100%; height: 100%; top: 0; right: 0; border-radius: inherit; inset: -1px; }
.stat::before { content: ''; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(var(--tint, var(--accent1-rgb)), .22), transparent 70%); }
.stat .value { font-family: var(--font-display); font-weight: 400; font-size: 46px; letter-spacing: .01em; }

/* buttons: gradient primary with the moving sweep from the site */
.btn.primary { border-color: rgba(255,255,255,.18); background-image: linear-gradient(90deg, #4f2dff 0%, #9d3bff 30%, #d14dff 50%, #9d3bff 70%, #4f2dff 100%);
    background-size: 200% 100%; background-position: 0 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 10px 30px -10px rgba(157, 59, 255, .95);
    transition: background-position .7s var(--ease), transform .2s var(--ease), box-shadow .3s; }
.btn.primary:hover { background-position: 100% 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 14px 38px -10px rgba(157, 59, 255, 1); }
.btn:active { transform: scale(.97); }
.btn:not(.primary):not(.approve):not(.danger):hover { border-color: rgba(196, 181, 253, .35); }

/* inputs, tabs, tables */
input:focus, select:focus, textarea:focus { border-color: rgba(157, 59, 255, .65); box-shadow: 0 0 0 4px rgba(157, 59, 255, .16); }
.tabs a.active { background: var(--grad); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 6px 18px -8px rgba(157,59,255,.9); }
.tabs a.active b { background: rgba(255,255,255,.22); color: #fff; }
tbody tr:hover { background: rgba(157, 59, 255, .05); }
.chip { background: rgba(140, 110, 255, .07); }
.bar i { background: var(--grad); box-shadow: 0 0 14px rgba(157, 59, 255, .55); }
.pill.owner { --c: 192, 132, 252; }
.queue-item .t a:hover { color: var(--glow); }
.toast { background: rgba(14, 11, 32, .95); }
.modal { background: rgba(14, 11, 32, .96); }

/* sign-in: big display title, gradient frame, glowing pill shapes like the site */
.login-card { z-index: 1; width: min(440px, 100%); padding: 40px 36px 32px; background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 40%), rgba(12, 9, 28, .78); }
.login-card::before { background: linear-gradient(150deg, rgba(79,45,255,.85), rgba(157,59,255,.35) 35%, transparent 55%, transparent 70%, rgba(209,77,255,.6)); }
.login-card .mark { height: 50px; filter: hue-rotate(262deg) saturate(.75) brightness(2.3) drop-shadow(0 0 22px rgba(157, 59, 255, .55)); }
.login-card h1 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 38px; letter-spacing: .01em; line-height: 1; }
.login-card h1 span { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pills { position: fixed; bottom: -90px; display: flex; gap: 22px; align-items: flex-end; pointer-events: none; z-index: 0; opacity: .7; }
.pills.l { left: 5%; transform: rotate(-14deg); }
.pills.r { right: 5%; transform: rotate(14deg) scaleX(-1); }
.pills i { display: block; width: 58px; border-radius: 999px; animation: float-pills 8s ease-in-out infinite;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 10px 24px rgba(255,255,255,.08), 0 30px 60px -20px rgba(157,59,255,.7); }
.pills i:nth-child(1) { height: 280px; background: linear-gradient(180deg, #0d0730, #2a19a8 28%, #7c3aed 48%, #d35cf0 64%, #5a2a9a 86%, #1a0b3a); }
.pills i:nth-child(2) { height: 360px; animation-delay: -2.5s; background: linear-gradient(180deg, #2a0d5c, #6d28d9 26%, #c04df5 48%, #f0a0f5 60%, #a855c7 74%, #2a1240); }
.pills i:nth-child(3) { height: 240px; animation-delay: -5s; background: linear-gradient(180deg, #130838, #3b1bd6 32%, #8b3cf0 52%, #d75cf2 66%, #6b2fa8 86%, #2a1a6a); }
@keyframes float-pills { 50% { translate: 0 -16px; } }
@media (max-width: 900px) { .pills { display: none; } }

@media (max-width: 880px) { .page-head h1, .inline-edit { font-size: 32px; } }


/* team table: the reset button turns icon-only below 1500px so it is not clipped */
@media (max-width: 1500px) { .cell-server { min-width: 180px; } .cell-server .t b { max-width: 150px; } td.actions .btn { margin-left: 2px; } th, td { padding-left: 11px; padding-right: 11px; } td.actions .btn.sm[data-team-reset] { font-size: 0; gap: 0; width: 34px; height: 32px; padding: 0; } td.actions .btn.sm[data-team-reset] svg { width: 16px; height: 16px; } }


/* ==========================================================================================
   Portfolio motion & 3D (2026-10-17): sparks, progress, rings, word reveal, 3D login hero.
   ========================================================================================== */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
#particles { display: none; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 70; background: var(--grad); transform-origin: left; transform: scaleX(0);
    box-shadow: 0 0 12px rgba(157, 59, 255, .8); pointer-events: none; }

/* rotating gradient ring (same as the portfolio) */
.ring { position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; z-index: 3;
    background: conic-gradient(from var(--ang), transparent 0 50%, #4f2dff 62%, #c084fc 76%, #ef8cff 84%, transparent 96%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    animation: ring-spin 3.6s linear infinite; animation-play-state: paused; transition: opacity .45s var(--ease); }
.btn, .tabs, .queue-item { position: relative; }
:hover > .ring, :focus-visible > .ring { opacity: 1; animation-play-state: running; }
.card::after { display: none; }
.queue-item > .ring { border-radius: 0; }
@keyframes ring-spin { to { --ang: 360deg; } }

/* page titles rise word by word */
.page-head h1 .w, .login-hero h2 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.page-head h1 .w > *, .login-hero h2 .w > * { display: inline-block; animation: word-up .95s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes word-up { from { transform: translateY(108%); } }

/* entrance */
.enter { animation: enter .75s var(--ease) both; animation-delay: calc(var(--d, 0) * 55ms); }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }

/* buttons: magnetic translate eases back */
.btn { transition: transform .2s var(--ease), box-shadow .3s, background .25s, background-position .7s var(--ease), border-color .25s, opacity .2s, translate .35s var(--ease); }

/* stat cards lift; icons spring */
a.stat:hover { transform: translateY(-4px); }
.nav a svg { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), opacity .25s, color .25s; }
.nav a:hover svg { transform: rotate(-8deg) scale(1.12); }

/* overview header cube */
.page-head { position: relative; }
.head-art { position: absolute; right: 160px; top: -40px; width: 220px; height: 170px; pointer-events: none; }
.head-art canvas, .login-hero canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1s var(--ease); }
.head-art canvas.on, .login-hero canvas.on { opacity: 1; }
@media (max-width: 1100px) { .head-art { display: none; } }

/* login: 3D hero on the left, card on the right */
.login-shell { grid-template-columns: minmax(0, 1.1fr) minmax(0, 440px); gap: clamp(20px, 4vw, 70px); max-width: 1180px; margin: 0 auto; align-items: center; }
.pills.l { display: none; }
.login-hero { position: relative; height: min(620px, 82vh); display: grid; align-items: end; }
.login-hero canvas { position: absolute; left: -8%; top: -4%; width: 116%; height: 66%; }
.hero-copy { position: relative; z-index: 1; max-width: 460px; }
.hero-copy .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 12px; color: var(--text-2);
    border: 1px solid rgba(196, 181, 253, .28); background: rgba(79, 45, 255, .12); margin-bottom: 14px; }
.hero-copy .eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(var(--ok-rgb), .2); }
.login-hero h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(40px, 4.6vw, 64px); line-height: .95; letter-spacing: .01em; }
.login-hero h2 em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p { margin: 0; color: var(--text-2); font-size: 15px; max-width: 400px; }
@media (max-width: 940px) {
    .login-shell { grid-template-columns: minmax(0, 440px); justify-content: center; }
    .login-hero { width: 100%; height: 260px; }
    .login-hero canvas { left: -10%; top: 0; width: 120%; height: 100%; }
    .hero-copy { display: none; }
}
@media (max-width: 520px) { .login-hero { height: 220px; } }
