/* CheatHunterAC panel — same graphite / silver theme and silk backdrop as the landing (home.css) */
:root {
  --bg: #101011;
  --side: #131315;
  --panel: #18181a;
  --panel-2: #1d1d20;
  --ink: #f3f3f5;
  --muted: #a6a6ae;
  --faint: #85858d;
  --border: rgba(255, 255, 255, 0.07);
  --border-hi: rgba(255, 255, 255, 0.14);
  --accent: #e4e6ea;
  --accent-ink: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.07);
  --ok: #7fe3a0;
  --warn: #f2c46d;
  --danger: #ff7b7b;
  --font: 'Manrope', system-ui, sans-serif;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --side-w: 244px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; }
body { min-height: 100vh; color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--accent); text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
code, pre { font-family: var(--mono); font-size: 0.86em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 100; background: var(--accent); color: #111113; padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.label { font-size: 0.8rem; font-weight: 600; color: var(--faint); letter-spacing: 0.01em; }

/* ══ SHELL ══ */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.25rem 0.9rem 0.9rem;
  background: var(--side); border-right: 1px solid var(--border); z-index: 30; }
.side-brand { display: flex; align-items: center; gap: 0.65rem; padding: 0.25rem 0.55rem; color: var(--ink); font: 600 1rem var(--display); letter-spacing: -0.02em; }
.side-brand img { border-radius: 50%; box-shadow: 0 0 0 1px var(--border-hi); }
.side-brand b { color: inherit; font-weight: 600; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav button { position: relative; display: flex; align-items: center; gap: 0.7rem; width: 100%; padding: 0.6rem 0.75rem; border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: 0.93rem; text-align: left; transition: background .15s, color .15s; }
.side-nav button:hover { background: rgba(255, 255, 255, 0.04); color: var(--ink); }
.side-nav button.active { background: var(--accent-soft); color: var(--ink); }
.side-nav button.active::before { content: ''; position: absolute; left: -0.9rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-nav button.active svg { color: var(--accent); }
.side-account { margin-top: auto; display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #2a2a2e, #45454b); color: var(--ink); font: 700 0.85rem var(--display); flex-shrink: 0; }
.acc-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acc-text strong { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-text span { font: 0.74rem var(--mono); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-scrim { display: none; }

.main-col { position: relative; min-width: 0; }
/* the landing's silk backdrop (site-shader.js) behind the panel, under a fixed veil */
body { background: transparent; }
.site-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(120, 140, 190, 0.12) 45%, transparent 60%), radial-gradient(70% 60% at 85% 10%, rgba(140, 140, 150, 0.16), transparent 70%), var(--bg); }
.site-bg::after { content: ''; position: absolute; inset: 0; background: var(--bg); opacity: 0.45; }
.site-shader { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.75rem; height: 58px; padding: 0 2rem;
  background: rgba(16, 16, 18, 0.9); border-bottom: 1px solid var(--border); }
.crumb { font-weight: 600; color: var(--muted); font-size: 0.9rem; }
.topbar .menu-btn { display: none; }
.api-state { margin-left: auto; display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 600; color: var(--muted);
  padding: 0.35rem 0.75rem; border: 1px solid var(--border); border-radius: 999px; background: rgba(22, 22, 24, 0.7); }
.api-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.api-state[data-state="ok"] i { background: var(--ok); box-shadow: 0 0 0 0 rgba(127, 227, 160, 0.6); animation: ping 2.4s infinite; }
.api-state[data-state="down"] i { background: var(--danger); }
.api-state[data-state="demo"] i { background: var(--warn); }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(127, 227, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 227, 160, 0); } }
.demo-banner { position: relative; z-index: 1; margin: 1rem 2rem 0; padding: 0.7rem 1rem; border: 1px solid rgba(242, 196, 109, 0.3); border-radius: 12px;
  background: rgba(242, 196, 109, 0.08); color: #f3dcae; font-size: 0.88rem; }

.canvas { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 2.4rem 2rem 4rem; }
.page { display: none; }
.page.active { display: block; animation: rise .45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; }
h1 { font: 700 clamp(1.55rem, 2.6vw, 2rem)/1.15 var(--display); letter-spacing: -0.035em; margin-bottom: 0.45rem; }
h2 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.sub { color: var(--muted); max-width: 560px; }
.hint { margin-top: 0.9rem; font-size: 0.84rem; color: var(--faint); }

/* ══ BUTTONS ══ */
.btn-primary, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 40px; padding: 0.55rem 1.05rem;
  border-radius: 11px; font-weight: 700; font-size: 0.88rem; white-space: nowrap; transition: transform .2s var(--ease), background .2s, border-color .2s; }
.btn-primary { background: #f4f4f6; color: #111113; box-shadow: 0 8px 26px -12px rgba(255, 255, 255, 0.45); }
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-primary:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-ghost { border: 1px solid var(--border-hi); color: var(--ink); background: var(--panel-2); }
.btn-ghost:hover { border-color: rgba(232, 234, 238, 0.45); }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { border-color: rgba(255, 123, 123, 0.5); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); border: 1px solid transparent; transition: color .15s, background .15s, border-color .15s; }
.icon-btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); border-color: var(--border); }
.link-btn { display: inline-flex; gap: 0.35rem; color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.link-btn:hover { color: var(--ink); }

/* ══ CARDS ══ */
.card { position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 45%), var(--panel);
  border: 1px solid var(--border); border-radius: 18px; padding: 1.35rem 1.4rem; }
