/* AOO Back Office — design system. Paper material, one accent, ink at alpha steps.
   Components read token NAMES only. Dark mode follows the system unless the person picks one. */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --font-ui: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #fbfbfa; --surface: #ffffff; --surface-2: #f6f6f4; --surface-3: #efeeeb; --sunk: #f3f3f1;
  --ink: #17181a; --ink-rgb: 23,24,26; --ink-2: #3c3b37; --ink-3: #5c5b56; --ink-4: #75746e; --ink-5: #9a9993; --lock: #b9b8b2;
  --on-ink: #fff;
  --rule: rgba(23,24,26,.12); --edge: rgba(23,24,26,.08); --edge-2: rgba(23,24,26,.05);
  --wash: .045; --wash-2: .08; --wash-3: .12;
  --pick: #2f6bff; --pick-rgb: 47,107,255; --pick-soft: rgba(47,107,255,.1);
  --ok: #138a4a; --ok-soft: rgba(19,138,74,.1);
  --warn: #b56a00; --warn-soft: rgba(214,138,0,.12);
  --bad: #c8331b; --bad-soft: rgba(200,51,27,.09);
  --info: #2f6bff; --info-soft: rgba(47,107,255,.09);
  /* categorical series, tuned to sit together in both themes */
  --k1: #2f6bff; --k2: #13a37a; --k3: #f08c2e; --k4: #8b5cf6; --k5: #e5487a; --k6: #10a5c8; --k7: #c9a514; --k8: #6b7280;
  --grid: rgba(23,24,26,.07);
  --shadow-1: 0 1px 2px rgba(23,24,26,.04), 0 0 0 1px rgba(23,24,26,.06);
  --shadow-2: 0 1px 2px rgba(23,24,26,.05), 0 10px 26px rgba(23,24,26,.08), 0 0 0 1px rgba(23,24,26,.06);
  --shadow-3: 0 2px 6px rgba(23,24,26,.07), 0 18px 44px rgba(23,24,26,.13), 0 0 0 1px rgba(23,24,26,.07);
  --shadow-4: 0 0 0 1px rgba(23,24,26,.07), 0 30px 80px rgba(23,24,26,.22);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(var(--pick-rgb), .55);
  --scrim: rgba(16,17,20,.28);
  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --ease-out: cubic-bezier(.22,1,.36,1); --ease-spring: cubic-bezier(.24,1.34,.38,1); --ease-soft: cubic-bezier(.3,1.12,.4,1);
  --ease-pop: cubic-bezier(.34,1.56,.64,1); --ease-exit: cubic-bezier(.55,0,.75,.4); --ease-drawer: cubic-bezier(.32,.72,0,1); --ease-io: cubic-bezier(.65,0,.2,1);
  --t-fast: .14s; --t-base: .16s; --t-move: .22s; --t-open: .26s; --t-panel: .32s; --t-morph: .42s; --t-slow: .6s;
  --side-w: 248px; --side-w-min: 64px; --top-h: 56px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0c; --surface: #141416; --surface-2: #1a1a1d; --surface-3: #222226; --sunk: #101012;
  --ink: #f4f4f5; --ink-rgb: 244,244,245; --ink-2: #c9c9cd; --ink-3: #a1a1a8; --ink-4: #85858c; --ink-5: #66666d; --lock: #4a4a50;
  --on-ink: #0b0b0c;
  --rule: rgba(255,255,255,.12); --edge: rgba(255,255,255,.08); --edge-2: rgba(255,255,255,.05);
  --wash: .05; --wash-2: .08; --wash-3: .12;
  --pick: #5b8cff; --pick-rgb: 91,140,255; --pick-soft: rgba(91,140,255,.16);
  --ok: #38d07f; --ok-soft: rgba(56,208,127,.13); --warn: #f2a93b; --warn-soft: rgba(242,169,59,.14); --bad: #ff6b55; --bad-soft: rgba(255,107,85,.13); --info: #5b8cff; --info-soft: rgba(91,140,255,.14);
  --k1: #5b8cff; --k2: #2fcf9c; --k3: #ff9f45; --k4: #a78bfa; --k5: #ff6b9a; --k6: #38c4e6; --k7: #e6c13a; --k8: #9ca3af;
  --grid: rgba(255,255,255,.07);
  --shadow-1: 0 0 0 1px rgba(255,255,255,.06);
  --shadow-2: 0 0 0 1px rgba(255,255,255,.07), 0 10px 26px rgba(0,0,0,.4);
  --shadow-3: 0 0 0 1px rgba(255,255,255,.08), 0 18px 44px rgba(0,0,0,.55);
  --shadow-4: 0 0 0 1px rgba(255,255,255,.09), 0 30px 80px rgba(0,0,0,.65);
  --scrim: rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 450 13.5px/1.45 var(--font-ui); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01", "tnum" 0; letter-spacing: -.003em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(var(--pick-rgb), .22); }
