@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin.woff2") format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2"); font-style: normal; font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: dark;

  /* Canvas & ambient light */
  --canvas: #050609;
  --aurora-1: rgba(124, 92, 255, 0.26);
  --aurora-2: rgba(34, 211, 238, 0.12);
  --aurora-3: rgba(236, 72, 153, 0.08);

  /* Surfaces — translucent layers over the canvas */
  --bg-0: rgba(3, 4, 8, 0.45);
  --bg-1: rgba(255, 255, 255, 0.025);
  --bg-2: rgba(255, 255, 255, 0.04);
  --bg-3: rgba(255, 255, 255, 0.065);
  --bg-4: rgba(255, 255, 255, 0.095);
  --bg-5: rgba(255, 255, 255, 0.15);
  --solid-1: #0b0c14;
  --solid-2: #11131d;
  --glass: rgba(9, 10, 17, 0.62);
  --glass-strong: rgba(14, 15, 25, 0.9);
  --grad-card: linear-gradient(180deg, rgba(255, 255, 255, 0.052) 0%, rgba(255, 255, 255, 0.018) 100%);

  /* Ink */
  --fg-0: #f3f4f9;
  --fg-1: #bec4d4;
  --fg-2: #8c93a8;
  --fg-3: #8c93a8;
  --fg-on-fill: #ffffff;

  /* Lines */
  --line-1: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.09);
  --line-3: rgba(255, 255, 255, 0.16);
  --edge: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.16) 22%, rgba(255, 255, 255, 0.16) 78%, rgba(255, 255, 255, 0));
  --edge-brand: linear-gradient(90deg, rgba(139, 92, 246, 0), rgba(139, 92, 246, 0.9) 30%, rgba(34, 211, 238, 0.9) 70%, rgba(34, 211, 238, 0));

  /* Brand */
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --cyan: #22d3ee;
  --accent: #5e5bd6;
  --accent-hover: #5552c8;
  --accent-ink: #bab2ff;
  --accent-soft: rgba(124, 108, 255, 0.18);
  --accent-wash: rgba(124, 108, 255, 0.1);
  --accent-line: rgba(124, 108, 255, 0.45);
  --accent-glow: rgba(124, 108, 255, 0.45);
  --grad-brand: linear-gradient(135deg, #6f61e8 0%, #5e5bd6 52%, #4f46b8 100%);
  --grad-brand-h: linear-gradient(90deg, #8b5cf6 0%, #6366f1 55%, #22d3ee 100%);
  --grad-text: linear-gradient(180deg, #ffffff 30%, #c8c1ff 100%);

  /* State */
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --ok-line: rgba(52, 211, 153, 0.34);
  --ok-glow: rgba(52, 211, 153, 0.6);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --warn-line: rgba(251, 191, 36, 0.36);
  --warn-glow: rgba(251, 191, 36, 0.55);
  --bad: #fb7185;
  --bad-soft: rgba(251, 113, 133, 0.13);
  --bad-line: rgba(251, 113, 133, 0.4);
  --bad-glow: rgba(251, 113, 133, 0.6);
  --idle: #7d8499;

  /* Utility */
  --scrim: rgba(3, 4, 8, 0.45);
  --scrim-strong: rgba(3, 4, 8, 0.62);
  --chart-band: rgba(255, 255, 255, 0.018);
  --chart-hover: rgba(124, 108, 255, 0.09);
  --transparent: rgba(0, 0, 0, 0);
  --texture: rgba(255, 255, 255, 0.05);
  --map-dot: rgba(255, 255, 255, 0.11);
  --map-dot-hi: rgba(167, 139, 250, 0.6);
  --accent-area: rgba(124, 108, 255, 0.1);
  --heat-0: rgba(255, 255, 255, 0.035);
  --heat-1: rgba(124, 108, 255, 0.16);
  --heat-2: rgba(124, 108, 255, 0.3);
  --heat-3: rgba(124, 108, 255, 0.5);
  --heat-4: rgba(124, 108, 255, 0.72);
  --heat-5: #8f82ff;

  /* Elevation */
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 20px 44px -30px rgba(0, 0, 0, 0.95);
  --shadow-lift: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 0 rgba(0, 0, 0, 0.4), 0 24px 48px -32px rgba(0, 0, 0, 0.95);
  --shadow-pop: 0 28px 70px -18px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 10px 30px -10px var(--accent-glow);

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --fs-cap: 10.5px;
  --fs-xs: 11.5px;
  --fs-sm: 12.5px;
  --fs-body: 13.5px;
  --fs-md: 14.5px;
  --fs-lg: 16px;
  --fs-xl: 21px;
  --fs-2xl: 26px;
  --fs-display: 30px;
  --fs-display-lg: 44px;
  --fs-display-xl: 56px;
  --lh-none: 1;
  --lh-tight: 1.2;
  --lh-body: 1.5;
  --lh-loose: 1.65;
  --tr-caps: 0.08em;
  --tr-display: -0.04em;
  --tr-tight: -0.02em;
  --tr-code: 0.05em;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semi: 600;
  --fw-bold: 700;

  /* Spacing */
  --hair: 1px;
  --sp-1: 2px;
  --sp-2: 4px;
  --sp-3: 6px;
  --sp-4: 8px;
  --sp-5: 10px;
  --sp-6: 12px;
  --sp-7: 14px;
  --sp-8: 16px;
  --sp-9: 20px;
  --sp-10: 24px;
  --sp-11: 32px;
  --sp-12: 40px;
  --sp-13: 56px;
  --sp-14: 72px;

  /* Radius */
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --r-4: 16px;
  --r-5: 22px;
  --r-pill: 999px;

  /* Dimensions */
  --rail-w: 244px;
  --topbar-h: 66px;
  --row-h: 44px;
  --th-h: 40px;
  --kv-h: 36px;
  --ctl-h: 34px;
  --ctl-h-sm: 26px;
  --ctl-h-lg: 42px;
  --chip-h: 22px;
  --chip-h-lg: 24px;
  --tab-h: 32px;
  --icon: 16px;
  --icon-sm: 14px;
  --icon-xs: 12px;
  --dot: 7px;
  --badge-h: 16px;
  --avatar-sm: 26px;
  --avatar: 34px;
  --avatar-lg: 54px;
  --toggle-w: 36px;
  --toggle-h: 20px;
  --knob: 16px;
  --panel-w: 800px;
  --auth-w: 410px;
  --pop-w: 370px;
  --tip-w: 204px;
  --search-w: 330px;
  --select-w: 170px;
  --table-min: 1060px;
  --col-status: 132px;
  --col-tags: 230px;
  --col-region: 130px;
  --col-num: 112px;
  --chart-h: 262px;
  --spark-h: 36px;
  --meter-h: 6px;
  --mini-h: 92px;
  --mail-folders-w: 168px;
  --mail-list-w: 250px;
  --tl-time: 96px;
  --tl-evt: 122px;
  --tl-res: 78px;
  --tl-ip: 112px;
  --tl-ms: 44px;
  --tl-row: 28px;
  --json-row: 21px;
  --json-gutter: 46px;
  --json-indent: 2ch;
  --measure: 46ch;
  --toast-w: 380px;
  --status-h: 34px;
  --hero-h: 272px;
  --hero-side-w: 296px;
  --map-side-w: 350px;
  --hm-label: 26px;
  --hm-row: 26px;
  --fn-h: 252px;
  --palette-w: 680px;
  --palette-top: 12vh;
  --palette-list-h: 420px;
  --palette-input-h: 58px;
  --lv-spark-w: 42px;
  --lv-spark-h: 14px;
  --gauge-w: 196px;
  --pick: 18px;
  --mb-w: 36px;
  --mb-h: 16px;
  --ip-w: 112px;
  --age-h: 48px;

  /* Motion */
  --dur-1: 140ms;
  --dur-2: 260ms;
  --dur-3: 1400ms;
  --dur-flash: 1600ms;
  --dur-tick: 1000ms;
  --dur-ring: 2400ms;
  --dur-flow: 1400ms;
  --dash-flow: 2 6;
  --dash-off: -16;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Layers */
  --z-sticky: 5;
  --z-scrim: 40;
  --z-panel: 50;
  --z-pop: 60;
  --z-dock: 70;
  --z-toast: 10000;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--fg-0);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}
/* Ambient light that slowly drifts */
body::before {
  content: "";
  position: fixed;
  inset: -15%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 46% at 18% -6%, var(--aurora-1), transparent 72%),
    radial-gradient(36% 40% at 92% 2%, var(--aurora-2), transparent 72%),
    radial-gradient(50% 50% at 62% 108%, var(--aurora-3), transparent 70%);
  animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(3%, 2%, 0) scale(1.06) rotate(1.5deg); } }
/* A faint grid that fades out below the top edge */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 75%);
}
/* Film grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button, input, select, textarea { font: inherit; color: inherit; }
select { color-scheme: dark; }
select option { background: var(--solid-2); color: var(--fg-0); }
select option:checked { background: var(--accent); color: #fff; }
select option:hover, select option:focus { background: #282c3d; color: #fff; }
select optgroup { background: var(--solid-2); color: var(--fg-1); }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) var(--transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--transparent); }
::-webkit-scrollbar-thumb { border: 3px solid var(--transparent); border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.12) content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.22); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.cap {
  font-family: var(--font-sans);
  font-size: var(--fs-cap);
  font-weight: var(--fw-semi);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  line-height: var(--lh-tight);
  color: var(--fg-3);
  white-space: nowrap;
}
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }
.spacer { flex: 1; }
.t-ok { color: var(--ok); }
.t-warn { color: var(--warn); }
.t-bad { color: var(--bad); }

.ic {
  width: var(--icon);
  height: var(--icon);
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic-sm { width: var(--icon-sm); height: var(--icon-sm); }
.ic-xs { width: var(--icon-xs); height: var(--icon-xs); }
.spin { animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.dot {
  display: inline-block;
  flex: none;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--fg-3);
}
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok-glow); }
.dot.warn { background: var(--warn); box-shadow: 0 0 10px var(--warn-glow); }
.dot.bad { background: var(--bad); box-shadow: 0 0 10px var(--bad-glow); }
.dot.idle { background: var(--idle); }
.dot.accent { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.dot.live { animation: pulse var(--dur-3) ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Keycaps */
.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 var(--sp-3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-color: rgba(0, 0, 0, 0.45);
  border-radius: var(--r-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.45);
  font-family: var(--font-sans);
  font-size: var(--fs-cap);
  font-weight: var(--fw-semi);
  line-height: var(--lh-none);
  color: var(--fg-1);
}

/* ───────────── Controls ───────────── */
.btn {
  height: var(--ctl-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: 0 var(--sp-7);
  border: var(--hair) solid var(--line-2);
  border-radius: var(--r-3);
  background: var(--bg-3);
  color: var(--fg-0);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background var(--dur-1), border-color var(--dur-1), color var(--dur-1), box-shadow var(--dur-2), transform var(--dur-1);
}
.btn:hover { background: var(--bg-4); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: var(--icon-sm); height: var(--icon-sm); color: var(--fg-1); }
/* Primary actions share an AA-contrast violet gradient and a quiet light sweep. */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; background: var(--grad-brand); border-color: rgba(255, 255, 255, 0.14); color: var(--fg-on-fill); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), var(--shadow-glow); }
.btn-primary:hover { background: var(--grad-brand); border-color: rgba(255, 255, 255, 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 12px 36px -8px var(--accent-glow); filter: brightness(1.08); }
.btn-primary::after, .ov-btn-primary::after, .cf-save::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.34) 50%, rgba(255, 255, 255, 0) 70%); transform: translateX(-130%); transition: transform 900ms var(--ease); pointer-events: none; }
.btn-primary:hover::after, .ov-btn-primary:hover::after, .cf-save:hover::after { transform: translateX(130%); }
.btn-primary .ic { color: currentColor; }
.btn-primary .kbd { margin-left: var(--sp-2); background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.25); color: var(--fg-on-fill); }
.btn-ghost { background: var(--transparent); border-color: var(--transparent); color: var(--fg-1); box-shadow: none; }
.btn-ghost:hover { background: var(--bg-3); border-color: var(--transparent); color: var(--fg-0); }
.btn-danger:hover { color: var(--bad); background: var(--bad-soft); }
.btn-sm { height: var(--ctl-h-sm); padding: 0 var(--sp-5); border-radius: var(--r-2); font-size: var(--fs-xs); }
.btn-lg { height: var(--ctl-h-lg); font-size: var(--fs-body); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn.busy { pointer-events: none; }
.btn-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: var(--r-pill); background: var(--bad); color: var(--fg-on-fill); font-size: 10.5px; font-weight: var(--fw-bold); box-shadow: 0 0 10px var(--bad-glow); }

.icon-btn {
  position: relative;
  width: var(--ctl-h);
  height: var(--ctl-h);
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: var(--r-3);
  color: var(--fg-2);
  transition: background var(--dur-1), color var(--dur-1), box-shadow var(--dur-1);
}
.icon-btn:hover, .icon-btn[aria-expanded="true"], .icon-btn[aria-pressed="true"] { background: var(--bg-3); color: var(--fg-0); box-shadow: inset 0 0 0 1px var(--line-2); }
.icon-btn:disabled { opacity: 0.35; pointer-events: none; }
.icon-btn-sm { width: var(--ctl-h-sm); height: var(--ctl-h-sm); border-radius: var(--r-2); }
.badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: var(--badge-h);
  height: var(--badge-h);
  padding: 0 var(--sp-2);
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--bad);
  color: var(--fg-on-fill);
  font-size: 10px;
  font-weight: var(--fw-bold);
  line-height: var(--lh-none);
  box-shadow: 0 0 0 2px var(--solid-1), 0 0 12px var(--bad-glow);
}

.input {
  width: 100%;
  height: var(--ctl-h);
  padding: 0 var(--sp-6);
  background: var(--bg-1);
  border: var(--hair) solid var(--line-2);
  border-radius: var(--r-3);
  color: var(--fg-0);
  font-size: var(--fs-body);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: border-color var(--dur-1), box-shadow var(--dur-2), background var(--dur-1);
}
.input::placeholder { color: var(--fg-3); }
.input:hover { border-color: var(--line-3); }
.input:focus { outline: none; border-color: var(--accent-line); background: var(--bg-2); box-shadow: 0 0 0 4px var(--accent-wash); }
.input.mono { font-family: var(--font-mono); font-size: var(--fs-sm); }
.input[aria-invalid="true"] { border-color: var(--bad-line); box-shadow: 0 0 0 4px var(--bad-soft); }
textarea.input { height: auto; padding: var(--sp-5) var(--sp-6); resize: vertical; line-height: var(--lh-body); }
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-right: var(--sp-11); cursor: pointer; }
.select select option { background: var(--solid-2); color: var(--fg-0); }
.select .ic { position: absolute; right: var(--sp-5); top: 50%; transform: translateY(-50%); width: var(--icon-sm); height: var(--icon-sm); color: var(--fg-2); pointer-events: none; }
.affix { position: relative; display: block; }
.affix .input { padding-right: var(--sp-12); }
.affix-unit { position: absolute; right: var(--sp-6); top: 50%; transform: translateY(-50%); font-size: var(--fs-xs); color: var(--fg-3); pointer-events: none; }

.field { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--fg-1); }
.field-help { font-size: var(--fs-xs); font-weight: var(--fw-regular); color: var(--fg-2); }
.field-err { font-size: var(--fs-xs); color: var(--bad); }
.field-warn { font-size: var(--fs-xs); color: var(--warn); }

.toggle { position: relative; display: inline-block; flex: none; width: var(--toggle-w); height: var(--toggle-h); }
.toggle input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.toggle .track { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--bg-5); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); transition: background var(--dur-2), box-shadow var(--dur-2); }
.toggle .track::after {
  content: "";
  position: absolute;
  top: var(--sp-1);
  left: var(--sp-1);
  width: var(--knob);
  height: var(--knob);
  border-radius: 50%;
  background: var(--fg-1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform var(--dur-2) var(--ease), background var(--dur-2);
}
.toggle input:checked + .track { background: var(--grad-brand); box-shadow: 0 0 16px -2px var(--accent-glow); }
.toggle input:checked + .track::after { transform: translateX(calc(var(--toggle-w) - var(--toggle-h))); background: var(--fg-on-fill); }
.toggle input:focus-visible + .track { outline: 2px solid var(--accent-line); outline-offset: 2px; }

.seg { display: inline-flex; gap: var(--sp-1); padding: 3px; background: var(--bg-1); border: var(--hair) solid var(--line-2); border-radius: var(--r-3); }
.seg button {
  height: calc(var(--ctl-h) - 8px);
  padding: 0 var(--sp-6);
  border-radius: 7px;
  color: var(--fg-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  transition: background var(--dur-1), color var(--dur-1);
}
.seg button:hover { color: var(--fg-0); }
.seg button[aria-pressed="true"] { background: var(--bg-4); color: var(--fg-0); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.3); }
.seg-sm button { height: 22px; padding: 0 var(--sp-5); font-size: var(--fs-xs); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: var(--chip-h);
  padding: 0 var(--sp-5);
  border: var(--hair) solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--bg-2);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: var(--lh-none);
  white-space: nowrap;
}
.chip.state { height: var(--chip-h-lg); padding: 0 var(--sp-5); gap: var(--sp-3); font-size: var(--fs-cap); font-weight: var(--fw-semi); letter-spacing: 0.04em; text-transform: uppercase; }
.chip.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.chip.warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.chip.bad { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }
.chip.accent { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); }
.chip-x { display: inline-grid; place-items: center; color: inherit; opacity: 0.7; }
.chip-x:hover { opacity: 1; }
.chip-more { color: var(--fg-3); font-size: var(--fs-xs); font-weight: var(--fw-semi); }

/* Status pill: dot + label, tinted by state */
.status { display: inline-flex; align-items: center; gap: var(--sp-3); height: 24px; padding: 0 var(--sp-5) 0 var(--sp-4); border-radius: var(--r-pill); background: var(--bg-3); color: var(--fg-1); font-size: var(--fs-xs); font-weight: var(--fw-semi); }
.status:has(.dot.ok) { background: var(--ok-soft); color: var(--ok); }
.status:has(.dot.warn) { background: var(--warn-soft); color: var(--warn); }
.status:has(.dot.bad) { background: var(--bad-soft); color: var(--bad); }
.status .dot { width: 6px; height: 6px; }

.delta { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--fg-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta .ic { width: var(--icon-xs); height: var(--icon-xs); stroke-width: 2; }
.delta.ok { color: var(--ok); }
.delta.warn { color: var(--warn); }
.delta.bad { color: var(--bad); }

.avatar {
  width: var(--avatar);
  height: var(--avatar);
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: var(--fg-on-fill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.av-0 { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.av-1 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.av-2 { background: linear-gradient(135deg, #10b981, #0d9488); }
.av-3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.av-4 { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.av-5 { background: linear-gradient(135deg, #64748b, #334155); }
.avatar.svc { background: var(--bg-4); color: var(--fg-1); box-shadow: inset 0 0 0 1px var(--line-3); }

/* ───────────── Cards ───────────── */
.card, .kpi { --mx: -1000px; --my: -1000px; isolation: isolate; }
.card { position: relative; min-width: 0; background: var(--grad-card); border: var(--hair) solid var(--line-2); border-radius: var(--r-4); box-shadow: var(--shadow-lift); }
/* Cursor spotlight, and a border that lights up under the pointer */
.card::before, .kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.05), transparent 42%);
}
.card::after, .kpi::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(340px circle at var(--mx) var(--my), rgba(167, 139, 250, 0.7), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.card-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding: 0 var(--sp-9);
  border-bottom: var(--hair) solid var(--line-1);
}
.card-head > .cap:first-of-type { font-family: var(--font-display); font-size: 15px; font-weight: var(--fw-semi); letter-spacing: -0.015em; text-transform: none; color: var(--fg-0); }
.card-head .hd-ic { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.28); }
.card-head .head-num { font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--fg-0); }
.card-body { padding: var(--sp-9); }
.card-foot {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: 42px;
  padding: var(--sp-3) var(--sp-9);
  border-top: var(--hair) solid var(--line-1);
  font-size: var(--fs-xs);
  color: var(--fg-2);
}
.card-foot .num { color: var(--fg-0); font-weight: var(--fw-semi); }

/* ───────────── Shell ───────────── */
.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); height: calc(100vh - var(--status-h)); }

.rail { display: flex; flex-direction: column; min-height: 0; background: rgba(7, 8, 14, 0.7); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); border-right: var(--hair) solid var(--line-1); }
.rail-head { flex: none; height: var(--topbar-h); display: flex; align-items: center; gap: var(--sp-6); padding: 0 var(--sp-9); }
.rail-head > div { flex: 1; min-width: 0; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: var(--r-3); background: var(--grad-brand); color: var(--fg-on-fill); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px -6px var(--accent-glow); }
.brand-mark .ic { width: 18px; height: 18px; stroke-width: 2.1; }
.brand-name { font-family: var(--font-display); font-size: 15px; font-weight: var(--fw-bold); line-height: var(--lh-tight); letter-spacing: var(--tr-tight); }
.brand-env { margin-top: var(--sp-1); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-mono); font-size: var(--fs-cap); line-height: var(--lh-tight); color: var(--fg-3); }
.plan {
  flex: none;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 var(--sp-4);
  border: 1px solid var(--transparent);
  border-radius: var(--r-pill);
  background: linear-gradient(var(--solid-1), var(--solid-1)) padding-box, var(--grad-brand) border-box;
  font-size: 9.5px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  color: var(--accent-ink);
}
.rail-search {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  height: 38px;
  margin: var(--sp-2) var(--sp-7) 0;
  padding: 0 var(--sp-3) 0 var(--sp-6);
  background: var(--bg-2);
  border: var(--hair) solid var(--line-2);
  border-radius: var(--r-3);
  color: var(--fg-2);
  font-size: var(--fs-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color var(--dur-1), color var(--dur-1);
}
.rail-search:hover { border-color: var(--accent-line); color: var(--fg-1); box-shadow: 0 0 0 4px var(--accent-wash); }
.rail-search .ic { width: var(--icon-sm); height: var(--icon-sm); }
.rail-search > span:nth-child(2) { flex: 1; }
.rail-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--sp-5) var(--sp-6); }
.nav-group { margin-top: var(--sp-9); }
.nav-group > .cap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); padding: 0 var(--sp-6) var(--sp-4); color: var(--fg-3); }
.nav-group:not(.live) > .cap::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0)); }
.nav-item {
  position: relative;
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding: 0 var(--sp-6);
  border-radius: var(--r-3);
  color: var(--fg-1);
  font-weight: var(--fw-medium);
  text-align: left;
  transition: background var(--dur-1), color var(--dur-1);
}
.nav-item .ic { color: var(--fg-2); }
.nav-item:hover { background: var(--bg-3); color: var(--fg-0); }
.nav-item[aria-current="page"] { background: var(--bg-3); color: var(--fg-0); }
.nav-item[aria-current="page"] .ic { color: var(--accent-ink); }
.rail .nav-item[aria-current="page"] { background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.rail .nav-item[aria-current="page"] .ic { color: var(--ov-accent); }
.rail .nav-item[aria-current="page"]::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--ov-accent); box-shadow: none; }
.nav-ic { width: var(--icon); height: var(--icon); display: grid; place-items: center; flex: none; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nav-count { min-width: 24px; padding: 2px 7px; border-radius: var(--r-pill); background: var(--bg-3); text-align: center; font-family: var(--font-sans); font-size: 11px; font-weight: var(--fw-semi); font-variant-numeric: tabular-nums; color: var(--fg-2); }
.rail .nav-count, .rail .nav-item[aria-current="page"] .nav-count { min-width: 0; padding: 0; background: none; text-align: right; font-family: var(--font-mono); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; color: var(--ov-meta); }
.rail-foot { flex: none; display: flex; align-items: center; gap: var(--sp-5); margin: var(--sp-5); padding: var(--sp-5) var(--sp-6); border: 1px solid var(--line-2); border-radius: var(--r-4); background: var(--grad-card); }
.rail-foot .avatar { position: relative; box-shadow: 0 0 0 2px var(--solid-1), 0 0 0 3.5px rgba(124, 108, 255, 0.6); }
.rail-foot .avatar::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2.5px var(--solid-1), 0 0 8px var(--ok-glow); }
.rf-text { flex: 1; min-width: 0; }
.rf-name { font-size: var(--fs-body); font-weight: var(--fw-semi); line-height: var(--lh-tight); }
.rf-text .cap { display: block; margin-top: var(--sp-1); overflow: hidden; text-overflow: ellipsis; }

