/* SDA Team Dashboard — one stylesheet.
   Visual reference: a SnowUI-style dashboard. White page and navigation; content sits on very light gray surfaces
   (16px corners) separated by space, not borders; summary cards use flat soft blue and lavender fills.
   Type is compact: 13–14px body, 14–15px section titles, 24–28px key values; regular and medium weights.
   Controls are neutral (8px corners); near-black marks the one action that matters. Agent colors are small identity dots.
   Spacing: an 8px grid; 24px page gutters (16px on phones). Outcome tones stay semantic (amber retry, green meeting, rose DQ). */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --font: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --window: #ffffff;          /* page and navigation */
  --surface: #f7f9fb;         /* content surfaces */
  --surface-alt: #f1f4f8;     /* hover / inset on a surface */
  --raised: #ffffff;          /* controls and fields on a surface */
  --fill: rgba(28, 28, 28, 0.05);
  --fill-strong: rgba(28, 28, 28, 0.09);
  --text: #1c1c1c;
  --text-2: #545454;          /* 7.4:1 on white */
  --text-3: #6f6f6f;          /* 5.0:1 on white, 4.7:1 on the surface */
  --separator: rgba(28, 28, 28, 0.07);
  --border: rgba(28, 28, 28, 0.10);
  --border-strong: rgba(28, 28, 28, 0.20);
  --card-line: transparent;

  --accent: #1c1c1c;          /* the one action that matters, selected states */
  --accent-press: #000000;
  --accent-soft: #e5ecf6;
  --accent-line: #c9d3e6;
  --link: #1c1c1c;
  --focus: rgba(84, 110, 230, 0.55);
  --blue-card: #e3f5ff;
  --lavender-card: #e5ecf6;

  --amber: #9a4d00; --amber-bg: #fff4e2; --amber-line: #f2c27a;
  --rose: #b4233a;  --rose-bg: #fdecef;  --rose-line: #f0a3b0;
  --mint: #157346;  --mint-bg: #e6f6ec;  --mint-line: #9ad7b2;
  --purple: #5b45c4; --purple-bg: #efecfd;
  --note-bg: #fffbea; --note-line: #f1e4ad;
  --test-bg: #fff3c4; --test-text: #6b4f00;

  /* Chart roles (validated: adjacent pairs pass the color-vision checks; labels carry identity) */
  --q-fit: #1baf7a; --q-poor: #e34948; --q-closed: #eda100; --q-open: #d9dde4;
  --c-delivered: #b1e3ff; --c-worked: #1c1c1c; --c-bar: #95a4fc; --c-bar-soft: #cfd5fe;

  --sidebar-bg: #ffffff;
  --sidebar-line: rgba(28, 28, 28, 0.08);
  --sidebar-text: #1c1c1c;
  --sidebar-text-2: #6f6f6f;
  --sidebar-hover: rgba(28, 28, 28, 0.04);

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px;
  --gutter: 28px;
  /* Corners: surfaces 16px, inner surfaces 12px, controls 8px, small controls 6px, marks 4px */
  --r-xs: 4px; --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: 0 20px 60px rgba(20, 24, 40, 0.16), 0 2px 10px rgba(20, 24, 40, 0.06);
  --track: rgba(28, 28, 28, 0.08);

  --sidebar-w: 232px;
  --rail-w: 280px;
  --bar-h: 68px;
  --agent: #1c1c1c;
  --ease: cubic-bezier(0.25, 0.8, 0.3, 1);
  --t-fast: 140ms;
  --t: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--window);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01"; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--raised); padding: 8px 12px; border-radius: var(--r); box-shadow: var(--shadow-3); }
.skip-link:focus { top: 12px; }

/* Text helpers */
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.mono { font-family: var(--mono); font-size: 12px; }
.pre { white-space: pre-wrap; }
.grow { flex: 1; min-width: 0; }
.push { margin-left: auto; display: inline-flex; gap: 6px; }
.warn-text { color: var(--amber); } .err-text { color: var(--rose); } .ok-text { color: var(--mint); } .purple-text { color: var(--purple); }
.eyebrow { font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.kbd { font-family: var(--font); font-size: 11px; color: var(--text-3); border-radius: var(--r-xs); padding: 0 5px; line-height: 17px; background: var(--fill); }

/* ---------- Shell: navigation | workspace | activity rail ---------- */
.shell { display: grid; height: 100vh; height: 100dvh; grid-template-columns: var(--sidebar-w) minmax(0, 1fr) auto; background: var(--window); }
.shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr) auto; }
.shell.sidebar-collapsed .sidebar { visibility: hidden; }
.shell:not(.panel-open) .inspector { display: none; }

/* Sidebar: white, a hairline edge, quiet selected state */
.sidebar { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--sidebar-bg); color: var(--sidebar-text); border-right: 1px solid var(--sidebar-line); }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 20px 16px 16px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 24px; }
.brand-icon { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: var(--text); }
.brand-icon svg { width: 16px; height: 16px; }
.brand-name { font-size: 14px; font-weight: 500; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--sidebar-text-2); }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; min-height: 36px; border: 0; border-radius: var(--r-lg); background: transparent; cursor: pointer;
  text-align: left; font-size: 14px; color: var(--sidebar-text); transition: background var(--t-fast) var(--ease); position: relative; }
