/* vmops console. Tokens first (light default, dark via OS setting or manual toggle), then layout, then components.
   Chart colours: dataviz reference palette, validated for both surfaces (see docs). Status colours are reserved for state. */
:root {
  color-scheme: light;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --bg: #f3f3ef; --glow-1: rgba(70, 130, 255, .13); --glow-2: rgba(130, 90, 240, .09);
  --surface: #fcfcfb; --surface-2: #f4f4f1; --surface-3: #ebeae5; --sidebar: rgba(252, 252, 251, .72);
  --border: rgba(11, 11, 11, .09); --border-strong: rgba(11, 11, 11, .17);
  --text: #0b0b0b; --text-2: #4a4944; --muted: #66655f;
  --grid: #e6e5de; --axis: #c3c2b7; --neutral-mark: #b4b2a8; --code-bg: #f0efea;
  --accent: #2a78d6; --accent-fg: #1c5cab; --accent-soft: rgba(42, 120, 214, .11); --on-accent: #fff;
  --ok: #0ca30c; --warn: #fab219; --serious: #ec835a; --fail: #d03b3b;
  --ok-fg: #006300; --warn-fg: #7a4d00; --fail-fg: #b32424; --info-fg: #1c5cab;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --shadow: 0 1px 2px rgba(20, 20, 15, .05), 0 6px 20px -8px rgba(20, 20, 15, .10);
  --shadow-lg: 0 12px 40px -8px rgba(20, 20, 15, .28);
  --tip-bg: rgba(255, 255, 255, .94); --ring: rgba(42, 120, 214, .55);
  --sb-w: 244px; --topbar-h: 60px; --radius: 16px; --gutter: 24px;
  --card-sheen: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 60%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0b0e; --glow-1: rgba(70, 130, 255, .16); --glow-2: rgba(130, 90, 240, .12);
    --surface: #16181c; --surface-2: #1d1f24; --surface-3: #272a30; --sidebar: rgba(14, 15, 18, .72);
    --border: rgba(255, 255, 255, .075); --border-strong: rgba(255, 255, 255, .16);
    --text: #f0efec; --text-2: #c3c2b7; --muted: #9a988f;
    --grid: #26282d; --axis: #383a40; --neutral-mark: #5d5c57; --code-bg: #0e0f12;
    --accent: #3987e5; --accent-fg: #7db2f4; --accent-soft: rgba(57, 135, 229, .16);
    --ok-fg: #3fcf3f; --warn-fg: #fab219; --fail-fg: #ff8279; --info-fg: #7db2f4;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 18px 50px -10px rgba(0, 0, 0, .75);
    --tip-bg: rgba(30, 32, 37, .94); --ring: rgba(125, 178, 244, .65);
    --card-sheen: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 55%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0b0e; --glow-1: rgba(70, 130, 255, .16); --glow-2: rgba(130, 90, 240, .12);
  --surface: #16181c; --surface-2: #1d1f24; --surface-3: #272a30; --sidebar: rgba(14, 15, 18, .72);
  --border: rgba(255, 255, 255, .075); --border-strong: rgba(255, 255, 255, .16);
  --text: #f0efec; --text-2: #c3c2b7; --muted: #9a988f;
  --grid: #26282d; --axis: #383a40; --neutral-mark: #5d5c57; --code-bg: #0e0f12;
  --accent: #3987e5; --accent-fg: #7db2f4; --accent-soft: rgba(57, 135, 229, .16);
  --ok-fg: #3fcf3f; --warn-fg: #fab219; --fail-fg: #ff8279; --info-fg: #7db2f4;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 18px 50px -10px rgba(0, 0, 0, .75);
  --tip-bg: rgba(30, 32, 37, .94); --ring: rgba(125, 178, 244, .65);
  --card-sheen: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 55%);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  margin: 0; font: 14px/1.5 var(--font); color: var(--text); min-height: 100vh; overflow-x: hidden;
  background: radial-gradient(900px 520px at 8% -8%, var(--glow-1), transparent 62%), radial-gradient(760px 480px at 100% -4%, var(--glow-2), transparent 58%), var(--bg);
  background-repeat: no-repeat; background-color: var(--bg);
}
[hidden] { display: none !important; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent-fg); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
kbd { font: 600 11px var(--mono); padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; color: var(--muted); background: var(--surface-2); }
code, .mono { font-family: var(--mono); font-size: .92em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; } .pad { padding: 12px; } .pad-x { padding: 0 20px 14px; }
.warn-text { color: var(--warn-fg); } .fail-text { color: var(--fail-fg); } .ok-text { color: var(--ok-fg); } .danger-text { color: var(--fail-fg); }
.inline-ico { display: inline-flex; align-items: center; gap: 5px; }
.ico { flex: none; } .flip { transform: rotate(180deg); }
.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { padding: 24px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--surface); padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border-strong); }
.skip:focus { left: 8px; }
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; flex: none; }
.btn .spinner { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 560; white-space: nowrap; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #3a84e6, #2a6fcb); border-color: transparent; color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 16px -6px rgba(42, 120, 214, .7); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: linear-gradient(180deg, #d9453f, #b9302b); color: #fff; border-color: transparent; }
.btn.warn { background: color-mix(in srgb, var(--warn) 20%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.link { background: none; border: 0; color: var(--accent-fg); height: auto; padding: 4px 6px; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-fg); }
.icon-btn.failed { color: var(--warn-fg); }
.input, .select { width: 100%; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.input.sm, .select.sm { height: 32px; font-size: 13px; border-radius: 9px; padding: 0 10px; width: auto; min-width: 0; }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--muted); opacity: .8; }
.select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.select.sm { padding-right: 26px; background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; }
.select:disabled { opacity: .6; }
.field { display: grid; gap: 6px; }
.field label, .inline-field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--muted); }
.inline-field { display: inline-flex; align-items: center; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.input-wrap { position: relative; } .input-wrap .input { padding-right: 44px; }
.input-wrap .reveal { position: absolute; right: 6px; top: 6px; }
.form-grid { display: grid; gap: 16px; }
.form-error { color: var(--fail-fg); font-size: 13px; padding: 0 22px 12px; }
.form-slot:empty { display: none; }
.code-input { font-family: var(--mono); font-size: 26px; letter-spacing: .32em; text-align: center; height: 56px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.filters .input { min-width: 220px; }

/* ---------- auth ---------- */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px; gap: 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); background-image: var(--card-sheen); border: 1px solid var(--border); border-radius: 24px; padding: 30px; box-shadow: var(--shadow-lg); animation: rise .35s ease both; }
.auth-card:has(.auth-form.wide) { max-width: 760px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-name { font-weight: 700; font-size: 17px; letter-spacing: -.01em; } .auth-tag { color: var(--muted); font-size: 12.5px; }
.auth-form { display: grid; gap: 16px; }
.auth-form h1 { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.lead { color: var(--text-2); }
.step-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent-fg); }
.step-ico.bad { background: color-mix(in srgb, var(--fail) 14%, transparent); color: var(--fail-fg); }
.auth-foot { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12.5px; text-align: center; }
.stepper { display: flex; gap: 8px; flex-wrap: wrap; }
.stepper li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12.5px; }
.stepper .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 11px; }
.stepper li.now { background: var(--accent-soft); color: var(--accent-fg); } .stepper li.now .n { background: var(--accent); color: #fff; }
.stepper li.done { color: var(--ok-fg); } .stepper li.done .n { background: none; }
.invite-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.invite-facts dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; } .invite-facts dd { font-weight: 600; overflow-wrap: anywhere; }
.strength { display: flex; align-items: center; gap: 12px; margin-top: -6px; }
.sm-bars { display: flex; gap: 4px; flex: 1; } .sm-bar { height: 6px; flex: 1; border-radius: 3px; background: var(--surface-3); transition: background .2s; }
.sm-bar.on.s1 { background: var(--fail); } .sm-bar.on.s2 { background: var(--serious); } .sm-bar.on.s3 { background: var(--s1); } .sm-bar.on.s4 { background: var(--ok); }
.sm-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); min-width: 84px; text-align: right; }
.reqs { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.reqs li { display: flex; align-items: center; gap: 8px; } .reqs li.met { color: var(--ok-fg); }
.twofa { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.qr-box { background: #fff; padding: 10px; border-radius: 16px; border: 1px solid var(--border-strong); width: 196px; height: 196px; }
.qr { width: 100%; height: 100%; display: block; }
.qr-fail { color: #333; font-size: 12px; padding: 8px; }
.twofa-steps { display: grid; gap: 16px; list-style: decimal; padding-left: 18px; }
.twofa-steps li { padding-left: 6px; } .twofa-steps li::marker { color: var(--muted); font-weight: 700; }
.twofa-steps strong { display: block; } .twofa-steps span { color: var(--text-2); font-size: 13px; }
.secret-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.secret { font-size: 15px; letter-spacing: .08em; padding: 8px 12px; border-radius: 10px; background: var(--code-bg); border: 1px solid var(--border); overflow-wrap: anywhere; font-weight: 600; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s ease; }
html.sb-collapsed .shell { grid-template-columns: 72px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; background: var(--sidebar); backdrop-filter: blur(18px) saturate(1.3); border-right: 1px solid var(--border); overflow-y: auto; overflow-x: hidden; }
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; color: var(--text); text-decoration: none !important; }
.brand-text { display: grid; line-height: 1.1; } .brand-text strong { font-size: 16px; letter-spacing: -.01em; } .brand-text small { color: var(--muted); font-size: 12px; }
.nav { display: grid; gap: 3px; }
.nav-link { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 11px; color: var(--text-2); font-weight: 540; text-decoration: none !important; position: relative; transition: background .15s, color .15s; white-space: nowrap; }
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-fg); }
.nav-link[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-group { margin: 12px 0 6px; } .nav-title { padding: 0 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.app-list { display: grid; gap: 2px; } .app-link { height: 36px; font-size: 13.5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin: 0 5px; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 25%, transparent); border-radius: 3px; transform: rotate(45deg) scale(.92); }
.dot.fail { background: var(--fail); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fail) 25%, transparent); border-radius: 2px; }
.dot.muted { background: transparent; border: 2px solid var(--muted); box-shadow: none; transform: none; border-radius: 50%; }
.dot.maint { background: var(--warn); border-radius: 3px; transform: none; }
.collapse-btn { margin-top: auto; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border: 0; background: none; color: var(--muted); border-radius: 10px; }
.collapse-btn:hover { background: var(--surface-3); color: var(--text); } .collapse-btn svg { transition: transform .2s; }
html.sb-collapsed .collapse-btn svg { transform: rotate(180deg); }
html.sb-collapsed .nav-text, html.sb-collapsed .brand-text, html.sb-collapsed .nav-title { display: none; }
html.sb-collapsed .nav-link, html.sb-collapsed .collapse-btn { justify-content: center; padding: 0; }
html.sb-collapsed .nav-link[aria-current="page"]::before { left: -12px; }
html.sb-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
html.sb-collapsed .app-link .dot { margin: 0; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 var(--gutter); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--border); }
.top-logo { display: none; } .crumb { font-weight: 650; font-size: 15px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .spacer { flex: 1; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px 0 10px; border-radius: 999px; font-weight: 600; font-size: 13px; text-decoration: none !important; white-space: nowrap; border: 1px solid transparent; }
.status-pill.ok { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok-fg); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.status-pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn-fg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.status-pill.fail { background: color-mix(in srgb, var(--fail) 14%, transparent); color: var(--fail-fg); border-color: color-mix(in srgb, var(--fail) 32%, transparent); }
.status-pill.info { background: var(--surface-2); color: var(--muted); }
.pill-ico { display: inline-flex; }
.age { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.age.warn { color: var(--warn-fg); font-weight: 600; } .age.fail { color: var(--fail-fg); font-weight: 600; }
.range-wrap { display: flex; align-items: center; } .range-select { display: none; width: auto; }
.seg-control { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.seg-btn { border: 0; background: none; height: 28px; padding: 0 10px; border-radius: 9px; font-weight: 600; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .18), 0 0 0 1px var(--border); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.auto-btn { gap: 7px; color: var(--muted); } .auto-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .5; }
.auto-btn[aria-pressed="true"] { color: var(--text); } .auto-btn[aria-pressed="true"] .auto-dot { background: var(--ok); opacity: 1; animation: pulse 2.4s ease infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 0%, transparent); } 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } }
.search-btn { color: var(--muted); min-width: 150px; justify-content: flex-start; } .search-text { flex: 1; text-align: left; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; display: inline-grid; place-items: center; font-weight: 700; font-size: 12.5px; color: #fff; background: linear-gradient(135deg, #4f9bff, #7a5cf0); }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; flex: none; }
.menu-wrap { position: relative; margin-left: 4px; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 6px; box-shadow: var(--shadow-lg); z-index: 60; animation: rise .15s ease both; }
.menu-head { display: grid; gap: 2px; padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; } .menu-head span:not(.chip) { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; } .menu-head .chip { justify-self: start; margin-top: 6px; }
.menu-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; border-radius: 9px; text-align: left; }
.menu-item:hover { background: var(--surface-3); }
.main { padding: 26px var(--gutter) 56px; outline: none; max-width: 1480px; width: 100%; margin: 0 auto; }
.main.refreshing .tab-body, .main.refreshing .overview-top, .main.refreshing .app-grid { opacity: .78; transition: opacity .2s; }
.bottomnav { display: none; }