.main { position: relative; min-width: 0; height: calc(100vh - var(--status-h)); overflow-x: hidden; overflow-y: auto; background: var(--transparent); }
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: var(--sp-7);
  padding: 0 var(--sp-10) 0 var(--sp-11);
  background: rgba(6, 7, 12, 0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: var(--hair) solid var(--transparent);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--edge); pointer-events: none; }
.menu-btn { display: none; }
.tb-title { flex: 1; min-width: 0; }
.tb-title h1 { font-family: var(--font-display); font-size: 19px; font-weight: var(--fw-semi); line-height: var(--lh-tight); letter-spacing: -0.025em; white-space: nowrap; }
.tb-crumb { color: var(--fg-3); font-weight: var(--fw-medium); }
.tb-sub { margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-sm); line-height: var(--lh-tight); color: var(--fg-2); }
.tb-sub .num { font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--fg-1); }
.tb-cmd { display: inline-flex; align-items: center; gap: var(--sp-5); height: 38px; min-width: 300px; padding: 0 var(--sp-3) 0 var(--sp-7); background: var(--bg-2); border: var(--hair) solid var(--line-2); border-radius: var(--r-3); color: var(--fg-2); font-size: var(--fs-sm); white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035); transition: border-color var(--dur-1), color var(--dur-1); }
.tb-cmd:hover { border-color: var(--accent-line); color: var(--fg-0); box-shadow: 0 0 0 4px var(--accent-wash); }
.tb-cmd .ic { width: var(--icon-sm); height: var(--icon-sm); }
.tb-cmd .kbd { margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: var(--sp-4); height: 32px; padding: 0 var(--sp-7); background: var(--ok-soft); border: var(--hair) solid var(--ok-line); border-radius: var(--r-pill); white-space: nowrap; }
.pill > .cap:nth-child(2) { color: var(--ok); }
.pill .num { font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--fg-0); }
.pill-sep { width: var(--hair); height: var(--sp-6); background: var(--ok-line); }
.tb-div { width: var(--hair); height: var(--sp-9); background: var(--line-2); flex: none; }
.tb-actions { display: flex; align-items: center; gap: var(--sp-1); }
.topbar .icon-btn { width: 38px; height: 38px; }
.pop-anchor { position: relative; }

.view { padding: var(--sp-10) var(--sp-11) var(--sp-11); transition: opacity var(--dur-2); }
.view.refreshing { opacity: 0.45; pointer-events: none; }

/* ───────────── Overlays: popovers, tooltip, toasts ───────────── */
.pop, .gtip, .toast, .palette { background: var(--glass-strong); border: var(--hair) solid var(--line-3); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); box-shadow: var(--shadow-pop); }
/* Overlays carry a lit top edge */
.gtip::before, .palette::before, .pop::before, .detail::before, .auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--edge-brand);
  opacity: 0.75;
  pointer-events: none;
}
.pop { position: absolute; top: calc(100% + var(--sp-3)); right: 0; z-index: var(--z-pop); width: var(--pop-w); border-radius: var(--r-4); overflow: hidden; }
.pop-head { display: flex; align-items: center; gap: var(--sp-4); height: 46px; padding: 0 var(--sp-8); border-bottom: var(--hair) solid var(--line-2); }
.pop-head .num { color: var(--fg-1); font-size: var(--fs-xs); }
.pop-list li { display: flex; gap: var(--sp-5); padding: var(--sp-6) var(--sp-8); border-bottom: var(--hair) solid var(--line-2); }
.pop-list li:last-child { border-bottom: 0; }
.pop-list .dot { margin-top: var(--sp-3); }
.al-t { font-size: var(--fs-body); font-weight: var(--fw-medium); color: var(--fg-0); line-height: var(--lh-tight); }
.al-m { margin-top: var(--sp-2); font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--fg-2); }
.pop-foot { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: var(--hair) solid var(--line-2); }
.pop-empty { padding: var(--sp-10) var(--sp-6); text-align: center; color: var(--fg-2); }
.keys { padding: var(--sp-3) 0; }
.keys li { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); padding: var(--sp-2) var(--sp-6); color: var(--fg-1); }
.keys li span:last-child { display: inline-flex; gap: var(--sp-2); }

.gtip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-toast);
  min-width: var(--tip-w);
  padding: var(--sp-5) var(--sp-7) var(--sp-4);
  border-radius: var(--r-3);
  font-size: var(--fs-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-1);
}
.gtip.show { opacity: 1; }
.gtip .cap { display: block; margin-bottom: var(--sp-3); color: var(--fg-2); }
.tip-row { display: flex; align-items: center; gap: var(--sp-4); height: var(--chip-h-lg); }
.tip-row .tip-v { margin-left: auto; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: var(--fw-semi); font-variant-numeric: tabular-nums; color: var(--fg-0); }
.tip-row .tip-l { color: var(--fg-2); }
.tip-key { width: 9px; height: 9px; border-radius: 3px; background: var(--grad-brand); }
.tip-key.bad { background: var(--bad); }
.tip-key.warn { background: var(--warn); }
.tip-key.none { background: var(--transparent); }

.toasts { position: fixed; right: var(--sp-8); bottom: calc(var(--status-h) + var(--sp-6)); z-index: var(--z-toast); display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-3); pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  max-width: var(--toast-w);
  padding: var(--sp-5) var(--sp-5) var(--sp-5) var(--sp-7);
  border-radius: var(--r-3);
  font-size: var(--fs-sm);
  color: var(--fg-0);
  pointer-events: auto;
  animation: toast-in var(--dur-2) var(--ease);
  transition: opacity var(--dur-2), transform var(--dur-2);
}
.toast > span { padding-right: var(--sp-2); }
.toast .btn { margin-left: auto; color: var(--accent-ink); }
.toast.out { opacity: 0; transform: translateY(var(--sp-2)); }
@keyframes toast-in { from { opacity: 0; transform: translateY(var(--sp-4)); } }

/* ───────────── Status bar ───────────── */
.statusbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-dock);
  height: var(--status-h);
  display: flex;
  align-items: stretch;
  background: rgba(6, 7, 12, 0.74);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-top: var(--hair) solid var(--line-1);
  font-size: var(--fs-xs);
  color: var(--fg-2);
}
.sb-seg { display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-6); border-right: var(--hair) solid var(--line-1); white-space: nowrap; }
.sb-seg .num { font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--fg-1); }
.sb-seg .cap { color: var(--fg-2); }
.sb-region .num { font-family: var(--font-mono); font-weight: var(--fw-medium); }
.sb-ticker {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
.sb-track { flex: none; display: flex; align-items: center; width: max-content; will-change: transform; }
.tk { display: inline-flex; align-items: center; gap: var(--sp-3); padding-right: var(--sp-11); color: var(--fg-2); white-space: nowrap; }
.tk .t { color: var(--fg-3); }
.tk b { font-family: var(--font-mono); font-weight: var(--fw-medium); color: var(--fg-1); }
.sb-screens { display: flex; align-items: center; gap: var(--sp-1); padding: 0 var(--sp-3); border-left: var(--hair) solid var(--line-1); }
.sb-screens > .cap { padding: 0 var(--sp-3); color: var(--fg-3); }
.sb-screens button { height: 26px; display: inline-flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-4) 0 var(--sp-2); border-radius: var(--r-2); color: var(--fg-2); font-size: var(--fs-xs); white-space: nowrap; }
.sb-screens button:hover { background: var(--bg-2); color: var(--fg-0); }
.sb-screens button[aria-current="true"] { background: var(--accent-soft); color: var(--fg-0); box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.35); }
.sb-screens button[aria-current="true"] .kbd { color: var(--accent-ink); border-color: var(--accent-line); }
.sb-btn { border-left: var(--hair) solid var(--line-1); border-right: 0; color: var(--fg-2); }
.sb-btn:hover { background: var(--bg-2); color: var(--fg-0); }
body.auth-on .sb-conn, body.auth-on .sb-ticker > *, body.auth-on .sb-region { visibility: hidden; }

/* ───────────── Command palette ───────────── */
.pal-scrim { position: fixed; inset: 0; z-index: var(--z-toast); background: var(--scrim-strong); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.palette {
  position: fixed;
  top: var(--palette-top);
  left: 50%;
  z-index: var(--z-toast);
  width: min(var(--palette-w), calc(100vw - var(--sp-10)));
  transform: translateX(-50%);
  border-radius: var(--r-5);
  overflow: hidden;
  animation: pal-in var(--dur-2) var(--ease);
}
@keyframes pal-in { from { opacity: 0; transform: translate(-50%, calc(var(--sp-4) * -1)); } }
.pal-input { display: flex; align-items: center; gap: var(--sp-5); height: var(--palette-input-h); padding: 0 var(--sp-6) 0 var(--sp-7); border-bottom: var(--hair) solid var(--line-2); color: var(--fg-2); }
.pal-input input { flex: 1; min-width: 0; height: 100%; padding: 0; background: none; border: 0; outline: none; font-size: 16px; color: var(--fg-0); }
.pal-input input::placeholder { color: var(--fg-3); }
.pal-list { max-height: var(--palette-list-h); overflow-y: auto; padding: var(--sp-2) var(--sp-3) var(--sp-3); }
.pal-group { padding: var(--sp-5) var(--sp-4) var(--sp-3); color: var(--fg-3); }
.pal-item { position: relative; display: flex; align-items: center; gap: var(--sp-5); width: 100%; height: 42px; padding: 0 var(--sp-5); border-radius: var(--r-3); color: var(--fg-1); text-align: left; }
.pal-item .ic { color: var(--fg-2); }
.pal-item .avatar { width: 26px; height: 26px; border-radius: var(--r-2); font-size: 10px; }
.pal-item[aria-selected="true"] { background: linear-gradient(90deg, rgba(124, 108, 255, 0.22), rgba(124, 108, 255, 0.05)); color: var(--fg-0); box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.26); }
.pal-item[aria-selected="true"] .ic { color: var(--accent-ink); }
.pal-item[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: var(--sp-3); bottom: var(--sp-3); width: var(--sp-1); border-radius: var(--r-1); background: var(--grad-brand); box-shadow: 0 0 10px var(--accent-glow); }
.pal-label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.palette mark { background: var(--transparent); color: var(--accent-ink); }
.pal-sub { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); }
.pal-hint { margin-left: auto; display: inline-flex; align-items: center; gap: var(--sp-3); font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--fg-3); white-space: nowrap; }
.pal-empty { padding: var(--sp-11) var(--sp-6); text-align: center; color: var(--fg-3); }
.pal-foot { display: flex; align-items: center; gap: var(--sp-7); height: 40px; padding: 0 var(--sp-7); border-top: var(--hair) solid var(--line-2); font-size: var(--fs-xs); color: var(--fg-3); }
.pal-foot > span { display: inline-flex; align-items: center; gap: var(--sp-2); }

/* ───────────── Overview ───────────── */
.ov { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sp-8); }
.ov-third { grid-column: span 4; display: flex; flex-direction: column; }
.ov-cfg { grid-column: span 4; display: flex; flex-direction: column; }
.head-meta { font-size: var(--fs-xs); color: var(--fg-3); white-space: nowrap; }
.head-meta .num { color: var(--fg-1); }

/* Greeting */
.ov-head { grid-column: 1 / -1; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-9); padding: var(--sp-2) var(--sp-1) var(--sp-4); }
.ov-greet { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--sp-4); height: 26px; padding: 0 var(--sp-6) 0 var(--sp-5); border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--bg-2); font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--fg-1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.ov-head h2 { margin-top: var(--sp-6); font-family: var(--font-display); font-size: 32px; font-weight: var(--fw-semi); line-height: 1.1; letter-spacing: -0.035em; background: linear-gradient(180deg, #ffffff 35%, #bdb6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ov-head p { margin-top: var(--sp-3); font-size: var(--fs-md); color: var(--fg-2); }
.ov-head p .num { color: var(--fg-1); font-weight: var(--fw-semi); }
.ov-actions { display: flex; flex: none; gap: var(--sp-5); }
.ov-actions .btn { height: 40px; padding: 0 var(--sp-8); border-radius: var(--r-3); font-size: var(--fs-body); }

/* Hero — live throughput, with a slow light sweep around the border */
.hero {
  --mx: -1000px;
  --my: -1000px;
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--hero-side-w) minmax(0, 1fr);
  min-width: 0;
  border: 1px solid var(--transparent);
  border-radius: var(--r-5);
  background:
    linear-gradient(180deg, rgba(16, 17, 29, 0.95), rgba(9, 10, 17, 0.95)) padding-box,
    conic-gradient(from var(--angle), rgba(139, 92, 246, 0.9), rgba(255, 255, 255, 0.06) 16%, rgba(255, 255, 255, 0.06) 42%, rgba(34, 211, 238, 0.85) 54%, rgba(255, 255, 255, 0.06) 68%, rgba(255, 255, 255, 0.06) 88%, rgba(139, 92, 246, 0.9)) border-box;
  box-shadow: 0 34px 90px -46px rgba(124, 108, 255, 0.75);
  overflow: hidden;
  animation: sweep 14s linear infinite;
}
@keyframes sweep { to { --angle: 360deg; } }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(640px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.04), transparent 40%), radial-gradient(55% 95% at 0% 0%, rgba(139, 92, 246, 0.2), transparent 62%), radial-gradient(45% 80% at 100% 0%, rgba(34, 211, 238, 0.08), transparent 62%); }
.hero > * { position: relative; }
.hero-side { display: flex; flex-direction: column; min-width: 0; padding: var(--sp-9) var(--sp-10) var(--sp-8); border-right: var(--hair) solid var(--line-1); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.hero-top > .cap:first-child { font-size: var(--fs-sm); font-weight: var(--fw-semi); letter-spacing: 0; text-transform: none; color: var(--fg-1); }
.hero-val { margin-top: var(--sp-9); font-family: var(--font-display); font-size: 60px; font-weight: var(--fw-semi); line-height: var(--lh-none); letter-spacing: -0.045em; white-space: nowrap; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: var(--transparent); }
.hero-unit { margin-left: var(--sp-3); font-size: var(--fs-md); font-weight: var(--fw-medium); letter-spacing: 0; color: var(--fg-2); -webkit-text-fill-color: var(--fg-2); }
.hero-delta { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-5); font-size: var(--fs-xs); color: var(--fg-3); }
.hero-delta .delta { gap: 3px; height: 22px; padding: 0 var(--sp-4); border-radius: var(--r-pill); background: var(--bg-3); color: var(--fg-1); }
.hero-stats { margin-top: auto; padding-top: var(--sp-8); }
.hero-stats > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) 0; border-top: var(--hair) solid var(--line-1); }
.hero-stats dt { font-size: var(--fs-sm); color: var(--fg-2); }
.hero-stats dd { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: var(--fw-semi); font-variant-numeric: tabular-nums; color: var(--fg-0); }
.hero-main { display: flex; flex-direction: column; min-width: 0; }
.hero-bar { display: flex; align-items: center; gap: var(--sp-7); height: 56px; padding: 0 var(--sp-9); border-bottom: var(--hair) solid var(--line-1); }
.hero-bar > .cap { font-family: var(--font-display); font-size: 15px; font-weight: var(--fw-semi); letter-spacing: -0.015em; text-transform: none; color: var(--fg-0); }
.hero-plot { position: relative; flex: 1 0 auto; min-width: 0; height: var(--hero-h); cursor: crosshair; }
.hero-plot svg { position: absolute; inset: 0; display: block; }
.hx, .h-lane-lab { fill: var(--fg-3); font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.h-lane-lab { letter-spacing: var(--tr-caps); }
.hx.now { fill: var(--cyan); font-weight: var(--fw-semi); }
.h-grid { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; shape-rendering: crispEdges; }
.h-base { stroke: rgba(255, 255, 255, 0.1); stroke-width: 1; shape-rendering: crispEdges; }
.h-area { fill: url(#gArea); }
.h-line { fill: none; stroke: url(#gLine); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(124, 108, 255, 0.55)); }
.h-err { fill: var(--bad); filter: drop-shadow(0 0 4px var(--bad-glow)); }
.h-lane { fill: rgba(255, 255, 255, 0.02); }
.h-now { stroke: rgba(34, 211, 238, 0.32); stroke-width: 1; shape-rendering: crispEdges; }
.h-head { transition: transform var(--dur-tick) linear; }
.h-dot { fill: var(--cyan); stroke: var(--solid-1); stroke-width: 2; filter: drop-shadow(0 0 8px var(--cyan)); }
.h-ring { fill: none; stroke: var(--cyan); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: ring var(--dur-ring) var(--ease) infinite; }
.h-cross { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; shape-rendering: crispEdges; }
.h-cross-dot { fill: var(--fg-0); stroke: var(--solid-1); stroke-width: 2; }
.tex-dot { fill: rgba(255, 255, 255, 0.045); }
@keyframes ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(4.5); opacity: 0; } }

/* KPI cards */
.kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); }
.kpi {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-8) var(--sp-9) var(--sp-7);
  overflow: hidden;
  background: var(--grad-card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-lift);
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2), box-shadow var(--dur-2);
}
.kpi:hover { transform: translateY(-2px); border-color: rgba(124, 108, 255, 0.38); box-shadow: var(--shadow-card), 0 20px 44px -22px var(--accent-glow); }
.kpi::before { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.05), transparent 42%), radial-gradient(190px circle at 100% 0%, rgba(124, 108, 255, 0.2), transparent 70%); }
.kpi.tone-warn::before { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.05), transparent 42%), radial-gradient(190px circle at 100% 0%, rgba(251, 191, 36, 0.13), transparent 70%); }
.kpi.tone-bad::before { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.05), transparent 42%), radial-gradient(190px circle at 100% 0%, rgba(251, 113, 133, 0.15), transparent 70%); }
.kpi-top { display: flex; align-items: center; gap: var(--sp-5); min-width: 0; }
.kpi-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.3); }
.kpi-ic .ic { width: 15px; height: 15px; }
.kpi.tone-warn .kpi-ic { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.kpi.tone-bad .kpi-ic { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line); }
.kpi-top .cap { overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-sm); font-weight: var(--fw-medium); letter-spacing: 0; text-transform: none; color: var(--fg-2); }
.kpi-top .delta { gap: 3px; height: 22px; padding: 0 var(--sp-4); border-radius: var(--r-pill); background: var(--bg-3); }
.kpi-top .delta.ok { background: var(--ok-soft); }
.kpi-top .delta.warn { background: var(--warn-soft); }
.kpi-top .delta.bad { background: var(--bad-soft); }
.kpi-mid { display: flex; align-items: flex-end; gap: var(--sp-8); min-width: 0; }
.kpi-val { flex: none; margin-top: var(--sp-3); font-family: var(--font-display); font-size: 32px; font-weight: var(--fw-semi); line-height: var(--lh-none); letter-spacing: -0.04em; color: var(--fg-0); white-space: nowrap; }
.kpi-unit { margin-left: var(--sp-2); font-size: var(--fs-md); font-weight: var(--fw-medium); letter-spacing: 0; color: var(--fg-2); }
.kpi-cmp { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--fg-3); }
.spark { display: block; width: 100%; height: var(--spark-h); overflow: visible; }
.kpi-mid .spark { flex: 1; min-width: 0; height: 42px; }
.spark .sa { fill: url(#gArea); }
.spark .sl { fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark .se { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark.warn .sa { fill: url(#gAreaWarn); }
.spark.warn .sl, .spark.warn .se { stroke: var(--warn); }
.spark.bad .sa { fill: url(#gAreaBad); }
.spark.bad .sl, .spark.bad .se { stroke: var(--bad); }

/* Legends */
.legend { display: flex; align-items: center; gap: var(--sp-7); }
.lg-item { display: inline-flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--fg-2); white-space: nowrap; }
.lg-item .num { font-size: var(--fs-xs); color: var(--fg-1); }
.lg-sw { width: 9px; height: 9px; border-radius: 3px; background: var(--grad-brand); }
.lg-sw.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad-glow); }
.lg-line { width: var(--sp-7); height: 2px; background: var(--grad-brand-h); }

/* World map */
.map-card { grid-column: 1 / -1; display: flex; flex-direction: column; overflow: hidden; }
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) var(--map-side-w); }
.map-stage { position: relative; min-width: 0; display: flex; align-items: center; padding: var(--sp-7) var(--sp-8) var(--sp-6); background: radial-gradient(70% 90% at 45% 45%, rgba(124, 108, 255, 0.09), transparent 70%); border-right: var(--hair) solid var(--line-1); }
.map-svg { display: block; width: 100%; height: auto; overflow: visible; }
.md { fill: none; stroke: var(--map-dot); stroke-linecap: round; }
.md.hi { stroke: var(--map-dot-hi); }
.arc { fill: none; stroke: url(#gArc); stroke-width: 1.5; stroke-dasharray: var(--dash-flow); filter: drop-shadow(0 0 3px rgba(124, 108, 255, 0.7)); animation: flow var(--dur-flow) linear infinite; }
.arc.warn { stroke: var(--warn); filter: drop-shadow(0 0 3px var(--warn-glow)); }
@keyframes flow { to { stroke-dashoffset: var(--dash-off); } }
.mk-core { fill: var(--accent); stroke: var(--solid-1); stroke-width: 2; transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 7px var(--accent-glow)); transition: transform var(--dur-1); }
.mk-ring { fill: none; stroke: var(--accent); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: ring var(--dur-ring) var(--ease) infinite; }
.mk.warn .mk-core { fill: var(--warn); filter: drop-shadow(0 0 7px var(--warn-glow)); }
.mk.warn .mk-ring { stroke: var(--warn); }
.mk-label { fill: var(--fg-0); font-family: var(--font-mono); font-size: var(--fs-cap); font-weight: var(--fw-medium); }
.mk-val { fill: var(--accent-ink); font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-semi); }
.mk.warn .mk-val { fill: var(--warn); }
.mk.on .mk-core { transform: scale(1.6); }
.mk.on .mk-label { fill: var(--fg-0); }
.mk.on .mk-val { fill: var(--fg-1); }
.mk-hit { fill: var(--transparent); cursor: default; }
.regions { display: flex; flex-direction: column; min-width: 0; }
.rg-head, .rg-row { display: grid; grid-template-columns: var(--sp-4) minmax(0, 1fr) var(--sp-13) calc(var(--sp-13) + var(--sp-4)); align-items: center; gap: var(--sp-5); padding: 0 var(--sp-7); }
.rg-head { height: 44px; border-bottom: var(--hair) solid var(--line-1); }
.rg-head .cap { color: var(--fg-3); }
.rg-row { position: relative; flex: 1; min-height: calc(var(--sp-12) + var(--sp-4)); border-bottom: var(--hair) solid var(--line-1); transition: background var(--dur-1); }
.rg-row:hover, .rg-row.on { background: linear-gradient(90deg, rgba(124, 108, 255, 0.14), var(--transparent)); }
.rg-row .r, .rg-head .r { text-align: right; }
.rg-row .num { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--fg-0); }
.rg-row .num.t-warn { color: var(--warn); }
.rg-name { display: flex; flex-direction: column; min-width: 0; line-height: var(--lh-tight); }
.rg-name b { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: var(--fw-regular); color: var(--fg-0); }
.rg-name span { margin-top: var(--sp-1); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-xs); color: var(--fg-3); }
.rg-bar { position: absolute; left: var(--sp-7); right: var(--sp-7); bottom: calc(var(--hair) * -1); height: 2px; }
.rg-bar i { display: block; height: 100%; background: var(--grad-brand-h); box-shadow: 0 0 8px var(--accent-glow); }
.rg-row.warn .rg-bar i { background: var(--warn); box-shadow: 0 0 8px var(--warn-glow); }
.rg-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); min-height: var(--th-h); padding: 0 var(--sp-7); font-size: var(--fs-xs); color: var(--fg-3); }
.rg-foot .num { color: var(--fg-1); }

