:root {
  --ground:#EDF0F2; --surface:#FFFFFF; --sunken:#F4F6F8;
  --ink:#121C24; --ink-2:#44525D; --muted:#6F7D88;
  --line:#DCE2E6; --line-strong:#C3CCD3;
  --accent:#3A5BD9; --accent-ink:#2F4BB8; --accent-soft:rgba(58,91,217,.10); --on-accent:#FFFFFF;
  --s-vpn:#3A5BD9; --s-direct:#1A9A83;
  --good:#1C8A55; --good-soft:rgba(28,138,85,.12);
  --warn:#A2660B; --warn-soft:rgba(176,114,18,.14);
  --crit:#C23B32; --crit-soft:rgba(194,59,50,.10);
  --map-dot:#CAD2D8; --map-dot-hi:#98A6B0;
  --shadow:0 1px 2px rgba(18,28,36,.05), 0 6px 20px rgba(18,28,36,.05);
  --f-ui:"Golos Text", "Segoe UI", system-ui, sans-serif;
  --f-mono:"JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-display:"Unbounded", "Golos Text", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:#0B1115; --surface:#121A20; --sunken:#0E151A;
    --ink:#E3E9ED; --ink-2:#A8B5BE; --muted:#7A8994;
    --line:#1F2B33; --line-strong:#2E3C46;
    --accent:#6F8AEC; --accent-ink:#93A8F3; --accent-soft:rgba(111,138,236,.14); --on-accent:#0B1115;
    --s-vpn:#6F8AEC; --s-direct:#1F9E86;
    --good:#4CC38A; --good-soft:rgba(76,195,138,.14);
    --warn:#E3A23B; --warn-soft:rgba(227,162,59,.14);
    --crit:#EE6A60; --crit-soft:rgba(238,106,96,.14);
    --map-dot:#1D2931; --map-dot-hi:#33434E;
    --shadow:none;
  }
}
:root[data-theme="dark"] {
  --ground:#0B1115; --surface:#121A20; --sunken:#0E151A;
  --ink:#E3E9ED; --ink-2:#A8B5BE; --muted:#7A8994;
  --line:#1F2B33; --line-strong:#2E3C46;
  --accent:#6F8AEC; --accent-ink:#93A8F3; --accent-soft:rgba(111,138,236,.14); --on-accent:#0B1115;
  --s-vpn:#6F8AEC; --s-direct:#1F9E86;
  --good:#4CC38A; --good-soft:rgba(76,195,138,.14);
  --warn:#E3A23B; --warn-soft:rgba(227,162,59,.14);
  --crit:#EE6A60; --crit-soft:rgba(238,106,96,.14);
  --map-dot:#1D2931; --map-dot-hi:#33434E;
  --shadow:none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 400 14px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
a { color: var(--accent-ink); }
.mono { font-family: var(--f-mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font: 500 20px/1.2 var(--f-display); letter-spacing: -.01em; margin: 6px 0 4px; }
.auth-card p { margin: 0; }
.form-error { color: var(--crit); font-size: 13px; min-height: 0; }
.form-error:empty { display: none; }
.form-error.ok { color: var(--good); }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.content { min-width: 0; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px 16px; border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; flex-direction: column; gap: 6px; padding: 2px 8px 4px; }
.wordmark { font: 600 17px/1 var(--f-display); letter-spacing: -.01em; display: flex; align-items: center; gap: 9px; }
.wordmark .glyph { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); display: grid; place-items: center; }
.wordmark .glyph i { width: 8px; height: 8px; border-radius: 50%; background: var(--s-vpn); box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px var(--s-vpn); }
.device-line { font: 400 11.5px/1.3 var(--f-mono); color: var(--muted); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font: 500 10.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--sunken); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.nav-item[aria-current="page"] svg { color: var(--accent); }
.nav-item .count { margin-left: auto; font: 500 11px/1 var(--f-mono); color: var(--muted); }
.nav-item .flag-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.theme-switch { display: flex; gap: 2px; padding: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; }
.theme-switch button { flex: 1; border: 0; background: transparent; padding: 5px 0; border-radius: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 10px 28px; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tunnel { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--good); flex-shrink: 0; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--good); opacity: .35; animation: ring 2.4s ease-out infinite; }
.pulse.off { background: var(--muted); }
.pulse.warn { background: var(--warn); }
.pulse.off::after, .pulse.warn::after { display: none; }
@keyframes ring { from { transform: scale(.6); opacity: .5; } to { transform: scale(1.6); opacity: 0; } }
.tunnel b { font-weight: 600; }
.tunnel .sep { width: 1px; height: 18px; background: var(--line-strong); }
.topbar .spacer { flex: 1; }
.rate { display: flex; gap: 14px; font: 500 12.5px/1 var(--f-mono); color: var(--ink-2); }
.rate span i { font-style: normal; color: var(--muted); margin-right: 4px; }