/* ---------- page furniture ---------- */
.page { display: grid; gap: 22px; animation: rise .3s ease both; min-width: 0; }
.page > * { min-width: 0; }
.page-head { display: grid; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 560; width: fit-content; } .back:hover { color: var(--text); text-decoration: none; }
.page-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.page-head h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.025em; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.title-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; font-size: 14px; letter-spacing: 0; }
.page-sub { color: var(--text-2); margin-top: 6px; max-width: 760px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 18px; letter-spacing: -.015em; } .section-head p { color: var(--muted); margin-top: 2px; }
.card { background: var(--surface); background-image: var(--card-sheen); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; } .card-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card.chart-card { padding: 16px 16px 12px; }

/* ---------- badges, chips, stats ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; border: 1px solid transparent; }
.badge.ok { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok-fg); border-color: color-mix(in srgb, var(--ok) 26%, transparent); }
.badge.warn { background: color-mix(in srgb, var(--warn) 17%, transparent); color: var(--warn-fg); border-color: color-mix(in srgb, var(--warn) 38%, transparent); }
.badge.fail { background: color-mix(in srgb, var(--fail) 14%, transparent); color: var(--fail-fg); border-color: color-mix(in srgb, var(--fail) 30%, transparent); }
.badge.info { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge.muted { background: var(--surface-2); color: var(--text-2); border: 1px dashed var(--border-strong); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
a.chip.link:hover { background: var(--accent-soft); color: var(--accent-fg); text-decoration: none; }
.chg { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px 0 6px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.chg.fail { background: color-mix(in srgb, var(--fail) 15%, transparent); color: var(--fail-fg); } .chg.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn-fg); }
.chg.good { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok-fg); } .chg.learning { color: var(--muted); font-weight: 560; } .chg.flat { padding: 0 8px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: grid; gap: 3px; align-content: start; min-width: 0; box-shadow: var(--shadow); }
.stat-l { font-size: 12px; color: var(--muted); font-weight: 600; } .stat-v { font-size: 22px; font-weight: 680; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; } .stat-v small { font-size: 13px; color: var(--muted); font-weight: 560; }
.stat-s { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.stat-v .sm { font-size: 14px; }
.stat.warn .stat-v { color: var(--warn-fg); } .stat.fail .stat-v { color: var(--fail-fg); }
.stat.warn .stat-v::before { content: "▲ "; font-size: .6em; vertical-align: .15em; } .stat.fail .stat-v::before { content: "✕ "; font-size: .6em; vertical-align: .15em; }
.app-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.apdex-stat { grid-template-columns: 1fr; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.alert-body { display: grid; gap: 2px; } .alert-body span { color: var(--text-2); }
.alert.warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 40%, transparent); } .alert.warn > .ico { color: var(--warn-fg); }
.alert.fail { background: color-mix(in srgb, var(--fail) 10%, var(--surface)); border-color: color-mix(in srgb, var(--fail) 35%, transparent); } .alert.fail > .ico { color: var(--fail-fg); }
.alert.ok { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 28%, transparent); } .alert.ok > .ico { color: var(--ok-fg); }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 40px 20px; max-width: 640px; margin: 0 auto; }
.empty-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-fg); margin-bottom: 6px; }
.empty.bad .empty-ico { background: color-mix(in srgb, var(--fail) 13%, transparent); color: var(--fail-fg); }
.empty h3 { font-size: 17px; letter-spacing: -.01em; } .empty p { color: var(--text-2); }
.code-block { display: grid; gap: 10px; justify-items: start; width: 100%; margin-top: 8px; text-align: left; }
.code { margin: 0; width: 100%; padding: 14px 16px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--border); font: 13px/1.6 var(--mono); overflow-x: auto; white-space: pre; }
.skel { height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.5s linear infinite; margin: 6px 0; }
.skel.tall { height: 30px; } .skel.chart { height: 180px; border-radius: 12px; } .skel.w40 { width: 40%; } .skel.w60 { width: 60%; } .skel.w90 { width: 90%; } .skel.w100 { width: 100%; } .skel.stat-skel { height: 70px; border-radius: 14px; margin: 0; } .skel.gauge-skel { height: 150px; border-radius: 16px; margin: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- toasts, tooltip, dialogs ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 400; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); animation: rise .25s ease both; border-left-width: 4px; }
.toast.ok { border-left-color: var(--ok); } .toast.ok > .ico { color: var(--ok-fg); } .toast.err { border-left-color: var(--fail); } .toast.err > .ico { color: var(--fail-fg); } .toast.warn { border-left-color: var(--warn); } .toast.warn > .ico { color: var(--warn-fg); } .toast.info { border-left-color: var(--accent); } .toast.info > .ico { color: var(--accent-fg); }
.toast.out { opacity: 0; transform: translateY(6px); transition: .2s; }
.toast-body { flex: 1; display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; } .toast-body span { color: var(--text-2); font-size: 13px; }
.tip { position: fixed; z-index: 500; pointer-events: none; opacity: 0; transition: opacity .1s; background: var(--tip-bg); backdrop-filter: blur(10px); border: 1px solid var(--border-strong); border-radius: 12px; padding: 9px 12px; box-shadow: var(--shadow-lg); max-width: 320px; font-size: 12.5px; left: 0; top: 0; }
.tip.on { opacity: 1; }
.tip-body { display: grid; gap: 5px; } .tip-time { color: var(--muted); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.tip-row { display: flex; align-items: center; gap: 8px; } .tip-row strong { font-size: 13.5px; font-variant-numeric: tabular-nums; } .tip-name { color: var(--text-2); }
dialog { color: var(--text); }
dialog::backdrop { background: rgba(5, 6, 9, .55); backdrop-filter: blur(4px); }
dialog.modal { border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface); padding: 0; width: min(500px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); animation: pop .2s ease both; overflow: auto; }
dialog.modal.wide { width: min(720px, calc(100vw - 32px)); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 20px 4px 22px; } .modal-head h2 { font-size: 18px; letter-spacing: -.015em; }
.modal-body { padding: 8px 22px 18px; display: grid; gap: 14px; } .modal-intro { color: var(--text-2); }
.consequences { display: grid; gap: 8px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; font-size: 13.5px; }
.consequences li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); } .consequences svg { margin-top: 3px; color: var(--accent-fg); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--border); }
.invite-box { display: grid; gap: 14px; } .copy-row { display: flex; gap: 8px; } .copy-row .input { flex: 1; min-width: 0; font-size: 12.5px; }
dialog.logs-modal { width: min(1120px, calc(100vw - 32px)); height: min(82vh, 780px); max-height: none; overflow: hidden; }
dialog.logs-modal[open] { display: flex; } .logs-modal .modal-form { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.logs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 22px 12px; }
.logs-status { display: flex; align-items: center; gap: 8px; padding: 0 22px 8px; color: var(--text-2); font-size: 13px; } .logs-status:empty { display: none; }
.logs { flex: 1; min-height: 0; overflow: auto; margin: 0 22px 10px; padding: 12px 14px; background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; font: 12px/1.6 var(--mono); white-space: pre; }
.logs.wrap { white-space: pre-wrap; overflow-wrap: anywhere; } .ll { padding: 0 2px; border-radius: 3px; } .ll.err { color: var(--fail-fg); } .ll.warn { color: var(--warn-fg); }
dialog.palette { margin: 12vh auto auto; padding: 0; width: min(580px, calc(100vw - 32px)); border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .15s ease both; }
.pal-top { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.pal-input { flex: 1; height: 56px; border: 0; background: none; outline: none; font-size: 16px; color: var(--text); min-width: 0; }
.pal-list { max-height: min(50vh, 420px); overflow-y: auto; padding: 8px; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; color: var(--text-2); }
.pal-item[aria-selected="true"] { background: var(--accent-soft); color: var(--text); } .pal-label { flex: 1; font-weight: 560; } .pal-hint { font-size: 12px; color: var(--muted); } .pal-none { padding: 20px; text-align: center; color: var(--muted); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl thead th { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; padding-top: 6px; }
.tbl tbody th { font-weight: 560; } .tbl tbody tr:last-child > * { border-bottom: 0; } .tbl tbody tr:hover > * { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.tbl .num { text-align: right; } .tbl.compact th, .tbl.compact td { padding: 7px 10px; }
.th-btn { display: inline-flex; gap: 4px; align-items: center; border: 0; background: none; padding: 4px 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; font-weight: inherit; }
.th-btn:hover { color: var(--text); } th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--text); } .sort-ico { display: inline-flex; min-width: 12px; }
.tbl-more { padding-top: 10px; text-align: center; }
.route-col { min-width: 220px; } .route { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .route .mono { overflow-wrap: anywhere; }
.method { display: inline-block; min-width: 46px; text-align: center; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); font: 700 11px var(--mono); color: var(--text-2); }
.two-line { display: grid; gap: 1px; min-width: 0; } .two-line .mono { overflow-wrap: anywhere; }
.cell-stack { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ibar { position: relative; display: inline-block; min-width: 96px; height: 24px; border-radius: 7px; background: color-mix(in srgb, var(--s1) 8%, transparent); overflow: hidden; vertical-align: middle; }
.ibar-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--s1) 26%, transparent); border-radius: 7px; }
.ibar.orange { background: color-mix(in srgb, var(--s2) 8%, transparent); } .ibar.orange .ibar-fill { background: color-mix(in srgb, var(--s2) 30%, transparent); }
.ibar.aqua { background: color-mix(in srgb, var(--s3) 8%, transparent); } .ibar.aqua .ibar-fill { background: color-mix(in srgb, var(--s3) 30%, transparent); }
.ibar.red { background: color-mix(in srgb, var(--s8) 8%, transparent); } .ibar.red .ibar-fill { background: color-mix(in srgb, var(--s8) 28%, transparent); }
.ibar-text { position: relative; display: block; padding: 0 9px; line-height: 24px; text-align: right; font-weight: 600; }
.usage { display: grid; gap: 5px; min-width: 110px; justify-items: end; } .usage small { color: var(--muted); }
.meter { width: 100%; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--s1) 16%, var(--surface-3)); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 3px; background: var(--s1); transition: width .4s ease; } .meter.warn { background: color-mix(in srgb, var(--warn) 22%, var(--surface-3)); } .meter.warn .meter-fill { background: var(--warn); } .meter.fail { background: color-mix(in srgb, var(--fail) 22%, var(--surface-3)); } .meter.fail .meter-fill { background: var(--fail); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; } .actions-col { text-align: right !important; white-space: nowrap; }
.badge-col { display: grid; gap: 4px; justify-items: start; }
.spark-cell { display: grid; grid-template-columns: 90px auto; gap: 10px; align-items: center; justify-content: end; }
.user-cell { display: flex; align-items: center; gap: 12px; } .user-cell .chip { margin-left: 8px; }
.trace-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text); } .trace-link:hover { color: var(--accent-fg); text-decoration: none; }

/* ---------- figures & charts ---------- */
.fig { display: grid; gap: 8px; min-width: 0; }
.fig-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fig-title { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; } .fig-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.fig-actions { display: flex; gap: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 3px 4px; border-radius: 7px; } button.legend-item:hover { background: var(--surface-3); } .legend-item.off { opacity: .45; text-decoration: line-through; } .legend-item.static { padding-left: 0; }
.key { display: inline-block; width: 16px; height: 0; border-top: 2.5px solid var(--c); border-radius: 2px; flex: none; } .key.dash { border-top-style: dashed; }
.key.sw { width: 10px; height: 10px; border: 0; background: var(--c); border-radius: 3px; } .key.band { width: 10px; height: 10px; border: 0; background: var(--fail); opacity: .45; border-radius: 3px; }
.plot { position: relative; min-width: 0; outline: none; border-radius: 10px; } .plot:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
.plot-svg { display: block; touch-action: pan-y; max-width: 100%; }
.plot-svg .grid { stroke: var(--grid); stroke-width: 1; } .plot-svg .axis-line { stroke: var(--axis); stroke-width: 1; } .plot-svg .tick-mark { stroke: var(--axis); }
.plot-svg .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.plot-svg .thr { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 4 4; opacity: .65; } .plot-svg .thr-label { fill: var(--text-2); font-size: 11px; font-weight: 600; }
.plot-svg .band { fill: var(--fail); opacity: .22; } .plot-svg .xline { stroke: var(--text-2); stroke-width: 1; opacity: .5; } .plot-svg .dot { stroke: var(--surface); stroke-width: 2; }
.plot-svg .col { outline: none; } .plot-svg .col-bar { transition: filter .1s; } .plot-svg .col:hover .col-bar, .plot-svg .col:focus .col-bar { filter: brightness(1.18); } .plot-svg .col:focus-visible .col-bar { stroke: var(--text); stroke-width: 1.5; }
.plot-empty { display: grid; place-items: center; color: var(--muted); background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--muted) 6%, transparent) 10px 11px); border-radius: 12px; }
.fig-table { max-height: 320px; overflow: auto; } .fig-note { color: var(--muted); font-size: 12px; padding-top: 6px; }
.segwrap { display: grid; gap: 8px; }
.segbar { display: flex; gap: 2px; height: 28px; } .segbar.thin { height: 8px; }
.seg { min-width: 3px; border-radius: 4px; display: flex; align-items: center; padding-left: 8px; font-size: 12px; font-weight: 700; overflow: hidden; white-space: nowrap; outline: none; } .segbar.thin .seg { border-radius: 99px; padding: 0; } .seg.empty { flex: 1; background: var(--surface-3); }
.seg:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ring); }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; } .chart-grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: stretch; }
.gauge { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 4px; text-align: center; }
.gauge-svg { overflow: visible; } .g-track { fill: none; stroke-width: 8; stroke-linecap: round; stroke: color-mix(in srgb, var(--s1) 16%, var(--surface-3)); } .g-val { fill: none; stroke-width: 8; stroke-linecap: round; stroke: var(--s1); transition: stroke-dasharray .6s ease; }
.gauge-svg.warn .g-track, .ring.warn .g-track { stroke: color-mix(in srgb, var(--warn) 20%, var(--surface-3)); } .gauge-svg.warn .g-val, .ring.warn .g-val { stroke: var(--warn); }
.gauge-svg.fail .g-track, .ring.fail .g-track { stroke: color-mix(in srgb, var(--fail) 20%, var(--surface-3)); } .gauge-svg.fail .g-val, .ring.fail .g-val { stroke: var(--fail); }
.ring.ok .g-track { stroke: color-mix(in srgb, var(--ok) 16%, var(--surface-3)); } .ring.ok .g-val { stroke: var(--ok); } .ring .g-track, .ring .g-val { stroke-width: 5; }
.g-num { fill: var(--text); font-size: 20px; font-weight: 700; letter-spacing: -.02em; } .g-sub { fill: var(--muted); font-size: 8px; } .ring-num { fill: var(--text); font-size: 13px; font-weight: 700; }
.gauge-label { font-weight: 650; margin-top: -10px; } .gauge-detail { font-size: 12px; color: var(--muted); }
.gauge-state { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 650; } .gauge-state.ok { color: var(--ok-fg); } .gauge-state.warn { color: var(--warn-fg); } .gauge-state.fail { color: var(--fail-fg); }
.apdex { display: grid; justify-items: center; gap: 2px; } .apdex.none { width: 56px; height: 56px; place-content: center; border-radius: 50%; border: 5px solid var(--surface-3); color: var(--muted); }
.apdex-word { font-size: 11px; font-weight: 700; } .apdex-word.ok { color: var(--ok-fg); } .apdex-word.warn { color: var(--warn-fg); } .apdex-word.fail { color: var(--fail-fg); }
.spark { position: relative; width: 100%; } .spark svg { display: block; } .spark.none { background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--muted) 7%, transparent) 8px 9px); border-radius: 8px; }
.spark-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; margin: -4px 0 0 -4px; box-shadow: 0 0 0 2px var(--surface); }
.spark-cap { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

/* ---------- overview ---------- */
.hero { border-radius: 22px; padding: 22px 24px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, var(--tone, transparent), transparent 55%); opacity: .5; pointer-events: none; }
.hero.ok { --tone: color-mix(in srgb, var(--ok) 22%, transparent); border-color: color-mix(in srgb, var(--ok) 30%, var(--border)); }
.hero.warn { --tone: color-mix(in srgb, var(--warn) 28%, transparent); border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.hero.fail { --tone: color-mix(in srgb, var(--fail) 26%, transparent); border-color: color-mix(in srgb, var(--fail) 45%, var(--border)); }
.hero > * { position: relative; }
.hero-main { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; flex: none; background: var(--surface); box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.hero.ok .hero-ico { color: var(--ok-fg); } .hero.warn .hero-ico { color: var(--warn-fg); } .hero.fail .hero-ico { color: var(--fail-fg); }
.hero-text { flex: 1; min-width: 220px; } .hero-text h1 { font-size: 26px; letter-spacing: -.025em; line-height: 1.2; } .hero-text p { color: var(--text-2); margin-top: 4px; }
.problems { margin-top: 18px; display: grid; gap: 8px; }
.problems li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.problems li > div { display: grid; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; } .problems li span { color: var(--text-2); font-size: 13px; }
.problems li.warn > .ico { color: var(--warn-fg); } .problems li.fail > .ico { color: var(--fail-fg); } .problems li.info > .ico { color: var(--info-fg); }
.overview-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.load-tile { display: grid; align-content: center; justify-items: center; gap: 4px; padding: 8px; } .load-tile .gauge-label { margin: 0; color: var(--text-2); }
.load-big { font-size: 38px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; } .load-big small { font-size: 12px; color: var(--muted); font-weight: 560; letter-spacing: 0; }
.load-more { display: flex; gap: 18px; } .load-more dt { font-size: 11.5px; color: var(--muted); } .load-more dd { font-weight: 650; }
.dep-card { display: grid; align-content: start; gap: 4px; } .dep-card .card-head { margin-bottom: 6px; } .dep-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 0 14px; }
.dep-card .segwrap { margin-bottom: 14px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.app-card { display: grid; gap: 14px; padding: 18px; border-radius: 20px; background: var(--surface); background-image: var(--card-sheen); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; min-width: 0; }
.app-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ok); opacity: .9; }
.app-card.warn::before { background: var(--warn); } .app-card.fail::before { background: var(--fail); } .app-card.is-maint::before { background: repeating-linear-gradient(135deg, var(--warn) 0 8px, transparent 8px 16px); }
.app-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.skel-card { min-height: 280px; align-content: start; }
.app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.app-id { display: grid; gap: 2px; min-width: 0; } .app-id h3 { font-size: 18px; letter-spacing: -.02em; } .release { font: 12px var(--mono); color: var(--muted); }
.app-badges { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.app-body { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); gap: 4px 16px; justify-content: start; }
.m { display: grid; gap: 3px; align-content: start; justify-items: start; } .m-l { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; } .m-v { font-size: 21px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .m-v small { font-size: 12px; color: var(--muted); font-weight: 560; } .m-s { font-size: 11.5px; color: var(--muted); }
.m-v .warn { color: var(--warn-fg); } .m-v .fail { color: var(--fail-fg); } .m-v .warn::before { content: "▲ "; font-size: .55em; vertical-align: .2em; } .m-v .fail::before { content: "✕ "; font-size: .55em; vertical-align: .2em; }
.app-apdex { display: grid; justify-items: center; gap: 2px; }
.app-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); } .app-foot span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- app detail ---------- */
.tabs ul { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; color: var(--text-2); font-weight: 600; white-space: nowrap; text-decoration: none !important; transition: background .15s, color .15s; }
.tab:hover { color: var(--text); } .tab[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .2), 0 0 0 1px var(--border); }
.tab-body { display: grid; gap: 20px; min-width: 0; }
.lanes { display: grid; gap: 22px; }
.lane { --lc: var(--s1); border-radius: 24px; padding: 22px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 50%, transparent); position: relative; display: grid; gap: 18px; min-width: 0; }
.lane::before { content: ""; position: absolute; left: 22px; top: -1px; width: 64px; height: 3px; border-radius: 0 0 3px 3px; background: var(--lc); }
.lane.internal { --lc: var(--s3); } .lane.outgoing { --lc: var(--s2); }
.lane-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; } .lane-titles { flex: 1; min-width: 220px; } .lane-titles h2 { font-size: 19px; letter-spacing: -.02em; } .lane-titles p { color: var(--text-2); font-size: 13.5px; }
.lane-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--lc); background: color-mix(in srgb, var(--lc) 15%, transparent); flex: none; }
.lane-body { display: grid; gap: 16px; min-width: 0; }
.split-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr); gap: 18px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.split-text p { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; } .ops-card { display: grid; gap: 14px; align-content: start; } .ops-card.wide { grid-column: 1 / -1; } .ops-card p { color: var(--text-2); }
.ops-card > button, .ops-card > .btn { justify-self: start; } .ops-state { display: flex; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.mini-timeline { display: grid; gap: 8px; } .mini-timeline li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; } .mini-timeline li > .ico { color: var(--ok-fg); } .mini-timeline li.bad > .ico { color: var(--fail-fg); }
.callout-slot:empty { display: none; }