/* Funnel (flow) */
.fn-chart { position: relative; flex: 1; min-height: var(--fn-h); margin: var(--sp-6) var(--sp-7) var(--sp-4); }
.fn-chart svg { position: absolute; inset: 0; display: block; overflow: visible; }
.fn-bar { fill: url(#gBar); filter: drop-shadow(0 0 8px rgba(124, 108, 255, 0.45)); }
.fn-col.on .fn-bar { fill: url(#gBar); filter: brightness(1.25) drop-shadow(0 0 14px var(--accent-glow)); }
.fn-flow { fill: url(#gFlow); }
.fn-flow.worst { fill: rgba(251, 191, 36, 0.14); }
.fn-name { fill: var(--fg-3); font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-semi); letter-spacing: var(--tr-caps); }
.fn-val { fill: var(--fg-0); font-family: var(--font-display); font-size: var(--fs-md); font-weight: var(--fw-bold); }
.fn-pct { fill: var(--fg-3); font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: var(--fw-semi); }
.fn-drop { fill: var(--fg-1); font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-semi); }
.fn-drop.worst { fill: var(--warn); }
.fn-hit { fill: var(--transparent); }

/* Hour × weekday heatmap */
.hm-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: var(--sp-6); padding: var(--sp-6) var(--sp-7) var(--sp-5); }
.hm { display: grid; grid-template-columns: var(--hm-label) repeat(24, minmax(0, 1fr)); grid-auto-rows: var(--hm-row); gap: 3px; }
.hm-h { align-self: end; font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-medium); line-height: var(--lh-none); color: var(--fg-3); }
.hm-d { align-self: center; font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-medium); color: var(--fg-2); }
.hm-c { border-radius: 5px; background: var(--heat-0); }
.hm-c.l1 { background: var(--heat-1); }
.hm-c.l2 { background: var(--heat-2); }
.hm-c.l3 { background: var(--heat-3); }
.hm-c.l4 { background: var(--heat-4); box-shadow: 0 0 8px -2px rgba(124, 108, 255, 0.5); }
.hm-c.l5 { background: var(--grad-brand); box-shadow: 0 0 12px -2px var(--accent-glow); }
.hm .hm-c:hover { outline: var(--hair) solid var(--fg-1); outline-offset: var(--hair); }
.hm-c.now { outline: 2px solid var(--cyan); outline-offset: 1px; box-shadow: 0 0 12px var(--cyan); }
.hm-foot { display: flex; align-items: center; gap: var(--sp-4); font-size: var(--fs-xs); color: var(--fg-2); }
.hm-foot .num { font-weight: var(--fw-semi); color: var(--fg-1); }
.hm-legend { display: inline-flex; gap: var(--sp-1); }
.hm-legend .hm-c { width: var(--sp-5); height: var(--sp-5); }

/* 14-day activity */
.chart-body { flex: 1; padding: var(--sp-6) var(--sp-7) var(--sp-4) var(--sp-4); }
.chart { position: relative; height: var(--chart-h); }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ch-grid { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; shape-rendering: crispEdges; }
.ch-base { stroke: rgba(255, 255, 255, 0.12); stroke-width: 1; shape-rendering: crispEdges; }
.ch-ylab { fill: var(--fg-3); font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.ch-xlab { fill: var(--fg-2); font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.ch-xlab.dow { fill: var(--fg-3); }
.ch-band { fill: var(--chart-band); }
.ch-hl { fill: var(--transparent); }
.ch-col.on .ch-hl { fill: var(--chart-hover); }
.ch-ok { fill: url(#gBar); }
.ch-col.on .ch-ok { fill: url(#gBar); filter: brightness(1.3) drop-shadow(0 0 10px var(--accent-glow)); }
.ch-fail { fill: var(--bad); filter: drop-shadow(0 0 4px var(--bad-glow)); }
.ch-hit { fill: var(--transparent); }
.ch-hit:focus { outline: none; }
.ch-anno { fill: var(--fg-1); font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-medium); letter-spacing: var(--tr-caps); font-variant-numeric: tabular-nums; }
.ch-anno-tick { stroke: var(--bad-line); stroke-width: 1; shape-rendering: crispEdges; }
.intro .ch-ok, .intro .ch-fail, .intro .fn-bar { transform-box: fill-box; transform-origin: bottom; animation: grow 700ms var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
.intro .fn-bar { transform-origin: center; }
@keyframes grow { from { transform: scaleY(0); } }
.ch-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.ch-table th { position: sticky; top: 0; height: var(--ctl-h); padding: 0 var(--sp-5); text-align: right; border-bottom: var(--hair) solid var(--line-2); background: var(--solid-2); }
.ch-table th:first-child, .ch-table td:first-child { text-align: left; }
.ch-table td { height: var(--chip-h-lg); padding: 0 var(--sp-5); text-align: right; border-bottom: var(--hair) solid var(--line-1); color: var(--fg-1); }
.ch-table tr.weekend td:first-child { color: var(--fg-3); }
.ch-scroll { height: var(--chart-h); overflow: auto; }

/* Configuration instruments */
.kv { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); min-height: var(--kv-h); border-bottom: var(--hair) solid var(--line-1); }
.kv:last-child { border-bottom: 0; }
.kv-k { color: var(--fg-2); white-space: nowrap; }
.kv-v { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: var(--fw-semi); font-variant-numeric: tabular-nums; color: var(--fg-0); text-align: right; white-space: nowrap; }
.kv-v .unit { color: var(--fg-2); }
.kv-v.t-warn { color: var(--warn); }
.cfg-body { flex: 1; padding: var(--sp-2) var(--sp-7); }
.cfg-viz { padding: var(--sp-5) 0 var(--sp-4); border-bottom: var(--hair) solid var(--line-1); }
.cfg-viz .cap { display: flex; justify-content: space-between; margin-bottom: var(--sp-4); color: var(--fg-3); }
.agebars { display: flex; align-items: flex-end; gap: var(--sp-2); height: var(--age-h); }
.agebars i { flex: 1; min-height: var(--sp-1); border-radius: 4px 4px 1px 1px; background: var(--grad-brand); box-shadow: 0 0 10px -2px var(--accent-glow); }
.agebars i.late { background: var(--warn); box-shadow: 0 0 10px -2px var(--warn-glow); }
.agelab { display: flex; justify-content: space-between; margin-top: var(--sp-3); font-family: var(--font-sans); font-size: var(--fs-cap); color: var(--fg-3); }
.ipl { display: grid; grid-template-columns: var(--ip-w) minmax(0, 1fr) var(--sp-10) auto; align-items: center; gap: var(--sp-5); min-height: var(--kv-h); font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--fg-1); }
.ipl > span:first-child { font-family: var(--font-mono); }
.ipl > span:nth-child(3) { text-align: right; font-weight: var(--fw-semi); color: var(--fg-0); }
.ip-track { position: relative; height: 6px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.06); }
.ip-track > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); background: var(--grad-brand-h); }
.ip-track > i.over { background: linear-gradient(90deg, #f43f5e, var(--bad)); box-shadow: 0 0 10px var(--bad-glow); }
.ip-limit { position: absolute; top: calc(var(--sp-2) * -1); bottom: calc(var(--sp-2) * -1); width: 2px; background: var(--warn); box-shadow: 0 0 8px var(--warn-glow); }
.ip-tag { justify-self: end; white-space: nowrap; font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-semi); letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--fg-3); }
.ip-tag.block { color: var(--bad); }
.ip-tag.would { color: var(--warn); }
.meter { height: 8px; margin: var(--sp-2) 0 var(--sp-4); border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--grad-brand-h); box-shadow: 0 0 12px -2px var(--accent-glow); }
.meter-row { padding-bottom: var(--sp-2); border-bottom: var(--hair) solid var(--line-1); }
.meter-row .kv { border-bottom: 0; }

/* Entrance choreography */
.ov.enter > *, .ov.enter .kpi { animation: rise 760ms var(--ease) both; }
.ov.enter > :nth-child(2) { animation-delay: 70ms; }
.ov.enter > :nth-child(3) { animation: none; }
.ov.enter > :nth-child(4) { animation-delay: 300ms; }
.ov.enter > :nth-child(5) { animation-delay: 380ms; }
.ov.enter > :nth-child(6) { animation-delay: 440ms; }
.ov.enter > :nth-child(7) { animation-delay: 500ms; }
.ov.enter > :nth-child(n + 8) { animation-delay: 560ms; }
.ov.enter .kpi:nth-child(1) { animation-delay: 140ms; }
.ov.enter .kpi:nth-child(2) { animation-delay: 180ms; }
.ov.enter .kpi:nth-child(3) { animation-delay: 220ms; }
.ov.enter .kpi:nth-child(4) { animation-delay: 260ms; }
.ov.enter .kpi:nth-child(5) { animation-delay: 300ms; }
.ov.enter .kpi:nth-child(6) { animation-delay: 340ms; }
.ov.enter > .hero { animation: rise 760ms var(--ease) 70ms both, sweep 14s linear infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(0.985); } }

/* ───────────── Data table ───────────── */
.tbl-toolbar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-5); }
.search { position: relative; width: var(--search-w); }
.search > .ic { position: absolute; left: var(--sp-4); top: 50%; transform: translateY(-50%); width: var(--icon-sm); height: var(--icon-sm); color: var(--fg-3); pointer-events: none; }
.search .input { padding-left: calc(var(--sp-4) + var(--icon-sm) + var(--sp-4)); padding-right: var(--sp-11); }
.search .kbd { position: absolute; right: var(--sp-3); top: 50%; transform: translateY(-50%); }
.tb-select { width: var(--select-w); }
.active-filters { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.tbl-meta { margin-left: auto; font-size: var(--fs-xs); color: var(--fg-2); white-space: nowrap; }
.tbl-meta b { font-weight: var(--fw-regular); color: var(--fg-0); }
.pager { display: flex; gap: var(--sp-1); }
.tb-sep { width: var(--hair); height: var(--sp-9); background: var(--line-2); }
.tbl-wrap { position: relative; flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--r-4); background: var(--grad-card); box-shadow: var(--shadow-card); }
.tbl-wrap.bulking { padding-bottom: var(--sp-14); }
.grid { width: 100%; min-width: var(--table-min); border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.grid col.c-status { width: var(--col-status); }
.grid col.c-tags { width: var(--col-tags); }
.grid col.c-region { width: var(--col-region); }
.grid col.c-num { width: var(--col-num); }
.grid col.c-wide { width: calc(var(--col-num) + var(--mb-w)); }
.grid th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: var(--th-h);
  padding: 0 var(--sp-6);
  background: rgba(13, 14, 23, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--hair) solid var(--line-2);
  text-align: left;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--fw-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
  user-select: none;
}
.grid th:first-child, .grid td:first-child { padding-left: var(--sp-8); }
.grid th:last-child, .grid td:last-child { padding-right: var(--sp-8); }
.grid th:first-child { border-top-left-radius: var(--r-4); }
.grid th:last-child { border-top-right-radius: var(--r-4); }
.grid .r { text-align: right; }
.th-first { display: flex; align-items: center; gap: var(--sp-5); }
.th-btn { height: var(--th-h); display: inline-flex; align-items: center; gap: var(--sp-2); font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.th-btn:hover { color: var(--fg-0); }
.th-btn .ic { width: var(--icon-xs); height: var(--icon-xs); opacity: 0; transition: transform var(--dur-1); }
.grid th.r .th-btn { flex-direction: row-reverse; }
.grid th[aria-sort] .th-btn { color: var(--fg-0); }
.grid th[aria-sort] .th-btn .ic { opacity: 1; color: var(--accent-ink); }
.grid th[aria-sort="ascending"] .th-btn .ic { transform: rotate(180deg); }
.grid td {
  height: var(--row-h);
  padding: 0 var(--sp-6);
  border-bottom: var(--hair) solid var(--line-1);
  color: var(--fg-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grid tbody tr { cursor: pointer; scroll-margin-top: var(--th-h); scroll-margin-bottom: var(--sp-14); }
.grid tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
.grid tbody tr.picked td { background: rgba(124, 108, 255, 0.09); }
.grid tbody tr.sel td { background: rgba(124, 108, 255, 0.13); }
.grid tbody td:first-child { position: relative; }
.grid tbody tr.sel td:first-child::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad-brand); box-shadow: 0 0 12px var(--accent-glow); }
.grid td.num { font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--fg-0); }
.grid td.num.zero, .grid td.num.stale { color: var(--fg-3); }
.grid td.region { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-2); }
.grid td.flash { animation: flash var(--dur-flash) var(--ease); }
.seen { display: inline-flex; align-items: center; gap: var(--sp-3); }
.idc { display: flex; align-items: center; gap: var(--sp-5); min-width: 0; }
.idc .avatar { width: 28px; height: 28px; border-radius: var(--r-2); font-size: 10.5px; }
.idc-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: var(--fw-medium); color: var(--fg-0); }
.idc-name.mono { font-size: var(--fs-sm); }
.idc-mail { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); }
.tags { display: flex; align-items: center; gap: var(--sp-2); overflow: hidden; }
.tbl-state { padding: var(--sp-13) var(--sp-8); }

/* Selection: the avatar becomes a checkbox on hover or while selecting */
.pick { position: relative; flex: none; width: 28px; height: 28px; display: grid; place-items: center; }
.pick .box, .pick-all .box { display: none; width: var(--pick); height: var(--pick); place-items: center; border: var(--hair) solid var(--line-3); border-radius: var(--r-2); background: var(--bg-1); color: var(--transparent); }
.pick .box .ic, .pick-all .box .ic { width: var(--icon-xs); height: var(--icon-xs); stroke-width: 2.25; }
.grid tbody tr:hover .pick .avatar, .grid.selecting .pick .avatar, .pick[aria-pressed="true"] .avatar { display: none; }
.grid tbody tr:hover .pick .box, .grid.selecting .pick .box, .pick[aria-pressed="true"] .box { display: grid; }
.pick[aria-pressed="true"] .box, .pick-all[aria-checked="true"] .box, .pick-all[aria-checked="mixed"] .box { background: var(--grad-brand); border-color: var(--transparent); color: var(--fg-on-fill); box-shadow: 0 0 10px -2px var(--accent-glow); }
.pick-all { display: inline-grid; place-items: center; width: var(--avatar-sm); height: var(--avatar-sm); }
.pick-all .box { display: grid; }
.pick .box:hover, .pick-all .box:hover { border-color: var(--accent-ink); }
.bulk {
  position: absolute;
  left: 50%;
  bottom: var(--sp-8);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-8);
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--hair) solid rgba(124, 108, 255, 0.45);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-pop), 0 18px 50px -18px var(--accent-glow);
  transform: translateX(-50%);
  animation: bulk-in var(--dur-2) var(--ease);
}
@keyframes bulk-in { from { opacity: 0; transform: translate(-50%, var(--sp-4)); } }
.bulk-count { margin-right: var(--sp-2); white-space: nowrap; color: var(--fg-0); }
.bulk-count .num { font-weight: var(--fw-bold); }
.bulk .btn { border-radius: var(--r-3); background: var(--bg-3); }
.bulk .btn:hover { background: var(--bg-5); }
.bulk .btn.danger:hover { color: var(--bad); }

