:root {
  color-scheme: dark light;
  --bg: #07090d;
  --bg-glow-a: rgba(91, 155, 255, .13);
  --bg-glow-b: rgba(167, 123, 255, .10);
  --card: rgba(255, 255, 255, .045);
  --card-hi: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .08);
  --txt: #eef1f6;
  --mut: #8b94a7;
  --dim: #566074;
  --track: rgba(255, 255, 255, .08);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px rgba(0, 0, 0, .28);
  --cpu: #5b9bff;
  --mem: #a77bff;
  --pwr: #ffb64d;
  --tmp: #ff7a6b;
  --rx: #2dd4bf;
  --tx: #f472b6;
  --ok: #34d399;
  --warn: #fbbf24;
  --crit: #f87171;
  --idle: #3a4254;
  --r: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef1f6;
    --bg-glow-a: rgba(91, 155, 255, .16);
    --bg-glow-b: rgba(167, 123, 255, .12);
    --card: rgba(255, 255, 255, .86);
    --card-hi: #fff;
    --line: rgba(15, 23, 42, .08);
    --txt: #0f172a;
    --mut: #5a6579;
    --dim: #94a0b3;
    --track: rgba(15, 23, 42, .08);
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
    --idle: #c9d0dd;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(900px 500px at 8% -10%, var(--bg-glow-a), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, var(--bg-glow-b), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--txt);
  font: 15px/1.4 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
.ico svg, .nav svg, .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100%; }
.side { display: none; }
.main { padding: calc(env(safe-area-inset-top) + 14px) 16px calc(env(safe-area-inset-bottom) + 92px); max-width: 1320px; width: 100%; margin: 0 auto; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.top h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; font-weight: 700; }
.top-sub { color: var(--mut); font-size: 13px; margin-top: 2px; }
.top-right { display: flex; align-items: center; gap: 10px; }

.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--idle); display: block; }
.pill.ok i { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.pill.warn i { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 22%, transparent); }
.pill.crit i { background: var(--crit); box-shadow: 0 0 0 4px color-mix(in srgb, var(--crit) 22%, transparent); }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); } .pill.crit { color: var(--crit); }
.pill.off { color: var(--mut); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(env(safe-area-inset-bottom) + 6px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--dim); border-radius: 12px; }
.tabbar a.on { color: var(--cpu); }

@media (min-width: 900px) {
  .shell { grid-template-columns: 248px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; padding: calc(env(safe-area-inset-top) + 22px) 14px 18px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  .tabbar { display: none; }
  .main { padding: 28px 32px 48px; }
  .top h1 { font-size: 32px; }
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 6px 18px rgba(91, 155, 255, .3); }
.brand b { display: block; font-size: 16px; letter-spacing: -.01em; }
.brand small { color: var(--mut); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--mut); font-weight: 600; transition: background .15s, color .15s; }
.nav a:hover { background: var(--card); color: var(--txt); }
.nav a.on { background: var(--card-hi); color: var(--txt); box-shadow: var(--shadow); }
.nav a.on svg { color: var(--cpu); }
.side-foot { margin-top: auto; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; color: var(--mut); display: grid; gap: 4px; }
.side-foot b { color: var(--txt); font-weight: 600; }