/* ---------- traces ---------- */
.wf { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.wf-axis, .wf-row { display: grid; grid-template-columns: minmax(180px, 34%) minmax(0, 1fr); min-width: 560px; }
.wf-axis { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface-2); }
.wf-name.head, .wf-track.head { height: 30px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; padding-left: 12px; }
.wf-track { position: relative; height: 34px; margin: 0 14px; } .wf-track.head { margin: 0 14px; padding: 0; }
.wf-tick { position: absolute; top: 8px; transform: translateX(-50%); font-weight: 600; font-size: 11px; white-space: nowrap; text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.wf-tick:first-child { transform: none; }
.wf-row { cursor: pointer; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); outline: none; }
.wf-row:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); } .wf-row[aria-selected="true"] { background: var(--accent-soft); } .wf-row:focus-visible { box-shadow: inset 0 0 0 2px var(--ring); border-radius: 0; }
.wf-name { display: flex; align-items: center; gap: 8px; min-width: 0; height: 34px; padding-right: 8px; font-size: 13px; }
.wf-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 560; } .wf-svc { color: var(--muted); font-size: 11.5px; white-space: nowrap; margin-left: auto; overflow: hidden; text-overflow: ellipsis; max-width: 40%; } .wf-err { color: var(--fail-fg); display: inline-flex; }
.wf-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.wf-bar { position: absolute; top: 9px; height: 16px; border-radius: 5px; background: var(--kc); min-width: 3px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 70%, transparent) inset; }
.wf-row.err .wf-bar { outline: 2px solid var(--fail); outline-offset: 1px; }
.wf-dur { position: absolute; top: 9px; line-height: 16px; font-size: 11.5px; font-weight: 650; padding: 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; } .wf-dur.left { padding: 0 6px 0 0; text-align: right; transform: translateX(-4px); }
.kind-server { --kc: var(--s1); } .kind-internal { --kc: var(--s3); } .kind-outgoing { --kc: var(--s2); } .kind-producer, .kind-consumer { --kc: var(--s5); }
.kind-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--kc); flex: none; } .key.sw[class*="kind-"] { background: var(--kc); }
.span-detail { display: grid; gap: 12px; } .sd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .sd-head h3 { font-size: 15px; overflow-wrap: anywhere; }
.sd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 20px; } .sd-grid dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; } .sd-grid dd { overflow-wrap: anywhere; }
.trace-page .card { overflow: hidden; }

