/* EBSpanel(TM) - Copyright (c) 2026 EBSsystems.co. All rights reserved. Proprietary software: see the LICENSE file. */
/* EBSpanel theme: the ServerDeck instrument-panel identity (serverdeck/src/renderer/styles.css) for the web.
   A cool near-neutral grey ramp (chassis → bg → panel → panel-2 → hover), one cyan "link light" accent, ok / warn / crit lamps,
   1px hairlines, no drop shadows. Display type: Bahnschrift (Windows) → Roboto Condensed; body: Segoe UI Variable → system UI;
   values and addresses: Cascadia Mono → IBM Plex Mono. Dark first; [data-theme=light] is the light faceplate.
   Every size is in rem and the root size steps up on large screens (1440p, 4K), so the whole panel scales crisply. */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: Bahnschrift, "Bahnschrift SemiBold", "Roboto Condensed", "Segoe UI Variable Display", "Arial Narrow", sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", "IBM Plex Mono", Consolas, "DejaVu Sans Mono", monospace;
  /* type scale (1.2 modular, 13px base at 1x): 10.5 / 11.5 / 12.5 / 13 / 14 / 16 / 19 / 23 / 28 */
  --fs-0: .808rem; --fs-1: .885rem; --fs-2: .962rem; --fs-3: 1rem; --fs-4: 1.077rem; --fs-5: 1.231rem; --fs-6: 1.462rem; --fs-7: 1.769rem; --fs-8: 2.154rem;
  --top-h: 3.23rem; --sb: 15.4rem;

  --chassis: #0f1114; --bg: #15181c; --panel: #1b1f24; --panel-2: #21262c; --panel-hover: #2a3038;
  --line: #2b3139; --line-strong: #3c434d;
  --text: #e4e7eb; --muted: #a0a8b2; --faint: #7a838e;
  --accent: #45c4d6; --accent-strong: #6fd4e3; --accent-ink: #07191d;
  --ok: #4ccc6f; --warn: #f0b23c; --crit: #f0605c; --brand: #ef6c2f;
  --ok-lamp: var(--ok); --warn-lamp: var(--warn); --crit-lamp: var(--crit); --accent-lamp: var(--accent);
  --face: linear-gradient(180deg, #272c33 0%, #1f2429 100%); --face-edge: #363d46; --face-hi: rgba(255, 255, 255, .045);
  --radius-s: 3px; --radius-m: 4px; --radius-l: 6px;
  /* names older markup uses inline */
  --red: var(--crit); --green: var(--ok); --orange: var(--warn); --blue: var(--accent); --ink: var(--chassis); --ink-2: var(--panel-2); --card: var(--panel); --hover: var(--panel-hover); --line-2: var(--line); --radius: var(--radius-m);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --chassis: #e3e6ea; --bg: #eef0f3; --panel: #f6f7f9; --panel-2: #ffffff; --panel-hover: #e7eaee;
  --line: #d7dbe1; --line-strong: #bcc3cb;
  --text: #1b1f25; --muted: #58616c; --faint: #6f7885;
  --accent: #0b6f7e; --accent-strong: #095d6a; --accent-ink: #ffffff;
  --ok: #157a37; --warn: #8f5c00; --crit: #c0302d; --brand: #c4521b;
  --ok-lamp: #22b14c; --warn-lamp: #f0a21f; --crit-lamp: #e5403c; --accent-lamp: #15a3b8;
  --face: linear-gradient(180deg, #fdfdfe 0%, #eff1f4 100%); --face-edge: #c9cfd7; --face-hi: #ffffff;
  color-scheme: light;
}
/* density steps: 13px at laptop and 1080p, larger root on 1440p / 4K screens and high-DPI desktops */
html { font-size: 13px; }
@media (min-width: 2200px) { html { font-size: 14.5px; } }
@media (min-width: 3000px) { html { font-size: 17px; } }
@media (min-width: 3600px) { html { font-size: 19.5px; } }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-3)/1.45 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: var(--radius-s); }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, .cond { font-family: var(--font-display); font-weight: 600; letter-spacing: .1px; margin: 0; }
h1 { font-size: var(--fs-7); line-height: 1.12; }
h2 { font-size: var(--fs-3); letter-spacing: .3px; }
h3 { font-size: var(--fs-4); }
svg { shape-rendering: geometricPrecision; }
.num, td.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--fs-2); }
code { font-family: var(--mono); font-size: var(--fs-2); background: var(--panel-2); border: 1px solid var(--line); padding: 0 .38rem; border-radius: var(--radius-s); }
pre { font-family: var(--mono); font-size: var(--fs-2); line-height: 1.5; background: var(--chassis); color: var(--text); border: 1px solid var(--line-strong); padding: .77rem .92rem; border-radius: var(--radius-s); overflow: auto; max-height: 60vh; margin: 0; white-space: pre-wrap; word-break: break-all; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35); }
:root[data-theme="light"] pre { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08); }
.hide { display: none !important; } .muted { color: var(--muted); } .right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; } .small { font-size: var(--fs-2); }
.row { display: flex; gap: .62rem; align-items: center; flex-wrap: wrap; } .grow { flex: 1; } .col { display: flex; flex-direction: column; gap: .4rem; }

