@font-face { font-family: "Inter"; src: url("fonts/inter-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
/* Mantis SEDR console theme: design tokens and shared components for the operator and SOC consoles.
   Restraint over decoration: three surface levels instead of borders everywhere (the sidebar darkest, then the page, then
   cards and the drawer), hairlines where a line is needed, no shadows, one accent for anything you can act on, and a muted
   risk scale used only for risk: none a quiet neutral, low a cool blue-grey, medium amber, high a warm orange, critical a
   deep red. Inter for the interface, JetBrains Mono for data (ids, numbers, scores). Weights: titles 600, section headers
   500, text and labels 400. Spacing on an 8 px grid (4 for the tightest steps). Motion: 150 to 200 ms, ease-out. */
:root {
  color-scheme: dark;
  --side: #0a0c0f;
  --page: #0e1115;
  --surface: #14181d;
  --surface-2: #191d23;
  --surface-3: #20252c;
  --hover: rgba(255,255,255,0.022);
  --hover-strong: rgba(255,255,255,0.045);
  --border: #1f242b;
  --border-strong: #2b313a;
  --grid: #1a1f25;
  --ink: #e3e6ea;
  --ink-2: #a8afb9;
  --ink-muted: #79818c;
  --ink-faint: #4f5761;
  --ink-sub: color-mix(in srgb, var(--ink-2) 68%, var(--ink-muted));   /* supporting text under a figure: its own shade */
  --accent: #3a72d4;          /* white text on it reads at 4.6:1 */
  --accent-hover: #3266c2;
  --accent-ink: #93b6f0;
  --accent-data: #5a91ea;
  --lvl-none: #626a75;
  --lvl-low: #7a8fa6;
  --warning: #c79a42;
  --high: #c9733f;
  --critical: #b9444a;
  --good: #3d9a6a;
  --level: var(--lvl-none);
  --tag-none-ink: #a3aab3;
  --tag-low-ink: #aebfd1;
  --tag-good-ink: #86c7a3;
  --tag-warn-ink: #dcbf7f;
  --tag-high-ink: #e3a27a;
  --tag-bad-ink: #e3989b;
  --test: #8a7fcf;            /* a call that is not real: its own quiet hue, outside the risk scale */
  --tag-test-ink: #c4bbef;
  --caller-chip-ink: #b5c9ee;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --shadow: none;
  --shadow-lg: none;
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  --bar-h: 52px;
  --t-fast: 150ms;
  --t: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --side: #e9ecf0; --page: #f3f4f6; --surface: #ffffff; --surface-2: #f6f7f9; --surface-3: #eceef2; --hover: rgba(15,23,42,0.025); --hover-strong: rgba(15,23,42,0.045);
  --border: #e2e5ea; --border-strong: #d0d5dc; --grid: #eef0f3; --ink: #14171c; --ink-2: #4a515c; --ink-muted: #737c88; --ink-faint: #a6adb7;
  --accent: #2f6bd6; --accent-hover: #255cc0; --accent-ink: #2556b0; --accent-data: #2f6bd6;
  --lvl-none: #8a929d; --lvl-low: #5d7590; --warning: #a87b1e; --high: #b45f2b; --critical: #a8373c; --good: #2e7d55;
  --tag-none-ink: #5b636e; --tag-low-ink: #3f5a78; --tag-good-ink: #1f6643; --tag-warn-ink: #7a5810; --tag-high-ink: #8c4318; --tag-bad-ink: #8e2a2e; --caller-chip-ink: #1e3f8a; --test: #6e5cc2; --tag-test-ink: #4a3a9a;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    color-scheme: light;
    --side: #e9ecf0; --page: #f3f4f6; --surface: #ffffff; --surface-2: #f6f7f9; --surface-3: #eceef2; --hover: rgba(15,23,42,0.025); --hover-strong: rgba(15,23,42,0.045);
    --border: #e2e5ea; --border-strong: #d0d5dc; --grid: #eef0f3; --ink: #14171c; --ink-2: #4a515c; --ink-muted: #737c88; --ink-faint: #a6adb7;
    --accent: #2f6bd6; --accent-hover: #255cc0; --accent-ink: #2556b0; --accent-data: #2f6bd6;
    --lvl-none: #8a929d; --lvl-low: #5d7590; --warning: #a87b1e; --high: #b45f2b; --critical: #a8373c; --good: #2e7d55;
    --tag-none-ink: #5b636e; --tag-low-ink: #3f5a78; --tag-good-ink: #1f6643; --tag-warn-ink: #7a5810; --tag-high-ink: #8c4318; --tag-bad-ink: #8e2a2e; --caller-chip-ink: #1e3f8a; --test: #6e5cc2; --tag-test-ink: #4a3a9a;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); }
body { font-family: var(--font); font-size: 13px; line-height: 1.45; font-weight: 400; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
       font-feature-settings: "cv11", "ss03"; min-height: 100vh; }
a { color: var(--accent-ink); text-decoration: none; transition: color var(--t-fast) var(--ease); } a:hover { text-decoration: underline; text-underline-offset: 2px; }
code, .mono { font-family: var(--mono); font-size: 0.92em; font-feature-settings: normal; }
h1, h2, h3 { letter-spacing: -0.01em; font-weight: 600; }
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 3px solid var(--page); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
.num, .tnum { font-variant-numeric: tabular-nums; }
.ic { display: inline-block; flex: none; vertical-align: -0.2em; }

/* ---- risk levels: the muted scale, used only for risk ---- */
body.level-none { --level: var(--lvl-none); } body.level-low { --level: var(--lvl-low); }
body.level-medium { --level: var(--warning); }
body.level-high { --level: var(--high); }
body.level-critical { --level: var(--critical); }
.lvl-none { color: var(--tag-none-ink); } .lvl-low { color: var(--tag-low-ink); } .lvl-medium { color: var(--tag-warn-ink); } .lvl-high { color: var(--tag-high-ink); } .lvl-critical { color: var(--tag-bad-ink); }

/* ---- the brand: a geometric mantis head in the accent colour beside the wordmark ---- */
.app-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; height: var(--bar-h); padding: 0 16px;
              background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: none; } a.brand:hover { text-decoration: none; }
.brand-mark { width: 24px; height: 24px; display: grid; place-items: center; flex: none; color: var(--accent-data); }
.brand-mark svg { width: 24px; height: 24px; display: block; }
.brand > svg { width: 24px; height: 24px; flex: none; }
.brand-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; line-height: 1; }
.brand-sub { font-size: 12px; color: var(--ink-muted); line-height: 1; padding-left: 10px; border-left: 1px solid var(--border-strong); }
.brand-tag { margin-left: 5px; font-size: 0.7em; font-weight: 500; letter-spacing: 0.16em; color: var(--accent-ink); vertical-align: 0.1em; }
.app-nav { display: flex; align-self: stretch; gap: 2px; margin-left: 4px; }
.app-nav a { display: inline-flex; align-items: center; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
             transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.app-nav a:hover { color: var(--ink); text-decoration: none; }
.app-nav a.active { color: var(--ink); border-bottom-color: var(--accent); }
.header-pills { display: flex; gap: 8px; align-items: center; margin-left: auto; min-width: 0; flex-wrap: nowrap; overflow: hidden; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.user-chip .avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 500; color: var(--ink-2);
                     background: var(--surface-3); text-transform: uppercase; letter-spacing: 0.02em; }
.user-chip .roles { color: var(--ink-muted); }
.divider-v { width: 1px; align-self: center; height: 20px; background: var(--border-strong); }

/* ---- page ---- */
.page { max-width: 1440px; margin: 0 auto; padding: 16px 24px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 16px; flex-wrap: wrap; }
.page-title { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -0.015em; line-height: 1.25; }
.page-sub { margin: 4px 0 0; color: var(--ink-muted); font-size: 12.5px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--ink-muted); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; } .crumbs a { color: var(--ink-2); }
.stack { display: grid; gap: 16px; }

/* ---- SOC shell: the darkest surface for the sidebar (icons only when collapsed, and on narrow screens), then the page ---- */
.soc-shell { --side-w: 216px; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns var(--t) var(--ease); }
html.side-collapsed .soc-shell { --side-w: 56px; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 12px 8px; background: var(--side);
        border-right: 1px solid var(--border); overflow-x: hidden; overflow-y: auto; z-index: 50; }
.side .brand { padding: 12px 8px 24px; gap: 10px; min-height: 44px; }   /* the mark with room above and below */
.side .brand-text { display: grid; gap: 4px; min-width: 0; }
.side .brand-sub { padding: 0; border: 0; font-size: 11px; }
.side-link { position: relative; display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 10px; border-radius: var(--radius-sm);
             color: var(--ink-muted); font: 400 13px/1 var(--font); white-space: nowrap; background: transparent; border: 0; cursor: pointer; text-align: left; width: 100%;
             transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.side-link svg { width: 15px; height: 15px; flex: none; }
.side-link:hover { background: var(--hover-strong); color: var(--ink); text-decoration: none; }
.side-link.active { background: var(--hover-strong); color: var(--ink); font-weight: 500; }
.side-link.active svg { color: var(--accent-ink); }
.side-link.active::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 2px; border-radius: 0 2px 2px 0; background: var(--accent); }
.side-link .side-label { overflow: hidden; text-overflow: ellipsis; }
.side-link .n { margin-left: auto; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; display: inline-grid; place-items: center; font: 500 10.5px/1 var(--mono);
                color: var(--ink-2); background: var(--surface-3); font-variant-numeric: tabular-nums; }
.side-link .n:empty { display: none; }
.side-link .n.hot { color: #1b1408; background: var(--warning); } .side-link .n.bad { color: #fff; background: var(--critical); }
.side-sep { height: 1px; background: var(--border); margin: 8px 4px; flex: none; }
.side-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); display: grid; gap: 4px; }
.side-foot .user-chip { padding: 4px 6px; min-width: 0; }
.side-foot .who-text { display: grid; gap: 2px; min-width: 0; line-height: 1.25; } .side-foot .who-text > span { overflow: hidden; text-overflow: ellipsis; }
.side-foot .who-text > span:first-child { color: var(--ink); }
.side-foot .roles { font-size: 11px; }
html.side-collapsed .side { padding: 12px 6px; }
html.side-collapsed .side .brand { justify-content: center; padding: 12px 0 24px; }
html.side-collapsed .side .brand-text, html.side-collapsed .side-link .side-label, html.side-collapsed .side-foot .who-text { display: none; }
html.side-collapsed .side-link { justify-content: center; padding: 0; gap: 0; }
html.side-collapsed .side-link.active::before { left: -6px; }
html.side-collapsed .side-link .n { position: absolute; top: 2px; left: 26px; margin: 0; min-width: 15px; height: 15px; padding: 0 3px; font-size: 9px; }
html.side-collapsed .side-foot .user-chip { justify-content: center; padding: 4px 0; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px;
          background: var(--page); border-bottom: 1px solid var(--border); }
