@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --bg: var(--background, #000000);
  --bg-1: #000000;
  --bg-2: #050505;
  --bg-3: #0a0a0a;
  --bg-hover: oklch(1 0 0 / 5%);
  --bd: var(--border, oklch(1 0 0 / 10%));
  --bd-2: oklch(1 0 0 / 16%);
  --fg: var(--foreground, #fafafa);
  --mut: var(--muted-foreground, #a1a1aa);
  --acc: var(--primary, #00e676);
  --acc-2: oklch(0.88 0.14 155);
  --acc-dim: oklch(0.805 0.186 155.4 / 0.14);
  --danger: var(--destructive, #f87171);
  --warn: oklch(0.82 0.10 85);
  --rx: var(--chart-1, #00e676);
  --tx: var(--chart-2, #7dd3fc);
  --side: 232px;
  --r: 8px;
  --r-sm: 6px;
  --r-xs: 4px;
  --r-pill: 999px;
  --pad-page: 28px;
  --pad-card: 16px;
  --gap: 12px;
  --control-h: 36px;
  --ink: #18181b;
  --vip: #e8c547;
  --torrent: #a78bfa;
  --glass: #000000;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  --z-shell: 30;
  --z-save: 28;
  --z-nav: 42;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  max-width: 100%;
  overflow: hidden;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  font-feature-settings: "ss01" on, "cv11" on;
}
code, pre, .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0; }
a { color: var(--acc); text-decoration: none; }
a:hover { color: var(--acc-2); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}
::selection { background: var(--acc-dim); color: var(--fg); }

html.locked #app,
html.setup #app { display: none !important; }
html.ready #auth-gate { display: none !important; }
html.locked #form-setup { display: none !important; }
html.setup #form-login { display: none !important; }
html.ready #app {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  position: relative;
  z-index: 1;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}
#auth-gate { position: relative; z-index: 1; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.05em;
  font-size: 18px;
  text-transform: lowercase;
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { color: var(--fg); }
.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--acc);
  box-shadow: 0 0 0 4px var(--acc-dim);
}
.logo {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.05em;
  padding: 0;
  font-size: 18px;
  border-radius: 0;
  text-transform: lowercase;
}

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-t)) 20px calc(24px + var(--safe-b));
  background: transparent;
}
.gate-wrap { width: min(420px, 100%); }
.gate-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px 6px;
  color: var(--mut);
  font-size: 13px;
  font-weight: 500;
}
.share-who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font-size: 12.5px;
}
.share-who i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--acc);
  color: #18181b;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
}
.gate-panel {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.gate-panel h1 { font-size: 30px; margin-bottom: 6px; letter-spacing: -0.045em; }
.gate-panel .lead { color: #c8c8c8; }
.gate-panel .btn { width: 100%; margin-top: 4px; }

.kicker {
  color: var(--acc);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 8px;
  font-weight: 500;
}
h1 { margin: 0 0 8px; font-size: 28px; font-weight: 600; letter-spacing: -0.04em; }
h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.04em; }
h3 {
  margin: 32px 0 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mut);
}
.lead { color: var(--mut); margin: 0 0 22px; }
label { display: block; margin: 0 0 6px; font-weight: 500; font-size: 13px; }
.hint { display: block; color: var(--mut); font-weight: 400; font-size: 12px; margin-top: 2px; }

.trunc,
.page-head h1,
.page-head .lead,
.lead,
.hint,
.fine,
.lbl,
.muted:not(pre):not(.log):not(:has(code)),
.pill,
.chip,
.tls-pill,
#live-pill,
#pub-ip,
.card .lbl,
.card .sub,
.card .val,
.card.kpi .val,
.sec-title,
.user-card h3,
.user-card h3 a,
.user-kpi em,
.user-kpi strong,
.dev-who strong,
.dev-who span,
.sess-who strong,
.sess-who span,
.sess-net,
.sess-tags,
.sess-dns,
.idle-line,
.qos-flag,
.qos-kind em,
.qos-kind strong,
.qos-who strong,
.qos-who span,
.qos-count,
.qos-adapt strong,
.qos-adapt em,
.dns-kind em,
.dns-kind strong,
.dns-top-lab span,
.togl-copy strong,
.togl-copy em,
.st-res em,
.st-res strong,
.st-caption,
.st-phase-lab,
.invite-row > span,
.hbar-lab,
.hbar-lab span,
.home-kpi em,
.svc-h strong,
.svc-state,
.dev-op,
.dev-facts dd,
.kv dd,
.user-card .meta .v,
.device-card .meta .v,
#nav-main a,
.btn,
th, td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.muted:has(code) {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
pre, textarea, .log, .svc-log, .prompt-preview {
  white-space: pre-wrap;
  text-overflow: unset;
  overflow: auto;
}

input, textarea, select {
  width: 100%;
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid var(--bd);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input:hover, textarea:hover, select:hover { border-color: var(--bd-2); }
input:focus, textarea:focus, select:focus {
  border-color: rgba(255, 255, 255, 0.220);
  box-shadow: 0 0 0 3px var(--acc-dim);
  background: var(--bg-3);
}
textarea {
  min-height: 220px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  max-width: 100%;
  border: 1px solid var(--bd);
  background: var(--bg-3);
  color: var(--fg);
  padding: 8px 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--r-sm);
  letter-spacing: -0.015em;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, filter 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}
.btn:hover { background: #111; text-decoration: none; color: var(--fg); border-color: var(--bd-2); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--acc);
  color: #18181b;
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 18px rgba(255, 255, 255, 0.180);
}
.btn.primary:hover { filter: brightness(1.06); color: #18181b; }
.btn.danger {
  border-color: rgba(255, 255, 255, 0.220);
  color: var(--danger);
  background: rgba(255, 255, 255, 0.060);
}
.btn.danger:hover { background: rgba(255, 255, 255, 0.120); color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 10px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn, .chip, .op-btn, nav a { -webkit-tap-highlight-color: transparent; }
.err { color: var(--danger); min-height: 1.2em; font-size: 13px; }

#app {
  display: none;
  width: 100%;
  max-width: 100%;
  min-height: 0;
}
.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: var(--bg);
}
#shell {
  position: relative;
  z-index: var(--z-shell);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 calc(20px + var(--safe-r)) 0 20px;
  border-bottom: 1px solid var(--bd);
  background: #000;
}
.brand-compact { display: none; }
#nav-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  min-width: 0;
  min-height: 0;
  height: auto;
  align-self: stretch;
  position: relative;
  padding: calc(16px + var(--safe-t)) 12px calc(16px + var(--safe-b)) calc(12px + var(--safe-l));
  border-right: 1px solid var(--bd);
  background: #050505;
  overflow: hidden;
}
#nav-main .brand { margin: 2px 8px 8px; }
.nav-scroll {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  flex: 1;
}
.nav-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
}
.nav-label {
  display: block;
  margin: 0 10px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mut);
}
#nav-main a,
#nav-more {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mut);
  padding: 9px 12px;
  border-radius: var(--r);
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  overflow: hidden;
  min-width: 0;
}
#nav-main a svg,
#nav-more svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#nav-main a:hover,
#nav-more:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}
#nav-main a.active,
#nav-more.active,
#nav-more.on {
  color: var(--acc);
  background: var(--acc-dim);
  border-color: transparent;
  box-shadow: none;
}
.nav-caret { display: none; }
#nav-more { display: none; }
#nav-more-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  position: static;
}
#nav-more-menu[hidden] { display: flex; }
#nav-more-menu a {
  color: var(--mut);
  padding: 9px 12px;
  border-radius: var(--r);
  font-weight: 500;
  font-size: 14px;
  width: 100%;
}
#nav-more-menu a:hover { background: rgba(255, 255, 255, 0.04); text-decoration: none; color: var(--fg); }
#nav-more-menu a.active { background: var(--acc-dim); color: var(--acc); }
.nav-drawer-foot { display: none; }
.shell-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
}
.nav-toggle {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--bd);
  background: transparent;
  border-radius: var(--r-sm);
  padding: 0;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.nav-close { display: none; }