/* Inline 7-day micro bars */
.mbc { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-4); }
.mb { display: inline-flex; align-items: flex-end; gap: var(--hair); width: var(--mb-w); height: var(--mb-h); }
.mb i { flex: 1; min-height: var(--hair); background: rgba(124, 108, 255, 0.42); border-radius: 2px 2px 0 0; }
.mb i:last-child { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.grid tbody tr:hover .mb i { background: rgba(124, 108, 255, 0.75); }
.grid tbody tr:hover .mb i:last-child { background: var(--cyan); }

/* ───────────── Detail sheet ───────────── */
.scrim { position: fixed; top: var(--topbar-h); left: var(--rail-w); right: 0; bottom: var(--status-h); z-index: var(--z-scrim); background: var(--scrim); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity var(--dur-2) var(--ease); }
.scrim.show { opacity: 1; pointer-events: auto; }
.detail {
  position: fixed;
  top: calc(var(--topbar-h) + var(--sp-5));
  right: var(--sp-5);
  bottom: calc(var(--status-h) + var(--sp-5));
  z-index: var(--z-panel);
  width: min(var(--panel-w), calc(100vw - var(--rail-w) - var(--sp-9)));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(12, 13, 22, 0.92);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: var(--hair) solid var(--line-3);
  border-radius: var(--r-5);
  box-shadow: var(--shadow-pop), -30px 0 90px -40px rgba(124, 108, 255, 0.4);
  transform: translateX(calc(100% + var(--sp-9)));
  visibility: hidden;
  transition: transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.detail::before { z-index: 2; }
.detail.open { transform: none; visibility: visible; transition: transform var(--dur-2) var(--ease), visibility 0s; }
.dt-head { flex: none; padding: var(--sp-10) var(--sp-10) var(--sp-7); background: radial-gradient(120% 170% at 0% 0%, rgba(139, 92, 246, 0.3), var(--transparent) 52%), radial-gradient(90% 150% at 100% 0%, rgba(34, 211, 238, 0.13), var(--transparent) 55%); }
.dt-row { display: flex; align-items: flex-start; gap: var(--sp-6); }
.identicon { flex: none; width: var(--avatar-lg); height: var(--avatar-lg); padding: 8px; background: rgba(255, 255, 255, 0.04); border: var(--hair) solid rgba(124, 108, 255, 0.4); border-radius: var(--r-4); box-shadow: 0 12px 30px -10px var(--accent-glow); shape-rendering: crispEdges; }
.identicon .on { fill: url(#gIdent); }
.identicon .mid { fill: rgba(124, 108, 255, 0.3); }
.dt-id { flex: 1; min-width: 0; }
.dt-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-display); font-size: 22px; font-weight: var(--fw-bold); line-height: var(--lh-tight); letter-spacing: var(--tr-tight); }
.dt-name.mono { font-weight: var(--fw-medium); letter-spacing: 0; }
.dt-sub { margin-top: var(--sp-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--fg-2); }
.dt-actions { display: flex; align-items: center; gap: var(--sp-1); }
.dt-pos { margin-right: var(--sp-3); font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--fg-3); white-space: nowrap; }
.dt-chips { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); padding-left: calc(var(--avatar-lg) + var(--sp-6)); }
.tabs { flex: none; display: flex; gap: var(--sp-2); padding: var(--sp-4) var(--sp-9); overflow-x: auto; border-bottom: var(--hair) solid var(--line-1); scrollbar-width: none; }
.tab { position: relative; height: var(--tab-h); display: inline-flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-7); border-radius: var(--r-pill); color: var(--fg-2); font-weight: var(--fw-medium); white-space: nowrap; transition: background var(--dur-1), color var(--dur-1); }
.tab:hover { background: var(--bg-3); color: var(--fg-0); }
.tab[aria-selected="true"] { background: var(--bg-4); color: var(--fg-0); box-shadow: inset 0 0 0 1px var(--line-3), 0 4px 14px -6px rgba(0, 0, 0, 0.6); }
.tab .num { padding: 1px 6px; border-radius: var(--r-pill); background: var(--bg-3); font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--fg-3); }
.tab[aria-selected="true"] .num { background: var(--accent-soft); color: var(--accent-ink); }
.dt-body { flex: 1; min-height: 0; overflow: auto; padding: var(--sp-9) var(--sp-10); }
.dt-body.flush { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.dt-body.fill { display: flex; flex-direction: column; overflow: hidden; }

/* Summary */
.sum { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
.sum-col { display: flex; flex-direction: column; gap: var(--sp-6); min-width: 0; }
.props { padding: var(--sp-1) var(--sp-7); }
.props > div { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); min-height: var(--kv-h); border-bottom: var(--hair) solid var(--line-1); }
.props > div:last-child { border-bottom: 0; }
.props dt { color: var(--fg-2); white-space: nowrap; }
.props dd { min-width: 0; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--sp-2); text-align: right; font-weight: var(--fw-medium); color: var(--fg-0); }
.props dd.mono { font-size: var(--fs-sm); }
.risk { display: grid; grid-template-columns: var(--gauge-w) minmax(0, 1fr); align-items: center; gap: var(--sp-6); padding: var(--sp-6) var(--sp-7); }
.gauge { position: relative; width: var(--gauge-w); }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.g-track { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 10; }
.g-val { fill: none; stroke: url(#gGauge); stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 8px var(--ok-glow)); transition: stroke-dasharray var(--dur-flash) var(--ease); }
.g-val.warn { stroke: var(--warn); filter: drop-shadow(0 0 8px var(--warn-glow)); }
.g-val.bad { stroke: var(--bad); filter: drop-shadow(0 0 8px var(--bad-glow)); }
.g-tick { stroke: var(--solid-1); stroke-width: 2; }
.g-num { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; line-height: var(--lh-none); }
.g-num b { display: block; font-family: var(--font-display); font-size: var(--fs-display); font-weight: var(--fw-bold); letter-spacing: var(--tr-display); color: var(--fg-0); }
.g-num .cap { display: block; margin-top: var(--sp-2); }
.signals { display: flex; flex-direction: column; gap: var(--sp-3); }
.signals .chip { align-self: flex-start; text-transform: none; }
.signals p { font-size: var(--fs-sm); color: var(--fg-2); }
.mini { display: flex; align-items: flex-end; gap: var(--sp-1); height: var(--mini-h); }
.mini i { flex: 1; max-width: var(--sp-10); min-height: var(--sp-1); border-radius: 4px 4px 1px 1px; background: var(--grad-brand); box-shadow: 0 0 10px -3px var(--accent-glow); }
.mini i.zero { background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.mini i:hover { background: var(--accent-hover); }
.mini-axis { display: flex; justify-content: space-between; margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: var(--hair) solid var(--line-2); font-size: var(--fs-cap); color: var(--fg-3); }
.events li, .sess li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: var(--sp-5); min-height: var(--kv-h); padding: 0 var(--sp-7); border-bottom: var(--hair) solid var(--line-1); }
.events li:last-child, .sess li:last-child { border-bottom: 0; }
.sess li { grid-template-columns: auto minmax(0, 1fr) auto; min-height: calc(var(--kv-h) + var(--sp-6)); }
.sess .nav-ic { width: 34px; height: 34px; border-radius: var(--r-3); background: var(--bg-3); color: var(--fg-1); box-shadow: inset 0 0 0 1px var(--line-2); }
.sess-main { min-width: 0; line-height: var(--lh-tight); }
.sess-main b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: var(--fw-semi); color: var(--fg-0); }
.sess-main b .chip { margin-left: var(--sp-3); vertical-align: middle; }
.sess-main > span { display: block; margin-top: var(--sp-1); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); }
.sess-empty { padding: var(--sp-8) var(--sp-7); color: var(--fg-3); font-size: var(--fs-sm); }
.ev-t { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); }
.ev-x { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--fg-1); }
.ev-x .num { font-size: var(--fs-xs); color: var(--fg-2); }

/* Mail three-pane */
.mail { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--mail-folders-w) var(--mail-list-w) minmax(0, 1fr); }
.mail-folders { overflow: auto; padding: var(--sp-4); border-right: var(--hair) solid var(--line-1); background: rgba(255, 255, 255, 0.015); }
.mail-folders .cap { padding: var(--sp-4) var(--sp-4) var(--sp-3); color: var(--fg-3); }
.mail-folders .nav-item { gap: var(--sp-4); }
.mail-folders .nav-item.warn .nav-count { color: var(--warn); }
.mail-list { overflow: auto; border-right: var(--hair) solid var(--line-1); background: rgba(255, 255, 255, 0.02); }
.ml-item { position: relative; display: block; width: 100%; padding: var(--sp-5) var(--sp-6) var(--sp-5) var(--sp-8); border-bottom: var(--hair) solid var(--line-1); text-align: left; }
.ml-item:hover { background: var(--bg-3); }
.ml-item[aria-selected="true"] { background: rgba(124, 108, 255, 0.12); }
.ml-item[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad-brand); box-shadow: 0 0 10px var(--accent-glow); }
.ml-item.unread::after { content: ""; position: absolute; left: var(--sp-3); top: calc(var(--sp-5) + var(--sp-3)); width: var(--dot); height: var(--dot); border-radius: var(--r-2); background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.ml-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); }
.ml-from { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--fg-1); }
.ml-item.unread .ml-from { color: var(--fg-0); font-weight: var(--fw-semi); }
.ml-time { flex: none; font-size: var(--fs-xs); color: var(--fg-3); }
.ml-subj, .ml-prev { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-sm); }
.ml-subj { margin-top: var(--sp-1); color: var(--fg-1); }
.ml-item.unread .ml-subj { color: var(--fg-0); }
.ml-prev { color: var(--fg-3); }
.ml-flag { display: inline-flex; vertical-align: middle; margin-right: var(--sp-2); color: var(--warn); }
.mail-read { min-width: 0; overflow: auto; padding: var(--sp-8); background: var(--transparent); }
.mr-bar { display: flex; align-items: center; gap: var(--sp-1); margin: calc(var(--sp-4) * -1) 0 var(--sp-6); }
.mr-bar .cap { margin-right: auto; }
.mr-subj { font-family: var(--font-display); font-size: 18px; font-weight: var(--fw-bold); line-height: var(--lh-tight); letter-spacing: var(--tr-tight); }
.mr-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-2) var(--sp-6); margin: var(--sp-6) 0; padding: var(--sp-5) 0; border-top: var(--hair) solid var(--line-1); border-bottom: var(--hair) solid var(--line-1); font-size: var(--fs-sm); }
.mr-meta dt { color: var(--fg-3); }
.mr-meta dd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-1); }
.mr-meta dd .mono { font-size: var(--fs-xs); color: var(--fg-2); }
.mr-auth { display: flex; flex-wrap: wrap; gap: var(--sp-2); white-space: normal; }
.mr-body { color: var(--fg-1); line-height: var(--lh-loose); }
.mr-body p { margin-bottom: var(--sp-6); }
.mr-code { display: inline-block; margin-bottom: var(--sp-6); padding: var(--sp-5) var(--sp-7); background: rgba(0, 0, 0, 0.3); border: var(--hair) solid rgba(124, 108, 255, 0.35); border-radius: var(--r-3); box-shadow: 0 0 30px -12px var(--accent-glow); font-family: var(--font-mono); font-size: var(--fs-2xl); line-height: var(--lh-none); letter-spacing: var(--tr-code); color: var(--fg-0); }
.mr-warn { display: flex; gap: var(--sp-4); margin-bottom: var(--sp-6); padding: var(--sp-5) var(--sp-6); background: var(--bad-soft); border: var(--hair) solid var(--bad-line); border-radius: var(--r-3); color: var(--fg-0); font-size: var(--fs-sm); }
.mr-warn .ic { color: var(--bad); }
.mail-empty { padding: var(--sp-11) var(--sp-6); text-align: center; color: var(--fg-3); font-size: var(--fs-sm); }

/* Permission grid */
.perm-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-4) var(--sp-8); margin-bottom: var(--sp-6); }
.perm-meta { display: flex; align-items: center; gap: var(--sp-4); color: var(--fg-2); }
.perm-meta strong { font-weight: var(--fw-medium); color: var(--fg-0); }
.legend-perm { margin-left: auto; display: flex; gap: var(--sp-6); }
.legend-perm span { display: inline-flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--fg-2); }
.perm { width: 100%; overflow: hidden; border-collapse: separate; border-spacing: 0; background: var(--bg-2); border: var(--hair) solid var(--line-1); border-radius: var(--r-4); }
.perm th { height: var(--th-h); padding: 0 var(--sp-6); border-bottom: var(--hair) solid var(--line-2); font-family: var(--font-sans); font-size: var(--fs-cap); font-weight: var(--fw-semi); letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--fg-2); text-align: center; }
.perm td { height: var(--row-h); padding: 0 var(--sp-6); border-bottom: var(--hair) solid var(--line-1); text-align: center; }
.perm th:first-child, .perm td:first-child { text-align: left; }
.perm th:last-child, .perm td:last-child { text-align: right; }
.perm tbody tr:hover td { background: var(--bg-3); }
.perm tfoot td { height: var(--th-h); border-bottom: 0; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-2); }
.perm .res { color: var(--fg-0); }
.perm .src { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--fg-3); }
.pc { width: 24px; height: 24px; display: inline-grid; place-items: center; vertical-align: middle; border: var(--hair) solid var(--line-2); border-radius: 7px; background: var(--bg-1); color: var(--transparent); transition: background var(--dur-1), border-color var(--dur-1); }
.pc .ic { width: var(--icon-xs); height: var(--icon-xs); stroke-width: 2; }
.pc.denied { color: var(--fg-3); }
.pc.denied:hover { border-color: var(--line-3); background: var(--bg-3); }
.pc.granted { background: var(--grad-brand); border-color: var(--transparent); color: var(--fg-on-fill); box-shadow: 0 0 12px -2px var(--accent-glow); }
.pc.granted:hover { background: var(--grad-brand); filter: brightness(1.15); }
.pc.inherited { background: var(--accent-wash); border-color: var(--accent-line); color: var(--accent-ink); cursor: not-allowed; }
.pc.changed { outline: var(--hair) solid var(--warn); outline-offset: var(--sp-1); }
.pending-bar { position: sticky; bottom: calc(var(--sp-8) * -1 + var(--sp-4)); display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-6); padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-6); background: var(--glass-strong); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: var(--hair) solid var(--warn-line); border-radius: var(--r-4); box-shadow: var(--shadow-pop); }
.pending-bar > span { margin-right: auto; color: var(--fg-1); }

/* Live code */
.otp { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-6) var(--sp-10); padding: var(--sp-8) var(--sp-8) var(--sp-7); background: radial-gradient(80% 140% at 0% 0%, rgba(139, 92, 246, 0.18), var(--transparent) 60%), var(--grad-card); border: var(--hair) solid var(--line-1); border-radius: var(--r-4); }
.otp-main .cap { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.otp-code { font-family: var(--font-mono); font-size: var(--fs-display-lg); font-weight: var(--fw-medium); line-height: var(--lh-none); letter-spacing: var(--tr-code); white-space: nowrap; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: var(--transparent); }
.otp-code i { display: inline-block; width: var(--sp-6); }
.otp-bar { height: 6px; margin-top: var(--sp-7); background: var(--bg-4); border-radius: var(--r-pill); overflow: hidden; }
.otp-bar i { display: block; height: 100%; background: var(--grad-brand-h); box-shadow: 0 0 10px var(--accent-glow); transform-origin: left center; }
.otp-row { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-4); font-size: var(--fs-xs); color: var(--fg-2); }
.otp-row .num { color: var(--fg-1); }
.otp.expiring .otp-bar i { background: var(--warn); box-shadow: 0 0 10px var(--warn-glow); }
.otp.expiring .otp-secs { color: var(--warn); }
.otp-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: var(--sp-6); }
.otp-facts { display: grid; grid-template-columns: auto auto; gap: var(--sp-2) var(--sp-6); font-size: var(--fs-xs); }
.otp-facts dt { color: var(--fg-3); font-family: var(--font-mono); font-size: var(--fs-cap); letter-spacing: var(--tr-caps); text-transform: uppercase; }
.otp-facts dd { font-family: var(--font-mono); color: var(--fg-1); text-align: right; }
.tail { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: var(--sp-6); background: rgba(0, 0, 0, 0.28); border: var(--hair) solid var(--line-1); border-radius: var(--r-4); overflow: hidden; }
.tail-head { flex: none; display: flex; align-items: center; gap: var(--sp-5); height: var(--sp-12); padding: 0 var(--sp-3) 0 var(--sp-6); border-bottom: var(--hair) solid var(--line-1); background: rgba(255, 255, 255, 0.02); }
.tail-head > .cap:first-child { color: var(--fg-1); }
.tail-cols, .tl { display: grid; grid-template-columns: var(--tl-time) var(--tl-evt) var(--tl-res) var(--tl-ip) minmax(0, 1fr) var(--tl-ms); gap: var(--sp-6); align-items: center; padding: 0 var(--sp-6); }
.tail-cols { flex: none; height: var(--tl-row); border-bottom: var(--hair) solid var(--line-1); }
.tail-cols .cap { color: var(--fg-3); }
.tail-cols .cap:last-child, .tl > span:last-child { text-align: right; }
.tail-body { flex: 1; min-height: 0; overflow: auto; font-family: var(--font-mono); font-size: var(--fs-xs); }
.tl { height: var(--tl-row); color: var(--fg-1); white-space: nowrap; }
.tl > span { overflow: hidden; text-overflow: ellipsis; }
.tl .t { color: var(--fg-3); }
.tl .res-ok { color: var(--ok); }
.tl .res-fail { color: var(--bad); }
.tl .res-throttled { color: var(--warn); }
.tl:hover { background: var(--bg-2); }
.tl.new { animation: flash var(--dur-flash) var(--ease); }
@keyframes flash { from { background: var(--accent-soft); } to { background: var(--transparent); } }
.paused-note { font-size: var(--fs-xs); color: var(--warn); }

/* Settings form */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-8) var(--sp-8); }
.form .span-2 { grid-column: 1 / -1; }
.form-sec { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--sp-5); padding-top: var(--sp-2); }
.form-sec::after { content: ""; flex: 1; height: var(--hair); background: var(--line-1); }
.form-sec:not(:first-child) { margin-top: var(--sp-4); }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-8); min-height: var(--ctl-h); }
.check-row .field-help { margin-top: var(--sp-1); }
.form-foot { position: sticky; bottom: calc(var(--sp-8) * -1); display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-10); padding: var(--sp-6) 0 var(--sp-6); background: rgba(12, 13, 22, 0.97); border-top: var(--hair) solid var(--line-1); }
.form-foot .meta { margin-right: auto; font-size: var(--fs-xs); color: var(--fg-3); }
.form-foot .meta.dirty { color: var(--warn); }

/* JSON viewer */
.json-bar { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.json-bar .meta { margin-left: auto; font-size: var(--fs-xs); color: var(--fg-3); }
.json { padding: var(--sp-4) 0; overflow: auto; background: rgba(0, 0, 0, 0.3); border: var(--hair) solid var(--line-1); border-radius: var(--r-4); font-family: var(--font-mono); font-size: var(--fs-sm); line-height: var(--json-row); }
.jl { display: flex; min-width: max-content; white-space: pre; }
.jl:hover { background: var(--bg-2); }
.jl-n { flex: none; width: var(--json-gutter); padding-right: var(--sp-3); text-align: right; color: var(--fg-3); user-select: none; }
.jl-f { flex: none; width: var(--icon); display: inline-grid; place-items: center; }
.jl-t { width: var(--icon); height: var(--icon); display: grid; place-items: center; border-radius: var(--r-1); color: var(--fg-3); }
.jl-t:hover { color: var(--fg-0); background: var(--bg-4); }
.jl-t .ic { width: var(--icon-xs); height: var(--icon-xs); transition: transform var(--dur-1); }
.jl.folded .jl-t .ic { transform: rotate(-90deg); }
.jl-c { padding-left: calc(var(--d, 0) * var(--json-indent) + var(--sp-2)); padding-right: var(--sp-8); }
.j-k { color: var(--accent-ink); }
.j-s { color: var(--fg-0); }
.j-n { color: var(--fg-1); }
.j-b { color: var(--fg-2); }
.j-p { color: var(--fg-3); }
.j-sum { display: none; }
.jl.folded .j-sum { display: inline; }
.j-ell { margin: 0 var(--sp-2); padding: 0 var(--sp-2); border-radius: var(--r-1); background: var(--bg-4); color: var(--fg-1); }
.j-cnt { margin-right: var(--sp-2); color: var(--fg-3); }

/* ───────────── Auth ───────────── */
.auth { position: fixed; top: 0; left: 0; right: 0; bottom: var(--status-h); display: grid; place-items: center; padding: var(--sp-8); overflow: auto; }
.auth::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(38% 46% at 50% 46%, rgba(124, 108, 255, 0.2), var(--transparent) 70%); }
.auth-map { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; pointer-events: none; opacity: 0.6; }
.auth-map svg { width: 112%; max-width: none; height: auto; }
.auth-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-8); padding: var(--sp-8) var(--sp-10); }
.auth-top .brand { display: flex; align-items: center; gap: var(--sp-5); }
.auth-top .brand-name { font-size: 16px; }
.auth-card {
  position: relative;
  width: 100%;
  max-width: var(--auth-w);
  padding: var(--sp-11);
  border: 1px solid var(--transparent);
  border-radius: var(--r-5);
  background:
    linear-gradient(180deg, rgba(20, 21, 34, 0.9), rgba(12, 13, 22, 0.94)) padding-box,
    linear-gradient(160deg, rgba(139, 92, 246, 0.75), rgba(255, 255, 255, 0.08) 40%, rgba(34, 211, 238, 0.5)) border-box;
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 40px 110px -34px rgba(124, 108, 255, 0.55), var(--shadow-pop);
}
.auth-logo { margin-bottom: var(--sp-9); }
.auth-logo .brand-mark { width: 46px; height: 46px; border-radius: 14px; }
.auth-logo .brand-mark .ic { width: 24px; height: 24px; }
.auth-card h2 { font-family: var(--font-display); font-size: 26px; font-weight: var(--fw-bold); line-height: var(--lh-tight); letter-spacing: var(--tr-tight); }
.auth-sub { margin: var(--sp-3) 0 var(--sp-10); color: var(--fg-2); }
.auth-sub .mono { font-size: var(--fs-sm); color: var(--fg-1); }
.auth form { display: flex; flex-direction: column; gap: var(--sp-8); }
.auth .input { height: var(--ctl-h-lg); }
.auth .btn-primary { height: var(--ctl-h-lg); margin-top: var(--sp-2); font-size: var(--fs-body); }
.auth-foot { display: flex; justify-content: space-between; gap: var(--sp-6); margin-top: var(--sp-10); padding-top: var(--sp-6); border-top: var(--hair) solid var(--line-1); }
.auth-foot .cap { color: var(--fg-3); }

/* ───────────── States ───────────── */
.states { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); }
.states .span-2 { grid-column: 1 / -1; }
.state-note { margin-left: auto; font-size: var(--fs-xs); color: var(--fg-3); }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.045) 80%); background-size: 220% 100%; animation: shimmer 1.7s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.sk-cap { width: 54%; height: var(--sp-4); }
.sk-val { width: 62%; height: var(--fs-display); }
.sk-line { height: var(--sp-4); }
.sk-chip { width: var(--sp-12); height: var(--chip-h); }
.sk-dot { width: var(--avatar-sm); height: var(--avatar-sm); flex: none; }
.sk-r { justify-self: end; margin-left: auto; }
.sk-kpi { display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-6) var(--sp-7) var(--sp-7); background: var(--grad-card); border: 1px solid var(--line-1); border-radius: var(--r-4); }
.sk-rows { margin-top: var(--sp-6); border: var(--hair) solid var(--line-1); border-radius: var(--r-4); overflow: hidden; }
.sk-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 0.8fr); gap: var(--sp-8); align-items: center; height: var(--row-h); padding: 0 var(--sp-8); border-bottom: var(--hair) solid var(--line-1); }
.sk-row:last-child { border-bottom: 0; }
.sk-row.head { height: var(--th-h); background: var(--bg-1); }
.sk-row.head .sk { height: var(--sp-3); background: var(--bg-3); }
.sk-id { display: flex; align-items: center; gap: var(--sp-4); }
.sk-hero { grid-column: 1 / -1; display: grid; grid-template-columns: var(--hero-side-w) minmax(0, 1fr); height: calc(var(--hero-h) + var(--sp-12)); background: var(--grad-card); border: var(--hair) solid var(--line-2); border-radius: var(--r-5); overflow: hidden; }
.sk-hero > div:first-child { display: flex; flex-direction: column; gap: var(--sp-6); padding: var(--sp-8); border-right: var(--hair) solid var(--line-1); }
.sk-hero .sk-bars { height: 100%; padding: var(--sp-12) var(--sp-8) var(--sp-8); }
.sk-bars { display: flex; align-items: flex-end; gap: var(--sp-2); }
.sk-bars .sk { flex: 1; }
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--sp-4); padding: var(--sp-12) var(--sp-10); text-align: center; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: var(--sp-2); background: var(--accent-soft); border: var(--hair) solid rgba(124, 108, 255, 0.38); border-radius: var(--r-4); color: var(--accent-ink); box-shadow: 0 12px 32px -12px var(--accent-glow); }
.empty-icon .ic { width: var(--sp-9); height: var(--sp-9); stroke-width: 1.25; }
.empty h3 { font-family: var(--font-display); font-size: var(--fs-md); font-weight: var(--fw-semi); }
.empty p { max-width: var(--measure); color: var(--fg-2); }
.empty .query { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); }
.empty .btns { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.err-card { border-color: var(--bad-line); box-shadow: var(--shadow-card), 0 24px 70px -36px var(--bad-glow); }
.err-card.recovered { border-color: var(--line-1); }
.err-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-6); padding: var(--sp-9) var(--sp-8); }
.err-icon { width: 54px; height: 54px; display: grid; place-items: center; background: var(--bad-soft); border: var(--hair) solid var(--bad-line); border-radius: var(--r-4); color: var(--bad); box-shadow: 0 12px 32px -12px var(--bad-glow); }
.err-icon.ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); box-shadow: 0 12px 32px -12px var(--ok-glow); }
.err-icon .ic { width: var(--sp-9); height: var(--sp-9); }
.err-body h3 { font-family: var(--font-display); font-size: var(--fs-md); font-weight: var(--fw-semi); line-height: var(--lh-tight); }
.err-body p { margin-top: var(--sp-3); color: var(--fg-2); }
.err-trace { margin-top: var(--sp-6); padding: var(--sp-5) var(--sp-6); background: rgba(0, 0, 0, 0.32); border: var(--hair) solid var(--line-1); border-radius: var(--r-3); font-family: var(--font-mono); font-size: var(--fs-xs); line-height: var(--lh-loose); color: var(--fg-1); white-space: pre-wrap; word-break: break-all; }
.err-trace .k { color: var(--fg-3); }
.err-actions { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-7); }
.err-actions .meta { margin-left: auto; font-size: var(--fs-xs); color: var(--fg-3); }