.num, .tnum, td.num, .kpi-v { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--font-mono); font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.muted { color: var(--ink-4); } .faint { color: var(--ink-5); } .strong { font-weight: 600; color: var(--ink); }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; } .row.wrap { flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.ico { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico.s { width: 14px; height: 14px; } .ico.l { width: 20px; height: 20px; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: rgba(var(--ink-rgb), .14); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--ink-rgb), .26); }

/* ---------------- shell ---------------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100vh; transition: grid-template-columns var(--t-panel) var(--ease-out); }
.shell.mini { grid-template-columns: var(--side-w-min) 1fr; }
.side { background: var(--surface-2); border-right: 1px solid var(--edge); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.side-head { height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 16px; height: 16px; }
.brand-logo { display: block; flex: none; border-radius: 22%; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.signin-card .brand-logo { width: 44px; height: 44px; }
.brand small { font-weight: 500; color: var(--ink-4); margin-left: 2px; }
.env-chip { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: var(--warn-soft); color: var(--warn); }
.env-chip.production { background: var(--bad-soft); color: var(--bad); }
.side-search { margin: 4px 12px 8px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--edge); background: var(--surface); display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--ink-4); cursor: pointer; transition: border-color var(--t-base), background var(--t-base); white-space: nowrap; overflow: hidden; }
.side-search:hover { border-color: var(--rule); }
.side-search kbd { margin-left: auto; }
kbd { font: 500 11px var(--font-ui); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--edge); background: var(--surface-2); color: var(--ink-4); }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 8px 16px; position: relative; }
.nav-sec { margin-top: 2px; }
.nav-sec-h { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 8px; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; color: var(--ink-2); font-weight: 550; text-align: left; transition: background var(--t-base); white-space: nowrap; }
.nav-sec-h:hover { background: rgba(var(--ink-rgb), var(--wash)); }
.nav-sec-h .chev { margin-left: auto; color: var(--ink-5); transition: transform var(--t-move) var(--ease-out); }
.nav-sec.open .nav-sec-h .chev { transform: rotate(90deg); }
.nav-sec.active > .nav-sec-h { color: var(--ink); }
.nav-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-panel) var(--ease-out); }
.nav-sec.open .nav-items { grid-template-rows: 1fr; }
.nav-items > div { overflow: hidden; padding-left: 18px; position: relative; }
.nav-items > div::before { content: ""; position: absolute; left: 16px; top: 4px; bottom: 4px; width: 1px; background: var(--edge); }
.nav-a { position: relative; display: flex; align-items: center; height: 29px; padding: 0 10px 0 14px; border-radius: 7px; color: var(--ink-3); white-space: nowrap; transition: color var(--t-base), background var(--t-base); }
.nav-a:hover { color: var(--ink); background: rgba(var(--ink-rgb), var(--wash)); }
.nav-a.on { color: var(--ink); font-weight: 560; background: var(--surface); box-shadow: var(--shadow-1); }
.nav-a.on::before { content: ""; position: absolute; left: -2px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--ink); }
.nav-a .count { margin-left: auto; font-size: 11px; color: var(--ink-5); }
.shell.mini .nav-sec-h span, .shell.mini .nav-sec-h .chev, .shell.mini .nav-items, .shell.mini .brand-text, .shell.mini .side-search span, .shell.mini .side-search kbd, .shell.mini .me-text, .shell.mini .env-chip { display: none; }
.shell.mini .nav-sec-h { justify-content: center; padding: 0; }
.shell.mini .side-search { justify-content: center; padding: 0; }
.side-foot { border-top: 1px solid var(--edge); padding: 8px; flex: none; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer; border: 0; background: none; width: 100%; text-align: left; transition: background var(--t-base); }
.me:hover { background: rgba(var(--ink-rgb), var(--wash)); }
.me-text { min-width: 0; line-height: 1.25; }
.me-text b { display: block; font-weight: 560; } .me-text small { color: var(--ink-4); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 10px; padding: 0 24px 0 16px; border-bottom: 1px solid var(--edge); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px) saturate(1.4); position: relative; z-index: 5; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--ink-4); min-width: 0; white-space: nowrap; }
.crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink); font-weight: 560; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { color: var(--ink-5); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); flex: none; animation: pulse 2.4s var(--ease-io) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.content { flex: 1; overflow: auto; position: relative; scroll-behavior: smooth; }
.page { padding: 24px 28px 64px; max-width: 1640px; margin: 0 auto; animation: page-in var(--t-panel) var(--ease-out) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } }
.page.wide { max-width: none; }

/* page header */
.ph { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph-t { min-width: 0; flex: 1; }
.ph h1 { font-size: 24px; line-height: 1.15; font-weight: 640; letter-spacing: -.022em; margin: 0; display: flex; align-items: center; gap: 10px; }
.ph p { margin: 6px 0 0; color: var(--ink-4); max-width: 760px; }
.ph-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ph-kicker { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }

/* layout grid */
.g { display: grid; gap: 16px; margin-bottom: 16px; }
.g:last-child { margin-bottom: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .g-5 { grid-template-columns: repeat(5, minmax(0,1fr)); } .g-6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.g-12 { grid-template-columns: repeat(12, minmax(0,1fr)); }
.s-2 { grid-column: span 2; } .s-3 { grid-column: span 3; } .s-4 { grid-column: span 4; } .s-5 { grid-column: span 5; } .s-6 { grid-column: span 6; } .s-7 { grid-column: span 7; } .s-8 { grid-column: span 8; } .s-9 { grid-column: span 9; } .s-12 { grid-column: 1 / -1; }
@media (max-width: 1200px) { .g-4, .g-5, .g-6 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g-12 > * { grid-column: 1 / -1; } .g-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 760px) { .g-2, .g-3, .g-4, .g-5, .g-6 { grid-template-columns: 1fr; } .shell { grid-template-columns: 0 1fr; } .page { padding: 16px 16px 48px; } }

/* cards */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; display: flex; flex-direction: column; position: relative; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; min-height: 44px; }
.card-h h3 { margin: 0; font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; display: flex; align-items: center; gap: 8px; }
.card-h .sub { color: var(--ink-4); font-size: 12.5px; }
.card-h .card-a { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-b { padding: 12px 16px 16px; flex: 1; min-width: 0; }
.card-b.flush { padding: 8px 0 0; }
.card-b.flush-x { padding-left: 0; padding-right: 0; }
.card-f { border-top: 1px solid var(--edge-2); padding: 10px 16px; display: flex; align-items: center; gap: 8px; color: var(--ink-4); font-size: 12.5px; }
.card.sunk { background: var(--sunk); box-shadow: none; border: 1px solid var(--edge-2); }
.card.hero { background: var(--ink); color: var(--on-ink); }
.card-link { transition: box-shadow var(--t-base), transform var(--t-fast) var(--ease-out); cursor: pointer; }
.card-link:hover { box-shadow: var(--shadow-2); }
.card-link:active { transform: scale(.985); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); margin-bottom: 16px; overflow: hidden; }
.kpi { padding: 14px 16px 12px; position: relative; min-width: 0; border-right: 1px solid var(--edge-2); display: flex; flex-direction: column; gap: 2px; }
.kpi:last-child { border-right: 0; }
.kpi-l { color: var(--ink-4); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.kpi-v { font-size: 25px; font-weight: 620; letter-spacing: -.025em; line-height: 1.2; display: flex; align-items: baseline; gap: 8px; }
.kpi-v small { font-size: 13px; font-weight: 500; color: var(--ink-4); letter-spacing: 0; }
.kpi-f { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.kpi-f .spark { margin-left: auto; width: 84px; height: 24px; }
.kpi.link { cursor: pointer; transition: background var(--t-base); }
.kpi.link:hover { background: rgba(var(--ink-rgb), var(--wash)); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 560; padding: 1px 6px 1px 4px; border-radius: 6px; font-variant-numeric: tabular-nums; animation: pop .42s var(--ease-pop) both; }
.delta.up { color: var(--ok); background: var(--ok-soft); } .delta.down { color: var(--bad); background: var(--bad-soft); } .delta.flat { color: var(--ink-4); background: rgba(var(--ink-rgb), var(--wash)); }
.delta.inv.up { color: var(--bad); background: var(--bad-soft); } .delta.inv.down { color: var(--ok); background: var(--ok-soft); }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }
.roll { display: inline-block; animation: roll .5s var(--ease-out) both; }
@keyframes roll { from { opacity: 0; transform: translateY(.35em); filter: blur(2px); } }

/* buttons */
.btn { --h: 32px; height: var(--h); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border-radius: var(--r-sm); border: 0; cursor: pointer; font-weight: 550; white-space: nowrap; user-select: none;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); transition: background var(--t-base), box-shadow var(--t-base), color var(--t-base), transform var(--t-fast) var(--ease-out), opacity var(--t-base); }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn.accent { background: var(--pick); color: #fff; box-shadow: none; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-3); }
.btn.ghost:hover { background: rgba(var(--ink-rgb), var(--wash)); color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; box-shadow: none; }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 88%, #000); }
.btn.danger-soft { color: var(--bad); }
.btn.sm { --h: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.xs { --h: 24px; padding: 0 8px; font-size: 12px; border-radius: 6px; gap: 4px; }
.btn.icon { width: var(--h); padding: 0; }
.btn[disabled], .btn.loading { opacity: .5; pointer-events: none; }
.btn.loading::after { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.6px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; box-shadow: var(--shadow-1); border-radius: var(--r-sm); }
.btn-group .btn { box-shadow: none; border-radius: 0; } .btn-group .btn:first-child { border-radius: var(--r-sm) 2px 2px var(--r-sm); } .btn-group .btn:last-child { border-radius: 2px var(--r-sm) var(--r-sm) 2px; }
.btn-group .btn + .btn { border-left: 1px solid var(--edge); }

/* segmented + tabs */
.seg { position: relative; display: inline-flex; padding: 2px; border-radius: 9px; background: rgba(var(--ink-rgb), .06); gap: 0; }
.seg button { position: relative; z-index: 1; height: 26px; padding: 0 10px; border: 0; background: none; cursor: pointer; border-radius: 7px; color: var(--ink-3); font-weight: 540; font-size: 12.5px; transition: color var(--t-base), transform var(--t-fast); white-space: nowrap; }
.seg button:active { transform: scale(.96); }
.seg button.on { color: var(--ink); }
.seg-thumb { position: absolute; top: 2px; bottom: 2px; border-radius: 7px; background: var(--surface); box-shadow: var(--shadow-1), 0 1px 3px rgba(0,0,0,.06); transition: left var(--t-move) var(--ease-spring), width var(--t-move) var(--ease-spring); }
.tabs { position: relative; display: flex; gap: 2px; border-bottom: 1px solid var(--edge); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { position: relative; padding: 10px 12px 11px; border: 0; background: none; cursor: pointer; color: var(--ink-4); font-weight: 540; white-space: nowrap; display: flex; align-items: center; gap: 6px; transition: color var(--t-base); }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .on { color: var(--ink); }
.tabs .count { font-size: 11px; padding: 0 6px; border-radius: 10px; background: rgba(var(--ink-rgb), .07); color: var(--ink-3); }
.tab-bar { position: absolute; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; transition: left var(--t-move) var(--ease-out), width var(--t-move) var(--ease-out); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 560; white-space: nowrap; background: rgba(var(--ink-rgb), .065); color: var(--ink-2); line-height: 1; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.solid { background: var(--ink); color: var(--on-ink); }
.badge.outline { background: none; box-shadow: inset 0 0 0 1px var(--rule); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 540; border: 1px solid var(--edge); color: var(--ink-3); background: var(--surface); }

/* avatars */
.av { --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: grid; place-items: center; font-size: calc(var(--s) * .4); font-weight: 600; color: #fff; overflow: hidden; background: var(--k8); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sq { border-radius: 28%; }
.av.s { --s: 22px; } .av.l { --s: 40px; } .av.xl { --s: 64px; }
.av-stack { display: flex; } .av-stack .av { box-shadow: 0 0 0 2px var(--surface); margin-left: -6px; } .av-stack .av:first-child { margin-left: 0; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-t { min-width: 0; line-height: 1.3; } .person-t b { display: block; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .person-t small { color: var(--ink-4); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* tables */
.tbl-wrap { overflow: auto; position: relative; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 540; color: var(--ink-4); font-size: 12px; padding: 8px 12px; border-bottom: 1px solid var(--edge); white-space: nowrap; user-select: none; }
.tbl th.sort { cursor: pointer; } .tbl th.sort:hover { color: var(--ink); }
.tbl th .arr { opacity: 0; margin-left: 3px; transition: opacity var(--t-base), transform var(--t-move) var(--ease-out); display: inline-block; }
.tbl th.sorted .arr { opacity: 1; color: var(--ink); } .tbl th.sorted.asc .arr { transform: rotate(180deg); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--edge-2); vertical-align: middle; white-space: nowrap; max-width: 380px; overflow: hidden; text-overflow: ellipsis; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 16px; } .tbl th:last-child, .tbl td:last-child { padding-right: 16px; }
.tbl .num, .tbl th.num { text-align: right; }
.tbl tbody tr { transition: background var(--t-fast); }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:hover { background: rgba(var(--ink-rgb), var(--wash)); }
.tbl tbody tr.sel { background: var(--pick-soft); }
.tbl .chk { width: 36px; padding-right: 0; }
.tbl.dense td { padding-top: 6px; padding-bottom: 6px; }
.tbl tbody tr { animation: row-in .32s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 14ms); }
@keyframes row-in { from { opacity: 0; transform: translateY(3px); } }
.tbl-foot { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--edge-2); color: var(--ink-4); font-size: 12.5px; }
.tbl-foot .row { margin-left: auto; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell i { display: block; height: 6px; border-radius: 3px; background: var(--k1); opacity: .85; }
.bulk { position: sticky; bottom: 16px; margin: 0 auto; width: max-content; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-3); z-index: 3; animation: bulk-in var(--t-open) var(--ease-out); }
.bulk .btn { background: rgba(255,255,255,.12); color: inherit; box-shadow: none; }
:root[data-theme="dark"] .bulk .btn { background: rgba(0,0,0,.08); }
@keyframes bulk-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }

/* filters / toolbar */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; height: 32px; border-radius: var(--r-sm); background: var(--surface-2); padding: 0 10px; gap: 8px; color: var(--ink-4); min-width: 220px; transition: box-shadow var(--t-base), background var(--t-base); }
.search:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule), 0 0 0 3px rgba(var(--pick-rgb), .14); }
.search input { border: 0; outline: 0; background: none; height: 100%; flex: 1; min-width: 0; color: var(--ink); }
.chip-btn { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: var(--r-pill); border: 1px dashed var(--rule); background: none; color: var(--ink-3); cursor: pointer; font-weight: 520; font-size: 12.5px; transition: background var(--t-base), border-color var(--t-base), transform var(--t-fast); white-space: nowrap; }
.chip-btn:hover { background: rgba(var(--ink-rgb), var(--wash)); }
.chip-btn:active { transform: scale(.96); }
.chip-btn.on { border-style: solid; border-color: transparent; background: rgba(var(--ink-rgb), .08); color: var(--ink); }
.chip-btn .x { margin-right: -4px; opacity: .6; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .field-l { font-weight: 550; font-size: 12.5px; color: var(--ink-2); }
.field .help { color: var(--ink-4); font-size: 12px; }
.field .err { color: var(--bad); font-size: 12px; }
.input, .select, .textarea { width: 100%; height: 34px; border-radius: var(--r-sm); border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); padding: 0 10px; outline: 0; transition: box-shadow var(--t-base); color: var(--ink); }
.input:hover, .select:hover, .textarea:hover { box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .24); }
.input:focus, .select:focus, .textarea:focus { box-shadow: inset 0 0 0 1px rgba(var(--pick-rgb), .8), 0 0 0 3px rgba(var(--pick-rgb), .16); }
.textarea { height: auto; min-height: 90px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-4) 50%), linear-gradient(135deg, var(--ink-4) 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 11px) 15px; background-size: 4px 4px; background-repeat: no-repeat; padding-right: 26px; }
.field.invalid .input, .field.invalid .textarea { box-shadow: inset 0 0 0 1px var(--bad); animation: shake .32s var(--ease-out); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.toggle { position: relative; width: 34px; height: 20px; border-radius: 20px; background: rgba(var(--ink-rgb), .16); border: 0; cursor: pointer; flex: none; transition: background var(--t-base); padding: 0; }
.toggle::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--t-move) var(--ease-spring); }
.toggle[aria-checked="true"] { background: var(--ok); }
.toggle[aria-checked="true"]::after { transform: translateX(14px); }
.toggle:active::after { width: 19px; }
.toggle[aria-checked="true"]:active::after { transform: translateX(11px); }
.check { width: 16px; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px rgba(var(--ink-rgb), .3); appearance: none; margin: 0; cursor: pointer; display: grid; place-items: center; transition: background var(--t-base), box-shadow var(--t-base); background: var(--surface); }
.check:checked { background: var(--ink); box-shadow: none; }
.check:checked::after { content: ""; width: 8px; height: 4px; border: 1.8px solid var(--on-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); animation: pop .26s var(--ease-pop); }
.opt-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--edge-2); }
.opt-row:last-child { border-bottom: 0; }
.opt-row .col { flex: 1; } .opt-row b { font-weight: 560; } .opt-row small { color: var(--ink-4); }