.tls-pill {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  padding: 6px 10px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  color: var(--mut);
  text-align: center;
}
.tls-pill.on { color: var(--acc); border-color: rgba(255, 255, 255, 0.220); background: var(--acc-dim); }

img, video, canvas { max-width: 100%; height: auto; }
input, select, textarea { max-width: 100%; }
main {
  padding: 0 calc(var(--pad-page) + var(--safe-r)) calc(24px + var(--safe-b)) var(--pad-page);
  min-width: 0;
  min-height: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
}
#view { min-width: 0; max-width: 100%; }
#view:has(.save-bar) { padding-bottom: 88px; }
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 var(--gap);
  flex-wrap: wrap;
}
.page-head-copy { min-width: 0; flex: 1; }
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}
.page-actions:empty { display: none; }
.page-actions .btn { flex-shrink: 0; }
.page-actions .muted { font-size: 12px; max-width: 16rem; }
.page-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-head h1 .ico { width: 22px; height: 22px; color: var(--acc); flex-shrink: 0; }
.page-head .lead { margin: 6px 0 0; max-width: 100%; }
.sec-title {
  margin: 8px 0 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mut);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-title .ico { width: 14px; height: 14px; }
.btn .ico, .btn svg, .btn svg *,
.chip .ico, .chip svg { pointer-events: none; }
.ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  pointer-events: none;
}
.ico * { pointer-events: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.user-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card .lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card .lbl .ico { width: 13px; height: 13px; }
.nav-scrim { display: none; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.toolbar, .user-toolbar { flex-wrap: wrap; }
.pill {
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--bd);
  background: var(--bg-2);
  padding: 5px 10px;
  color: var(--fg);
  border-radius: 999px;
}
.pill.dim { color: var(--mut); }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-bottom: 16px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }

.card {
  background: var(--glass);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 16px 16px 14px;
  min-width: 0;
  box-shadow: none;
}
.kpi-grid { margin-bottom: 12px; }
.card.kpi .val { font-size: 24px; }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.spark { width: 96px; height: 32px; display: block; flex-shrink: 0; }
.donut { width: 148px; height: 148px; display: block; margin: 8px auto 0; }
.donut-wrap { display: grid; place-items: center; }
.hbar { margin: 0 0 12px; }
.hbar-lab { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; margin-bottom: 4px; min-width: 0; }
.hbar-lab span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-lab .mono { flex-shrink: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.card .lbl {
  color: var(--mut);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.card .val {
  font-size: 22px;
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.card .val.ok { color: var(--acc); }
.card .val.bad { color: var(--danger); }
.card .sub { color: var(--mut); font-size: 12px; margin-top: 4px; }

.st-hero .val { font-size: 34px; font-variant-numeric: tabular-nums; }
.st-bar {
  height: 3px;
  background: var(--bg-3);
  border-radius: var(--r-xs);
  overflow: hidden;
  margin-top: 14px;
}
.st-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--acc);
  transition: width 0.2s linear;
}
.st-bar.run > span {
  width: 70%;
  animation: st-load 1.2s ease-in-out infinite;
}
@keyframes st-load {
  0% { width: 8%; margin-left: 0; }
  50% { width: 45%; margin-left: 30%; }
  100% { width: 8%; margin-left: 92%; }
}
.st-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.st-params {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
  align-items: end;
}
.st-params .togl { min-height: 44px; }

.st-stage {
  text-align: center;
  padding: 22px 18px 20px;
  margin-bottom: 16px;
}
.st-mode {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--bd);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin: 0 auto 6px;
}
.st-mode .chip { min-height: 36px; border: 0; }
.st-caption {
  color: var(--mut);
  font-size: 13px;
  margin: 0 0 4px;
}
.st-gauge {
  position: relative;
  width: min(440px, 100%);
  margin: 0 auto;
}
.st-dial { width: 100%; height: auto; display: block; overflow: visible; }
.st-track {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 16;
  stroke-linecap: round;
}
.st-arc {
  stroke: var(--acc);
  stroke-width: 16;
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.220));
  transition: stroke 0.25s ease;
}
.st-stage.is-up .st-arc {
  stroke: var(--tx);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.220));
}
.st-stage.is-ping .st-arc {
  stroke: #d4d4d8;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.220));
}
.st-tick {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.5;
}
.st-tick.major { stroke: rgba(255, 255, 255, 0.45); stroke-width: 2; }
.st-tick-lab {
  fill: var(--mut);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}