/* ---------- buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .46rem; height: 2.15rem; padding: 0 .92rem; font-size: var(--fs-3); font-weight: 600; line-height: 1;
  border-radius: var(--radius-m); border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .2s ease, color .15s ease, transform .08s ease; }
.btn:hover:not(:disabled) { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); text-decoration: none; box-shadow: 0 0 0 1px var(--accent), 0 0 1.2rem color-mix(in srgb, var(--accent) 32%, transparent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn:disabled { opacity: .5; cursor: default; pointer-events: none; }
.btn svg { width: 1.08rem; height: 1.08rem; flex: none; }
.btn.sec { background: var(--panel-2); border-color: var(--line-strong); color: var(--text); font-weight: 500; box-shadow: inset 0 1px 0 var(--face-hi); }
.btn.sec:hover:not(:disabled) { background: var(--panel-hover); border-color: var(--line-strong); color: var(--text); box-shadow: inset 0 1px 0 var(--face-hi); }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--crit) 55%, var(--line)); color: var(--crit); }
.btn.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--crit) 12%, transparent); border-color: var(--crit); color: var(--crit); box-shadow: 0 0 1rem color-mix(in srgb, var(--crit) 25%, transparent); }
.btn.ok { background: transparent; border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); color: var(--ok); }
.btn.ok:hover:not(:disabled) { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: var(--ok); color: var(--ok); box-shadow: none; }
.btn.warn { background: transparent; border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); color: var(--warn); }
.btn.warn:hover:not(:disabled) { background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: var(--warn); color: var(--warn); box-shadow: none; }
.btn.sm { height: 1.85rem; padding: 0 .62rem; font-size: var(--fs-2); }
.btn.xs { height: 1.54rem; padding: 0 .5rem; font-size: var(--fs-1); font-weight: 500; }
.btn.block { width: 100%; }
input, select, textarea { width: 100%; height: 2.15rem; padding: 0 .7rem; border-radius: var(--radius-m); border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); outline: none; font-size: var(--fs-3); min-width: 0; transition: border-color .15s ease, box-shadow .15s ease; }
select { padding-right: .4rem; }
textarea { height: auto; min-height: 7rem; padding: .54rem .7rem; font-family: var(--mono); font-size: var(--fs-2); line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; padding: 0; accent-color: var(--accent); vertical-align: -.2rem; margin: 0 .3rem 0 0; box-shadow: none; }
input[type=file] { height: auto; padding: .4rem; }
label { display: block; font-size: var(--fs-2); color: var(--muted); margin-bottom: .23rem; }
.field { margin-bottom: .92rem; } .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 0 .92rem; }
.help { font-size: var(--fs-2); color: var(--muted); margin-top: .3rem; }

/* ---------- top bar (the ServerDeck title bar) ---------- */
.top { position: sticky; top: 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; gap: .92rem; padding: 0 .92rem 0 .62rem; background: var(--chassis); border-bottom: 1px solid var(--line); color: var(--text); }
.top .logo { display: flex; align-items: center; gap: .62rem; color: var(--text); text-decoration: none; flex: none; }
.top .logo:hover { color: var(--text); text-decoration: none; }
.top .logo img { width: 1.85rem; height: 1.85rem; display: block; }
.top .logo b { font: 600 var(--fs-5) var(--font-display); letter-spacing: .3px; white-space: nowrap; }
.top .logo b span, .login h1 span { color: var(--accent); }
.top .logo b sup, .login h1 sup { font-size: .5em; color: var(--faint); font-weight: 500; vertical-align: .9em; margin-left: 1px; }
.top .host { font-family: var(--mono); font-size: var(--fs-1); color: var(--muted); border: 1px solid var(--line-strong); padding: .15rem .5rem; border-radius: var(--radius-s); white-space: nowrap; display: inline-flex; align-items: center; gap: .4rem; }
.top .host::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok-lamp); box-shadow: 0 0 .35rem var(--ok-lamp); }
.levels { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-m); overflow: hidden; flex: none; }
.levels button { border: 0; border-right: 1px solid var(--line-strong); background: transparent; color: var(--muted); padding: 0 .77rem; height: 1.85rem; cursor: pointer; font-size: var(--fs-2); }
.levels button:last-child { border-right: 0; }
.levels button:hover { color: var(--text); background: var(--panel); }
.levels button.on { background: var(--panel-hover); color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.top .search { flex: 1; max-width: 32rem; position: relative; margin: 0 auto; }
.top .search input { height: 2rem; padding: 0 .7rem 0 2.15rem; background: var(--bg); border-color: var(--line); font-size: var(--fs-2); }
.top .search input:focus { border-color: var(--accent); }
.top .search svg { position: absolute; left: .7rem; top: .55rem; width: .95rem; height: .95rem; color: var(--muted); fill: none; }
.top .sp { flex: 1; }
.top .ib { display: inline-flex; align-items: center; gap: .46rem; height: 2rem; padding: 0 .55rem; border: 1px solid transparent; border-radius: var(--radius-m); background: none; color: var(--muted); cursor: pointer; font-size: var(--fs-2); text-decoration: none; white-space: nowrap; }
.top .ib:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.top .ib svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.top .ib .tag { margin-left: .15rem; }
.jobdot { width: .62rem; height: .62rem; border-radius: 50%; background: var(--off, #3a414a); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45); }
.jobdot.run { background: var(--warn-lamp); box-shadow: 0 0 .45rem var(--warn-lamp); animation: pulse 1.1s ease-in-out infinite; }
.jobdot.fail { background: var(--crit-lamp); box-shadow: 0 0 .45rem var(--crit-lamp); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- shell: left nav like ServerDeck's sidebar ---------- */
.layout { display: grid; grid-template-columns: var(--sb) minmax(0, 1fr); min-height: calc(100vh - var(--top-h)); }
.side { background: var(--chassis); border-right: 1px solid var(--line); padding: .46rem .62rem .92rem .77rem; position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 1px; }
.side .grp { margin: .62rem 0 .15rem; padding: 0 .85rem; font: 600 var(--fs-0)/1.1rem var(--font-display); letter-spacing: .5px; text-transform: uppercase; color: var(--faint); user-select: none; }
.side .grp:first-child { margin-top: .15rem; }
.side a { position: relative; display: flex; align-items: center; gap: .7rem; height: 2.23rem; padding: 0 .7rem 0 .85rem; border-radius: var(--radius-m); color: var(--muted); font-size: var(--fs-3); text-decoration: none; transition: background .15s ease, color .15s ease; }
.side a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.side a.on { background: var(--panel-2); color: var(--text); font-weight: 600; }
.side a.on::before { content: ""; position: absolute; left: 0; top: .54rem; bottom: .54rem; width: 2px; border-radius: 1px; background: var(--accent); box-shadow: 0 0 5px color-mix(in srgb, var(--accent) 60%, transparent); }
.side a svg { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; color: var(--muted); transition: transform .25s ease, color .2s ease; }
.side a svg * { vector-effect: non-scaling-stroke; }
.side a:hover svg { color: var(--text); transform: translateX(1px); }
.side a.on svg { color: var(--accent); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 55%, transparent)); }
.side .cnt { margin-left: auto; font: 500 var(--fs-1) var(--mono); color: var(--muted); }
.side .sysbar { margin: auto 0 0; padding: .77rem .85rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .3rem; font-size: var(--fs-1); color: var(--faint); }
.side .sysbar .tm { font-size: var(--fs-0); line-height: 1.45; }
main { padding: 1.38rem 1.85rem 4.6rem; min-width: 0; max-width: 150rem; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.08rem; margin-bottom: 1.08rem; flex-wrap: wrap; }
.ph h1 { font-size: var(--fs-7); }
.ph .crumbs { font-size: var(--fs-2); color: var(--muted); margin-bottom: .3rem; }
.ph .crumbs a { color: var(--muted); }
.ph .crumbs a:hover { color: var(--accent); }
.ph .row { gap: .46rem; }

/* notices (ServerDeck .notice): a hairline box with a coloured left edge */
.banner { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; padding: .62rem .92rem; margin-bottom: .92rem; border-radius: var(--radius-m); border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--panel); color: var(--text); font-size: var(--fs-3); font-weight: 400; }
.banner::before { content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent-lamp); box-shadow: 0 0 .4rem var(--accent-lamp); }
.banner.info { border-left-color: var(--accent); }
.banner.warn { border-left-color: var(--warn-lamp); background: color-mix(in srgb, var(--warn) 6%, var(--panel)); }
.banner.warn::before { background: var(--warn-lamp); box-shadow: 0 0 .4rem var(--warn-lamp); }
.banner.bad { border-left-color: var(--crit-lamp); background: color-mix(in srgb, var(--crit) 7%, var(--panel)); }
.banner.bad::before { background: var(--crit-lamp); box-shadow: 0 0 .4rem var(--crit-lamp); }
.banner.ok { border-left-color: var(--ok-lamp); background: color-mix(in srgb, var(--ok) 6%, var(--panel)); }
.banner.ok::before { background: var(--ok-lamp); box-shadow: 0 0 .4rem var(--ok-lamp); }
.banner b { font-weight: 600; }
.banner .grow { min-width: 12rem; }
/* plain-text banners flow as text (the lamp sits inline); banners built as [lamp][text][button] are flex rows */
.banner:not(:has(> .grow)) { display: block; }
.banner:not(:has(> .grow))::before { display: inline-block; margin-right: .55rem; vertical-align: .05rem; }