.topbar-title { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.topbar .search { flex: 1 1 320px; max-width: 480px; } .topbar .search input { width: 100%; height: 32px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.clock { font-family: var(--mono); font-size: 11.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.soc-shell .page { max-width: 1680px; width: 100%; margin: 0; }
kbd { font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: var(--radius-xs); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--ink-2); }
@media (max-width: 760px) {
  .topbar { padding: 8px 12px; flex-wrap: wrap; } .topbar .search { order: 3; flex-basis: 100%; max-width: none; }
}

/* ---- pills and badges: small, quiet, pill-shaped; a level's colour shows in a dot and a faint tint, never a block of colour ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 500;
        color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; line-height: 1;
        transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.pill b { color: var(--ink); font-weight: 600; }
a.pill:hover { text-decoration: none; border-color: var(--border-strong); color: var(--ink); }
.pill-mono { font-family: var(--mono); font-size: 11px; }
.pill-link { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pill-conn i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted); display: inline-block; }
.pill-conn.live { color: var(--tag-good-ink); background: color-mix(in srgb, var(--good) 9%, transparent); border-color: color-mix(in srgb, var(--good) 24%, var(--border)); }
.pill-conn.live i { background: var(--good); animation: ping 2.4s ease-out infinite; }
.pill-conn.error { color: var(--tag-bad-ink); background: color-mix(in srgb, var(--critical) 9%, transparent); border-color: color-mix(in srgb, var(--critical) 28%, var(--border)); } .pill-conn.error i { background: var(--critical); }
.pill-conn.ended i { background: var(--ink-muted); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 45%, transparent); } 100% { box-shadow: 0 0 0 6px transparent; } }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 16px; padding: 0 5px 0 4px; border-radius: 3px; font-size: 9.5px; font-weight: 500;
       letter-spacing: 0.045em; text-transform: uppercase; line-height: 1; color: var(--ink-2); background: var(--surface-3); border: 1px solid transparent; white-space: nowrap; vertical-align: middle; }
.tag::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--dot, var(--ink-muted)); flex: none; }
.tag-none { --dot: var(--lvl-none); color: var(--tag-none-ink); background: color-mix(in srgb, var(--lvl-none) 14%, transparent); }
.tag-low { --dot: var(--lvl-low); color: var(--tag-low-ink); background: color-mix(in srgb, var(--lvl-low) 14%, transparent); }
.tag-ok { --dot: var(--good); color: var(--tag-good-ink); background: color-mix(in srgb, var(--good) 12%, transparent); }
.tag-medium, .tag-warn { --dot: var(--warning); color: var(--tag-warn-ink); background: color-mix(in srgb, var(--warning) 12%, transparent); }
.tag-high { --dot: var(--high); color: var(--tag-high-ink); background: color-mix(in srgb, var(--high) 13%, transparent); }
.tag-critical, .tag-bad { --dot: var(--critical); color: var(--tag-bad-ink); background: color-mix(in srgb, var(--critical) 15%, transparent); }
.tag-neutral { --dot: var(--ink-muted); }
.tag-test { --dot: var(--test); color: var(--tag-test-ink); background: color-mix(in srgb, var(--test) 15%, transparent); }
.calls .who .tag-test { margin-right: 6px; }
/* what the agent did from the operator console: an escalation to the SOC (something to act on), and its legitimate flag, which
   is the agent's view: an indicator in a neutral grey, never a verdict colour */
.tag-esc { --dot: var(--accent); color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tag-legit { --dot: var(--ink-2); color: var(--ink-2); background: color-mix(in srgb, var(--ink-2) 12%, transparent); }
.agent-cell { display: inline-flex; align-items: center; gap: 6px; }
/* the outcome check found the agent carrying out the request before verification: the one solid badge there is */
.tag-comp { --dot: #fff; color: #fff; background: var(--critical); }
.tag-fp { --dot: var(--ink-2); color: var(--ink); background: var(--surface-3); }
/* a campaign the analyst linked calls into (bulk triage) */
.tag-camp { --dot: var(--accent-data); color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tag-lg { height: 22px; font-size: 10.5px; padding: 0 8px 0 7px; gap: 6px; border-radius: 4px; } .tag-lg::before { width: 6px; height: 6px; }

/* ---- panels: one shade lighter than the page, a hairline border, no shadow ---- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; min-width: 0; }
.panel > .panel-head:first-child, .panel > details > summary > .panel-head { margin: -16px -16px 16px; padding: 0 16px; min-height: 44px; border-bottom: 1px solid var(--border); }
.panel-title, .label { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin: 0; }
.panel > .panel-head:first-child .panel-title, .panel > details > summary > .panel-head .panel-title, .panel > .panel-title:first-child {
  font-size: 13px; font-weight: 500; letter-spacing: -0.005em; text-transform: none; color: var(--ink); }
.panel-sub { font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel.flush { padding: 0; } .panel.flush > .panel-head:first-child { margin: 0; }
.panel.flush > .table-scroll, .panel.flush > .table { border-radius: 0 0 var(--radius) var(--radius); }
.card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; }
.empty { color: var(--ink-muted); font-size: 12.5px; }
.count { font-family: var(--mono); color: var(--ink-muted); font-size: 11px; }
.callout { padding: 8px 12px; border: 1px solid var(--border); border-left: 3px solid var(--ink-faint); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

/* ---- metrics ---- */
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; min-width: 0; }
.stat .k { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v { font-size: 19px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.15; }
.stat .v small { font-size: 11px; color: var(--ink-muted); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.stat .sub { font-size: 11.5px; color: var(--ink-sub); margin-top: 4px; }
.stat-strip { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.stat-strip > .stat { border: 0; border-radius: 0; background: var(--surface); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 8px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; min-width: 0; position: relative; }
.kpi .k { font-size: 10px; color: var(--ink-muted); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.kpi .v { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; margin-top: 8px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 11.5px; color: var(--ink-sub); margin-top: 6px; line-height: 1.4; }
.kpi.alert::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--critical); }
.meter { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--accent-data); transition: width 400ms var(--ease); }

/* ---- tables: uppercase 11 px headers, hairline rows, a quiet hover; the row open in the drawer carries an accent edge ---- */
.table-scroll { overflow: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.table th, .table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--grid); vertical-align: middle; line-height: 1.35; }
.table th { color: var(--ink-muted); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
            background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; }
.table th:first-child, .table td:first-child { padding-left: 16px; } .table th:last-child, .table td:last-child { padding-right: 16px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody td { transition: background var(--t-fast) var(--ease); }
.table tbody tr:hover td { background: var(--hover-strong); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.mono, .table .id { font-family: var(--mono); font-size: 11.5px; }
.table .muted { color: var(--ink-muted); }
.table .row-actions { text-align: right; white-space: nowrap; }
.table tr.empty-row td, .table td.empty { color: var(--ink-muted); text-align: center; padding: 32px 16px; }

/* ---- buttons, inputs ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-sm); font: 500 12.5px/1 var(--font);
       color: var(--ink); background: var(--surface-2); border: 1px solid var(--border-strong); cursor: pointer; white-space: nowrap; text-decoration: none;
       transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease); }
.btn .ic { width: 14px; height: 14px; } .btn [data-icon] { display: inline-flex; }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--critical); border-color: var(--critical); color: #fff; } .btn-danger:hover { background: color-mix(in srgb, var(--critical) 88%, #fff); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); } .btn-ghost:hover { background: var(--hover-strong); color: var(--ink); }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; } .btn-lg { height: 40px; padding: 0 20px; font-size: 13.5px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.input, input[type=text], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  height: 32px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--ink);
  font: 12.5px/1.2 var(--font); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease); color-scheme: inherit; }
textarea { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; }
select { padding-right: 28px; }
.input:focus, input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px var(--surface-2) inset; -webkit-text-fill-color: var(--ink); caret-color: var(--ink); }
.field { display: grid; gap: 4px; font-size: 12px; color: var(--ink-muted); font-weight: 400; }
.segmented { display: inline-flex; padding: 2px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.segmented a, .segmented button { display: inline-flex; align-items: center; height: 24px; padding: 0 12px; border-radius: 4px; font: 400 12px/1 var(--font); color: var(--ink-2); background: transparent; border: 0; cursor: pointer;
                                  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.segmented a:hover, .segmented button:hover { color: var(--ink); text-decoration: none; background: var(--hover-strong); }
.segmented .active { background: var(--surface-3); color: var(--ink); font-weight: 500; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search { position: relative; } .search input { padding-left: 32px; width: 240px; }
.search svg { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; }

@media (max-width: 760px) {
  .app-header { gap: 12px; padding: 0 12px; } .brand-sub { display: none; } .app-nav a { padding: 0 8px; }
  .page { padding: 16px 12px 32px; } .search input { width: 100%; }
}
/* ---- a call's risk chart as the way into its transcript (the review page and the SOC drawer): a guide and a tooltip with
   what was being said under the cursor, a playhead where the analyst clicked, labelled on the time axis ---- */
svg.scrub { outline: none; } svg.scrub:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: var(--radius-sm); }
.scrub .hit { fill: transparent; cursor: crosshair; }
.scrub .guide { stroke: var(--ink-faint); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.scrub .hover-dot { fill: var(--surface); stroke: var(--accent-data); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; opacity: 0;
                    transition: opacity var(--t-fast) var(--ease); }
.scrub .guide.on, .scrub .hover-dot.on { opacity: 1; }
.scrub .playhead { pointer-events: none; transition: transform var(--t) var(--ease); }
.scrub .playhead line { stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.scrub .playhead rect { fill: var(--accent); } .scrub .playhead text { fill: #fff; font: 500 10px var(--mono); }
.scrub .tick { transition: opacity var(--t-fast) var(--ease); } .scrub .tick.under { opacity: 0; }   /* an axis label under the playhead's */
.chart-tip { position: absolute; z-index: 5; pointer-events: none; width: max-content; max-width: 340px; padding: 8px 12px; border-radius: var(--radius-sm);
             background: var(--surface-3); border: 1px solid var(--border-strong); font-size: 12px; line-height: 1.45; color: var(--ink-2);
             opacity: 0; transform: translateY(3px); transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.chart-tip.on { opacity: 1; transform: none; }
.tip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font: 500 11px/1.3 var(--mono); color: var(--ink); }
.tip-who { margin-right: 6px; font: 500 9.5px var(--font); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-muted); }
.tip-line { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); }
.tip-hint { margin-top: 4px; font-size: 11px; color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- SOC console: dense and calm for analysts who watch it all shift; the same tokens, tighter controls ---- */
html.soc { --radius: 6px; --radius-sm: 5px; --radius-xs: 3px; }
html.soc .page { max-width: none; padding: 16px; }
html.soc .panel { padding: 12px 16px; } html.soc .panel > .panel-head:first-child { margin: -12px -16px 12px; padding: 0 16px; min-height: 40px; }
html.soc .panel.flush { padding: 0; } html.soc .panel.flush > .panel-head:first-child { margin: 0; }
html.soc .table { font-size: 12.5px; }
html.soc .table th, html.soc .table td { padding: 6px 8px; }
html.soc .table th { height: 32px; }
html.soc .table th:first-child, html.soc .table td:first-child { padding-left: 12px; } html.soc .table th:last-child, html.soc .table td:last-child { padding-right: 12px; }
html.soc .btn { height: 28px; padding: 0 12px; font-size: 12.5px; } html.soc .btn-sm { height: 24px; padding: 0 8px; font-size: 12px; }
html.soc .input, html.soc input[type=text], html.soc input[type=search], html.soc input[type=date], html.soc input[type=number], html.soc select { height: 28px; font-size: 12.5px; }
html.soc .stat { padding: 8px 12px; } html.soc .stat .v { font-size: 18px; }
html.soc .kpis { gap: 8px; margin-bottom: 12px; } html.soc .kpi { padding: 12px 16px 14px; } html.soc .kpi .v { font-size: 24px; margin-top: 8px; }

/* KPI strip: four small numbers, not hero cards */
.kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border);
             border-radius: var(--radius); overflow: hidden; }
.kpi-tile { display: grid; gap: 0; padding: 12px 16px 14px; background: var(--surface); min-width: 0; }
.kpi-tile .k { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-tile .v { margin: 8px 0 6px; font-size: 26px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.kpi-tile .sub { font-size: 11.5px; color: var(--ink-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-tile.bad .v { color: var(--tag-bad-ink); } .kpi-tile.hot .v { color: var(--tag-warn-ink); }
@media (max-width: 900px) { .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* filter bar: always visible above the table */
.filters { position: sticky; top: 52px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 12px;
           background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.f-group { display: inline-flex; align-items: center; gap: 8px; }
.f-label { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.chipset { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.chipset button { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 0; border-radius: 3px; background: transparent;
                  color: var(--ink-2); font: 400 12px/1 var(--font); cursor: pointer; white-space: nowrap;
                  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.chipset button:hover { color: var(--ink); background: var(--hover-strong); }
.chipset button[aria-pressed="true"] { color: var(--ink); background: var(--surface-3); font-weight: 500; }
.chipset button i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); }
.chipset .r-critical i { background: var(--critical); } .chipset .r-high i { background: var(--high); } .chipset .r-medium i { background: var(--warning); }
.chipset .r-low i { background: var(--lvl-low); } .chipset .r-none i { background: var(--lvl-none); }
.filters input[type=date] { width: 128px; padding: 0 8px; } .filters .f-number { width: 152px; font-family: var(--mono); font-size: 12px; } .filters select { width: auto; min-width: 120px; }
.f-count { margin-left: auto; font-size: 12px; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.f-reset { background: none; border: 0; color: var(--accent-ink); font: 500 12px/1 var(--font); cursor: pointer; padding: 0; }
.f-reset:hover { text-decoration: underline; }
.pref { position: relative; display: inline-flex; align-items: center; gap: 8px; font: 400 11.5px/1 var(--font); color: var(--ink-muted); cursor: pointer; white-space: nowrap;
        user-select: none; transition: color var(--t-fast) var(--ease); }
.pref:hover { color: var(--ink-2); text-decoration: none; }
.pref input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.pref-switch { position: relative; flex: none; width: 22px; height: 12px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border-strong);
               transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.pref-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted);
                      transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.pref input:checked + .pref-switch, .pref[aria-checked="true"] .pref-switch { background: color-mix(in srgb, var(--accent) 30%, var(--surface-3)); border-color: color-mix(in srgb, var(--accent) 50%, var(--border-strong)); }
.pref input:checked + .pref-switch::after, .pref[aria-checked="true"] .pref-switch::after { transform: translateX(10px); background: var(--ink); }
.pref input:focus-visible + .pref-switch { box-shadow: var(--ring); }
.filters .pref { padding-left: 16px; border-left: 1px solid var(--border); height: 20px; }

/* the dense call table */
.calls th.sortable { cursor: pointer; user-select: none; transition: color var(--t-fast) var(--ease); } .calls th.sortable:hover { color: var(--ink-2); }
.calls th[aria-sort="ascending"], .calls th[aria-sort="descending"] { color: var(--ink-2); }
.calls th[aria-sort="ascending"]::after, .calls th[aria-sort="descending"]::after { display: inline-block; margin-left: 4px; color: var(--accent-ink); font-size: 8px; }
.calls th[aria-sort="ascending"]::after { content: "▲"; } .calls th[aria-sort="descending"]::after { content: "▼"; }
.calls tbody tr { cursor: pointer; } .calls td { white-space: nowrap; height: 31px; }
.calls tbody tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.calls .who { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.calls .score { margin-left: 6px; font: 400 11px var(--mono); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.calls .chip { display: inline-block; padding: 1px 6px; border-radius: 3px; background: var(--surface-3); color: var(--ink-2); font-size: 10.5px; line-height: 14px; margin-right: 4px;
              max-width: 132px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.status-live { display: inline-flex; align-items: center; gap: 6px; font: 500 10px/1 var(--mono); letter-spacing: 0.06em; color: var(--tag-good-ink); }
.status-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); animation: ping 2.4s ease-out infinite; }
.status-ended { display: inline-block; width: 6px; height: 6px; margin-left: 2px; border-radius: 50%; background: var(--ink-faint); }
.sla { display: inline-flex; align-items: center; height: 16px; padding: 0 6px; border-radius: 3px; font-size: 10.5px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sla-over { color: var(--tag-bad-ink); background: color-mix(in srgb, var(--critical) 14%, transparent); }
.sla-soon { color: var(--tag-warn-ink); background: color-mix(in srgb, var(--warning) 13%, transparent); }
.sla-ok { color: var(--tag-none-ink); background: var(--surface-3); }

/* the slide-in drawer: a shade lighter than the page, a hairline edge, sliding in over 200 ms */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(640px, 100vw); display: flex; flex-direction: column; background: var(--surface);
          border-left: 1px solid var(--border-strong); transform: translateX(100%); opacity: 0.6; visibility: hidden;
          transition: transform var(--t) var(--ease), opacity var(--t) var(--ease), visibility 0s linear var(--t); }
.drawer.open { transform: none; opacity: 1; visibility: visible; transition: transform var(--t) var(--ease), opacity var(--t) var(--ease), visibility 0s; }
.drawer-head { flex: none; display: grid; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.drawer-body { flex: 1; overflow-y: auto; }
@media (min-width: 1700px) { body.drawer-open .soc-shell .page { padding-right: 660px; } }


/* the overview's filter bar sticks under the top bar however tall that wraps (soc.html measures it into --topbar-h);
   on a phone it scrolls away instead of pinning half the screen */
:root { --topbar-h: 52px; }
.filters { top: var(--topbar-h); }
@media (max-width: 760px) { .filters { position: static; } }