.card + .card, .card + .list-card { margin-top: 1rem; }
.home-grid > .card, .kpis > .card, .support-grid > .card, .steps > .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.list-card { padding: 0; overflow: hidden; }
.list-card > .card-head { padding: 1.05rem 1.4rem; margin: 0; border-bottom: 1px solid var(--border); }

/* ══ HOME ══ */
.home-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.tide-card { display: flex; flex-direction: column; justify-content: center; gap: 0.7rem; padding: 1.6rem 1.8rem; }
/* what's left of today's limit: arc + soft glow + end dot, all positioned from JS (no CSS transform tricks) */
.tide-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.tide-pct { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.tide-pct strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.tide-num { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3rem 0.7rem; }
.tide-num .big { margin-top: 0; }
.meter { height: 8px; margin-top: 0.3rem; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--ink); transition: width 0.9s var(--ease), background-color 0.3s; }
.meter[data-state="low"] i { background: var(--warn); }
.meter[data-state="empty"] i { background: var(--danger); }
.tide-card:has(.meter[data-state="empty"]) .big { color: #ffb3b3; }
@media (prefers-reduced-motion: reduce) { .meter i { transition: none; } }
.big { font: 700 2.35rem/1.1 var(--display); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; margin-top: 0.2rem; }
.foot { font-size: 0.8rem; color: var(--faint); }
.stat-stack { display: grid; grid-template-rows: 1fr 1fr; padding: 0; }
.stat { display: flex; flex-direction: column; justify-content: center; gap: 0.15rem; padding: 1.1rem 1.4rem; }
.stat + .stat { border-top: 1px solid var(--border); }
.stat strong { font: 700 1.45rem var(--display); letter-spacing: -0.035em; }
.stat .muted { font-size: 0.82rem; }

/* ══ ROWS (servers, licenses) ══ */
.row { display: flex; align-items: center; gap: 1rem; padding: 0.95rem 1.4rem; }
.row + .row { border-top: 1px solid var(--border); }
.row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-main strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main span { font-size: 0.8rem; color: var(--faint); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 0.82rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-meta b { display: block; color: var(--ink); font-size: 0.95rem; }
.srv-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); flex-shrink: 0; }
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.off { color: var(--faint); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 3rem 1.5rem; text-align: center; }
.empty .srv-ico { width: 46px; height: 46px; }
.empty p { color: var(--muted); max-width: 380px; font-size: 0.9rem; }
.slots { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.slots strong { display: block; font: 700 1.3rem var(--display); letter-spacing: -0.03em; }
.slot-dots { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 60%; }
.slot-dots i { width: 22px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); }
.slot-dots i.on { background: var(--accent); box-shadow: 0 0 12px -2px var(--accent); }