/* ---------- cards (ServerDeck .section) and stats ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17.7rem, 1fr)); gap: .92rem; margin-bottom: .92rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: .92rem 1.08rem 1.08rem; min-width: 0; }
.card.wide { grid-column: 1 / -1; }
/* stat tiles come in fours: 4 per row on laptops and 1080p, 8 per row on wide screens, 2 on phones; never an orphan */
.cards:has(> .card.stat) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 1900px) { .cards:has(> .card.stat:nth-child(8)) { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.card h2 { display: flex; align-items: center; justify-content: space-between; gap: .62rem; margin: 0 0 .77rem; padding-bottom: .54rem; border-bottom: 1px solid var(--line); font-size: var(--fs-3); color: var(--text); text-transform: none; }
.card h2 .btn { font-family: var(--font); letter-spacing: 0; }
.card > p:first-of-type { margin-top: 0; }
.card.stat { position: relative; display: flex; flex-direction: column; gap: .23rem; padding: .85rem 1.08rem 1rem; background: var(--face); border-color: var(--face-edge); box-shadow: inset 0 1px 0 var(--face-hi); }
.stat .l { font: 500 var(--fs-1) var(--font-display); letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.stat .v { font: 600 var(--fs-8)/1.08 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); }
.stat .v small { font: 500 var(--fs-2) var(--font); color: var(--muted); margin-left: .35rem; }
.meter { position: relative; height: .4rem; margin-top: .46rem; border-radius: 1px; background: var(--panel-hover); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .25); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 1px; background: var(--accent-lamp); }
.meter i.warn { background: var(--warn-lamp); } .meter i.bad { background: var(--crit-lamp); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: .62rem; }
.tile { display: flex; flex-direction: column; align-items: center; gap: .62rem; padding: 1.08rem .77rem; text-align: center; color: var(--text); font-weight: 600; font-size: var(--fs-2); background: var(--face); border: 1px solid var(--face-edge); border-radius: var(--radius-m); box-shadow: inset 0 1px 0 var(--face-hi); cursor: pointer; transition: border-color .15s ease, transform .15s ease, box-shadow .2s ease; }
.tile:hover { border-color: var(--accent); color: var(--text); text-decoration: none; transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--face-hi), 0 0 1rem -.3rem var(--accent); }
.tile svg { width: 2.3rem; height: 2.3rem; padding: .45rem; box-sizing: content-box; border-radius: var(--radius-m); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, transparent); stroke: var(--accent); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kv { display: grid; grid-template-columns: minmax(7.5rem, max-content) 1fr; gap: .38rem 1.08rem; font-size: var(--fs-3); margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: var(--fs-2); overflow-wrap: break-word; min-width: 0; }
.kv dd .dot { margin-right: .35rem; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--panel); scrollbar-width: thin; }
.card .tbl-wrap { border-color: var(--line); background: transparent; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-3); font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font: 600 var(--fs-1) var(--font-display); letter-spacing: .4px; text-transform: uppercase; color: var(--muted); padding: .54rem .77rem; border-bottom: 1px solid var(--line-strong); background: var(--panel-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl td { padding: .5rem .77rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s ease; }
.tbl tbody tr:hover td { background: var(--panel-hover); }
.tbl td.act { text-align: right; white-space: nowrap; }
.tbl td.act .btn { margin-left: .3rem; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl a.strong { font-weight: 600; }
.tbl td select { height: 1.85rem; width: auto; }
/* state chips: small engraved badges (1px tinted edge, faint fill) */
.tag { display: inline-flex; align-items: center; gap: .3rem; height: 1.42rem; padding: 0 .46rem; border-radius: var(--radius-s); font: 600 var(--fs-0) var(--font); letter-spacing: .3px; text-transform: uppercase; line-height: 1; white-space: nowrap; vertical-align: middle;
  background: transparent; color: var(--muted); border: 1px solid var(--line-strong); }
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); background: color-mix(in srgb, var(--ok) 7%, transparent); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.tag.bad { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 55%, var(--line)); background: color-mix(in srgb, var(--crit) 8%, transparent); }
.tag.info { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.tag.orange { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.toolbar { display: flex; gap: .62rem; align-items: center; margin-bottom: .77rem; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 21.5rem; }
.toolbar select { width: auto; min-width: 12rem; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 1.08rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: .54rem .85rem .7rem; color: var(--muted); font-size: var(--fs-3); white-space: nowrap; border-radius: var(--radius-s) var(--radius-s) 0 0; text-decoration: none; }
.tabs a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.tabs a.on { color: var(--text); font-weight: 600; }
.tabs a.on::after { content: ""; position: absolute; left: .77rem; right: .77rem; bottom: -1px; height: 2px; background: var(--accent); box-shadow: 0 0 5px color-mix(in srgb, var(--accent) 50%, transparent); }
.empty { padding: 2.3rem 1.5rem; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--radius-m); }

/* ---------- dialogs, toasts ---------- */
.ov { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 1.2rem 2rem; overflow: auto; background: rgba(0, 0, 0, .55); animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(49rem, 100%); background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-l); box-shadow: 0 0 0 1px var(--chassis), 0 1.5rem 3rem rgba(0, 0, 0, .35); padding: 1.08rem 1.38rem 0; animation: pop .14s ease-out; }
.modal.lg { width: min(74rem, 100%); }
@keyframes pop { from { transform: scale(.985); opacity: 0; } }
.modal h3 { font-size: var(--fs-5); margin: 0 0 .92rem; padding-bottom: .62rem; border-bottom: 1px solid var(--line); }
.modal .actions { display: flex; justify-content: flex-end; gap: .46rem; margin: 1.08rem -1.38rem 0; padding: .77rem 1.38rem; border-top: 1px solid var(--line); background: var(--bg); border-radius: 0 0 var(--radius-l) var(--radius-l); }
.toasts { position: fixed; right: 1.08rem; bottom: 1.08rem; z-index: 90; display: flex; flex-direction: column; gap: .46rem; }
.toast { display: flex; align-items: center; gap: .62rem; max-width: 32rem; padding: .62rem .92rem; background: var(--panel-2); color: var(--text); border: 1px solid var(--line-strong); border-left: 3px solid var(--ok-lamp); border-radius: var(--radius-m); box-shadow: 0 .6rem 1.5rem rgba(0, 0, 0, .35); font-weight: 500; animation: in .2s ease-out; }
.toast.bad { border-left-color: var(--crit-lamp); } .toast.warn { border-left-color: var(--warn-lamp); }
@keyframes in { from { transform: translateY(.6rem); opacity: 0; } }