.nav-item svg { width: 20px; height: 20px; flex: none; color: var(--sidebar-text); }
.nav-item:hover { background: var(--sidebar-hover); }
.nav-item[aria-current="page"] { background: var(--fill); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--text); }
.nav-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; text-align: center; color: var(--sidebar-text-2); }
.nav-badge.alert { background: var(--rose); color: #fff; }
.side-section { margin: 20px 10px 8px; font-size: 14px; font-weight: 400; color: rgba(28, 28, 28, 0.45); }
.side-utility .nav-item { font-size: 14px; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 12px 20px 16px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 500; font-size: 12px; color: var(--text); background: var(--lavender-card); flex: none; }
.foot-name { font-size: 14px; font-weight: 500; }
.foot-sub { font-size: 12px; color: var(--sidebar-text-2); }
.foot-actions { margin-left: auto; display: flex; gap: 2px; }
.conn { display: inline-flex; align-items: center; gap: 5px; }
.conn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9a9eb0; }
.conn.live::before { background: #2fb45a; }
.conn.polling::before { background: #e0952a; }
.conn.offline::before { background: var(--rose); }
.pulse { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px; vertical-align: 1px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* ---------- Main column ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--window); }
.content { flex: 1; overflow-y: auto; min-height: 0; }
.bar { height: var(--bar-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 var(--s3); background: var(--window); }
.bar-title { font-size: 14px; font-weight: 500; color: var(--text); }
.bar-spacer { flex: 1; }
/* The page toolbar is the page header: a breadcrumb-sized title, one quiet line of context, the page's controls, search. */
.topbar { position: sticky; top: 0; z-index: 20; height: auto; min-height: var(--bar-h); padding: 14px var(--gutter); gap: 14px; border-bottom: 1px solid var(--sidebar-line); }
.content.scrolled .topbar { background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
.topbar > .icon-btn { margin-left: -8px; }
.bar-heading { flex: 1 1 auto; min-width: 0; }
.bar-title-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.page-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumb { border: 0; background: none; padding: 0; font: inherit; font-size: 15px; line-height: 1.3; color: rgba(28, 28, 28, 0.45); cursor: pointer; white-space: nowrap; flex: none; }
.crumb:hover { color: var(--text); }
.crumb-sep { font-size: 15px; color: rgba(28, 28, 28, 0.25); flex: none; }
.page-sub { font-size: 13px; color: var(--text-3); display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; margin-left: 8px; }
.dot-sep { margin: 0 6px; color: rgba(28, 28, 28, 0.25); }
.page-actions { display: flex; gap: var(--s1); align-items: center; flex: none; }
.save-status { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.save-status:empty { display: none; }
.save-status.error { color: var(--rose); }
.save-status.saving { color: var(--text-2); }
.search { display: flex; align-items: center; gap: 8px; height: 30px; width: 180px; flex: none; padding: 0 8px; border-radius: var(--r); background: var(--fill); border: 0; color: var(--text-3); }
.search svg { width: 16px; height: 16px; flex: none; }
.search input { border: 0; outline: none; background: transparent; width: 100%; min-width: 0; color: var(--text); font-size: 14px; }
.search input::placeholder { color: rgba(28, 28, 28, 0.35); }
.search:focus-within { box-shadow: 0 0 0 2px var(--focus); }
.search.wide { width: min(380px, 100%); height: 34px; }
/* Pages fill the workspace; breakpoints inside a page answer to the page's own width. */
.page { padding: 24px var(--gutter) 96px; container: page / inline-size; }
.page.reading { max-width: 1040px; }
.page-note { margin: 0 0 var(--s2); color: var(--text-3); font-size: 13.5px; max-width: 76ch; }
.lede { font-size: 14px; color: var(--text-2); margin: 0 0 var(--s3); max-width: 76ch; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font-size: 14px; font-weight: 600; }
.section-title .count-chip, .count-chip { font-size: 12px; font-weight: 500; padding: 0 7px; border-radius: var(--r-pill); background: var(--fill); color: var(--text-2); font-variant-numeric: tabular-nums; }
.section-title .aside { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--text-3); }
.sub-title { font-size: 14px; font-weight: 600; margin: var(--s3) 0 var(--s1); }
.practice-note { color: var(--text-3); }
.meta-line { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.meta-line .dot-sep { color: var(--border-strong); }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r); border: 1px solid transparent;
  background: var(--fill); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; color: var(--text);
  transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { background: var(--fill-strong); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-press); }
.btn.secondary { background: var(--raised); border-color: var(--border); }
.btn.secondary:hover { background: var(--surface); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--fill); }
.btn.danger { color: var(--rose); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: var(--r); }
.btn.lg { height: 40px; padding: 0 var(--s3); font-size: 14px; border-radius: var(--r-lg); }
.btn.ghost .count, .btn .count { margin-left: 2px; color: var(--text-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.btn .count-chip { background: rgba(255, 255, 255, 0.2); color: inherit; }
.icon-btn { width: 28px; height: 28px; padding: 0; border-radius: var(--r); border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.sidebar .icon-btn { color: var(--sidebar-text-2); }
.link-button { border: 0; background: none; padding: 0; color: var(--link); font: inherit; font-weight: 500; cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.link-button:hover { text-decoration-color: currentColor; }
.link-button.big { font-size: inherit; font-weight: inherit; color: inherit; }
.link-button.strong { color: var(--text); }
.link-like { color: var(--text); font-weight: 500; }

.segmented { display: inline-flex; padding: 2px; gap: 2px; border-radius: var(--r); background: var(--fill); flex: none; }
.segmented button { border: 0; background: transparent; padding: 3px 10px; min-height: 26px; border-radius: var(--r-sm); white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.segmented button:hover:not([aria-pressed="true"]) { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--raised); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.segmented .count { margin-left: 6px; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: 0 0 var(--s2); }
.tabs button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: var(--r); font-weight: 500; color: var(--text-2); cursor: pointer; }
.tabs button:hover { background: var(--fill); }
.tabs button[aria-pressed="true"] { background: var(--fill); color: var(--text); }
.tabs .count { margin-left: 6px; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.month-nav { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: var(--r); background: var(--fill); }
.month-nav button { border: 0; background: transparent; height: 26px; min-width: 28px; padding: 0 8px; border-radius: var(--r-sm); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); display: grid; place-items: center; }
.month-nav button:hover:not([disabled]) { background: var(--raised); }
.month-nav button[disabled] { opacity: 0.35; cursor: default; }
.month-nav .label { min-width: 104px; text-align: center; color: var(--text); font-weight: 500; font-size: 13px; }
.month-nav svg { width: 15px; height: 15px; }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 var(--s2); }

.select, .input, .textarea { height: 34px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--raised); font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23646a79' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; }
.textarea { height: auto; min-height: 76px; padding: 10px 12px; line-height: 1.45; resize: vertical; width: 100%; }
.input.sm, .select.sm { height: 30px; font-size: 13px; padding: 0 8px; }
.input.sm { width: 150px; }
.select.sm { padding-right: 26px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 2px var(--focus); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); font-weight: 400; }
.field.plain { border: 0; padding: 0; margin: 0; }
.field.compact { gap: 4px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > * { flex: 1 1 160px; }
.inline-field { display: flex; gap: var(--s1); align-items: center; flex-wrap: wrap; }
.inline-field .input { flex: 1; min-width: 200px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.toggle + .toggle { margin-top: 12px; }
.toggle input { appearance: none; width: 38px; height: 23px; border-radius: var(--r-pill); background: var(--fill-strong); position: relative; cursor: pointer; transition: background var(--t-fast); margin: 0; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform var(--t) var(--ease); }
.toggle input:checked { background: #34c759; }
.toggle input:checked::after { transform: translateX(15px); }
.toggle input:disabled { opacity: 0.5; cursor: not-allowed; }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; }
.check-line input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; flex: none; }
.form-stack { display: grid; gap: 12px; }
.form-actions { display: flex; gap: var(--s1); justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.form-actions.start { justify-content: flex-start; }
.form-actions .muted, .hint-line { margin-right: auto; font-size: 12.5px; color: var(--text-3); }

/* ---------- Status labels & tags ---------- */
/* Status reads as a colored dot and quiet text (no filled capsules). */
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--r); border: 0; background: var(--fill); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); }
.chip:hover { background: var(--fill-strong); }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: none; color: var(--text-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(28, 28, 28, 0.35); flex: none; }
.pill svg { width: 12px; height: 12px; }
.pill.blue::before { background: #5b8def; } .pill.green::before { background: #1f9d55; } .pill.orange::before { background: #e08d00; }
.pill.red::before { background: var(--rose); } .pill.purple::before { background: var(--purple); }
.pill.red { color: var(--rose); } .pill.orange { color: var(--amber); }
.pill.test { background: var(--test-bg); color: var(--test-text); padding: 1px 7px; border-radius: var(--r-sm); font-size: 11.5px; } .pill.test::before { display: none; }
.pill.outline { padding: 1px 8px; border-radius: var(--r-sm); background: var(--fill); } .pill.outline::before { display: none; }
.tag-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.agent-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 400; color: var(--text); white-space: nowrap; }
.agent-chip .tag-dot { width: 8px; height: 8px; }
.pending-tag { font-size: 11px; font-weight: 500; background: var(--test-bg); color: var(--test-text); border-radius: var(--r-xs); padding: 2px 7px; margin-left: var(--s1); vertical-align: 2px; }
.pending-tag.ok { background: var(--mint-bg); color: var(--mint); }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 0; border-radius: var(--r-xl); box-shadow: none; }
.card-pad { padding: 24px; }
.card + .card { margin-top: var(--s2); }
.card-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; font-size: 14px; font-weight: 600; }
.card-title .aside { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--text-3); }
.form-stack .card-title { margin-top: var(--s2); }
.card-actions { display: flex; gap: var(--s1); flex-wrap: wrap; margin-top: var(--s2); }
.callout { padding: 12px var(--s2); border-radius: var(--r-lg); background: var(--accent-soft); font-size: 13.5px; color: #2b3445; margin: 0 0 var(--s2); }
.callout.warn { background: var(--amber-bg); color: #5e2f04; }
.callout.ok { background: var(--mint-bg); color: #134d27; }
.callout strong { font-weight: 600; }
.callout-actions { margin-top: 10px; }
.banner-paused { display: flex; align-items: center; gap: 10px; padding: 12px var(--s2); border-radius: var(--r-lg); background: var(--surface); font-size: 13.5px; color: var(--text-2); margin-bottom: var(--s2); }
.banner-paused svg { width: 16px; height: 16px; }
.empty { text-align: center; padding: 48px var(--s3); color: var(--text-2); }
.empty-icon { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--lavender-card); color: var(--text); }
.empty-icon svg { width: 22px; height: 22px; }
.empty h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.empty p { margin: 0 auto var(--s2); max-width: 440px; font-size: 13.5px; }
.state-msg { padding: var(--s3); text-align: center; color: var(--text-3); font-size: 13.5px; }

/* ---------- Disclosure (one behavior everywhere) ---------- */
.disc { margin-top: var(--s2); border: 0; border-radius: var(--r-xl); background: var(--surface); }
.disc-group { margin-top: var(--s2); overflow: hidden; }
.disc-group > .disc { margin: 0; border: 0; border-radius: 0; background: transparent; }
.disc-group > .disc + .disc { border-top: 1px solid var(--separator); }
.disc.flat { margin-top: var(--s2); }
.disc-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 24px; border: 0; background: transparent; border-radius: inherit; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.disc-head:hover { background: rgba(28, 28, 28, 0.02); }
.disc-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.disc-aside { font-size: 13px; color: var(--text-3); text-align: right; display: inline-flex; flex-wrap: wrap; gap: 4px 12px; justify-content: flex-end; }
.disc-state { font-size: 13px; font-weight: 500; color: var(--text-2); min-width: 34px; text-align: right; }
.disc-chev { width: 16px; height: 16px; color: var(--text-3); flex: none; transition: transform var(--t) var(--ease); }
.disc.open .disc-chev { transform: rotate(180deg); }
.disc-body { padding: 0 24px 20px; }
.disc-foot { display: flex; justify-content: flex-end; padding-top: var(--s2); }
.panel .disc-head, .disc.inline .disc-head { padding: 4px 0; }
.disc.inline { margin: 0; border: 0; background: transparent; border-radius: 0; }
.disc.inline .disc-body { padding: var(--s1) 0 0; }
.disc.inline .disc-title { font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.disc.inline .disc-head:hover { background: transparent; }

/* ---------- Summary cards (Overview, Manager Intelligence) ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px 22px; border: 0; border-radius: var(--r-xl); background: var(--blue-card);
  text-align: left; color: var(--text); font: inherit; }
.stat-card.lavender { background: var(--lavender-card); }
button.stat-card { cursor: pointer; transition: filter var(--t-fast) var(--ease); }
button.stat-card:hover { filter: brightness(0.98); }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.stat-top svg { width: 18px; height: 18px; flex: none; }
.stat-main { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; min-width: 0; }
.stat-main .link-button { font-size: 12.5px; }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-value small { margin-left: 6px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--text-2); }
.stat-foot { font-size: 12.5px; color: var(--text-2); }
.stat-go { display: inline-flex; align-items: center; gap: 2px; font-weight: 500; color: var(--text); }
.stat-go svg { width: 14px; height: 14px; }
.stat-card .track { margin: -4px 0 0; height: 4px; background: rgba(28, 28, 28, 0.08); }
.status-text { font-weight: 500; color: var(--text-2); }
.status-text.met, .status-text.on_track { color: var(--mint); } .status-text.behind { color: var(--amber); } .status-text.missed { color: var(--rose); }
.track { position: relative; height: 6px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.track-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); background: var(--text); }
.track-fill.pending { border-radius: 0 var(--r-pill) var(--r-pill) 0; background: rgba(28, 28, 28, 0.28); }
.mini-track { display: block; height: 4px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; margin-top: 4px; }
.mini-track > span { display: block; height: 100%; border-radius: inherit; background: var(--agent, var(--text)); }
@container page (max-width: 700px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@container page (max-width: 420px) { .stat-card { padding: 16px; } .stat-value { font-size: 22px; } }

/* Agent progress: concise lines (avatar, name, meetings of goal, one figure) */
.agent-cell { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border: 0; border-radius: var(--r-lg); background: transparent;
  font: inherit; color: inherit; text-align: left; cursor: pointer; transition: background var(--t-fast) var(--ease); }
.agent-cell:hover { background: var(--fill); }
.ac-avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--agent) 16%, #fff); color: color-mix(in srgb, var(--agent) 70%, #111); }
.ac-text { display: grid; min-width: 0; }
.ac-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-line { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.ac-figure b { font-weight: 600; color: var(--text); }
.ac-sec::before { content: "·"; margin-right: 8px; color: rgba(28, 28, 28, 0.25); }
.agent-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 12px; margin: -12px -8px 16px; }
@container page (max-width: 1100px) { .agent-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container page (max-width: 640px) { .agent-strip { grid-template-columns: minmax(0, 1fr); margin-top: -8px; } }
/* When the activity rail is showing, agent progress lives there instead. */
@media (min-width: 1560px) { .shell.has-rail:not(.rail-hidden) .page > .agent-strip { display: none; } }

/* Agent page summary */
.hero { position: relative; overflow: hidden; background: var(--surface); border-radius: var(--r-xl); }
.hero-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.hero-number { font-size: 28px; line-height: 1.1; font-weight: 600; letter-spacing: -0.01em; margin: var(--s1) 0; font-variant-numeric: tabular-nums; }
.hero-number small { font-size: 15px; font-weight: 400; color: var(--text-2); letter-spacing: 0; margin-left: 4px; }
.hero-copy { color: var(--text-2); font-size: 13.5px; }
.status-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); width: fit-content; }
.status-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(28, 28, 28, 0.35); }
.status-tag.met::before, .status-tag.on_track::before { background: #1f9d55; }
.status-tag.behind::before { background: #e08d00; }
.status-tag.missed::before { background: var(--rose); }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.slots i { height: 6px; border-radius: var(--r-xs); background: var(--track); }
.slots i.on { background: var(--text); }

/* ---------- Overview: accounts to call (the main surface) ---------- */
.work { margin-top: 0; scroll-margin-top: 84px; overflow: hidden; container: work / inline-size; }
.work-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title actions" "week week"; align-items: center; gap: 12px var(--s3); padding: 18px 24px 14px; }
.work-title { grid-area: title; margin: 0; font-size: 14px; font-weight: 600; min-width: 0; }
.work-note { grid-area: week; margin: 0; font-size: 13px; color: var(--text-3); }
.work-head .week { grid-area: week; justify-self: start; margin-left: -6px; }
.work-actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
@container work (min-width: 1100px) { .work-head { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "title week actions"; } .work-head .week { margin-left: 8px; } .work-note { grid-area: week; } }
.earlier-btn[disabled] { opacity: 0.5; }
.week { display: flex; gap: 2px; align-items: center; flex: none; }
.week .icon-btn { width: 26px; height: 26px; color: var(--text-3); }
.week .icon-btn svg { width: 16px; height: 16px; }
.week-day { display: grid; justify-items: center; gap: 2px; min-width: 50px; padding: 0; border: 0; background: transparent; cursor: pointer; color: inherit; font: inherit; }
.wd-label { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 9px; border-radius: var(--r); font-size: 13px; white-space: nowrap; }
.week-day .dow { color: var(--text-3); font-size: 12px; }
.week-day .num { font-weight: 500; font-variant-numeric: tabular-nums; }
.week-day:hover .wd-label { background: var(--fill); }
.week-day[aria-pressed="true"] .wd-label { background: var(--text); color: #fff; }
.week-day[aria-pressed="true"] .dow { color: rgba(255, 255, 255, 0.72); }
.week-day.is-today:not([aria-pressed="true"]) .num { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.wd-count { font-size: 11.5px; color: var(--text-3); min-height: 15px; line-height: 15px; font-variant-numeric: tabular-nums; }
.week-day[aria-pressed="true"] .wd-count { color: var(--text); font-weight: 600; }
.groups { display: grid; padding: 0 12px 8px; container: list / inline-size; }
.list-head { display: none; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 0 12px 8px; margin: 0 0 4px; font-size: 12.5px; color: var(--text-3); border-bottom: 1px solid var(--border); }
.list-head .row-col { display: none; }
.list-head .lh-side { text-align: right; }
.group { border-radius: var(--r-lg); }
.group + .group, .group + .disc, .groups > .disc { border-top: 1px solid var(--separator); }
.group-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px; border: 0; background: transparent; cursor: pointer; text-align: left; color: inherit; font: inherit; border-radius: var(--r-lg); }
.group-head:hover:not([disabled]) { background: var(--fill); }
.group-head:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.group-head[disabled] { cursor: default; }
.group-head .tag-dot { width: 8px; height: 8px; }
.group-title { display: flex; align-items: baseline; gap: 2px 12px; flex-wrap: wrap; min-width: 0; }
.group-name { font-size: 14px; font-weight: 600; }
.group-sub { font-size: 12.5px; color: var(--text-3); }
.group-count { margin-left: auto; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.group-count strong { font-size: 14px; font-weight: 600; color: var(--text); margin-right: 3px; font-variant-numeric: tabular-nums; }
.group-count.done { color: var(--mint); font-weight: 500; }
.chev-space { width: 16px; flex: none; }
.group-head .chev, .row-side .chev { width: 16px; height: 16px; color: var(--text-3); transition: transform var(--t) var(--ease); flex: none; }
.group.open .group-head .chev { transform: rotate(180deg); }
.group-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t) var(--ease); }
.group.open .group-body { grid-template-rows: 1fr; }
.group-inner { overflow: hidden; min-height: 0; }
.group.open .group-inner { padding: 0 0 8px; }
.group .list { border: 0; border-radius: 0; background: transparent; }
.groups-clear { margin: 0; padding: 14px 12px; font-size: 13.5px; color: var(--text-2); }
/* Completed agents fold into one quiet row at the end of the queue */
.groups > .disc.done-section { margin: 0; border-radius: 0; background: transparent; }
.done-section > .disc-head { padding: 12px; border-radius: var(--r-lg); }
.done-section > .disc-head:hover { background: var(--fill); }
.done-section .disc-title { font-weight: 500; color: var(--text-2); }
.done-name { display: inline-flex; align-items: center; gap: 6px; }
.done-section > .disc-body { padding: 0 0 4px 12px; }
.group.completed .group-name { font-weight: 500; }
.day-block + .day-block { margin-top: var(--s1); border-top: 1px solid var(--separator); }
.day-head { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 14px 12px 4px; font-size: 13px; font-weight: 600; color: var(--text); }
.day-head span { font-size: 12.5px; color: var(--text-3); font-weight: 400; }
.load-more { display: grid; place-items: center; padding: var(--s2) 0; }
.work-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 24px 16px; font-size: 12.5px; color: var(--text-3); }
.work .empty { padding: 40px var(--s3); }

/* ---------- Account rows ---------- */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r-xl); overflow: hidden; container: list / inline-size; }
.list > li + li { border-top: 1px solid var(--separator); }
.card-list { padding: 4px 12px; }
.row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 10px 12px; min-height: 52px;
  border: 0; border-radius: var(--r); background: transparent; text-align: left; cursor: pointer; position: relative; font: inherit; color: inherit; transition: background var(--t-fast) var(--ease); }