/* ---- cards / grid ---- */
.view { display: none; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.view.on { display: grid; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.grid { display: grid; gap: 16px; }
.g-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-two, .g-three { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .g-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .g-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .g-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 700px) and (max-width: 1199px) { .g-three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-three > :last-child { grid-column: 1 / -1; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-h h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.005em; }
.card-h small { color: var(--mut); font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-h h2 { white-space: nowrap; }
.card-h > div:first-child { min-width: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--track); }
.seg button { padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--mut); }
.seg button.on { background: var(--card-hi); color: var(--txt); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }

/* hero */
.hero { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.2fr 1fr; } }
.hero-main { display: flex; gap: 16px; align-items: center; }
.hero-badge { flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.hero-badge svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hero.warn .hero-badge { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.hero.crit .hero-badge { background: color-mix(in srgb, var(--crit) 16%, transparent); color: var(--crit); }
.hero h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.hero p { margin: 3px 0 0; color: var(--mut); }
.issues { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; }
.issues li { display: flex; gap: 8px; align-items: center; }
.issues li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: none; }
.issues li.crit::before { background: var(--crit); }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 13px; }
.meta span { color: var(--mut); display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1px; }
.meta b { font-weight: 600; word-break: break-word; }

/* tiles */
.tile { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 0; box-shadow: var(--shadow); min-height: 150px; display: flex; flex-direction: column; }
.tile-h { display: flex; align-items: center; gap: 8px; color: var(--mut); font-size: 13px; font-weight: 600; }
.tile .ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.tile .ico svg { width: 16px; height: 16px; }
.tile-v { margin-top: 10px; font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.tile-v i { font-style: normal; font-size: 15px; font-weight: 600; color: var(--mut); margin-left: 3px; letter-spacing: 0; }
.tile-s { color: var(--mut); font-size: 12.5px; margin-top: 4px; }
.tile .spark { margin: auto -14px 0; height: 46px; }
.spark svg { width: 100%; height: 100%; }

/* charts */
.chart { position: relative; width: 100%; touch-action: pan-y; }
.chart svg { width: 100%; overflow: visible; }
.chart text { fill: var(--dim); font-size: 10.5px; font-family: var(--font); }
.chart .grid-l { stroke: var(--track); stroke-width: 1; }
.chart .tip { position: absolute; top: 0; pointer-events: none; transform: translateX(-50%); background: color-mix(in srgb, var(--bg) 88%, var(--txt) 4%); border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity .12s; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); z-index: 3; }
.chart .tip.on { opacity: 1; }
.chart .tip b { display: block; color: var(--mut); font-weight: 500; font-size: 11px; margin-bottom: 2px; }
.chart .tip span { display: flex; align-items: center; gap: 6px; }
.chart .tip em { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--mut); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend em { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.legend b { color: var(--txt); font-weight: 650; }
.big-rates { display: flex; gap: 22px; margin-bottom: 8px; flex-wrap: wrap; }
.big-rates div { min-width: 0; }
.big-rates small { display: flex; align-items: center; gap: 6px; color: var(--mut); font-size: 12px; }
.big-rates small em { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.big-rates b { font-size: 24px; letter-spacing: -.02em; font-weight: 700; }
.big-rates b i { font-style: normal; font-size: 13px; color: var(--mut); margin-left: 3px; font-weight: 600; }

/* cores */
.cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(26px, 1fr)); gap: 5px; margin-top: 12px; }
.core { height: 38px; border-radius: 7px; background: var(--track); position: relative; overflow: hidden; }
.core i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--cpu); border-radius: 0; transition: height .6s ease; opacity: .9; }
.core-l { display: flex; justify-content: space-between; color: var(--mut); font-size: 11.5px; margin-top: 6px; }

/* bars */
.row { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 0; }
.row:last-child { padding-bottom: 0; }
.row-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; }
.row-h b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-h span { color: var(--mut); font-size: 13px; white-space: nowrap; }
.bar { height: 8px; border-radius: 6px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--c, var(--cpu)); transition: width .7s cubic-bezier(.2, .8, .2, 1), background .3s; }
.bar.lg { height: 12px; }
.sub { color: var(--mut); font-size: 12.5px; }