/* Gradient stops shared by every chart (defined once in the sprite) */
.sa0 { stop-color: var(--accent); stop-opacity: 0.42; }
.sa1 { stop-color: var(--accent); stop-opacity: 0; }
.sw0 { stop-color: var(--warn); stop-opacity: 0.32; }
.sw1 { stop-color: var(--warn); stop-opacity: 0; }
.sb0 { stop-color: var(--bad); stop-opacity: 0.34; }
.sb1 { stop-color: var(--bad); stop-opacity: 0; }
.sv { stop-color: var(--violet); }
.si { stop-color: var(--indigo); }
.sc { stop-color: var(--cyan); }
.sok { stop-color: var(--ok); }
.si-dim { stop-color: var(--indigo); stop-opacity: 0.35; }
.sf0 { stop-color: var(--accent); stop-opacity: 0.34; }
.sf1 { stop-color: var(--accent); stop-opacity: 0.08; }

/* ───────────── Reduced effects ─────────────
   Lighter mode for slower machines: no blur, glows, ambient motion or cursor light. */
#fxBtn .ic { color: var(--fg-3); }
#fxBtn[aria-pressed="true"] .ic { color: var(--accent-ink); }
body.lite::before { animation: none; }
body.lite .grain { display: none; }
body.lite .rail, body.lite .topbar, body.lite .statusbar, body.lite .pop, body.lite .gtip, body.lite .toast, body.lite .palette, body.lite .pal-scrim, body.lite .scrim, body.lite .detail, body.lite .bulk, body.lite .pending-bar, body.lite .auth-card, body.lite .grid th { backdrop-filter: none; -webkit-backdrop-filter: none; }
body.lite .rail { background: #090a11; }
body.lite .topbar, body.lite .statusbar { background: #07080d; }
body.lite .pop, body.lite .gtip, body.lite .toast, body.lite .palette, body.lite .bulk, body.lite .pending-bar { background: var(--solid-2); }
body.lite .detail { background: #0c0d16; }
body.lite .grid th { background: #0d0e17; }
body.lite .hero, body.lite .arc, body.lite .dot.live, body.lite .sk, body.lite .ov.enter > *, body.lite .ov.enter .kpi, body.lite .intro .ch-ok, body.lite .intro .ch-fail, body.lite .intro .fn-bar { animation: none; }
body.lite .card::before, body.lite .card::after, body.lite .kpi::after, body.lite .btn-primary::after, body.lite .ov-btn-primary::after, body.lite .cf-save::after, body.lite .h-ring, body.lite .mk-ring { display: none; }
body.lite .h-line, body.lite .h-err, body.lite .h-dot, body.lite .arc, body.lite .mk-core, body.lite .fn-bar, body.lite .ch-fail, body.lite .g-val, body.lite .lv-spark .lv-end { filter: none; }
body.lite .fn-col.on .fn-bar { filter: brightness(1.25); }
body.lite .ch-col.on .ch-ok { filter: brightness(1.3); }
body.lite .kpi:hover { transform: none; }

/* ───────────── Responsive ───────────── */
@media (min-width: 1720px) {
  .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1360px) {
  .ov-third { grid-column: span 6; }
  .ov-third.hm-card { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
  .map-wrap { grid-template-columns: minmax(0, 1fr); }
  .map-stage { border-right-width: 0; border-bottom: var(--hair) solid var(--line-1); }
  .tb-cmd, .sb-region { display: none; }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .ov-head { flex-direction: column; align-items: flex-start; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-side { border-right-width: 0; border-bottom: var(--hair) solid var(--line-1); }
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-8); }
  .ov-third, .ov-cfg { grid-column: 1 / -1; }
  .states, .sum, .form { grid-template-columns: minmax(0, 1fr); }
  .mail { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) minmax(0, 1.4fr); }
  .mail-folders { display: flex; gap: var(--sp-1); overflow-x: auto; border-right: 0; border-bottom: var(--hair) solid var(--line-1); }
  .mail-folders .cap { display: none; }
  .mail-folders .nav-item { width: auto; flex: none; }
  .mail-list { border-right: 0; border-bottom: var(--hair) solid var(--line-1); }
  .sb-ticker, .sb-screens > .cap { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; top: 0; left: 0; bottom: var(--status-h); z-index: var(--z-panel); width: var(--rail-w); transform: translateX(-100%); visibility: hidden; transition: transform var(--dur-2) var(--ease), visibility var(--dur-2); }
  body.rail-open .rail { transform: none; visibility: visible; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 var(--sp-6); }
  .scrim { left: 0; }
  .detail { left: var(--sp-3); right: var(--sp-3); top: calc(var(--topbar-h) + var(--sp-3)); bottom: calc(var(--status-h) + var(--sp-3)); width: auto; }
  .pill .hide-sm, .tb-div { display: none; }
  .sb-btn .lbl { display: none; }
}
@media (max-width: 760px) {
  .sb-screens .lbl { display: none; }
}
@media (max-width: 640px) {
  .topbar .pill { display: none; }
  .tb-title h1 { font-size: 17px; }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .view { padding: var(--sp-6) var(--sp-6) var(--sp-10); }
  .search { width: 100%; }
  .tbl-meta { margin-left: 0; }
  .hero-side { padding: var(--sp-8); }
  .hero-val { font-size: var(--fs-display-lg); }
  .map-card .legend, .hero-bar .legend, .tb-crumb { display: none; }
  .ov-head h2 { font-size: 26px; }
  .ov-actions { width: 100%; }
  .ov-actions .btn { flex: 1; }
  .plan { display: none; }
  .sb-conn .cap, .sb-clock { display: none; }
  .otp { grid-template-columns: minmax(0, 1fr); }
  .otp-side { align-items: flex-start; }
  .legend-perm { margin-left: 0; }
  .risk { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .auth-card { padding: var(--sp-9); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .btn-primary::after, .ov-btn-primary::after, .cf-save::after { display: none; }
}

/* ───────────── Overview · surface system (.ov-*) ───────────── */
:root {
  --ov-page: #07080c;
  --ov-card: #0e1117;
  --ov-elev: #141922;
  --ov-line: rgba(255, 255, 255, 0.07);
  --ov-row-line: rgba(255, 255, 255, 0.04);
  --ov-hi: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --ov-hover: rgba(255, 255, 255, 0.025);
  --ov-accent: #5e5bd6;
  --ov-accent-30: rgba(94, 91, 214, 0.35);
  --ov-ok: rgba(74, 222, 128, 0.8);
  --ov-ink: #ffffff;
  --ov-title: #dfe4ee;
  --ov-text: #c4cad6;
  --ov-text-2: #9aa3b5;
  --ov-label: #7f8aa3;
  --ov-meta: #8c93a8;
  --ov-cap: #7f8aa3;
  --ov-r-card: 12px;
  --ov-r-chip: 8px;
  --ov-gap: 20px;
  --ov-pad: 20px;
}

/* Primitives — reusable by the other views */
.ov-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 16px var(--ov-pad); background: var(--ov-card); border: 1px solid var(--ov-line); border-radius: var(--ov-r-card); box-shadow: var(--ov-hi); overflow: hidden; }
.ov-card.is-elev { background: var(--ov-elev); }
.ov-list { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ov-row { flex: 0 0 auto; display: grid; align-items: center; gap: 12px; min-height: 40px; margin: 0 calc(var(--ov-pad) * -1); padding: 0 var(--ov-pad); border-top: 1px solid var(--ov-row-line); transition: background-color 120ms ease; }
.ov-row:first-child { border-top-color: transparent; }
.ov-row:hover { background: var(--ov-hover); }
.ov-pill { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border: 1px solid var(--ov-line); border-radius: 999px; background: rgba(255, 255, 255, 0.03); font-family: var(--font-sans); font-size: 10px; font-weight: 600; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ov-label); white-space: nowrap; }
.ov-pill.is-active { color: var(--ov-ok); background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.25); }
.ov-pill.is-ready { color: #aebbd0; background: rgba(148, 163, 184, 0.12); border-color: rgba(148, 163, 184, 0.25); }
.ov-pill.is-idle { color: #fca5a5; background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.25); }
.ov-pill.is-warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.ov-pill.is-online { height: 26px; gap: 8px; padding: 0 11px; background: var(--ov-card); box-shadow: var(--ov-hi); font-size: 11px; letter-spacing: 0.1em; color: var(--ov-title); }
.ov-dot { display: inline-block; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--ov-ok); }
.ov-dot.is-accent { background: var(--ov-accent); }
.ov-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border: 1px solid var(--ov-line); border-radius: var(--ov-r-chip); background: rgba(255, 255, 255, 0.03); font-family: var(--font-mono); font-size: 10.5px; line-height: 1; color: var(--ov-text); white-space: nowrap; }
.ov-label { font-family: var(--font-sans); font-size: 10px; font-weight: 600; line-height: 1.2; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ov-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-cap { font-family: var(--font-sans); font-size: 11px; line-height: 1.35; color: var(--ov-cap); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ov-sec { display: flex; align-items: center; gap: 10px; min-height: 22px; margin-bottom: 6px; }
.ov-sec h3 { font-family: var(--font-sans); font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--ov-title); white-space: nowrap; }
.ov-sec-meta { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ov-cap); white-space: nowrap; }
.ov-sec-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px; border-radius: 6px; color: var(--ov-accent); }
.ov-sec-link:hover { background: var(--ov-hover); }
.ov-sec-line { flex: 1; height: 1px; margin-right: calc(var(--ov-pad) * -1); background: var(--ov-line); }
.ov-page :focus-visible { outline: 2px solid var(--ov-accent); outline-offset: 2px; }

/* Page */
#view-overview { background: var(--ov-page); }
#view-overview:not([hidden]) { display: flex; flex-direction: column; min-height: calc(100vh - var(--status-h) - var(--topbar-h)); }
.ov-page { flex: 1; display: flex; flex-direction: column; gap: var(--ov-gap); min-height: 100%; font-family: var(--font-sans); color: var(--ov-text); }
.ov-top { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--ov-gap); }
.ov-eyebrow { font-size: 10px; font-weight: 600; line-height: 1.2; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ov-label); }
.ov-title { margin-top: 8px; font-family: var(--font-sans); font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--ov-ink); }
.ov-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px; }
.ov-sync { font-size: 11px; color: var(--ov-cap); white-space: nowrap; }
.ov-sync .ov-mono { color: var(--ov-meta); }
.ov-seg { display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0; border: 1px solid var(--ov-line); border-radius: var(--ov-r-chip); background: var(--ov-card); box-shadow: var(--ov-hi); }
.ov-seg button { position: relative; height: 44px; min-width: 44px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; font-family: var(--font-mono); font-size: 11px; line-height: 1; color: var(--ov-label); cursor: pointer; transition: color 120ms ease, background-color 120ms ease; }
.ov-seg button:hover { color: var(--ov-title); }
.ov-seg button[aria-pressed="true"] { background: var(--ov-elev); border-color: var(--ov-line); box-shadow: var(--ov-hi); color: var(--ov-ink); }
.ov-seg button[aria-pressed="true"]::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 12px; height: 1px; margin-left: -6px; background: var(--ov-accent); }

/* Grid — natural rows sized by their live content */
.ov-grid { flex: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto; align-content: start; gap: var(--ov-gap); min-height: 0; }
.ov-c-stat { grid-column: span 3; }
.ov-c-act { grid-column: span 8; }
.ov-c-health { grid-column: span 4; }
.ov-c-links, .ov-c-caps, .ov-c-traffic { grid-column: span 4; }
.ov-grid.is-enter > * { animation: ov-in 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes ov-in { from { opacity: 0; transform: translateY(6px); } }
body.lite .ov-grid.is-enter > * { animation: none; }

/* Live funnel, daily visit activity, and real infrastructure state */
.simple-ui .ov-c-health, .simple-ui .ov-c-links { display: none; }
.ov-c-funnel { grid-column: span 8; }
.ov-c-act, .ov-c-caps { grid-column: span 4; }
.ov-c-activity { grid-column: span 8; }
.ov-c-infra { grid-column: span 4; }
.ov-c-funnel .ov-sec { padding-right: 104px; }
.ov-c-activity .ov-sec { padding-right: 180px; }
.ov-c-infra .ov-sec { padding-right: 124px; }
.ov-infra-state { position: absolute; top: 16px; right: var(--ov-pad); }
.ov-c-infra .card-foot { margin: 8px calc(var(--ov-pad) * -1) -16px; padding: 4px var(--ov-pad); }
.ov-c-infra .card-foot > span:first-child { color: var(--ov-meta); font-size: 11px; }
.ov-funnel-rate { position: absolute; top: 16px; right: var(--ov-pad); }
.ov-c-funnel .fn-chart { min-height: 150px; margin: 8px 0 4px; }
.ov-activity-tools { position: absolute; top: 16px; right: var(--ov-pad); }
.ov-activity-tools button { min-width: 64px; min-height: 44px; }
.ov-c-activity .chart-body { padding: 8px 0 0; }
.ov-c-activity .chart, .ov-c-activity .ch-scroll { height: 150px; }
.ov-c-act .ov-row { min-height: 40px; }
.ov-c-funnel .card-foot, .ov-c-activity .card-foot { margin: 8px calc(var(--ov-pad) * -1) -16px; padding: 10px var(--ov-pad); }
@media (max-width: 1279px) {
  .ov-c-funnel, .ov-c-activity, .ov-c-infra { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ov-c-funnel .fn-chart { min-height: 190px; }
  .ov-c-funnel .fn-name { font-size: 9px; letter-spacing: 0.03em; }
  .ov-c-activity .ov-sec { padding-right: 152px; }
  .ov-activity-tools button { min-width: 56px; }
  .ov-c-activity .chart, .ov-c-activity .ch-scroll { height: 190px; }
  .ov-c-funnel .card-foot, .ov-c-activity .card-foot { flex-wrap: wrap; gap: 8px 12px; }
  .ov-c-funnel .card-foot .spacer, .ov-c-activity .card-foot .spacer { display: none; }
}

/* Stat cards */
.ov-stat { padding-top: 16px; padding-bottom: 24px; }
.ov-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ov-ic { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border: 1px solid var(--ov-line); border-radius: var(--ov-r-chip); background: rgba(255, 255, 255, 0.02); color: var(--ov-label); }
.ov-ic .ic { width: 18px; height: 18px; stroke-width: 1.5; }
.ov-num { margin-top: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-mono); font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ov-ink); }
.ov-unit { margin-left: 2px; font-size: 22px; color: var(--ov-label); }
.ov-stat .ov-cap { margin-top: 10px; }
.ov-prog { position: absolute; left: 16px; right: 16px; bottom: 8px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); }
.ov-prog i { display: block; height: 100%; border-radius: 2px; background: var(--ov-accent-30); transition: width 600ms ease; }

/* Recent activity */
.ov-act { grid-template-columns: 30px minmax(0, 1fr) auto 52px; min-height: 44px; }
.ov-av { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--ov-line); border-radius: 50%; background: rgba(255, 255, 255, 0.04); font-size: 12px; font-weight: 600; color: var(--ov-title); }
.ov-act-main { min-width: 0; }
.ov-act-t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--ov-ink); }
.ov-act-m { margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-mono); font-size: 11px; color: var(--ov-meta); }
.ov-act .ov-pill { justify-self: end; }
.ov-time { justify-self: end; font-family: var(--font-mono); font-size: 11px; color: var(--ov-meta); white-space: nowrap; }

/* Health */
.ov-kv { grid-template-columns: minmax(0, 1fr) auto; font-size: 12px; }
.ov-kv-k { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ov-text-2); }
.ov-kv-v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--ov-title); }

/* Bar — 1px track, 3px accent fill */
.ov-bar { position: relative; height: 3px; }
.ov-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 1px; height: 1px; background: var(--ov-line); }
.ov-bar i { position: absolute; left: 0; top: 0; height: 3px; border-radius: 2px; background: var(--ov-accent); }
.ov-nil { color: var(--ov-cap); }

/* Top links */
.ov-lnk { grid-template-columns: minmax(0, 1fr) auto 48px; font-size: 12.5px; }
.ov-lnk-l { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ov-title); }
.ov-lnk-n { font-family: var(--font-mono); font-size: 12px; text-align: right; }

/* Recent captures */
.ov-cpt { grid-template-columns: 30px minmax(0, 1fr) auto 52px; }
.ov-cpt-n { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 500; color: var(--ov-ink); }
.ov-cpt .ov-pill { justify-self: end; }

/* Traffic — same row style as the former Coverage card */
.ov-trf { grid-template-columns: minmax(0, 1fr) auto 72px; font-size: 12px; }
.ov-trf-l { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ov-text); }
.ov-trf-n { font-family: var(--font-mono); text-align: right; }

/* Skeleton */
.ov-sk-eye { width: 96px; height: 10px; }
.ov-sk-title { width: 180px; height: 28px; margin-top: 8px; }
.ov-sk-lab { width: 46%; height: 10px; }
.ov-sk-num { width: 62%; height: 40px; margin-top: 14px; }
.ov-sk-cap { width: 70%; height: 10px; margin-top: 10px; }
.ov-sk-h { width: 120px; height: 13px; margin-bottom: 8px; }
.ov-sk-line { height: 12px; }

