/* ==========================================================================
   Alternator — game panel interface
   Dark icon rail + second panel, framed page, Geist type. Light and dark.
   ========================================================================== */

@font-face {
    font-family: "DM Sans";
    src: url("../vendor/dmsans/DMSans-Variable.woff") format("woff");
    font-weight: 100 1000; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Geist";
    src: url("../vendor/geist/Geist-Variable.woff2") format("woff2-variations"), url("../vendor/geist/Geist-Variable.woff2") format("woff2");
    font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Geist Mono";
    src: url("../vendor/geist/GeistMono-Variable.woff2") format("woff2-variations"), url("../vendor/geist/GeistMono-Variable.woff2") format("woff2");
    font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
    --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --frame: 18px;
    --radius: 10px;

    --bg: #f2f2f4;
    --surface: #ffffff;
    --surface-2: #f4f4f6;
    --surface-3: #eaeaee;
    --line: #e6e6ea;
    --line-strong: #d6d6dc;
    --text: #0b0b0d;
    --text-2: #55555f;
    --text-3: #8a8a94;
    --accent: #1f6bff;
    --accent-2: #155ce8;
    --accent-soft: #e8f0ff;
    --on-accent: #ffffff;
    --good: #16a34a; --good-soft: #e7f7ec;
    --warn: #c2620c; --warn-soft: #fdf0e3;
    --bad: #dc2626; --bad-soft: #fdeaea;
    --rail: #0e0e10;
    --console: #0b0b0c;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #0a0a0a;
    --surface: #111112;
    --surface-2: #18181a;
    --surface-3: #212124;
    --line: #1f1f22;
    --line-strong: #2c2c30;
    --text: #f4f4f5;
    --text-2: #a3a3ab;
    --text-3: #6f6f78;
    --accent: #2f7bff;
    --accent-2: #1f6bff;
    --accent-soft: rgba(47, 123, 255, .14);
    --good: #22c55e; --good-soft: rgba(34, 197, 94, .12);
    --warn: #f59e0b; --warn-soft: rgba(245, 158, 11, .12);
    --bad: #f05252; --bad-soft: rgba(240, 82, 82, .12);
    --rail: #0f0f10;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--font); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: #f5d90a; color: #111; }

/* ---------- Shell ---------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--side-w, 72px) minmax(0, 1fr); min-height: 100vh; }
.shell:has(> .side.has-sub) { --side-w: 320px; }
.side { position: sticky; top: 0; z-index: 50; display: flex; gap: 10px; height: 100vh; padding: 10px 0 10px 10px; }
.rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 62px; height: 100%; padding: 12px 0; border-radius: var(--frame); background: var(--rail); color: #8d8d96; }
:root[data-theme="dark"] .rail { box-shadow: inset 0 0 0 1px var(--line); }
.rail-mark svg { width: 100%; height: 100%; }
.rail-mark.has-img { background: transparent; overflow: hidden; }
.rail-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.auth-brand .wordmark { display: block; height: 22px; width: auto; color: #fff; }
.rail-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.04em; }
.rail-nav { display: grid; gap: 10px; margin-top: 26px; }
.rail-ico { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #8d8d96; font-size: 17px; cursor: pointer; }
.rail-ico.is-active { background: var(--accent); color: #fff; }
.rail-foot { display: grid; justify-items: center; gap: 10px; margin-top: auto; }
.rail-me .avatar { width: 32px; height: 32px; font-size: 12px; }

.sub { display: none; flex: none; width: 238px; height: 100%; padding: 16px 12px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--frame); background: var(--surface); scrollbar-width: thin; }
.side.has-sub .sub { display: block; }
.sub-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 14px 8px; }
.sub-head strong { flex: 1; min-width: 0; overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sub-back { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 12px; }
.sub-title { margin: 2px 8px 10px; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.sub-server { display: grid; gap: 2px; margin: 0 8px 14px; }
.sub-server strong { overflow: hidden; font-size: 16px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sub-server small { color: var(--text-3); font-size: 12px; }
.sub-sec { padding: 14px 8px 6px; color: var(--text-3); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.sub-item { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 8px; border-radius: 10px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.sub-item-ico { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; }
.sub-item span:not(.sub-item-ico) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-item.is-active { background: var(--surface-2); font-weight: 600; }
.sub-item.is-active .sub-item-ico { background: var(--text); color: var(--surface); }

.main { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 10px 10px 10px 12px; }
.top { position: sticky; top: 10px; z-index: 40; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 10px 0 22px; border: 1px solid var(--line); border-radius: var(--frame); background: var(--surface); }
.top-title { flex: 1; min-width: 0; overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.top .top-menu-btn { display: none; }
.content { flex: 1; padding: 36px max(clamp(22px, 3vw, 44px), calc((100% - 1320px) / 2)) 72px; border: 1px solid var(--line); border-radius: var(--frame); background: var(--surface); }
.scrim { display: none; }

/* ---------- Page head ---------------------------------------------------------- */
.head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.03em; }
.head p { margin: 6px 0 0; color: var(--text-2); max-width: 70ch; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.head-actions > .input-group { flex: 0 1 300px; min-width: 200px; }
.head-actions > .tabs { margin: 0; }
.h2 { margin: 0 0 14px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }

/* ---------- Buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.btn i { font-size: 12px; }
.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.btn-soft { border-color: transparent; background: var(--surface-2); }
.btn-danger { border-color: var(--bad); background: var(--bad); color: #fff; }
.btn-danger-soft { border-color: transparent; background: var(--bad-soft); color: var(--bad); }
.btn-good { border-color: var(--good); background: var(--good); color: #fff; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.round { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 14px; cursor: pointer; }

/* ---------- Forms -------------------------------------------------------------- */
.field { display: grid; gap: 6px; }
.label { color: var(--text); font-size: 13px; font-weight: 600; }
.label small { color: var(--text-3); font-weight: 400; }
.hint { color: var(--text-3); font-size: 12.5px; line-height: 1.45; }
.input, .select, .textarea { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--text); font-size: 14px; outline: none; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.textarea.code, .input.code { font-family: var(--mono); font-size: 12.5px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238a8a94' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select[multiple] { min-height: 140px; padding-right: 12px; background-image: none; }
.error { color: var(--bad); font-size: 12.5px; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--bad); }
.check { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 13.5px; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.check strong { color: var(--text); font-weight: 600; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.input-group { display: flex; }
.input-group .input { border-radius: 9px 0 0 9px; }
.input-group > span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 9px 9px 0; background: var(--surface-2); color: var(--text-3); font-size: 12.5px; white-space: nowrap; }

/* ---------- Cards, tables, badges ------------------------------------------------ */
.card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }
.card + .card, .card + .stack, .stack + .card { margin-top: 16px; }
.grid > *, .cols > *, .stack > *, .vars > * { min-width: 0; margin-top: 0 !important; }
.stack { display: grid; gap: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
:root[data-theme="dark"] .card { background: #111112; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; font-weight: 500; text-align: left; white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td strong, .table td .t1 { color: var(--text); font-weight: 600; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * + * { margin-left: 6px; }
.table .actions form { display: inline; }
.row-link { position: relative; }
.row-link a.stretch::after { content: ""; position: absolute; inset: 0; }
.nowrap { white-space: nowrap; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge[data-tone="good"] { background: var(--good-soft); color: var(--good); }
.badge[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); }
.badge[data-tone="bad"] { background: var(--bad-soft); color: var(--bad); }
.badge[data-tone="info"] { background: var(--accent-soft); color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 500; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: 13.5px; }
.alert i { margin-top: 3px; }
.alert[data-tone="bad"] { background: var(--bad-soft); color: var(--bad); }
.alert[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); }
.alert[data-tone="good"] { background: var(--good-soft); color: var(--good); }
.alert[data-tone="info"] { background: var(--accent-soft); color: var(--accent); }
.alert + * { margin-top: 16px; }

.empty { display: grid; justify-items: center; gap: 8px; padding: 56px 20px; text-align: center; }
.empty-ico { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); font-size: 19px; }
.empty strong { font-size: 15px; }
.empty p { max-width: 46ch; margin: 0; color: var(--text-2); font-size: 13.5px; }

.avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 22px; padding: 4px; border-radius: 12px; background: var(--surface-2); width: fit-content; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 9px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.tabs a.is-active { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }

.copy { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-family: var(--mono); font-size: 12.5px; cursor: pointer; overflow-wrap: anywhere; text-align: left; }
.copy i { color: var(--text-3); font-size: 11px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 0; color: var(--text-2); font-size: 13px; }
.pager nav { display: flex; gap: 6px; }

/* ---------- Dialogs, menus, toasts ------------------------------------------------ */
dialog.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .5); }
dialog.modal.wide { width: min(820px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(0, 0, 0, .55); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 4px; }
.modal-head h2 { font-size: 19px; font-weight: 600; }
.modal-body { padding: 14px 24px 8px; }
.modal-body > p:first-child { margin-top: 0; color: var(--text-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; }

.menu { position: relative; display: inline-block; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 210px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .3); }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 13.5px; text-align: left; cursor: pointer; }
.menu-pop i { width: 16px; color: var(--text-3); font-size: 12px; text-align: center; }
.menu-pop .danger, .menu-pop .danger i { color: var(--bad); }
.menu-pop hr { margin: 5px 4px; border: 0; border-top: 1px solid var(--line); }
.menu-pop form { margin: 0; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 12px 16px; border-radius: 12px; background: #16161a; color: #fff; font-size: 13.5px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5); animation: toast-in .2s ease-out; }
.toast i { color: #4ade80; }
.toast[data-tone="bad"] i { color: #f87171; }
.toast[data-tone="warn"] i { color: #fbbf24; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Server list ---------------------------------------------------------- */
.servers { display: grid; gap: 10px; }
.srv { position: relative; display: grid; grid-template-columns: auto minmax(0, 1.6fr) repeat(3, minmax(90px, .6fr)) auto; align-items: center; gap: 22px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
:root[data-theme="dark"] .srv { background: #111112; }
.srv-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--surface-2); color: var(--text-2); font-size: 17px; }
.srv-main { display: grid; gap: 2px; min-width: 0; }
.srv-main strong { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.srv-main small { overflow: hidden; color: var(--text-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.srv-stat { display: grid; gap: 2px; font-size: 12px; color: var(--text-3); }
.srv-stat b { color: var(--text); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.srv a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.state { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.state[data-state="running"]::before { background: var(--good); }
.state[data-state="starting"]::before, .state[data-state="stopping"]::before, .state[data-state="installing"]::before, .state[data-state="restoring_backup"]::before { background: var(--warn); }
.state[data-state="offline"]::before { background: var(--bad); }
.state[data-state="unreachable"]::before, .state[data-state="install_failed"]::before, .state[data-state="suspended"]::before { background: var(--bad); }

/* ---------- Console --------------------------------------------------------------- */
.con-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.con-title { display: grid; gap: 4px; min-width: 0; }
.con-title h1 { overflow: hidden; font-size: 26px; font-weight: 600; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.con-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-3); font-size: 12.5px; }
.power { display: flex; gap: 8px; }
.con-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.terminal { display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: var(--console); }
.terminal-screen { height: min(62vh, 560px); padding: 12px 0 6px 14px; }
.terminal .xterm-screen { max-width: 100%; }
.terminal-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-top: 1px solid #1d1d20; color: #8d8d96; }
.terminal-input input { flex: 1; height: 46px; border: 0; background: transparent; color: #f4f4f5; font-family: var(--mono); font-size: 13px; outline: none; }
.terminal-input input:disabled { opacity: .5; }
.terminal .xterm { height: 100%; }
.terminal .xterm-viewport { scrollbar-width: thin; scrollbar-color: #333 transparent; }
.stats { display: grid; gap: 10px; }
.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
:root[data-theme="dark"] .stat { background: #111112; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-3); font-size: 12px; }
.stat-top i { width: 14px; text-align: center; }
.stat b { display: block; margin-top: 4px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat b small { color: var(--text-3); font-size: 12px; font-weight: 500; }
.stat canvas { display: block; width: 100%; height: 36px; margin-top: 8px; }
.eula { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

/* ---------- Files --------------------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-family: var(--mono); font-size: 13px; }
.crumbs a, .crumbs span { padding: 4px 6px; border-radius: 6px; }
.crumbs a { color: var(--text-2); }
.crumbs .sep { padding: 0; color: var(--text-3); }
.files { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.files th { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text-3); font-size: 12px; font-weight: 500; text-align: left; }
.files td { padding: 0 14px; height: 46px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.files tr:last-child td { border-bottom: 0; }
.files .f-check { width: 40px; }
.files .f-name { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); font-weight: 500; }
.files .f-name i { width: 18px; color: var(--text-3); text-align: center; }
.files .f-name .fa-folder { color: #e0a100; }
.files .f-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files tr.is-selected td { background: var(--accent-soft); }
.files .f-size, .files .f-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bulk { position: sticky; bottom: 18px; z-index: 30; display: flex; align-items: center; gap: 10px; width: fit-content; margin: 16px auto 0; padding: 8px 8px 8px 18px; border-radius: 999px; background: #16161a; color: #fff; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5); font-size: 13px; }
.bulk .btn { border-color: #2c2c30; background: #232327; color: #fff; }
.drop { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(15, 15, 18, .72); color: #fff; font-size: 18px; font-weight: 600; pointer-events: none; }
.drop div { display: grid; justify-items: center; gap: 10px; padding: 40px 60px; border: 2px dashed rgba(255, 255, 255, .5); border-radius: 20px; }
.uploads { display: grid; gap: 8px; margin-bottom: 14px; }
.upload { display: grid; gap: 6px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.upload-bar { height: 4px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.upload-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.editor { height: calc(100vh - 260px); min-height: 380px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }

/* ---------- Misc blocks ------------------------------------------------------------ */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
:root[data-theme="dark"] .tile { background: #111112; }
.tile span { color: var(--text-3); font-size: 12.5px; }
.tile b { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile small { color: var(--text-3); font-size: 12px; }
.meter { height: 6px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.perm-group { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.perm-group h3 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13.5px; font-weight: 600; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.code-block { margin: 0; padding: 16px 18px; overflow: auto; border-radius: 10px; background: var(--console); color: #e4e4e7; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; white-space: pre; }
.steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { min-width: 0; position: relative; padding-left: 40px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); font-size: 12px; font-weight: 700; }
.task { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font-size: 12px; font-weight: 700; }
.cron { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 12px; }
.cron span { padding: 3px 8px; border-radius: 6px; background: var(--surface-2); }
.var { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; }
.var h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.var p { margin: 0 0 12px; color: var(--text-2); font-size: 13px; }
.vars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* ---------- Sign-in ----------------------------------------------------------------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; padding: 10px; gap: 10px; background: var(--bg); }
.auth-art { position: relative; overflow: hidden; border-radius: 22px; background: #0b0b0e; color: #fff; }
.auth-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-art-copy { position: absolute; left: 44px; right: 44px; bottom: 40px; z-index: 1; }
.auth-art-copy h2 { font-size: clamp(28px, 3vw, 42px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.auth-art-copy p { max-width: 42ch; margin: 12px 0 0; color: rgba(255, 255, 255, .7); }
.auth-brand { position: absolute; left: 44px; top: 36px; z-index: 1; display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; }
.auth-brand .rail-mark { width: 34px; height: 34px; font-size: 15px; }
.auth-wordmark { display: block; max-height: 30px; max-width: 220px; width: auto; }
.auth-line { display: block; }
.rotator { position: relative; display: inline-block; height: 1.18em; overflow: hidden; vertical-align: bottom; white-space: nowrap; color: var(--art, #2f7bff); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.rotator-word { display: inline-block; white-space: nowrap; }
.rotator.is-slide .rotator-word, .rotator.is-fade .rotator-word { position: absolute; left: 0; top: 0; transition: transform .65s cubic-bezier(.2, .8, .2, 1), opacity .5s ease; }
.rotator.is-slide .rotator-word.is-in { transform: translateY(105%); }
.rotator.is-slide .rotator-word.is-out { transform: translateY(-105%); }
.rotator.is-fade .rotator-word.is-in { opacity: 0; transform: translateY(.18em); }
.rotator.is-fade .rotator-word.is-out { opacity: 0; transform: translateY(-.18em); }
.rotator.is-type { transition: width .08s linear; overflow: visible; }
.rotator.is-type::after { content: ""; position: absolute; right: -.08em; top: .12em; bottom: .1em; width: .06em; background: currentColor; animation: caret 1s steps(1) infinite; }
.rotator-measure { position: absolute; visibility: hidden; }
@keyframes caret { 50% { opacity: 0; } }
.auth-side { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(400px, 100%); }
.auth-card h1 { font-size: 30px; font-weight: 600; letter-spacing: -.03em; }
.auth-card > p { margin: 8px 0 28px; color: var(--text-2); }
.auth-card form { display: grid; gap: 16px; }
.auth-card .btn-primary { height: 44px; margin-top: 4px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.auth-links a { color: var(--accent); font-weight: 600; }
.otp { letter-spacing: .5em; text-align: center; font-family: var(--mono); font-size: 22px; }

/* ---------- Responsive ---------------------------------------------------------------- */
@media (max-width: 1100px) {
    .con-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cols { grid-template-columns: 1fr; }
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .srv { grid-template-columns: auto minmax(0, 1fr) auto; }
    .srv .srv-stat { display: none; }
}
@media (max-width: 980px) {
    .shell, .shell:has(> .side.has-sub) { grid-template-columns: minmax(0, 1fr); }
    .side { position: fixed; left: 0; top: 0; padding: 8px; transform: translateX(-104%); transition: transform .25s ease; }
    body.nav-open .side { transform: none; }
    body.nav-open .scrim { position: fixed; inset: 0; z-index: 45; display: block; background: rgba(0, 0, 0, .5); }
    .main { padding: 8px; }
    .top { top: 8px; padding: 0 8px; }
    .top .top-menu-btn { display: grid; }
    .content { padding: 24px 18px 56px; }
    .auth { grid-template-columns: 1fr; }
    .auth-art { display: none; }
}
@media (max-width: 720px) {
    .grid-2, .grid-3, .grid-4, .vars, .perm-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .stats { grid-template-columns: 1fr 1fr; }
    .head h1 { font-size: 24px; }
    .files .f-date, .files th.f-date { display: none; }
}

/* ---- Settings: branding + sign-in editor ------------------------------------------------------- */
.upload-row { display: flex; align-items: flex-start; gap: 16px; }
.upload-thumb { display: grid; place-items: center; flex: none; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--text); }
.upload-thumb.is-square { width: 72px; height: 72px; }
.upload-thumb.is-square svg { width: 100%; height: 100%; padding: 6px; color: #fff; background: var(--accent); }
.upload-thumb.is-wide { width: 168px; height: 72px; padding: 10px; background: #0b0b0e; }
.upload-thumb img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.upload-actions { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.brand-preview { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 9px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.color-field { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.color-field input[type="color"] { width: 32px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 7px; }
.range { width: 100%; height: 42px; accent-color: var(--accent); }
.signin-editor { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.signin-preview { position: sticky; top: 96px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.signin-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 600; }
.signin-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0b0e; }
.signin-frame iframe { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .5)); pointer-events: none; }
@media (max-width: 1100px) { .signin-editor { grid-template-columns: 1fr; } .signin-preview { position: static; } }

/* ---- Flags + country picker ------------------------------------------------------------------- */
.flag { display: inline-block; flex: none; width: 20px; height: 15px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(127, 127, 127, .22); vertical-align: -2px; }
.flag-lg { width: 44px; height: 33px; border-radius: 6px; }
.flag-none { background: var(--surface-2); }
.cpick { position: relative; }
.cpick-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer; }
.cpick-pop { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 40px rgba(0, 0, 0, .28); }
.cpick-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.cpick-search input { flex: 1; height: 44px; border: 0; outline: 0; background: none; color: var(--text); font: inherit; }
.cpick-list { max-height: 260px; overflow-y: auto; padding: 6px; }
.cpick-list button { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.cpick-list button .mono { margin-left: auto; font-size: 11.5px; }
.cpick-list button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.cpick-list button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cpick-list button[hidden] { display: none; }
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.loc { position: relative; display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.loc-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.loc-top strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-top small { color: var(--text-3); font-size: 12.5px; }
.loc-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.loc-nums div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.loc-nums span { display: block; color: var(--text-3); font-size: 11.5px; }
.loc-nums b { font-size: 17px; font-weight: 650; }
.loc-actions { display: flex; gap: 6px; justify-content: flex-end; }
.loc-chip { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }

/* ---- Players ------------------------------------------------------------------------------------ */
.pl-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; margin-bottom: 16px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.pl-label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.pl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.pl-dot[data-on="1"] { background: var(--good); }
.pl-big { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 8px; }
.pl-big b { font-size: 46px; font-weight: 650; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.pl-big > span { color: var(--text-3); font-size: 18px; font-weight: 500; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: 12.5px; }
.pl-meta span { display: inline-flex; align-items: center; gap: 6px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta i { color: var(--text-3); font-size: 11px; }
.pl-spark { display: grid; gap: 6px; align-self: stretch; min-width: 0; }
.pl-spark canvas { width: 100%; height: 70px; border-bottom: 1px dashed var(--line); }
.pl-tools { display: flex; gap: 8px; align-self: start; }
.pl-head { gap: 12px; flex-wrap: wrap; }
.pl-search { flex: 0 1 260px; }
.pl-add { display: flex; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.pl-add .input { max-width: 320px; }
.pl-list { display: grid; }
.pl-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.pl-row:last-child { border-bottom: 0; }
.pl-ava { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-weight: 650; image-rendering: pixelated; object-fit: cover; }
.pl-who { display: grid; gap: 2px; min-width: 0; }
.pl-who strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pl-who small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pl-tag { display: inline-flex; height: 18px; align-items: center; padding: 0 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; }
.pl-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.pl-empty { display: grid; justify-items: center; gap: 6px; padding: 48px 20px; color: var(--text-3); text-align: center; }
.pl-empty i { margin-bottom: 4px; font-size: 22px; }
.pl-empty strong { color: var(--text); font-size: 14.5px; }
.pl-more { padding: 12px 20px; color: var(--text-3); font-size: 12.5px; }
@media (max-width: 900px) {
    .pl-hero { grid-template-columns: 1fr; gap: 16px; }
    .pl-acts span { display: none; }
}

/* ---- Plugin installer ------------------------------------------------------------------------- */
.pg-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.pg-hero h1 { font-size: 30px; font-weight: 650; letter-spacing: -.03em; }
.pg-hero p { margin: 4px 0 12px; color: var(--text-2); }
.pg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-chips .pill i { color: var(--text-3); font-size: 11px; }
.pg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.pg-q { flex: 1 1 280px; }
.pg-sort { width: auto; flex: 0 0 170px; }
.pg-only { align-items: center; white-space: nowrap; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.pg-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.pg-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 13px; background: var(--surface-2); object-fit: cover; color: var(--text-3); font-size: 20px; }
.pg-body { display: grid; gap: 6px; min-width: 0; }
.pg-title { display: grid; min-width: 0; }
.pg-title strong { overflow: hidden; font-size: 14.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.pg-title small { color: var(--text-3); font-size: 12px; }
.pg-body p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--text-2); font-size: 13px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.9em; }
.pg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.pg-meta { display: flex; gap: 12px; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.pg-meta i { margin-right: 5px; font-size: 11px; }
.pg-card.is-loading .pg-ico { animation: pulse 1.2s ease-in-out infinite; }
.pg-card.is-loading div { display: grid; gap: 8px; align-content: start; }
.pg-card.is-loading i { display: block; height: 11px; border-radius: 6px; background: var(--surface-2); animation: pulse 1.2s ease-in-out infinite; }
.pg-card.is-loading i:nth-child(1) { width: 45%; height: 14px; }
.pg-card.is-loading i:nth-child(2) { width: 90%; }
.pg-card.is-loading i:nth-child(3) { width: 70%; }
@keyframes pulse { 50% { opacity: .45; } }
.pg-empty { display: grid; justify-items: center; gap: 6px; grid-column: 1 / -1; padding: 56px 20px; color: var(--text-3); text-align: center; }
.pg-empty i { margin-bottom: 4px; font-size: 22px; }
.pg-empty strong { color: var(--text); font-size: 14.5px; }
.pg-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.pg-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.pg-row:last-child { border-bottom: 0; }
.pg-row.is-off .pg-row-main, .pg-row.is-off .pg-jar { opacity: .5; }
.pg-jar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.pg-row-main { display: grid; min-width: 0; }
.pg-row-main strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pg-row-main small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.switch { position: relative; display: inline-block; width: 40px; height: 24px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal.modal-wide { width: min(640px, calc(100vw - 32px)); }
.pg-dlg-head { display: flex; align-items: center; gap: 14px; }
.pg-dlg-head .pg-ico { width: 44px; height: 44px; border-radius: 11px; }
.pg-versions { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.pg-ver { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pg-ver:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pg-ver:has(input:disabled) { opacity: .55; cursor: default; }
.pg-ver input { accent-color: var(--accent); }
.pg-ver-main { display: grid; min-width: 0; }
.pg-ver-main strong { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.pg-ver-main small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pg-latest { background: var(--good-soft); color: var(--good); }

/* ---- Egg pictures and banners ------------------------------------------------------------------ */
.egg-img { display: grid; place-items: center; flex: none; width: var(--sz, 44px); height: var(--sz, 44px); overflow: hidden; border-radius: calc(var(--sz, 44px) * .26); background: color-mix(in srgb, var(--egg) 16%, var(--surface-2)); color: var(--egg); font-size: calc(var(--sz, 44px) * .4); }
.egg-img.has-img { background: var(--surface-2); }
.egg-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner { position: relative; overflow: hidden; background: #0d0f14; }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- Egg extensions -------------------------------------------------------------------------- */
.ext-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ext-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.ext-head h2 { font-size: 16px; font-weight: 650; }
.ext-head p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.ext-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 16px; }
.ext-cmds { gap: 10px 14px; }
.ext-sources { display: grid; gap: 8px; }
.ext-source { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.ext-source:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ext-source input { width: 18px; height: 18px; accent-color: var(--accent); }
.ext-source span { display: grid; }
.ext-source small { color: var(--text-3); font-size: 12px; }
.ext-foot { grid-column: 1 / -1; margin: 0; }
.banner-edit { height: 150px; border: 1px solid var(--line); border-radius: 14px; }
@media (max-width: 1100px) { .ext-grid { grid-template-columns: 1fr; } }

/* ---- Server cards --------------------------------------------------------------------------- */
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.srv-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.srv-card-banner { height: 112px; flex: none; }
.srv-card-banner .state { position: absolute; top: 12px; right: 12px; z-index: 1; height: 26px; padding: 0 10px; border-radius: 99px; background: rgba(10, 11, 14, .78); color: #fff; }
.srv-card-body { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 12px; padding: 0 18px; margin-top: -26px; }
.srv-card-egg { box-shadow: 0 0 0 4px var(--surface); }
.srv-card-title { display: grid; min-width: 0; padding-bottom: 2px; }
.srv-card-title strong { overflow: hidden; font-size: 15.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.srv-card-title small { overflow: hidden; color: var(--text-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.srv-card-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 18px 0; color: var(--text-2); font-size: 12.5px; }
.srv-card-info > span { display: inline-flex; align-items: center; gap: 6px; }
.srv-card-info i { color: var(--text-3); font-size: 11px; }
.srv-card-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: auto; padding: 14px 18px 16px; }
.srv-card-stats div { display: grid; gap: 5px; }
.srv-card-stats span { color: var(--text-3); font-size: 11.5px; }
.srv-card-stats b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.srv-card-stats .bar { height: 4px; overflow: hidden; border-radius: 99px; background: var(--surface-2); }
.srv-card-stats .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .4s; }
.srv-card a.stretch::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 18px; }
.srv-card.is-preview { max-width: 360px; }
.srv-card.is-preview .srv-card-body { padding-bottom: 16px; }

/* ---- Console banner ---------------------------------------------------------------------------- */
.con-banner { margin-bottom: 18px; border-radius: 20px; }
.con-banner::after { content: ""; position: absolute; inset: 0; background: rgba(8, 9, 12, .55); }
.con-banner .con-head { position: relative; z-index: 1; min-height: 170px; align-items: flex-end; margin: 0; padding: 22px 24px; }
.con-banner .con-egg { box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.con-banner .con-title { flex: 1; color: #fff; }
.con-banner .con-title h1 { font-size: 28px; }
.con-banner .con-meta { color: rgba(255, 255, 255, .72); }
.con-banner .con-meta .state { color: #fff; }
.con-banner .con-meta .copy { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08); color: #fff; }
.con-banner .loc-chip { color: rgba(255, 255, 255, .85); }
.con-banner .btn-soft { border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .1); color: #fff; }
.stat-link { color: inherit; }

/* ---- Admin overview ---------------------------------------------------------------------------- */
.ov-top { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.ov-top h1 { font-size: 30px; font-weight: 650; letter-spacing: -.03em; }
.ov-top p { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-size: 13px; }
.ov-live { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 99px; background: var(--good-soft); color: var(--good); font-size: 12px; font-weight: 650; }
.ov-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--good); animation: ov-pulse 1.6s ease-in-out infinite; }
@keyframes ov-pulse { 50% { opacity: .25; } }
.ov-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ov-tile { position: relative; display: grid; gap: 4px; align-content: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.ov-tile > span:first-child { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; }
.ov-tile > span:first-child i { font-size: 11px; }
.ov-tile b { font-size: 28px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ov-tile b small { color: var(--text-3); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.ov-tile > small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ov-tile .ov-bar { margin-top: 6px; }
.ov-bar { display: block; height: 5px; overflow: hidden; border-radius: 99px; background: var(--surface-2); }
.ov-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.ov-bar i[data-level="warm"] { background: var(--warn, #f59e0b); }
.ov-bar i[data-level="hot"] { background: var(--bad); }
.ov-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.ov-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.ov-legend { display: flex; gap: 14px; color: var(--text-2); font-size: 12px; }
.ov-legend span, .ov-tip span { display: inline-flex; align-items: center; gap: 6px; }
.ov-legend i, .ov-tip i { width: 10px; height: 3px; border-radius: 2px; }
.ov-chart { position: relative; height: 290px; padding: 4px 10px 10px; }
.ov-chart canvas { width: 100%; height: 100%; cursor: crosshair; }
.ov-tip { position: absolute; top: 14px; display: grid; gap: 4px; min-width: 150px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 12px; pointer-events: none; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .35); }
.ov-top-list { display: grid; }
.ov-srv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); color: inherit; }
.ov-srv:last-child { border-bottom: 0; }
.ov-srv strong { display: block; overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.ov-srv small { color: var(--text-3); font-size: 12px; }
.ov-srv-n { display: grid; justify-items: end; }
.ov-srv-n b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ov-srv .ov-bar { grid-column: 1 / -1; height: 4px; }
.ov-empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 36px 20px; color: var(--text-3); font-size: 13px; }
.ov-machines-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; }
.ov-machines-head h2 { font-size: 17px; font-weight: 650; }
.ov-machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ov-empty-card { grid-column: 1 / -1; }
.ov-machine { display: grid; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: inherit; }
.ov-m-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.ov-m-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); }
.ov-m-dot[data-on="1"] { background: var(--good); }
.ov-m-dot[data-on="0"] { background: var(--bad); }
.ov-m-name { display: grid; min-width: 0; }
.ov-m-name strong { overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.ov-m-name small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ov-m-bars { display: grid; gap: 10px; }
.ov-m-bars > div { display: grid; gap: 6px; }
.ov-m-bars span:first-child { display: flex; justify-content: space-between; color: var(--text-3); font-size: 12px; }
.ov-m-bars b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ov-m-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--text-3); font-size: 12px; }
.ov-m-foot b { color: var(--text); }
.ov-locs, .ov-list { display: grid; }
.ov-loc, .ov-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line); color: inherit; }
.ov-loc { grid-template-columns: auto minmax(0, 1fr); }
.ov-loc:last-child, .ov-item:last-child { border-bottom: 0; }
.ov-loc strong, .ov-item strong { display: block; overflow: hidden; font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ov-loc small, .ov-item small { display: block; overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ov-item > span:nth-child(2) { min-width: 0; }
@media (max-width: 1400px) { .ov-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .ov-row, .ov-row-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .ov-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-tile b { font-size: 22px; } }
.ext-grid > *, .ov-row > *, .loc-grid > *, .srv-grid > *, .ov-machines > *, .pg-grid > *, .signin-editor > * { margin-top: 0 !important; min-width: 0; }
.con-banner .btn-danger-soft { border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .18); color: #fecaca; }
.con-banner .btn:disabled { opacity: .55; }
@media (max-width: 1700px) { .ov-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ext-cmds .field, .grid-2 > .field { margin: 0; }

/* ---- Server: cover, header and dock ------------------------------------------------------------ */
.content.is-server { padding-top: 22px; }
.sv { margin-bottom: 22px; }
.sv-cover { position: relative; height: 200px; overflow: hidden; border-radius: 20px; background: #0d0f14; }
.sv-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sv-cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.sv-head { position: relative; display: flex; align-items: flex-end; gap: 18px; padding: 0 22px; }
.sv-egg { margin-top: -40px; box-shadow: 0 0 0 5px var(--surface); }
.sv-title { flex: 1; display: grid; gap: 8px; min-width: 0; padding-top: 14px; }
.sv-title h1 { overflow: hidden; font-size: 28px; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.sv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sv-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; white-space: nowrap; cursor: default; }
button.sv-chip { cursor: pointer; font-family: var(--mono); }
.sv-chip i { color: var(--text-3); font-size: 11px; }
.sv-chip .flag { width: 18px; height: 13px; }
.sv-state { height: 28px; padding: 0 11px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.sv-state[data-state="running"] { background: var(--good-soft); border-color: transparent; color: var(--good); }
.sv-state[data-state="starting"], .sv-state[data-state="stopping"] { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.sv-state[data-state="starting"]::before, .sv-state[data-state="stopping"]::before { background: var(--warn); animation: ov-pulse 1.2s ease-in-out infinite; }
.sv-power { display: flex; gap: 8px; padding-bottom: 2px; }
.sv-btn { height: 40px; padding: 0 16px; }
.sv-dock { position: sticky; top: 76px; z-index: 30; display: flex; gap: 6px; margin-top: 20px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.sv-dock-in { display: flex; flex: 1; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sv-dock-in::-webkit-scrollbar { display: none; }
.sv-dock a, .sv-more > button { display: inline-flex; flex: none; align-items: center; gap: 9px; height: 38px; padding: 0 14px; border: 0; border-radius: 11px; background: none; color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.sv-dock a i, .sv-more > button i { font-size: 12.5px; }
.sv-dock-in a.is-active, .sv-more > button.is-active { background: var(--text); color: var(--surface); }
.sv-more { flex: none; }
.sv-more .sv-caret { font-size: 9px !important; opacity: .7; }
.sv-more .menu-pop a { height: 36px; padding: 0 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
.sv-more .menu-pop a.is-active { background: var(--surface-2); }
@media (max-width: 900px) {
    .sv-cover { height: 140px; }
    .sv-head { flex-wrap: wrap; padding: 0 6px; }
    .sv-title h1 { font-size: 22px; }
    .sv-power { width: 100%; }
    .sv-power .btn { flex: 1; }
    .sv-dock { top: 72px; }
    .sv-dock a span { display: none; }
    .sv-dock-in a.is-active span { display: inline; }
}

/* ---- Console page ------------------------------------------------------------------------------ */
.terminal-full { border: 1px solid #1d1d20; }
.terminal-full .terminal-screen { height: calc(100vh - 470px); min-height: 380px; }
.terminal-bar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 16px; border-bottom: 1px solid #1d1d20; color: #8d8d96; font-size: 12.5px; }
.terminal-dots { display: inline-flex; gap: 6px; }
.terminal-dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a2a30; }
.terminal-live { margin-left: auto; }
.terminal-live .state { color: #d4d4d8; }

/* ---- EULA dialog ------------------------------------------------------------------------------- */
.eula-dlg { width: min(520px, calc(100vw - 32px)); padding: 0; overflow: hidden; }
.eula-art { position: relative; height: 120px; background: #0d0f14; }
.eula-art img { width: 100%; height: 100%; object-fit: cover; }
.eula-badge { position: absolute; left: 24px; bottom: -26px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: #fff; font-size: 22px; box-shadow: 0 0 0 5px var(--surface); }
.eula-dlg .modal-body { padding-top: 40px; }
.eula-dlg h2 { font-size: 20px; font-weight: 650; }
.eula-dlg p { margin: 8px 0 14px; color: var(--text-2); line-height: 1.55; }
.eula-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 13.5px; }

/* ---- Server overview (analytics) ------------------------------------------------------------- */
.an-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.an-kpi { position: relative; display: grid; gap: 2px; align-content: start; min-height: 150px; overflow: hidden; padding: 16px 18px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: inherit; }
.an-kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.an-kpi-top i { font-size: 12px; }
.an-kpi b { margin-top: 6px; font-size: 30px; font-weight: 650; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.an-kpi small { color: var(--text-3); font-size: 12px; }
.an-kpi canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 56px; }
.an-main { margin-bottom: 14px; }
.an-main-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 18px 20px 6px; }
.an-main-head h2 { font-size: 17px; font-weight: 650; }
.an-main-head p { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-size: 12.5px; }
.an-live { display: inline-flex; align-items: center; gap: 7px; height: 22px; padding: 0 9px; border-radius: 99px; background: var(--good-soft); color: var(--good); font-size: 11.5px; font-weight: 650; }
.an-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); animation: ov-pulse 1.6s ease-in-out infinite; }
.an-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.an-legend { display: flex; flex-wrap: wrap; gap: 4px; }
.an-legend button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 99px; background: none; color: var(--text-3); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.an-legend button i { width: 10px; height: 10px; border-radius: 3px; opacity: .35; transition: opacity .2s; }
.an-legend button.is-on { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.an-legend button.is-on i { opacity: 1; }
.an-chart { position: relative; height: 320px; padding: 4px 10px 10px; }
.an-chart canvas { width: 100%; height: 100%; cursor: crosshair; }
.an-tip, .ov-tip { position: absolute; top: 14px; z-index: 2; display: grid; gap: 5px; min-width: 170px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-size: 12px; pointer-events: none; box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .45); }
.an-tip span, .ov-tip span { display: flex; align-items: center; gap: 8px; }
.an-tip i, .ov-tip i { width: 8px; height: 8px; border-radius: 2px; }
.an-tip em, .ov-tip em { margin-left: auto; padding-left: 14px; font-style: normal; font-weight: 650; font-variant-numeric: tabular-nums; }
.an-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.an-row > * { margin: 0 !important; min-width: 0; }
.an-card { display: flex; flex-direction: column; }
.an-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 18px 18px; }
.an-player { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.an-player strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.an-ava { display: grid; place-items: center; flex: none; width: 30px; height: 30px; overflow: hidden; border-radius: 8px; background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 700; }
.an-ava img { width: 100%; height: 100%; image-rendering: pixelated; }
.an-more, .an-empty { grid-column: 1 / -1; padding: 10px 2px; color: var(--text-3); font-size: 13px; }
.an-console-card .an-console { flex: 1; min-height: 200px; max-height: 260px; margin: 0 14px 14px; padding: 12px 14px; overflow: auto; border-radius: 12px; background: var(--console); color: #d4d4d8; font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.an-info { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; margin: 0; padding: 16px 20px 20px; font-size: 13px; }
.an-info dt { color: var(--text-3); }
.an-info dd { margin: 0; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.an-info .copy { padding: 3px 8px; font-size: 12px; }
@media (max-width: 1100px) { .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .an-kpis { grid-template-columns: 1fr; } .an-chart { height: 240px; } }

/* ---- Server properties (Minecraft) ------------------------------------------------------------- */
.mp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; margin-bottom: 14px; }
.mp-preview-wrap, .mp-editor { display: grid; gap: 14px; align-content: start; padding: 20px; }
.mp-editor { border-left: 1px solid var(--line); }
.mp-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.mp-head h2 { font-size: 16px; font-weight: 650; }
.mp-preview { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: #121212; box-shadow: inset 0 0 0 1px #262626; }
.mp-icon { position: relative; flex: none; width: 72px; height: 72px; padding: 0; overflow: hidden; border: 0; border-radius: 6px; background: #000; cursor: pointer; }
.mp-icon img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.mp-icon-edit { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; transition: opacity .2s; }
.mp-icon:focus-visible .mp-icon-edit, .mp-icon.is-drop .mp-icon-edit, .mp-icon.is-busy .mp-icon-edit { opacity: 1; }
.mp-icon.is-busy .mp-icon-edit i::before { content: "\f110"; }
.mp-icon.is-busy .mp-icon-edit i { animation: fa-spin 1s linear infinite; }
.mp-entry { display: grid; gap: 4px; min-width: 0; flex: 1; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; letter-spacing: .01em; }
.mp-row { display: flex; justify-content: space-between; gap: 10px; }
.mp-name { overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.mp-count { display: inline-flex; align-items: center; gap: 8px; color: #aaa; white-space: nowrap; }
.mp-bars { display: inline-flex; align-items: flex-end; gap: 1px; height: 12px; }
.mp-bars i { width: 2px; background: #55ff55; }
.mp-bars i:nth-child(1) { height: 4px; } .mp-bars i:nth-child(2) { height: 6px; } .mp-bars i:nth-child(3) { height: 8px; } .mp-bars i:nth-child(4) { height: 10px; } .mp-bars i:nth-child(5) { height: 12px; }
.mp-motd { display: grid; min-height: 38px; color: #aaa; line-height: 1.35; }
.mp-motd > div { min-height: 19px; overflow: hidden; white-space: pre; text-overflow: clip; }
.mp-icon-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mp-templates { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-templates .pill { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; }
.mp-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.mp-swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.mp-sw { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); cursor: pointer; }
.mp-sw:focus-visible, .mp-fmt button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mp-fmt { display: flex; gap: 4px; }
.mp-fmt button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--surface); color: var(--text-2); cursor: pointer; }
.mp-line { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.mp-line > span { color: var(--text-3); font-size: 12px; font-weight: 700; text-align: center; }
.mp-line em { min-width: 56px; color: var(--text-3); font-size: 11.5px; font-style: normal; text-align: right; }
.mp-line em.is-over { color: var(--warn); }
.mp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.mp-grid > * { margin: 0 !important; min-width: 0; }
.mp-fields { display: grid; gap: 14px; padding: 18px 20px 20px; }
.mp-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.mp-toggle > span:first-child { display: grid; gap: 2px; }
.mp-toggle strong { font-size: 13.5px; font-weight: 600; }
.mp-toggle small { color: var(--text-3); font-size: 12px; line-height: 1.4; }
.mp-toggle.is-cracked:has(input:checked) { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: var(--warn-soft); }
.mp-cracked { margin: -6px 0 0; }
.mp-range-val { float: right; font-variant-numeric: tabular-nums; }
.mp-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 14px 0; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--text-2); font-size: 12.5px; }
.mp-all { margin-top: 14px; }
.mp-all summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; cursor: pointer; list-style: none; }
.mp-all summary::-webkit-details-marker { display: none; }
.mp-all summary span { display: grid; }
.mp-all summary small { color: var(--text-3); font-size: 12px; }
.mp-all[open] summary i { transform: rotate(180deg); }
.mp-all-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding: 0 20px 20px; }
.mp-kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 10px; font-size: 12.5px; }
.mp-kv > span { overflow: hidden; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
.mp-save { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; padding: 10px 10px 10px 18px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.mp-save [data-mp-dirty] { margin-right: auto; }
.mp-save .is-dirty { color: var(--warn); }
@media (max-width: 1000px) { .mp-hero, .mp-grid, .mp-all-list { grid-template-columns: 1fr; } .mp-editor { border-left: 0; border-top: 1px solid var(--line); } }

/* ---- Scrollbars --------------------------------------------------------------------------------- */
:root { --scroll: rgba(10, 10, 14, .2); }
:root[data-theme="dark"] { --scroll: rgba(255, 255, 255, .14); }
html { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
* { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: var(--scroll); background-clip: content-box; }
.terminal .xterm-viewport, .an-console { scrollbar-color: rgba(255, 255, 255, .16) transparent; }

/* ---- Command palette (Ctrl / ⌘ K) ------------------------------------------------------------- */
.top-search { display: inline-flex; align-items: center; gap: 10px; height: 36px; margin-left: auto; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--text-3); font: inherit; font-size: 13px; cursor: pointer; }
.top-search kbd { padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-family: var(--mono); font-size: 11px; }
.palette { width: min(620px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 120px)); margin: 12vh auto auto; padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
.palette::backdrop { background: rgba(5, 5, 8, .55); backdrop-filter: blur(3px); }
.palette[open] { display: flex; flex-direction: column; animation: pal-in .16s ease-out; }
@keyframes pal-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
.palette-in { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.palette-in input { flex: 1; height: 56px; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 15px; }
.palette-in kbd { padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; font-family: var(--mono); font-size: 11px; }
.palette-list { flex: 1; overflow-y: auto; padding: 8px; }
.palette-group { padding: 10px 10px 6px; color: var(--text-3); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.palette-item .pi-ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; overflow: hidden; border-radius: 9px; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.palette-item .pi-ico img { width: 100%; height: 100%; object-fit: cover; }
.palette-item small { margin-left: auto; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.palette-item.is-active { background: var(--accent-soft); }
.palette-item.is-active .pi-ico { background: var(--accent); color: #fff; }
.palette-empty { padding: 30px; color: var(--text-3); text-align: center; }
@media (max-width: 720px) { .top-search span, .top-search kbd { display: none; } }
@media (max-width: 900px) {
    .sv-head { align-items: flex-start; flex-wrap: wrap; gap: 12px 14px; }
    .sv-egg { --sz: 64px !important; margin-top: -32px; }
    .sv-title { flex: 1 1 0; padding-top: 6px; }
    .sv-meta { gap: 6px; }
}

/* ---- Empty pictures and banners: quiet dark grey ------------------------------------------------ */
.egg-img.is-empty { background: #1b1b1f; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
:root:not([data-theme="dark"]) .egg-img.is-empty { background: #e9e9ed; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.banner.is-empty, .sv-cover.is-empty { background: #161619; }
:root:not([data-theme="dark"]) .banner.is-empty, :root:not([data-theme="dark"]) .sv-cover.is-empty { background: #ececf0; }
.mp-icon img[hidden] { display: none; }
.mp-icon:not(:has(img:not([hidden]))) { background: #1b1b1f; }
.eula-art { background: #161619; }

/* ---- Collapsible sidebar groups ---------------------------------------------------------------- */
.sub-group + .sub-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
button.sub-sec { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; }
button.sub-sec i { font-size: 10px; transition: transform .25s ease; }
.sub-group.is-collapsed button.sub-sec i { transform: rotate(-90deg); }
.sub-items { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .25s ease; }
.sub-items > * { min-height: 0; }
.sub-items { overflow: hidden; }
.sub-group.is-collapsed .sub-items { grid-template-rows: 0fr; }
.sub-items { gap: 2px; }
.groups-init .sub-items, .groups-init button.sub-sec i { transition: none !important; }

/* ---- Server list (long rows) ------------------------------------------------------------------- */
.sl-top { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 24px; }
.sl-top h1 { font-size: 30px; font-weight: 650; letter-spacing: -.03em; }
.sl-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 8px 0 0; color: var(--text-2); font-size: 13.5px; }
.sl-sub span { display: inline-flex; align-items: center; gap: 7px; }
.sl-sub b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.sl-sub i.fa-solid { color: var(--text-3); font-size: 12px; }
.sl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.sl-dot.is-good { background: var(--good); }
.sl-tools { display: flex; align-items: center; gap: 10px; }
.sl-tools .input-group { width: 280px; }
.sl { display: grid; gap: 8px; }
.sl-head, .sl-row { display: grid; grid-template-columns: minmax(260px, 2.4fr) minmax(110px, .9fr) minmax(70px, .6fr) repeat(3, minmax(90px, .8fr)) minmax(120px, .9fr); align-items: center; gap: 18px; }
.sl-head { padding: 0 20px 2px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.sl-row { position: relative; padding: 12px 20px 12px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.sl-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.sl-cover { position: relative; flex: none; width: 128px; height: 68px; overflow: visible; border-radius: 11px; }
.sl-cover > img { border-radius: 11px; }
.sl-egg { position: absolute; left: 8px; bottom: 8px; box-shadow: 0 0 0 3px var(--surface); }
.sl-cover.is-empty .sl-egg { left: 50%; bottom: 50%; transform: translate(-50%, 50%); box-shadow: none; }
.sl-name { display: grid; gap: 1px; min-width: 0; }
.sl-name strong { display: block; overflow: hidden; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.sl-name small { overflow: hidden; color: var(--text-3); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.sl-addr { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--text-2); font-size: 12px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-addr i { color: var(--text-3); font-size: 10.5px; }
.sl-cell { display: grid; gap: 4px; min-width: 0; font-size: 13.5px; }
.sl-cell b { font-weight: 600; font-variant-numeric: tabular-nums; }
.sl-k { display: none; color: var(--text-3); font-size: 11.5px; }
.sl-meter .bar { display: block; height: 4px; overflow: hidden; border-radius: 99px; background: var(--surface-2); }
.sl-meter .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .5s ease; }
.sl-state { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sl-go { color: var(--text-3); font-size: 12px; }
.sl-row a.stretch::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 16px; }
.sl-loc .loc-chip { font-size: 13px; }
@media (max-width: 1180px) {
    .sl-head { display: none; }
    .sl-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; padding: 12px; }
    .sl-main { grid-column: 1 / -1; }
    .sl-k { display: block; }
    .sl-loc, .sl-state { grid-column: span 1; }
}
@media (max-width: 560px) { .sl-cover { width: 92px; height: 56px; } .sl-tools, .sl-tools .input-group { width: 100%; } }

/* ---- Sign-in extras: captcha and Google ---------------------------------------------------------- */
.captcha { min-height: 65px; margin: 4px 0 14px; }
.captcha .cf-turnstile { width: 100%; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-3); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-google { width: 100%; height: 46px; justify-content: center; gap: 12px; }
.auth-google svg { width: 18px; height: 18px; }
.sec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sec-grid > * { margin: 0 !important; min-width: 0; }
.sec-steps { margin: 4px 0 0; font-size: 13px; }
.sec-steps a { color: var(--accent); }
.sec-g { background: var(--surface-2); }
@media (max-width: 1100px) { .sec-grid { grid-template-columns: 1fr; } }
.sv-cover.is-empty { height: 120px; }

/* ==== Motion ===================================================================================== */
/* Loading bar in the brand colour (page changes, and on server pages until the live connection is up). */
.loadbar { position: fixed; top: 0; left: 0; right: 0; z-index: 2147483646; height: 3px; pointer-events: none; }
.loadbar i { position: relative; display: block; width: 0; height: 100%; overflow: hidden; border-radius: 0 3px 3px 0; background: var(--accent); opacity: 0; transition: width .5s cubic-bezier(.2, .8, .2, 1), opacity .35s ease; }
.loadbar i::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: loadbar-sweep 1.1s ease-in-out infinite; }
.loadbar.is-on i { opacity: 1; }
.loadbar.is-done i { width: 100% !important; opacity: 0; transition: width .25s ease, opacity .35s ease .2s; }
@keyframes loadbar-sweep { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* Dialogs, menus and popovers */
dialog.modal[open] { animation: pop .26s cubic-bezier(.2, .8, .2, 1); }
dialog.modal[open]::backdrop { animation: fade .26s ease; }
.menu-pop:not([hidden]), .cpick-pop:not([hidden]) { animation: drop .18s cubic-bezier(.2, .8, .2, 1); transform-origin: top right; }
.toast { animation: pop .3s cubic-bezier(.2, .8, .2, 1); }

/* State changes glide instead of snapping */
.tabs a, .seg span, .sub-item, .sub-item-ico, .btn, .switch span, .switch span::after, .an-legend button, .state, .sv-state, .pill, .input, .select, .textarea { transition: background-color .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease, opacity .22s ease, transform .22s ease; }
.btn:active:not(:disabled) { transform: scale(.98); }
.state::before { transition: background-color .3s ease; }
.ov-bar i, .sl-meter .bar i, .srv-card-stats .bar i, .meter i { transition: width .8s cubic-bezier(.2, .8, .2, 1) !important; }


.brand-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.brand-presets { display: flex; gap: 6px; }
.brand-preset { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); cursor: pointer; }
.brand-preset:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* ==== Server banners: blurred and darkened (Admin → Settings → Server banners) ================== */
:root { --bn-blur: 14px; --bn-dim: .55; --bn-row: 77%; }
/* The picture is drawn larger than its box so the blur never shows a soft edge. */
.hero-bg > img, .sl-bg > img {
    inset: auto; max-width: none; left: calc(var(--bn-blur, 14px) * -2); top: calc(var(--bn-blur, 14px) * -2);
    width: calc(100% + var(--bn-blur, 14px) * 4); height: calc(100% + var(--bn-blur, 14px) * 4);
    filter: blur(var(--bn-blur, 14px)) saturate(1.1);
}
.bn-editor { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.bn-preview { display: grid; gap: 12px; }
@media (max-width: 1000px) { .bn-editor { grid-template-columns: 1fr; } }

/* Server page header: banner across the whole card, icon, name, status, address and power buttons. */
.hero { position: relative; isolation: isolate; margin-bottom: 22px; overflow: hidden; border-radius: 22px; background: #0d0f14; color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 28px 60px -34px rgba(0, 0, 0, .7); }
.hero-bg { position: absolute; inset: 0; z-index: -1; background: #0d0f14; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background:
    linear-gradient(90deg, rgb(7 8 11 / calc(var(--bn-dim, .55) + .14)), rgb(7 8 11 / var(--bn-dim, .55)) 55%, rgb(7 8 11 / calc(var(--bn-dim, .55) - .08))),
    linear-gradient(0deg, rgb(7 8 11 / .38), transparent 55%); }
.hero-in { display: flex; align-items: center; gap: 22px; padding: 26px 28px; }
.hero-icon { box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 16px 34px -12px rgba(0, 0, 0, .75); }
.hero-main { flex: 1; display: grid; gap: 12px; min-width: 0; }
.hero-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.hero-title h1 { margin: 0; max-width: 100%; overflow: hidden; color: #fff; font-size: 30px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; text-overflow: ellipsis; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); white-space: nowrap; }
.hero-state { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .78); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
.hero-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.hero-state[data-state="running"] { border-color: rgba(74, 222, 128, .35); background: rgba(34, 197, 94, .18); color: #4ade80; }
.hero-state[data-state="starting"], .hero-state[data-state="stopping"], .hero-state[data-state="installing"], .hero-state[data-state="restoring_backup"] { border-color: rgba(251, 191, 36, .35); background: rgba(245, 158, 11, .16); color: #fbbf24; }
.hero-state[data-state="starting"]::before, .hero-state[data-state="stopping"]::before, .hero-state[data-state="connecting"]::before { animation: ov-pulse 1.2s ease-in-out infinite; }
.hero-state[data-state="offline"], .hero-state[data-state="unreachable"], .hero-state[data-state="install_failed"], .hero-state[data-state="suspended"] { border-color: rgba(248, 113, 113, .32); background: rgba(239, 68, 68, .15); color: #f87171; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 10px; background: rgba(255, 255, 255, .09); color: rgba(255, 255, 255, .9); font: inherit; font-size: 12.5px; font-weight: 550; white-space: nowrap; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: default; }
.hero-chip.mono { font-family: var(--mono); font-size: 12px; }
.hero-chip i { color: rgba(255, 255, 255, .55); font-size: 11.5px; }
.hero-chip .flag { width: 18px; height: 13px; border-radius: 2px; }
.hero-chip.is-link, .hero-chip.is-copy { cursor: pointer; transition: background-color .2s, border-color .2s; }
.hero-copy { margin-left: 2px; opacity: .7; }
.hero-power { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-self: center; }
.hero-btn { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 18px; border: 1px solid var(--bt); border-radius: 12px; background: var(--bb); color: var(--bc); font: inherit; font-size: 13.5px; font-weight: 650; white-space: nowrap; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color .2s, transform .2s, opacity .2s, box-shadow .2s; }
.hero-btn i { font-size: 12px; }
.hero-btn[data-tone="start"] { --bc: #4ade80; --bb: rgba(34, 197, 94, .14); --bt: rgba(74, 222, 128, .42); }
.hero-btn[data-tone="restart"] { --bc: #fbbf24; --bb: rgba(245, 158, 11, .13); --bt: rgba(251, 191, 36, .4); }
.hero-btn[data-tone="stop"] { --bc: #f87171; --bb: rgba(239, 68, 68, .13); --bt: rgba(248, 113, 113, .4); }
.hero-btn[data-tone="kill"] { --bc: #fb7185; --bb: rgba(244, 63, 94, .15); --bt: rgba(251, 113, 133, .45); }
.hero-btn:disabled { opacity: .38; cursor: not-allowed; }
.hero.is-preview .hero-in { padding: 18px 20px; gap: 16px; }
.hero.is-preview h1 { font-size: 22px; }
.hero.is-preview .hero-icon { --sz: 64px !important; }
@media (max-width: 900px) {
    .hero { border-radius: 18px; }
    .hero-in { flex-wrap: wrap; gap: 16px; padding: 20px 18px; }
    .hero-icon { --sz: 64px !important; }
    .hero-main { flex: 1 1 calc(100% - 90px); }
    .hero-title h1 { font-size: 24px; }
    .hero-power { width: 100%; justify-content: stretch; }
    .hero-btn { flex: 1 1 calc(50% - 8px); justify-content: center; padding: 0 10px; }
}

/* Server list rows: icon, name, game, address, usage, with the banner softly behind. */
.sl-row { isolation: isolate; overflow: hidden; padding: 14px 22px 14px 14px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.sl-row:hover { border-color: var(--line-strong); }
.sl-row:hover .sl-go { color: var(--text); transform: translateX(3px); }
.sl-go { transition: transform .2s, color .2s; }
.sl-bg { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--surface); }
.sl-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,
    color-mix(in srgb, var(--surface) calc(var(--bn-row, 77%) + 3%), transparent),
    color-mix(in srgb, var(--surface) var(--bn-row, 77%), transparent) 45%,
    color-mix(in srgb, var(--surface) calc(var(--bn-row, 77%) - 14%), transparent)); }
.sl-row[hidden] { display: none; }
.sl-main { gap: 16px; }
.sl-egg { position: relative; left: auto; bottom: auto; transform: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 22px -10px rgba(0, 0, 0, .55); }
:root:not([data-theme="dark"]) .sl-egg { box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 10px 22px -10px rgba(0, 0, 0, .3); }
.sl-name strong { font-size: 16px; letter-spacing: -.02em; }
.sl-name small { color: var(--text-2); font-size: 13px; }
.sl-row.is-preview { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 560px) { .sl-egg { --sz: 52px !important; } }

/* ==== NEXT GEN layer ============================================================================= */
:root { --ease: cubic-bezier(.22, .8, .24, 1); --glow: transparent; }
:root[data-theme="dark"] { --bg: #070709; --line: #1d1d22; }
.shell { position: relative; z-index: 1; }
.top { backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .tile, :root[data-theme="dark"] .stat { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035); }

/* Buttons and navigation: a little depth and light. */
.btn { transition: background-color .2s, border-color .2s, color .2s, box-shadow .25s var(--ease), transform .2s var(--ease); }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); box-shadow: none; }
.btn-primary:not(:disabled):hover { background: var(--accent-2); box-shadow: none; }
.rail-ico { transition: background-color .25s var(--ease), color .2s, transform .25s var(--ease), box-shadow .3s var(--ease); }
.rail-ico:hover:not(.is-active) { background: rgba(255, 255, 255, .07); color: #fff; }
.rail-ico.is-active { background: var(--accent); box-shadow: none; }
.rail-mark { box-shadow: none; }
.sub-item { position: relative; transition: background-color .22s var(--ease), color .2s, transform .25s var(--ease); }
.sub-item:hover:not(.is-active) { background: var(--surface-2); }
.sub-item-ico { transition: background-color .22s, color .2s, transform .25s var(--ease); }
.sub-item.is-active::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: none; }
.sub-items { transition: grid-template-rows .32s var(--ease); }
button.sub-sec i { transition: transform .32s var(--ease); }
.sub-sec { transition: color .2s; }
button.sub-sec:hover { color: var(--text-2); }

/* Avatars */
.avatar { width: var(--av, 34px); height: var(--av, 34px); overflow: hidden; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8b5cf6)); font-size: calc(var(--av, 34px) * .37); }
.avatar.has-img { background: var(--surface-3); }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.top-me { display: grid; border-radius: 50%; transition: transform .25s var(--ease), box-shadow .25s; }
.rail-me .avatar { width: 34px; height: 34px; font-size: 12px; }

/* ---- Home ---------------------------------------------------------------------------------------- */
.hm-hero { position: relative; isolation: isolate; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 6px 0 34px; }
.hm-ava { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line-strong); }
.hm-hello { display: grid; gap: 4px; min-width: 0; }
.hm-hello h1 { margin: 0; font-size: clamp(32px, 4.2vw, 46px); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; }
.hm-eyebrow { color: var(--accent); font-size: 12.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.hm-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.hm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.hm-stat { display: grid; gap: 4px; padding: 20px 24px 22px; }
.hm-stat + .hm-stat { border-left: 1px solid var(--line); }
.hm-k { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.hm-k i { color: var(--accent); font-size: 12px; }
.hm-stat b { font-size: 36px; font-weight: 650; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hm-stat small { color: var(--text-3); font-size: 12.5px; }
.hm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.hm-card, .hm-srv, .iv-level { --mx: 50%; --my: 0%; }
.hm-card { position: relative; isolation: isolate; display: grid; align-content: start; gap: 6px; min-height: 212px; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); transition: transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease); }
.hm-card::before, .hm-srv::before { content: none; }
.hm-card:hover, .hm-srv:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: none; }
.hm-card:hover::before, .hm-srv:hover::before { opacity: 1; }
.hm-ico { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 14px; border-radius: 50%; background: var(--surface-3); color: var(--text); font-size: 18px; transition: background-color .3s, color .3s, transform .4s var(--ease), box-shadow .3s; }
.hm-card:hover .hm-ico { background: var(--accent); color: var(--on-accent, #fff); transform: scale(1.08) rotate(-6deg); box-shadow: none; }
.hm-card strong { font-size: 20px; font-weight: 650; letter-spacing: -.03em; }
.hm-card p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.hm-go { display: inline-flex; align-items: center; gap: 8px; align-self: end; margin-top: 18px; color: var(--text); font-size: 13.5px; font-weight: 600; }
.hm-go i { color: var(--text-3); font-size: 10.5px; transition: transform .3s var(--ease), color .2s; }
.hm-card:hover .hm-go i { color: var(--accent); transform: translateX(4px); }
.hm-card.is-primary { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); background: linear-gradient(150deg, var(--accent-soft), transparent 62%), var(--surface); }
.hm-card.is-primary .hm-ico { background: var(--accent); color: var(--on-accent, #fff); box-shadow: none; }
.hm-recent { margin-top: 38px; }
.hm-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hm-sec-head h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.035em; }
.hm-sec-head a { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 600; transition: color .2s; }
.hm-sec-head a i { font-size: 10px; transition: transform .3s var(--ease); }
.hm-sec-head a:hover { color: var(--text); }
.hm-sec-head a:hover i { transform: translateX(3px); }
.hm-servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.hm-srv { position: relative; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px 14px 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease); }
.hm-srv-bg { position: absolute; inset: 0; z-index: -2; border-radius: inherit; background: var(--surface); }
.hm-srv-bg > img { inset: auto; max-width: none; left: calc(var(--bn-blur, 14px) * -2); top: calc(var(--bn-blur, 14px) * -2); width: calc(100% + var(--bn-blur, 14px) * 4); height: calc(100% + var(--bn-blur, 14px) * 4); filter: blur(var(--bn-blur, 14px)) saturate(1.1); }
.hm-srv-bg::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) var(--bn-row, 77%), transparent); }
.hm-srv-ico { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 22px -10px rgba(0, 0, 0, .55); }
.hm-srv-name { display: grid; min-width: 0; }
.hm-srv-name strong { overflow: hidden; font-size: 15.5px; font-weight: 650; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.hm-srv-name small { overflow: hidden; color: var(--text-2); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.hm-srv-state { display: grid; justify-items: end; gap: 2px; }
.hm-srv-state small { color: var(--text-3); font-size: 11.5px; }
@media (max-width: 1100px) { .hm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
    .hm-cards { grid-template-columns: 1fr; } .hm-card { min-height: 0; }
    .hm-stats { grid-template-columns: 1fr; } .hm-stat + .hm-stat { border-left: 0; border-top: 1px solid var(--line); }
    .hm-hero-actions { margin-left: 0; width: 100%; } .hm-servers { grid-template-columns: 1fr; }
}

/* ---- Invite team ------------------------------------------------------------------------------- */
.iv { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.iv-main { display: grid; gap: 16px; min-width: 0; }
.iv-step { padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.iv-step > header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.iv-step > header > div { flex: 1; min-width: 0; }
.iv-n { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.iv-step h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.iv-step header p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.iv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-2); cursor: text; transition: border-color .2s, box-shadow .2s; }
.iv-chips:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.iv-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; animation: pop .25s var(--ease); }
.iv-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 10px; cursor: pointer; transition: background-color .2s; }
.iv-chip button:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.iv-chip-input { flex: 1; min-width: 180px; height: 32px; padding: 0 4px; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 14px; }
.iv-find { margin-bottom: 12px; }
.iv-servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.iv-srv { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); cursor: pointer; transition: border-color .2s, background-color .2s, transform .25s var(--ease); }
.iv-srv[hidden] { display: none; }
.iv-srv:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.iv-srv input { position: absolute; opacity: 0; pointer-events: none; }
.iv-srv-t { display: grid; flex: 1; min-width: 0; }
.iv-srv-t strong { overflow: hidden; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.iv-srv-t small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.iv-tick { color: var(--accent); font-size: 18px; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .3s var(--ease); }
.iv-srv:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.iv-srv:has(input:checked) .iv-tick { opacity: 1; transform: none; }
.iv-srv:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.iv-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.iv-level { position: relative; isolation: isolate; display: grid; align-content: start; gap: 4px; padding: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); cursor: pointer; transition: border-color .2s, background-color .2s, transform .25s var(--ease); }
.iv-level:hover { transform: translateY(-2px); }
.iv-level input { position: absolute; opacity: 0; pointer-events: none; }
.iv-level-ico { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 8px; border-radius: 12px; background: var(--surface-3); color: var(--text-2); font-size: 15px; transition: background-color .25s, color .25s; }
.iv-level strong { font-size: 14.5px; font-weight: 650; }
.iv-level small { color: var(--text-3); font-size: 12px; line-height: 1.4; }
.iv-level:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.iv-level:has(input:checked) .iv-level-ico { background: var(--accent); color: var(--on-accent, #fff); }
.iv-level:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.iv-more { margin-top: 14px; }
.iv-more summary { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13.5px; font-weight: 600; cursor: pointer; list-style: none; }
.iv-more summary::-webkit-details-marker { display: none; }
.iv-more summary i { color: var(--text-3); font-size: 10px; transition: transform .3s var(--ease); }
.iv-more[open] summary i { transform: rotate(90deg); }
.iv-more-in { margin-top: 14px; animation: drop .3s var(--ease); }
.iv-side { position: sticky; top: 92px; display: grid; gap: 16px; }
.iv-sum, .iv-team { padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.iv-sum h3, .iv-team h3 { margin: 0 0 14px; font-size: 15px; font-weight: 650; }
.iv-sum dl { display: grid; gap: 2px; margin: 0 0 18px; }
.iv-sum dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.iv-sum dt { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13.5px; }
.iv-sum dt i { width: 14px; color: var(--text-3); font-size: 12px; text-align: center; }
.iv-sum dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.iv-send { width: 100%; height: 48px; font-size: 14.5px; }
.iv-sum .hint { margin: 12px 0 0; }
.iv-person { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.iv-person span { display: grid; flex: 1; min-width: 0; }
.iv-person strong { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.iv-person small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.iv-person em { color: var(--text-3); font-size: 12px; font-style: normal; white-space: nowrap; }
@media (max-width: 1000px) { .iv { grid-template-columns: 1fr; } .iv-side { position: static; } .iv-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Profile and email settings ---------------------------------------------------------------------- */
.prof { display: flex; align-items: center; gap: 28px; margin-bottom: 16px; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(135deg, var(--accent-soft), transparent 55%), var(--surface); }
.prof-ava { position: relative; flex: none; display: block; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line-strong); transition: transform .35s var(--ease); }
.prof-ava:hover { transform: scale(1.03); }
.prof-cam { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .52); color: #fff; font-size: 22px; opacity: 0; transition: opacity .25s; }
.prof-ava:hover .prof-cam { opacity: 1; }
.prof.is-busy .prof-ava { opacity: .55; pointer-events: none; }
.prof-info { display: grid; gap: 6px; min-width: 0; }
.prof-info h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.035em; }
.prof-info p { margin: 0; color: var(--text-2); }
.prof-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.prof-actions .hint { flex-basis: 100%; }
@media (max-width: 640px) { .prof { flex-direction: column; align-items: flex-start; } }
.mail-tips { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.mail-tips li { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.mail-tips li:last-child { padding-bottom: 0; border-bottom: 0; }
.mail-tips span { color: var(--text-2); font-size: 12.5px; }
.mail-tips small { color: var(--text-3); font-size: 12px; }

/* ==== CLEAN layer: no glow, still sidebar, modern type, crisp icons ================================== */
:root { --glow: transparent; }
body { font-family: var(--font); font-size: 14.5px; font-optical-sizing: auto; font-feature-settings: "ss01" 0, "kern" 1, "calt" 1; letter-spacing: -.011em; text-rendering: optimizeLegibility; }
body::before, body::after { content: none !important; }
h1, h2, h3, .head h1, .hm-hello h1, .hm-sec-head h2, .sub-title, .auth-card h1 { font-family: var(--font); letter-spacing: -.035em; font-weight: 650; }
.hm-hello h1 { letter-spacing: -.05em; font-weight: 700; }
.hm-eyebrow, .sub-sec, .label { letter-spacing: .06em; }
.btn, .tabs a, .pill, .state { font-weight: 600; letter-spacing: -.005em; }
.table, .stat b, .hm-stat b, .tile b, .mono-num { font-variant-numeric: tabular-nums; }
code, .mono, .terminal, .input.mono, .select.mono, .textarea.code { font-family: var(--mono); letter-spacing: 0; }

/* No shadows that pretend to glow */
.btn-primary, .btn-primary:hover, .rail-ico.is-active, .rail-mark, .hm-card:hover, .hm-srv:hover, .hm-card:hover .hm-ico, .hm-card.is-primary .hm-ico { box-shadow: none !important; }
.hm-hero::before, .hm-card::before, .hm-srv::before { content: none !important; display: none; }
.hm-card:hover, .hm-srv:hover { transform: none; }
.hm-card:hover .hm-ico { transform: none; }
.btn:not(:disabled):hover { transform: none; }

/* Sidebar: completely still. No slide-in, no fade, no hover movement, no fold animation, no page morph. */
.side, .side *, .rail, .rail *, .sub, .sub * { animation: none !important; }
.sub-item, .sub-item-ico, .sub-sec, .sub-sec i, .sub-items, .rail-ico, .rail-mark, .sub-back { transition: none !important; }
.sub-item:hover, .sub-item:hover .sub-item-ico, .rail-ico:hover { transform: none !important; }
@media (min-width: 981px) { .side { transition: none !important; } }

/* Icons: one weight, one size, no tiles behind them */
.fa-solid, .fa-regular, .fa-brands { -webkit-font-smoothing: antialiased; }
.rail { width: 64px; padding: 14px 0; border-radius: 22px; }
.rail-nav { gap: 6px; }
.rail-ico { width: 44px; height: 44px; border-radius: 14px; color: #7f7f89; font-size: 17px; }
.rail-ico:hover:not(.is-active) { background: rgba(255, 255, 255, .06); color: #fff; }
.rail-ico.is-active { background: var(--accent); color: var(--on-accent, #fff); }
.rail-mark { width: 42px; height: 42px; border-radius: 13px; }
.sub { border-radius: 22px; padding: 18px 12px; }
.sub-item { height: 40px; gap: 10px; padding: 0 12px; border-radius: 12px; color: var(--text-2); font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.sub-item-ico { width: 20px; height: 20px; border-radius: 0; background: none !important; color: var(--text-3); font-size: 14.5px; }
.sub-item:hover:not(.is-active) { background: var(--surface-2); color: var(--text); }
.sub-item:hover .sub-item-ico { color: var(--text); }
.sub-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sub-item.is-active .sub-item-ico { background: none !important; color: var(--accent); }
.sub-item.is-active::before { content: none; }
.sub-sec { padding: 16px 12px 6px; font-size: 10.5px; font-weight: 650; color: var(--text-3); }
.sub-title, .sub-server strong { letter-spacing: -.03em; }
.btn i, .tabs a i { font-size: 13px; }
.hm-ico, .srv-ico { background: var(--surface-2); color: var(--text); }
.top, .content, .sub { border-radius: 22px; }
.content { border-radius: 22px; }
.main { gap: 10px; }

/* Cleaner surfaces */
:root[data-theme="dark"] .content, :root[data-theme="dark"] .sub, :root[data-theme="dark"] .top { background: var(--surface); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .tile, :root[data-theme="dark"] .stat { box-shadow: none; }
.card { border-radius: 18px; }
.input, .select, .textarea { border-radius: 12px; }
.input:focus, .select:focus, .textarea:focus { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Page frame leaves room for the fixed footer line (added by AppFooter middleware). */
body { display: flex; flex-direction: column; min-height: 100vh; }
.shell, .auth { flex: 1 0 auto; width: 100%; min-height: calc(100vh - 44px); }
.side { height: calc(100vh - 44px); }
@media (max-width: 980px) { .side { height: 100vh; } }

/* ---- Console tools ------------------------------------------------------------------------------ */
.terminal-full { border: 1px solid var(--line); border-radius: 18px; background: var(--console); }
.terminal-bar { justify-content: space-between; height: 46px; border-bottom: 1px solid #1d1d20; }
.terminal-title { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: #a3a3ab; }
.terminal-title i { font-size: 12px; color: var(--accent); }
.con-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid #1d1d20; background: rgba(255, 255, 255, .02); }
.ct-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: #a3a3ab; font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: none; }
.ct-btn i { font-size: 12px; }
.ct-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); color: #fff; }
.ct-ico { width: 32px; padding: 0; justify-content: center; }
.ct-sep { width: 1px; height: 18px; margin: 0 6px; background: #2a2a30; }
.ct-filter { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 160px; max-width: 280px; height: 32px; margin-left: 6px; padding: 0 10px; border-radius: 9px; background: rgba(255, 255, 255, .06); color: #8d8d96; }
.ct-filter i { font-size: 11.5px; }
.ct-filter input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: #f4f4f5; font: inherit; font-size: 12.5px; outline: none; }
.ct-filter input::placeholder { color: #6f6f78; }
.ct-count { margin-left: auto; padding: 0 8px; color: #6f6f78; font-size: 11.5px; white-space: nowrap; }
.ct-open { margin-left: 2px; text-decoration: none; }
@media (max-width: 720px) { .ct-btn span { display: none; } .ct-btn { width: 34px; padding: 0; justify-content: center; } .ct-filter { max-width: none; flex-basis: 100%; margin: 4px 0 0; } .ct-count { display: none; } .ct-open span { display: none; } }

/* Console alone in its own tab */
body.popout { background: var(--console); }
.popout-wrap { display: flex; flex: 1 0 auto; flex-direction: column; gap: 10px; width: 100%; height: calc(100vh - 44px); padding: 10px; }
.popout-head { display: flex; align-items: center; gap: 12px; padding: 4px 6px; color: var(--text); }
.popout-head strong { font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.popout-power { display: inline-flex; gap: 6px; margin-left: auto; }
.popout-wrap .terminal-full { flex: 1; min-height: 0; }
.popout-wrap .terminal-full .terminal-screen { flex: 1; height: auto; min-height: 0; }
.popout-head { color: #f4f4f5; }
.popout-power .btn-soft { background: rgba(255, 255, 255, .08); color: #f4f4f5; }
.popout-power .btn-soft:disabled { opacity: .35; }

/* ---- Server wizard ------------------------------------------------------------------------------ */
.wz-errs { margin: 6px 0 0; padding-left: 18px; font-weight: 500; }
.wz-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.wz-steps li { position: relative; }
.wz-steps li + li::before { content: ""; position: absolute; left: -8px; top: 22px; width: 8px; height: 2px; background: var(--line-strong); }
.wz-step { display: flex; align-items: center; gap: 12px; width: 100%; height: 56px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text-3); font: inherit; font-weight: 600; text-align: left; cursor: pointer; transition: none; }
.wz-step:disabled { cursor: not-allowed; opacity: .6; }
.wz-num { position: relative; display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: 13px; }
.wz-num i { display: none; font-size: 12px; }
.wz-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-current .wz-step { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.is-current .wz-num { background: var(--accent); color: var(--on-accent, #fff); }
.is-done .wz-step { color: var(--text); }
.is-done .wz-num { background: var(--good); color: #fff; }
.is-done .wz-num b { display: none; } .is-done .wz-num i { display: block; }
.wz-head { margin-bottom: 16px; }
.wz-head h2 { font-size: 22px; font-weight: 650; letter-spacing: -.035em; }
.wz-head p { margin: 4px 0 0; color: var(--text-2); }
.wz-panel[hidden] { display: none !important; }

.wz-eggs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.wz-egg, .wz-node { position: relative; display: block; cursor: pointer; }
.wz-egg input, .wz-node input { position: absolute; opacity: 0; pointer-events: none; }
.wz-egg-in, .wz-node-in { position: relative; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.wz-egg-in strong { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: -.02em; }
.wz-egg-in small { color: var(--text-3); font-size: 12px; }
.wz-egg:hover .wz-egg-in, .wz-node:hover .wz-node-in { border-color: var(--line-strong); background: var(--surface-2); }
.wz-tick { position: absolute; right: 12px; top: 12px; color: var(--accent); font-size: 16px; opacity: 0; }
.wz-egg input:checked + .wz-egg-in, .wz-node input:checked + .wz-node-in { border-color: var(--accent); background: var(--accent-soft); }
.wz-egg input:checked + .wz-egg-in .wz-tick, .wz-node input:checked + .wz-node-in .wz-tick { opacity: 1; }
.wz-egg input:focus-visible + .wz-egg-in, .wz-node input:focus-visible + .wz-node-in { outline: 2px solid var(--accent); outline-offset: 2px; }

.wz-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.wz-node-in { flex-direction: column; align-items: stretch; gap: 8px; }
.wz-node.is-off { cursor: not-allowed; opacity: .55; }
.wz-node-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 26px; }
.wz-node-top strong { font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.wz-meter, .wz-cap { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 10px; color: var(--text-2); font-size: 12.5px; }
.wz-meter b { min-width: 34px; text-align: right; font-weight: 600; color: var(--text); }
.wz-meter .bar, .wz-cap .bar { position: relative; display: block; height: 8px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.wz-meter .bar i, .wz-cap .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--text-2); }
.wz-meter .bar i.is-hot { background: var(--warn); }
.wz-bad { color: var(--bad) !important; }
.wz-ports { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow: auto; }
.wz-port { position: relative; cursor: pointer; }
.wz-port input { position: absolute; opacity: 0; pointer-events: none; }
.wz-port span { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text-2); font-size: 12.5px; }
.wz-port:hover span { border-color: var(--line-strong); }
.wz-port input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.wz-port.is-off { opacity: .35; cursor: not-allowed; }
.wz-req { margin-left: 6px; color: var(--accent); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

.wz-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.wz-preset { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: none; }
.wz-preset strong { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.wz-preset span { color: var(--text-2); font-size: 12.5px; }
.wz-preset small { color: var(--text-3); font-size: 12px; }
.wz-preset:hover { border-color: var(--line-strong); background: var(--surface-2); }
.wz-preset.is-on { border-color: var(--accent); background: var(--accent-soft); }
.wz-capacity { display: grid; gap: 12px; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.wz-cap { grid-template-columns: 170px minmax(0, 1fr) minmax(190px, auto); }
.wz-cap b { text-align: right; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.wz-cap .bar i:nth-child(2) { background: var(--accent); border-radius: 0 99px 99px 0; }
.wz-cap .bar i:nth-child(2).is-over { background: var(--bad); }
.wz-adv { margin-top: 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.wz-adv summary { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; list-style: none; }
.wz-adv summary::-webkit-details-marker { display: none; }

.wz-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wz-rv { padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.wz-rv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wz-rv-head h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 650; }
.wz-rv-head h3 i { color: var(--text-3); font-size: 13px; }
.wz-edit { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.wz-rv dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13.5px; }
.wz-rv dt { color: var(--text-3); }
.wz-rv dd { margin: 0; overflow-wrap: anywhere; font-weight: 550; }
.wz-rv-warn { grid-column: 1 / -1; }
.wz-review .wz-rv-warn { margin-top: 0; }
.wz-next { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--text-2); font-size: 13.5px; }
.wz-next b { color: var(--text); }
.wz-ack { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--warn); border-radius: 14px; background: var(--warn-soft); }
.wz-nav { position: sticky; bottom: 14px; z-index: 20; display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.wz-hint { margin-right: auto; margin-left: 6px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.wz-nav [data-back] { margin-right: 0; }
.wz-nav .btn-primary { min-width: 150px; height: 42px; }
@media (max-width: 1000px) { .wz-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wz-review { grid-template-columns: 1fr; } .wz-cap { grid-template-columns: 1fr; gap: 6px; } .wz-cap b { text-align: left; } }
@media (max-width: 720px) { .wz-steps { grid-template-columns: repeat(5, auto); overflow-x: auto; } .wz-label { display: none; } .is-current .wz-label { display: inline; } .wz-step { width: auto; } .wz-steps li + li::before { display: none; } }


/* ==== Motion (single source) ======================================================================
   Content rises in once per page, lists follow one after another, the menus never move. */
html { scroll-behavior: auto; }
.content > * { animation: rise .42s var(--ease, cubic-bezier(.2, .8, .2, 1)) both; }
.content > *:nth-child(2) { animation-delay: .04s; } .content > *:nth-child(3) { animation-delay: .08s; } .content > *:nth-child(n+4) { animation-delay: .12s; }
.sl-row, .an-kpi, .ov-tile, .loc, .ov-machine, .pg-card:not(.is-loading), .mp-group, .ext, .pl-row, .pg-row, .ov-srv, .ov-item, .an-player,
.tile, .table tbody tr, .hm-card, .hm-srv, .iv-step, .tk-row, .ad-card, .ws-card, .af-row, .af-ch {
    animation: rise .45s var(--ease, cubic-bezier(.2, .8, .2, 1)) both; animation-delay: calc(min(var(--i, 0), 10) * 30ms + .05s);
}
.banner img, .egg-img img, .pg-ico, .pl-ava { animation: fade .35s ease both; }
.sv-cover img { animation: cover-in .8s var(--ease, cubic-bezier(.2, .8, .2, 1)) both; }
@keyframes cover-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }

/* Pictures can't be dragged out or selected with the mouse. */
img, svg, .banner, .egg-img, .avatar, .rail-mark, .sv-cover { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}
/* ---- Artifacts (FiveM / RedM) ---------------------------------------------------------------- */
.af-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.af-main, .af-side { display: grid; gap: 16px; min-width: 0; }
.af-channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.af-ch { display: grid; align-content: start; gap: 6px; min-height: 172px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.af-ch.is-main { border-color: color-mix(in srgb, var(--brand, var(--accent)) 45%, var(--line)); }
.af-ch-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.af-ch-name { color: var(--text-2); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.af-ch-build { font-size: 30px; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; }
.af-ch p { margin: 0 0 6px; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.af-ch .btn, .af-ch > .pill { justify-self: start; margin-top: auto; }
.af-ch.is-loading i { display: block; height: 12px; border-radius: 6px; background: var(--surface-2); animation: pulse 1.4s ease-in-out infinite; }
.af-ch.is-loading i:nth-child(1) { width: 40%; } .af-ch.is-loading i:nth-child(2) { width: 60%; height: 28px; } .af-ch.is-loading i:nth-child(3) { width: 85%; }
.af-q { width: 180px; flex: 0 0 auto; }
.af-list { display: grid; max-height: 560px; overflow: auto; border-top: 1px solid var(--line); }
.af-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; min-height: 52px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.af-row:last-child { border-bottom: 0; }
.af-row > strong { font-size: 14px; font-weight: 650; }
.af-hash { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.af-tags { display: flex; gap: 6px; }
.af-tag[data-ch="recommended"] { background: color-mix(in srgb, var(--brand, var(--accent)) 16%, transparent); color: var(--text); }
.af-act { display: flex; justify-content: flex-end; min-width: 96px; }
.af-cur { background: color-mix(in srgb, #22c55e 16%, transparent); color: #22c55e; }
.pill[data-tone="danger"] { background: color-mix(in srgb, #ef4444 14%, transparent); color: #ef4444; }
.af-empty { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 20px; color: var(--text-3); font-size: 13px; }
.af-tx { display: grid; gap: 10px; }
.af-tx-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.af-tx-row > span { color: var(--text-3); }
.af-tx-row .copy { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-ok { color: #22c55e; } .af-ok i { margin-right: 6px; }
.af-tx .btn { justify-content: center; }
.af-steps { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; line-height: 1.45; }
[data-af].is-busy .af-list, [data-af].is-busy .af-channels { opacity: .6; pointer-events: none; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: af-spin .7s linear infinite; }
@keyframes af-spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) { .af-layout { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .af-channels { grid-template-columns: 1fr; } .af-row { grid-template-columns: 70px minmax(0, 1fr) auto; } .af-tags { display: none; } }


/* ---- Support tickets ------------------------------------------------------------------------- */
.tk-list { display: grid; gap: 8px; }
.tk-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: inherit; }
.tk-row.is-unread { border-color: color-mix(in srgb, var(--brand, var(--accent)) 40%, var(--line)); }
.tk-row.is-unread .tk-main strong::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--brand, var(--accent)); vertical-align: middle; }
.tk-ref { color: var(--text-3); font-size: 12px; }
.tk-main { display: grid; gap: 3px; min-width: 0; }
.tk-main strong { overflow: hidden; font-size: 14.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.tk-main small, .tk-when { color: var(--text-3); font-size: 12.5px; }
.tk-when { white-space: nowrap; }
.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.tk-col, .tk-side { display: grid; gap: 14px; min-width: 0; }
.tk-thread { display: grid; gap: 12px; }
.tk-msg { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.tk-msg.is-staff { border-left: 3px solid var(--brand, var(--accent)); }
.tk-msg.is-note { border-style: dashed; background: color-mix(in srgb, var(--warn) 6%, var(--surface)); border-left: 3px solid var(--warn); }
.tk-msg header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tk-who { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; }
.tk-who strong { font-size: 14px; }
.tk-msg time { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.tk-body { color: var(--text); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.tk-ghost { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--text-3); font-size: 12px; }
.tk-reply { display: grid; gap: 12px; padding: 16px; }
.tk-reply.is-note { border-color: var(--warn); }
.tk-text { min-height: 150px; }
.tk-reply-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tk-mode { justify-self: start; }
.tk-closed { display: flex; align-items: center; gap: 10px; padding: 16px 20px; color: var(--text-2); font-size: 14px; }
.tk-closed i { color: var(--good); }
.tk-meta dl { display: grid; margin: 0; }
.tk-meta dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tk-meta dl > div:last-child { border-bottom: 0; }
.tk-meta dt { color: var(--text-3); }
.tk-meta dd { margin: 0; color: var(--text); font-weight: 600; text-align: right; }
.tk-pri { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tk-pri[data-p="high"] { color: var(--warn); }
.tk-pri[data-p="urgent"] { color: var(--bad); }
.tk-table tr.is-unread td:first-child strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--brand, var(--accent)); vertical-align: middle; }
.tk-cust { display: grid; gap: 14px; }
.tk-cust-top, .tk-srv { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tk-cust-top span, .tk-srv span { display: grid; min-width: 0; }
.tk-cust-top small, .tk-srv small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tk-srv { padding: 10px; border: 1px solid var(--line); border-radius: 12px; color: inherit; }
.tk-hist { display: grid; gap: 6px; }
.tk-hist a { display: flex; gap: 10px; color: var(--text-2); font-size: 12.5px; }
.tk-hist a .mono { color: var(--text-3); }
.tk-del { width: 100%; justify-content: center; color: var(--bad); }
@media (max-width: 1000px) { .tk-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .tk-row { grid-template-columns: minmax(0, 1fr) auto; } .tk-ref, .tk-when { display: none; } }

/* ---- Workspace menu -------------------------------------------------------------------------- */
.ws-switch { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: inherit; }
.ws-switch > span { display: grid; min-width: 0; }
.ws-switch strong { overflow: hidden; font-size: 14px; font-weight: 650; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.ws-switch small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sub-item span.sub-badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand, var(--accent)); color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }

/* ---- Integrations (API & WHMCS) -------------------------------------------------------------- */
.int-grid { display: grid; gap: 16px; max-width: 1100px; }
.int-whmcs { padding: 22px; }
.int-whmcs-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.int-logo { display: grid; place-items: center; width: 84px; height: 84px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-2); cursor: pointer; }
.int-logo img { width: 100%; height: 100%; padding: 10px; object-fit: contain; }
.int-logo-text { color: var(--text); font-size: 16px; font-weight: 800; letter-spacing: .04em; }
.int-whmcs-title h2 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.int-whmcs-title p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.int-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.int-step { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.int-step b { display: grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand, var(--accent)); color: #fff; font-size: 12.5px; }
.int-step div { display: grid; gap: 3px; min-width: 0; }
.int-step strong { font-size: 13.5px; }
.int-step span { color: var(--text-2); font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.int-caps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.int-caps .pill i { color: var(--good); font-size: 10px; }
.int-logo-remove, .int-logo-hint { margin-top: 14px; }
.int-access { display: flex; flex-wrap: wrap; gap: 4px; }
.int-perms { display: grid; gap: 8px; }
.int-perm { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; }
@media (max-width: 1000px) { .int-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .int-whmcs-head { grid-template-columns: auto 1fr; } .int-whmcs-head .btn { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 600px) { .int-steps { grid-template-columns: 1fr; } .int-perm { flex-direction: column; align-items: flex-start; } }
a.hm-stat { color: inherit; }
.ws-name { display: flex; align-items: center; gap: 10px; }
.ws-edit { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text-3); font-size: 12px; cursor: pointer; }
.ws-rename { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ws-rename .input { width: 280px; height: 40px; font-size: 16px; font-weight: 600; }
.ws-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; margin-top: 28px; }
.ws-lines { display: grid; }
.ws-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 50px; padding: 0 20px; border-bottom: 1px solid var(--line); color: inherit; font-size: 13px; }
.ws-line:last-child { border-bottom: 0; }
.ws-line strong { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ws-line .faint { font-size: 12px; white-space: nowrap; }
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand, var(--accent)); }
.ws-quiet { display: flex; align-items: center; gap: 10px; padding: 26px 20px; color: var(--text-3); font-size: 13px; }
@media (min-width: 701px) and (max-width: 1200px) { .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hm-stat:nth-child(3) { border-left: 0; } .hm-stat:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 900px) { .ws-panels { grid-template-columns: 1fr; } }
.int-step div { align-content: start; }

/* ---- Admin overview: platform strip ---------------------------------------------------------- */
.ov-ver { display: inline-flex; align-items: center; height: 24px; margin-left: 10px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-2); font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0; vertical-align: middle; }
.ov-sys { display: grid; grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr)); margin: 0 0 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.ov-sys > * { display: grid; align-content: start; gap: 2px; padding: 16px 20px; color: inherit; }
.ov-sys > * + * { border-left: 1px solid var(--line); }
.ov-sys-k { color: var(--text-3); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ov-sys strong { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.ov-sys strong.mono { font-size: 15px; line-height: 1.6; }
.ov-sys small { color: var(--text-3); font-size: 12px; }
.ov-sys-brand { background: color-mix(in srgb, var(--brand, var(--accent)) 9%, var(--surface)); }
.ov-sys-brand strong { font-family: var(--mono); }
.ov-ok { color: var(--good); } .ov-off { color: var(--text-3); }
@media (max-width: 1100px) { .ov-sys { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-sys > * + * { border-left: 0; } .ov-sys > * { border-top: 1px solid var(--line); } .ov-sys > *:first-child { grid-column: 1 / -1; border-top: 0; } }

/* ---- Error pages ------------------------------------------------------------------------------ */
.err-body { min-height: 100vh; margin: 0; background: var(--bg); }
.err { --tone: var(--brand, var(--accent)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 64px; max-width: 1080px; min-height: 100vh; margin: 0 auto; padding: 48px 32px; }
.err[data-kind="down"] { --tone: var(--bad); }
.err[data-kind="lost"], .err[data-kind="busy"], .err[data-kind="expired"] { --tone: var(--warn); }
.err-scene { display: grid; grid-template-columns: auto minmax(150px, 1fr) auto; align-items: center; gap: 0; animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.err-rack { display: grid; gap: 8px; width: 200px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.err-unit { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.err-led { width: 6px; height: 6px; border-radius: 50%; background: var(--good); opacity: .25; animation: err-blink 2.4s ease-in-out infinite; animation-delay: calc(var(--u) * .3s); }
.err-led:nth-child(2) { animation-delay: calc(var(--u) * .3s + .4s); }
.err-led:nth-child(3) { background: var(--tone); animation: err-blink-tone 1.6s ease-in-out infinite; animation-delay: calc(var(--u) * .2s); }
.err-vents { display: flex; flex: 1; justify-content: center; gap: 3px; }
.err-vents i { width: 2px; height: 14px; border-radius: 2px; background: var(--line); }
.err-disk { width: 18px; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; position: relative; }
.err-disk::after { content: ""; position: absolute; inset: 0; background: var(--text-3); transform: translateX(-100%); animation: err-disk 1.8s ease-in-out infinite; animation-delay: calc(var(--u) * .45s); }
.err-link { position: relative; height: 40px; }
.err-wire { position: absolute; top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
.err-packet { position: absolute; top: 50%; right: 0; width: 8px; height: 8px; margin-top: -4px; border-radius: 2px; background: var(--tone); opacity: 0; animation: err-packet 2.7s cubic-bezier(.45, 0, .25, 1) infinite; animation-delay: calc(var(--d, 0) * .9s); }
.err-gap { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--tone); font-size: 15px; animation: err-bob 3.2s ease-in-out infinite; }
.err-client { display: grid; place-items: center; width: 76px; height: 76px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text-2); font-size: 26px; }
.err-copy { display: grid; justify-items: start; gap: 12px; animation: rise .7s .12s cubic-bezier(.2, .7, .2, 1) both; }
.err-code { color: var(--tone); font-size: 15px; font-weight: 700; letter-spacing: .12em; }
.err-copy h1 { margin: 0; font-size: clamp(32px, 4.4vw, 52px); font-weight: 650; letter-spacing: -.04em; line-height: 1.05; }
.err-copy p { max-width: 440px; margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.err-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.err-ref { margin-top: 18px; color: var(--text-3); font-size: 12px; }
.err[data-kind="maintenance"] .err-packet { animation-play-state: paused; opacity: .35; }
.err[data-kind="maintenance"] .err-led:nth-child(3) { background: var(--warn); }
@keyframes err-blink { 0%, 100% { opacity: .25; } 45% { opacity: 1; } }
@keyframes err-blink-tone { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes err-disk { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
/* Packets leave the client and fade out at the break in the line. */
@keyframes err-packet { 0% { right: 0; opacity: 0; } 10% { opacity: 1; } 38% { opacity: 1; } 50% { right: calc(50% - 4px); opacity: 0; } 100% { right: calc(50% - 4px); opacity: 0; } }
@keyframes err-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (max-width: 860px) { .err { grid-template-columns: 1fr; gap: 40px; padding: 40px 22px; } .err-scene { order: 2; } .err-rack { width: 160px; } }
@media (prefers-reduced-motion: reduce) { .err *, .err { animation: none !important; } .err-led { opacity: 1; } }
.sub-ver { margin-left: 6px; color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: 0; vertical-align: middle; }

/* ---- Theme toggle: moon ⇄ sun ---------------------------------------------------------------- */
.theme-ico { display: block; overflow: visible; transform: rotate(0deg); transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
.theme-core { transform-origin: 12px 12px; transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
.theme-cut { transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
.theme-rays { transform-origin: 12px 12px; opacity: 0; transform: scale(.4) rotate(-45deg); transition: opacity .35s ease, transform .6s cubic-bezier(.34, 1.4, .64, 1); }
[data-theme="light"] .theme-ico { transform: rotate(90deg); }
[data-theme="light"] .theme-core { transform: scale(.62); }
[data-theme="light"] .theme-cut { transform: translate(9px, -9px); }
[data-theme="light"] .theme-rays { opacity: 1; transform: scale(1) rotate(0deg); transition-delay: .12s, .12s; }
/* Colours glide for a moment while the theme switches. */
html.theme-switching, html.theme-switching * { transition: background-color .45s ease, border-color .45s ease, color .45s ease, fill .45s ease !important; }
html.theme-switching .theme-ico, html.theme-switching .theme-core, html.theme-switching .theme-cut, html.theme-switching .theme-rays { transition: transform .6s cubic-bezier(.65, 0, .35, 1), opacity .35s ease !important; }
@media (prefers-reduced-motion: reduce) { .theme-ico, .theme-core, .theme-cut, .theme-rays { transition: none !important; } }

/* ---- Workspace: icon rail only, account tabs ------------------------------------------------- */
.rail-ico { position: relative; }
.rail-dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border: 2px solid var(--surface); border-radius: 50%; background: var(--brand, var(--accent)); }
.acc-tabs { margin-bottom: 22px; }

/* ==== v1.9 — egg pictures without a frame ======================================================= */
.egg-img.has-img { overflow: visible; border-radius: 0; background: none !important; box-shadow: none !important; }
.egg-img.has-img img { object-fit: contain; }

/* ==== v1.9 — server header ===================================================================== */
.hero { margin-bottom: 20px; border-radius: 24px; background: #0b0c10; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07); }
.hero-bg::after { background:
    linear-gradient(100deg, rgb(8 9 12 / .94) 0%, rgb(8 9 12 / .82) 38%, rgb(8 9 12 / calc(var(--bn-dim, .55) - .05)) 78%, rgb(8 9 12 / calc(var(--bn-dim, .55) - .15)) 100%),
    linear-gradient(0deg, rgb(8 9 12 / .55), transparent 60%); }
.hero-bg > img { animation: hero-pan 1.4s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes hero-pan { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
.hero-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 26px; min-height: 172px; padding: 28px 32px; }
.hero-icon { box-shadow: none; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .55)); animation: hero-icon-in .8s .1s cubic-bezier(.2, .8, .2, 1) both; }
.hero-icon.is-empty { border-radius: 24px; background: rgba(255, 255, 255, .06) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08) !important; filter: none; }
@keyframes hero-icon-in { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
.hero-main { display: grid; gap: 10px; min-width: 0; }
.hero-kicker { display: flex; align-items: center; gap: 12px; }
.hero-game { color: rgba(255, 255, 255, .55); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hero-main h1 { margin: 0; overflow: hidden; color: #fff; font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.hero-state { height: 24px; padding: 0 10px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: rgba(255, 255, 255, .72); font-size: 13px; }
.hero-addr { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 9px; background: rgba(0, 0, 0, .35); color: #fff; font-size: 12.5px; cursor: pointer; backdrop-filter: blur(6px); }
.hero-addr i { color: rgba(255, 255, 255, .5); font-size: 11px; }
.hero-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.hero-loc { color: rgba(255, 255, 255, .8); }
.hero-loc .flag { width: 18px; height: 13px; border-radius: 2px; }
.hero-node { display: inline-flex; align-items: center; gap: 7px; }
.hero-node i { color: rgba(255, 255, 255, .45); font-size: 11px; }
.hero-switch { display: inline-flex; align-items: center; gap: 7px; margin-left: 4px; color: rgba(255, 255, 255, .55); font-size: 12.5px; font-weight: 600; }
.hero-switch i { font-size: 11px; }
.hero-power { display: flex; gap: 4px; padding: 5px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; background: rgba(0, 0, 0, .42); backdrop-filter: blur(10px); }
.hero-btn { height: 42px; padding: 0 16px; border: 0; border-radius: 11px; background: transparent; color: rgba(255, 255, 255, .88); font-size: 13.5px; font-weight: 650; transition: background-color .25s ease, color .25s ease, opacity .25s ease; }
.hero-btn i { color: var(--bc); font-size: 12px; }
.hero-btn.is-icon { width: 42px; padding: 0; justify-content: center; }
.hero-btn[data-tone="start"]:not(:disabled) { background: #22c55e; color: #04130a; }
.hero-btn[data-tone="start"]:not(:disabled) i { color: inherit; }
.hero-btn[data-tone="stop"]:not(:disabled) { background: rgba(239, 68, 68, .16); }
.hero-btn:disabled { opacity: .32; }
@media (max-width: 1100px) { .hero-in { grid-template-columns: auto minmax(0, 1fr); } .hero-power { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 640px) { .hero-in { gap: 16px; padding: 22px 18px; } .hero-icon { --sz: 64px !important; } .hero-main h1 { font-size: 24px; } .hero-power { width: 100%; } .hero-btn { flex: 1; justify-content: center; } .hero-btn span { display: none; } }

/* ==== v1.9 — server analytics =================================================================== */
.ga-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.ga { --lv: var(--brand, var(--accent)); position: relative; display: grid; align-content: start; gap: 16px; min-height: 168px; padding: 18px 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.ga[data-level="good"] { --lv: #22c55e; } .ga[data-level="warn"] { --lv: #f59e0b; } .ga[data-level="bad"] { --lv: #ef4444; } .ga[data-level="none"] { --lv: var(--text-3); }
.ga-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ga-k { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ga-k i { font-size: 11px; }
.ga-state { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; background: color-mix(in srgb, var(--lv) 14%, transparent); color: var(--lv); font-size: 11.5px; font-weight: 650; white-space: nowrap; transition: color .5s ease, background-color .5s ease; }
.ga-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ga-state.is-plain { --lv: var(--text-2); }
.ga-body { display: flex; align-items: center; gap: 18px; }
.ga-ring { position: relative; flex: none; width: 92px; height: 92px; }
.ga-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ga-track { fill: none; stroke: var(--surface-2); stroke-width: 9; }
.ga-arc { fill: none; stroke: var(--lv); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .9s cubic-bezier(.2, .8, .2, 1), stroke .5s ease, opacity .3s ease; }
.ga-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ga-text { display: grid; gap: 4px; min-width: 0; }
.ga-text b { overflow: hidden; font-size: 26px; font-weight: 650; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ga-text small { color: var(--text-3); font-size: 12.5px; }
.ga-net { padding-bottom: 62px; }
.ga-net-v { display: grid; gap: 6px; }
.ga-net-v span { display: flex; align-items: center; gap: 10px; }
.ga-net-v i { width: 14px; font-size: 11px; }
.ga-net-v span:first-child i { color: #22c55e; } .ga-net-v span:last-child i { color: #f59e0b; }
.ga-net-v b { font-size: 22px; }
.ga-spark { position: absolute; left: 0; right: 0; bottom: 0; display: block; width: 100%; height: 58px; }

.hx { margin-bottom: 14px; padding: 22px 24px 18px; border-radius: 22px; }
.hx-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hx-kicker { color: var(--text-3); font-size: 13px; font-weight: 500; }
.hx-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 2px; }
.hx-big b { font-size: 48px; font-weight: 700; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hx-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; }
.hx-badge:empty { display: none; }
.hx-chart { position: relative; height: 300px; margin: 18px -6px 0; transition: opacity .3s ease; }
.hx.is-loading .hx-chart { opacity: .45; }
.hx-empty { position: absolute; inset: 0 0 30px 44px; display: grid; place-items: center; color: var(--text-3); font-size: 13px; }
.hx-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.hx-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border: 1px solid transparent; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.hx-chip i { width: 8px; height: 8px; border-radius: 50%; }
.hx-chip b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.hx-chip.is-on { border-color: var(--line); background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.hx-since { margin-left: auto; color: var(--text-3); font-size: 12px; }
@media (max-width: 1200px) { .ga-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ga-row { grid-template-columns: 1fr; } .hx-big b { font-size: 36px; } .hx-chart { height: 230px; } .hx-since { margin-left: 0; width: 100%; } }

/* ==== v1.9 — classic console, controls at the bottom ============================================ */
.tc { border: 1px solid #1c1c20; border-radius: 20px; background: #0a0a0c; }
.tc .terminal-screen { height: calc(100vh - 430px); min-height: 420px; padding: 16px 4px 8px 18px; }
.tc-dock { border-top: 1px solid #1c1c20; background: #0d0d10; }
.tc .terminal-input { gap: 12px; padding: 0 18px; border-top: 0; }
.tc .terminal-input input { height: 52px; font-size: 13.5px; }
.tc-prompt { flex: none; color: #6b6b75; font-size: 12.5px; }
.tc-prompt b { margin-left: 6px; color: var(--brand, var(--accent)); font-weight: 700; }
.tc-hint { flex: none; padding: 2px 7px; border: 1px solid #26262b; border-radius: 6px; color: #6b6b75; font-family: var(--mono); font-size: 11px; }
.tc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px 10px 18px; border: 0; border-top: 1px solid #17171b; background: transparent; }
.tc-state .state { color: #a1a1aa; font-size: 12px; }
.tc .ct-count { color: #55555e; font-size: 11.5px; }
.tc .ct-filter { flex: 0 0 200px; margin-left: auto; width: 200px; height: 32px; border-color: #222227; background: #121215; }
.tc-group { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid #1f1f24; border-radius: 10px; background: #111114; }
.tc .ct-btn.ct-ico { width: 32px; height: 28px; padding: 0; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: #8b8b95; }
.tc .ct-btn[aria-pressed="true"] { background: #1f1f25; color: #f4f4f5; }
@media (max-width: 760px) { .tc-prompt, .tc-hint { display: none; } .tc .ct-filter { width: 100%; order: 5; margin-left: 0; } .tc .terminal-screen { height: 56vh; min-height: 300px; } }
.tc .terminal-screen, .tc .xterm, .tc .xterm-viewport, .tc .xterm-screen canvas { background: transparent !important; }

/* ==== v1.9.1 — server card in the sidebar ======================================================= */
.sub-crumb { display: inline-flex; align-items: center; gap: 8px; height: 30px; margin: 0 0 10px 6px; padding: 0 12px 0 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.sub-crumb i { font-size: 10px; }
.sv-card { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 2px 8px 18px; }
.sv-card-img.is-empty { border-radius: 12px; }
.sv-card-name { display: grid; gap: 3px; min-width: 0; }
.sv-card-name strong { overflow: hidden; font-size: 15.5px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.sv-card-sub { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.sv-card-state { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; font-weight: 600; }
.sv-card-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.sv-card-state[data-state="running"] { color: var(--good); } .sv-card-state[data-state="running"]::before { background: var(--good); }
.sv-card-state[data-state="starting"], .sv-card-state[data-state="stopping"], .sv-card-state[data-state="installing"], .sv-card-state[data-state="connecting"] { color: var(--warn); }
.sv-card-state[data-state="starting"]::before, .sv-card-state[data-state="stopping"]::before, .sv-card-state[data-state="installing"]::before, .sv-card-state[data-state="connecting"]::before { background: var(--warn); animation: ov-pulse 1.2s ease-in-out infinite; }
.sv-card-state[data-state="offline"], .sv-card-state[data-state="unreachable"], .sv-card-state[data-state="suspended"], .sv-card-state[data-state="install_failed"] { color: var(--bad); }
.sv-card-state[data-state="offline"]::before, .sv-card-state[data-state="unreachable"]::before, .sv-card-state[data-state="suspended"]::before, .sv-card-state[data-state="install_failed"]::before { background: var(--bad); }
.sv-card-id { padding: 0; border: 0; background: none; color: var(--text-3); font-size: 11.5px; cursor: pointer; }
.sv-card-loc { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; }
.sv-card-loc::before { content: ""; width: 3px; height: 3px; flex: none; border-radius: 50%; background: var(--text-3); opacity: .6; }
.sv-card-loc .flag { width: 15px; height: 11px; border-radius: 2px; }

/* ==== v1.9.3 — folding sidebar groups (one wrapper, so 0fr really folds every item) ============= */
.sub-items { display: grid; grid-template-rows: 1fr; gap: 0; overflow: visible; transition: grid-template-rows .32s cubic-bezier(.2, .8, .2, 1) !important; }
.sub-items-in { display: grid; gap: 2px; min-height: 0; overflow: hidden; transition: opacity .25s ease; }
.sub-group.is-collapsed .sub-items { grid-template-rows: 0fr; }
.sub-group.is-collapsed .sub-items-in { opacity: 0; }
button.sub-sec i { transition: transform .3s cubic-bezier(.2, .8, .2, 1) !important; }
.sub-group.is-collapsed button.sub-sec i { transform: rotate(-90deg); }
.groups-init .sub-items, .groups-init .sub-items-in, .groups-init button.sub-sec i { transition: none !important; }

/* ==== v1.9.3 — sign-in page layouts and backgrounds ============================================= */
.auth[data-layout="reverse"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth[data-layout="reverse"] .auth-art { order: 2; }
.auth[data-layout="center"] { position: relative; display: grid; grid-template-columns: 1fr; place-items: center; padding: 10px; }
.auth[data-layout="center"] .auth-art { position: fixed; inset: 10px; }
.auth[data-layout="center"] .auth-art-copy { display: none; }
.auth[data-layout="center"] .auth-side { position: relative; z-index: 1; width: min(460px, 100%); padding: 0; }
.auth[data-layout="center"] .auth-card { width: 100%; padding: 36px 34px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6); }
.auth[data-bg="gradient"] .auth-art { background:
    radial-gradient(120% 90% at 0% 100%, color-mix(in srgb, var(--art) 55%, transparent), transparent 60%),
    radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--art) 30%, transparent), transparent 60%), #08090c; }
.auth[data-bg="solid"] .auth-art { background: color-mix(in srgb, var(--art) 22%, #09090b); }
.auth[data-bg="image"] .auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(0 0 0 / calc(var(--art-dim) + .2)), rgb(0 0 0 / var(--art-dim)) 60%); }
.auth-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: hero-pan 1.6s cubic-bezier(.2, .8, .2, 1) both; }
.auth-brand, .auth-art-copy { z-index: 2; }
.auth-features { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.auth-features li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .86); font-size: 14.5px; }
.auth-features i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: color-mix(in srgb, var(--art) 35%, rgba(255, 255, 255, .06)); color: #fff; font-size: 10px; }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-foot a { color: var(--text-3); font-size: 13px; font-weight: 500; }
@media (max-width: 900px) { .auth[data-layout="reverse"] .auth-art { order: 0; } }

/* Admin editor pickers */
.layout-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.layout-opt input, .font-opt input { position: absolute; opacity: 0; pointer-events: none; }
.layout-opt span { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; color: var(--text-2); font-size: 12.5px; font-weight: 600; text-align: center; cursor: pointer; }
.layout-opt input:checked + span, .font-opt input:checked + span { border-color: var(--accent); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.lo { display: flex; gap: 4px; height: 54px; padding: 4px; border-radius: 9px; background: var(--surface-2); }
.lo em { flex: 1; border-radius: 6px; background: var(--surface-3); }
.lo em:first-child { background: color-mix(in srgb, var(--accent) 45%, var(--surface-3)); }
.lo-reverse { flex-direction: row-reverse; }
.lo-center { position: relative; background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); }
.lo-center em:first-child { display: none; }
.lo-center em { position: absolute; inset: 12px 30%; background: var(--surface); }
.font-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.font-opt span { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text-2); font-size: 13.5px; cursor: pointer; }
.font-opt b { color: var(--text); font-size: 18px; font-weight: 650; }
.signin-preview { position: sticky; top: 20px; align-self: start; }

/* ==== Dashboard: spotlight server + instances (uses --accent, so it follows the brand color) ======= */
.fx { display: grid; gap: 34px; }
.fx-stage { position: relative; isolation: isolate; display: grid; gap: 22px; }
.fx-bg { position: absolute; z-index: -1; inset: -36px -14px auto -14px; height: 560px; overflow: hidden; border-radius: 20px; pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%), linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(to bottom, #000 45%, transparent 100%), linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
    -webkit-mask-composite: source-in; mask-composite: intersect; }
.fx-bg[hidden] { display: none; }
.fx .fx-bg.banner, .fx .fx-bg.banner.is-empty, :root:not([data-theme="dark"]) .fx .fx-bg.banner.is-empty { background: transparent; }
.fx-bg > img { position: absolute; inset: auto; left: -12px; top: -12px; width: calc(100% + 24px); height: calc(100% + 24px); max-width: none; object-fit: cover; filter: blur(calc(var(--bn-blur, 14px) * .2)) saturate(1.15); animation: fx-in .6s ease both; }
.fx-bg::after { content: ""; position: absolute; inset: 0; background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 40%, transparent) 0%, color-mix(in srgb, var(--surface) 70%, transparent) 60%, var(--surface) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--surface) 55%, transparent), transparent 70%); }
@keyframes fx-in { from { opacity: 0; } to { opacity: 1; } }

.fx-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 18px; }
.fx-top h1 { font-size: 28px; font-weight: 650; letter-spacing: -.03em; }
.fx-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--text-2); font-size: 13.5px; }
.fx-sub b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.fx-sub i.fa-solid { color: var(--text-3); font-size: 12px; margin-right: 2px; }
.fx-sep { width: 3px; height: 3px; margin: 0 8px; border-radius: 50%; background: var(--text-3); }

.fx-hero { display: grid; gap: 18px; padding-top: 26px; }
.fx-hero[hidden] { display: none; }
.fx-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-pill { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 99px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); color: var(--text-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; backdrop-filter: blur(6px); }
.fx-pill i { font-size: 10px; color: var(--text-3); }
.fx-pill[data-state]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); transition: background-color .3s ease; }
.fx-pill[data-state="running"]::before { background: var(--good); }
.fx-pill[data-state="starting"]::before, .fx-pill[data-state="stopping"]::before, .fx-pill[data-state="installing"]::before, .fx-pill[data-state="restoring_backup"]::before { background: var(--warn); }
.fx-pill[data-state="offline"]::before, .fx-pill[data-state="unreachable"]::before, .fx-pill[data-state="install_failed"]::before, .fx-pill[data-state="suspended"]::before { background: var(--bad); }

.fx-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.fx-title-text { min-width: 0; }
.fx-title h2 { overflow: hidden; font-size: 38px; font-weight: 700; letter-spacing: -.035em; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap; }
.fx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 8px; color: var(--text-2); font-size: 13px; }
.fx-addr { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text-2); cursor: pointer; font-size: 12.5px; }
.fx-addr i { color: var(--text-3); font-size: 10.5px; }
.fx-addr:hover { color: var(--text); }

.fx-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 6px; }
.fx-stats { display: grid; grid-template-columns: repeat(4, minmax(86px, 1fr)); min-width: min(100%, 440px); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 16px; background: color-mix(in srgb, var(--surface) 55%, transparent); backdrop-filter: blur(10px); }
.fx-stat { position: relative; display: grid; gap: 3px; padding: 14px 18px 14px; border-left: 1px solid var(--line); }
.fx-stat:first-child { border-left: 0; }
.fx-stat b { font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fx-stat span { color: var(--text-3); font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.fx-stat .bar { position: absolute; left: 0; right: 0; bottom: 0; display: block; height: 2px; }
.fx-stat .bar i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .8s cubic-bezier(.2, .8, .2, 1); }

.fx-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 11px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); color: var(--text); font-size: 12.5px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(8px); transition: background-color .2s, border-color .2s, color .2s, opacity .2s; }
.fx-btn i { font-size: 11px; }
.fx-btn:hover { border-color: var(--text-3); }
.fx-btn.is-accent { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); color: var(--accent); }
.fx-btn.is-accent:hover:not(:disabled) { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.fx-btn.is-accent[data-action="stop"] { border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: var(--bad-soft); color: var(--bad); }
.fx-btn.is-accent[data-action="stop"]:hover:not(:disabled) { border-color: var(--bad); background: var(--bad); color: #fff; }
.fx-btn:disabled { opacity: .4; cursor: not-allowed; }
.fx-btn.is-sm { height: 30px; padding: 0 11px; border-radius: 9px; font-size: 11px; }

.fx-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fx-list-head h3 { font-size: 14px; font-weight: 650; }
.fx-list-head h3 span { margin-left: 8px; color: var(--text-3); font-weight: 500; }
.fx-list-head a { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.fx-list-head a i { font-size: 11px; }
.fx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-inst { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); transition: border-color .2s, background-color .2s; }
.fx-inst:hover { border-color: var(--line-strong); }
.fx-inst.is-spot { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
.fx-inst-main { display: grid; flex: 1; gap: 3px; min-width: 0; }
.fx-inst-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fx-inst-name strong { display: block; overflow: hidden; font-size: 14.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.fx-badge { display: inline-flex; align-items: center; gap: 5px; height: 19px; padding: 0 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 650; white-space: nowrap; }
.fx-badge[hidden] { display: none; }
.fx-badge i { font-size: 9px; }
.fx-inst-sub { display: flex; align-items: center; gap: 7px; overflow: hidden; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.fx-inst-sub .flag { width: 16px; height: 12px; border-radius: 2px; }
.fx-inst a.stretch::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 14px; }
.fx-inst-side { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; }
.fx-icon-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--text-3); cursor: pointer; transition: background-color .2s, color .2s; }
.fx-icon-btn i { font-size: 12px; }
.fx-icon-btn:hover { background: var(--surface-3); color: var(--text); }
.fx-inst.is-spot .fx-icon-btn { color: var(--accent); }
.fx-new { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--text-3); font-size: 13px; font-weight: 600; transition: color .2s, border-color .2s, background-color .2s; }
.fx-new:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

@media (max-width: 1000px) { .fx-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
    .fx-title h2 { font-size: 28px; }
    .fx-egg { --sz: 44px !important; }
    .fx-stats { grid-template-columns: repeat(2, 1fr); width: 100%; }
    .fx-stat:nth-child(3) { border-left: 0; }
    .fx-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
    .fx-actions, .fx-actions .fx-btn { width: 100%; }
    .fx-actions .fx-btn { flex: 1; }
    .fx-inst-side .fx-pill { display: none; }
}

/* Logo above the sign-in form (Admin → Settings → Branding / Sign-in page) */
.auth-logo { display: flex; margin: 0 0 28px; }
.auth-logo[data-align="center"] { justify-content: center; }
.auth-logo img { display: block; height: var(--logo-h, 48px); width: auto; max-width: 100%; object-fit: contain; }
.auth-logo svg { width: var(--logo-h, 48px); height: var(--logo-h, 48px); padding: calc(var(--logo-h, 48px) * .14); border-radius: calc(var(--logo-h, 48px) * .24); color: #fff; background: var(--accent); }
.upload-thumb.is-bg { width: 168px; height: 72px; padding: 0; }
.upload-thumb.is-bg img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb.is-side { width: 168px; height: 72px; padding: 10px; background: var(--surface-2); }
.upload-thumb.is-side img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- OWNodes sign-in hero (animated logo) ------------------------------------ */
.auth-hero { display: flex; justify-content: center; margin: 0 0 18px; }
.orbit-stage { --g: var(--accent, #22e58b); position: relative; width: 190px; height: 190px; display: grid; place-items: center; }
.orbit-stage > * { position: absolute; }
.orbit-logo { position: relative; width: 84px; height: 84px; border-radius: 24px; object-fit: cover; z-index: 3; box-shadow: 0 0 0 1px color-mix(in srgb, var(--g) 35%, transparent), 0 14px 40px -10px color-mix(in srgb, var(--g) 70%, transparent); animation: orbit-float 5s ease-in-out infinite; }
.orbit-glow { inset: 28px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--g) 45%, transparent), transparent 72%); filter: blur(6px); animation: orbit-breathe 3.6s ease-in-out infinite; }
.orbit-sweep { inset: 6px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 62%, color-mix(in srgb, var(--g) 55%, transparent) 100%); -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); animation: orbit-spin 3.2s linear infinite; }
.orbit-ring { border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--g) 45%, transparent); }
.orbit-ring.r1 { inset: 22px; animation: orbit-spin 14s linear infinite; }
.orbit-ring.r2 { inset: 0; border-style: solid; border-color: color-mix(in srgb, var(--g) 22%, transparent); animation: orbit-spin 22s linear infinite reverse; }
.orbit-ring.r3 { inset: 11px; border: 0; animation: orbit-spin 9s linear infinite; }
.orbit-ring i { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--g); box-shadow: 0 0 12px 2px var(--g); }
.orbit-ring.r1 i { width: 6px; height: 6px; margin-left: -3px; top: -3px; }
.orbit-ring.r2 i { background: #fff; box-shadow: 0 0 10px 2px color-mix(in srgb, var(--g) 80%, #fff); }
.orbit-ring.r3 i:nth-child(2) { top: auto; bottom: -4px; width: 5px; height: 5px; opacity: .7; }
.orbit-pulse { inset: 38px; border-radius: 50%; border: 1.5px solid var(--g); opacity: 0; animation: orbit-pulse 3.6s ease-out infinite; }
.orbit-pulse.p2 { animation-delay: 1.8s; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes orbit-float { 50% { transform: translateY(-4px) scale(1.03); } }
@keyframes orbit-breathe { 50% { transform: scale(1.18); opacity: .7; } }
@keyframes orbit-pulse { 0% { transform: scale(.7); opacity: .65; } 100% { transform: scale(1.75); opacity: 0; } }
.auth-card h1 { text-align: center; }
.auth-card > p { text-align: center; }
.auth .btn-primary { box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 80%, transparent); transition: transform .15s ease, box-shadow .2s ease, filter .2s ease; }
.auth .btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--accent) 90%, transparent); }
.auth .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.auth-features i { background: color-mix(in srgb, var(--art) 40%, rgba(255, 255, 255, .05)); }
@media (prefers-reduced-motion: reduce) { .orbit-stage *, .orbit-logo { animation: none !important; } }