.row:hover { background: var(--fill); }
.row[aria-current="true"] { background: var(--lavender-card); }
.row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.monogram { display: none; }
.row-main { min-width: 0; }
.row-title { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub > span + span::before { content: "·"; margin: 0 6px; color: rgba(28, 28, 28, 0.25); }
.row-sub .row-phone { color: var(--text-2); }
.row-col { display: none; min-width: 0; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-col-cap { color: var(--text-3); margin-right: 4px; }
.row-phone { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-phone.need { color: var(--amber); font-weight: 500; }
.row-loc { display: none; }
.row-time { color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-col .row-time { margin-left: 8px; font-size: 12.5px; }
.row-time.late, .row-time.early, .row-time.weekend { color: var(--amber); }
.row-agent .tag-dot { margin-right: 7px; vertical-align: 1px; }
.ac-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.ac-tag svg { width: 13px; height: 13px; }
/* Wide lists: company | main line | location & local time | contact | (agent) | status & calls */
@container list (min-width: 900px) {
  .row, .list-head { grid-template-columns: minmax(0, 1.5fr) 132px minmax(0, 1fr) minmax(0, 0.8fr) minmax(150px, auto); gap: 20px; }
  .row.has-agent { grid-template-columns: minmax(0, 1.5fr) 132px minmax(190px, 1fr) minmax(0, 0.8fr) auto; }
  .row-col, .list-head .row-col { display: block; }
  .list-head { display: grid; }
  .row-loc { display: block; }
  .row-sub .sub-n { display: none; }
  .row-sub > .sub-n + span:not(.sub-n)::before { content: none; }
}
/* Lists that also name the agent need more room before they switch to columns. */
@container list (min-width: 900px) and (max-width: 1159px) {
  .row.has-agent { grid-template-columns: minmax(0, 1fr) auto; }
  .row.has-agent .row-col { display: none; }
  .row.has-agent .row-sub .sub-n { display: inline; }
  .row.has-agent .row-sub > .sub-n + span:not(.sub-n)::before { content: "·"; }
}
.row-side { display: flex; gap: 14px; align-items: center; justify-content: flex-end; }
.call-dots { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.call-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--fill-strong); }
.call-dots i.on { background: var(--text); }
.call-dots b { font-size: 11px; font-weight: 600; color: var(--text); margin-left: 2px; }
.call-dots .call-n { margin-left: 6px; font-size: 12.5px; color: var(--text-2); min-width: 50px; }
.call-dots.none .call-n { color: var(--text-3); }
.fu-meta { display: inline-flex; gap: 12px; align-items: center; }
.due { font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.overdue { color: var(--rose); }
.due.today { color: var(--amber); }

/* ---------- Activity rail ---------- */
.rail { display: none; width: var(--rail-w); min-height: 0; border-left: 1px solid var(--sidebar-line); background: var(--window); }
.rail:empty { display: none !important; }
.rail-scrim { display: none; }
@media (min-width: 1560px) { .shell.has-rail:not(.rail-hidden) .rail { display: block; } }
@media (max-width: 1559px) {
  .shell.has-rail.rail-open .rail { display: block; position: fixed; top: 0; right: 0; bottom: 0; z-index: 43; box-shadow: var(--shadow-3); }
  .shell.has-rail.rail-open .rail-scrim { display: block; position: fixed; inset: 0; z-index: 42; background: rgba(20, 20, 40, 0.18); }
}
.rail-scroll { height: 100%; overflow-y: auto; padding: 22px 20px 24px; }
.rail-section + .rail-section { margin-top: 24px; }
.rail-section h2 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; padding: 0 8px; font-size: 14px; font-weight: 600; }
.rail-more { font-size: 13px; font-weight: 400; color: var(--text-3); }
.rail-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail-item { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 8px; border: 0; border-radius: var(--r-lg); background: transparent; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.rail-item:hover { background: var(--fill); }
.rail-icon { width: 24px; height: 24px; flex: none; border-radius: var(--r); display: grid; place-items: center; background: var(--lavender-card); color: var(--text); }
.rail-section:nth-child(2) .rail-icon { background: var(--blue-card); }
.rail-icon svg { width: 16px; height: 16px; }
.rail-text { display: grid; min-width: 0; }
.rail-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-sub { font-size: 12px; color: var(--text-3); }
.rail-sub .due { font-size: 12px; }
.rail-empty { margin: 0; padding: 4px 8px; font-size: 13px; color: var(--text-3); }
.rail-agents { display: grid; gap: 2px; }
.rail-agents .agent-cell { width: 100%; }

/* ---------- Follow-ups ---------- */
.fu-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: var(--s2); }
.fu-tools .muted { margin-left: auto; font-size: 12.5px; }
.fu-group-title { display: flex; align-items: baseline; gap: var(--s1); margin: 20px 4px var(--s1); font-size: 13px; font-weight: 600; color: var(--text-2); }
.fu-group-title:first-of-type { margin-top: 0; }
.fu-group-title .n { font-variant-numeric: tabular-nums; color: var(--text-3); font-weight: 500; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: transparent; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.data th { text-align: left; font-size: 12.5px; font-weight: 400; color: var(--text-3); padding: 8px 12px; border-bottom: 1px solid var(--border); background: transparent; white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--separator); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; }
table.data tr.total td { font-weight: 600; border-top: 1px solid var(--border-strong); }
table.data.compact th, table.data.compact td { padding: 6px 10px; font-size: 12.5px; }
.dir-grid td.todo { color: var(--text-3); }

/* ---------- Manager Intelligence ---------- */
/* Summary: three soft cards, same as the Overview's */
.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { gap: 4px; }
.kpi-label { font-size: 14px; font-weight: 500; }
.kpi-value { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 14px; font-weight: 400; color: var(--text-2); letter-spacing: 0; margin-left: 6px; }
.kpi-sub { font-size: 12.5px; color: var(--text-2); }
@container page (max-width: 760px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.viz-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
@container page (max-width: 1040px) { .viz-grid { grid-template-columns: minmax(0, 1fr); } }
.viz-grid > .card { margin: 0; }
.chart-card { padding: 22px 24px 24px; min-width: 0; container: chart / inline-size; display: flex; flex-direction: column; }
.chart-card.full { grid-column: 1 / -1; }
.chart-card > .viz-note:last-child { margin-top: auto; padding-top: 12px; }
.chart-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.chart-head p { margin: 0; font-size: 12.5px; color: var(--text-3); }
.chart-head .aside { margin-left: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw-delivered { background: var(--c-delivered); }
.sw-worked { background: var(--c-worked); }
.sw-bar { background: var(--c-bar); } .sw-bar-soft { background: var(--c-bar-soft); }
.sw-fit { background: var(--q-fit); }
.sw-poor { background: var(--q-poor); }
.sw-closed { background: var(--q-closed); }
.sw-open { background: var(--q-open); }
.sw-target { background: none; border-top: 2px dashed var(--text-2); height: 0 !important; border-radius: 0 !important; }
/* Agent comparison: one row per agent, worked drawn inside delivered; values sit outside the bars */
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 170px minmax(0, 1fr) 110px; gap: var(--s2); align-items: center; }
.hbar-name { display: flex; align-items: center; gap: var(--s1); font-size: 13.5px; font-weight: 500; min-width: 0; }
.hbar-name span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { position: relative; height: 18px; }
.hbar-track::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-sm); background: rgba(28, 28, 28, 0.035); }
.hbar-del, .hbar-work { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-sm); }
.hbar-del { background: var(--c-delivered); }
.hbar-work { background: var(--c-worked); top: 6px; bottom: 6px; border-radius: 3px; }
.hbar-val { position: absolute; top: 50%; transform: translateY(-50%); font-size: 12.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; padding-left: 8px; font-variant-numeric: tabular-nums; }
.hbar-side { font-size: 12.5px; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-side strong { color: var(--text); font-size: 14px; }
.hbar-val-sm { display: none; }
.month-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px var(--s3); margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--separator); }
.month-cell { display: grid; gap: 2px; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.mc-name { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-cell strong { font-size: 15px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.month-cell .muted { font-weight: 500; font-size: 12.5px; }
@container chart (max-width: 620px) {
  .hbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name side" "track track"; gap: 4px var(--s1); }
  .hbar-name { grid-area: name; } .hbar-side { grid-area: side; } .hbar-track { grid-area: track; }
  .hbar-val { display: none; } .hbar-val-sm { display: inline; }
  .month-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Daily delivery columns with a quiet right-hand axis */
.cols-wrap { padding-right: 28px; flex: 1; display: flex; flex-direction: column; }
.cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; flex: 1; height: auto; min-height: 168px; margin-top: 20px; border-bottom: 1px solid var(--border); position: relative; }
.gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--separator); pointer-events: none; }
.gridline.base { bottom: 0; border-top: 0; }
.gridline b { position: absolute; right: -28px; top: -8px; width: 22px; text-align: left; font-size: 11.5px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.gridline.base b { top: -8px; }
.col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; z-index: 1; }
.col-bar { width: min(24px, 100%); background: var(--c-bar); border-radius: 6px 6px 0 0; position: relative; }
.col.practice .col-bar { background: var(--c-bar-soft); }
.col-val { font-size: 11.5px; font-weight: 600; color: var(--text-2); margin-bottom: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.col-target { position: absolute; left: 8%; right: 8%; border-top: 2px dashed var(--text-2); }
.col.weekend .col-val, .col.nodata .col-val { color: var(--text-3); font-weight: 500; }
.col-labels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-top: 6px; font-size: 11.5px; color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
.col-labels span { overflow: hidden; white-space: nowrap; }
/* Dense (30-day) views: per-bar values give way to the axis unless the chart is wide; every other date label is kept. */
@container chart (max-width: 860px) {
  .cols.dense .col-val { display: none; }
  .col-labels.dense span:nth-child(even) { visibility: hidden; }
}
@container chart (max-width: 420px) { .col-labels span:nth-child(even) { visibility: hidden; } .col-val { font-size: 11px; } }
/* Quality: share bars, with exact counts in their own columns (never printed inside small or low-contrast segments) */
.qrows { display: grid; gap: 0; }
.qrow { display: grid; grid-template-columns: 150px minmax(80px, 1fr) repeat(4, 46px) 46px; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--separator); }
.qrow.qhead { border-top: 0; padding: 0 0 6px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.qrow-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: var(--s1); min-width: 0; }
.qhead .qrow-name { font-weight: 500; }
.qrow-name span:last-child { line-height: 1.25; overflow-wrap: anywhere; }
.qrow.team .qrow-name { font-weight: 600; }
.qbar-cap { min-width: 0; }
.qbar { display: flex; gap: 2px; height: 12px; border-radius: var(--r-xs); overflow: hidden; }
.qseg { height: 100%; min-width: 3px; }
.qseg.fit { background: var(--q-fit); } .qseg.poor { background: var(--q-poor); } .qseg.closed { background: var(--q-closed); } .qseg.open { background: var(--q-open); }
.qbar.empty-bar { background: var(--fill); }
.qnum { font-size: 13px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qnum.zero { color: var(--text-3); }
.qnum.n { color: var(--text-2); }
.qhead .qnum { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.qhead .qnum i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
@container chart (max-width: 620px) {
  .qrow { grid-template-columns: 112px minmax(60px, 1fr) repeat(4, 40px) 40px; gap: 8px; }
  .qhead .qnum i { display: none; }
}
@container chart (max-width: 440px) {
  .qrow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 8px; padding: 10px 0; }
  .qrow .qrow-name, .qrow .qbar { grid-column: 1 / -1; }
  .qhead .qrow-name, .qhead .qbar-cap { display: none; }
  .qhead .qnum i { display: inline-block; }
  .qnum { text-align: left; } .qhead .qnum { justify-content: flex-start; }
}
.viz-note { margin: 12px 0 0; font-size: 12.5px; color: var(--text-3); max-width: 90ch; }
.viz-empty { display: grid; place-items: center; min-height: 120px; text-align: center; color: var(--text-3); font-size: 13.5px; border: 1px dashed var(--border); border-radius: var(--r-lg); padding: var(--s2); }
.viz-table { margin-top: 12px; }
/* Recommendations & findings */
.recs { display: grid; gap: 12px; }
.recs { gap: 0; }
.rec { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s2); align-items: start; padding: 14px 0; border-top: 1px solid var(--separator); }
.rec-change { font-size: 14px; font-weight: 500; }
.rec:first-child { border-top: 0; padding-top: 4px; }
.rec-what { font-size: 13px; color: var(--text-2); }

.rec-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12.5px; color: var(--text-3); }
.rec .btn { grid-row: 1 / span 3; grid-column: 2; align-self: center; }
.findings { list-style: none; margin: 0; padding: 0; display: grid; }
.finding { padding: 12px 0; border-top: 1px solid var(--separator); }
.finding:first-child { border-top: 0; padding-top: 0; }
.finding-head { display: flex; gap: var(--s1); align-items: baseline; flex-wrap: wrap; }
.finding-text { font-weight: 600; }
.finding .disc.inline .disc-title { font-weight: 600; }
.count-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.count-pill { font-size: 12px; color: var(--text-2); background: var(--fill); border-radius: var(--r-sm); padding: 2px 8px; }
.count-pill b { font-variant-numeric: tabular-nums; color: var(--text); margin-left: 3px; }
.dir-list, .plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dir { padding: var(--s2) 20px; border-radius: var(--r-lg); background: var(--raised); }
.dir.stuck { border-color: var(--amber-line); }
.dir-head { display: flex; gap: var(--s1); align-items: center; flex-wrap: wrap; }
.dir-body { margin: 10px 0; font-size: 14.5px; }
.dir .table-wrap + .table-wrap { margin-top: var(--s1); }
.action-items { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.action-items { gap: 0; }
.action-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--separator); }
.action-item:first-child { border-top: 0; padding-top: 0; }
.action-item .ai-main { flex: 1; min-width: 0; }
.action-item.overdue .due { color: var(--rose); }
.held-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.held-list li { display: grid; gap: 2px; }
.synthetic-banner { display: flex; align-items: center; gap: 12px; padding: 10px var(--s2); border-radius: var(--r); background: var(--test-bg); color: var(--test-text); font-size: 13px; font-weight: 600; margin-bottom: var(--s2); }