@media (max-width: 1279px) {
  .ov-grid { grid-template-rows: none; }
  .ov-c-stat, .ov-c-links, .ov-c-caps { grid-column: span 6; }
  .ov-c-traffic { grid-column: 1 / -1; }
}
@media (max-width: 1023px) {
  .ov-c-act, .ov-c-health { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ov-top { flex-direction: column; align-items: flex-start; }
  .ov-tools { justify-content: flex-start; }
  .ov-c-stat, .ov-c-links, .ov-c-caps { grid-column: 1 / -1; }
  .ov-num { font-size: 34px; }
  .ov-act { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .ov-act .ov-time { display: none; }
  .ov-cpt { grid-template-columns: 30px minmax(0, 1fr) auto 44px; }
}
/* ───────────── Members (#view-table) · built on the .ov-* primitives ───────────── */
#view-table, #view-states, #view-config, #view-domains { background: var(--ov-page); }
#view-table:not([hidden]), #view-states:not([hidden]), #view-config:not([hidden]), #view-domains:not([hidden]) { display: flex; flex-direction: column; min-height: calc(100vh - var(--status-h) - var(--topbar-h)); }
.mb-page { gap: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Toolbar */
.mb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mb-search { flex: none; width: 280px; }
.mb-search .input, .ov-input { background: var(--ov-card); border-color: var(--ov-line); box-shadow: var(--ov-hi); }
.mb-search .input:hover, .ov-input:hover { border-color: rgba(255, 255, 255, 0.14); }
.mb-search .input:focus, .ov-input:focus { border-color: var(--ov-accent-30); box-shadow: 0 0 0 3px rgba(111, 123, 255, 0.12); }
.mb-tools .ov-seg { height: 44px; padding: 0; }
.mb-tools .ov-seg button { height: 44px; min-width: 52px; }
.mb-opt { display: inline-flex; align-items: center; gap: 8px; height: 44px; font-size: 12.5px; color: var(--ov-text-2); white-space: nowrap; cursor: pointer; user-select: none; transition: color 120ms ease; }
.mb-opt:hover { color: var(--ov-title); }
.ov-btn-primary { position: relative; overflow: hidden; isolation: isolate; background: var(--grad-brand); border-color: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.ov-btn-primary:hover { background: var(--grad-brand); border-color: rgba(255, 255, 255, 0.2); filter: brightness(1.08); }
.ov-btn-primary .ic { color: currentColor; }
.mb-go { margin-left: 0; }
.mb-export { margin-left: auto; }

/* Checkbox */
.mb-check { position: relative; appearance: none; -webkit-appearance: none; display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; margin: 0; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 4px; background: rgba(255, 255, 255, 0.03); vertical-align: middle; cursor: pointer; transition: background-color 120ms ease, border-color 120ms ease; }
.mb-check::before { content: ""; position: absolute; inset: -14px; }
.mb-check:hover { border-color: rgba(255, 255, 255, 0.32); }
.mb-check::after { content: ""; width: 8px; height: 4px; margin-top: -2px; border: solid #fff; border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); opacity: 0; }
.mb-check:checked, .mb-check:indeterminate { background: var(--ov-accent); border-color: var(--ov-accent); }
.mb-check:checked::after { opacity: 1; }
.mb-check:indeterminate::after { height: 0; margin-top: 0; border-width: 0 0 1.5px; transform: none; opacity: 1; }

/* Table */
.mb-card { padding: 0; }
.mb-scroll { overflow-x: auto; }
.mb-grid { min-width: 860px; }
.mb-cols { display: grid; grid-template-columns: 16px minmax(220px, 2.2fr) minmax(140px, 1.4fr) minmax(88px, 0.8fr) 100px 104px 28px; align-items: center; column-gap: 16px; }
.mb-head { height: 40px; padding: 0 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.012); }
.mb-row { flex: none; height: 64px; min-height: 64px; margin: 0; padding: 0 20px; border-top-color: rgba(255, 255, 255, 0.06); }
.mb-row.is-picked { background: rgba(111, 123, 255, 0.07); }
.mb-row.is-current { background: rgba(111, 123, 255, 0.055); box-shadow: inset 2px 0 var(--ov-accent); }
.mb-row.is-current:hover { background: rgba(111, 123, 255, 0.09); }
.mb-row.is-picked:hover { background: rgba(111, 123, 255, 0.1); }
.mb-row > * { min-width: 0; }
.mb-member { display: flex; align-items: center; gap: 12px; }
.mb-av { width: 32px; height: 32px; font-size: 11px; }
.mb-stack { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mb-name, .mb-ref, .mb-l1, .mb-l2 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mb-name { font-size: 13px; font-weight: 500; line-height: 1.25; color: #fff; }
.mb-ref { font-size: 11px; line-height: 1.2; color: var(--ov-meta); }
.mb-l1 { font-size: 12.5px; line-height: 1.25; color: var(--ov-title); }
.mb-l2 { font-size: 11px; line-height: 1.2; color: var(--ov-meta); }
.mb-date { font-size: 12px; color: var(--ov-text-2); }
.mb-pills { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.mb-pills .ov-pill { height: 18px; padding: 0 7px; font-size: 9.5px; }
.mb-c-act { display: flex; justify-content: flex-end; }
.mb-mfa { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.mb-mfa.is-enrolled { color: var(--ok); }
.mb-mfa.is-missing { color: var(--ov-text-2); }
#view-table .ov-btn-primary { background: var(--ok); border-color: var(--ok-line); color: #06130d; }
#view-table .ov-btn-primary:hover { background: #6ee7b7; border-color: var(--ok); color: #06130d; }
#view-table .mb-av { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
#view-table .mb-row.is-current { box-shadow: inset 2px 0 var(--ok); }
#view-table .mb-search .input:focus { border-color: var(--ok-line); box-shadow: 0 0 0 3px var(--ok-soft); }
.mb-act { width: 28px; height: 28px; color: var(--ov-label); opacity: .65; transition: opacity 120ms ease, background-color 120ms ease, color 120ms ease, box-shadow 120ms ease; }
.mb-row:hover .mb-act, .mb-row:focus-within .mb-act { opacity: 1; }
@media (hover: none) { .mb-act { opacity: 1; } }
.mb-empty { padding: 40px 20px; text-align: center; font-size: 12.5px; color: var(--ov-meta); }

/* Footer */
.mb-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; padding: 12px 20px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.mb-count { font-size: 12px; color: var(--ov-meta); white-space: nowrap; }
.mb-count b { font-weight: 500; color: var(--ov-title); }
.purge-btn { background: rgba(255,77,79,.08); border-color: rgba(255,77,79,.3); color: #ff8a8c; }
.purge-btn:hover { background: rgba(255,77,79,.14); border-color: rgba(255,77,79,.45); }
.mb-pages { display: flex; align-items: center; gap: 4px; }
.mb-pages button { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ov-label); cursor: pointer; transition: color 120ms ease, background-color 120ms ease; }
.mb-pages button:hover:not(:disabled) { background: var(--ov-hover); color: var(--ov-title); }
.mb-pages button[aria-current="page"] { background: var(--ov-elev); border-color: var(--ov-line); box-shadow: var(--ov-hi); color: var(--ov-ink); }
.mb-pages button:disabled { opacity: 0.35; cursor: default; }
.mb-pages .ic { width: 14px; height: 14px; }
.mb-gap { padding: 0 2px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ov-cap); }

/* Collections (#view-states) · reuses the Members table */
.cl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cl-stat { padding-top: 14px; padding-bottom: 16px; }
.cl-stat .ov-num { margin-top: 10px; font-size: 26px; }
.cl-grid { min-width: 780px; }
.cl-grid > .mb-head { margin: 0 calc(var(--ov-pad) * -1); }
.cl-cols { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(160px, 1.5fr) 64px 96px 112px 88px; align-items: center; column-gap: 16px; }
.cl-owner { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; color: var(--ov-meta); }
.cl-num { text-align: right; }
.mb-row .cl-num { font-size: 12.5px; color: var(--ov-title); }

/* Configuration (#view-config) */
.cf-stack { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 720px; }
.cf-card { padding-bottom: 20px; }
.cf-card .ov-sec { margin-bottom: 0; }
.campaign-list { gap: 0; }
.campaign-list-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(76px, .7fr) minmax(54px, .6fr) minmax(48px, .6fr); gap: 10px; align-items: center; }
.campaign-list-grid > :nth-child(3), .campaign-list-grid > :nth-child(4) { justify-self: end; text-align: right; white-space: nowrap; }
.campaign-list-grid > .ov-pill { justify-self: start; }
.campaign-list-head { min-height: 30px; padding: 0 6px 8px !important; border-bottom: 1px solid var(--ov-line); }
.campaign-list .ov-row { flex: none; min-height: 0; padding-top: 6px !important; padding-bottom: 6px !important; }
.campaign-list [data-campaign-select] { width: 100%; min-width: 0; padding: 6px 0 !important; }
.campaign-list [data-campaign-select] > span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cf-body { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.cf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cf-label { font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--ov-title); }
.cf-help { font-size: 11px; line-height: 1.4; color: var(--ov-meta); }
.cf-card .input.ov-input { background: var(--ov-page); }
.cf-card .input.mono { font-size: 12.5px; }
.cf-select .ic { color: var(--ov-label); }
.cf-check { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; column-gap: 12px; }
.cf-check .mb-check { margin-top: 1px; }
.cf-check-t { font-size: 13px; line-height: 1.35; color: var(--ov-title); cursor: pointer; }
.cf-check-inline { align-items: center; cursor: pointer; }
.cf-check-inline .mb-check { margin-top: 0; }
.cf-inner { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--ov-line); border-radius: 10px; background: rgba(255, 255, 255, 0.015); }
.cf-inner-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cf-inner-head h4 { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--ov-ink); }
.cf-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ov-text-2); }
.cf-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cf-warn { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid rgba(251, 191, 36, 0.2); border-radius: 8px; background: rgba(251, 191, 36, 0.07); font-size: 12px; line-height: 1.45; color: #f3d9a4; }
.cf-warn .ic { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--warn); }
.cf-actions { display: flex; justify-content: flex-end; }
.cf-save { position: relative; overflow: hidden; isolation: isolate; background: var(--grad-brand); border-color: rgba(255, 255, 255, 0.1); color: var(--ov-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.cf-save:hover { background: var(--grad-brand); border-color: rgba(255, 255, 255, 0.16); filter: brightness(1.08); }

/* Domains (#view-domains) · reuses the Configuration form and Members table */
.dm-sec .ov-sec-line { margin-right: 0; }
#dmHostsList .ov-pill { justify-self: start; }
.dm-runtime { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dm-value { display: flex; align-items: center; overflow: auto; }
.dm-inline { display: flex; gap: 8px; }
.dm-inline .input { flex: 1; min-width: 0; }
.dm-inline .btn { flex: none; }
.cf-info { border-color: rgba(52, 211, 153, 0.2); background: rgba(52, 211, 153, 0.07); color: #bfeedd; }
.cf-info .ic { color: var(--ok); }
.dm-table { margin: 12px calc(var(--ov-pad) * -1) -20px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.dm-grid { min-width: 520px; }
.dm-cols { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(110px, 1fr) 88px 88px; align-items: center; column-gap: 16px; }
.dm-row { height: 52px; min-height: 52px; }
.dm-prov { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; color: var(--ov-text-2); }

@media (max-width: 640px) {
  .dm-inline { flex-direction: column; }
  .dm-inline .input { flex: none; }
  .cf-pair, .dm-runtime { grid-template-columns: minmax(0, 1fr); }
  .cl-stats { grid-template-columns: minmax(0, 1fr); }
  .mb-search { flex: 1 1 100%; width: auto; }
  .mb-search .input, .mb-go, .mb-export { min-height: 44px; }
  .mb-go { margin-left: 0; }
  .mb-export { margin-left: 0; }
}

/* Operational detail surfaces: one responsive session sheet and mailbox. */
.mb-row { cursor: pointer; }
.mb-row:focus-visible { position: relative; z-index: 2; outline: 2px solid var(--ov-accent); outline-offset: -2px; background: var(--ov-hover); }
.ov-c-news { grid-column: 1 / -1; min-height: 96px; }
.ov-c-news #ovNews { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); column-gap: 20px; }
.cf-actions { align-items: center; flex-wrap: wrap; gap: 10px; }
#campaignForm .cf-actions, #opConfigForm .cf-actions { position: sticky; bottom: 0; z-index: 3; padding: 10px 0 2px; background: linear-gradient(180deg, rgba(14,17,23,.72), var(--ov-card) 35%); }
#mbBulkBar { position: sticky; top: 0; z-index: 4; padding: 8px 10px; border: 1px solid var(--ov-line); border-radius: 10px; background: var(--ov-elev); }
#mbBulkStatus { margin-right: auto; }
/* Live session sheet and mailbox base styles stay in CSS, not generated markup. */
#sSheet { position: fixed; inset: 0; z-index: 9000; display: none; align-items: center; justify-content: center; padding: 0; background: rgba(4,5,9,.72); backdrop-filter: blur(6px); font-family: var(--font-sans); }
.sheet-card { width: min(980px,95vw); max-height: 88vh; display: flex; flex-direction: column; border-radius: 12px; background: linear-gradient(180deg,#12141d,#0c0e15); border: 1px solid rgba(255,255,255,.09); box-shadow: 0 24px 80px rgba(0,0,0,.6); padding: 20px 22px; overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sheet-title { min-width: 0; font: 600 16px var(--font-sans); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-heading { min-width: 0; }
.sheet-title-context { margin-bottom: 3px; color: var(--ov-cap); font: 600 10px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.sheet-title .sheet-status { margin-left: 8px; vertical-align: middle; }
.sheet-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sheet-action { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--ov-line); border-radius: 6px; background: var(--ov-card); color: var(--ov-text); font: 500 12px var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer; }
.sheet-action:hover { background: var(--ov-elev); border-color: var(--line-3); color: var(--ov-ink); }
.sheet-action-primary { background: var(--ov-accent); border-color: var(--ov-accent); color: #fff; }
#sSheet .sheet-action-primary { background: var(--ok); border-color: var(--ok-line); color: #06130d; }
.sheet-action-primary:hover, #sSheet .sheet-action-primary:hover { background: #6ee7b7; border-color: var(--ok); color: #06130d; }
.sheet-action-danger { background: var(--bad-soft); border-color: var(--bad-line); color: #ffa8a8; }
.sheet-action-danger:hover { background: rgba(248,113,113,.18); border-color: var(--bad); color: #ffc2c2; }
.sheet-action-sm { min-height: 28px; padding: 0 10px; font-size: 11px; }
.session-secret { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.session-secret-label { padding-top: 7px; color: #7f8aa3; font: 500 11px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; }
.session-secret-main, .session-secret-summary { min-width: 0; }
.session-secret-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 30px; }
.session-secret-presence { color: var(--ov-text-2); font: 400 12px var(--font-sans); }
.session-secret-controls { display: inline-flex; gap: 6px; }
.session-secret-value { max-height: 180px; margin: 8px 0 0; padding: 12px; overflow: auto; border: 1px solid var(--ov-line); border-radius: 8px; background: var(--ov-page); color: var(--ov-title); font: 400 11.5px/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.session-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0 0 20px; padding: 14px; border: 1px solid var(--ov-line); border-radius: 10px; background: rgba(255,255,255,.015); }
.session-summary-item { min-width: 0; }
.session-summary-item:last-child { grid-column: 1 / -1; }
.session-summary-item dt { margin-bottom: 4px; color: var(--ov-cap); font: 600 10px var(--font-sans); letter-spacing: .07em; text-transform: uppercase; }
.session-summary-item dd { margin: 0; color: var(--ov-title); font: 400 12px/1.45 var(--font-sans); overflow-wrap: anywhere; }
.session-summary-item dd.mono { font-family: var(--font-mono); font-size: 11px; }
.session-section { margin-top: 18px; }
.session-section-title { margin: 0 0 8px; color: var(--ov-title); font: 600 12px var(--font-sans); letter-spacing: .07em; text-transform: uppercase; }
.session-authenticator { margin-top: 18px; padding: 14px; border: 1px solid var(--ov-line); border-radius: 10px; background: rgba(255,255,255,.015); }
.session-authenticator-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.session-authenticator-head p { margin: 0; color: var(--ov-meta); font: 400 11.5px var(--font-sans); }
.session-authenticator-state { flex: none; color: var(--ov-text-2); font: 500 11px var(--font-sans); }
.authenticator-box { min-width: 0; margin-top: 12px; }
.authenticator-empty > strong { color: var(--ov-title); font: 600 13px var(--font-sans); }
.authenticator-empty > p { margin: 5px 0 12px; color: var(--ov-meta); font: 400 12px/1.5 var(--font-sans); }
.authenticator-empty > label { display: block; margin-bottom: 6px; color: var(--ov-text-2); font: 500 11px var(--font-sans); }
.totp-edit-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.totp-edit-row input { flex: 1 1 240px; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--ov-line); border-radius: 6px; background: var(--ov-page); color: var(--ov-title); font: 400 11px var(--font-mono); }
.session-artifact { margin-top: 20px; border: 1px solid var(--ov-line); border-radius: 10px; background: rgba(255,255,255,.015); }
.session-artifact summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px; color: var(--ov-title); font: 600 12px var(--font-sans); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; list-style: none; }
.session-artifact summary::-webkit-details-marker { display: none; }
.session-artifact-hint { color: var(--ov-meta); font: 500 11px var(--font-sans); letter-spacing: 0; text-transform: none; }
.session-artifact-body { padding: 0 12px 12px; }
.session-artifact-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.session-artifact-note { margin-top: 12px; color: var(--ov-meta); font: 400 11px/1.5 var(--font-sans); }
.session-cookie-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.02); }
.session-danger { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--bad-line); }
.session-danger strong { color: #ffc2c2; font: 600 12px var(--font-sans); }
.session-danger p { margin: 4px 0 0; color: var(--ov-meta); font: 400 11.5px/1.45 var(--font-sans); }
.sheet-close { flex: none; width: 32px; height: 32px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: #9aa3b2; cursor: pointer; font: 400 16px var(--font-sans); }
#mbox { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 9500; display: none; flex-direction: column; background: #0a0b11; overflow: hidden; font-family: var(--font-sans); }
.mbox-layout { display: flex; height: 100%; min-height: 0; flex-direction: column; }
.mbox-bar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.08); background: #0d0f17; }
.mbox-title { font: 600 15px var(--font-sans); color: #fff; }
.mbox-id { font: 400 12px var(--font-mono); color: #7f8aa3; }
#mbClose { margin-left: auto; height: 30px; width: 30px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: #9aa3b2; cursor: pointer; }
#mbGrid { flex: 1; display: grid; grid-template-columns: 210px 380px minmax(0,1fr); min-height: 0; height: 100%; }
#mbFolders { border-right: 1px solid rgba(255,255,255,.07); padding: 14px 10px; overflow: auto; background: #0b0d14; }
#mbList { border-right: 1px solid rgba(255,255,255,.07); overflow: auto; }
#mbRead { overflow: auto; padding: 20px 24px; color: #c8d0e0; font: 400 13px var(--font-sans); display: flex; flex-direction: column; min-height: 0; height: 100%; }
.mb-folder-heading { padding: 4px 10px 10px; color: var(--ov-cap); font: 600 10px var(--font-sans); letter-spacing: .1em; text-transform: uppercase; }
.mb-folder { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 2px; border-radius: 6px; cursor: pointer; color: #9aa3b2; }
#mbFolders .mb-folder.is-active { background: rgba(99,102,241,.16); color: #fff; }
.mb-folder-label { font: 500 12px var(--font-sans); }
.mb-folder-count { margin-left: auto; font: 400 11px var(--font-mono); color: var(--ov-meta); }
#mbClose, .sheet-close { min-width: 36px; min-height: 36px; }
#mbFolders [data-folder], #mbList [data-thread] { border: 0; width: 100%; text-align: left; font: inherit; background: transparent; color: inherit; }
#mbFolders [data-folder]:focus-visible, #mbList [data-thread]:focus-visible, .sheet-actions button:focus-visible, .sheet-actions a:focus-visible, .sheet-close:focus-visible { outline: 2px solid var(--ov-accent); outline-offset: 2px; }
body.booting #app, body.booting #auth { display: none !important; }
#auth:not([hidden]) ~ #statusbar, #auth:not([hidden]) ~ #statusbar #dock { display: none; }
body.booting::after { content: 'Loading console…'; position: fixed; inset: 0; display: grid; place-items: center; color: var(--fg-2); font: 500 13px var(--font-sans); letter-spacing: .02em; background: var(--canvas); }

@media (max-width: 900px) {
  #mbGrid { grid-template-columns: 170px minmax(260px, 1fr); grid-template-rows: minmax(220px, 42vh) minmax(0, 1fr); overflow: auto; }
  #mbRead { grid-column: 1 / -1; grid-row: 2; height: auto; min-height: 320px; }
}

@media (max-width: 640px) {
  .ov-c-news { grid-column: 1 / -1; }
  .cf-actions { justify-content: stretch; }
  .cf-actions .btn { min-height: 40px; }
  #campaignForm .cf-actions, #opConfigForm .cf-actions { padding-bottom: 8px; }
  #mbBulkBar { align-items: stretch; }
  #mbBulkBar .btn { flex: 1 1 120px; min-height: 40px; }
  #sSheet { padding: 0; }
  #sSheet > .sheet-card { width: 100vw; height: 100dvh; max-height: 100dvh; padding: 14px; border-radius: 0; overflow-y: auto; }
  #sSheet .sheet-head { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: start; }
  #sSheet .sheet-heading { grid-column: 1; grid-row: 1; min-width: 0; }
  #sSheet .sheet-close { grid-column: 2; grid-row: 1; width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  #sSheet .sheet-actions { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; width: 100%; margin-left: 0; }
  #sSheet .sheet-actions > * { flex: 1 1 calc(50% - 8px); min-width: 120px; min-height: 44px; }
  #sSheetBody { min-height: 0; overflow: visible; }
  #sSheet table { display: block; overflow-x: auto; }
  #mbGrid { display: flex; flex-direction: column; overflow-y: auto; height: auto; }
  #mbFolders { display: flex; flex: none; gap: 4px; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07); min-height: 52px; padding: 8px; }
  #mbFolders > div:first-child { display: none; }
  #mbFolders [data-folder] { flex: none; width: auto; min-height: 36px; white-space: nowrap; }
  #mbList { flex: none; min-height: 240px; max-height: 38vh; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07); }
  #mbRead { flex: none; width: 100%; min-height: 420px; height: auto; padding: 16px; overflow: visible; }
  #mbRead iframe { min-height: 360px; }
  #mbClose { width: 40px; height: 40px; }

  /* Sessions become record cards instead of an 860px horizontal table. */
  #view-table .mb-scroll { overflow-x: hidden; }
  #view-table .mb-grid { width: 100%; min-width: 0; }
  #view-table .mb-head { display: none; }
  #view-table .mb-row.mb-cols {
    grid-template-columns: 20px minmax(0, 1fr) auto 28px;
    grid-template-areas: "pick member member actions" ". mfa status status" ". access created created";
    column-gap: 10px;
    row-gap: 12px;
    width: 100%;
    height: auto;
    min-height: 118px;
    padding: 14px 16px;
  }
  #view-table .mb-row > [role="cell"]:nth-child(1) { grid-area: pick; align-self: start; margin-top: 4px; }
  #view-table .mb-row > [role="cell"]:nth-child(2) { grid-area: member; }
  #view-table .mb-row > [role="cell"]:nth-child(3) { grid-area: mfa; }
  #view-table .mb-row > [role="cell"]:nth-child(4) { grid-area: access; }
  #view-table .mb-row > [role="cell"]:nth-child(5) { grid-area: created; }
  #view-table .mb-row > [role="cell"]:nth-child(6) { grid-area: status; }
  #view-table .mb-row > [role="cell"]:nth-child(7) { grid-area: actions; }
  #view-table .mb-row > [role="cell"]:nth-child(n+3):nth-child(-n+5) { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12px; color: var(--ov-text-2); }
  #view-table .mb-row > [role="cell"]:nth-child(n+3):nth-child(-n+5)::before { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ov-cap); }
  #view-table .mb-row > [role="cell"]:nth-child(3)::before { content: "MFA"; }
  #view-table .mb-row > [role="cell"]:nth-child(4)::before { content: "Access"; }
  #view-table .mb-row > [role="cell"]:nth-child(5)::before { content: "Last activity"; }
  #view-table .mb-row .ov-pill { height: 22px; font-size: 11px; }
  #view-table .mb-row .mb-pills { flex-direction: row; justify-content: flex-end; }
  #view-table .mb-row .mb-act { opacity: 1; }
  #view-table #mbStatus { height: 44px; }
  #view-table #mbStatus button { height: 44px; min-width: 56px; }
  #view-table #purgeBtn { height: 44px; min-height: 44px; padding: 0 14px; }
}

@media (min-width: 1100px) {
  #opConfigForm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; max-width: none; }
  #opConfigForm > section { grid-column: auto; grid-row: auto; align-self: start; }
  #opConfigForm > section > .cf-body.cf-pair { grid-template-columns: minmax(0, 1fr); }
  #opConfigForm > .cf-actions { grid-column: 1 / -1; }
  #view-domains .cf-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; max-width: none; }
  #view-domains .cf-stack > :first-child, #view-domains .cf-stack > :last-child { grid-column: 1 / -1; }
}

@media (min-width: 1400px) {
  #view-campaigns .cl-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
  #view-campaigns .cl-stat { padding-left: 16px; padding-right: 16px; }
  #view-campaigns .cf-stack { max-width: none; }
}

#redirectOpenForm .cf-pair { grid-template-columns: minmax(0, 1fr) auto; }
.danger-btn { color: #ff8a8c; border-color: rgba(255,77,79,.3); background: rgba(255,77,79,.08); }
.danger-btn:hover { color: #ffb0b3; border-color: rgba(255,77,79,.5); background: rgba(255,77,79,.14); }

@media (min-width: 761px) {
  .redirect-layout { grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr); align-items: start; }
  .redirect-layout > #redirectChainForm { grid-column: 1; grid-row: 1; }
  .redirect-layout > #redirectOpenForm { grid-column: 1; grid-row: 2; }
  .redirect-layout > section { grid-column: 2; grid-row: 1 / span 2; }
}

@media (min-width: 1024px) and (max-height: 1100px) {
  #view-overview { padding-top: 16px; }
  #view-overview .ov-page, #view-overview .ov-grid { gap: 12px; }
  #view-overview .ov-stat { padding-top: 12px; padding-bottom: 18px; }
  #view-overview .ov-stat .ov-num { margin-top: 10px; }
  #view-overview .ov-stat .ov-cap { margin-top: 6px; }
  #view-overview .ov-c-news { padding-top: 12px; padding-bottom: 12px; }
}

/* Shared admin tables, empty states, and narrow-screen record cards. */
.data-table { width: 100%; border-collapse: collapse; color: var(--ov-text); font: 400 12px/1.45 var(--font-sans); }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--ov-line); color: var(--ov-label); font: 600 10px/1.2 var(--font-sans); letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--ov-row-line); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--ov-hover); }
.data-table td strong { color: var(--ov-title); font-weight: 600; }
.data-primary { display: grid; gap: 3px; min-width: 0; }
.data-primary > * { overflow-wrap: anywhere; }
.data-table td code { color: var(--ov-text-2); font: 400 11px/1.5 var(--font-mono); white-space: normal; overflow-wrap: anywhere; }
.data-table .channel-actions { flex-wrap: wrap; }
.empty-state { padding: 24px; border: 1px solid var(--ov-line); border-radius: var(--ov-r-card); background: var(--ov-card); color: var(--ov-text-2); font: 400 13px/1.55 var(--font-sans); }
.dm-host-main { min-width: 0; overflow-wrap: anywhere; }
.dm-host-actions { white-space: nowrap; }
@media (max-width: 640px) {
  .data-table { min-width: 0; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { margin-bottom: 10px; border: 1px solid var(--ov-line); border-radius: var(--ov-r-chip); background: var(--ov-page); overflow: hidden; }
  .data-table tr:last-child { margin-bottom: 0; }
  .data-table td { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 9px 11px; border: 0; text-align: right; white-space: normal; overflow-wrap: anywhere; }
  .data-table td::before { content: attr(data-label); flex: none; max-width: 45%; color: var(--ov-label); font: 600 10px/1.4 var(--font-sans); letter-spacing: .06em; text-align: left; text-transform: uppercase; }
  .data-table td > * { min-width: 0; }
  .data-table td .data-primary { text-align: right; }
  .data-table td .channel-actions { justify-content: flex-end; }
  .data-table td.data-table-empty { justify-content: center; text-align: center; }
  .data-table td.data-table-empty::before { content: none; }
  #dmHostsList .dm-host-row { grid-template-columns: minmax(0, 1fr) auto !important; gap: 10px 12px !important; padding: 14px 6px !important; }
  #dmHostsList .dm-host-main { grid-column: 1 / -1; white-space: normal; }
  #dmHostsList .dm-host-row > .ov-pill { justify-self: start; }
  #dmHostsList .dm-host-row > .ov-mono { justify-self: end; }
  #dmHostsList .dm-host-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; white-space: normal; }
  #dmHostsList .dm-host-actions .btn { min-height: 40px; }
  .campaign-event-head { display: none !important; }
  .campaign-event-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px 14px !important; margin: 0; padding: 14px 6px !important; }
  .campaign-event-row > * { min-width: 0; }
  .campaign-event-identity { grid-column: 1 / -1; order: -1; white-space: normal; overflow-wrap: anywhere; }
  .campaign-event-action { grid-column: 1 / -1; text-align: left !important; }
  .campaign-event-action .btn { min-height: 40px; }
}

.channel-events { display: grid; gap: 8px; margin: 4px 0; padding: 0; border: 0; }
.channel-list { display: grid; gap: 8px; margin-top: 14px; }
.channel-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ov-line); }
.channel-row strong { display: block; color: var(--ov-title); font-size: 12px; }
.channel-row .cf-help { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.channel-actions { display: flex; flex: none; gap: 8px; }

#dmRotateNow { margin-top: 12px; }

.guard-list { height: auto; min-height: 84px; padding-top: 10px; resize: vertical; }

#op2faEnroll:not([hidden]), #op2faDisable:not([hidden]) { display: grid; gap: 12px; margin-top: 14px; }
.op-2fa-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: center; gap: 16px; }
.op-2fa-qr { display: grid; place-items: center; width: 160px; height: 160px; padding: 8px; border-radius: 10px; background: #fff; }
.op-2fa-qr svg { display: block; width: 100%; height: auto; }
@media (max-width: 640px) { .op-2fa-grid { grid-template-columns: 1fr; } .op-2fa-qr { margin: 0 auto; } }

.simple-ui .simple-hidden { display: none !important; }
.mail-tools-off #view-domains .cf-stack > [aria-labelledby="dmHostsH"] { grid-column: 1 / -1; }

.basic-hidden { display: none !important; }

#navAccounts[hidden], #navAudit[hidden], #opApiKeySection[hidden] { display: none !important; }

/* Temporary outbound-delivery switch: remove mail-tools-off from <body> to restore. */
.mail-tools-off .mail-tool { display: none !important; }
.mail-tools-off .landing-only { grid-template-columns: minmax(0, 1fr); }

@supports (height: 100dvh) {
  .app, .main { height: calc(100dvh - var(--status-h)); }
  #view-overview:not([hidden]), #view-table:not([hidden]), #view-states:not([hidden]), #view-config:not([hidden]), #view-domains:not([hidden]) {
    min-height: calc(100dvh - var(--status-h) - var(--topbar-h));
  }
}

/* Final panel-wide readability and narrow-screen polish. */
#helpPop { background: var(--solid-2); }
.keys .kbd { min-width: 22px; font-size: 11px; font-weight: 650; }
.key-alt { color: var(--fg-2); font: 500 11px var(--font-sans); }
.pal-list { max-height: min(620px, calc(100dvh - 260px)); padding-bottom: 12px; scroll-padding-bottom: 12px; scrollbar-gutter: stable; }
#campaignForm .cf-actions { width: 100%; }
#campaignSave { margin-left: auto; }
#campaignSave, #opConfigSave { border-color: var(--ov-accent); background: var(--ov-accent); color: #fff; }
#campaignSave:hover, #opConfigSave:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.cf-help { font-size: 11.5px; line-height: 1.5; color: var(--ov-meta); }
.cf-card .input { color: var(--ov-title); -webkit-text-fill-color: var(--ov-title); opacity: 1; }
.cf-card .input::placeholder { color: var(--ov-meta); opacity: 1; }
.ov-label { font-size: 10.5px; }
.ov-cap, .ov-sec-meta, .ov-sync, .ov-act-m, .ov-time, .mb-ref, .mb-l2 { font-size: 11.5px; }
.ov-eyebrow { font-size: 10.5px; }
#view-overview .ov-page { padding-bottom: 16px; }
#sSheetBody td, #sSheetBody [style*="font:400 11px"], #sSheetBody [style*="font:500 11px"] { font-size: 11.5px !important; }
@media (max-width: 640px) {
  .topbar { height: auto; min-height: var(--topbar-h); padding-top: 8px; padding-bottom: 8px; }
  .topbar .icon-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .tb-sub { display: block; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.3; -webkit-line-clamp: unset; }
  #view-table .mb-name { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
  #view-table .mb-member { align-items: flex-start; }
  #view-table .mb-av, #view-table .mb-c-act { flex: none; }
  #sSheet .sheet-title { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
  #sSheet .session-totp-line { flex-wrap: wrap; }
  #sSheet .session-totp-line > div:first-child { width: 100% !important; }
  #sSheet .totp-edit-row { flex-direction: column; align-items: stretch !important; }
  #sSheet .totp-edit-row input { width: 100%; min-width: 0 !important; height: 44px !important; flex: 1 1 auto !important; }
  #sSheet .totp-edit-row button, #sSheet .totp-code-row button { min-width: 44px; min-height: 44px; }
  #sSheet .session-secret-controls .sheet-action, #sSheet .session-artifact-actions .sheet-action, #sSheet .session-danger .sheet-action { min-width: 44px; min-height: 44px; }
  #sSheet .session-danger { flex-direction: column; align-items: stretch; }
  #sSheet .totp-code-row { flex-wrap: wrap; }
  #campaignForm .cf-actions { justify-content: stretch; }
  #campaignSave { width: 100%; margin-left: 0; }
}

/* Live activity map — native SVG motion with real session/event data. */
.live-map-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 2px 0 14px; }
.live-map-metric { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px 12px; border: 1px solid var(--ov-line); border-radius: 9px; background: rgba(255,255,255,.015); }
.live-map-metric strong { color: var(--ov-title); font: 600 17px var(--font-sans); letter-spacing: -.02em; }
.live-map-metric:first-child strong { color: var(--ok); }
.live-map-metric span { overflow: hidden; color: var(--ov-meta); font: 500 10px var(--font-sans); letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.live-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; align-items: stretch; }
.live-map-card .map-stage { display: block; min-height: 240px; padding: 0; overflow: hidden; border: 0; border-radius: 12px; background: transparent; }
.live-map-card .map-svg { border: 1px solid var(--ov-line); border-radius: 12px; background: #080d12; }
.live-map-feed { max-height: 420px; padding: 8px 12px; overflow: auto; border: 1px solid var(--ov-line); border-radius: 12px; background: var(--ov-page); }
.live-country { padding: 10px 2px; border-bottom: 1px solid var(--ov-row-line); }
.live-country:last-child { border-bottom: 0; }
.live-country-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.live-country-code { display: inline-flex; align-items: center; gap: 7px; color: var(--ov-title); font: 600 12px var(--font-sans); letter-spacing: .06em; }
.live-country-top strong { color: var(--ov-text-2); font: 550 11px var(--font-sans); white-space: nowrap; }
.live-country.has-live .live-country-top strong { color: var(--ok); }
.live-country-meta, .live-country-time, .live-country-empty { color: var(--ov-meta); font: 400 10.5px/1.5 var(--font-sans); }
.live-country-meta { margin-top: 4px; }
.live-country-time { margin-top: 4px; }
.live-country-track { height: 3px; margin-top: 8px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.06); }
.live-country-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(52,211,153,.35), var(--ok)); }
.live-map-foot { margin-top: 10px; color: var(--ov-meta); font: 400 10.5px/1.45 var(--font-sans); }
.map-grid-line { fill: none; stroke: rgba(255,255,255,.035); stroke-width: 1; }
.live-map-card .md { stroke: rgba(143,167,174,.2); }
.live-map-card .md.hot { stroke: rgba(52,211,153,.34); }
.map-flow { fill: none; stroke: rgba(52,211,153,.28); stroke-width: 1.1; stroke-dasharray: 3 7; animation: map-dash 5s linear infinite; }
.map-packet, .map-satellite { fill: #6ee7b7; filter: drop-shadow(0 0 3px #34d399); pointer-events: none; }
.map-satellite { fill: #d1fae5; }
.map-node-halo { fill: rgba(52,211,153,.08); }
.map-node-ring { fill: none; stroke: var(--ok); stroke-width: 1.2; opacity: .6; transform-box: fill-box; transform-origin: center; animation: map-node-pulse 2.8s ease-out infinite; }
.map-node-ring.secondary { opacity: .35; }
.map-node-core { fill: var(--ok); stroke: #baf7dd; stroke-width: 1; filter: drop-shadow(0 0 4px rgba(52,211,153,.75)); }
.live-point.no-live .map-node-core { fill: #8c93a8; stroke: #c4cad6; filter: none; }
.live-point.no-live .map-node-ring, .live-point.no-live .map-node-halo { stroke: #8c93a8; fill: rgba(140,147,168,.06); }
.live-point.is-fresh .map-node-core { fill: #6ee7b7; }
.map-node-label { fill: #c4cad6; font: 600 9px var(--font-sans); letter-spacing: .035em; paint-order: stroke; stroke: #080d12; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.live-point:focus { outline: none; }
.live-point:focus .map-node-core, .live-point:hover .map-node-core { stroke: #fff; stroke-width: 2; }
.map-scan { pointer-events: none; opacity: .55; animation: map-sweep 11s linear infinite; }
.live-map-empty .empty-ring { fill: rgba(52,211,153,.06); stroke: rgba(52,211,153,.3); animation: empty-map-pulse 3s ease-in-out infinite; }
.live-map-empty .empty-core { fill: var(--ok); }
.live-map-empty .empty-title { fill: var(--ov-title); font: 600 13px var(--font-sans); }
.live-map-empty .empty-sub { fill: var(--ov-meta); font: 400 10.5px var(--font-sans); }
@keyframes map-dash { to { stroke-dashoffset: -40; } }
@keyframes map-sweep { from { transform: translateX(0); } to { transform: translateX(var(--map-travel)); } }
@keyframes map-node-pulse { 0% { transform: scale(.65); opacity: .65; } 80%,100% { transform: scale(2.2); opacity: 0; } }
@keyframes empty-map-pulse { 50% { opacity: .35; } }
@media (max-width: 900px) {
  .live-map-layout { grid-template-columns: minmax(0, 1fr); }
  .live-map-feed { max-height: 280px; }
}
@media (max-width: 640px) {
  .live-map-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-map-metric { padding: 9px 10px; }
  .live-map-metric strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .map-flow, .map-node-ring, .map-scan, .live-map-empty .empty-ring { animation: none !important; }
  .map-packet { display: none; }
}

/* Live mailbox workspace — uses the same surface system as the panel. */
#mbox { background: var(--ov-page); color: var(--ov-text); }
.mbox-bar { flex: none; height: 76px; padding: 0 24px; gap: 18px; background: var(--ov-card); border-bottom: 1px solid var(--ov-line); }
.mbox-brand { display: flex; align-items: center; gap: 12px; flex: none; }
.mbox-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: var(--ov-r-chip); background: var(--ov-elev); color: var(--ov-title); font: 700 16px var(--font-sans); box-shadow: var(--ov-hi); }
.mbox-title { color: var(--ov-ink); font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.mbox-subtitle { margin-top: 2px; color: var(--ov-meta); font: 500 10px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; }
.mbox-id { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ov-text-2); font-size: 12px; }
.mbox-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.mb-action { min-height: 34px; padding: 7px 12px; border: 1px solid var(--ov-line); border-radius: var(--ov-r-chip); background: var(--ov-card); color: var(--ov-text); cursor: pointer; font: 550 11px var(--font-sans); transition: background .16s,border-color .16s,color .16s; }
.mb-action:hover { background: var(--ov-elev); border-color: var(--line-3); color: var(--ov-ink); }
.mb-action:disabled { opacity: .62; cursor: wait; }
.mb-action-primary { border-color: var(--ov-accent); background: var(--ov-accent); color: #fff; font-weight: 650; }
.mb-action-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: #fff; }
.mb-action-primary.is-copied { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }
#mbClose.mb-close { flex: none; width: 34px; height: 34px; margin-left: 0; border: 1px solid var(--ov-line); border-radius: var(--ov-r-chip); background: transparent; color: var(--ov-meta); cursor: pointer; }
#mbClose.mb-close:hover { color: var(--ov-ink); border-color: var(--line-3); background: var(--ov-hover); }
.mbox-sessionbar { display: flex; align-items: center; flex: none; min-height: 34px; gap: 7px; padding: 0 24px; background: var(--ov-page); border-bottom: 1px solid var(--ov-line); color: var(--ov-meta); font: 500 11px var(--font-sans); }
.mbox-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok-glow); }
.mbox-session-separator { color: var(--ov-label); }
.mbox-session-note { margin-left: auto; color: var(--ov-meta); }
#mbGrid { gap: 12px; padding: 14px 16px 16px; background: var(--ov-page); }
#mbFolders, #mbList, #mbRead { border: 1px solid var(--ov-line); border-radius: var(--ov-r-card); background: var(--ov-card); overflow: auto; }
#mbFolders { padding: 14px 10px; background: var(--ov-page); }
#mbList { background: var(--ov-card); }
#mbRead { padding: 24px; background: var(--ov-page); }
.mb-folder-heading { padding: 4px 10px 12px; color: var(--ov-label); }
.mb-folder { min-height: 36px; margin-bottom: 4px; padding: 9px 10px; border-radius: var(--ov-r-chip); color: var(--ov-text); transition: background .15s,color .15s; }
.mb-folder:hover { background: var(--ov-hover); color: var(--ov-ink); }
#mbFolders .mb-folder.is-active { background: var(--accent-wash); color: var(--ov-ink); }
.mb-folder-count { color: var(--ov-meta); }
.mb-list-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--ov-line); background: var(--ov-card); color: var(--ov-label); font: 600 10px var(--font-sans); letter-spacing: .05em; text-transform: uppercase; }
.mb-thread { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 12px; width: 100%; min-height: 88px; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--ov-row-line); background: transparent; color: inherit; text-align: left; cursor: pointer; transition: background .14s,box-shadow .14s; }
.mb-thread:hover { background: var(--ov-hover); }
.mb-thread[aria-selected="true"] { background: var(--accent-wash); box-shadow: inset 2px 0 var(--ov-accent); }
.mb-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--ov-line); border-radius: var(--ov-r-chip); background: var(--ov-elev); color: var(--ov-title); font: 700 12px var(--font-sans); }
.mb-thread-main { display: block; min-width: 0; }
.mb-thread-top { display: flex; align-items: baseline; gap: 8px; }
.mb-sender { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ov-title); font: 500 12.5px var(--font-sans); }
.mb-thread.is-unread .mb-sender, .mb-thread.is-unread .mb-subject { color: var(--ov-ink); font-weight: 650; }
.mb-date { flex: none; margin-left: auto; color: var(--ov-meta); font: 400 10.5px var(--font-mono); }
.mb-subject, .mb-preview { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-subject { margin-top: 4px; color: var(--ov-text); font: 500 12.5px var(--font-sans); }
.mb-preview { margin-top: 4px; color: var(--ov-meta); font: 400 12px var(--font-sans); }
.mb-unread { width: 7px; height: 7px; margin-top: 10px; border-radius: 50%; background: var(--ov-accent); }
.mb-attachment { display: inline-block; margin-top: 7px; padding: 2px 6px; border: 1px solid var(--ov-line); border-radius: var(--ov-r-chip); background: var(--ov-elev); color: var(--ov-text-2); font: 550 10px var(--font-sans); }
.mb-message-card { width: min(920px,100%); min-height: 0; margin: 0 auto; padding: 28px; border: 1px solid var(--ov-line); border-radius: var(--ov-r-card); background: var(--ov-card); color: var(--ov-text); box-shadow: var(--shadow-card); }
.mb-message-kicker { color: var(--accent-ink); font: 700 10px var(--font-sans); letter-spacing: .09em; text-transform: uppercase; }
.mb-message-subject { margin: 8px 0 24px; color: var(--ov-ink); font: 600 24px/1.25 var(--font-display); letter-spacing: -.025em; }
.mb-message-meta { display: flex; align-items: center; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid var(--ov-line); }
.mb-message-avatar { width: 38px; height: 38px; }
.mb-message-address { display: grid; min-width: 0; gap: 2px; }
.mb-message-address strong { color: var(--ov-title); font: 600 12px var(--font-sans); }
.mb-message-address span, .mb-message-address small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ov-meta); font: 400 12px var(--font-sans); }
.mb-message-date { margin-left: auto; color: var(--ov-meta); font: 400 10.5px var(--font-mono); }
.mb-message-body { min-height: 360px; margin: 22px -28px -28px; border-top: 1px solid var(--ov-line); }
.mb-message-frame { display: block; width: 100%; min-height: 46vh; height: 100%; border: 0; background: var(--ov-card); }
.mb-message-plain { padding: 24px; white-space: pre-wrap; color: var(--ov-text); font: 400 13px/1.6 var(--font-sans); }
#mbox .mb-loading, #mbox .mb-empty { display: flex; min-height: 220px; align-items: center; justify-content: center; flex-direction: column; gap: 10px; padding: 32px; text-align: center; color: var(--ov-meta); }
#mbox .mb-empty strong { color: var(--ov-title); font: 600 14px var(--font-sans); }
#mbox .mb-empty span { max-width: 340px; font: 400 12px/1.5 var(--font-sans); }
#mbox .mb-empty .mb-action { margin-top: 8px; }
#mbox .mb-error strong { color: var(--bad); }
#mbox .mb-spinner { width: 22px; height: 22px; border: 2px solid var(--line-3); border-top-color: var(--accent-ink); border-radius: 50%; animation: mb-spin .7s linear infinite; }
@keyframes mb-spin { to { transform: rotate(360deg); } }
#mbFolders [data-folder]:focus-visible, #mbList [data-thread]:focus-visible, .mb-action:focus-visible, #mbClose:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

@media (max-width: 900px) {
  .mbox-id { display: none; }
  .mb-message-date { display: none; }
  #mbRead { padding: 18px; }
  .mb-message-card { padding: 22px; }
  .mb-message-body { margin: 20px -22px -22px; }
}
@media (max-width: 640px) {
  .mbox-bar { height: auto; min-height: 70px; flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .mbox-actions { width: 100%; margin-left: 0; }
  .mb-action { flex: 1; min-height: 38px; }
  #mbClose.mb-close { width: 38px; height: 38px; }
  .mbox-sessionbar { padding: 0 14px; }
  .mbox-session-note { display: none; }
  #mbGrid { padding: 10px; gap: 10px; }
  #mbRead { padding: 12px; }
  .mb-message-card { padding: 18px; border-radius: 12px; }
  .mb-message-subject { font-size: 20px; }
  .mb-message-body { margin: 18px -18px -18px; }
}

/* Mailbox readability and attachment polish. */
.mb-message-body { min-height: 360px; }
.mb-message-frame { min-height: 46vh; }
.mb-attachments { padding: 18px 0 0; }
.mb-attachments > strong { display: block; margin-bottom: 10px; color: var(--ov-title); font: 650 11px var(--font-sans); }
.mb-attachments > span { color: var(--ov-meta); font: 400 12px var(--font-sans); }
.mb-attachment-files { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-attachment-file { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 9px 11px; border: 1px solid var(--ov-line); border-radius: var(--ov-r-chip); background: var(--ov-elev); color: var(--accent-ink); text-decoration: none; font: 550 11px var(--font-sans); }
.mb-attachment-file:hover { border-color: var(--ov-accent-30); background: var(--accent-wash); }
.mb-attachment-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-attachment-file small { flex: none; color: var(--ov-meta); font: 400 10px var(--font-mono); }

/* Help center — task-first, searchable, and fully responsive. */
.faq-help-link { width: calc(100% - 20px); margin: 10px; }
.faq-page { width: min(1180px, 100%); margin: 0 auto; gap: 22px; }
.faq-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 30px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--accent-line); border-radius: 18px; background: radial-gradient(circle at 88% 15%, rgba(34, 211, 238, .12), transparent 35%), radial-gradient(circle at 15% 0%, rgba(139, 92, 246, .18), transparent 44%), linear-gradient(145deg, rgba(18, 18, 34, .96), rgba(8, 10, 18, .94)); box-shadow: var(--shadow-card); overflow: hidden; }
.faq-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--edge-brand); }
.faq-hero-copy { min-width: 0; }
.faq-hero h2 { margin: 10px 0 0; color: var(--fg-0); font: 650 clamp(28px, 4vw, 40px)/1.08 var(--font-display); letter-spacing: -.035em; }
.faq-hero-copy > p { max-width: 650px; margin: 13px 0 0; color: var(--fg-1); font: 400 14px/1.65 var(--font-sans); }
.faq-hero-mark { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 18px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; background: rgba(255, 255, 255, .025); color: var(--accent-ink); text-align: center; }
.faq-hero-mark > .ic { width: 62px; height: 62px; stroke-width: 1; color: var(--cyan); filter: drop-shadow(0 0 20px rgba(34, 211, 238, .24)); }
.faq-hero-mark span { color: var(--fg-1); font: 500 12px/1.55 var(--font-sans); }
.faq-search { display: flex; align-items: center; gap: 12px; max-width: 690px; min-height: 54px; margin-top: 24px; padding: 0 15px; border: 1px solid var(--line-3); border-radius: 12px; background: rgba(3, 4, 9, .64); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 14px 40px -24px rgba(0, 0, 0, .9); }
.faq-search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-wash); }
.faq-search > .ic { flex: none; color: var(--accent-ink); }
.faq-search .input { flex: 1; min-width: 0; height: 52px; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; color: var(--fg-0); font: 400 14px var(--font-sans); }
.faq-search .input::placeholder { color: var(--fg-2); opacity: 1; }
.faq-result-row { display: flex; align-items: center; gap: 12px; min-height: 32px; margin-top: 10px; color: var(--fg-2); font: 500 11px var(--font-sans); }
.faq-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.faq-quick { display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; align-items: center; gap: 12px; min-width: 0; min-height: 92px; padding: 16px; border: 1px solid var(--ov-line); border-radius: 13px; background: var(--ov-card); color: var(--ov-text); text-align: left; cursor: pointer; transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease; }
.faq-quick:hover { transform: translateY(-2px); border-color: var(--accent-line); background: var(--accent-wash); }
.faq-quick-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
.faq-quick-icon .ic { width: 19px; height: 19px; }
.faq-quick strong, .faq-quick small { display: block; min-width: 0; }
.faq-quick strong { color: var(--ov-title); font: 600 13px/1.35 var(--font-sans); }
.faq-quick small { margin-top: 5px; color: var(--ov-meta); font: 400 11px/1.45 var(--font-sans); }
.faq-quick-arrow { color: var(--ov-meta); }
.faq-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 22px; }
.faq-sidebar { position: sticky; top: 20px; min-width: 0; }
.faq-side-label { margin: 0 0 10px 4px; color: var(--ov-label); font: 600 10px var(--font-sans); letter-spacing: .1em; text-transform: uppercase; }
.faq-categories { display: flex; flex-direction: column; gap: 5px; }
.faq-category { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ov-meta); text-align: left; cursor: pointer; font: 500 12px var(--font-sans); }
.faq-category .ic { width: 16px; height: 16px; flex: none; }
.faq-category:hover { background: var(--ov-hover); color: var(--ov-title); }
.faq-category[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-wash); color: var(--accent-ink); }
.faq-side-tip { margin-top: 18px; padding: 16px; border: 1px solid var(--ov-line); border-radius: 12px; background: var(--ov-card); }
.faq-side-tip > .ic { color: var(--cyan); }
.faq-side-tip strong { display: block; margin-top: 10px; color: var(--ov-title); font: 600 12px var(--font-sans); }
.faq-side-tip p { margin: 7px 0 13px; color: var(--ov-meta); font: 400 11px/1.55 var(--font-sans); }
.faq-content, .faq-items { min-width: 0; }
.faq-items { display: flex; flex-direction: column; gap: 9px; }
.faq-item { min-width: 0; border: 1px solid var(--ov-line); border-radius: 12px; background: var(--ov-card); overflow: hidden; transition: border-color 150ms ease, background-color 150ms ease; }
.faq-item[open] { border-color: var(--accent-line); background: linear-gradient(150deg, var(--accent-wash), var(--ov-card) 42%); }
.faq-item summary { display: grid; grid-template-columns: 36px minmax(0, 1fr) 20px; align-items: center; gap: 13px; min-height: 74px; padding: 13px 18px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover .faq-question strong { color: var(--accent-ink); }
.faq-question-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--ov-line); border-radius: 9px; background: rgba(255, 255, 255, .025); color: var(--ov-meta); }
.faq-item[open] .faq-question-icon { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.faq-question-icon .ic { width: 17px; height: 17px; }
.faq-question { min-width: 0; }
.faq-question strong { display: block; color: var(--ov-title); font: 550 13.5px/1.45 var(--font-sans); transition: color 120ms ease; }
.faq-question small { display: block; margin-top: 3px; color: var(--ov-meta); font: 400 10.5px var(--font-sans); }
.faq-chevron { color: var(--ov-meta); transition: transform 160ms ease; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); color: var(--accent-ink); }
.faq-answer { padding: 0 24px 22px 67px; color: var(--ov-text); font: 400 12.5px/1.7 var(--font-sans); overflow-wrap: anywhere; }
.faq-answer p { margin: 0 0 12px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer strong { color: var(--ov-title); font-weight: 600; }
.faq-answer code { padding: 2px 5px; border: 1px solid var(--ov-line); border-radius: 4px; background: rgba(0, 0, 0, .24); color: var(--accent-ink); font: 500 11px var(--font-mono); }
.faq-list { margin: 0 0 14px; padding-left: 20px; }
.faq-list li { margin: 5px 0; padding-left: 3px; }
.faq-steps { margin: 4px 0 16px; padding: 0; list-style: none; counter-reset: faq-step; }
.faq-steps li { position: relative; min-height: 28px; margin: 0; padding: 3px 0 12px 38px; counter-increment: faq-step; }
.faq-steps li::before { content: counter(faq-step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--accent-line); border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font: 600 11px var(--font-mono); }
.faq-steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 0; width: 1px; background: var(--accent-line); }
.faq-note { margin: 13px 0; padding: 12px 14px; border-left: 2px solid var(--cyan); border-radius: 0 8px 8px 0; background: rgba(34, 211, 238, .055); }
.faq-note strong { display: block; color: var(--cyan); font-size: 11px; }
.faq-note p { margin: 4px 0 0; color: var(--ov-text); font-size: 11.5px; }
.faq-inline-action { margin-top: 4px; }
.faq-inline-action .ic { transform: rotate(-90deg); }
.faq-command { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; padding: 10px 10px 10px 14px; border: 1px solid var(--ov-line); border-radius: 9px; background: rgba(2, 3, 7, .62); }
.faq-command code { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: #a5f3fc; white-space: pre-wrap; word-break: break-word; font: 500 11px/1.6 var(--font-mono); }
.faq-command .btn { flex: none; }
.faq-command .ic { width: 14px; height: 14px; }
.faq-empty { padding: 58px 20px; border: 1px dashed var(--ov-line); border-radius: 12px; text-align: center; }
.faq-empty > .ic { width: 34px; height: 34px; color: var(--ov-meta); }
.faq-empty h3 { margin: 14px 0 6px; color: var(--ov-title); font: 600 16px var(--font-sans); }
.faq-empty p { max-width: 430px; margin: 0 auto 18px; color: var(--ov-meta); font: 400 12px/1.6 var(--font-sans); }
@media (max-width: 1100px) {
  .faq-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .faq-hero { grid-template-columns: minmax(0, 1fr) 160px; padding: 26px; }
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .faq-sidebar { position: static; }
  .faq-categories { flex-direction: row; flex-wrap: wrap; }
  .faq-category { width: auto; flex: 1 1 150px; }
  .faq-side-tip { display: none; }
}
@media (max-width: 640px) {
  .faq-page { gap: 16px; }
  .faq-hero { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; border-radius: 14px; }
  .faq-hero-mark { display: none; }
  .faq-hero h2 { font-size: 29px; }
  .faq-hero-copy > p { font-size: 12.5px; }
  .faq-search { min-height: 52px; margin-top: 20px; padding: 0 12px; }
  .faq-search .input { font-size: 16px; }
  .faq-result-row .btn, .faq-empty .btn { min-height: 44px; }
  .faq-search .kbd { display: none; }
  .faq-quick-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .faq-quick { min-height: 78px; padding: 13px; }
  .faq-layout { gap: 15px; }
  .faq-category { flex: 1 1 calc(50% - 5px); min-width: 0; padding: 9px 10px; font-size: 11px; }
  .faq-item summary { grid-template-columns: 32px minmax(0, 1fr) 18px; gap: 10px; min-height: 70px; padding: 12px; }
  .faq-question-icon { width: 32px; height: 32px; }
  .faq-question strong { font-size: 12.5px; }
  .faq-answer { padding: 0 14px 18px; font-size: 12px; }
  .faq-command { align-items: stretch; flex-direction: column; }
  .faq-command .btn { width: 100%; min-height: 44px; }
  .faq-inline-action { width: 100%; min-height: 44px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .faq-quick, .faq-chevron, .faq-item, .faq-question strong { transition: none; }
  .faq-quick:hover { transform: none; }
}



/* OGG session-detail polish: layered header, compact navigation and real-data cards. */
#sSheet > .sheet-card {
  position: relative;
  width: min(800px, calc(100vw - 48px));
  max-height: calc(100dvh - var(--topbar-h) - var(--status-h) - 28px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-5);
  background: linear-gradient(180deg, rgba(17, 18, 30, .99), rgba(8, 10, 16, .99));
  box-shadow: var(--shadow-pop), 0 0 80px -42px var(--accent-glow);
}
#sSheet > .sheet-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--edge-brand);
  pointer-events: none;
}
#sSheet .sheet-head {
  position: relative;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 24px 24px 17px;
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(139, 92, 246, .25), transparent 54%),
    radial-gradient(90% 160% at 100% 0%, rgba(34, 211, 238, .1), transparent 56%);
}
.sheet-avatar {
  width: 54px;
  height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(186, 176, 255, .34);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, .9), rgba(79, 70, 184, .88));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 28px -14px var(--accent-glow);
  font: 650 21px var(--font-display);
}
#sSheet .sheet-heading { flex: 1; min-width: 0; }
#sSheet .sheet-title-context { margin: 0 0 4px; color: var(--accent-ink); }
#sSheet .sheet-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-0);
  font: 650 20px/1.2 var(--font-display);
  letter-spacing: -.02em;
}
#sSheet .sheet-title .sheet-status { flex: none; margin-left: 0; }
.sheet-subtitle {
  margin-top: 6px;
  overflow: hidden;
  color: var(--fg-2);
  font-size: 11.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sheet-subtitle .mono { color: var(--fg-1); }
#sSheet .sheet-actions { flex: none; padding-top: 1px; }
#sSheet .sheet-head .sheet-action { min-height: 30px; background: rgba(255, 255, 255, .035); }
#sSheet .sheet-head .sheet-action:hover { background: var(--bg-4); }
#sSheet .sheet-close { border-color: var(--line-2); color: var(--fg-2); }
#sSheet .sheet-close:hover { background: var(--bg-3); color: var(--fg-0); }
.sheet-tabs {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 0 20px 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-1);
  background: rgba(7, 8, 14, .44);
  scrollbar-width: none;
}
.sheet-tabs::-webkit-scrollbar { display: none; }
.sheet-tab {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--fg-2);
  font: 550 12px var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
}
.sheet-tab:hover { background: var(--bg-2); color: var(--fg-0); }
.sheet-tab[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--fg-0); }
.sheet-tab:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
#sSheetBody {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  align-content: start;
  align-items: start;
  gap: 16px;
  min-height: 0;
  padding: 20px 24px 24px;
  scroll-padding-top: 12px;
  background: radial-gradient(80% 70% at 100% 0%, rgba(124, 108, 255, .035), transparent 72%);
}
#sSheetBody .session-card,
#sSheetBody .session-artifact {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-4);
  background: var(--grad-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}