/* key/value, lists, timeline */
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 0; margin: 0; }
.kv dt { color: var(--ink-4); padding: 7px 12px 7px 0; border-bottom: 1px solid var(--edge-2); white-space: nowrap; }
.kv dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--edge-2); min-width: 0; overflow-wrap: anywhere; text-align: right; }
.kv dt:nth-last-child(2), .kv dd:last-child { border-bottom: 0; }
.kv.left dd { text-align: left; }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--edge-2); min-width: 0; transition: background var(--t-fast); }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; } .li.click:hover { background: rgba(var(--ink-rgb), var(--wash)); }
.li-m { flex: 1; min-width: 0; } .li-m b { font-weight: 560; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .li-m small { color: var(--ink-4); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-r { text-align: right; flex: none; }
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--edge); }
.tl-i { position: relative; padding: 0 0 16px; animation: row-in .32s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 30ms); }
.tl-i:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -22px; top: 1px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--rule); display: grid; place-items: center; color: var(--ink-3); }
.tl-dot.ok { box-shadow: inset 0 0 0 1.5px var(--ok); color: var(--ok); } .tl-dot.bad { box-shadow: inset 0 0 0 1.5px var(--bad); color: var(--bad); } .tl-dot.warn { box-shadow: inset 0 0 0 1.5px var(--warn); color: var(--warn); } .tl-dot.info { box-shadow: inset 0 0 0 1.5px var(--pick); color: var(--pick); }
.tl-dot svg { width: 9px; height: 9px; stroke-width: 2.4; }
.tl-t { font-weight: 540; } .tl-m { color: var(--ink-4); font-size: 12.5px; margin-top: 1px; } .tl-b { margin-top: 6px; color: var(--ink-3); }