/* ---------- sign-in ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; background: var(--chassis) radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%); }
.login .box { width: min(27.7rem, 100%); padding: 1.85rem 1.85rem 1.38rem; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-l); box-shadow: 0 0 0 1px var(--chassis), 0 2rem 4rem rgba(0, 0, 0, .4); position: relative; overflow: hidden; }
.login .box::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 .8rem var(--accent); }
.login .brandrow { display: flex; align-items: center; gap: .77rem; margin-bottom: 1.38rem; }
.login .brandrow img { width: 2.92rem; height: 2.92rem; display: block; }
.login .box h1 { font-size: var(--fs-7); margin: 0; }
.login .box .by { font-size: var(--fs-1); color: var(--muted); letter-spacing: .3px; }
.login .lamps { display: flex; gap: .46rem; margin-left: auto; }
.login .lamps i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--ok-lamp); box-shadow: 0 0 .4rem var(--ok-lamp); }
.login .lamps i + i { background: var(--accent-lamp); box-shadow: 0 0 .4rem var(--accent-lamp); }
.login .btn.block { height: 2.46rem; margin-top: .3rem; }
.login .foot { margin: 1.23rem -1.85rem 0; padding: .77rem 1.85rem 0; border-top: 1px solid var(--line); font-size: var(--fs-1); color: var(--faint); line-height: 1.55; }
.login .foot b { color: var(--muted); font-weight: 600; }

/* ---------- misc ---------- */
.sysbar { font-size: var(--fs-2); color: var(--muted); margin-top: 2.3rem; border-top: 1px solid var(--line); padding-top: .62rem; display: flex; gap: 1.23rem; flex-wrap: wrap; }
.files .tbl td:first-child a { font-weight: 600; }
.editor textarea { min-height: 55vh; font-size: var(--fs-2); }
.prog { display: inline-block; width: 7.7rem; height: .46rem; vertical-align: middle; border-radius: 1px; background: var(--panel-hover); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .25); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--ok-lamp); }
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.8rem, 1fr)); gap: .62rem; }
.price { display: grid; gap: .15rem; padding: .92rem; text-align: center; background: var(--face); border: 1px solid var(--face-edge); border-radius: var(--radius-m); box-shadow: inset 0 1px 0 var(--face-hi); }
.price b { font: 600 var(--fs-7) var(--font-display); }
.price .num { font-size: var(--fs-4); color: var(--text); }
.price.on { border-color: var(--accent); box-shadow: inset 0 1px 0 var(--face-hi), 0 0 0 1px var(--accent), 0 0 1rem -.2rem var(--accent); }
.dot { display: inline-block; width: .62rem; height: .62rem; border-radius: 50%; background: var(--faint); margin-right: .46rem; vertical-align: .02rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45); }
.dot.ok { background: var(--ok-lamp); box-shadow: 0 0 .35rem var(--ok-lamp); }
.dot.bad { background: var(--crit-lamp); box-shadow: 0 0 .35rem var(--crit-lamp); }
.dot.warn { background: var(--warn-lamp); box-shadow: 0 0 .35rem var(--warn-lamp); }
.switch { display: flex; align-items: center; gap: .62rem; font-size: var(--fs-3); color: var(--text); margin: 0; cursor: pointer; }
.switch input { width: 2.3rem; height: 1.3rem; margin: 0; appearance: none; border-radius: 1rem; background: var(--panel-hover); border: 1px solid var(--line-strong); position: relative; cursor: pointer; transition: background .15s ease; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.3rem - 6px); height: calc(1.3rem - 6px); border-radius: 50%; background: var(--muted); transition: transform .15s ease, background .15s ease; }
.switch input:checked { background: color-mix(in srgb, var(--accent) 30%, var(--panel-hover)); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(1rem); background: var(--accent); }
.tm-note { font-size: var(--fs-0); color: var(--faint); }

/* ---------- small screens: the nav slides in, the top bar keeps only what fits ---------- */
@media (max-width: 1100px) { .top .host { display: none; } }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: var(--top-h); width: min(var(--sb), 85vw); z-index: 30; transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
  .top { gap: .46rem; padding: 0 .46rem; }
  .top .search, .levels { display: none; }
  .top .ib.user .tag, .top .ib.user .uname { display: none; }
  main { padding: 1rem 1rem 4rem; }
  .ph h1 { font-size: var(--fs-6); }
  .cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
  .cards:has(> .card.stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .62rem; }
  .kv { grid-template-columns: minmax(6rem, max-content) 1fr; }
}
@media (min-width: 901px) { #burger { display: none; } }
@media (max-width: 480px) { .top .logo b { display: none; } .stat .v { font-size: var(--fs-7); } .modal { padding: .92rem 1rem 0; } .modal .actions { margin: 1rem -1rem 0; padding: .7rem 1rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