#sSheetBody .session-section-title {
  margin: 0 0 10px;
  color: var(--fg-0);
  font: 600 14px var(--font-display);
  letter-spacing: -.01em;
  text-transform: none;
}
.session-properties { grid-column: 1; grid-row: 1; }
.session-credentials { grid-column: 1; grid-row: 2; }
#sSheetBody .session-authenticator { grid-column: 2; grid-row: 1 / span 2; }
#sSheetBody .session-summary {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
#sSheetBody .session-summary-item {
  display: grid;
  grid-template-columns: minmax(92px, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-1);
}
#sSheetBody .session-summary-item:first-child { padding-top: 2px; }
#sSheetBody .session-summary-item:last-child { grid-column: auto; padding-bottom: 2px; border-bottom: 0; }
#sSheetBody .session-summary-item dt {
  margin: 0;
  color: var(--fg-2);
  font: 450 12px/1.45 var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
}
#sSheetBody .session-summary-item dd { color: var(--fg-1); text-align: right; }
#sSheetBody .session-summary-item dd.mono { color: var(--fg-0); font-size: 11.5px; }
#sSheetBody .session-secret { grid-template-columns: 104px minmax(0, 1fr); padding: 11px 0; }
#sSheetBody .session-secret:last-child { border-bottom: 0; }
#sSheetBody .session-secret-label { color: var(--fg-2); }
#sSheetBody .session-authenticator .session-secret { grid-template-columns: 1fr; }
#sSheetBody .session-authenticator .session-secret-label { padding-top: 0; }
#sSheetBody .session-authenticator-head { margin-bottom: 12px; }
#sSheetBody .session-authenticator-head .session-section-title { margin-bottom: 4px; }
#sSheetBody .session-artifact { grid-column: 1 / -1; padding: 0; overflow: hidden; }
#sSheetBody .session-artifact summary { min-height: 48px; padding: 0 16px; letter-spacing: 0; text-transform: none; }
#sSheetBody .session-artifact-body { padding: 0 16px 16px; }
#sessionSendTool, #sSheetBody .session-danger { grid-column: 1 / -1; }
#sSheetBody .session-danger {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(251, 113, 133, .2);
  border-radius: var(--r-4);
  background: linear-gradient(90deg, var(--bad-soft), rgba(255, 255, 255, .012));
}