/* progress, meters */
.prog { height: 6px; border-radius: 6px; background: rgba(var(--ink-rgb), .08); overflow: hidden; }
.prog > i { display: block; height: 100%; border-radius: inherit; background: var(--ink); transform-origin: left; animation: grow-x .7s var(--ease-out) both; }
.prog.ok > i { background: var(--ok); } .prog.bad > i { background: var(--bad); } .prog.warn > i { background: var(--warn); } .prog.pick > i { background: var(--pick); }
@keyframes grow-x { from { transform: scaleX(0); } }
.meter { display: flex; height: 10px; border-radius: 10px; overflow: hidden; gap: 2px; background: rgba(var(--ink-rgb), .06); }
.meter > i { display: block; height: 100%; transition: opacity var(--t-base), flex-grow var(--t-morph) var(--ease-io); animation: grow-x .7s var(--ease-out) both; transform-origin: left; }
.meter.dim > i:not(.hot) { opacity: .22; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; cursor: default; transition: opacity var(--t-base); }
.legend .dot { width: 8px; height: 8px; border-radius: 3px; }
.legend b { font-weight: 560; color: var(--ink); font-variant-numeric: tabular-nums; }

/* charts */
.chart { position: relative; width: 100%; min-width: 0; }
.chart svg { display: block; overflow: visible; }
.chart .ax text, .chart text.ax { fill: var(--ink-5); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .gl { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw .9s var(--ease-out) forwards; }
.chart .ln.prev { stroke-dasharray: 4 4; opacity: .45; stroke-width: 1.5; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .ar { opacity: 0; animation: fade-in .7s .15s var(--ease-out) forwards; }
@keyframes fade-in { to { opacity: 1; } }
.chart .bar { transform-box: fill-box; transform-origin: bottom; animation: grow-y .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 22ms); transition: opacity var(--t-base); }
.chart .bar.h { transform-origin: left; animation-name: grow-x; }
@keyframes grow-y { from { transform: scaleY(0); } }
.chart.hovering .bar:not(.hot) { opacity: .45; }
.chart .xhair { stroke: rgba(var(--ink-rgb), .3); stroke-width: 1; shape-rendering: crispEdges; pointer-events: none; transition: opacity var(--t-fast); }
.chart .hdot { stroke: var(--surface); stroke-width: 2; pointer-events: none; transition: cx var(--t-fast) var(--ease-out), cy var(--t-fast) var(--ease-out); }
.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--surface); color: var(--ink); border-radius: 10px; box-shadow: var(--shadow-3); padding: 8px 10px; font-size: 12px; min-width: 140px; opacity: 0; transform: translateY(4px); transition: opacity var(--t-fast), transform var(--t-move) var(--ease-out), left .1s var(--ease-out), top .1s var(--ease-out); }
.tip.on { opacity: 1; transform: none; }
.tip-h { color: var(--ink-4); margin-bottom: 4px; font-weight: 500; }
.tip-r { display: flex; align-items: center; gap: 8px; padding: 1px 0; } .tip-r b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; padding-left: 12px; }
.tip-r .dot { width: 8px; height: 8px; border-radius: 3px; }
.donut-c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut-c b { display: block; font-size: 22px; font-weight: 640; letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .donut-c small { color: var(--ink-4); }
.donut path { transition: opacity var(--t-base), transform var(--t-move) var(--ease-out); transform-origin: center; cursor: default; }
.donut.hovering path:not(.hot) { opacity: .3; }
.heat td { padding: 0; border: 0; }
.heat-cell { width: 100%; height: 22px; border-radius: 4px; transition: transform var(--t-fast) var(--ease-out); }
.heat-cell:hover { transform: scale(1.12); box-shadow: var(--focus-ring); }
.cohort { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.cohort th { color: var(--ink-4); font-weight: 520; text-align: left; padding: 2px 6px; white-space: nowrap; }
.cohort td { text-align: center; padding: 6px 4px; border-radius: 5px; font-variant-numeric: tabular-nums; min-width: 44px; }
.funnel { display: flex; align-items: flex-end; gap: 6px; }
.fstep { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fbar { position: relative; background: rgba(var(--ink-rgb), .05); border-radius: 8px; overflow: hidden; }
.fbar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--k1); border-radius: 8px 8px 0 0; transform-origin: bottom; animation: grow-y .7s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
.fstep b { font-size: 18px; font-weight: 620; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fstep small { color: var(--ink-4); }
.fdrop { font-size: 11.5px; color: var(--bad); font-weight: 560; }
.rank { display: flex; flex-direction: column; gap: 2px; }
.rank-i { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 6px 0; position: relative; }
.rank-i .l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.rank-i .v { font-variant-numeric: tabular-nums; font-weight: 560; }
.rank-i .b { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(var(--ink-rgb), .06); overflow: hidden; }
.rank-i .b i { display: block; height: 100%; border-radius: 4px; background: var(--k1); transform-origin: left; animation: grow-x .7s var(--ease-out) both; animation-delay: calc(var(--i) * 40ms); }
.gauge text { font-variant-numeric: tabular-nums; }

/* overlays: drawer, modal, menu, toast, command */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; opacity: 0; transition: opacity .2s; }
.scrim.on { opacity: 1; }
.drawer { position: fixed; top: 8px; right: 8px; bottom: 8px; width: min(var(--w, 560px), calc(100vw - 16px)); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-4); z-index: 51; display: flex; flex-direction: column; transform: translateX(calc(100% + 16px)); transition: transform .5s var(--ease-drawer); }
.drawer.on { transform: none; }
.drawer.out { transition: transform .26s var(--ease-exit); }
.drawer-h { padding: 18px 20px 14px; display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--edge-2); }
.drawer-h h2 { margin: 0; font-size: 17px; font-weight: 630; letter-spacing: -.015em; }
.drawer-h p { margin: 3px 0 0; color: var(--ink-4); }
.drawer-b { flex: 1; overflow: auto; padding: 18px 20px; }
.drawer-f { padding: 12px 20px; border-top: 1px solid var(--edge-2); display: flex; gap: 8px; justify-content: flex-end; }
.modal { position: fixed; left: 50%; top: 50%; width: min(var(--w, 480px), calc(100vw - 32px)); max-height: calc(100vh - 64px); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-4); z-index: 52; display: flex; flex-direction: column; transform: translate(-50%, -50%) translateY(8px) scale(.96); opacity: 0; transition: transform var(--t-open) var(--ease-out), opacity .2s; }
.modal.on { transform: translate(-50%, -50%); opacity: 1; }
.modal.out { transition: transform .18s var(--ease-exit), opacity .18s; }
.modal-b { padding: 22px 22px 8px; overflow: auto; }
.modal-b h2 { margin: 0 0 6px; font-size: 17px; font-weight: 630; letter-spacing: -.015em; }
.modal-b > p { margin: 0 0 16px; color: var(--ink-3); }
.modal-f { padding: 14px 22px 20px; display: flex; gap: 8px; justify-content: flex-end; }
.modal-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: rgba(var(--ink-rgb), .06); }
.modal-ico.bad { background: var(--bad-soft); color: var(--bad); }
.menu { position: fixed; z-index: 60; min-width: 200px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-3); padding: 5px; transform-origin: var(--ox, top left); animation: menu-in var(--t-open) var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.96); filter: blur(2px); } }
.menu.out { animation: menu-out .14s var(--ease-exit) forwards; }
@keyframes menu-out { to { opacity: 0; transform: scale(.97); } }
.menu button, .menu a { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; text-align: left; color: var(--ink-2); white-space: nowrap; }
.menu button:hover, .menu a:hover, .menu .act { background: rgba(var(--ink-rgb), var(--wash-2)); color: var(--ink); }
.menu .danger { color: var(--bad); }
.menu hr { border: 0; height: 1px; background: var(--edge); margin: 4px 6px; }
.menu .mh { padding: 6px 10px 4px; font-size: 11.5px; color: var(--ink-4); font-weight: 560; }
.menu kbd { margin-left: auto; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 99; display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 420px; padding: 11px 12px 11px 14px; border-radius: 12px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-3); animation: toast-in .42s var(--ease-soft) both; font-weight: 500; }
.toast.out { animation: toast-out .22s var(--ease-exit) forwards; }
.toast .ico { opacity: .8; }
.toast.bad .ico { color: #ff8a7a; } .toast.ok .ico { color: #5fe39c; }
.toast .btn { margin-left: auto; background: rgba(127,127,127,.24); color: inherit; box-shadow: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
.cmdk { position: fixed; left: 50%; top: 12vh; width: min(640px, calc(100vw - 32px)); z-index: 70; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-4); overflow: hidden; transform: translateX(-50%) scale(.98); opacity: 0; transition: transform var(--t-open) var(--ease-out), opacity .16s; }
.cmdk.on { transform: translateX(-50%); opacity: 1; }
.cmdk-i { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 52px; border-bottom: 1px solid var(--edge); color: var(--ink-4); }
.cmdk-i input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; height: 100%; color: var(--ink); }
.cmdk-l { max-height: 52vh; overflow: auto; padding: 6px; }
.cmdk-g { padding: 8px 10px 4px; font-size: 11.5px; color: var(--ink-4); font-weight: 560; }
.cmdk-o { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 9px; cursor: pointer; color: var(--ink-2); }
.cmdk-o.act { background: rgba(var(--ink-rgb), var(--wash-2)); color: var(--ink); }
.cmdk-o small { margin-left: auto; color: var(--ink-5); }
.cmdk-f { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--edge); color: var(--ink-4); font-size: 12px; }

