/* talQen CRM — layered on deck.css tokens (navy / teal / petrol, Geist). */
.crm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 6px 0 16px; }
.crm-tiles .stat .num { font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--navy-100); color: var(--navy-700); white-space: nowrap; }
.pill-direct { background: #DDEFF8; color: #1B587A; }
.pill-group { background: #EFE0F7; color: #6B2F91; }
.pill-partner { background: #FBEBD3; color: #8A5300; }
.pill-class { background: var(--navy-800); color: #fff; }
.pill-flag { background: #FADBD5; color: #A63325; }
.pill-ok { background: #D6F0E2; color: #196C3D; }
.pill-muted { background: #E9EDF1; color: #536477; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Score with its breakdown on hover / focus / tap */
.score { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.score summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 26px; padding: 0 7px; border-radius: 7px; background: var(--teal-100); color: var(--teal-600); font-weight: 700; font-variant-numeric: tabular-nums; }
.score summary::-webkit-details-marker { display: none; }
.score[open] summary, .score summary:hover { background: var(--teal-600); color: #fff; }
.score .breakdown { position: absolute; z-index: 20; top: 30px; left: 0; min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-2); padding: 10px 12px; font-size: 12.5px; }
.score .breakdown table { width: 100%; border-collapse: collapse; }
.score .breakdown td { padding: 2px 0; }
.score .breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.score .breakdown tr.total td { border-top: 1px solid var(--line); padding-top: 4px; }

/* Board */
.crm-board .board-col { width: 268px; }
.crm-board .board-col.drop-ok { outline: 2px dashed var(--teal-500); outline-offset: 2px; background: var(--teal-100); }
.crm-board .board-col h4 .val { font-weight: 600; color: var(--navy-700); text-transform: none; letter-spacing: 0; }
.deal-card { position: relative; cursor: grab; }
.deal-card[aria-grabbed="true"] { opacity: .5; }
.deal-card .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.deal-card .who { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--navy-800); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.deal-card .step { margin-top: 6px; font-size: 12px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 6px; }
.deal-card.flagged .step { color: #A63325; border-left-color: #C0392B; }
.deal-card .move { position: absolute; top: 6px; right: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 6px; font-size: 11px; padding: 2px 6px; cursor: pointer; color: var(--navy-700); }
.deal-card .move:hover { border-color: var(--teal-500); }
.board-more { display: block; font-size: 12px; padding: 4px 6px; }

/* Dialog */
dialog.crm-dialog { border: none; border-radius: 14px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(7,22,42,.35); color: var(--ink); }
dialog.crm-dialog::backdrop { background: rgba(7,22,42,.45); }
dialog.crm-dialog form { padding: 18px 20px; }
dialog.crm-dialog h2 { margin: 0 0 4px; font-size: 18px; }
.dlg-errors { color: #A63325; font-size: 13px; margin: 6px 0; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.chip-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--navy-700); min-height: 36px; }
.chip-btn:hover, .chip-btn[aria-pressed="true"] { border-color: var(--teal-600); background: var(--teal-100); color: var(--teal-600); }

/* Tappable checkbox chips (pains, objections, contacts) */
.tap-chips ul { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 4px 0; list-style: none; }
.tap-chips li { list-style: none; }
.tap-chips label { display: inline-flex !important; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 500 !important; font-size: 13px !important; color: var(--navy-700); cursor: pointer; min-height: 36px; background: var(--card); }
.tap-chips input { width: 16px; height: 16px; accent-color: var(--teal-600); margin: 0; }
.tap-chips label:has(input:checked) { border-color: var(--teal-600); background: var(--teal-100); color: var(--teal-600); }

/* Account page */
.acct-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.acct-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.section-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding: 6px 0; }
.section-nav a { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--navy-700); }
.section-nav a:hover { text-decoration: none; border-color: var(--teal-500); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: none; }
.timeline .when { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .kind { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--teal-600); }
.contact-row { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.contact-row:first-child { border-top: none; }
.contact-row .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.optout { color: #A63325; font-weight: 600; font-size: 12px; }
.next-box { border-left: 4px solid var(--teal-600); background: var(--card); box-shadow: var(--shadow-1); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.next-box.flagged { border-left-color: #C0392B; }
.next-box .what { font-weight: 600; font-size: 15px; }

/* My Day */
.day-list { list-style: none; margin: 0; padding: 0; }
.day-list li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.day-list li:first-child { border-top: none; }
.day-list .due { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.day-list .due.late { color: #A63325; font-weight: 700; }
.alert-strip { background: #FDF2D0; color: #7A5B00; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-weight: 500; }

/* Maps */
.crm-map { height: 520px; border-radius: 12px; border: 1px solid var(--line); background: var(--navy-100); }
@media (max-width: 640px) { .crm-map { height: 70vh; } }
.map-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 6px 0; }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }

/* Field tab bar for sales roles (phones) */
.mobile-bar.tabbar a[aria-current="page"] { color: var(--teal-500); }

.crm-filters select, .crm-filters input[type=search] { min-width: 120px; }
.pager { display: flex; gap: 8px; align-items: center; margin: 10px 0; font-size: 13px; }
@media (max-width: 640px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .crm-board .board-col { width: 82vw; }
}
.crm-filters input[type=search] { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; background: var(--card); color: var(--ink); }
.crm-filters .check { margin: 0; white-space: nowrap; }
.crm-filters .check input { width: 18px; height: 18px; }
fieldset.tap-chips { border: none; padding: 0; margin: 0 0 10px; min-width: 0; }
fieldset.tap-chips legend { font-weight: 600; font-size: 12.5px; color: var(--navy-700); margin-bottom: 3px; padding: 0; }

/* ---- Command Dashboard (chart roles validated: plan #2a78d6, actual #00A08A, survival = status critical) ---- */
.viz-root, .panel { --series-plan: #2a78d6; --series-actual: #00A08A; --status-critical: #C0392B; --grid: #E3E9EF; --axis: #9AA8B6; }
.dash-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.cp-banner { display: block; background: #E6F6F2; color: var(--ink); border-left: 5px solid var(--series-actual, #00A08A); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: 15px; }
.cp-banner:hover { text-decoration: none; box-shadow: var(--shadow-1); }
.cp-banner.critical { background: #FDE4E1; border-left-color: #C0392B; }
.cp-action { display: inline-block; margin-left: 8px; font-weight: 700; color: #A63325; }
.cp-row { display: block; color: inherit; padding: 10px 0; border-top: 1px solid var(--line); }
.cp-row:first-of-type { border-top: 0; }
.cp-row:hover { text-decoration: none; }
.cp-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.cp-num { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.cp-track { position: relative; height: 14px; background: var(--grid); border-radius: 4px; margin-top: 18px; }
.cp-fill { height: 100%; background: var(--series-actual); border-radius: 4px 4px 4px 4px; min-width: 2px; }
.cp-survival { position: absolute; top: -18px; bottom: -3px; width: 2px; background: var(--status-critical); }
.cp-survival span { position: absolute; top: -2px; left: 4px; white-space: nowrap; font-size: 11px; font-weight: 700; color: #A63325; }
.cp-warn { margin-top: 6px; font-weight: 700; color: #A63325; font-size: 13px; }
.legend { font-size: 12px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .sw.plan { background: var(--series-plan); }
.legend .sw.actual { background: var(--series-actual); margin-left: 8px; }
figure.viz { margin: 0; }
.viz-svg { width: 100%; height: auto; display: block; font-family: inherit; }
.viz-svg .grid { stroke: var(--grid); stroke-width: 1; }
.viz-svg .axis { stroke: var(--axis); stroke-width: 1; }
.viz-svg .tick { font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.viz-svg .tick.now { fill: var(--ink); font-weight: 700; }
.viz-svg .val { font-size: 12px; font-weight: 700; fill: var(--ink); }
.viz-svg .bar.plan { fill: var(--series-plan); }
.viz-svg .bar.actual { fill: var(--series-actual); }
.viz-svg .hit { fill: transparent; cursor: pointer; }
.viz-svg .hit:hover, .viz-svg .hit:focus { fill: rgba(11,31,58,.05); outline: none; }
.viz-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--navy-800); color: #fff; font-size: 12.5px; padding: 6px 9px; border-radius: 7px; box-shadow: var(--shadow-2); }
ol.funnel { list-style: none; padding: 0; margin: 0; }
ol.funnel li a { display: grid; grid-template-columns: 110px 1fr 36px minmax(120px, auto); gap: 10px; align-items: center; padding: 7px 0; color: inherit; border-top: 1px solid var(--line); }
ol.funnel li:first-child a { border-top: 0; }
ol.funnel li a:hover { text-decoration: none; background: var(--bg); }
.f-track { height: 14px; background: var(--grid); border-radius: 4px; overflow: hidden; }
.f-bar { display: block; height: 100%; background: var(--series-actual); border-radius: 0 4px 4px 0; min-width: 2px; }
.f-count { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.f-conv { font-size: 13px; font-variant-numeric: tabular-nums; }
ul.voice { list-style: none; padding: 0; margin: 0; }
ul.voice li a { display: grid; grid-template-columns: minmax(120px, 1fr) 1.2fr 30px; gap: 10px; align-items: center; padding: 6px 0; color: inherit; }
ul.voice li a:hover { text-decoration: none; background: var(--bg); }
.v-bar { height: 10px; background: var(--series-plan); border-radius: 0 4px 4px 0; min-width: 2px; }
.v-bar.obj { background: #8A5300; }
ul.voice b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  ol.funnel li a { grid-template-columns: 90px 1fr 30px; }
  ol.funnel .f-conv { grid-column: 1 / -1; }
}

/* ---- Register seeding: imports, review queue, profile facts, scoring, data quality ---- */
.seed-note { background: var(--teal-100); color: var(--teal-600); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.seed-rejected { border-left: 4px solid var(--red); }
.seed-scroll { max-height: 420px; overflow-y: auto; }
.settings-links { margin: 6px 0 14px; flex-wrap: wrap; }
.pill-complete { background: var(--teal-100); color: var(--teal-600); text-decoration: none; }
.pill-stale { background: #fdf2d0; color: #7a5b00; }
.review-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
.review-item { display: grid; gap: 8px; }
.review-head { display: flex; gap: 10px; align-items: flex-start; }
.review-head input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal-600); flex: none; }
.review-evidence { border-left: 3px solid var(--line); padding-left: 10px; min-width: 0; }
.review-evidence input, .review-evidence select { max-width: 100%; }
.review-members { columns: 2 220px; margin: 4px 0; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.review-actions input { flex: 1 1 200px; min-width: 0; }
.fact-section { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.fact-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.fact-head h3 { margin: 0; font-size: 14px; }
.fact-head .acts { margin-left: auto; display: flex; gap: 6px; }
.fact-kv dd { overflow-wrap: anywhere; }
.fact-src { display: block; font-size: 11.5px; color: var(--muted); }
.checklist { list-style: none; padding: 0; columns: 2 200px; }
.checklist li.done { color: var(--teal-600); }
.ask-about { background: var(--navy-100); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.accr-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; border-top: 1px solid var(--line); padding: 8px 0; }
.accr-row:first-of-type { border-top: 0; }
.accr-flags { color: #7a5b00; }
.more-filters { flex-basis: 100%; }
.more-filters summary { list-style: none; display: inline-block; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 8px; }
.more-grid label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.complete-bar { display: inline-block; width: 44px; height: 6px; border-radius: 3px; vertical-align: middle;
  background: linear-gradient(90deg, var(--teal-500) var(--pc), var(--line) var(--pc)); }
.scoring-grid { align-items: start; }
.weights td { padding: 6px 8px; }
.weights tr.changed td { background: var(--teal-100); }
.w-input { width: 100px; text-align: right; font-variant-numeric: tabular-nums; }
.sticky-actions { position: sticky; bottom: env(safe-area-inset-bottom, 0px); background: var(--bg); padding: 8px 0; }
.top20 { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.top20 li { display: flex; gap: 10px; align-items: flex-start; }
.top20 .score-num { flex: none; min-width: 34px; text-align: center; border-radius: 7px; background: var(--teal-100); color: var(--teal-600); font-weight: 700; padding: 3px 6px; font-variant-numeric: tabular-nums; }
.top20 .up { color: var(--teal-600); font-weight: 600; }
.top20 .down { color: var(--red); font-weight: 600; }
@media (max-width: 640px) {
  .accr-row { flex-direction: column; }
  .fact-head .acts { margin-left: 0; }
  .w-input { width: 84px; }
}

/* The sidebar holds more links now: let the menu scroll inside the panel. */
.sidebar { overflow: hidden; }
.sidebar nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.sidebar .sidebar-foot { flex: none; }

/* Phase 5: pilot criteria, rollout progress */
.crit-list { list-style: none; padding: 0; margin: 0; }
.crit-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line, #e6ecf2); }
.crit-list li form.inline { margin-left: auto; display: flex; gap: 6px; }
.page-head + .progress { height: 12px; margin: 0 0 18px; }
input[type=month] { font: inherit; padding: 9px 11px; border: 1px solid var(--line, #d5dde6); border-radius: 9px; background: #fff; min-height: 44px; }