@media (max-width: 640px) {
  #sSheet > .sheet-card { width: 100vw; max-height: 100dvh; padding: 0; border-radius: 0; }
  #sSheet .sheet-head {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
    padding: 16px 14px 14px;
  }
  #sSheet .sheet-avatar { grid-column: 1; grid-row: 1; width: 44px; height: 44px; border-radius: 12px; font-size: 18px; }
  #sSheet .sheet-heading { grid-column: 2; grid-row: 1; }
  #sSheet .sheet-title-context { margin-bottom: 2px; font-size: 9px; }
  #sSheet .sheet-title { display: block; font-size: 16px; line-height: 1.25; }
  #sSheet .sheet-title .sheet-status { display: inline-flex; margin-left: 4px; vertical-align: middle; }
  #sSheet .sheet-subtitle { margin-top: 4px; font-size: 10px; }
  #sSheet .sheet-close { grid-column: 3; grid-row: 1; }
  #sSheet .sheet-actions { grid-column: 1 / -1; grid-row: 2; padding-top: 4px; }
  .sheet-tabs { padding: 0 12px 10px; }
  .sheet-tab { min-height: 44px; }
  #sSheetBody { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; overflow: visible; }
  #sSheetBody .session-properties,
  #sSheetBody .session-credentials,
  #sSheetBody .session-authenticator,
  #sSheetBody .session-artifact,
  #sessionSendTool,
  #sSheetBody .session-danger { grid-column: 1; grid-row: auto; }
  #sSheetBody .session-card { padding: 14px; }
  #sSheetBody .session-summary-item { grid-template-columns: minmax(86px, .75fr) minmax(0, 1.25fr); }
  #sSheetBody .session-secret { grid-template-columns: 90px minmax(0, 1fr); }
}


/* Responsive overlay and mailbox recovery corrections. */
.auth-status-short { display: none; }
#mbox .mb-empty .mb-action { flex: 0 0 auto; align-self: center; min-width: 124px; min-height: 38px; }
.mbox-live-dot.is-error { background: var(--bad); box-shadow: 0 0 8px var(--bad-glow); }

@media (max-width: 640px) {
  .topbar .pop-anchor .pop {
    position: fixed;
    top: calc(var(--topbar-h) + 16px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - var(--topbar-h) - 32px);
    overflow-y: auto;
  }
  .auth-top { gap: 12px; padding: 16px; }
  .auth-top .pill { height: 30px; padding: 0 10px; }
  .auth-top .auth-status-full { display: none; }
  .auth-top .auth-status-short { display: inline; }
}

@media (max-width: 400px) {
  .auth-top { gap: 10px; padding: 14px; }
}


/* Keep OGG's detail title clear by docking actions beside the section tabs. */
.sheet-tabbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 20px;
  border-bottom: 1px solid var(--line-1);
  background: rgba(7, 8, 14, .44);
}
.sheet-tabbar .sheet-tabs { flex: 1; min-width: 0; border-bottom: 0; background: transparent; }
#sSheet .sheet-tabbar .sheet-actions { margin-left: 0; padding-top: 0; }
#sSheet .sheet-tabbar .sheet-action { min-height: 30px; background: rgba(255, 255, 255, .035); }
#sSheet .sheet-tabbar .sheet-action:hover { background: var(--bg-4); }

@media (max-width: 640px) {
  .sheet-tabbar { flex-direction: column; align-items: stretch; gap: 0; padding: 0 0 10px; }
  .sheet-tabbar .sheet-tabs { order: 2; }
  #sSheet .sheet-tabbar .sheet-actions { order: 1; width: 100%; padding: 0 14px 10px; }
}

@media (max-width: 400px) {
  .auth-top { padding: 12px; }
}


/* Preserve the session primary action after docking it in the tab bar. */
#sSheet .sheet-tabbar .sheet-action-primary { background: var(--ok); border-color: var(--ok-line); color: #06130d; }
#sSheet .sheet-tabbar .sheet-action-primary:hover { background: #6ee7b7; border-color: var(--ok); color: #06130d; }


/* Quiet Sessions list: OGG table accents and only essential mobile metadata. */
#view-table .ov-btn-primary { background: var(--grad-brand); border-color: rgba(255, 255, 255, .12); color: #fff; }
#view-table .ov-btn-primary:hover { background: var(--grad-brand); border-color: rgba(255, 255, 255, .2); color: #fff; filter: brightness(1.08); }
#view-table .mb-av { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
#view-table .mb-row.is-current { box-shadow: inset 2px 0 var(--accent); }
#view-table .mb-search .input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-wash); }

@media (max-width: 640px) {
  #view-table .mb-row.mb-cols {
    grid-template-columns: 20px minmax(0, 1fr) auto 24px;
    grid-template-areas: "pick member member actions" ". created status status";
    column-gap: 10px;
    row-gap: 8px;
    min-height: 84px;
    padding: 12px 14px;
  }
  #view-table .mb-row.mb-cols > [role="cell"]:nth-child(3),
  #view-table .mb-row.mb-cols > [role="cell"]:nth-child(4) { display: none; }
  #view-table .mb-row > [role="cell"]:nth-child(n+3):nth-child(-n+5)::before { content: none; }
  #view-table .mb-row > [role="cell"]:nth-child(5) { display: block; min-width: 0; text-align: left; }
  #view-table .mb-row > [role="cell"]:nth-child(6) { display: flex; align-items: center; justify-content: flex-end; }
  #view-table .mb-row .mb-member { align-items: center; }
  #view-table .mb-row .mb-av { width: 30px; height: 30px; }
  #view-table .mb-row .mb-sub { overflow: hidden; color: var(--ov-meta); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
  #view-table .mb-row .mb-date { color: var(--ov-meta); font-size: 11.5px; }
  #view-table .mb-row .ov-pill { height: 20px; padding: 0 7px; font-size: 11px; }
  #view-table .mb-row .mb-c-act .icon-btn { width: 24px; height: 32px; }
}


/* Session views are real switches, with a consistent SVG close control. */
#sSheet .sheet-close { display: inline-grid; place-items: center; padding: 0; line-height: 1; }
#sSheet .sheet-close .ic { width: 16px; height: 16px; }
#sSheetBody[data-section="overview"] .session-credentials { grid-column: 2; grid-row: 1; }
#sSheetBody[data-section="authenticator"] .session-authenticator { grid-column: 1 / -1; grid-row: 1; }
#sSheetBody[data-section="authenticator"] .authenticator-box { max-width: 620px; }
#sSheetBody[data-section="cookies"] .session-artifact { grid-column: 1 / -1; grid-row: 1; }

@media (max-width: 640px) {
  #sSheetBody[data-section] .session-credentials,
  #sSheetBody[data-section] .session-authenticator,
  #sSheetBody[data-section] .session-artifact { grid-column: 1; grid-row: auto; }
}


@media (max-width: 640px) {
  #sSheet .sheet-tabbar .sheet-actions > * { min-height: 44px; }
}

.session-cookie-empty { padding: 20px 0; color: var(--ov-meta); font: 400 12.5px/1.5 var(--font-sans); text-align: center; }


/* Billing stays in the same card system as the simplified panel. */
.billing-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.billing-customer-field { max-width: 560px; margin-bottom: 20px; }
.billing-plan-name { font: 650 28px/1.15 var(--font-display); color: var(--ov-title, var(--fg-1)); letter-spacing: -.025em; }
.billing-plan-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.billing-plan-meta > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px; border: 1px solid var(--ov-line, var(--line)); border-radius: 10px; }
.billing-plan-meta strong { overflow-wrap: anywhere; font-size: 12px; font-weight: 550; }
.billing-checkout { margin-top: 18px; }
.billing-checkout .cf-pair { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.billing-usage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.billing-usage-value { font: 650 24px/1 var(--font-display); color: var(--ov-title, var(--fg-1)); }
.billing-usage-value span { margin-left: 5px; font: 450 12px/1.2 var(--font-body); color: var(--fg-3); }
.billing-meter { height: 5px; margin-top: 14px; overflow: hidden; border-radius: 999px; background: var(--ov-track, var(--surface-2)); }
.billing-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--ov-accent, var(--accent)); }
@media (max-width: 980px) {
  .billing-usage-grid { grid-template-columns: 1fr; }
  .billing-plan-meta { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .billing-checkout .cf-pair { grid-template-columns: 1fr; }
  .billing-checkout .btn { width: 100%; }
}