main { padding: 26px 28px 60px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font: 500 23px/1.15 var(--f-display); letter-spacing: -.015em; margin: 0; text-wrap: balance; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 66ch; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- primitives ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 0; flex-wrap: wrap; }
.panel-head h2 { font-size: 14px; font-weight: 600; margin: 0; }
.panel-head .hint { color: var(--muted); font-size: 12.5px; }
.panel-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel-body { padding: 14px 18px 18px; }
.panel-foot { border-top: 1px solid var(--line); padding: 12px 18px; color: var(--muted); font-size: 12.5px; }
.eyebrow { font: 500 10.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.g-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-actions { display: flex; gap: 8px; align-items: center; }
.row-actions.wrap { flex-wrap: wrap; }
.toolbar { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.grow { flex: 1; min-width: 240px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--sunken); }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--sunken); color: var(--ink-2); border: 1px solid var(--line); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--muted); }
.chip.vpn::before { background: var(--s-vpn); }
.chip.direct::before { background: var(--s-direct); border-radius: 50%; }
.chip.block::before { background: transparent; border: 1.5px solid var(--crit); border-radius: 50%; width: 6px; height: 6px; }
.chip.plain::before { display: none; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status.good { color: var(--good); } .status.good::before { background: var(--good); }
.status.warn { color: var(--warn); } .status.warn::before { background: var(--warn); border-radius: 1px; transform: rotate(45deg); width: 7px; height: 7px; }
.status.crit { color: var(--crit); } .status.crit::before { background: var(--crit); border-radius: 1px; }
.status.idle { color: var(--muted); } .status.idle::before { background: transparent; border: 1.5px solid var(--muted); }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.input { width: 100%; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); min-width: 0; }
.input.mono { font-family: var(--f-mono); font-size: 13px; }
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: 9px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.05); }

.toggle { position: relative; width: 34px; height: 20px; flex-shrink: 0; display: inline-block; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .15s; pointer-events: none; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(14px); }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .grow { min-width: 0; }
.row .title { font-weight: 500; }
.row .sub { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; }
/* overflow clips to the border radius, so a table's sticky header and row
   hover fills stay inside the card's rounded corners instead of poking out */
.panel > .table-wrap, .panel > div > .table-wrap:only-child { border-radius: 11px; }
.dev-name { font-weight: 500; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font: 500 10.5px/1 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: right; }
table.t tbody tr:hover td { background: var(--sunken); }

.note { display: flex; gap: 10px; padding: 10px 12px; border-radius: 9px; background: var(--sunken); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; }
.note.warn { background: var(--warn-soft); border-color: transparent; }
.note.good { background: var(--good-soft); border-color: transparent; }
.note.crit { background: var(--crit-soft); border-color: transparent; }
.empty { color: var(--muted); font-size: 13px; padding: 6px 0; }
.dirty-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: 13px; position: sticky; top: 62px; z-index: 4; }
.pending-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); font-size: 13px; margin-bottom: 12px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 9px 16px; border-radius: 9px; font-size: 13px; z-index: 50; max-width: min(520px, calc(100vw - 32px)); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.err { background: var(--crit); color: #fff; }

/* ---------- KPIs & meters ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { padding: 16px 18px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .v { font: 500 24px/1.1 var(--f-mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 3px; }
.kpi .d { font-size: 12.5px; color: var(--muted); }
.splitbar { display: flex; height: 8px; gap: 2px; border-radius: 4px; overflow: hidden; margin-top: 4px; background: var(--sunken); }
.splitbar i { display: block; height: 100%; }
.meter { height: 6px; border-radius: 3px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--ink-2); width: 0; transition: width .4s; }

.health { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.health > div { padding: 14px 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: end; }
.health > div:nth-child(odd) { border-right: 1px solid var(--line); }
.health .v { font: 500 20px/1.1 var(--f-mono); font-variant-numeric: tabular-nums; }
.health .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.health .lbl { font-size: 12.5px; color: var(--muted); grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { font: 400 10.5px var(--f-mono); fill: var(--muted); }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: var(--line-strong); stroke-width: 1; }
.chart .endlabel { font: 500 11.5px var(--f-mono); fill: var(--ink-2); }
.chart .xhair { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .empty-msg { font: 400 13px var(--f-ui); fill: var(--muted); }
.tip { position: absolute; pointer-events: none; z-index: 3; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.12); min-width: 150px; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.tip .t { font: 500 11px var(--f-mono); color: var(--muted); margin-bottom: 4px; }
.tip .l { display: flex; align-items: center; gap: 8px; }
.tip .l i { width: 8px; height: 8px; border-radius: 2px; }
.tip .l b { margin-left: auto; font: 500 12px var(--f-mono); padding-left: 12px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; }
.legend i.sq { width: 9px; height: 9px; border-radius: 2px; }
.swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.spark svg { display: block; }

/* ---------- map ---------- */
.map-wrap { position: relative; }
.map-wrap canvas { display: block; width: 100%; }
.map-tip { position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); background: var(--ink); color: var(--surface); font-size: 12px; padding: 5px 8px; border-radius: 6px; white-space: nowrap; }
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); overflow: hidden; }
.hero .map-wrap { background: var(--sunken); border-right: 1px solid var(--line); min-height: 280px; }
.hero-info { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.hero-info .place { font: 500 26px/1.1 var(--f-display); letter-spacing: -.02em; text-wrap: balance; }
.hero-info .route { display: flex; align-items: center; gap: 8px; font: 400 12px var(--f-mono); color: var(--muted); flex-wrap: wrap; }
.hero-info .route i { flex: 1; min-width: 16px; height: 1px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 7px); }
.hero-info .row-actions { margin-top: auto; flex-wrap: wrap; }