.st-needle-shape {
  fill: var(--acc);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.220));
}
.st-stage.is-up .st-needle-shape { fill: var(--tx); filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.220)); }
.st-stage.is-ping .st-needle-shape { fill: #d4d4d8; }
.st-hub { fill: #1a1d24; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.5; }
.st-hub-in { fill: var(--acc); }
.st-stage.is-up .st-hub-in { fill: var(--tx); }
.st-stage.is-ping .st-hub-in { fill: #d4d4d8; }
.st-center {
  position: absolute;
  left: 50%;
  top: 61%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.st-readout {
  text-align: center;
  margin: -8px auto 18px;
  min-height: 5.2em;
}
.st-go {
  pointer-events: auto;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 0;
  background: var(--acc);
  color: #18181b;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(255, 255, 255, 0.220), 0 0 0 10px var(--acc-dim);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.st-go:hover { filter: brightness(1.06); transform: scale(1.03); }
.st-go:active { transform: scale(0.97); }
.st-go:disabled { opacity: 0.55; cursor: wait; transform: none; }
.st-go[hidden] { display: none; }
.st-phase-lab {
  color: var(--mut);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}
.st-num {
  font-size: clamp(36px, 8vw, 52px);
  font-weight: 600;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--fg);
}
.st-stage.is-down .st-num { color: var(--acc); }
.st-stage.is-up .st-num { color: var(--tx); }
.st-stage.is-ping .st-num { color: #d4d4d8; }
.st-unit {
  color: var(--mut);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}
.st-chart-card { margin-bottom: 16px; }
.st-chart { width: 100%; min-height: 120px; }
.st-line {
  width: 100%;
  height: 220px;
  display: block;
}
.st-line-down {
  fill: none;
  stroke: var(--acc);
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.st-line-up {
  fill: none;
  stroke: var(--tx);
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.st-grid { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.st-axis {
  fill: var(--mut);
  font-size: 11px;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}

.st-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
  text-align: left;
}
.st-res {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 12px 14px 10px;
  min-width: 0;
}
.st-res .k {
  display: block;
  color: var(--mut);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.st-res strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.st-res.down strong { color: var(--acc); }
.st-res.up strong { color: var(--tx); }
.st-res em {
  display: block;
  margin-top: 2px;
  color: var(--mut);
  font-style: normal;
  font-size: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .st-go { transition: none; }
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--mut);
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: middle;
  flex-shrink: 0;
}
.dot.on { background: var(--acc); box-shadow: 0 0 0 3px var(--acc-dim); }
.dot.off { background: var(--danger); }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--bd);
  font-size: 13px;
  vertical-align: middle;
}
th {
  color: var(--mut);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
}
tr:hover td { background: var(--bg-hover); }
tr:last-child td { border-bottom: 0; }
.table-wrap {
  overflow: auto;
  border: 1px solid var(--bd);
  border-radius: var(--r);
  background: var(--glass);
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.table-wrap table { min-width: 680px; table-layout: fixed; width: 100%; }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px;
  background: var(--glass);
  border: 1px solid var(--bd);
  border-radius: var(--r);
}
.toolbar .field { flex: 1; min-width: 160px; }
.toolbar .field input,
.toolbar .field select { margin-bottom: 0; }
.muted { color: var(--mut); }
.ok { color: var(--acc); }
.bad { color: var(--danger); }
.warn { color: var(--warn); }

pre.log {
  background: var(--glass);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 16px;
  overflow: auto;
  max-height: 62vh;
  font-size: 12px;
  white-space: pre-wrap;
}
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--bd);
  background: rgba(255, 255, 255, 0.03);
  color: var(--mut);
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 999px;
}
.tabs button.on { color: var(--acc); background: var(--acc-dim); border-color: transparent; box-shadow: none; }

.chart-wrap {
  background: transparent;
  border: 0;
  border-radius: var(--r);
  padding: 0;
  min-height: 200px;
}
.chart, .voao-chart { width: 100%; height: 220px; display: block; }
.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--mut);
  flex-wrap: wrap;
  align-items: center;
}
.chart-legend select { width: auto; margin: 0 0 0 auto; padding: 6px 8px; }
.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 3px;
}
.swatch.rx { background: var(--rx); }
.swatch.tx { background: var(--tx); }
.swatch.ss { background: var(--warn); }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--mut); }
.kv dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

body.share {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b));
  background: #000;
}
.share-card {
  width: min(520px, 100%);
  background: #000;
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  padding: 28px 24px;
}
.share-prog { display: flex; gap: 6px; margin: 0 0 18px; }
.share-prog span { flex: 1; height: 4px; background: var(--bd); border-radius: var(--r-xs); }
.share-prog span.on { background: var(--acc); }
.share-step { display: none; }
.share-step.on { display: block; }
.share-step h1 { margin-bottom: 8px; font-size: 26px; }
.share-step .btn { margin-top: 8px; }
.qr {
  background: #000;
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  padding: 16px;
  margin: 8px 0 18px;
}
.qr svg, .qr img { width: 100%; height: auto; display: block; border-radius: var(--r-xs); }
.op-pick { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 8px 0 18px; }
.dev-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}
.dev-row .op-btn { min-width: 0; }
.dev-del {
  align-self: stretch;
  white-space: nowrap;
  min-height: 56px;
  padding: 8px 12px;
}
#device-empty { margin: 0 0 12px; }
.op-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--bd);
  padding: 14px 14px;
  text-align: left;
  cursor: pointer;
  border-radius: var(--r-xs);
  transition: border-color 0.15s ease, background 0.15s ease;
  min-height: 56px;
}
.op-btn span { color: var(--mut); font-size: 12px; }
.op-btn.on { border-color: var(--acc); background: var(--acc-dim); }
.op-btn:hover { border-color: var(--acc); }
.steps { color: var(--fg); padding-left: 18px; }
.steps li { margin: 0 0 8px; }
.fine { color: var(--mut); font-size: 12px; margin-top: 20px; }

#data-log { display: none; }
#data-kind[value="logs"] ~ #data-log { display: inline-flex; }