/* ══ LICENSES ══ */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 0.55rem; padding: 0 0.85rem; height: 42px; border: 1px solid var(--border-hi); border-radius: 12px; background: var(--panel); color: var(--faint); }
.search:focus-within { border-color: rgba(232, 234, 238, 0.5); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); }
.seg { display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.seg button { padding: 0 0.85rem; min-height: 34px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.seg button.active { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.lic { flex-wrap: wrap; }
.lic .tier { font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); text-transform: capitalize; }
.lic-bar { width: 110px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin-top: 0.35rem; }
.lic-bar i { display: block; height: 100%; background: var(--accent); }
.lic-actions { display: flex; gap: 0.25rem; }
.lic-detail { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.75rem; margin-top: 0.15rem; border-top: 1px dashed var(--border); }
.lic-detail .muted { flex-basis: 100%; font-size: 0.82rem; }

/* ══ CONNECT ══ */
.steps { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.step { display: flex; gap: 1.1rem; }
.step h2 { margin: 0.25rem 0 0.35rem; }
.step p { font-size: 0.9rem; margin-bottom: 0.8rem; }
.step-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(232, 234, 238, 0.35); color: var(--accent-ink); font: 700 0.85rem var(--display); background: var(--accent-soft); }
.step > div { min-width: 0; flex: 1; }
.code-block { position: relative; border: 1px solid var(--border-hi); border-radius: 12px; background: #121214; }
.code-block pre { padding: 0.95rem 3.2rem 0.95rem 1rem; overflow-x: auto; line-height: 1.75; color: var(--ink); }
.code-block .icon-btn { position: absolute; top: 6px; right: 6px; }
.k { color: #c9cbd2; } .s { color: var(--accent-ink); }
.code-inline { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.3rem 0.25rem 0.85rem; border: 1px solid var(--border-hi); border-radius: 10px; background: #121214; margin-top: 0.3rem; }
.code-inline .icon-btn { width: 30px; height: 30px; }

/* connect: download progress, code tiles, console line, draining timer */
.dl-progress { height: 4px; margin-top: 0.9rem; border-radius: 2px; background: rgba(255, 255, 255, 0.07); overflow: hidden; max-width: 320px; }
.dl-progress i { display: block; width: 0; height: 100%; background: var(--accent); box-shadow: 0 0 12px var(--accent); transition: width .3s var(--ease); }
.connect-box { margin-top: 0.4rem; display: grid; gap: 0.9rem; }
.code-tiles { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.code-tiles span { display: grid; place-items: center; width: 42px; height: 52px; border-radius: 12px; border: 1px solid rgba(232, 234, 238, 0.35);
  background: linear-gradient(180deg, rgba(232, 234, 238, 0.12), rgba(232, 234, 238, 0.03)); color: var(--accent-ink);
  font: 700 1.35rem var(--mono); box-shadow: 0 0 18px -8px var(--accent); animation: tileIn .5s var(--ease) both; animation-delay: var(--d); }
.code-tiles .sep { width: 12px; height: 2px; border-radius: 1px; background: var(--faint); margin: 0 2px; }
@keyframes tileIn { from { opacity: 0; transform: translateY(8px) scale(.94); } }
.cmd-line { display: flex; align-items: center; gap: 0.6rem; max-width: 460px; padding: 0.35rem 0.4rem 0.35rem 0.9rem; border: 1px solid var(--border-hi); border-radius: 12px; background: #121214; }
.cmd-prompt { color: var(--accent); font: 700 1rem var(--mono); }
.cmd-line code { flex: 1; min-width: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-timer { display: flex; align-items: center; gap: 0.75rem; font: 600 0.82rem var(--mono); color: var(--muted); }
.timer-bar { flex: 0 1 220px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.timer-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8c8e95, var(--accent)); transition: width 1s linear; }
.connect-box.expired .code-tiles span { opacity: .35; box-shadow: none; }
.connect-box.expired .cmd-line { opacity: .5; }
.connect-box.expired #timerText { color: var(--warn); }
.step.done { border-color: rgba(127, 227, 160, 0.35); }
.step.done .step-num { background: rgba(127, 227, 160, 0.15); border-color: rgba(127, 227, 160, 0.5); color: var(--ok); }
@media (max-width: 560px) { .code-tiles span { width: 34px; height: 44px; font-size: 1.1rem; } }

/* servers: tabs, clickable rows, server card, danger zone, settings */
.srv-tabs { width: fit-content; margin-bottom: 1rem; }
.server-row { width: 100%; text-align: left; transition: background .15s; }
.server-row:hover { background: rgba(255, 255, 255, 0.03); }
.server-row .chevron { color: var(--faint); font-size: 1.3rem; line-height: 1; }
.srv-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.srv-head h2 { font: 700 1.2rem var(--display); letter-spacing: -0.03em; }
.srv-head .row-main { min-width: 0; }
.srv-head h2, .kpi strong { overflow-wrap: anywhere; }
.srv-head .row-main span { font-family: var(--mono); font-size: 0.8rem; color: var(--faint); }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; border-color: rgba(255, 123, 123, 0.28);
  background: linear-gradient(180deg, rgba(255, 123, 123, 0.05), rgba(255, 123, 123, 0) 60%), var(--panel); }
.danger-zone h2 { color: #ffb3b3; margin-bottom: 0.3rem; }
.danger-zone p { font-size: 0.88rem; max-width: 560px; }
.btn-danger { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0.55rem 1.05rem; border-radius: 11px;
  background: #e5484d; color: #fff; font-weight: 700; font-size: 0.88rem; white-space: nowrap; transition: background .2s; }
.btn-danger:hover { background: #f2555a; }
.settings { padding-bottom: 1.2rem; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; }
.settings .field em { font-style: normal; font-size: 0.78rem; font-weight: 500; color: var(--faint); line-height: 1.45; }
.settings .field input, .settings .field select { width: 100%; }
.lock-note { display: flex; gap: 0.7rem; align-items: flex-start; margin: 1.3rem 0 1rem; padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(10, 10, 12, 0.5); color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.lock-note svg { color: var(--accent); margin-top: 2px; }
.settings-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; }
.settings-actions .muted { margin-right: auto; }
.small { font-size: 0.82rem; }
.slots-full { margin: 0 0 0.8rem; padding: 0.7rem 0.9rem; border: 1px solid rgba(242, 196, 109, 0.3); border-radius: 12px; background: rgba(242, 196, 109, 0.07); color: #f3dcae; font-size: 0.88rem; }
.slots-full a, .link-btn.inline { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; display: inline; font-size: inherit; }
button:disabled, .btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
@media (max-width: 700px) { .settings-grid { grid-template-columns: 1fr; } .danger-zone { flex-direction: column; align-items: flex-start; } }

/* admin: users and their keys */
.count-chip { display: inline-flex; align-items: center; padding: 0 0.85rem; min-height: 42px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); font: 600 0.85rem var(--mono); }
.small-avatar { width: 30px; height: 30px; font-size: 0.75rem; }
.ukey { display: grid; gap: 0.75rem; }
.ukey + .ukey, .ukey + .issue, .issue + .issue { margin-top: 1rem; }
.ukey-top { display: flex; align-items: center; gap: 0.8rem; }
.ukey-top .row-main span { font-family: var(--mono); font-size: 0.78rem; color: var(--faint); overflow-wrap: anywhere; white-space: normal; }
.ukey-facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: 0.85rem; color: var(--muted); }
.ukey-facts b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ukey-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; padding-top: 0.7rem; border-top: 1px dashed var(--border); }
.ukey-actions .label { min-width: 70px; }
.ukey-actions .spacer { flex: 1; }
.btn-ghost.sm { min-height: 34px; padding: 0.35rem 0.75rem; font-size: 0.82rem; }
.sel { height: 34px; padding: 0 0.6rem; border: 1px solid var(--border-hi); border-radius: 10px; background: #121214; color: var(--ink); }
.issue h2 { margin-bottom: 0.8rem; }
.issue-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.7rem; }
.issue-row .field { min-width: 160px; }
.issue-row .field.grow { flex: 1; min-width: 220px; }
.issue-row .field input, .issue-row .field select { width: 100%; }

/* ══ USAGE ══ */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.kpi { display: flex; flex-direction: column; gap: 0.35rem; }
.kpi strong { font: 700 1.35rem var(--display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.key-row { display: flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.35rem 0.3rem 0.9rem; border: 1px solid var(--border-hi); border-radius: 12px; background: #121214; }
.key-row input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font: 0.9rem var(--mono); color: var(--ink); }

/* ══ ACCOUNT ══ */
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.acc-block { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 1rem; border: 1px solid var(--border); border-radius: 14px; background: rgba(10, 10, 12, 0.5); }
.acc-block .small { font-size: 0.82rem; }
.inline-form { display: flex; gap: 0.5rem; width: 100%; margin-top: 0.2rem; }
.inline-form input { flex: 1; min-width: 0; height: 40px; padding: 0 0.8rem; border: 1px solid var(--border-hi); border-radius: 11px; background: #121214; color: var(--ink); outline: none; }
.inline-form input:focus { border-color: rgba(232, 234, 238, 0.55); }
.acc-keys { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.acc-keys:empty { display: none; }
@media (max-width: 700px) { .acc-grid { grid-template-columns: 1fr; } .inline-form { flex-direction: column; } }

/* ══ MODELS ══ */
/* tall slots like the silk backdrop: Deep-S is lit with combed light strands, free slots are empty hatched bays */
.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.model { position: relative; overflow: hidden; min-height: 340px; border-radius: 22px; }
.model.on { container-type: inline-size; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 1.5rem 1.6rem 1.7rem; border: 1px solid var(--border-hi);
  background: radial-gradient(120% 85% at 0% 0%, rgba(255, 255, 255, .11), transparent 62%), #141416; }
.model.on::before { content: ''; position: absolute; inset: -20%; pointer-events: none;
  background: repeating-linear-gradient(124deg, rgba(255, 255, 255, .075) 0 1px, transparent 1px 10px);
  -webkit-mask-image: radial-gradient(70% 60% at 15% 10%, #000, transparent 75%); mask-image: radial-gradient(70% 60% at 15% 10%, #000, transparent 75%);
  transition: transform 1.6s var(--ease); }
.model.on:hover::before { transform: translate3d(3%, 2%, 0); }
.model.on > * { position: relative; }
.model h2 { font: 700 clamp(1.6rem, 21cqi, 3.4rem)/1 var(--display); letter-spacing: -0.05em; white-space: nowrap; color: var(--ink); }
.model p { margin-top: 0.8rem; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.model-state { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.model-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px rgba(127, 227, 160, .6); }
.model.empty { border: 1px dashed rgba(255, 255, 255, .17);
  background: repeating-linear-gradient(124deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 12px); }
@media (max-width: 700px) { .models { grid-template-columns: 1fr 1fr; } .model.on { grid-column: 1 / -1; min-height: 260px; } .model.empty { min-height: 120px; } }

/* ══ SUPPORT ══ */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #111113; font-size: 0.72rem; font-weight: 800; }
#ticketList + #ticketView + .support-grid, #page-support .support-grid { margin-top: 1.25rem; }
.ticket { width: 100%; text-align: left; transition: background .15s; }
.ticket:hover { background: rgba(255, 255, 255, 0.025); }
.ticket .row-main span { font-family: var(--font); }
.ticket.unread .row-main strong::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 0.5rem; border-radius: 50%; background: var(--accent); vertical-align: middle; box-shadow: 0 0 8px var(--accent); }
.thread { padding: 0; overflow: hidden; }
.thread-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--border); }
.thread-top h2 { font: 700 1.1rem var(--display); letter-spacing: -0.03em; margin: 0.4rem 0 0.25rem; }
.thread-top .muted { font-size: 0.82rem; }
.msgs { display: flex; flex-direction: column; gap: 0.85rem; padding: 1.3rem 1.4rem; max-height: 52vh; overflow-y: auto; }
.msg { max-width: min(78%, 620px); padding: 0.8rem 1rem; border-radius: 16px 16px 16px 6px; background: var(--panel-2); border: 1px solid var(--border); }
.msg.mine { align-self: flex-end; border-radius: 16px 16px 6px 16px; background: rgba(232, 234, 238, 0.09); border-color: rgba(232, 234, 238, 0.22); }
.msg-meta { font-size: 0.74rem; font-weight: 700; color: var(--faint); margin-bottom: 0.3rem; }
.msg.staff .msg-meta { color: var(--accent-ink); }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.92rem; }
.reply { display: grid; gap: 0.7rem; padding: 1rem 1.4rem 1.2rem; border-top: 1px solid var(--border); background: rgba(10, 10, 12, 0.5); }
.reply textarea, .field textarea { width: 100%; min-height: 92px; resize: vertical; padding: 0.7rem 0.8rem; border: 1px solid var(--border-hi); border-radius: 12px; background: #121214; color: var(--ink); font: inherit; outline: none; }
.reply textarea:focus, .field textarea:focus { border-color: rgba(232, 234, 238, 0.55); }
.reply-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; }
.reply-actions .spacer { margin-right: auto; }
.back-link { margin-bottom: 0.9rem; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; }
.cat-chip { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 6px; background: rgba(255, 255, 255, 0.07); color: var(--muted); }

.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.support-card { display: flex; flex-direction: column; gap: 0.35rem; color: var(--ink); transition: border-color .2s, transform .3s var(--ease); }
.support-card svg { width: 22px; height: 22px; color: var(--accent); margin-bottom: 0.6rem; }
.support-card span { font-size: 0.86rem; }
.support-card:hover { border-color: rgba(232, 234, 238, 0.35); transform: translateY(-2px); }

/* ══ DIALOG, TOASTS ══ */
.dialog { margin: auto; width: min(440px, calc(100vw - 2rem)); border: 1px solid var(--border-hi); border-radius: 20px; background: var(--panel); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .85); }
.dialog::backdrop { background: rgba(6, 6, 8, 0.7); backdrop-filter: blur(4px); }
.dialog-body { display: grid; gap: 1rem; padding: 1.6rem; }
.dialog h2 { font: 700 1.2rem var(--display); letter-spacing: -0.03em; }
.field { display: grid; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field em { font-style: normal; color: var(--faint); font-weight: 500; }
.field input, .field select { height: 42px; padding: 0 0.8rem; border: 1px solid var(--border-hi); border-radius: 11px; background: #121214; color: var(--ink); outline: none; }
.field input:focus, .field select:focus { border-color: rgba(232, 234, 238, 0.55); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.3rem; }
.toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 80; display: grid; gap: 0.5rem; }
.toast { display: flex; align-items: center; gap: 0.6rem; min-width: 240px; max-width: 360px; padding: 0.8rem 1rem; border: 1px solid var(--border-hi); border-radius: 13px;
  background: #0d1626; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8); font-size: 0.88rem; font-weight: 600; animation: rise .35s var(--ease); }
.toast svg { color: var(--ok); }
.toast.err svg { color: var(--danger); }
.skeleton { height: 64px; margin: 0.6rem 1.4rem; border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ══ KEY DRAWER ══ */
.row[data-key-open] { cursor: pointer; transition: background .2s; }
.row[data-key-open]:hover { background: rgba(255, 255, 255, 0.03); }
.row[data-key-open]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lic .chevron { color: var(--faint); font-size: 1.3rem; line-height: 1; }
.drawer { margin: 0 0 0 auto; padding: 0; width: min(470px, 100vw); height: 100dvh; max-height: 100dvh; border-radius: 20px 0 0 20px; border-right: 0; overflow-y: auto; }
.drawer[open] { animation: drawer-in .35s var(--ease); }
@keyframes drawer-in { from { transform: translateX(48px); opacity: 0; } }
.drawer-body { display: grid; gap: 1.1rem; padding: 1.4rem 1.4rem 2rem; }
.kd-head { display: flex; align-items: center; gap: 0.8rem; }
.kd-head .row-main { gap: 0.25rem; }
.kd-head h2 { font: 700 1.15rem var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.kd-key { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--border-hi); border-radius: 12px; background: #121214; color: var(--accent-ink); text-align: left; transition: border-color .2s; }
.kd-key code { flex: 1; font: 600 0.8rem var(--mono); overflow-wrap: anywhere; }
.kd-key svg { color: var(--muted); }
.kd-key:hover { border-color: rgba(232, 234, 238, 0.4); }
.kd-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.kd-facts div { padding: 0.7rem 0.8rem; border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.kd-facts dt { font-size: 0.75rem; font-weight: 600; color: var(--faint); }
.kd-facts dd { margin: 0.2rem 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kd-facts small { display: block; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.kd-facts .lic-bar { width: 100%; }
.kd-facts .link-btn { font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.kd-sec { display: grid; gap: 0.55rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.kd-sec h3 { font-size: 0.75rem; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.kd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }

/* ══ CHECK LOG ══ */
.live-toggle { position: relative; display: inline-flex; align-items: center; gap: 0.55rem; min-height: 42px; padding: 0 0.9rem; border: 1px solid var(--border); border-radius: 12px; font-size: 0.85rem; font-weight: 600; color: var(--muted); cursor: pointer; align-self: flex-start; }
.live-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.live-toggle:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live-toggle input:checked + .live-dot { background: var(--ok); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(127, 227, 160, .45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(127, 227, 160, 0); } }
.chk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.chk-stat { display: grid; gap: 0.3rem; padding: 1rem 1.2rem; }
.chk-stat b { font: 700 1.4rem var(--display); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.checks { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 0.86rem; }
.checks th { padding: 0.8rem 1rem; text-align: left; font-size: 0.72rem; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.checks td { padding: 0.7rem 1rem; border-top: 1px solid var(--border); vertical-align: middle; }
.checks tbody tr:first-child td { border-top: 0; }
.checks tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.checks tr.is-alert td { background: rgba(255, 123, 123, 0.05); }
.checks tr.is-alert td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.checks .t { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-btn { display: block; max-width: 100%; margin: -0.25rem -0.4rem; padding: 0.25rem 0.4rem; border-radius: 8px; color: var(--ink); text-align: left; }
.cell-btn:hover { background: rgba(255, 255, 255, 0.05); }
.cell-btn.mono { font: 600 0.8rem var(--mono); color: var(--accent-ink); white-space: nowrap; }
.cell-2 { display: flex; flex-direction: column; min-width: 0; }
.cell-2 strong { max-width: 230px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-2 span { font: 0.76rem var(--mono); color: var(--faint); white-space: nowrap; }
.prob { display: flex; align-items: center; gap: 0.7rem; }
.prob b { min-width: 60px; text-align: right; font: 700 0.9rem var(--mono); }
.prob-bar { position: relative; width: 110px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); }
.prob-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.prob-bar em { position: absolute; top: -3px; width: 2px; height: 12px; border-radius: 1px; background: var(--muted); transform: translateX(-1px); }
.prob.high i { background: var(--warn); }
.prob.high b { color: var(--warn); }
.prob.alert i { background: var(--danger); }
.prob.alert b { color: var(--danger); }
.status.bad { color: var(--danger); }
@media (max-width: 860px) { .chk-stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .drawer { border-radius: 0; } .drawer-body { padding: 1.1rem 1rem 1.6rem; } }

/* ══ NEW SERVER (Free) ══ */
.no-key .side-nav { visibility: hidden; }
.new-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; max-width: 880px; align-items: start; }
.new-form { display: grid; gap: 0.85rem; padding: 1.5rem; }
.new-form h2 { font: 700 1.05rem var(--display); letter-spacing: -0.02em; margin-bottom: 0.2rem; }
.new-form .field input[aria-invalid="true"] { border-color: rgba(255, 123, 123, 0.6); }
.field-hint { margin-top: -0.45rem; font-size: 0.78rem; color: var(--faint); }
.field-err { font-size: 0.84rem; font-weight: 600; color: var(--danger); }
.new-submit { width: 100%; min-height: 46px; margin-top: 0.3rem; }
.new-plan { display: grid; gap: 1rem; padding: 1.5rem; background: linear-gradient(180deg, rgba(232, 234, 238, 0.07), rgba(232, 234, 238, 0) 60%), var(--panel); }
.new-plan .tier { justify-self: start; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
.new-facts { display: grid; gap: 0.7rem; list-style: none; padding: 0; margin: 0; }
.new-facts li { display: flex; align-items: baseline; gap: 0.55rem; }
.new-facts b { min-width: 4.2rem; font: 700 1.25rem var(--display); font-variant-numeric: tabular-nums; }
.new-facts span { color: var(--muted); font-size: 0.88rem; }
@media (max-width: 760px) { .new-grid { grid-template-columns: 1fr; } }

/* settings groups (owner panel and the key drawer) */
.set-group { border: 0; margin: 0 0 1.4rem; padding: 0; min-width: 0; }
.set-group legend { padding: 0; margin-bottom: 0.8rem; font-size: 0.75rem; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.settings-grid .field.wide { grid-column: 1 / -1; }
.field textarea { padding: 0.6rem 0.8rem; border: 1px solid var(--border-hi); border-radius: 11px; background: #121214; color: var(--ink); outline: none; resize: vertical; font: 0.88rem/1.5 var(--mono); }
.field textarea:focus { border-color: rgba(232, 234, 238, 0.55); }
.field input[name$="_command"], .field input[name="alert_sound_type"] { font-family: var(--mono); font-size: 0.85rem; }
.kd-settings { padding-top: 0; }
.kd-settings .settings-grid { grid-template-columns: 1fr; gap: 0.9rem; }
.kd-settings .settings-actions { position: sticky; bottom: 0; padding: 0.8rem 0 0.2rem; background: var(--panel); }

/* ══ RESPONSIVE ══ */
@media (max-width: 1000px) {
  .home-grid { grid-template-columns: 1fr; }
  .stat-stack { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .stat + .stat { border-top: 0; border-left: 1px solid var(--border); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .support-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(280px, 84vw); transform: translateX(-100%); transition: transform .35s var(--ease); }
  .side.open { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, .6); }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(6, 6, 8, 0.6); }
  .topbar .menu-btn { display: inline-grid; margin-left: -0.5rem; }
  .topbar { padding: 0 1rem; }
  .canvas { padding: 1.6rem 1rem 3rem; }
  .demo-banner { margin: 0.8rem 1rem 0; }
}
@media (max-width: 560px) {
  .page-head { flex-direction: column; align-items: stretch; gap: 1rem; }
  .tide-card { padding: 1.3rem 1.2rem; }
  .row { padding: 0.85rem 1rem; gap: 0.75rem; }
  .row .srv-ico { display: none; }
  .slot-dots { max-width: 50%; }
  .api-state span { display: none; }
  .api-state { padding: 0.45rem; }
  .step { flex-direction: column; gap: 0.6rem; }
  .msg { max-width: 92%; }
  .thread-top { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