.cc { display: inline-grid; place-items: center; width: 28px; height: 20px; border-radius: 4px; font: 500 10.5px/1 var(--f-mono); letter-spacing: .04em; background: var(--sunken); border: 1px solid var(--line-strong); color: var(--ink-2); flex-shrink: 0; }
.ping { font: 500 12.5px var(--f-mono); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ping i { display: inline-flex; gap: 2px; align-items: flex-end; height: 11px; }
.ping i b { width: 3px; background: var(--line-strong); border-radius: 1px; }
.ping i b:nth-child(1) { height: 4px; } .ping i b:nth-child(2) { height: 7px; } .ping i b:nth-child(3) { height: 11px; }
.ping.q3 i b { background: var(--good); }
.ping.q2 i b:nth-child(-n+2) { background: var(--warn); }
.ping.q1 i b:nth-child(1) { background: var(--crit); }

.loc-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 80px auto; gap: 14px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); cursor: pointer; }
.loc-row:hover { background: var(--sunken); }
.loc-row[aria-selected="true"] { background: var(--accent-soft); }
.loc-row .city { font-weight: 500; }
.loc-row .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-row .acts { display: flex; gap: 6px; align-items: center; }

.list-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 13px 16px; border-top: 1px solid var(--line); cursor: pointer; align-items: center; }
.list-card:first-child { border-top: 0; }
.list-card:hover { background: var(--sunken); }
.list-card[aria-selected="true"] { background: var(--accent-soft); }
.list-card .name { font-weight: 500; }
.list-card .meta { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.list-card.off .name { color: var(--muted); }

.console { background: var(--sunken); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; font: 400 12px/1.65 var(--f-mono); color: var(--ink-2); overflow: auto; white-space: pre; max-height: 280px; }
.console .ok { color: var(--good); } .console .w { color: var(--warn); } .console .dim { color: var(--muted); } .console .err { color: var(--crit); }

.speed-big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.speed-big > div { padding: 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.speed-big > div + div { border-left: 1px solid var(--line); }
.speed-big .v { font: 500 38px/1 var(--f-mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.speed-big .v small { font-size: 14px; color: var(--muted); letter-spacing: 0; margin-left: 4px; font-weight: 400; }

.event { display: grid; grid-template-columns: 76px 16px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.event:first-child { border-top: 0; }
.event time { font: 400 12px/1.6 var(--f-mono); color: var(--muted); }
.event .ic { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--line-strong); }
.event .ic.good { background: var(--good); }
.event .ic.warn { background: var(--warn); border-radius: 1px; transform: rotate(45deg); width: 9px; height: 9px; }
.event .ic.crit { background: var(--crit); border-radius: 2px; }
.event .ic.info { background: var(--accent); }
.event .sub { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }

.cores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.core { display: flex; flex-direction: column; gap: 6px; }
.core .bar { height: 54px; border-radius: 6px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden; }
.core .bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ink-2); transition: height .6s; }
.core span { font: 400 11px var(--f-mono); color: var(--muted); display: flex; justify-content: space-between; }
.version { font: 500 30px/1 var(--f-mono); letter-spacing: -.02em; }
.check-result { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--sunken); flex-wrap: wrap; font-size: 13px; }
.check-result .grow { min-width: 180px; }

.iface-form { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 1080px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .hero { grid-template-columns: 1fr; }
  .hero .map-wrap { border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 14px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand .device-line, .nav-label, .rail-foot .theme-switch { display: none; }
  .rail-foot { margin: 0; flex-direction: row; }
  .nav-group { flex-direction: row; }
  .nav-item .count, .nav-item .flag-dot { display: none; }
  .topbar { position: static; padding: 10px 16px; }
  main { padding: 20px 16px 48px; }
  .kpis, .kpis.kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .health { grid-template-columns: 1fr; }
  .health > div:nth-child(odd) { border-right: 0; }
  .speed-big .v { font-size: 30px; }
  .dirty-bar { top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse::after { animation: none; }
  * { transition: none !important; }
}