/* container rows & cards */
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--idle); }
.dot.s1 { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot.s2 { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 20%, transparent); }
.dot.s0 { background: var(--crit); box-shadow: 0 0 0 4px color-mix(in srgb, var(--crit) 20%, transparent); }
.crow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 6px; margin: 0 -6px; border-radius: 12px; cursor: pointer; transition: background .12s; }
.crow:hover { background: var(--card-hi); }
.crow + .crow { border-top: 1px solid var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
.crow b { font-weight: 600; font-size: 14.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow small { color: var(--mut); font-size: 12px; }
.crow .num { text-align: right; font-size: 13px; line-height: 1.25; }
.crow .num span { color: var(--mut); display: block; font-size: 12px; }

.avatar { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; background: hsl(var(--h) 55% 45%); overflow: hidden; position: relative; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.avatar.xl { width: 52px; height: 52px; border-radius: 15px; font-size: 22px; }

.summary { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; }
.chip small { color: var(--mut); font-weight: 500; }

.cgrid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ccard { cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; transition: transform .15s, background .15s; }
.ccard:hover { background: var(--card-hi); transform: translateY(-2px); }
.ccard-h { display: flex; align-items: center; gap: 12px; }
.ccard-h > div { min-width: 0; flex: 1; }
.ccard-h b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard-h small { color: var(--mut); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard-st { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.ccard-m { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ccard-m div { background: var(--track); border-radius: 12px; padding: 8px 10px; }
.ccard-m small { display: block; color: var(--mut); font-size: 11px; }
.ccard-m b { font-size: 14.5px; font-weight: 650; }

.tl { display: grid; grid-template-columns: repeat(48, 1fr); gap: 2px; height: 22px; }
.tl i { border-radius: 3px; background: var(--idle); opacity: .45; }
.tl i.s1 { background: var(--ok); opacity: 1; } .tl i.s2 { background: var(--warn); opacity: 1; } .tl i.s0 { background: var(--crit); opacity: 1; }
.tl-l { display: flex; justify-content: space-between; color: var(--dim); font-size: 11px; margin-top: 4px; }

/* storage */
.vgrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vol-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.vol-top b { font-size: 34px; letter-spacing: -.03em; }
.vol-top b i { font-style: normal; font-size: 16px; color: var(--mut); margin-left: 2px; }
.vol-nums { display: flex; justify-content: space-between; color: var(--mut); font-size: 12.5px; margin-top: 8px; }
.vol-io { display: flex; gap: 16px; margin-top: 12px; font-size: 12.5px; color: var(--mut); border-top: 1px solid var(--line); padding-top: 10px; }
.vol-io b { color: var(--txt); font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.badge.ok { --c: var(--ok); } .badge.warn { --c: var(--warn); } .badge.crit { --c: var(--crit); } .badge.na { --c: var(--mut); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.kv div { background: var(--track); border-radius: 12px; padding: 9px 11px; }
.kv small { display: block; color: var(--mut); font-size: 11px; }
.kv b { font-size: 15px; font-weight: 650; }

/* network */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 16px; }
.stat small { color: var(--mut); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.stat small em { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; margin-top: 4px; }
.stat b i { font-style: normal; font-size: 13px; color: var(--mut); margin-left: 3px; }
.stat > span { color: var(--mut); font-size: 12.5px; }
table.days { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.days th { text-align: left; color: var(--mut); font-weight: 500; font-size: 12px; padding: 0 0 8px; }
table.days th:not(:first-child), table.days td:not(:first-child) { text-align: right; }
table.days td { padding: 9px 0; border-top: 1px solid var(--line); }

/* sheet (container detail) */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .25s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-backdrop.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 41; background: color-mix(in srgb, var(--bg) 94%, var(--txt) 3%); border: 1px solid var(--line); box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); overflow-y: auto; overscroll-behavior: contain; transition: transform .35s cubic-bezier(.2, .9, .2, 1); left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 36px); border-radius: 24px 24px 0 0; transform: translateY(105%); padding: 8px 18px calc(env(safe-area-inset-bottom) + 28px); }
.sheet.on { transform: none; }
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--dim); opacity: .5; margin: 4px auto 12px; }
@media (min-width: 900px) {
  .sheet { top: 0; left: auto; width: min(560px, 92vw); border-radius: 24px 0 0 24px; transform: translateX(105%); padding: 26px 26px 40px; }
  .sheet::before { display: none; }
}
.sheet-h { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.sheet-h > div { flex: 1; min-width: 0; }
.sheet-h h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-h small { color: var(--mut); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x { width: 36px; height: 36px; border-radius: 50%; background: var(--card-hi); display: grid; place-items: center; flex: none; }
.x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; }
.sheet .card { margin-top: 14px; box-shadow: none; }
.share { display: grid; gap: 14px; }
.share .bar { height: 10px; }
.ports { display: flex; flex-wrap: wrap; gap: 6px; }
.ports span { padding: 3px 9px; border-radius: 8px; background: var(--track); font-size: 12.5px; }

.empty { color: var(--mut); padding: 18px; text-align: center; font-size: 14px; }
.stale .main { transition: opacity .3s; }
body.stale .tile, body.stale .card { opacity: .62; }
.note { color: var(--mut); font-size: 12.5px; line-height: 1.5; }
.note b { color: var(--txt); }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* settings fields */
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 14px; }
.fields label { display: grid; gap: 6px; font-size: 12.5px; color: var(--mut); font-weight: 500; }
.fields input { font: inherit; font-size: 16px; color: var(--txt); background: var(--track); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; outline: none; }
.fields input:focus { border-color: var(--cpu); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cpu) 25%, transparent); }

/* login */
[hidden] { display: none !important; }
body.locked .shell { visibility: hidden; }
.login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(900px 500px at 8% -10%, var(--bg-glow-a), transparent 60%), radial-gradient(800px 500px at 100% 0%, var(--bg-glow-b), transparent 55%), var(--bg); }
.login-card { width: min(380px, 100%); display: grid; gap: 14px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 30px 24px 26px; box-shadow: var(--shadow); }
.login-card img { width: 68px; height: 68px; border-radius: 19px; margin: 0 auto 2px; box-shadow: 0 10px 28px rgba(91, 155, 255, .35); }
.login-card h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.login-card p { margin: -6px 0 6px; color: var(--mut); }
.login-card input { font: inherit; font-size: 17px; color: var(--txt); background: var(--track); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; width: 100%; outline: none; text-align: center; }
.login-card input:focus { border-color: var(--cpu); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cpu) 25%, transparent); }
.btn { font: inherit; font-weight: 650; font-size: 16px; color: #fff; background: linear-gradient(135deg, #5b9bff, #8b5cf6); border-radius: 14px; padding: 13px; width: 100%; box-shadow: 0 8px 22px rgba(91, 155, 255, .3); }
.btn:disabled { opacity: .6; }
.login-err { min-height: 20px; color: var(--crit); font-size: 14px; }
.iconbtn { width: 38px; height: 38px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--mut); }
.iconbtn:hover { color: var(--txt); background: var(--card-hi); }
.iconbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* notifications */
.offline { position: sticky; top: calc(env(safe-area-inset-top) + 6px); z-index: 30; margin: 0 0 12px; padding: 11px 14px; border-radius: 14px; font-weight: 600; font-size: 14px;
  background: color-mix(in srgb, var(--crit) 18%, var(--bg)); color: var(--crit); border: 1px solid color-mix(in srgb, var(--crit) 40%, transparent); box-shadow: var(--shadow); }