.qos-page { padding-bottom: 0; }
.qos-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 18px;
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  margin-bottom: 14px;
  background: var(--glass);
}
.qos-hero.on,
.qos-hero.off {
  border-color: var(--bd);
  background: var(--glass);
}
.qos-hero h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.03em; text-transform: none; color: var(--fg); }
.qos-hero p {
  margin: 0;
  color: var(--mut);
  max-width: min(52ch, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qos-hero .btn { flex-shrink: 0; }
.qos-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.qos-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  font-size: 12px;
  color: var(--mut);
  background: var(--bg-1);
}
.qos-flag.ok { color: var(--acc); border-color: rgba(255, 255, 255, 0.220); }
.qos-flag.warn { color: var(--warn); border-color: rgba(255, 255, 255, 0.220); }
.qos-flag.off { color: var(--danger); border-color: rgba(255, 255, 255, 0.220); }
.qos-block { margin-bottom: 14px; }
.qos-sec {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.qos-sec > div { min-width: 0; overflow: hidden; }
.qos-count {
  font-size: 12px;
  color: var(--mut);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 2px;
  max-width: 40%;
}
.qos-adapt {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  background: var(--bg-1);
}
.qos-adapt > div { min-width: 0; overflow: hidden; }
.qos-adapt .k { display: block; font-size: 11px; color: var(--mut); letter-spacing: 0.04em; text-transform: uppercase; }
.qos-adapt strong { display: block; font-size: 18px; font-family: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qos-adapt em { display: block; color: var(--mut); font-style: normal; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qos-profiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.qos-profile {
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  padding: 14px;
  background: var(--bg-1);
  min-width: 0;
}
.qos-profile header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.qos-profile header span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: inherit;
}
.qos-profile header input[type=number] {
  width: 4.4em;
  margin: 0;
  padding: 4px 6px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.qos-profile-vip { border-color: rgba(255, 255, 255, 0.220); }
.qos-profile-vip header span { color: var(--vip); }
.qos-profile-std { border-color: rgba(255, 255, 255, 0.220); }
.qos-profile-std header span { color: var(--acc); }
.qos-profile-torrent { border-color: rgba(255, 255, 255, 0.220); }
.qos-profile-torrent header span { color: var(--torrent); }
.qos-profile input[type=range] { width: 100%; margin: 0 0 10px; padding: 0; border: 0; background: transparent; }
.qos-profile-vip input[type=range] { accent-color: #d4d4d8; }
.qos-profile-std input[type=range] { accent-color: var(--acc); }
.qos-profile-torrent input[type=range] { accent-color: #a1a1aa; }
.qos-profile select { width: 100%; margin-bottom: 0; }
.qos-profile-bar {
  display: flex;
  height: 10px;
  border-radius: var(--r-xs);
  overflow: hidden;
  border: 1px solid var(--bd);
  background: #000;
}
.qos-profile-bar > i { display: block; height: 100%; min-width: 0; }
.qos-profile-bar > i.vip { background: var(--vip); }
.qos-profile-bar > i.std { background: var(--acc); }
.qos-profile-bar > i.torrent { background: var(--torrent); }
#qos-profile-sum { margin: 8px 0 0; }
.qos-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.qos-link-cell select, .qos-link-cell input { margin-bottom: 6px; }
.qos-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}
.qos-card {
  border: 1px solid var(--bd);
  background: var(--glass);
  border-radius: var(--r-xs);
  padding: 14px;
  min-width: 0;
}
.qos-card.is-vip {
  border-color: rgba(255, 255, 255, 0.220);
  background: rgba(255, 255, 255, 0.060);
}
.qos-card.is-torrent {
  border-color: rgba(255, 255, 255, 0.220);
  background: rgba(255, 255, 255, 0.060);
}
.qos-kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}
.qos-devs {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--bd);
}
.qos-devs .k { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.qos-dev {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 180px);
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  font-size: 13px;
}
.qos-dev select { margin: 0; }
.qos-dev-pick { margin: 8px 0 0; }
.qos-dev-pick label { font-size: 11px; color: var(--mut); }
.qos-dev-pick select { margin-top: 4px; }
.qos-kind, .dns-kind {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 10px 8px;
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  cursor: pointer;
  background: var(--bg-1);
  min-width: 0;
  overflow: hidden;
}
.qos-kind input, .dns-kind input { position: absolute; opacity: 0; pointer-events: none; }
.qos-kind .ico, .dns-kind .ico { width: 18px; height: 18px; margin-bottom: 4px; color: var(--mut); }
.qos-kind strong, .dns-kind strong { font-size: 13px; }
.qos-kind em, .dns-kind em { font-style: normal; font-size: 11px; color: var(--mut); }
.dns-kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}
.dns-kind.off .ico { color: var(--mut); }
.dns-kind.ads .ico { color: #fb923c; }
.dns-kind.privacy .ico { color: #a78bfa; }
.dns-kind.family .ico { color: #f472b6; }
.dns-kind:has(input:checked),
.dns-kind.on { border-color: var(--acc); }
.dns-kind.ads:has(input:checked),
.dns-kind.ads.on { border-color: rgba(255, 255, 255, 0.220); }
.dns-kind.privacy:has(input:checked),
.dns-kind.privacy.on { border-color: rgba(255, 255, 255, 0.220); }
.dns-kind.family:has(input:checked),
.dns-kind.family.on { border-color: rgba(255, 255, 255, 0.220); }
.qos-kind.std .ico { color: var(--acc); }
.qos-kind.vip .ico { color: var(--vip); }
.qos-kind.torrent .ico { color: var(--torrent); }
.qos-kind.inherit .ico { color: var(--mut); }
.qos-kind:has(input:checked),
.qos-kind.on {
  border-color: var(--acc);
}
.qos-kind.vip:has(input:checked),
.qos-kind.vip.on { border-color: rgba(255, 255, 255, 0.220); color: #d4d4d8; }
.qos-kind.torrent:has(input:checked),
.qos-kind.torrent.on { border-color: rgba(255, 255, 255, 0.220); color: #a1a1aa; }
.qos-card-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.qos-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; }
.qos-who strong { font-size: 15px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qos-who span { font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qos-mode { min-width: 0; }
.qos-card .vip-imp { display: none; }
.qos-card .qos-cap { display: block; }
.qos-card:has(.qos-kind.vip input:checked) .vip-imp { display: block; }
.qos-card:has(.qos-kind.vip input:checked) .qos-cap { display: none; }
.qos-split-lab {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--mut);
  margin-bottom: 8px;
}
.vip-imp input[type=range] {
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #d4d4d8;
}
.qos-split-bar {
  height: 8px;
  border-radius: var(--r-xs);
  background: #000;
  overflow: hidden;
  border: 1px solid var(--bd);
  margin-bottom: 8px;
}
.qos-split-bar > i {
  display: block;
  height: 100%;
  background: #d4d4d8;
  max-width: 100%;
}
.vip-imp-lab {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
  color: #d4d4d8;
}
.qos-cap label { margin-bottom: 6px; }
.qos-cap select, .qos-cap input { margin-bottom: 6px; }
.save-bar,
.user-save,
.qos-save {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-save);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
  padding: 10px var(--pad-page) calc(12px + var(--safe-b));
  border: 0;
  border-top: 1px solid var(--bd);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.save-bar .err,
.user-save .err,
.qos-save .err {
  margin: 0;
  min-height: 0;
  flex: 1;
  text-align: left;
}
.save-bar .btn,
.user-save .btn,
.qos-save .btn { flex-shrink: 0; min-width: 148px; }
.qos-page.is-off .qos-block { opacity: 0.72; }
.togl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.togl {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.togl input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}
.togl-ui {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  border-radius: var(--r-xs);
  background: #0a0a0a;
  border: 1px solid var(--bd);
}
.togl-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #6a6a6a;
  transition: transform 0.18s ease, background 0.18s ease;
}
.togl-copy { min-width: 0; }
.togl-copy strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.togl-copy em {
  display: block;
  font-style: normal;
  color: var(--mut);
  font-size: 12px;
  font-weight: 400;
  margin-top: 2px;
  line-height: 1.35;
}
.togl:hover { border-color: var(--bd-2); }
.togl:has(input:checked) { background: #000; }
.togl.vip:has(input:checked) {
  border-color: rgba(255, 255, 255, 0.220);
  background: rgba(255, 255, 255, 0.060);
}
.togl.en:has(input:checked) {
  border-color: rgba(255, 255, 255, 0.220);
  background: var(--acc-dim);
}
.togl.en:not(:has(input:checked)) {
  border-color: rgba(255, 255, 255, 0.220);
}
.togl:has(input:checked) .togl-ui { background: var(--acc); border-color: transparent; }
.togl.vip:has(input:checked) .togl-ui { background: #d4d4d8; }
.togl:has(input:checked) .togl-ui::after { transform: translateX(18px); background: #18181b; }
.togl.en:not(:has(input:checked)) .togl-copy strong { color: var(--danger); }
.togl.share:has(input:checked) {
  border-color: rgba(255, 255, 255, 0.220);
  background: var(--acc-dim);
}
.togl.share:not(:has(input:checked)) {
  border-color: rgba(255, 255, 255, 0.220);
}
.togl.share:not(:has(input:checked)) .togl-copy strong { color: var(--danger); }
.user-share.is-off { opacity: 0.42; }
.togl.compact {
  padding: 6px 10px;
  gap: 8px;
  border-radius: var(--r-xs);
}
.togl.compact .togl-ui { width: 36px; height: 20px; }
.togl.compact .togl-ui::after { width: 14px; height: 14px; }
.togl.compact:has(input:checked) .togl-ui::after { transform: translateX(16px); }
.togl.compact .togl-copy em { display: none; }
.togl.compact .togl-copy strong { font-size: 12px; }
.split { margin-top: 12px; }
.split-lab {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--mut);
  margin-bottom: 8px;
}
.split-lab b { color: var(--fg); font-weight: 600; }
.split input[type=range] {
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  background: transparent;
  border: 0;
  accent-color: #d4d4d8;
}
.split-bar {
  height: 8px;
  border-radius: var(--r-xs);
  background: #000;
  overflow: hidden;
  border: 1px solid var(--bd);
}
.split-bar > i {
  display: block;
  height: 100%;
  background: #d4d4d8;
  max-width: 100%;
}
.pill.vip, .user-card.vip { border-color: rgba(255, 255, 255, 0.220); }
.pill.vip { color: var(--vip); background: rgba(232, 197, 71, 0.10); }
.pill.torrent, .user-card.torrent { border-color: var(--bd); }
.pill.torrent { color: var(--torrent); background: rgba(167, 139, 250, 0.10); }
.flash { box-shadow: 0 0 0 2px var(--acc); }

.empty {
  border: 1px dashed var(--bd-2);
  padding: 36px 24px;
  color: var(--mut);
  background: var(--glass);
  border-radius: var(--r);
  text-align: center;
}

.people-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.people-bar .search { flex: 1 1 200px; max-width: 320px; margin: 0; }
.people-bar select {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  min-height: 40px;
}
.people-bar #user-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.people-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--bd);
  border-radius: var(--r);
  background: var(--bg-1);
  overflow: hidden;
}
.people-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--bd);
  min-width: 0;
}
.people-row:last-child { border-bottom: 0; }
.people-row.live { box-shadow: inset 2px 0 0 var(--acc); }
.people-row.disabled { opacity: 0.5; }
.people-row.wait { box-shadow: inset 2px 0 0 var(--warn); }
.people-main {
  display: grid;
  grid-template-columns: 36px minmax(0, 1.5fr) minmax(6rem, 0.8fr) minmax(0, 1.1fr);
  gap: 4px 14px;
  align-items: center;
  padding: 11px 16px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.people-main:hover { background: var(--bg-hover); }
.people-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0a0a0a;
  color: var(--mut);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.04em;
}
.people-av.on { background: var(--acc-dim); color: var(--acc); }
.people-av.wait { background: rgba(255, 255, 255, 0.120); color: var(--warn); }
.people-id, .people-live, .people-tags { min-width: 0; }
.people-id strong, .people-live b, .people-tags b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.people-id strong { font-size: 15px; font-weight: 600; letter-spacing: -0.03em; }
.people-live b { font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.people-tags b { font-size: 13px; font-weight: 500; }
.people-id em, .people-live em, .people-tags em {
  display: block;
  color: var(--mut);
  font-style: normal;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.people-kill { margin-right: 10px; min-width: 36px; padding: 0 8px; }
.people-list-detail .people-row { align-items: stretch; }
.people-list-detail .people-main {
  grid-template-columns: 36px minmax(0, 1fr) minmax(6rem, auto);
  align-items: start;
  padding: 14px 16px;
}
.people-extra {
  grid-column: 2 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-top: 2px;
}
.people-extra-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--fg);
  min-width: 0;
}
.people-extra-line b { font-weight: 500; }
.people-extra-line span { color: var(--mut); font-variant-numeric: tabular-nums; }
.people-extra-stats { color: var(--mut); font-size: 12px; }
.people-live-box { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(220px, 1fr); gap: 12px; align-items: stretch; }
.people-live-box .chart-wrap { min-height: 180px; }
.people-live-box .voao-chart { height: 168px; }
.people-habits { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.people-habits .card { min-width: 0; }
.people-hist { padding-bottom: 14px; }
.people-hist-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.people-hist-h .hint { margin: 4px 0 0; }
.people-hist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}
.people-hist-chart { min-height: 200px; }
.people-hist-chart .voao-chart { height: 188px; }
@media (max-width: 900px) {
  .people-live-box, .people-habits, .people-hist-grid { grid-template-columns: 1fr; }
}
.people-detail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.people-dock { padding: 14px 16px 12px; }
.people-dock-id {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: end;
  margin: 0 0 12px;
}
.people-dock-id .field { min-width: 0; }
.people-dock-id input { margin: 0; }
.people-dock-tog { margin: 0; min-height: 40px; padding: 8px 10px; }
.people-dock .people-set { margin: 0 0 12px; }
.people-dock .user-share { margin: 0 0 12px; }
.people-dock-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.people-dock-acts .err { flex: 1 1 120px; margin: 0; min-height: 0; }
.people-dock-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--bd);
}
.people-dock-add input { margin: 0; }
.people-dock-add .err { grid-column: 1 / -1; margin: 0; min-height: 0; }
.people-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.people-stats div {
  padding: 10px 12px;
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  background: var(--bg-1);
  min-width: 0;
}
.people-stats span {
  display: block;
  color: var(--mut);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.people-stats b {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.people-stats i { color: var(--mut); font-style: normal; font-weight: 500; font-size: 13px; }
.people-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin: 0 0 14px;
}
.people-set label { margin-bottom: 8px; }
.people-detail .dns-kind em,
.people-detail .qos-kind em { display: none; }
.people-detail .dns-kind, .people-detail .qos-kind { min-height: 44px; padding: 8px 10px; }
.people-detail .qos-kinds, .people-detail .dns-kinds { margin: 0; }
.people-togs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0 0 14px;
  max-width: 360px;
}
.people-devs { display: flex; flex-direction: column; }
.people-dev {
  display: grid;
  grid-template-columns: auto minmax(0, 1.4fr) auto auto auto auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--bd);
  min-width: 0;
}
.people-dev:last-child { border-bottom: 0; }
.people-dev-id { min-width: 0; }
.people-dev-id strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-dev-id em { display: block; color: var(--mut); font-style: normal; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-dev-ip { font-size: 12px; color: var(--mut); }
.people-dev select { margin: 0; width: auto; min-width: 7rem; min-height: 36px; padding: 6px 8px; }
.people-dl { position: relative; }
.people-dl summary {
  list-style: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bd);
  border-radius: 8px;
  color: var(--mut);
}
.people-dl summary::-webkit-details-marker { display: none; }
.people-dl[open] summary { border-color: var(--acc); color: var(--acc); }
.people-dl > div {
  position: absolute;
  right: 0;
  top: 42px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 148px;
  padding: 8px;
  background: #000;
  border: 1px solid var(--bd-2);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.people-dev-acts { display: flex; gap: 4px; }
.people-dev-acts .btn { min-width: 36px; padding: 0 8px; }
.people-danger { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 8px; }
.people-more { padding: 12px 14px; }
.people-more summary { cursor: pointer; color: var(--mut); font-size: 13px; font-weight: 500; }
.people-more .signup-facts, .people-more .dns-log { margin-top: 12px; }
.people-more .dns-log { max-height: 36vh; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.user-grid.view-compact {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--bd);
  border-radius: var(--r);
  background: var(--glass);
  overflow: hidden;
}
.user-card, .device-card {
  background: var(--glass);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}
.user-card .id { flex: 1; min-width: 0; }
.user-card .id h3 { margin: 0; }
.sess-now {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sess-now li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "dot who rate"
    ". net vol";
  gap: 2px 10px;
  align-items: baseline;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
}
.sess-now .dot { grid-area: dot; margin-top: 4px; }
.sess-who { grid-area: who; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sess-who strong { font-size: 14px; }
.sess-who span { color: var(--mut); font-size: 12px; }
.sess-rate { grid-area: rate; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sess-net { grid-area: net; font-size: 12px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sess-vol { grid-area: vol; font-size: 11px; text-align: right; white-space: nowrap; }
.sess-tags, .idle-line, .sess-dns {
  margin: 0;
  font-size: 12.5px;
  color: var(--mut);
}
.sess-dns b { color: var(--fg); font-weight: 500; }
.user-grid.view-compact .user-card {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 16px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--bd);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.user-grid.view-compact .user-card:last-child { border-bottom: 0; }
.user-grid.view-compact .user-card.live { box-shadow: inset 3px 0 0 var(--acc); }
.user-grid.view-compact .c-name {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-top: 2px;
}
.user-grid.view-compact .c-name:hover { color: var(--acc); }
.user-grid.view-compact .c-live { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.user-grid.view-compact .c-line {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 14px;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--fg);
  overflow: hidden;
  min-width: 0;
}
.user-grid.view-compact .c-line b {
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-grid.view-compact .c-line span {
  color: var(--mut);
  flex-shrink: 0;
  white-space: nowrap;
}
.user-grid.view-compact .c-line .mono { color: var(--fg); font-variant-numeric: tabular-nums; }
.user-grid.view-compact .row-actions { justify-content: flex-end; align-self: center; }
@media (hover: hover) {
  .user-card:hover, .device-card:hover {
    border-color: var(--bd-2);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
  }
}
.user-card.live, .device-card.live {
  border-color: rgba(255, 255, 255, 0.220);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.080);
}
.user-grid.view-compact .user-card.live {
  border-color: transparent;
  box-shadow: inset 3px 0 0 var(--acc);
}
.user-grid.view-compact .user-card:hover {
  transform: none;
  box-shadow: none;
}
.user-grid.view-compact .user-card.live:hover {
  box-shadow: inset 3px 0 0 var(--acc);
}
.user-card.disabled { opacity: 0.55; }
.user-card .uh, .device-card .uh { display: flex; align-items: center; gap: 10px; }
.user-card h3 { margin: 0; font-size: 18px; font-weight: 600; flex: 1; letter-spacing: -0.03em; min-width: 0; }
.user-card .meta, .device-card .meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--r-xs);
  padding: 12px;
}
.user-card .meta .k, .device-card .meta .k {
  color: var(--mut);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.user-card .meta .v, .device-card .meta .v {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.user-card .meta select { margin: 0; padding: 6px 8px; font-size: 12px; width: 100%; }
.user-toolbar select, .toolbar select { width: auto; min-width: 150px; margin: 0; }
.invite-card { margin-bottom: 16px; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.invite-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.signup-list { display: grid; gap: 10px; margin-top: 12px; }
.signup-card {
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 14px;
  background: var(--bg-2);
  min-width: 0;
}
.signup-card h3 {
  margin: 0 4px 0 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.signup-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.signup-meta, .signup-place {
  margin: 4px 0 0;
  color: var(--mut);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.signup-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px 14px;
  margin: 12px 0;
}
.signup-facts div { min-width: 0; }
.signup-facts dt {
  color: var(--mut);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.signup-facts dd {
  margin: 2px 0 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.signup-facts dd.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; }
.signup-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.signup-ua { margin: 0 0 10px; color: var(--mut); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.invite-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  background: var(--bg-1);
  font-size: 13px;
  overflow: hidden;
  min-width: 0;
}
.invite-row > span { min-width: 0; max-width: 100%; }
.invite-row .muted { margin-left: auto; }
.invite-row .btn { flex-shrink: 0; }
.user-toolbar .search, .toolbar .search { margin: 0; max-width: 280px; }
.bar { height: 6px; background: var(--bg-2); margin-top: 6px; border-radius: var(--r-xs); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--acc); max-width: 100%; border-radius: var(--r-xs); }

.dns-log {
  max-height: 52vh;
  overflow: auto;
  background: var(--glass);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}
.dns-log table {
  margin: 0;
  min-width: 860px;
  table-layout: fixed;
  width: 100%;
}
.dns-log th, .dns-log td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dns-log th:nth-child(1), .dns-log td:nth-child(1) { width: 88px; }
.dns-log th:nth-child(2), .dns-log td:nth-child(2) { width: 110px; }
.dns-log th:nth-child(3), .dns-log td:nth-child(3) { width: 28%; }
.dns-log th:nth-child(4), .dns-log td:nth-child(4) { width: 56px; }
.dns-log th:nth-child(5), .dns-log td:nth-child(5) { width: 92px; }
.dns-log th:nth-child(6), .dns-log td:nth-child(6) { width: 22%; }
.dns-log th:nth-child(7), .dns-log td:nth-child(7) { width: 56px; }
.dns-log th:nth-child(8), .dns-log td:nth-child(8) { width: 72px; }
.dns-log .blk, .dns-log tr.blk { color: var(--danger); }
.dns-log tr.nx { color: var(--warn); }
.dns-log tr.err { color: var(--danger); }
#dns-users .table-wrap table { table-layout: fixed; min-width: 640px; }
#dns-users td, #dns-users th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { max-width: 320px; margin-bottom: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--bd);
  background: rgba(255, 255, 255, 0.03);
  color: var(--mut);
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 999px;
  font-size: 13px;
}
.chip.on { color: var(--acc); background: var(--acc-dim); border-color: transparent; box-shadow: none; }
.chip:hover { color: var(--fg); }
.chip.on:hover { color: var(--acc); }

.dns-top { max-height: 380px; overflow: auto; padding-right: 4px; }
.dns-top-row { margin: 0 0 12px; }
.dns-top-lab { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; min-width: 0; }
.dns-top-lab span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dns-top-lab span:last-child { flex-shrink: 0; }
.prompt-preview {
  max-height: 280px;
  overflow: auto;
  font-size: 11px;
  line-height: 1.45;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  padding: 12px;
  margin-top: 16px;
  white-space: pre-wrap;
  color: var(--mut);
}

.dev-line { display: flex; flex-wrap: wrap; gap: 6px; }
.dev-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--bd);
  background: var(--bg);
  padding: 4px 9px;
  font-size: 12px;
  color: var(--mut);
  border-radius: var(--r-xs);
}
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }

.user-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: none;
  min-width: 0;
}
.user-crumb {
  color: var(--mut);
  font-size: 13px;
  font-weight: 500;
  width: fit-content;
}
.user-crumb:hover { color: var(--fg); }
.user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
}
.user-head-id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.user-head-id .dot { margin-top: 0; }
.user-head-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.user-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.user-kpi {
  background: var(--glass);
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  padding: 12px 14px;
  min-width: 0;
}
.user-kpi .k {
  display: block;
  color: var(--mut);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.user-kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.user-kpi em {
  display: block;
  margin-top: 2px;
  color: var(--mut);
  font-style: normal;
  font-size: 12px;
}
.user-block { margin: 0; }
.user-block-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.user-block-h > div { min-width: 0; overflow: hidden; }
.user-block-h .hint { margin: 4px 0 0; }
.user-count {
  font-size: 12px;
  color: var(--mut);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
  white-space: nowrap;
}
.user-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.user-fields input,
.user-fields select { margin-bottom: 0; }
.user-page .qos-kinds {
  margin: 0 0 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.user-page .dns-kinds {
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.user-page .togl { margin-bottom: 0; }
.user-block .togl.share { margin: 0 0 12px; }
.user-share {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}
.user-share input { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.user-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.user-add-row input { margin: 0; }
.user-dns { padding: 0; }
.user-dns .user-block-h { margin-bottom: 10px; }
.user-dns .dns-log { max-height: 42vh; }
.user-danger { border-color: rgba(255, 255, 255, 0.220); }
.user-page .device-card { padding: 14px; gap: 12px; }
.user-page .device-card:hover { transform: none; box-shadow: none; }
.dev-h {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dev-who { flex: 1; min-width: 0; }
.dev-who strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.dev-who span { display: block; font-size: 12px; color: var(--mut); margin-top: 2px; font-variant-numeric: tabular-nums; }
.dev-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--r-xs);
}
.dev-facts div { min-width: 0; }
.dev-facts dt {
  color: var(--mut);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.dev-facts dd { margin: 2px 0 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dev-facts .mono { font-size: 12px; }
.dev-dl { display: flex; flex-direction: column; gap: 8px; }
.dev-dl .k {
  font-size: 10px;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.dev-dl-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.dev-op {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.dev-op:hover { background: rgba(255, 255, 255, 0.08); color: var(--fg); text-decoration: none; }
.dev-op.orange { border-color: rgba(255, 255, 255, 0.220); }
.dev-op.bouygues { border-color: rgba(255, 255, 255, 0.220); }
.dev-op.sfr { border-color: rgba(255, 255, 255, 0.220); }
.dev-op.wg { border-color: rgba(255, 255, 255, 0.220); color: var(--acc); }
.dev-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--bd);
}
.dev-qos {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: min(180px, 100%);
  flex: 1;
}
.dev-qos span { font-size: 11px; color: var(--mut); font-weight: 500; }
.dev-qos select { margin: 0; padding: 8px 10px; }
.dev-foot-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.svc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.svc-card {
  background: var(--glass);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 16px;
  min-width: 0;
}
.svc-card.ok { border-color: rgba(255, 255, 255, 0.220); }
.svc-card.off { border-color: rgba(255, 255, 255, 0.220); }
.svc-h {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.svc-h strong { display: block; font-size: 16px; letter-spacing: -0.02em; }
.svc-state { display: block; font-size: 12px; color: var(--mut); margin-top: 2px; }
.svc-h .pill { margin-left: auto; }
.svc-en {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: var(--mut);
  cursor: pointer;
}
.svc-en input { width: auto; margin: 0; accent-color: var(--acc); }
.svc-log {
  margin: 12px 0 0;
  max-height: 140px;
  overflow: auto;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--bd);
  border-radius: var(--r-xs);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.45;
  color: var(--mut);
  white-space: pre-wrap;
}

@media (max-width: 1280px) {
  .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1180px) {
  .shell-end .tls-pill { display: none; }
}
@media (max-width: 1080px) {
  .shell-end #pub-ip { display: none; }
  .grid, .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; }
  .qos-hero { flex-direction: column; }
  .qos-link-grid { grid-template-columns: 1fr; }
  .qos-adapt { grid-template-columns: 1fr; }
  .qos-kinds { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  html.ready #app { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
  .workspace { flex: 1; min-height: 0; overflow: hidden; }
  #shell {
    padding: calc(8px + var(--safe-t)) calc(12px + var(--safe-r)) 8px calc(12px + var(--safe-l));
  }
  .brand-compact { display: inline-flex; }
  .nav-toggle { display: flex; }
  #nav-main {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 86vw);
    height: 100dvh;
    z-index: var(--z-nav);
    padding: calc(16px + var(--safe-t)) 12px calc(16px + var(--safe-b)) calc(12px + var(--safe-l));
    border-right: 1px solid var(--bd);
    background: #050505;
  }
  body.nav-open #nav-main { display: flex; }
  #nav-main a,
  #nav-more-menu a {
    min-height: 44px;
    font-size: 15px;
  }
  .nav-drawer-foot { display: block; margin-top: auto; }
  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--bd);
    background: transparent;
    color: var(--mut);
    font-size: 13px;
    border-radius: var(--r-sm);
    cursor: pointer;
  }
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    z-index: 41;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  body.nav-open .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }
  html.nav-open, body.nav-open { overflow: hidden; }
  .shell-end .tls-pill,
  .shell-end #pub-ip { display: none; }
  main { padding: 0 16px 56px; }
  .save-bar,
  .user-save,
  .qos-save {
    left: 0;
    right: 0;
    padding: 10px 16px calc(12px + var(--safe-b));
  }
}
.habit-hours, .habit-days {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 96px;
  margin-top: 14px;
}
.habit-h, .habit-d {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}
.habit-h i, .habit-d i {
  display: block;
  width: 100%;
  max-width: 16px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--acc), rgba(0, 230, 118, 0.28));
}
.habit-h span, .habit-d span {
  font-size: 9px;
  color: var(--mut);
  line-height: 1;
}
.habit-days { height: 118px; overflow-x: auto; padding-bottom: 2px; }
.habit-d { flex: 0 0 22px; }
.habit-share {
  height: 6px;
  border-radius: 99px;
  background: var(--bg-3);
  overflow: hidden;
  margin-bottom: 4px;
  min-width: 64px;
}
.habit-share i {
  display: block;
  height: 100%;
  background: var(--acc);
  border-radius: inherit;
}
.habit-top {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.habit-top li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
}
.habit-top em { color: var(--mut); font-style: normal; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .user-grid.view-compact .user-card {
    grid-template-columns: minmax(6rem, 9rem) minmax(0, 1fr) auto;
  }
  .people-main {
    grid-template-columns: 36px minmax(0, 1fr) minmax(5.5rem, auto);
  }
  .people-tags { display: none; }
}
@media (max-width: 720px) {
  .grid, .grid-2, .grid-6, .grid-3, .togl-row, .st-params { grid-template-columns: 1fr; }
  .user-grid.view-compact .user-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .user-grid.view-compact .c-live { grid-column: 1 / -1; }
  .sess-now li {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "dot who"
      ". rate"
      ". net"
      ". vol";
  }
  .sess-rate, .sess-vol { text-align: left; }
  .page-head { padding: 20px 0 16px; }
  .page-head h1 { font-size: 24px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  h2 { font-size: 22px; }
  main { padding: 0 14px calc(48px + var(--safe-b)); }
  .shell-end #live-pill { display: none; }
  .shell-end .btn { min-height: 36px; }
  .qos-hero { flex-direction: column; align-items: stretch; }
  .qos-hero .btn { width: 100%; }
  .qos-link-grid, .qos-list, .qos-adapt, .device-grid, .user-grid { grid-template-columns: 1fr; }
  .user-kpis, .user-fields { grid-template-columns: 1fr 1fr; }
  .user-page .qos-kinds, .user-page .dns-kinds { grid-template-columns: 1fr; }
  .user-share, .user-add-row { grid-template-columns: 1fr; }
  .dev-op { min-height: 36px; }
  .user-share .btn, .user-add-row .btn { width: 100%; }
  .dev-facts { grid-template-columns: 1fr; }
  .dev-foot { flex-direction: column; align-items: stretch; }
  .save-bar,
  .user-save,
  .qos-save { flex-direction: column; align-items: stretch; }
  .save-bar .btn,
  .user-save .btn,
  .qos-save .btn { width: 100%; min-width: 0; }
  .qos-dev { grid-template-columns: 1fr; }
  .qos-sec { flex-wrap: wrap; }

  .st-hero .val { font-size: 26px; }
  .st-results { grid-template-columns: 1fr; }
  .st-go { width: 92px; height: 92px; font-size: 24px; }
  .st-res strong { font-size: 20px; }
  .pill { font-size: 11px; padding: 6px 9px; }
  .user-card .meta, .device-card .meta, .kv { grid-template-columns: 1fr; }
  .user-toolbar, .toolbar, .people-bar { align-items: stretch; }
  .user-toolbar .search, .toolbar .search, .search, .people-bar .search { max-width: none; width: 100%; flex: 1 1 100%; }
  .user-toolbar select, .toolbar select, .people-bar select { width: 100%; min-width: 0; }
  .people-main {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 12px 12px;
  }
  .people-live { grid-column: 2; }
  .people-tags { display: none; }
  .people-stats, .people-set, .people-togs { grid-template-columns: 1fr 1fr; }
  .people-dock-id, .people-dock-add { grid-template-columns: 1fr; }
  .people-dev {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }
  .people-dev-ip { display: none; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  .share-card { padding: 22px 16px; border-radius: var(--r-xs); }
  .card .val { font-size: 20px; }
}