/* empty, skeleton, error */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; gap: 6px; color: var(--ink-4); }
.empty-art { display: flex; gap: 4px; align-items: flex-end; height: 34px; margin-bottom: 10px; }
.empty-art i { width: 8px; border-radius: 3px; background: rgba(var(--ink-rgb), .1); animation: grow-y .6s var(--ease-out) both; animation-delay: calc(var(--i) * 50ms); transform-origin: bottom; }
.empty b { color: var(--ink-2); font-weight: 580; font-size: 14px; }
.empty p { margin: 0 0 10px; max-width: 360px; }
.skel { border-radius: 8px; background: linear-gradient(90deg, rgba(var(--ink-rgb), .05) 0%, rgba(var(--ink-rgb), .09) 50%, rgba(var(--ink-rgb), .05) 100%); background-size: 200% 100%; animation: skel 1.2s linear infinite, fade-in .3s .15s both; opacity: 0; }
@keyframes skel { to { background-position: -200% 0; } }
.err-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--bad-soft); color: var(--bad); }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: rgba(var(--ink-rgb), .045); color: var(--ink-2); }
.callout.info { background: var(--info-soft); } .callout.warn { background: var(--warn-soft); } .callout.bad { background: var(--bad-soft); } .callout.ok { background: var(--ok-soft); }
.callout .ico { margin-top: 1px; }
.callout.info .ico { color: var(--info); } .callout.warn .ico { color: var(--warn); } .callout.bad .ico { color: var(--bad); } .callout.ok .ico { color: var(--ok); }