/* ---------- deps, infra, activity ---------- */
.dep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.dep-card.fail { border-color: color-mix(in srgb, var(--fail) 45%, var(--border)); } .dep-card.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.dep-grid .dep-card { display: grid; gap: 14px; align-content: start; }
.dep-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; } .dep-head h3 { font-size: 17px; letter-spacing: -.015em; }
.dep-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.dep-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-end; } .big { font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.dep-last { display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); font-size: 13px; } .dep-last span { display: inline-flex; gap: 6px; align-items: center; }
.phase-title { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 8px; } .phase-list { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 12.5px; } .phase-list dt { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); } .phase-list dd { font-weight: 650; margin-left: 16px; }
.timeline-wrap { display: grid; gap: 4px; } .tl-day { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 14px 0 6px; font-weight: 700; }
.timeline { display: grid; position: relative; } .tl-item { display: grid; grid-template-columns: 28px 76px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: start; }
.tl-ico { color: var(--ok-fg); padding-top: 1px; } .tl-item.bad .tl-ico { color: var(--fail-fg); } .tl-time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.tl-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; } .tl-target { color: var(--text-2); overflow-wrap: anywhere; } .tl-sub { font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .search-text, .search-btn kbd { display: none; } .search-btn { min-width: 0; padding: 0 9px; }
  .age { display: none; }
}
@media (max-width: 1060px) { .seg-btn { padding: 0 8px; } .auto-btn span:last-child { display: none; } .auto-btn { padding: 0 9px; } }
@media (max-width: 900px) {
  :root { --gutter: 16px; --topbar-h: 56px; }
  .shell, html.sb-collapsed .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .top-logo { display: inline-flex; } .crumb { display: none; }
  .seg-control { display: none; } .range-select { display: block; height: 34px; }
  .search-btn, .auto-btn { display: none; }
  .pill-text { display: none; } .status-pill { padding: 0 8px; }
  .main { padding: 18px var(--gutter) calc(88px + env(safe-area-inset-bottom)); }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(18px) saturate(1.4); border-top: 1px solid var(--border); }
  .bn-link { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 12px; text-decoration: none !important; }
  .bn-link[aria-current="page"] { color: var(--accent-fg); background: var(--accent-soft); }
  .overview-top { grid-template-columns: minmax(0, 1fr); }
  .toasts { bottom: 84px; }
  .page-head h1 { font-size: 24px; } .hero-text h1 { font-size: 21px; } .hero { padding: 18px; }
  .lane { padding: 16px; border-radius: 20px; } .split-card { grid-template-columns: minmax(0, 1fr); }
  .twofa { grid-template-columns: minmax(0, 1fr); justify-items: center; } .twofa-steps { justify-self: stretch; }
}
@media (max-width: 520px) {
  .card { padding: 16px; } .auth-card { padding: 22px 18px; border-radius: 20px; }
  .metrics { gap: 4px 12px; } .m-v { font-size: 18px; }
  .app-body { align-items: flex-start; } .app-card { padding: 16px; }
  .tl-item { grid-template-columns: 24px minmax(0, 1fr); } .tl-time { grid-column: 2; grid-row: 1; } .tl-main { grid-column: 2; }
  .spark-cell { grid-template-columns: 70px auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .app-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  dialog.palette { margin-top: 8vh; } .modal-foot { flex-wrap: wrap; } .modal-foot .btn { flex: 1; }
  .filters .input { min-width: 0; width: 100%; } .logs-bar { padding-left: 16px; padding-right: 16px; } .logs { margin-left: 14px; margin-right: 14px; }
  .code-input { font-size: 22px; letter-spacing: .24em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .spinner, .spin { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}
@media (forced-colors: active) { .seg, .meter-fill, .wf-bar, .g-val { forced-color-adjust: none; } .btn, .input, .select { border-color: ButtonText; } }
@media print { .sidebar, .topbar, .bottomnav, .toasts { display: none !important; } .shell { display: block; } }

/* ---------- fixes from review ---------- */
.plot-svg .thr-label { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.wf-dur.in { color: #fff; padding: 0 8px; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.dep-grid { align-items: start; }
.tab-body > *, .lane-body > *, .page > div, .card > div { min-width: 0; max-width: 100%; }
