/* =============================================================================
 * styles.css — Snovasys Sales prospecting prototype.
 * Single design-system stylesheet. No framework.
 * ========================================================================== */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --ink: #1f2a44;
  --ink-2: #475569;
  --muted: #7c8aa3;
  --border: #e7ecf3;
  --border-2: #dfe6ef;
  --primary: #2f6df6;
  --primary-ink: #1d4ed8;
  --good: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.05);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --sidebar: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Wave 2 — chart palette (consumed by assets/js/chart.js via the CSS custom props).
   * A cohesive 8-colour categorical scale anchored on the brand blue. */
  --chart-1: #2f6df6;
  --chart-2: #16a34a;
  --chart-3: #d97706;
  --chart-4: #7c3aed;
  --chart-5: #0891b2;
  --chart-6: #db2777;
  --chart-7: #65a30d;
  --chart-8: #475569;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; background: #eef2f8; padding: 1px 5px; border-radius: 5px; }
h1, h2, h3 { margin: 0; color: var(--ink); }

/* ---------- layout ---------- */
.layout { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 24px 28px 64px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ---------- sidebar ---------- */
.sidebar {
  width: var(--sidebar); flex-shrink: 0;
  background: #0f1b33; color: #c7d2e4;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 20px 18px 18px; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--primary); color: #fff; font-weight: 800;
  display: grid; place-items: center; font-size: 18px;
}
.brand__logo { width: 34px; height: 34px; flex-shrink: 0; display: block; }
.brand__text { min-width: 0; }
.brand__name { font-weight: 700; color: #fff; font-size: 15px; }
.brand__sub { font-size: 11.5px; color: #8092ad; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; flex: 1; overflow-y: auto; }
.nav__item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px; color: #b7c4da;
  font-weight: 500; font-size: 13.5px;
}
.nav__item:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav__item.active { background: var(--primary); color: #fff; }
.nav__icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar__foot-name { font-size: 11.5px; font-weight: 600; color: #6b7c98; letter-spacing: .2px; }

/* ---------- inline-SVG icon set (window.Icons) ----------
 * One cohesive stroke-based family. Every glyph inherits the surrounding text
 * colour (stroke=currentColor) so it tracks the theme + hover/active states, and
 * sits on the text baseline. .ic is the base; modifiers tweak size/alignment. */
.ic { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -.18em; }
.ic--lg { width: 22px; height: 22px; }
.ic--sm { width: 15px; height: 15px; }
/* inline within a run of text (banners, hints, stat clusters): slightly smaller,
 * nudged to sit with the type, with a hair of trailing space. */
.ic--inline { width: 15px; height: 15px; vertical-align: -.15em; }
/* nav glyph: the SVG fills the fixed-width icon slot and inherits the item colour */
.nav__icon .ic { width: 18px; height: 18px; vertical-align: middle; }
/* a button that pairs an icon with a text label keeps them aligned + spaced */
.btn-icon { display: inline-flex; align-items: center; gap: 6px; }
.btn-icon .ic { width: 15px; height: 15px; vertical-align: middle; }
/* card titles that lead with an icon (note / meeting / conversation headers) */
.card__title { display: inline-flex; align-items: center; gap: 7px; }
.card__title .ic { color: var(--muted); }
/* engagement stat clusters (opens · clicks · replies): icon + count, tight */
.em-stats { display: inline-flex; align-items: center; gap: 2px; }
.em-stats .ic { width: 14px; height: 14px; vertical-align: -.15em; opacity: .85; }

/* ---------- topbar ---------- */
.topbar {
  height: 56px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 20;
}
.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__title { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.topbar__right { display: flex; gap: 18px; align-items: center; font-size: 13px; color: var(--muted); }
.topbar__user strong { color: var(--ink); }

/* hamburger — hidden above the mobile breakpoint (no layout cost on desktop) */
.nav-toggle { display: none; width: 36px; height: 36px; flex-shrink: 0; padding: 0; border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.nav-toggle:hover { border-color: var(--primary); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 16px; height: 2px; background: var(--ink-2); border-radius: 2px; margin: 0 auto; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

/* topbar identity skeleton — a subtle shimmer instead of literal "As of …"/"…" */
.skel { display: inline-block; height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--border) 25%, var(--border-2) 37%, var(--border) 63%); background-size: 400% 100%; animation: skel-shimmer 1.4s ease infinite; vertical-align: middle; }
.skel--date { width: 92px; }
.skel--user { width: 96px; }
@keyframes skel-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* off-canvas scrim (mobile only; toggled by body.nav-open) */
.nav-scrim { display: none; position: fixed; inset: 0; background: rgba(15,27,51,.45); z-index: 29; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 22px; letter-spacing: -.3px; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.back { display: inline-block; margin-bottom: 12px; color: var(--muted); font-weight: 500; }
.back:hover { color: var(--primary-ink); text-decoration: none; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 18px; overflow: hidden; }
.card__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card__head h3 { font-size: 14.5px; font-weight: 650; }
.card__action { font-size: 13px; }
.card__body { padding: 16px; }
.link { color: var(--primary-ink); font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > .card { margin-bottom: 0; }

/* ---------- KPIs ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.kpi__value { font-size: 28px; font-weight: 750; letter-spacing: -.5px; color: var(--ink); }
.kpi__label { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; font-weight: 500; }
.kpi__sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.kpi.good .kpi__value { color: var(--good); }
/* KPI deep-link: the card is a real anchor — strip the link underline/colour so it
 * still reads as a card, add a hover/focus affordance, and a visible keyboard focus
 * ring (a11y). */
a.kpi { display: block; text-decoration: none; color: inherit; }
a.kpi.kpi--link { cursor: pointer; transition: box-shadow .12s, border-color .12s, transform .06s; }
a.kpi.kpi--link:hover { border-color: var(--primary); box-shadow: var(--shadow-md, 0 4px 14px rgba(15,27,51,.10)); }
a.kpi.kpi--link:active { transform: translateY(1px); }
a.kpi.kpi--link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.row-link { cursor: pointer; transition: background .12s; }
.row-link:hover, tr.grow:hover { background: var(--surface-2); }
/* Keyboard-accessible navigable rows (a11y): the row carries tabindex=0 + role=link,
 * so give it a visible focus ring. -2px inset so the outline reads inside the row. */
.row-link:focus-visible, tr.grow:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
/* Screen-reader-only utility: visually hidden but available to assistive tech (used by
 * the priority dot's text label so priority is not conveyed by colour alone). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cell-strong { font-weight: 600; color: var(--ink); }
.col-mid { white-space: nowrap; }
.col-prio { width: 26px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.note { background: #fff8e8; border: 1px solid #f5e6c0; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; color: #8a6d2f; margin: 12px 0 0; }

/* ---------- badges / chips ---------- */
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: #eef2f8; color: var(--ink-2); border: 1px solid transparent; text-transform: capitalize; }
.badge.customer { background: #fef3c7; color: #92591b; }
.badge.poc { background: #e0edff; color: var(--primary-ink); }
.badge.kind-news { background: #e0f2fe; color: #0369a1; }
.badge.kind-osint { background: #ede9fe; color: #6d28d9; }
.badge.status-open { background: #e7f6ec; color: #15803d; }
.badge.status-in_progress { background: #e0edff; color: var(--primary-ink); }
.badge.status-done { background: #eef2f8; color: var(--muted); }
.badge.status-snoozed { background: #f1f5f9; color: #64748b; }
.badge.actor-agent { background: #ede9fe; color: #6d28d9; }
.badge.actor-human { background: #e0f2fe; color: #0369a1; }
.badge.actor-system { background: #eef2f8; color: var(--muted); }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 9px; border-radius: 7px; background: #eef2f8; color: var(--ink-2); margin: 0 4px 4px 0; }
.chip.hook { background: #f0f7ff; color: var(--primary-ink); border: 1px solid #d8e6ff; }
.chip small { color: var(--muted); font-size: 10px; }
.chips { display: flex; flex-wrap: wrap; }

.stage-pill { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; color: #fff; background: var(--s, #64748b); white-space: nowrap; }

/* lead score badge */
.score-badge { display: inline-flex; flex-direction: column; align-items: center; min-width: 38px; font-weight: 750; font-size: 14px; color: var(--b); line-height: 1.1; }
.score-badge small { font-size: 9px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--b); opacity: .85; }

/* score bars */
.score-grid { display: flex; flex-direction: column; gap: 9px; }
.scorebar { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 10px; }
.scorebar__label { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scorebar__track { height: 8px; background: #eef2f8; border-radius: 6px; overflow: hidden; }
.scorebar__fill { display: block; height: 100%; border-radius: 6px; }
.scorebar__num { font-weight: 700; font-size: 12.5px; text-align: right; color: var(--ink); }

/* ---------- avatars / owner ---------- */
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #dbe5f3; color: #2b4a78; font-size: 10.5px; font-weight: 700; flex-shrink: 0; }
.avatar--agent { background: #ede9fe; color: #6d28d9; }
.avatar--none { background: #eef2f8; color: var(--muted); }
.owner { display: inline-flex; align-items: center; gap: 8px; }
.handoff { font-size: 10.5px; color: #6d28d9; background: #f3effe; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }

/* ---------- funnel ---------- */
.funnel { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 6px 0; }
.funnel__col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; text-align: center; }
.funnel__col:hover { text-decoration: none; }
.funnel__bar { width: 70%; max-width: 64px; border-radius: 7px 7px 0 0; transition: opacity .15s; }
.funnel__col:hover .funnel__bar { opacity: .82; }
.funnel__count { font-weight: 750; font-size: 16px; color: var(--ink); }
.funnel__name { font-size: 11px; color: var(--muted); line-height: 1.2; }
.funnel-down { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border-2); font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.funnel-down span { background: #f1f5f9; padding: 2px 8px; border-radius: 6px; }
.funnel-down i { color: #c2cbd8; font-style: normal; }

/* ---------- timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl__item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tl__item:last-child { border-bottom: none; }
.tl__icon { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; flex-shrink: 0; color: var(--ink-2); }
.tl__icon .ic { width: 16px; height: 16px; vertical-align: middle; }
.tl__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: block; }
/* actor-tinted timeline glyphs: agent rows read in the brand accent, human in ink */
.tl__item--agent .tl__icon { color: var(--primary); border-color: #cdddfb; background: #f3f7ff; }
.tl__summary { font-size: 13.5px; color: var(--ink); }
.tl__meta { margin-top: 3px; display: flex; gap: 8px; align-items: center; font-size: 11.5px; }
/* WI-022 (A3/A4) — expandable timeline rows + type filter */
.tl-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tl-fbtn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tl__body { flex: 1; min-width: 0; }
.tl__toggle { display: flex; align-items: flex-start; gap: 6px; width: 100%; text-align: left; background: none; border: none; padding: 0; font: inherit; cursor: pointer; color: inherit; }
.tl__toggle:hover .tl__summary { color: var(--primary-ink); }
.tl__chev { margin-left: auto; color: var(--muted); transition: transform .15s; flex-shrink: 0; }
.tl__toggle.open .tl__chev { transform: rotate(180deg); }
.tl__detail { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; margin: 6px 0 2px; font-size: 12.5px; color: var(--ink-2); white-space: pre-wrap; }
.tl__item[hidden] { display: none; }
/* Sales Hub data-parity §D.4 — per-type card fields (call disposition/duration/recording,
   email opens/clicks/replies, meeting start/outcome/join-link, task status/due) + owner. */
.tl-flds { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.tl-fld { font-size: 11px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; line-height: 1.6; }
.tl-fld--link { color: var(--primary-ink); text-decoration: none; }
.tl-fld--link:hover { border-color: var(--primary); }
.tl-fld--owner { color: var(--ink); font-weight: 600; }
/* the date-range + owner selects sit at the right of the type-chip row */
.tl-filter__sel { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.tl-filter .tl-date, .tl-filter .tl-owner { font-size: 12.5px; padding: 5px 9px; }

/* ---------- signals ---------- */
.signal-list { list-style: none; margin: 0; padding: 0; }
.signal-mini { padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.signal-mini:last-child { border-bottom: none; }
.suggest { margin-top: 5px; font-size: 12.5px; color: #2563a6; background: #f0f7ff; border-radius: 7px; padding: 6px 9px; }
.signal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.signal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.signal-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.signal-card__title { font-weight: 650; margin-bottom: 4px; }
.signal-card__meta { margin: 8px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 200px; }
.kanban-col__head { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; font-weight: 650; font-size: 13px; border-bottom: 3px solid var(--s, #cbd5e1); }
.kanban-col__head b { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 0 8px; font-size: 12px; }
.kanban-col__hint { padding: 7px 13px; font-size: 10.5px; color: var(--muted); border-bottom: 1px solid var(--border); }
.kanban-col__body { padding: 10px; display: flex; flex-direction: column; gap: 9px; }
.kanban-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 10px; box-shadow: var(--shadow-sm); }
.kanban-card:hover { text-decoration: none; border-color: var(--primary); }
.kanban-card__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kanban-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.mini-score { font-size: 10.5px; color: var(--ink-2); background: #eef2f8; padding: 2px 7px; border-radius: 6px; }
.kanban-card__top a.cell-strong { color: inherit; }
.kanban-card__top a.cell-strong:hover { color: var(--primary); }
.kanban-card__stage { margin-top: 9px; }
.kanban-card__stage .kanban-stage { width: 100%; font-size: 12px; padding: 4px 6px; }
.kanban-card__stage .kanban-stage:disabled { opacity: 0.6; cursor: progress; }
.kanban-empty { color: var(--muted); text-align: center; padding: 16px 0; font-size: 13px; }

/* ---------- deals board (reuses .kanban; adds the deal-card amount + stage select) ---------- */
.deal-amt { font-weight: 700; font-size: 13px; margin-top: 4px; color: var(--ink); }
.kanban-card__stage .deal-stage { width: 100%; font-size: 12px; padding: 4px 6px; }
.kanban-card__stage .deal-stage:disabled { opacity: 0.6; cursor: progress; }
/* board/table segmented toggle (Board | Table) */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; vertical-align: middle; }
.seg__btn { background: var(--surface); border: none; padding: 5px 12px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.seg__btn + .seg__btn { border-left: 1px solid var(--border); }
.seg__btn.active { background: var(--primary); color: #fff; }

/* ---------- sequences ---------- */
.seq-list { display: flex; flex-direction: column; gap: 14px; }
.seq-card { margin: 0; }
.seq-stats { display: flex; gap: 18px; margin: 10px 0 12px; flex-wrap: wrap; }
.seq-stats b { font-size: 16px; color: var(--ink); }
.seq-stats span { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; }
.seq-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.seq-step { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.seq-step:last-child { border-bottom: none; }
.seq-day { font-weight: 700; color: var(--ink); width: 54px; flex-shrink: 0; }
.seq-ch { width: 96px; flex-shrink: 0; display: flex; align-items: center; gap: 4px; }
.seq-subj { flex: 1; }
.seq-stats--big { gap: 24px; margin-bottom: 16px; }

/* ---------- Wave 3: cadence builder + templates/snippets ---------- */
.fld--sm { display: inline-block; margin-right: 12px; margin-bottom: 8px; font-size: 12px; }
.fld--sm input, .fld--sm select { min-width: 120px; }
.stp-row { margin: 0 0 10px; padding: 10px 12px; }
.stp-row__head { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.stp-row__head .seq-day { align-self: center; }
.stp-row__btns { margin-left: auto; display: flex; gap: 4px; }
.stp-row__detail { margin-top: 6px; }
.tok-palette { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0; }
.tok-chip { cursor: pointer; border: 1px solid #d8e6ff; background: #f0f7ff; color: var(--primary-ink); font-size: 11px; padding: 2px 8px; border-radius: 7px; }
.tok-chip:hover { background: #e0eeff; }
.tpl-preview { margin-top: 12px; padding: 12px; border: 1px dashed var(--border-2); border-radius: 8px; background: var(--bg); }
.tpl-preview__subj { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.tpl-preview__body { white-space: pre-wrap; font-size: 13px; color: var(--ink-2); }
.tpl-cat { margin-bottom: 16px; }
.tpl-row, .snip-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; padding: 10px 14px; }
.tpl-row__main, .snip-row__main { min-width: 0; flex: 1; }
.tpl-row__meta, .snip-row__meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.snip-row__main .note-body { margin-top: 4px; }

/* ---------- next-best-action ---------- */
.task-title { font-weight: 550; }
/* WI-008 — per-row task Actions cell + a visually-hidden (but accessible) label
 * wrapper for the snooze/reassign selects (the select also carries an aria-label). */
.task-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.task-actions .select { font-size: 12px; padding: 4px 6px; }
.task-actions select:disabled, .task-actions button:disabled { opacity: 0.6; cursor: progress; }
.vis-label { display: inline-flex; }
.vis-label > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nba-toggle { background: none; border: none; color: var(--primary-ink); font-size: 11.5px; cursor: pointer; padding: 2px 0; font-weight: 600; }
.nba-toggle.open { opacity: .7; }
.nba { margin-top: 5px; font-size: 12.5px; color: #2563a6; background: #f0f7ff; border: 1px solid #dcebff; border-radius: 7px; padding: 7px 9px; max-width: 460px; }

/* priorities / impact */
.prio { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; }
.prio.p-high { background: var(--bad); }
.prio.p-med { background: var(--warn); }
.prio.p-low { background: #94a3b8; }
.impact { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; letter-spacing: .3px; }
.impact.p-high { background: #fde8e8; color: var(--bad); }
.impact.p-med { background: #fef0d9; color: var(--warn); }
.impact.p-low { background: #eef2f8; color: var(--muted); }
.due-soon { color: var(--bad); font-weight: 600; }
.eng { white-space: nowrap; }

/* ---------- key-value lists ---------- */
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 7px 12px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }
.select { padding: 4px 8px; border: 1px solid var(--border-2); border-radius: 7px; font: inherit; font-size: 13px; background: #fff; max-width: 220px; }
.hint { font-size: 11.5px; }

/* engagement grid */
.eng-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eng-grid > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 11px; text-align: center; }
.eng-grid b { display: block; font-size: 18px; color: var(--ink); }
.eng-grid span { font-size: 11.5px; color: var(--muted); }

/* ---------- requirements ---------- */
.banner { background: #f0f7ff; border: 1px solid #d8e6ff; border-radius: 9px; padding: 11px 14px; font-size: 13px; color: #2c4a73; margin-bottom: 18px; }
.banner--warn { background: #fff7ed; border-color: #fde2c0; color: #9a5b1a; }
.banner--scope { background: #f1f8f4; border-color: #cde9d6; color: #2c6440; }
.bullets { margin: 0; padding-left: 18px; font-size: 13.5px; }
.bullets li { margin-bottom: 6px; }
.source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.source-card { display: flex; gap: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 13px; }
.source-card__n { width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.source-card__status { margin-top: 7px; }
.risk-list { list-style: none; margin: 0; padding: 0; }
.risk-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.risk-list li:last-child { border-bottom: none; }

/* ---------- filter bar / buttons ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip-btn { background: var(--surface); border: 1px solid var(--border-2); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: 20px; cursor: pointer; transition: all .12s; }
.chip-btn:hover { border-color: var(--primary); color: var(--primary-ink); }
.chip-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-sm { margin-top: 9px; background: #fff; border: 1px solid var(--border-2); color: var(--primary-ink); font: inherit; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.btn-sm:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- states ---------- */
.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13.5px; background: var(--surface-2); border-radius: var(--radius-sm); }
.empty__action { margin-top: 12px; }
.empty--error { background: #fef2f2; color: var(--bad); }
.loading { padding: 40px; text-align: center; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border-2); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(12px); background: #0f1b33; color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.25); opacity: 0; transition: all .25s; z-index: 100; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .source-grid, .signal-grid { grid-template-columns: 1fr; }
}
/* Tablet rail: collapse the sidebar to an icon-only strip (labels hidden but each
 * nav item keeps its title/aria-label so it stays discoverable + accessible). */
@media (max-width: 860px) and (min-width: 721px) {
  :root { --sidebar: 64px; }
  .brand__sub, .nav__label, .nav-group__label, .sidebar__foot { display: none; }
  .brand { justify-content: center; padding: 18px 0; }
  .nav__item { justify-content: center; }
}
/* Mobile: the sidebar becomes an off-canvas drawer driven by the topbar hamburger
 * (body.nav-open). The topbar right-cluster collapses gracefully + content padding
 * tightens. Full labels return inside the drawer (it is full-width, not a rail). */
@media (max-width: 720px) {
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 260px; z-index: 30;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 2px 0 24px rgba(15,27,51,.28);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-scrim { display: block; }
  .nav-toggle { display: grid; place-items: center; }
  .content { padding: 18px 16px 56px; }
  .topbar { padding: 0 14px; }
  .topbar__right { gap: 12px; }
  .topbar__date { display: none; }        /* date is non-essential on a phone */
  .grid-2 { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .kv { grid-template-columns: 100px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

/* ---------- focus-visible (a11y) ---------- *
 * Keyboard focus rings, kept off mouse/touch via :focus-visible. The dark sidebar
 * needs a light, high-contrast ring; light surfaces use the brand colour. */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.sidebar a:focus-visible, .nav-toggle:focus-visible, .login__btn--sso:focus-visible { outline-color: #9ec0ff; }
.login__input:focus-visible, .login__btn:focus-visible { outline-offset: 3px; }
/* the nav active item already has a filled background — keep its ring readable */
.nav__item.active:focus-visible { outline-color: #fff; }

/* ======================= v0.2 additions ======================= */
/* nav groups */
.nav-group { margin-bottom: 10px; }
.nav-group__label { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: #6b7c98; padding: 6px 14px 4px; }
.kpi.warn .kpi__value { color: var(--warn); }

/* tabs */
.tabs__nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab-btn { background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 14px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--primary-ink); border-bottom-color: var(--primary); }
.tab-btn em { font-style: normal; background: #eef2f8; border-radius: 10px; padding: 0 6px; font-size: 11px; margin-left: 3px; }
.sub { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 16px 0 8px; }
.tab-actions { display: flex; gap: 8px; align-items: center; margin: 12px 0; }

/* modal */
.modal-ov { position: fixed; inset: 0; background: rgba(15,27,51,.45); display: grid; place-items: center; z-index: 200; padding: 20px; }
.modal { background: #fff; border-radius: 12px; width: 520px; max-width: 100%; max-height: 86vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal__head h3 { font-size: 15px; }
.modal__x { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal__body { padding: 18px; }
.modal__foot { padding: 12px 18px; border-top: 1px solid var(--border); text-align: right; }
.fld { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fld input, .fld select, .fld textarea { display: block; width: 100%; margin-top: 4px; padding: 7px 9px; border: 1px solid var(--border-2); border-radius: 8px; font: inherit; font-weight: 400; }

/* buttons */
.btn-pri { background: var(--primary); color: #fff; border: none; font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: 8px; cursor: pointer; }
.btn-pri:hover { background: var(--primary-ink); }

/* grid toolbar / filters / bulk / pager */
.grid-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.grid-toolbar .select { max-width: 200px; }
.g-search { flex: 0 1 240px; padding: 6px 11px; border: 1px solid var(--border-2); border-radius: 20px; font: inherit; font-size: 13px; }
.g-spacer { flex: 1; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fchip { background: #f0f7ff; border: 1px solid #d8e6ff; color: var(--primary-ink); border-radius: 7px; padding: 2px 6px 2px 9px; font-size: 12px; }
.fchip button { background: none; border: none; color: inherit; cursor: pointer; font-size: 13px; }
.bulkbar { display: flex; gap: 8px; align-items: center; background: #0f1b33; color: #fff; padding: 8px 12px; border-radius: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.bulkbar .select, .bulkbar input { padding: 5px 8px; border-radius: 7px; border: 1px solid #33415e; background: #1c2942; color: #fff; font: inherit; font-size: 13px; }
.bulkbar .muted { color: #8092ad; margin-left: auto; }
.grid-table th.g-sort { cursor: pointer; user-select: none; }
.grid-table th.g-sort:hover { color: var(--ink); }
.col-check { width: 30px; text-align: center; }
.grid-table tbody tr { cursor: pointer; }
.grid-table tbody tr:hover { background: var(--surface-2); }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.pager__ctrl { display: flex; align-items: center; gap: 8px; }
.chip-btn[disabled] { opacity: .45; cursor: default; }
.colchooser { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.cc-row { font-size: 13px; }
.fb-row { display: flex; gap: 8px; align-items: center; }
.fb-row select, .fb-row input { padding: 6px 9px; border: 1px solid var(--border-2); border-radius: 8px; font: inherit; }

/* detail: score head, calls, ai, transcript, drafts */
.score-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.callcard { margin-bottom: 14px; }
.rec { margin-bottom: 8px; font-size: 13.5px; }
.transcript { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-size: 12.5px; color: var(--ink-2); margin: 8px 0; white-space: pre-wrap; }
.ai-box { background: #f3effe; border: 1px solid #e2d8fb; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.ai-box .suggest { margin-top: 6px; }
.draft { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 11px; font-size: 12.5px; white-space: pre-wrap; font-family: inherit; color: var(--ink); margin: 8px 0; }
/* WI-022 (A1/A2) — email conversations, notes + meetings cards */
.emailcard, .notecard, .meetcard { margin-bottom: 14px; }
.em-msg { border-bottom: 1px solid var(--border); padding: 9px 0; }
.em-msg:last-child { border-bottom: none; }
.em-msg--incoming { border-left: 3px solid var(--primary); padding-left: 9px; }
.em-msg--outgoing { border-left: 3px solid var(--border-2); padding-left: 9px; }
.em-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; width: 100%; text-align: left; background: none; border: none; padding: 0; font: inherit; cursor: pointer; color: inherit; }
.em-toggle:hover .cell-strong { color: var(--primary-ink); }
.em-chev { margin-left: auto; color: var(--muted); transition: transform .15s; }
.em-toggle.open .em-chev { transform: rotate(180deg); }
.em-body { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-top: 7px; font-size: 13px; color: var(--ink); white-space: pre-wrap; }
.note-body { white-space: pre-wrap; font-size: 13px; color: var(--ink); }
.meet-agenda { margin-top: 10px; font-size: 12.5px; }
.meet-agenda b { display: block; margin-bottom: 4px; color: var(--ink-2); }
.approval__act { display: flex; gap: 8px; margin-top: 6px; }
.prompt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prompt-edit { width: 100%; border: 1px solid var(--border-2); border-radius: 8px; padding: 8px; font: inherit; font-size: 12.5px; }
.matrix th, .matrix td { text-align: left; }
.matrix td.col-mid, .matrix th.col-mid { text-align: center; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.mini-list li:last-child { border-bottom: none; }
.handoff { font-size: 10.5px; color: #6d28d9; background: #f3effe; padding: 1px 6px; border-radius: 6px; }
@media (max-width: 1080px) { .prompt-grid, .colchooser { grid-template-columns: 1fr; } }

/* ======================= login screen (two-panel auth) ======================= */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }

/* LEFT — brand / value panel (deep gradient, on-brand) */
.login__brand-panel {
  position: relative; color: #e8eefb; padding: 56px 56px 40px;
  display: flex; flex-direction: column;
  background: radial-gradient(120% 120% at 0% 0%, #1c2e57 0%, #0f1b33 55%, #0a1326 100%);
  overflow: hidden;
}
.login__brand-panel::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(47,109,246,.32), transparent 68%); pointer-events: none;
}
.login__brand { display: flex; align-items: center; gap: 12px; }
.login__logo { width: 40px; height: 40px; display: block; }
.login__wordmark { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .2px; }
.login__headline { margin: auto 0 0; font-size: 34px; line-height: 1.18; font-weight: 750; color: #fff; letter-spacing: -.6px; max-width: 12ch; }
.login__points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 38ch; }
.login__points li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #c2cfe8; line-height: 1.45; }
.login__tick { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: rgba(47,109,246,.22); color: #9ec0ff; display: grid; place-items: center; font-size: 11px; font-weight: 800; margin-top: 1px; }
.login__brand-foot { margin-top: 28px; font-size: 12px; color: #6f80a6; }

/* RIGHT — auth card column */
.login__main { display: grid; place-items: center; padding: 32px 24px; }
.login__card { width: 380px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 30px; }
.login__card--loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 220px; color: var(--muted); }
.login__loading-text { font-size: 13px; }
.login__title { font-size: 22px; letter-spacing: -.3px; }
.login__lead { color: var(--muted); font-size: 13.5px; margin: 6px 0 20px; }
.login__form { display: block; }
.login__label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 0 0 5px; }
.login__input { display: block; width: 100%; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); font: inherit; background: #fff; }
.login__input:focus { border-color: var(--primary); }
.login__btn { width: 100%; background: var(--primary); color: #fff; border: none; font: inherit; font-size: 14px; font-weight: 650; padding: 11px 14px; border-radius: var(--radius-sm); cursor: pointer; transition: background .12s; }
.login__btn:hover { background: var(--primary-ink); }
.login__btn.is-busy, .login__btn[disabled] { opacity: .72; cursor: progress; }
.login__btn--sso { background: #0f1b33; margin-bottom: 4px; }
.login__btn--sso:hover { background: #1c2942; }
.login__sep { text-align: center; margin: 16px 0; position: relative; }
.login__sep::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.login__sep span { position: relative; background: var(--surface); padding: 0 10px; color: var(--muted); font-size: 12px; }
.login__error { background: #fdecea; border: 1px solid #f5c2bd; color: var(--bad); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; margin-bottom: 16px; }

/* stacked layout on a narrow viewport: condensed brand on top, card centered */
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login__brand-panel { padding: 28px 24px; }
  .login__headline { font-size: 24px; margin-top: 18px; }
  .login__points { display: none; }     /* keep the brand band compact above the card */
  .login__brand-foot { display: none; }
  .login__main { padding: 28px 20px 40px; }
}
@media (max-width: 480px) {
  .login__card { padding: 26px 22px; border-radius: 0; border-left: none; border-right: none; }
}

/* =============================================================================
 * WAVE 2 — Reporting, Dashboards & Forecasting. Charts (assets/js/chart.js render
 * inline SVG into .report-chart wrappers) + the report builder + forecast layouts.
 * ========================================================================== */
/* chart canvas — the SVG scales to its wrapper while keeping its viewBox aspect. */
.report-chart { width: 100%; max-width: 520px; margin: 0 auto 12px; }
.chart { width: 100%; height: auto; display: block; }
.chart__bar text, .chart__hbar text, .chart__axis, .chart__val, .chart__legend, .chart__funnel-label, .chart__funnel-val, .chart__drop, .chart__empty { font-family: var(--font); }
.chart__axis { font-size: 9px; fill: var(--muted); }
.chart__val { font-size: 9px; fill: var(--ink-2); font-weight: 600; }
.chart__legend { font-size: 10px; fill: var(--ink-2); }
.chart__baseline { stroke: var(--border-2); stroke-width: 1; }
.chart__line { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart__area { fill: var(--chart-1); opacity: .1; }
.chart__dot { fill: #fff; stroke: var(--chart-1); stroke-width: 1.6; }
.chart__slice { stroke: #fff; stroke-width: 1; }
.chart__donut-hole { fill: var(--surface); }
.chart__funnel-label { font-size: 11px; fill: #fff; font-weight: 650; }
.chart__funnel-val { font-size: 10px; fill: #fff; opacity: .92; }
.chart__drop { font-size: 10px; fill: var(--bad); font-weight: 600; }
.chart__empty { font-size: 11px; fill: var(--muted); }
.chart--empty { min-height: 60px; }

/* report builder layout — saved-report rail (left) + builder panel (right). */
.report-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.report-main { margin-bottom: 0; }
.report-builder { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.report-builder .vis-label { flex-direction: column; align-items: flex-start; }
.report-builder .vis-label > span { position: static; width: auto; height: auto; clip: auto; margin: 0 0 3px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.report-builder .select { min-width: 130px; }
.report-result { min-height: 120px; }
.report-result__title { margin: 0 0 4px; }
.report-total { margin: 8px 0; font-size: 13px; color: var(--ink-2); }
.report-total b { color: var(--ink); }
.report-lib { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.report-lib__item { display: flex; align-items: stretch; gap: 4px; }
.report-lib__btn { flex: 1; text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; }
.report-lib__btn:hover { border-color: var(--primary); background: #fff; }
.report-lib__name { font-weight: 600; font-size: 13px; color: var(--ink); }
.report-lib__tag { font-style: normal; font-size: 10px; color: var(--muted); background: #eef2f8; border-radius: 5px; padding: 1px 5px; margin-left: 4px; }
.report-lib__desc { font-size: 11.5px; color: var(--muted); }
.report-lib__del { width: 30px; border: 1px solid var(--border); background: #fff; border-radius: 9px; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.report-lib__del:hover { color: var(--bad); border-color: var(--bad); }
.fld-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }

/* forecast — attainment % chips. */
.att-pct { font-weight: 650; }
.att-pct--good { color: var(--good); }
.att-pct--mid { color: var(--warn); }
.att-pct--low { color: var(--bad); }

@media (max-width: 860px) {
  .report-layout { grid-template-columns: 1fr; }
  .report-chart { max-width: 100%; }
}

/* ---- Wave 5 — Quote-to-Close (CPQ): quote builder line editor + totals ---- */
.qb-line { display: grid; grid-template-columns: 1.4fr 1.6fr 0.7fr 0.9fr 0.7fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.qb-line input, .qb-line select { padding: 6px 8px; border: 1px solid var(--line, #d8dee9); border-radius: 6px; font: inherit; min-width: 0; }
.qb-line .qb-lt { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.qb-totals { margin-top: 14px; border-top: 1px solid var(--line, #eef1f6); padding-top: 10px; }
.qb-tot-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.qb-tot-row.qb-grand { border-top: 2px solid var(--ink, #1b2436); margin-top: 6px; padding-top: 8px; font-size: 16px; }
.qb-tot-row b { font-variant-numeric: tabular-nums; }
.chk { display: block; margin: 10px 0; font-size: 14px; }
@media (max-width: 860px) {
  .qb-line { grid-template-columns: 1fr 1fr; }
}

/* ===== Wave 6A — Conversation Intelligence + Playbooks ===== */
.conv-summary { white-space: pre-wrap; font-size: 13px; color: var(--ink); margin: 6px 0; }
.conv-who { font-size: 12.5px; margin-bottom: 4px; }
.conv-topics { margin: 6px 0; }
.conv-meta { font-size: 12px; margin: 4px 0; }
.conv-action-block { margin-top: 8px; }
.conv-action-block .sub { display: block; font-size: 12px; color: var(--muted, #64748b); margin-bottom: 4px; }
.conv-actions { list-style: none; margin: 4px 0 0; padding: 0; }
.conv-actions li { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 0; }
.conv-actions .ai-action-text { flex: 1 1 auto; }
.convcard .card__body { padding-top: 8px; }
/* Playbooks — content body preserves authored line breaks (escaped text, never innerHTML). */
.pb-content { white-space: pre-wrap; font-size: 13px; color: var(--ink); line-height: 1.5; background: #f8fafc; border: 1px solid var(--line, #eef1f6); border-radius: 8px; padding: 12px 14px; margin-top: 8px; }
.pb-body { margin-top: 8px; }
.play-item { padding: 8px 0; border-bottom: 1px solid var(--line, #eef1f6); }
.play-item:last-child { border-bottom: 0; }
.play-item__head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; }
.play-body { margin-top: 6px; }

/* ---- Wave 6B — no-code platform: Scheduling + Properties ---- */
/* a checkbox-style field (custom checkbox / required toggle) */
.fld-chk { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fld-chk input { width: auto; margin: 0; }
.fld__label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* Scheduling screen */
.sccard .card__title .ic { vertical-align: -2px; }
.sc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.sc-url { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sc-urlbox { min-width: 280px; max-width: 420px; }
.sc-bookings { margin-top: 8px; }
.sc-bk-list { list-style: none; padding: 0; margin: 6px 0 0; }
.sc-bk-list li { padding: 4px 0; border-bottom: 1px solid var(--line, #eef1f6); font-size: 13px; }
.sc-days { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.sc-day { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.sc-day__chk { min-width: 70px; display: inline-flex; align-items: center; gap: 6px; }
.sc-day__from, .sc-day__to { width: auto; min-width: 110px; }
.sc-rrs { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 4px; }
.sc-rr { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }

/* Properties screen */
.row-inactive { opacity: 0.6; }
.row-inactive code { text-decoration: line-through; }