/* code / json */
.code { font: 12px/1.55 var(--font-mono); background: var(--sunk); border-radius: var(--r-md); padding: 12px 14px; overflow: auto; white-space: pre; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--edge-2); max-height: 420px; }
.code .k { color: var(--k4); } .code .s { color: var(--k2); } .code .n { color: var(--k3); } .code .b { color: var(--k5); }

/* entity header (customer, ticket, title) */
.ent { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.ent-t h1 { margin: 0; font-size: 22px; font-weight: 640; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.ent-t p { margin: 4px 0 0; color: var(--ink-4); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ent-a { margin-left: auto; display: flex; gap: 8px; }
.stat-strip { display: flex; gap: 28px; padding: 12px 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); margin-bottom: 16px; overflow-x: auto; }
.stat-strip > div { white-space: nowrap; } .stat-strip small { display: block; color: var(--ink-4); font-size: 12px; } .stat-strip b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* poster / thumb */
.thumb { width: 36px; height: 54px; border-radius: 6px; background: var(--surface-3) center/cover; flex: none; box-shadow: inset 0 0 0 1px var(--edge); }
.thumb.wide { width: 72px; height: 40px; }
.thumb.sq { width: 36px; height: 36px; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.poster { position: relative; cursor: pointer; transition: transform var(--t-fast) var(--ease-out); }
.poster:active { transform: scale(.97); }
.poster .img { aspect-ratio: 2/3; border-radius: 10px; background: var(--surface-3) center/cover; box-shadow: var(--shadow-1); transition: box-shadow var(--t-base); }
.poster:hover .img { box-shadow: var(--shadow-2); }
.poster b { display: block; margin-top: 6px; font-weight: 540; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster small { color: var(--ink-4); font-size: 11.5px; }

/* sign in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, rgba(var(--ink-rgb), .05), transparent), var(--bg); }
.signin-card { width: min(400px, 100%); background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-3); padding: 32px; animation: page-in .42s var(--ease-out) both; }
.signin-card h1 { margin: 18px 0 6px; font-size: 21px; font-weight: 640; letter-spacing: -.02em; }
.signin-card p { margin: 0 0 22px; color: var(--ink-4); }
.otp { display: flex; gap: 8px; margin-bottom: 16px; }
.otp input { width: 100%; height: 48px; text-align: center; font-size: 20px; font-weight: 600; border-radius: 10px; border: 0; box-shadow: inset 0 0 0 1px var(--rule); background: var(--surface); outline: 0; transition: box-shadow var(--t-base), transform var(--t-fast) var(--ease-spring); }
.otp input:focus { box-shadow: inset 0 0 0 1.5px var(--pick), 0 0 0 3px rgba(var(--pick-rgb), .16); transform: translateY(-1px); }

/* misc */
.divider { height: 1px; background: var(--edge); margin: 16px 0; }
.section-t { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); margin: 22px 0 10px; }
.hint-k { display: inline-flex; gap: 4px; align-items: center; color: var(--ink-5); font-size: 12px; }
.flag { display: inline-grid; place-items: center; width: 22px; height: 15px; border-radius: 3px; font-size: 9px; font-weight: 700; letter-spacing: .02em; background: rgba(var(--ink-rgb), .08); color: var(--ink-3); flex: none; }
.big-num { font-size: 40px; font-weight: 650; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.status-dot.ok { background: var(--ok); } .status-dot.bad { background: var(--bad); } .status-dot.warn { background: var(--warn); } .status-dot.off { background: var(--ink-5); } .status-dot.info { background: var(--pick); }
.uptime { display: flex; gap: 2px; height: 26px; align-items: stretch; }
.uptime i { flex: 1; border-radius: 2px; background: var(--ok); opacity: .85; transition: transform var(--t-fast) var(--ease-out); }
.uptime i:hover { transform: scaleY(1.15); opacity: 1; }
.uptime i.warn { background: var(--warn); } .uptime i.bad { background: var(--bad); } .uptime i.off { background: rgba(var(--ink-rgb), .1); }
.split { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 16px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .08s !important; } }