/* ---------- SDA Team & agent pages ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s2); }
.team-card { all: unset; box-sizing: border-box; display: grid; gap: 8px; align-content: start; cursor: pointer; padding: 18px 20px 20px; border-radius: var(--r-xl);
  background: var(--surface); transition: background var(--t) var(--ease); }
.team-card:hover { background: var(--surface-alt); }
.team-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.team-card-top { display: flex; justify-content: space-between; align-items: center; }
.team-card-name { font-size: 16px; font-weight: 600; }
.team-card-approach { color: var(--text-2); font-size: 13.5px; min-height: 40px; }
.team-card-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.agent-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s2); align-items: stretch; }
.hero.compact { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 20px var(--s3); gap: 20px; }
.hero-side { display: grid; gap: 12px; justify-items: end; min-width: 180px; }
.hero-side .mini-track { width: 100%; height: 6px; --agent: var(--accent); }
.coverage { padding: 20px var(--s3); }
.coverage-row { display: flex; gap: 20px; align-items: flex-start; margin-top: 6px; }
.coverage-num { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.coverage-num small { font-size: 17px; color: var(--text-3); font-weight: 600; }
.coverage p { margin: var(--s1) 0 0; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 0; margin-bottom: var(--s1); }
.back-link svg { width: 14px; height: 14px; }
.activity { list-style: none; margin: 0; padding: 4px var(--s2); }
.activity > li { border-top: 1px solid var(--separator); }
.activity > li:first-child { border-top: 0; }
.activity details > summary { display: grid; grid-template-columns: 70px auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 2px; font-size: 13px; }
.activity .who { font-weight: 600; white-space: nowrap; }
.activity .gist { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity .body { padding: 0 2px 12px 82px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.exp-card { padding: var(--s2) 20px; border-radius: var(--r-xl); background: var(--surface); }
.exp-card + .exp-card { margin-top: 10px; }
.exp-head { display: flex; align-items: flex-start; gap: var(--s1); }
.exp-title { font-weight: 600; font-size: 14px; }
.exp-meta { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 12.5px; margin-top: var(--s1); }
.exp-meta dt { color: var(--text-3); }
.exp-meta dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.decision { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: var(--s2) 0; }
.stat { padding: 12px var(--s2); border-radius: var(--r-lg); background: var(--raised); }
.stat-num { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat-num.sm { font-size: 16px; padding-top: 6px; }
.stat-label { font-size: 12.5px; color: var(--text-2); }
.stat-sub { font-size: 11.5px; color: var(--text-3); }
.mini-list { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.mini-list li { display: flex; gap: var(--s1); align-items: baseline; }
.mini-list time { color: var(--text-3); flex: none; font-variant-numeric: tabular-nums; min-width: 62px; }

/* ---------- Settings, setup, connection ---------- */
.subnav { display: flex; gap: 2px; flex-wrap: wrap; margin: 0 0 var(--s3); padding: 3px; background: var(--fill); border-radius: var(--r); width: fit-content; max-width: 100%; }
.subnav button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: var(--r-sm); font-weight: 500; font-size: 13.5px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.subnav button[aria-current="page"] { background: var(--raised); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.subnav .nav-badge { margin-left: 2px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.settings-grid > * { min-width: 0; }
.settings-grid .card + .card, .settings-grid > * + * { margin-top: 0; }
.card .toggle:first-of-type { margin-top: var(--s1); }
.card .panel-title { margin-top: var(--s2); }
.checklist { list-style: none; margin: 0; padding: 0; }
.check { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: start; padding: 14px var(--s2); }
.check + .check { border-top: 1px solid var(--separator); }
.check-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.6px solid #c4c4cc; color: var(--text-3); font-size: 12px; font-weight: 600; }
.check-icon svg { width: 14px; height: 14px; }
.check-icon.pass { background: var(--mint); border-color: var(--mint); color: #fff; }
.check-icon.simulated { background: var(--amber-bg); border-color: #e7b77d; color: var(--amber); }
.check-label { font-weight: 600; }
.check-detail { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.guide-steps { margin: var(--s1) 0 0; padding-left: 20px; display: grid; gap: var(--s1); color: var(--text-2); }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.setup-step { display: flex; gap: var(--s2); align-items: center; background: var(--surface); border-radius: var(--r-xl); padding: var(--s2) 20px; }
.setup-step p { margin: 3px 0 0; }
.setup-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); font-weight: 600; flex: none; }
.setup-step.done .setup-num { background: var(--mint-bg); color: var(--mint); }
.setup-num svg { width: 16px; height: 16px; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 var(--s2); }
.conn-agent { display: grid; gap: var(--s1); align-content: start; padding: var(--s2); border-radius: var(--r-xl); background: var(--surface);
  border: 0; }
.conn-agent.drill { --agent: #8a8f9c; }
.conn-agent-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s1); }
.conn-agent-name { font-size: 15px; font-weight: 600; }
.conn-slots { grid-template-columns: repeat(9, 1fr); gap: 3px; }
.conn-slots i { height: 6px; }
.conn-detail { padding: 6px 20px 14px; margin-bottom: 10px; }
.conn-detail summary { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
pre.rubric { white-space: pre-wrap; font-family: var(--font); font-size: 13px; margin: 0; }

/* ---------- Account workspace (focus panel over the queue) ---------- */
.panel-scrim { display: none; }
.shell.panel-open .panel-scrim { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(28, 32, 64, 0.16); animation: fade-in 180ms var(--ease); }
.inspector { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(560px, calc(100vw - 24px)); z-index: 46; display: flex; flex-direction: column; min-height: 0;
  border-radius: 20px; border: 0; background: #ffffff; box-shadow: var(--shadow-3); overflow: hidden; animation: panel-in 180ms var(--ease); }
@keyframes panel-in { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.inspector .bar { background: #ffffff; padding: 0 14px 0 var(--s3); border-bottom: 1px solid var(--separator); }
.inspector-body { flex: 1; overflow-y: auto; padding: 20px 20px 56px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; }
.inspector-body > * { min-width: 0; }
.insp-empty { height: 100%; display: grid; place-items: center; text-align: center; padding: 40px var(--s3); color: var(--text-3); }
.acct-head { padding: 0 2px; }
.acct-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.insp-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; min-width: 0; }
.local-time { flex: none; display: grid; justify-items: end; gap: 2px; padding: var(--s1) 14px 10px; border-radius: var(--r-lg); text-align: right;
  background: var(--fill); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lt-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; opacity: .85; }
.lt-label svg { width: 13px; height: 13px; }
.lt-text { font-size: 18px; font-weight: 600; line-height: 1.1; color: var(--text); }
.lt-note { font-size: 12px; font-weight: 600; }
.local-time.open { background: var(--mint-bg); color: var(--mint); }
.local-time.late, .local-time.early, .local-time.weekend { background: var(--amber-bg); color: var(--amber); }
.local-time.late .lt-text, .local-time.early .lt-text, .local-time.weekend .lt-text { color: var(--amber); }
.acct-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: var(--s1) 0 0; font-size: 13.5px; }
.acct-links > div { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.acct-links dt { font-weight: 600; color: var(--text-3); font-size: 12px; letter-spacing: .03em; }
.acct-links dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.acct-links a { display: inline-flex; align-items: center; gap: 4px; }
.acct-links svg { width: 12px; height: 12px; }
.kv-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.kv-chips .pill { white-space: normal; max-width: 100%; }
.panel, .phone-card, .outcome-card { background: var(--surface); border: 0; border-radius: var(--r-xl); padding: 18px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: var(--s1); }
.panel-title { font-size: 12.5px; font-weight: 600; color: var(--text-3); margin: 0 0 var(--s1); }
.panel-head .panel-title { margin: 0; }
.panel-title.sub { margin-top: var(--s2); }
.panel .lead { font-size: 15px; font-weight: 500; margin: 0 0 6px; }
.phone-main { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.phone-num { font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; margin: 4px 0 6px; }
.phone-num .muted { font-size: 17px; font-weight: 600; }
.phone-meta, .phone-actions { display: flex; gap: var(--s1); align-items: center; flex-wrap: wrap; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--separator); }
.inline-form .form-actions { margin: 0; }
.ask-for { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--separator); font-size: 14px; color: var(--text-2); }
.outcome-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.outcome-head h3 { margin: 0; font-size: 18px; font-weight: 500; }
.calls-month { display: grid; justify-items: end; gap: 4px; }
.call-count { font-size: 13px; color: var(--text-3); }
.call-count strong { font-size: 17px; color: var(--text); font-weight: 600; margin-right: 2px; font-variant-numeric: tabular-nums; }
.na-meter { font-size: 12.5px; color: var(--text-2); margin: -4px 0 10px; }
.na-meter strong { color: var(--amber); }
.outcome-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s1); }
.outcome-seg button { height: 44px; border-radius: var(--r-lg); border: 0; background: var(--raised); font-weight: 500; font-size: 14px; cursor: pointer; color: var(--text);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.outcome-seg button:active { transform: scale(0.98); }
.outcome-seg button[disabled] { opacity: .5; cursor: not-allowed; }
.outcome-seg button.retry:hover { background: var(--amber-bg); border-color: var(--amber-line); }
.outcome-seg button.dq { color: var(--rose); }
.outcome-seg button.dq:hover { background: var(--rose-bg); border-color: var(--rose-line); }
.outcome-seg button.win { color: var(--mint); }
.outcome-seg button.win:hover { background: var(--mint-bg); border-color: var(--mint-line); }
.outcome-seg button.chosen.retry { background: #f59f0b; border-color: #e08d00; color: #2b1700; }
.outcome-seg button.chosen.win { background: #1f9d55; border-color: #1a8a4a; color: #fff; }
.outcome-seg button.chosen.dq { background: #d33a52; border-color: #c02c44; color: #fff; }
.outcome-form { margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--separator); }
.save-error { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--rose-bg); color: var(--rose); font-size: 13px; }
.save-error svg { width: 16px; height: 16px; flex: none; }
.save-error span { flex: 1; color: #5c1220; }
.outcome-card.closed { opacity: .92; }
.state-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border-radius: var(--r-lg); padding: var(--s2) 20px; border: 1px solid; }
.state-card .eyebrow { color: inherit; opacity: 0.9; }
.state-card strong { font-size: 15.5px; font-weight: 600; display: block; margin: 2px 0; color: var(--text); }
.state-card .check-line { color: var(--text); margin-top: var(--s1); }
.state-card.orange { background: var(--amber-bg); border-color: #f6d6a8; color: var(--amber); }
.state-card.red { background: var(--rose-bg); border-color: #f5c6ce; color: var(--rose); }
.state-card.green { background: var(--mint-bg); border-color: #bfe6cf; color: var(--mint); }
.state-card.gray { background: var(--fill); border-color: var(--border); color: var(--text-2); }
.ti-label { font-size: 12px; font-weight: 600; color: var(--mint); margin: 12px 0 6px; }
.ti-label.uncertain { color: var(--text-3); }
.ti-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ti-list li { padding-left: 12px; border-left: 2px solid var(--mint-line); }
.ti-list.uncertain li { border-left-color: var(--border-strong); color: var(--text-2); }
.ti-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ti-meta a { display: inline-flex; align-items: center; gap: 3px; }
.ti-meta svg { width: 11px; height: 11px; }
.ti-foot { margin: 12px 0 0; font-size: 12px; color: var(--text-3); }
.insp-foot { padding: 4px 2px var(--s2); font-size: 13px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.issues { margin: 10px 0 0; padding: 10px 12px 10px 30px; border-radius: var(--r); background: var(--amber-bg); color: #6d3604; font-size: 12.5px; }
.issues li + li { margin-top: 2px; }
.issues.purple { background: var(--purple-bg); color: #46207e; }
.issues.quiet { background: var(--fill); color: var(--text-2); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tl-item { font-size: 13px; }
.tl-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.tl-body { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-item { padding: 10px 12px; border-radius: var(--r); background: var(--note-bg); border: 1px solid var(--note-line); }
.update-item { padding: 10px 12px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.ev-item { padding-left: 12px; border-left: 2px solid var(--accent-line); }
.history { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; }
.history li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--separator); font-size: 13.5px; }
.history time { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.history .what { font-weight: 600; }
.history li.superseded .what { text-decoration: line-through; color: var(--text-3); }
.task { padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--separator); background: var(--surface-alt); }
.task + .task { margin-top: var(--s1); }
.task-head { display: flex; align-items: center; gap: var(--s1); font-size: 13px; font-weight: 600; }
.task-head .aside { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--text-3); }
.task-msg { font-size: 12.5px; color: var(--text-2); margin: 6px 0; }
.task-err { font-size: 12.5px; color: var(--rose); margin: 6px 0; }
.steps { display: flex; gap: 4px; margin: var(--s1) 0 4px; flex-wrap: wrap; }
.step { font-size: 11px; font-weight: 600; padding: 3px var(--s1); border-radius: var(--r-pill); background: var(--fill); color: var(--text-3); }
.step.done { background: var(--accent-soft); color: var(--accent); }
.step.now { background: var(--accent); color: #fff; }
.step.bad { background: var(--rose-bg); color: var(--rose); }
.entry-options .field-row { margin-top: 10px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.disclosure { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 4px 0; }

/* ---------- Sheets (modal) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 20, 40, 0.28); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade-in var(--t) var(--ease); }
.sheet { width: min(620px, 100%); max-height: min(86vh, 860px); overflow-y: auto; background: var(--raised); border-radius: 20px; box-shadow: var(--shadow-3); padding: var(--s3); animation: rise var(--t) var(--ease); }
.sheet.wide { width: min(860px, 100%); }
.sheet h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.sheet .form-actions { margin-top: 20px; }
.sheet-tools { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.rec-card { background: var(--surface); border-radius: var(--r-lg); padding: var(--s2); margin-top: 12px; scroll-margin-top: var(--s2); }
.rec-card.focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.rec-head { display: flex; gap: var(--s1); align-items: center; flex-wrap: wrap; }
.rec-parts { display: grid; gap: var(--s1); margin: 10px 0; }
.rec-parts > div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; }
.rec-parts dt { font-size: 12px; font-weight: 600; color: var(--text-3); padding-top: 2px; }
.rec-parts dd { margin: 0; }
.defs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 12.5px; margin: 14px 0 6px; }
.defs dt { font-weight: 600; }
.defs dd { margin: 0; color: var(--text-2); }
.agent-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; margin-top: 6px; }
.tech-record .panel-title.sub { margin-top: 14px; }
.tour h2 { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.tour-steps { list-style: none; margin: 0 0 var(--s1); padding: 0; display: grid; gap: 14px; }
.tour-steps li { display: flex; gap: 14px; align-items: flex-start; }
.tour-steps p { margin: 3px 0 0; color: var(--text-2); font-size: 14px; }
.tour-icon { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.tour-icon svg { width: 20px; height: 20px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--s3); background: var(--window); }
.login.card { background: var(--surface); }
.login { width: min(380px, 100%); padding: var(--s4) 28px; text-align: center; }
.login .brand-icon { margin: 0 auto 14px; width: 56px; height: 56px; border-radius: var(--r-lg); }
.login h1 { margin: 0; font-size: 18px; font-weight: 600; }
.login p { margin: 6px 0 20px; color: var(--text-2); font-size: 13.5px; }
.login .input { width: 100%; height: 40px; font-size: 15px; }
.login .btn { width: 100%; margin-top: 12px; }
.login .error { color: var(--rose); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ---------- Toasts ---------- */
.toast-region { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: var(--s1); pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; padding: 10px var(--s2); border-radius: var(--r); background: rgba(30, 30, 40, 0.94); color: #fff; font-size: 13.5px; box-shadow: var(--shadow-3); animation: rise var(--t) var(--ease); display: flex; gap: 12px; align-items: center; }
.toast.error { background: #b3261e; }
.toast button { background: rgba(255, 255, 255, 0.18); border: 0; color: #fff; border-radius: var(--r-xs); padding: 3px 9px; cursor: pointer; }

/* ---------- Responsive ----------
   Page-level layout answers to the page's own width through container queries (above).
   These media queries only handle the shell itself: the sidebar becomes a drawer and the toolbar wraps. */
.mobile-scrim { display: none; }
@media (max-width: 1100px) { .search { width: 150px; } .agent-hero { grid-template-columns: 1fr; } }
@media (max-width: 1559px) { .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); } .shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); } }
@media (max-width: 780px) {
  :root { --gutter: 16px; }
  .shell, .shell.sidebar-collapsed, .shell.panel-open, .shell.panel-open.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 45; transform: translateX(-105%); transition: transform var(--t) var(--ease); visibility: visible !important; }
  .shell.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-3); }
  .shell.sidebar-open .mobile-scrim { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(20, 20, 40, 0.25); }
  .bar { padding: 0 var(--s2); }
  .topbar { position: relative; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px var(--gutter); }
  .content.scrolled .topbar { background: var(--window); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .bar-heading { flex: 1 1 calc(100% - 56px); }
  .topbar > .icon-btn { align-self: flex-start; margin-top: -2px; }
  .page-sub { display: grid; margin-left: 0; flex-basis: 100%; } .page-sub .dot-sep { display: none; }
  .search .kbd { display: none; }
  .month-nav .label { min-width: 96px; }
  .page-title, .crumb { font-size: 16px; }
  .page-actions { order: 3; flex-wrap: wrap; }
  .search { order: 4; flex: 1 1 140px; width: auto; }
  .page { padding: 16px var(--gutter) 80px; }
  .row-phone.hide-sm { display: none; }
  .week { overflow-x: auto; max-width: 100%; }
  .work-head { padding: 14px var(--s2) 10px; }
  .groups { padding: 0 4px 8px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .row-side { justify-content: flex-start; flex-wrap: wrap; }
  .list-head { display: none; }
  .rail-toggle { order: 5; }
  .work-title { white-space: nowrap; }
  .agent-strip .agent-cell { padding: 6px 8px; }
  .row-side .chev { display: none; }
  .inspector { inset: 0; width: 100%; border-radius: 0; }
  .rail { width: min(320px, 90vw); }
  .card-pad, .chart-card { padding: var(--s2); }
  .stat-row { gap: 10px; }
  .outcome-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history li { grid-template-columns: 1fr; gap: 2px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rec { grid-template-columns: minmax(0, 1fr); }
  .rec .btn { grid-row: auto; grid-column: 1; justify-self: start; }
  .disc-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; padding: 14px var(--s2); gap: 2px 10px; }
  .disc-aside { grid-row: 2; grid-column: 1 / -1; text-align: left; }
  .disc-body { padding: 0 var(--s2) var(--s2); }
  .card-title .aside { flex-basis: 100%; margin-left: 0; }
  .work-foot { padding: 12px var(--s2); }
}
@media (max-width: 420px) { .acct-title-row { flex-direction: column; } .local-time { justify-items: start; text-align: left; } }

/* ---------- Accessibility preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
  .pulse { animation: none; }
}
@media (prefers-contrast: more) {
  :root { --border: rgba(40, 40, 50, 0.4); --separator: rgba(40, 40, 50, 0.3); --text-2: #3a3a42; --text-3: #4a4a52; --sidebar-text-2: #3a3858; }
  .row[aria-current="true"] { outline: 2px solid var(--accent); outline-offset: -2px; }
}
@media (forced-colors: active) {
  .row[aria-current="true"] { outline: 2px solid Highlight; }
  .pill, .btn { border: 1px solid CanvasText; }
  .track-fill, .mini-track > span, .slots i.on, .call-dots i.on, .hbar-work, .col-bar, .qseg { background: Highlight; forced-color-adjust: none; }
  .outcome-seg button.chosen { outline: 3px solid Highlight; }
}


/* ---------- Overview composition: tiles → coverage | accounts to work → meeting progress ---------- */
.stat-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-period { font-size: 12px; color: var(--text-2); }
.stat-foot .over, .over { color: var(--rose); font-weight: 500; }
button.stat-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ov-mid { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
@container page (max-width: 820px) { .ov-mid { grid-template-columns: minmax(0, 1fr); } .ov-mid .work { order: -1; } }
.panel-h { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.panel-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }
.panel-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; }
.panel-top .panel-sub { margin: 0; }
.panel-link { margin-left: auto; font-size: 13px; }
.panel-note { margin: 12px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.45; }
.panel-card { padding: 22px 24px; margin-bottom: 20px; }
.panel-card.flush { padding: 10px 0 6px; }
.cov-card { padding: 22px 24px; }
.cov-card .panel-sub { margin-bottom: 14px; }
.donut { position: relative; width: 136px; height: 136px; margin: 4px auto 14px; }
.donut svg { width: 100%; height: 100%; display: block; }
.donut circle { fill: none; stroke-width: 18; }
.donut .d-rest { stroke: #cfe6fb; }
.donut .d-worked { stroke: var(--text); stroke-linecap: butt; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.donut-center span { font-size: 12px; color: var(--text-3); }
.cov-legend { margin: 0; display: grid; gap: 6px; font-size: 13px; }
.cov-legend > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cov-legend dt { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.cov-legend dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.cov-legend i { width: 8px; height: 8px; border-radius: 50%; }
.cov-legend .sw-worked { background: var(--text); } .sw-rest { background: #cfe6fb; }
.cov-legend .total { padding-top: 6px; border-top: 1px solid var(--separator); }
@container page (max-width: 820px) {
  .cov-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 24px; align-items: center; }
  .cov-card .panel-h, .cov-card .panel-sub, .cov-card .panel-note, .cov-card .viz-empty { grid-column: 1 / -1; }
  .donut { width: 112px; height: 112px; margin: 0; }
}
.meet-card { padding: 20px 22px; }
.mp-sub { margin: -10px 0 10px; }
.mbars { display: grid; gap: 2px; }
.mbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "track track"; gap: 6px 12px; align-items: center; padding: 8px; margin: 0 -8px; border: 0; border-radius: var(--r); background: transparent; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.mbar:hover { background: var(--fill); }
.mbar:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.mbar-name { grid-area: name; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; }
.mbar-name span:last-child { min-width: 0; overflow-wrap: anywhere; }
.mbar-track { grid-area: track; height: 6px; border-radius: var(--r-pill); background: rgba(28, 28, 28, 0.06); overflow: hidden; }
.mbar-track > span { display: block; height: 100%; border-radius: inherit; background: var(--agent); }
.mbar-val { grid-area: val; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mbar-val b { color: var(--text); font-weight: 600; }

/* Bottom row: a wide daily activity chart beside the compact meeting progress */
.ov-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 20px; align-items: stretch; }
@container page (max-width: 900px) { .ov-bottom { grid-template-columns: minmax(0, 1fr); } }
.act-card { padding: 20px 24px 18px; display: flex; flex-direction: column; min-width: 0; }
.act-card .panel-top { margin-bottom: 8px; }
.act-controls { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.act-total { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); margin-bottom: 8px; }
.act-total b { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.act-total span { color: var(--text-3); font-size: 12.5px; }
.act-chart { position: relative; flex: 1; min-height: 180px; display: flex; flex-direction: column; padding-right: 30px; }
.act-grid { position: absolute; inset: 8px 30px 26px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.act-grid span { border-top: 1px solid var(--separator); position: relative; }
.act-grid span::after { content: attr(data-v); position: absolute; right: -30px; top: -8px; width: 24px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.act-cols { position: relative; flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding-top: 8px; }
.act-col { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 6px; padding: 0; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; border-radius: var(--r-sm); min-width: 0; }
.act-col[disabled] { cursor: default; }
.act-col .act-bar { align-self: end; width: min(28px, 70%); border-radius: 6px 6px 2px 2px; background: var(--c-bar); transition: background var(--t-fast) var(--ease); }
.act-col.off .act-bar { background: var(--c-bar-soft); }
.act-col:not([disabled]):hover .act-bar, .act-col:focus-visible .act-bar { background: var(--text); }
.act-col:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus); }
.act-x { font-size: 11.5px; color: var(--text-3); white-space: nowrap; display: grid; justify-items: center; line-height: 1.25; height: 26px; }
.act-x b { font-weight: 500; color: var(--text-2); }
.act-col.today .act-x { color: var(--text); font-weight: 600; }
.act-col.nodata .act-x { opacity: 0.6; }
.act-tip { position: absolute; bottom: calc(100% - 4px); left: 50%; transform: translate(-50%, 4px); z-index: 3; padding: 4px 8px; border-radius: var(--r-sm); background: var(--text); color: #fff; font-size: 12px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.act-col:hover .act-tip, .act-col:focus-visible .act-tip { opacity: 1; transform: translate(-50%, 0); }
.act-col:first-child .act-tip { left: 0; transform: none; } .act-col:last-child .act-tip { left: auto; right: 0; transform: none; }
.act-hint { margin: 10px 0 0; font-size: 12px; color: var(--text-3); }

/* Coverage: percent in the ring, two counts beneath, the rules behind a disclosure */
.cov-counts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: center; }
.cov-counts > div { display: grid; gap: 2px; }
.cov-counts dt { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.cov-counts dd { margin: 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cov-counts i { width: 8px; height: 8px; border-radius: 50%; } .cov-counts .sw-worked { background: var(--text); }
.cov-why { margin: 10px 0 0; font-size: 12px; color: var(--text-2); text-align: center; }
.cov-total { margin: 4px 0 0; font-size: 12px; color: var(--text-3); text-align: center; }
.disc.how { margin-top: 12px; border-top: 1px solid var(--separator); padding-top: 4px; }
.disc.how > .disc-head { padding: 6px 0; }
.disc.how .disc-title { font-size: 12.5px; }
.how-list { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 12.5px; color: var(--text-2); }

/* ---------- Tables (task-table style) ---------- */
.tbl { container: tbl / inline-size; padding: 0 12px; }
.tbl-head, .trow { display: grid; grid-template-columns: var(--cols); gap: 16px; align-items: center; }
.tbl-head { padding: 4px 12px 8px; font-size: 12.5px; color: var(--text-3); border-bottom: 1px solid var(--border); }
.tbl .list { background: transparent; border-radius: 0; }
.trow { min-height: 54px; padding: 9px 12px; }
.td { min-width: 0; font-size: 13.5px; }
.td-company .row-title { font-size: 14px; }
.td-agent { display: flex; align-items: center; gap: 8px; }
.td-agent span:last-child { line-height: 1.3; overflow-wrap: anywhere; }
.td-note { display: block; font-size: 12px; color: var(--text-3); }
.td-strong { font-weight: 500; }
.td-next, .td-due { display: grid; }
.td-due .due { font-size: 13.5px; }
.td-open { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; font-size: 13px; color: var(--text-3); }
.td-open svg { width: 14px; height: 14px; }
.trow:hover .td-open { color: var(--text); }
@container tbl (max-width: 560px) {
  .tbl-head { display: none; }
  .trow { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 3px; }
  .trow .td-company { flex: 1 1 calc(100% - 72px); order: 1; }
  .trow .td-open { order: 2; margin-left: auto; }
  .trow .td:not(.td-company):not(.td-open) { order: 3; font-size: 12.5px; color: var(--text-2); }
  .trow .td-next, .trow .td-due { display: flex; gap: 6px; }
}
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px 10px; flex-wrap: wrap; padding: 10px 24px 4px; font-size: 12.5px; color: var(--text-3); }
.pager .pager-range { margin-right: auto; font-variant-numeric: tabular-nums; }
.pager .icon-btn { width: 26px; height: 26px; }
.pager .icon-btn svg { width: 16px; height: 16px; }
.pager .icon-btn[disabled] { opacity: 0.35; cursor: default; }
.pager .link-button { font-size: 13px; }
.panel-card.flush .pager { padding-bottom: 8px; }
.work .tbl { padding: 0 12px; }
.work .pager { padding: 10px 24px 16px; }
.work > .disc.done-section { margin: 0 12px 10px; border-radius: var(--r-lg); background: transparent; border-top: 1px solid var(--separator); }
.done-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.done-list li { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 6px 0; font-size: 13.5px; }
.done-list .done-agent { font-weight: 500; }
.done-list .link-button { margin-left: auto; font-size: 13px; }
.rail-top { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 12px; font-size: 12.5px; color: var(--text-3); }
.rail-toggle svg { width: 18px; height: 18px; }
.fu-tools .search { width: 240px; margin-left: auto; height: 32px; }
.fu-tools { margin-bottom: 16px; }
@container page (max-width: 560px) { .fu-tools .search { width: 100%; margin-left: 0; } }

/* Tablets: the navigation becomes a drawer so the workspace keeps its width. */
@media (min-width: 781px) and (max-width: 1024px) {
  .shell, .shell.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 45; transform: translateX(-105%); transition: transform var(--t) var(--ease); visibility: visible !important; }
  .shell.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-3); }
  .shell.sidebar-open .mobile-scrim { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(20, 20, 40, 0.25); }
}
.ov-mid > .card + .card { margin-top: 0; }
.viz-stack { display: grid; gap: 20px; }
.viz-stack > .card { margin: 0; }

/* Follow-ups: seven-day schedule strip and date-grouped list */
.fu-strip { display: grid; grid-template-columns: minmax(96px, 1.1fr) repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.fu-day { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 8px; align-items: end; padding: 10px 12px 10px; min-height: 64px; border: 0; border-radius: var(--r-lg);
  background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: inherit; overflow: hidden; transition: background var(--t-fast) var(--ease); }
.fu-day:hover:not([disabled]) { background: var(--surface-alt); }
.fu-day[disabled] { cursor: default; opacity: 0.6; }
.fu-day.on { background: var(--text); color: #fff; }
.fu-day.on .fu-d-name, .fu-day.on .fu-d-n.zero { color: rgba(255, 255, 255, 0.75); }
.fu-day:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.fu-d-name { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.fu-d-name b { font-weight: 600; }
.fu-d-n { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.fu-d-n.zero { color: var(--text-3); font-weight: 400; }
.fu-d-bar { align-self: end; width: 6px; height: 28px; border-radius: 3px; background: rgba(28, 28, 28, 0.06); display: flex; align-items: flex-end; overflow: hidden; }
.fu-d-bar i { display: block; width: 100%; background: var(--c-bar); border-radius: 3px; }
.fu-day.on .fu-d-bar { background: rgba(255, 255, 255, 0.2); } .fu-day.on .fu-d-bar i { background: #fff; }
.fu-day.over .fu-d-n { color: var(--rose); }
.fu-day.over.on { background: var(--rose); } .fu-day.over.on .fu-d-n { color: #fff; }
.fu-day.today .fu-d-name { color: var(--text); font-weight: 500; }
.fu-daynote { font-size: 13px; color: var(--text-2); display: inline-flex; gap: 8px; align-items: baseline; }
.fu-group-h { display: flex; align-items: baseline; gap: 8px; padding: 14px 12px 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.fu-group-h .n { font-weight: 400; color: var(--text-3); }
.tbl .list > li.fu-group-h + li { border-top: 0; }
.tbl .list > li + li.fu-group-h { border-top: 0; margin-top: 4px; }
.fu-tbl .td-next .td-strong { font-size: 14px; }
.fu-note { margin-top: 10px; font-size: 12px; }

/* SDA Team profile cards: name first, three aligned figures, a coverage bar in the agent's color */
.team-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.team-card .team-card-name { display: inline-flex; align-items: center; gap: 8px; }
.team-card .team-card-name .tag-dot { width: 10px; height: 10px; }
.team-card-approach { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 0; }
.tc-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 0 2px; }
.tc-metrics > span { display: grid; gap: 1px; }
.tc-metrics b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tc-metrics b i { font-style: normal; font-size: 13px; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.tc-metrics small { font-size: 12px; color: var(--text-3); }
.tc-cov { display: grid; gap: 4px; }
.tc-cov-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.tc-cov .mini-track { height: 6px; margin: 0; }
.team-card-foot { font-size: 12.5px; color: var(--text-3); }

/* Delivery history: compact rows, explanation preview, drawer for the full text */
.dl-table td { white-space: nowrap; }
.dl-table td.dl-why { white-space: normal; max-width: 360px; font-size: 12.5px; color: var(--text-2); }
.dl-why .link-button { font-size: 12.5px; white-space: nowrap; }
.drawer-scrim { place-items: stretch end; padding: 12px; }
.sheet.drawer { width: min(480px, 100%); max-height: none; height: 100%; border-radius: 20px; animation: panel-in 180ms var(--ease); display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.explain-text { flex: 1; overflow-y: auto; margin: 12px 0 0; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 70ch; }
.mi-empty .card-actions { margin-top: 14px; }
.ov-bottom > .card + .card { margin-top: 0; }
.cov-counts dt { white-space: nowrap; }

/* Accounts to work: folded agent groups (Oct 30) */
.work-count { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.groups { padding: 0 8px 4px; }
.groups .group-head .group-name { font-size: 14.5px; }
.groups-note { margin: 0; padding: 4px 12px 12px; }
.start-btn svg { width: 14px; height: 14px; }
.groups .group-tbl .tbl-head { display: none; }
.groups .group-count strong { margin-right: 0; }
.copy-mini { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface, transparent); color: var(--text-2); font: inherit; font-size: 12px; line-height: 18px; cursor: pointer; vertical-align: middle; }
.copy-mini:hover { background: var(--fill); color: var(--text); }
.copy-mini:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus); }
.copy-mini svg { width: 12px; height: 12px; }

/* Travel indicators for scanning on a call (Oct 30) */
.ti-bullets { margin: 2px 0 4px; padding: 0 0 0 18px; display: grid; gap: 6px; font-size: 15px; line-height: 1.4; }
.ti-bullets li::marker { color: var(--mint); }
.ti-disc { margin-top: 8px; }
.ti-label.plain { color: var(--text-3); }
.ti-why { margin: 0 0 4px; font-size: 13.5px; color: var(--text-2); }

/* Opener: one research-based sentence at the top of the account (Oct 30) */
.opener { margin: 0 0 12px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--mint-bg); }
.opener-label { font-size: 12px; font-weight: 600; color: var(--mint); margin-bottom: 2px; }
.opener-text { margin: 0; font-size: 15.5px; line-height: 1.45; font-weight: 500; color: var(--text); }

/* Note edit / remove (Oct 30) */
.note-item .tl-head { display: flex; align-items: baseline; gap: 6px; }
.note-actions { margin-left: auto; display: inline-flex; gap: 12px; opacity: .75; }
.note-item:hover .note-actions, .note-actions:focus-within { opacity: 1; }
.note-actions .link-button { font-size: 12px; }
.danger-link { color: var(--rose); }
.note-item.editing { padding-bottom: 4px; }

/* ===== Visual refinement (Oct 30): composition, hierarchy, polish ===== */
/* Type scale: page 19px medium · section 15px medium · body 14px · meta 12.5px */
.page-title { font-size: 19px; font-weight: 600; letter-spacing: -0.012em; }
.panel-h, .work-title { font-size: 15px; font-weight: 600; }
.panel-sub { font-size: 12.5px; color: var(--text-3); }

/* Summary tiles: label + icon, one prominent number, one supporting line */
.stat-row { gap: 20px; margin-bottom: 20px; }
.stat-card { gap: 4px; padding: 16px 20px 16px; align-items: stretch; text-align: left; }
.stat-top { align-items: center; font-size: 13px; font-weight: 500; color: var(--text); }
.stat-top svg { width: 17px; height: 17px; color: var(--text-2); }
.stat-card .stat-value { display: block; margin-top: 6px; font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.stat-card .stat-value small { font-size: 15px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.stat-card .stat-period { display: block; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Overview: coverage beside the queue at balanced heights; 20px section gaps */
.ov-mid { align-items: start; margin-bottom: 20px; }
.cov-card { display: flex; flex-direction: column; padding: 20px 22px; }
.cov-card .panel-sub { margin-bottom: 4px; }
.cov-card .donut { width: 124px; height: 124px; margin: 14px auto 14px; }
.cov-card .cov-counts { margin-bottom: 0; }
.cov-card .disc.how { margin-top: 12px; }
.cov-counts dd { font-size: 18px; }
.ov-bottom { gap: 20px; }
.work-head { padding: 18px 22px 10px; gap: 10px 16px; }
.work .pager { padding: 6px 22px 14px; }

/* Queue groups: name · labeled completion bar · count + chevron */
.groups { padding: 0 10px 4px; }
.groups .group-head { display: grid; grid-template-columns: 10px minmax(120px, 1fr) minmax(140px, 1.1fr) auto 16px; gap: 12px; padding: 11px 12px; border-radius: var(--r); }
.groups .group-head .group-title { min-width: 0; }
.groups .group-head .group-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-progress { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gp-track { flex: 1; max-width: 140px; height: 6px; border-radius: 3px; background: rgba(28, 28, 28, 0.07); overflow: hidden; }
.gp-track > span { display: block; height: 100%; border-radius: 3px; background: var(--text); }
.gp-label { font-size: 12.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.groups .group-count { margin-left: 0; text-align: right; }
.muted-dot { background: rgba(28, 28, 28, 0.18); }
.groups .group-tbl .trow { min-height: 50px; padding: 8px 12px; border-radius: var(--r-sm); }
.groups .group-tbl .list > li + li { border-top: 1px solid var(--separator); }
.groups .row:hover { background: rgba(28, 28, 28, 0.035); }
.groups .row[aria-current="true"] { background: rgba(149, 164, 252, 0.16); }
@container work (max-width: 560px) { .groups .group-head { grid-template-columns: 10px minmax(0, 1fr) auto 16px; } .group-progress { display: none; } }

/* Activity chart: the main visual anchor, flat color, light gridlines */
.act-card { padding: 20px 22px 16px; }
.act-total b { font-size: 26px; }
.act-grid span { border-top: 1px solid rgba(28, 28, 28, 0.06); }
.act-grid span:last-child { border-top-color: rgba(28, 28, 28, 0.14); }
.act-col .act-bar { width: min(30px, 64%); border-radius: 7px 7px 2px 2px; background: var(--c-bar); }
.act-col.off .act-bar { background: var(--c-bar-soft); }
.act-col:not([disabled]):hover .act-bar, .act-col:focus-visible .act-bar { background: #6f80f2; }
.act-tip { font-size: 12px; padding: 3px 8px; }
.act-hint { font-size: 12px; }

/* Account drawer: a finished workspace, sections divided by whitespace and hairlines */
.inspector-body { gap: 0; padding: 18px 22px 56px; }
.acct-head { padding: 0 0 14px; }
.acct-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.insp-title { font-size: 19px; }
.grade-chip { flex: none; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-sm); background: var(--fill); color: var(--text); font-variant-numeric: tabular-nums; }
.grade-chip.low { background: var(--rose-bg); color: var(--rose); }
.acct-links { gap: 6px 18px; }
.acct-links > div { align-items: center; }
.copy-mini { border-radius: var(--r-sm); padding: 1px 7px; background: transparent; }
.inspector-body > .panel, .inspector-body > .phone-card, .inspector-body > .outcome-card { background: transparent; border-radius: 0; padding: 16px 2px; border-top: 1px solid var(--separator); }
.inspector-body > .opener { margin: 0 0 14px; padding: 10px 14px; background: transparent; border-left: 3px solid var(--c-bar); border-radius: 0; }
.opener-label { color: var(--text-3); }
.phone-num { font-size: 26px; margin: 2px 0 4px; letter-spacing: 0.01em; }
.phone-card .ask-for { margin-top: 8px; padding-top: 0; border-top: 0; }
.why-panel .ti-bullets { font-size: 14.5px; gap: 7px; margin-top: 4px; }
.why-panel .ti-bullets li::marker { color: var(--text-3); }
.outcome-seg button { background: var(--surface); border: 1px solid transparent; height: 42px; border-radius: var(--r); }
.outcome-seg button:hover { background: var(--fill-strong); }
.inspector-body > .state-card { margin: 4px 0 12px; }

/* Follow-ups: compact schedule strip, quiet zero days, accent for the selected day */
.fu-strip { grid-template-columns: minmax(84px, 1fr) repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.fu-day { min-height: 0; padding: 8px 12px; grid-template-columns: 1fr auto; grid-template-rows: auto; align-items: center; border-radius: var(--r); background: transparent; border: 1px solid var(--border); }
.fu-day .fu-d-name { grid-column: auto; font-size: 12.5px; }
.fu-day .fu-d-n { font-size: 14px; font-weight: 600; }
.fu-day .fu-d-n.zero { color: var(--text-3); font-weight: 400; }
.fu-day:has(.fu-d-n.zero):not(.on) { border-color: transparent; background: transparent; }
.fu-day:not(:has(.fu-d-n.zero)):not(.on):not([disabled]) { background: var(--surface); border-color: transparent; }
.fu-day.on { background: var(--lavender-card); color: var(--text); border-color: transparent; }
.fu-day.on .fu-d-name, .fu-day.on .fu-d-n.zero { color: var(--text); }
.fu-day.over.on { background: var(--rose-bg); } .fu-day.over.on .fu-d-n { color: var(--rose); }
.fu-group-h { padding: 14px 12px 6px; font-size: 13px; }

/* Controls: consistent heights and radii, fewer pills */
.count-chip, .section-title .count-chip { border-radius: var(--r-sm); }
.btn { border-radius: var(--r); }
.card, .disc, .stat-card { border-radius: 18px; }
.fu-day[disabled] { border-color: transparent; }
.gp-track > span { background: rgba(28, 28, 28, 0.78); }

/* ------------------------------------------------------------------ All Time Accounts insights
   One quiet card per tab: two panes, thin marks, 2px surface gaps, labels in text tokens, tips on hover/focus. */
.vz-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s3); padding: 20px 22px; margin-bottom: var(--s2); }
.vz-card.one { grid-template-columns: minmax(0, 1fr); }
.vz-card > .vz-pane + .vz-pane { border-left: 1px solid var(--separator); padding-left: var(--s3); }
.vz-pane { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vz-h h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.005em; color: var(--text); }
.vz-h p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.vz-h p b { color: var(--text); font-weight: 600; }
.vz-foot { margin: auto 0 0; font-size: 12px; color: var(--text-3); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.vz-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--c); margin-left: 4px; }
.vz-swatch:first-child { margin-left: 0; }
.vz-inline { border: 0; background: none; padding: 0; font: inherit; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; cursor: pointer; }
.vz-inline:hover, .vz-inline.on { color: var(--text); text-decoration-color: currentColor; }

/* Tips: dark chip above the mark, same as the Daily activity chart */
.vz-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 4px); z-index: 4; padding: 5px 9px; border-radius: var(--r-sm); background: var(--text); color: #fff;
  font-size: 12px; font-weight: 500; line-height: 1.35; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
:is(.vz-col, .vz-bar, .vz-mini):is(:hover, :focus-visible) > .vz-tip { opacity: 1; transform: translate(-50%, 0); }
.vz-bar > .vz-tip { left: 40%; }
:is(.vz-col, .vz-bar, .vz-key, .vz-chip, .vz-inline, .vz-mini, .vz-pip-row):focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus); border-radius: var(--r-sm); }

.vz-legend { list-style: none; margin: 0 -6px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.vz-legend.col { flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0; max-width: 240px; align-self: center; }
.vz-key { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 5px 6px; margin: 0; border-radius: var(--r-sm); font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left; }
.vz-key i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.vz-key span { min-width: 0; white-space: nowrap; }
.vz-legend.col .vz-key { width: 100%; } .vz-legend.col .vz-key span { flex: 1; }
.vz-legend.col .vz-key b { min-width: 24px; text-align: right; }
.vz-key b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.vz-key:not([disabled]):hover, .vz-key.on { background: var(--fill); color: var(--text); }
.vz-key[disabled] { cursor: default; opacity: 0.55; }

/* Columns */
.vz-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; }
.vz-col { position: relative; display: grid; gap: 6px; justify-items: center; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; min-width: 0; border-radius: var(--r-sm); }
.vz-col[disabled] { cursor: default; }
.vz-col-plot { height: var(--h); width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.vz-col-v { font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; line-height: 1; }
.vz-col[disabled] .vz-col-v { color: var(--text-3); font-weight: 500; }
.vz-col-stack { width: min(24px, 72%); display: flex; flex-direction: column; gap: 2px; border-radius: var(--r-xs) var(--r-xs) 0 0; overflow: hidden; transition: filter var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease); }
.vz-col-stack > span { min-height: 2px; }
.vz-col:not([disabled]):hover .vz-col-stack { filter: brightness(0.88); }
.vz-cols:has(.on) .vz-col:not(.on) .vz-col-stack { opacity: 0.35; }
.vz-col-x { font-size: 11.5px; color: var(--text-3); white-space: nowrap; display: grid; justify-items: center; line-height: 1.25; }
.vz-col-x small { font-size: 11px; }
.vz-col.cur .vz-col-x, .vz-col.on .vz-col-x { color: var(--text); font-weight: 600; }
.vz-cols > .vz-col:first-child > .vz-tip { left: 0; transform: translate(0, 4px); } .vz-cols > .vz-col:first-child:is(:hover, :focus-visible) > .vz-tip { transform: none; }
.vz-cols > .vz-col:last-child > .vz-tip { left: auto; right: 0; transform: translate(0, 4px); } .vz-cols > .vz-col:last-child:is(:hover, :focus-visible) > .vz-tip { transform: none; }

/* Horizontal bars */
.vz-bars { display: grid; gap: 4px; }
.vz-bar { position: relative; display: grid; grid-template-columns: minmax(104px, 0.8fr) minmax(0, 1.5fr) 36px; gap: 12px; align-items: center; border: 0; background: none; padding: 5px 6px; margin: 0 -6px;
  border-radius: var(--r-sm); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.vz-bar[disabled] { cursor: default; }
.vz-bar:not([disabled]):hover, .vz-bar.on { background: var(--fill); }
.vz-bar-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--text-2); }
.vz-bar-name span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-bar-track { position: relative; height: 10px; border-radius: var(--r-xs); background: var(--track); overflow: hidden; }
.vz-bar-fill { position: absolute; inset: 0 auto 0 0; display: flex; gap: 2px; border-radius: var(--r-xs); overflow: hidden; }
.vz-bar-fill > span { min-width: 2px; }
.vz-bar-val { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; min-width: 28px; display: flex; gap: 6px; justify-content: flex-end; align-items: baseline; }
.vz-bar-val b { color: var(--text); font-weight: 600; font-size: 13px; }
.vz-bars.rate .vz-bar { grid-template-columns: minmax(104px, 0.8fr) minmax(0, 1.5fr) 92px; }
.vz-bars:has(.on) .vz-bar:not(.on) .vz-bar-fill { opacity: 0.4; }

/* Donut */
.vz-donut-row { display: flex; align-items: center; gap: var(--s3); }
.vz-donut-row .vz-legend { flex: 0 1 220px; }
.vz-donut { position: relative; width: 112px; height: 112px; flex: none; }
.vz-donut svg { width: 100%; height: 100%; display: block; }
.vz-donut circle { fill: none; stroke-width: 14; }
.vz-donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.vz-donut-c b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.vz-donut-c span { font-size: 11.5px; color: var(--text-3); }

/* State chips */
.vz-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.vz-chip { display: inline-flex; align-items: baseline; gap: 6px; border: 0; padding: 6px 10px; border-radius: var(--r); background: var(--fill); font: inherit; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.vz-chip b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.vz-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); align-self: center; }
.vz-chips.col { flex-direction: column; align-items: flex-start; flex: 0 1 260px; }
.vz-chip.awaiting:not([disabled]) { background: #fff3e2; color: #8a4a00; } .vz-chip.awaiting:not([disabled]) b { color: #8a4a00; }
.vz-chip:not([disabled]):hover { background: var(--fill-strong); }
.vz-chip.awaiting:not([disabled]):hover { background: #ffe9c7; }
.vz-chip.on { box-shadow: inset 0 0 0 1.5px currentColor; }
.vz-chip[disabled] { cursor: default; opacity: 0.6; }

/* Drill-down status line above the table */
.vz-focus { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin: 0 0 10px; padding: 8px 8px 8px 14px; border-radius: var(--r-lg); background: var(--lavender-card); font-size: 13px; color: var(--text-2); }
.vz-focus b { color: var(--text); font-weight: 600; }

@media (max-width: 900px) {
  .vz-card { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: var(--s2); }
  .vz-card > .vz-pane + .vz-pane { border-left: 0; padding-left: 0; border-top: 1px solid var(--separator); padding-top: var(--s2); }
  .vz-tip { white-space: normal; width: max-content; max-width: 240px; }
  .vz-bar, .vz-bars.rate .vz-bar { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .vz-bar-name { grid-column: 1 / -1; }
  .vz-bar-val { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .vz-tip, .vz-col-stack, .vz-ring-arc { transition: none; } }

/* Pastel pass: rings, mini rings, pips, lollipops, and a calmer surface for the insight card */
.vz-card { background: linear-gradient(180deg, #fbfcff 0%, var(--surface) 100%); }
.vz-col-stack > span { border-radius: 0; }
.vz-col-stack { border-radius: 6px 6px 2px 2px; }
.vz-donut.big { width: 136px; height: 136px; }
.vz-donut.big circle { stroke-width: 16; }
.vz-donut-c span { line-height: 1.3; }
.vz-key em { font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 18px; text-align: right; }
.vz-legend.col { max-width: 260px; flex: 1 1 200px; }
.vz-key i.ring { background: none; box-shadow: inset 0 0 0 3px var(--c); width: 10px; height: 10px; }
.vz-rings { position: relative; width: var(--sz); height: var(--sz); flex: none; }
.vz-rings svg { width: 100%; height: 100%; display: block; }
.vz-rings circle { fill: none; }
.vz-ring-track { opacity: 0.22; }
.vz-ring-arc { stroke-linecap: round; transition: stroke-dasharray var(--t) var(--ease); }
.vz-minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px 8px; }
.vz-mini { position: relative; display: grid; justify-items: center; gap: 6px; padding: 10px 4px 8px; border: 0; border-radius: var(--r-lg); background: transparent; font: inherit; color: inherit; cursor: pointer; }
.vz-mini:not([disabled]):hover { background: var(--fill); }
.vz-mini .vz-donut-c b { font-size: 14px; }
.vz-mini-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vz-mini-sub { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; margin-top: -4px; }
.vz-pip-rows { display: grid; gap: 2px; }
.vz-pip-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; border: 0; background: none; padding: 7px 8px; margin: 0 -8px; border-radius: var(--r-sm); font: inherit; font-size: 13px; color: var(--text-2); text-align: left; cursor: pointer; }
.vz-pip-row[disabled] { cursor: default; } .vz-pip-row[disabled] b { color: var(--text-3); font-weight: 500; }
.vz-pip-row:not([disabled]):hover, .vz-pip-row.on { background: var(--fill); color: var(--text); }
.vz-pip-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.vz-pips { display: inline-flex; gap: 5px; }
.vz-pips i { width: 12px; height: 12px; border-radius: 50%; background: var(--track); }
.vz-pip-rows:has(.on) .vz-pip-row:not(.on) .vz-pips { opacity: 0.4; }
.vz-bars.lolli .vz-bar-track { background: none; overflow: visible; }
.vz-bars.lolli .vz-bar-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 1px; background: var(--track); }
.vz-bars.lolli .vz-bar-fill { top: 50%; bottom: auto; height: 2px; margin-top: -1px; overflow: visible; }
.vz-bars.lolli .vz-bar-fill::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 2px var(--surface); }
.vz-bars.lolli .vz-bar-fill > span { filter: saturate(0.9); }
@media (max-width: 900px) { .vz-donut-row { flex-wrap: wrap; gap: var(--s2); } }
.vz-legend.col { align-items: stretch; justify-content: flex-start; }
.vz-chips.col { align-items: flex-start; justify-content: flex-start; }
.vz-minis { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px 4px; }