.offline.ok { background: color-mix(in srgb, var(--ok) 18%, var(--bg)); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.iconbtn { position: relative; text-decoration: none; }
.dotb { position: absolute; top: 6px; right: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); border: 2px solid var(--bg); }
.dotb.crit { background: var(--crit); }
.tg { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.tg:first-child { border-top: 0; }
.tg span { display: grid; gap: 2px; min-width: 0; }
.tg b { font-weight: 600; font-size: 14.5px; }
.tg small { color: var(--mut); font-size: 12.5px; }
.tg input { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--track); position: relative; transition: background .2s; margin: 0; cursor: pointer; }
.tg input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .2s; }
.tg input:checked { background: var(--ok); }
.tg input:checked::after { transform: translateX(18px); }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btnrow .btn { width: auto; padding: 11px 18px; font-size: 15px; }
.btn.ghost { background: var(--track); color: var(--txt); box-shadow: none; }
.ev { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 11px 0; border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; padding-top: 0; }
.ev .dot { margin-top: 5px; }
.ev b { display: block; font-weight: 600; font-size: 14.5px; }
.ev small { color: var(--mut); font-size: 12.5px; display: block; line-height: 1.4; }
.ev time { color: var(--mut); font-size: 12px; white-space: nowrap; padding-top: 2px; }
.dot.s3 { background: var(--cpu); }
.msg { margin-top: 12px; padding: 11px 13px; border-radius: 12px; background: var(--track); font-size: 13.5px; line-height: 1.5; }
.msg.err { color: var(--crit); }
.msg.good { color: var(--ok); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--track); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.issues li.ok::before { background: var(--ok); }
