/* Vested CRM workspace — Phase 2a (read-only lead viewer)
   Brand + layout lifted verbatim from docs/lead_page_unified_v4.html (the design
   contract). Strict palette: teal / navy / mid-grey / warm-grey, white surfaces. */

/* SCOPED (2026-10-17, CRM_IN_PLATFORM_SCOPE.md step 2): every rule sits under
   :where(.crm-app), so the CRM can load into the Platform page without
   restyling it. .crm-app is the CRM's container in the Platform (#page-crm's
   .crm-hosted) and its pop-up layer (.crm-layer on body). :where() adds NO
   specificity, so each rule weighs exactly what it did unscoped.
   test/crmCssScope.test.js fails on an unscoped selector.
   The palette was hard-coded on :root. It now reads the Platform's brand
   variables, so a white-labelled firm keeps its colours when hosted; the
   fallbacks are the old values (the Platform's --brand-accent and --brand-ink for
   Vested are these same two colours).
   The standalone shell's rules (its page grid, sidebar, wordmark, hamburger and
   drawer) went with crm/index.html in step 6 (2026-10-18): the Platform draws
   all of that now. */
.crm-app {
  --teal:var(--brand-accent, #008D95); --teal-dark:#006970;
  --navy:var(--brand-ink, #0B2339); --navy-soft:#16314a;
  --mid-grey:#848484; --warm-grey:#BFBAB0;
  --text-primary:var(--brand-ink, #0B2339); --text-secondary:#56636E; --text-tertiary:#848484;
  --border:#E4E5E3; --border-strong:#CFD0CC;
  --bg-page:#F4F5F5; --bg-card:#FFFFFF; --neutral-fill:#F1F2F2;
}
:where(.crm-app, .crm-app *) { box-sizing:border-box; margin:0; padding:0; }
:where(.crm-app) { font-family:'DM Sans',-apple-system,sans-serif; background:var(--bg-page); color:var(--text-primary); font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased; }
:where(.crm-app) h1,:where(.crm-app) h2,:where(.crm-app) h3 { font-family:'DM Serif Display',Georgia,serif; font-weight:500; color:var(--navy); }
/* Phone: the CRM's content beside the Platform's fixed hamburger. */
@media (max-width:768px) {
  :where(.crm-app) .main { padding-left:1rem; padding-right:1rem; }
  :where(.crm-app) .breadcrumb { padding-left:52px; }
}

/* Review & Send overlay (crmMarketingReview). Leaves the Platform's menu column
   visible: it is z-index 1000, so a full-width overlay under it lost its left
   edge. --ws-nav-w is its width (workspaceNav.css).
   Mobile: the sidebar is an off-canvas drawer, so go full width. */
:where(.crm-app) #__mkt-review { position:fixed; top:0; right:0; bottom:0; left:var(--ws-nav-w, 236px); z-index:950;
  overflow-y:auto; background:var(--bg-page); }
@media (max-width:768px) { :where(.crm-app) #__mkt-review { left:0; } }

/* MAIN */
:where(.crm-app) .crm-col { display:flex; flex-direction:column; min-width:0; }
:where(.crm-app) .main-wrap { display:flex; flex-direction:column; min-width:0; }

/* (The top bar and quick search moved to static/shared/quickSearch.css on 2026-10-18:
   one Platform-wide bar.) */
:where(.crm-app) .main { padding:1.25rem 1.75rem 3rem; max-width:1360px; width:100%; }
:where(.crm-app) .breadcrumb { margin-bottom:1.1rem; font-size:13px; }
:where(.crm-app) .breadcrumb a { color:var(--text-secondary); text-decoration:none; display:inline-flex; align-items:center; gap:6px; }
:where(.crm-app) .breadcrumb a:hover { color:var(--teal); }

:where(.crm-app) .card { background:var(--bg-card); border:1px solid var(--border); border-radius:12px; padding:1.1rem 1.3rem; margin-bottom:12px; }
:where(.crm-app) .card-head { display:flex; justify-content:space-between; align-items:center; }
:where(.crm-app) .card-head.with-margin { margin-bottom:14px; }
:where(.crm-app) .section-label { font-size:11px; font-weight:700; letter-spacing:1.3px; color:var(--text-tertiary); }
:where(.crm-app) .collapse-btn { background:none; border:none; color:var(--text-tertiary); cursor:pointer; padding:4px; display:inline-flex; }
:where(.crm-app) .collapse-btn:hover { color:var(--navy); }
:where(.crm-app) .collapse-btn i { font-size:18px; transition:transform .15s; }
:where(.crm-app) .collapsed .collapse-btn i { transform:rotate(180deg); }
:where(.crm-app) .collapsed .card-body { display:none; }
:where(.crm-app) .collapsed.card { padding-bottom:1.1rem; }
:where(.crm-app) .collapsed .card-head.with-margin { margin-bottom:0; }

/* HEADER */
:where(.crm-app) .header-top { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; }
:where(.crm-app) .lead-name { font-family:'DM Serif Display',serif; font-size:27px; font-weight:500; color:var(--navy); line-height:1.15; margin-bottom:9px; display:inline-flex; align-items:center; gap:10px; }
:where(.crm-app) .lead-meta { font-size:13px; color:var(--text-secondary); display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
:where(.crm-app) .lead-meta .meta-item { display:inline-flex; align-items:center; gap:6px; }
:where(.crm-app) .lead-meta .meta-item i.lead { color:var(--mid-grey); font-size:15px; }
:where(.crm-app) .lead-meta a { color:var(--teal); text-decoration:none; border-bottom:1px dashed rgba(0,141,149,.4); }
:where(.crm-app) .id-pill { font-family:'DM Sans',monospace; background:var(--neutral-fill); color:var(--text-secondary); padding:3px 9px; border-radius:6px; font-size:12px; font-weight:600; }
:where(.crm-app) .tier-badge { background:var(--navy); color:#fff; font-size:12px; padding:5px 12px; border-radius:14px; font-weight:600; }

/* HEAT */
:where(.crm-app) .heat-block { min-width:260px; text-align:right; }
:where(.crm-app) .heat-score-row { display:flex; align-items:baseline; justify-content:flex-end; gap:8px; margin-bottom:5px; }
:where(.crm-app) .heat-score { font-family:'DM Serif Display',serif; font-size:32px; font-weight:600; color:var(--text-tertiary); line-height:1; }
:where(.crm-app) .heat-score-max { font-size:14px; color:var(--text-tertiary); }
:where(.crm-app) .heat-band { font-size:12px; font-weight:700; color:var(--text-tertiary); letter-spacing:.5px; text-transform:uppercase; }
:where(.crm-app) .heat-track-wrap { position:relative; height:12px; margin-top:8px; border-radius:6px; overflow:hidden; }
:where(.crm-app) .heat-track-gradient { position:absolute; inset:0; background:linear-gradient(to right, #BFBAB0 0%, #BFBAB0 18%, #848484 35%, #4FA8A1 60%, #1F9CA1 78%, #008D95 100%); }
:where(.crm-app) .heat-track-mask { position:absolute; top:0; bottom:0; right:0; left:0; background:var(--neutral-fill); }
:where(.crm-app) .heat-sub { font-size:11.5px; color:var(--text-tertiary); margin-top:6px; line-height:1.4; }
:where(.crm-app) .heat-block.live .heat-score, :where(.crm-app) .heat-block.live .heat-band { color:var(--teal-dark); }
/* LOG A CALL — logCallCard (lead page) */
:where(.crm-app) .log-call-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
:where(.crm-app) .log-call-chip { background:#fff; border:1px solid var(--border-strong); border-radius:16px; padding:5px 12px; font:inherit; font-size:12.5px; font-weight:600; color:var(--navy); cursor:pointer; }
:where(.crm-app) .log-call-chip:hover { background:var(--neutral-fill); }
:where(.crm-app) .log-call-chip.on { background:var(--teal); border-color:var(--teal); color:#fff; }
:where(.crm-app) .log-call-note { width:100%; box-sizing:border-box; padding:8px; border:1px solid var(--border-strong); border-radius:6px; font:inherit; font-size:13px; color:var(--navy); resize:vertical; }
:where(.crm-app) .log-call-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:8px; }
:where(.crm-app) .log-call-hint { font-size:11.5px; color:var(--text-tertiary); }
:where(.crm-app) .log-call-foot .crm-convert-btn:disabled { opacity:.5; cursor:default; }
/* WHAT'S DRIVING HEAT — heatCard / crmHeatDriversHtml */
:where(.crm-app) .heat-driver { display:flex; align-items:center; gap:9px; padding:8px 0; border-bottom:1px solid var(--neutral-fill); }
:where(.crm-app) .hd-icon { width:28px; height:28px; border-radius:7px; background:var(--neutral-fill); color:var(--teal); display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
:where(.crm-app) .hd-main { flex:1; min-width:0; }
:where(.crm-app) .hd-title { font-size:12.5px; color:var(--navy); font-weight:600; }
:where(.crm-app) .hd-sub { font-size:11.5px; color:var(--text-secondary); }
:where(.crm-app) .hd-val { font-size:12.5px; font-weight:700; color:var(--teal-dark); white-space:nowrap; }
:where(.crm-app) .hd-val.zero { color:var(--text-tertiary); font-weight:600; }
:where(.crm-app) .hd-val.neg { color:var(--text-secondary); }
:where(.crm-app) .heat-note { font-size:11.5px; color:var(--text-tertiary); margin-top:10px; line-height:1.5; }

/* JOURNEY — live timeline (crmLoadJourney → GET /api/crm/persons/:id/journey).
   Visual spec: docs/lead_page_journey_mockup.html. */
:where(.crm-app) .journey-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:18px; }
:where(.crm-app) .journey-btn { background:#fff; border:1px solid var(--border-strong); border-radius:7px; padding:5px 11px; font-family:inherit; font-size:12px; font-weight:600; color:var(--navy); cursor:pointer; display:inline-flex; align-items:center; gap:5px; }
:where(.crm-app) .journey-btn:hover { background:var(--neutral-fill); }
:where(.crm-app) .journey-btn i { font-size:14px; }
:where(.crm-app) .timeline { display:flex; gap:0; align-items:stretch; }
:where(.crm-app) .phase { flex:1; position:relative; padding:0 4px; }
:where(.crm-app) .phase-top { text-align:center; margin-bottom:10px; min-height:34px; }
:where(.crm-app) .phase-name { display:block; font-size:13px; font-weight:700; color:var(--navy); }
:where(.crm-app) .phase-dur { display:block; font-size:11px; color:var(--text-tertiary); margin-top:1px; }
:where(.crm-app) .phase.future .phase-name { color:var(--warm-grey); }
:where(.crm-app) .phase.current .phase-name { color:var(--teal-dark); }
:where(.crm-app) .phase.current .phase-dur { color:var(--teal-dark); font-weight:600; }
:where(.crm-app) .phase.frozen .phase-name, :where(.crm-app) .phase.frozen .phase-dur { color:var(--text-secondary); }
:where(.crm-app) .phase-track { position:relative; height:8px; background:var(--border); }
:where(.crm-app) .phase:first-child .phase-track { border-radius:4px 0 0 4px; }
:where(.crm-app) .phase:last-child .phase-track { border-radius:0 4px 4px 0; }
:where(.crm-app) .track-fill { position:absolute; top:0; left:0; height:100%; background:var(--teal); }
:where(.crm-app) .phase:first-child .track-fill { border-radius:4px 0 0 4px; }
:where(.crm-app) .phase.frozen .track-fill { background:var(--warm-grey); }
:where(.crm-app) .phase-divider { position:absolute; top:-3px; right:0; width:2px; height:14px; background:#fff; z-index:2; }
:where(.crm-app) .mile { position:absolute; top:50%; transform:translate(-50%,-50%); z-index:3; }
:where(.crm-app) .mile .dot { display:block; width:11px; height:11px; border-radius:50%; background:var(--teal); border:2px solid #fff; box-sizing:border-box; }
:where(.crm-app) .mile.milestone .dot { background:var(--navy); }
:where(.crm-app) .mile.minor .dot { width:7px; height:7px; border-width:1px; background:var(--warm-grey); }
:where(.crm-app) .mile.off .dot { background:#fff; border-color:var(--navy); }
:where(.crm-app) .here-pin { position:absolute; top:50%; transform:translate(-50%,-50%); z-index:4; width:16px; height:16px; border-radius:50%; background:#fff; border:3px solid var(--teal); box-shadow:0 0 0 3px rgba(0,141,149,.15); box-sizing:border-box; }
:where(.crm-app) .here-pin.frozen { border-color:var(--warm-grey); box-shadow:0 0 0 3px rgba(191,186,176,.25); }
:where(.crm-app) .phase-miles { margin-top:12px; min-height:30px; text-align:center; }
:where(.crm-app) .mile-label { display:block; font-size:10.5px; color:var(--text-secondary); line-height:1.25; }
:where(.crm-app) .density-hint { display:inline-block; font-size:10.5px; color:var(--text-tertiary); background:var(--neutral-fill); padding:1px 7px; border-radius:8px; line-height:1.4; }
:where(.crm-app) .journey-hint-below { display:table; margin:4px auto 0; }
:where(.crm-app) .here-label { display:block; font-size:11px; font-weight:700; color:var(--teal-dark); }
:where(.crm-app) .here-label.frozen { color:var(--text-secondary); }
:where(.crm-app) .journey-legend { display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:14px; padding-top:14px; border-top:1px solid var(--border); font-size:11.5px; color:var(--text-tertiary); }
:where(.crm-app) .journey-legend > span { display:inline-flex; align-items:center; gap:6px; }
:where(.crm-app) .journey-legend .journey-legend-note { margin-left:auto; }
:where(.crm-app) .ld { display:inline-block; width:10px; height:10px; border-radius:50%; flex-shrink:0; box-sizing:border-box; background:var(--teal); }
:where(.crm-app) .ld.milestone { background:var(--navy); }
:where(.crm-app) .ld.engagement { background:var(--teal); }
:where(.crm-app) .ld.minor { background:var(--warm-grey); }
:where(.crm-app) .ld.off { background:#fff; border:2px solid var(--navy); }
:where(.crm-app) .journey-note { margin-top:14px; padding-top:14px; border-top:1px solid var(--border); font-size:11.5px; color:var(--text-tertiary); display:flex; align-items:center; gap:6px; }
:where(.crm-app) .journey-history { margin-top:12px; padding-top:6px; border-top:1px solid var(--border); max-height:320px; overflow-y:auto; }
:where(.crm-app) .journey-history-row { display:flex; align-items:flex-start; gap:10px; padding:6px 0; border-bottom:1px solid var(--neutral-fill); font-size:12.5px; }
:where(.crm-app) .journey-history-row .ld { width:9px; height:9px; margin-top:5px; }
:where(.crm-app) .journey-history-when { color:var(--text-tertiary); font-size:11.5px; min-width:84px; flex-shrink:0; }
:where(.crm-app) .journey-history-label { color:var(--navy); flex:1; }
:where(.crm-app) .journey-history-phase { color:var(--text-tertiary); font-size:11px; flex-shrink:0; }

/* WORKSPACE */
:where(.crm-app) .workspace { display:grid; grid-template-columns:280px 1fr; gap:14px; align-items:start; }
:where(.crm-app) .rail .card { padding:.85rem 1rem; }
:where(.crm-app) .rail .card-head .section-label { font-size:10.5px; }
:where(.crm-app) .rail .card-head { padding:2px 0; }
:where(.crm-app) .rail .card-body { margin-top:12px; }
:where(.crm-app) .main-col { min-width:0; }

/* TOGGLES (non-interactive in 2a) */
:where(.crm-app) .toggle-list { display:flex; flex-direction:column; }
:where(.crm-app) .toggle-row { display:flex; align-items:center; justify-content:space-between; padding:7px 0; border-bottom:1px solid var(--neutral-fill); gap:8px; }
:where(.crm-app) .toggle-row:last-child { border-bottom:none; }
:where(.crm-app) .toggle-label { font-size:12.5px; color:var(--navy); }
:where(.crm-app) .toggle-sub { font-size:11px; color:var(--text-tertiary); margin-top:1px; }
:where(.crm-app) .toggle { width:34px; height:19px; background:var(--border-strong); border-radius:10px; position:relative; flex-shrink:0; cursor:pointer; transition:background .15s, box-shadow .15s, opacity .15s; }
:where(.crm-app) .toggle.readonly { cursor:default; opacity:.85; }
:where(.crm-app) .toggle:not(.readonly):hover { box-shadow:0 0 0 3px rgba(0,141,149,.12); }
:where(.crm-app) .toggle:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(0,141,149,.35); }
:where(.crm-app) .toggle.saving { opacity:.5; pointer-events:none; }
:where(.crm-app) .toggle::after { content:''; position:absolute; top:2px; left:2px; width:15px; height:15px; background:#fff; border-radius:50%; box-shadow:0 1px 2px rgba(0,0,0,.15); transition:left .15s; }
:where(.crm-app) .toggle.on { background:var(--teal); }
:where(.crm-app) .toggle.on::after { left:17px; }

/* Phase 2b — inline error tooltip + row error highlight */
:where(.crm-app) .toggle-row { position:relative; }
:where(.crm-app) .toggle-row.error .toggle { box-shadow:0 0 0 2px rgba(217,79,79,.45); }
:where(.crm-app) .crm-error-tip { position:absolute; right:0; top:-4px; transform:translateY(-100%); background:#d94f4f; color:#fff; font-size:11px; font-weight:600; padding:4px 9px; border-radius:5px; box-shadow:0 2px 6px rgba(217,79,79,.3); pointer-events:none; white-space:nowrap; z-index:50; }
:where(.crm-app) .crm-error-tip::after { content:''; position:absolute; right:8px; bottom:-4px; width:0; height:0; border-left:4px solid transparent; border-right:4px solid transparent; border-top:4px solid #d94f4f; }

/* Phase 2b — inline editable text fields (header name/email/phone + Current broker) */
:where(.crm-app) .crm-editable { display:inline-flex; align-items:center; gap:4px; position:relative; }
:where(.crm-app) .crm-editable .crm-edit-display { display:inline-flex; align-items:center; gap:0; }
:where(.crm-app) .crm-editable.editing .crm-pencil { display:none; }
:where(.crm-app) .crm-pencil { background:none; border:0; cursor:pointer; color:var(--teal); padding:2px 4px; opacity:0; transition:opacity .15s, color .12s; line-height:1; }
:where(.crm-app) .crm-pencil i { font-size:13px; vertical-align:middle; }
:where(.crm-app) .crm-editable:hover .crm-pencil { opacity:1; }
:where(.crm-app) .crm-pencil:hover { color:var(--teal-dark); }
:where(.crm-app) .crm-pencil:focus-visible { opacity:1; outline:none; box-shadow:0 0 0 2px rgba(0,141,149,.35); border-radius:4px; }
:where(.crm-app) .crm-empty-hint { color:var(--text-tertiary); font-weight:400; font-style:italic; }
:where(.crm-app) .crm-inline-input { border:1.5px solid var(--teal); border-radius:5px; padding:2px 7px; font:inherit; color:var(--navy); background:#fff; min-width:140px; max-width:100%; }
:where(.crm-app) .crm-inline-input:focus { outline:none; box-shadow:0 0 0 3px rgba(0,141,149,.18); }
:where(.crm-app) .crm-inline-input.saving { opacity:.6; pointer-events:none; }
/* lead-name editable adopts the lead-name typography */
:where(.crm-app) .lead-name.crm-editable .crm-inline-input { font-family:'DM Serif Display',serif; font-size:27px; font-weight:500; min-width:200px; }

/* ── Portal-owned name (PERSON_NAME_EDIT_SCOPE.md) ──────────────────────────
   The header name is now two fields (first + last), or one for a company. The
   pencil here is PERSISTENT, not hover-only: the pre-existing name editor was
   hover-only and went unnoticed for long enough that nobody knew the name could
   be edited at all. Everything else keeps the hover-reveal. */
:where(.crm-app) .pn-row { display:flex; align-items:baseline; gap:9px; flex-wrap:wrap; }
:where(.crm-app) .pn-row .crm-editable .crm-inline-input { font-family:'DM Serif Display',serif; font-size:27px; font-weight:500; min-width:150px; }
:where(.crm-app) .pn-row .crm-pencil { opacity:.45; }
:where(.crm-app) .pn-row .crm-editable:hover .crm-pencil,
:where(.crm-app) .pn-row .crm-editable:focus-within .crm-pencil { opacity:1; }
:where(.crm-app) .pn-note { display:flex; align-items:center; gap:8px; margin-top:3px; font-size:11.5px; color:var(--text-tertiary); }
:where(.crm-app) .pn-note i { font-size:13px; vertical-align:-2px; }
:where(.crm-app) .pn-chip { display:inline-block; padding:1px 7px; border-radius:9px; background:var(--teal); color:#fff; font-size:10.5px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; }
:where(.crm-app) .pn-link { background:none; border:0; padding:0; font:inherit; font-size:11.5px; color:var(--teal); cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
:where(.crm-app) .pn-link:hover { color:var(--teal-dark); }
:where(.crm-app) .pn-link:focus-visible { outline:none; box-shadow:0 0 0 2px rgba(0,141,149,.35); border-radius:3px; }
/* The company suggestion is advisory — the regex is a heuristic and a person can
   legitimately be named "Trust". Amber, never red, and never auto-applied. */
:where(.crm-app) .pn-suggest { color:#B45309; font-weight:600; }
:where(.crm-app) .pn-suggest:hover { color:#92400e; }
/* Structure workspace: same controls at the node's smaller scale. */
:where(.crm-app) .sw-pn .pn-link, :where(.crm-app) .sw-pn .pn-chip { font-size:10.5px; vertical-align:middle; }

/* Phase 2b — removable tag pills (Interests + Needs help with) */
:where(.crm-app) .tag.removable { display:inline-flex; align-items:center; gap:3px; cursor:default; padding-right:5px; }
:where(.crm-app) .tag-x { background:none; border:0; color:var(--text-tertiary); padding:0 2px; font-size:14px; line-height:1; cursor:pointer; opacity:0; transition:opacity .12s, color .12s; }
:where(.crm-app) .tag.removable:hover .tag-x { opacity:1; }
:where(.crm-app) .tag-x:hover { color:#d94f4f; }
:where(.crm-app) .tag-x:focus-visible { opacity:1; outline:none; color:#d94f4f; }

/* Phase 2b — "+ Add" pill button + dropdown */
:where(.crm-app) .crm-add-pill-btn { background:#fff; border:1px dashed var(--border-strong); color:var(--text-secondary); padding:2px 9px; border-radius:11px; font-family:inherit; font-size:11px; font-weight:600; cursor:pointer; transition:color .12s, border-color .12s; }
:where(.crm-app) .crm-add-pill-btn:hover { color:var(--teal); border-color:var(--teal); }
:where(.crm-app) .crm-add-pill-btn:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(0,141,149,.22); border-color:var(--teal); color:var(--teal); }
:where(.crm-app) .crm-add-pill-dropdown { background:#fff; border:1px solid var(--border); border-radius:8px; box-shadow:0 6px 18px rgba(11,35,57,.08); padding:4px 0; z-index:500; min-width:180px; max-height:240px; overflow-y:auto; }
:where(.crm-app) .crm-add-pill-option { padding:7px 14px; font-size:12.5px; color:var(--navy); cursor:pointer; }
:where(.crm-app) .crm-add-pill-option:hover { background:var(--neutral-fill); color:var(--teal); }
:where(.crm-app) .crm-add-pill-empty { padding:9px 14px; font-size:11.5px; color:var(--text-tertiary); font-style:italic; }

/* Phase 2b prompt 4 — tier convert button (Fee & Plan card) */
:where(.crm-app) .crm-convert-btn { width:100%; padding:10px 16px; background:var(--teal); color:#fff; border:1px solid var(--teal); border-radius:8px; font:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:background .12s, border-color .12s; }
:where(.crm-app) .crm-convert-btn:hover { background:var(--teal-dark); border-color:var(--teal-dark); }
:where(.crm-app) .crm-convert-btn:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(0,141,149,.35); }
:where(.crm-app) .crm-convert-btn:disabled { opacity:.55; cursor:wait; }

/* Phase 2c prompt 2 — Stop Selling: quieter secondary (outline/muted), same full-width shape */
:where(.crm-app) .crm-stopsell-btn { width:100%; padding:9px 16px; background:#fff; color:var(--text-secondary); border:1px solid var(--border-strong); border-radius:8px; font:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:background .12s, border-color .12s, color .12s; }
:where(.crm-app) .crm-stopsell-btn:hover { background:var(--neutral-fill); border-color:var(--warm-grey); color:var(--navy); }
:where(.crm-app) .crm-stopsell-btn:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(132,132,132,.25); }
:where(.crm-app) .crm-stopsell-btn:disabled { opacity:.55; cursor:wait; }

/* Phase 2b prompt 4 — top-of-page toast (write-failure surface) */
:where(.crm-app) .crm-toast { position:fixed; top:18px; left:50%; transform:translateX(-50%); background:var(--navy); color:#fff; padding:10px 12px 10px 18px; border-radius:8px; box-shadow:0 8px 28px rgba(11,35,57,.28); font-size:13px; line-height:1.45; display:flex; align-items:center; gap:14px; z-index:2000; max-width:560px; }
:where(.crm-app) .crm-toast-error { background:#d94f4f; }
:where(.crm-app) .crm-toast-warning { background:#C76D2E; color:#fff; }
:where(.crm-app) .crm-toast-success { background:#0B7A66; color:#fff; }
:where(.crm-app) .crm-toast-msg { flex:1; min-width:0; }
:where(.crm-app) .crm-toast-close { background:none; border:0; color:inherit; opacity:.75; cursor:pointer; font-size:18px; line-height:1; padding:2px 5px; }
:where(.crm-app) .crm-toast-close:hover { opacity:1; }
:where(.crm-app) .crm-toast-close:focus-visible { outline:none; opacity:1; box-shadow:0 0 0 2px rgba(255,255,255,.45); border-radius:4px; }

/* Phase 2b prompt 4-unified — convert modal linked-client picker */
:where(.crm-app) .crm-modal-picker { margin:14px 0 4px; padding:12px 14px; background:var(--neutral-fill); border-radius:8px; }
:where(.crm-app) .crm-modal-picker-prompt { font-size:12.5px; color:var(--text-secondary); line-height:1.5; margin-bottom:8px; }
:where(.crm-app) .crm-modal-picker-select { width:100%; padding:8px 10px; border:1px solid var(--border-strong); border-radius:6px; background:#fff; font:inherit; font-size:13px; color:var(--navy); cursor:pointer; }
:where(.crm-app) .crm-modal-picker-select:focus { outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(0,141,149,.18); }

/* Phase 2b — confirmation modal (Pitch Campaigns enrol) */
:where(.crm-app) .crm-modal-backdrop { position:fixed; inset:0; background:rgba(11,35,57,.55); display:flex; align-items:center; justify-content:center; padding:20px; z-index:1000; }
:where(.crm-app) .crm-modal { background:var(--bg-card); border-radius:12px; padding:22px 24px 20px; width:100%; max-width:420px; box-shadow:0 20px 60px rgba(0,0,0,.25); }
:where(.crm-app) .crm-modal h3 { font-family:'DM Serif Display',Georgia,serif; font-size:18px; font-weight:500; color:var(--navy); margin-bottom:8px; }
:where(.crm-app) .crm-modal p { font-size:13px; color:var(--text-secondary); line-height:1.55; margin-bottom:18px; }
:where(.crm-app) .crm-modal-actions { display:flex; gap:8px; justify-content:flex-end; }
:where(.crm-app) .crm-btn { padding:8px 16px; border-radius:7px; border:1px solid var(--border-strong); font-family:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:background .12s, border-color .12s; }
:where(.crm-app) .crm-btn-secondary { background:#fff; color:var(--navy); }
:where(.crm-app) .crm-btn-secondary:hover { background:var(--neutral-fill); }
:where(.crm-app) .crm-btn-primary { background:var(--teal); color:#fff; border-color:var(--teal); }
:where(.crm-app) .crm-btn-primary:hover { background:var(--teal-dark); border-color:var(--teal-dark); }
:where(.crm-app) .crm-btn:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(0,141,149,.35); }
:where(.crm-app) .crm-btn:disabled { opacity:.45; cursor:not-allowed; }

/* Archive to Vested Re-marketing: the one dialog every screen opens. Red says
   "you are giving this lead up"; the reason dropdown is required, so the confirm
   stays disabled until one is picked. */
:where(.crm-app) .crm-btn-danger { background:#C0392B; color:#fff; border-color:#C0392B; }
:where(.crm-app) .crm-btn-danger:hover:not(:disabled) { background:#A93226; border-color:#A93226; }
:where(.crm-app) .crm-hb-tag { font-size:10.5px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:#C0392B; margin-bottom:6px; }
:where(.crm-app) .crm-hb-list { margin:0 0 14px 18px; padding:0; font-size:13px; color:var(--text-secondary); line-height:1.6; }
:where(.crm-app) .crm-hb-label { display:block; font-size:12px; font-weight:600; color:var(--navy); margin-bottom:6px; }
:where(.crm-app) .crm-hb-select { width:100%; padding:8px 10px; border:1px solid var(--border-strong); border-radius:6px; background:#fff; font:inherit; font-size:13px; color:var(--navy); cursor:pointer; }
:where(.crm-app) .crm-hb-select:focus { outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(0,141,149,.18); }
:where(.crm-app) .crm-hb-alt { font-size:12px; color:var(--text-tertiary); border-top:1px solid var(--border); margin-top:14px; padding-top:10px; margin-bottom:14px; }
:where(.crm-app) .crm-hb-err { display:none; color:#C0392B; font-size:12px; margin:-6px 0 12px; }
/* The row / header trigger: quiet until hovered, so it never competes with the
   constructive actions beside it. */
:where(.crm-app) .crm-hb-btn { background:#fff; color:#A93226; border:1px solid #E6B8B2; border-radius:6px; padding:5px 10px; font:inherit; font-size:11.5px; font-weight:600; cursor:pointer; white-space:nowrap; }
:where(.crm-app) .crm-hb-btn:hover { background:#FBEDEB; border-color:#C0392B; }
:where(.crm-app) .crm-hb-btn:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(192,57,43,.25); }
/* Lead page header: Structure and Archive to Vested as ONE matched pair (2026-09-15).
   They used to be a full-width teal button over a small outlined one, which read as
   two unrelated controls. Same width, height and type; Structure stays primary. */
:where(.crm-app) .lead-head-actions { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
:where(.crm-app) .lead-head-actions .crm-convert-btn,
:where(.crm-app) .lead-head-actions .crm-hb-btn { width:100%; display:flex; align-items:center; justify-content:center; gap:6px;
  padding:7px 12px; font-size:12.5px; font-weight:600; border-radius:8px; line-height:1.3; }
:where(.crm-app) .lead-head-actions .crm-hb-btn { background:#fff; color:var(--text-secondary); border:1px solid var(--border-strong); }
:where(.crm-app) .lead-head-actions .crm-hb-btn:hover { background:#FBEDEB; color:#A93226; border-color:#E6B8B2; }
:where(.crm-app) .lead-head-actions i { font-size:14px; }

/* Lead card Advice Type: a plain portal-backed select, plus a note when the value
   shown still comes from Pipedrive. */
:where(.crm-app) .crm-field-select { width:100%; padding:7px 10px; border:1px solid var(--border-strong); border-radius:6px; background:#fff; font:inherit; font-size:13px; color:var(--navy); cursor:pointer; margin-top:3px; }
:where(.crm-app) .crm-field-select:focus { outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(0,141,149,.18); }
:where(.crm-app) .crm-field-select:disabled { opacity:.6; cursor:wait; }
:where(.crm-app) .crm-field-note { font-size:11.5px; color:var(--text-tertiary); margin-top:5px; line-height:1.45; }
:where(.crm-app) .crm-field-link { background:none; border:0; padding:0; font:inherit; font-size:11.5px; font-weight:600; color:var(--teal-dark); text-decoration:underline; cursor:pointer; }
:where(.crm-app) .crm-field-link:focus-visible { outline:none; box-shadow:0 0 0 2px rgba(0,141,149,.3); border-radius:2px; }

/* Admin Re-marketing: reason counts + the pool table. */
:where(.crm-app) .rm-filters { display:flex; flex-wrap:wrap; gap:10px; align-items:end; margin-top:12px; }
:where(.crm-app) .rm-filters label { display:flex; flex-direction:column; gap:4px; font-size:11px; letter-spacing:.4px; color:var(--text-tertiary); }
:where(.crm-app) .rm-filters select, :where(.crm-app) .rm-filters input { padding:6px 8px; border:1px solid var(--border-strong); border-radius:6px; font:inherit; font-size:12.5px; color:var(--navy); background:#fff; }
:where(.crm-app) .rm-reasons { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 14px; margin-top:14px; font-size:13px; }
:where(.crm-app) .rm-reasons .bar { position:relative; padding:4px 8px; border-radius:4px; overflow:hidden; color:var(--navy); }
:where(.crm-app) .rm-reasons .bar i { position:absolute; inset:0 auto 0 0; background:rgba(0,141,149,.14); }
:where(.crm-app) .rm-reasons .bar span { position:relative; }
:where(.crm-app) .rm-reasons .bar.auto i { background:rgba(132,132,132,.16); }
:where(.crm-app) .rm-reasons .n { font-variant-numeric:tabular-nums; font-weight:600; color:var(--navy); align-self:center; }
:where(.crm-app) .rm-owned { display:inline-block; font-size:11px; font-weight:600; color:#8A5A00; background:#FBF4E3; border:1px solid #EBD9A8; border-radius:4px; padding:1px 6px; }

/* New Client — "this might already exist" panel. Amber (a caution to read, not an
   error): the create is still available, we are just showing what already matches. */
:where(.crm-app) .nc-dup { margin-top:10px; padding:10px 11px; border:1px solid #EBD9A8; background:#FBF4E3; border-radius:8px; }
:where(.crm-app) .nc-dup-h { font-size:12.5px; font-weight:800; color:#8A6D1F; margin-bottom:3px; }
:where(.crm-app) .nc-dup-sub { font-size:11.5px; color:#6B5A2E; line-height:1.45; margin-bottom:8px; }
:where(.crm-app) .nc-dup-row { display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:6px 8px; background:#fff; border:1px solid #EBD9A8; border-radius:7px; margin-bottom:6px; }
:where(.crm-app) .nc-dup-nm { display:flex; flex-direction:column; gap:1px; min-width:0; font-size:12.5px; font-weight:700; color:var(--navy); }
:where(.crm-app) .nc-dup-meta { font-size:10.5px; font-weight:600; color:var(--text-tertiary); }
:where(.crm-app) .nc-dup-use { flex:0 0 auto; padding:5px 11px; border-radius:6px; border:1px solid var(--teal);
  background:var(--teal); color:#fff; font-family:inherit; font-size:11.5px; font-weight:700;
  cursor:pointer; text-decoration:none; white-space:nowrap; }
:where(.crm-app) .nc-dup-use:hover { background:var(--teal-dark); border-color:var(--teal-dark); }
:where(.crm-app) .nc-dup-anyway { margin-top:2px; padding:0; border:none; background:none; font-family:inherit;
  font-size:11.5px; font-weight:700; color:#8A6D1F; cursor:pointer; text-decoration:underline; }
:where(.crm-app) .nc-dup-anyway:hover { color:#6B5A2E; }

/* FIELD ROWS */
:where(.crm-app) .field-row { display:flex; align-items:center; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--neutral-fill); gap:8px; }
:where(.crm-app) .field-row:last-child { border-bottom:none; }
:where(.crm-app) .field-row-label { font-size:10.5px; color:var(--text-tertiary); font-weight:700; letter-spacing:.5px; }
:where(.crm-app) .field-value { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--navy); font-weight:600; margin-top:3px; }
:where(.crm-app) .field-value.unset { color:var(--text-tertiary); font-weight:400; }
:where(.crm-app) .status-row { display:flex; gap:6px; margin-top:3px; }
:where(.crm-app) .status-pill { font-size:11.5px; font-weight:600; padding:3px 9px; border-radius:10px; border:1px solid var(--border-strong); color:var(--text-secondary); background:#fff; }
:where(.crm-app) .status-pill.active.selected { background:var(--teal); color:#fff; border-color:var(--teal); }
:where(.crm-app) .status-pill.dormant.selected { background:#F4E9CB; color:#7B5D00; border-color:#E5D5A1; }
:where(.crm-app) .status-pill.archived.selected { background:var(--warm-grey); color:#fff; border-color:var(--warm-grey); }
/* The status pill is a read-only label since 2026-09-14 (no clickable pills, no reveal). */
/* Phase 2b prompt 3 — inline reveal under the status pill row */

/* ABOUT */
:where(.crm-app) .tag-row { display:flex; gap:5px; flex-wrap:wrap; }
:where(.crm-app) .tag { background:var(--neutral-fill); color:var(--navy); padding:3px 9px; border-radius:11px; font-size:11.5px; font-weight:600; }
:where(.crm-app) .field-label { font-size:11px; color:var(--text-secondary); margin-bottom:5px; }
:where(.crm-app) .field-block { margin-bottom:12px; }
:where(.crm-app) .field-block:last-child { margin-bottom:0; }
:where(.crm-app) .about-table { width:100%; font-size:12.5px; border-collapse:collapse; }
:where(.crm-app) .about-table td { padding:4px 0; border-bottom:1px solid var(--neutral-fill); }
:where(.crm-app) .about-table tr:last-child td { border-bottom:none; }
:where(.crm-app) .about-table td:first-child { color:var(--text-secondary); }
:where(.crm-app) .about-table td:last-child { text-align:right; font-weight:600; }

/* PLACEHOLDER CARDS (main column, activated in 2c) */
:where(.crm-app) .grid-ck-heat { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
:where(.crm-app) .placeholder { color:var(--text-tertiary); font-size:12.5px; text-align:center; padding:1.4rem 1rem; border:1px dashed var(--border-strong); border-radius:8px; margin-top:12px; }
:where(.crm-app) .placeholder i { font-size:18px; display:block; margin-bottom:6px; color:var(--warm-grey); }

/* MINI BUTTON (read-only display, no action wired in 2a) */
:where(.crm-app) .btn-mini { background:#fff; border:1px solid var(--border-strong); border-radius:6px; padding:5px 10px; font-family:inherit; font-size:11.5px; font-weight:600; color:var(--navy); display:inline-flex; align-items:center; gap:5px; }

/* STATES */
:where(.crm-app) .state-wrap { display:flex; align-items:center; justify-content:center; min-height:60vh; padding:2rem; }
:where(.crm-app) .state-box { text-align:center; max-width:420px; }
:where(.crm-app) .state-box h2 { font-size:20px; margin-bottom:8px; }
:where(.crm-app) .state-box p { color:var(--text-secondary); font-size:13.5px; margin-bottom:16px; }
:where(.crm-app) .state-box .btn-primary { background:var(--teal); color:#fff; border:1px solid var(--teal); border-radius:8px; padding:9px 18px; font-family:inherit; font-size:13px; font-weight:600; text-decoration:none; cursor:pointer; display:inline-block; }
:where(.crm-app) .state-box .btn-primary:hover { background:var(--teal-dark); }
:where(.crm-app) .spinner { width:26px; height:26px; border:3px solid var(--border); border-top-color:var(--teal); border-radius:50%; animation:spin .8s linear infinite; margin:0 auto 14px; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════════════
   CLIENT STRUCTURE WORKSPACE (full-screen person-first org chart)
   Route /crm/structure/:pipedriveId → renderStructureWorkspace() in crm.js.
   Person → Entities → Accounts as a top-down org chart. Namespaced .sw-*.
   ══════════════════════════════════════════════════════════════════════════ */
:where(.crm-app) .sw-wrap { padding:1.1rem 1.75rem 4rem; display:flex; flex-direction:column; min-height:100vh; }
:where(.crm-app) .sw-top { display:flex; align-items:center; gap:14px; margin-bottom:6px; }
:where(.crm-app) .sw-top .sw-title { font-family:'DM Serif Display',Georgia,serif; font-size:20px; color:var(--navy); }
:where(.crm-app) .sw-top .sw-hint { font-size:12px; color:var(--text-tertiary); }
:where(.crm-app) .sw-banner { display:flex; gap:10px; align-items:flex-start; margin:8px 0 2px; border-radius:10px;
  padding:11px 13px; font-size:12.5px; background:#fbf1de; border:1px solid #e6c98a; color:var(--navy); }
:where(.crm-app) .sw-banner.bad { background:#fbe9e8; border-color:#f0b4b4; }
:where(.crm-app) .sw-banner .bi { font-size:15px; line-height:1.1; }
:where(.crm-app) .sw-scroll { overflow:auto; flex:1; padding:22px 8px 40px; }
:where(.crm-app) .sw-chartwrap { display:flex; justify-content:center; min-width:min-content; }
:where(.crm-app) .sw-subtree { display:flex; flex-direction:column; align-items:center; }
:where(.crm-app) .sw-stem { width:2px; height:22px; background:var(--border-strong); }
:where(.crm-app) .sw-kids { display:flex; justify-content:center; align-items:flex-start; }
:where(.crm-app) .sw-kid { position:relative; padding-top:24px; display:flex; flex-direction:column; align-items:center; margin:0 5px; }
:where(.crm-app) .sw-kid::after { content:""; position:absolute; top:0; left:0; right:0; border-top:2px solid var(--border-strong); }
:where(.crm-app) .sw-kid:first-child::after { left:50%; }
:where(.crm-app) .sw-kid:last-child::after { right:50%; }
:where(.crm-app) .sw-kid:only-child::after { display:none; }
:where(.crm-app) .sw-kid::before { content:""; position:absolute; top:0; left:calc(50% - 1px); width:2px; height:24px; background:var(--border-strong); }
:where(.crm-app) .sw-node { background:var(--bg-card); border:1px solid var(--border); border-radius:12px;
  box-shadow:0 1px 2px rgba(11,35,57,.06),0 3px 10px rgba(11,35,57,.05); transition:box-shadow .12s,border-color .12s; }
:where(.crm-app) .sw-node:hover { box-shadow:0 8px 26px rgba(11,35,57,.12); }

/* person node */
:where(.crm-app) .sw-person { width:300px; padding:14px 15px; border-top:3px solid var(--teal); }
:where(.crm-app) .sw-person .sw-row1 { display:flex; gap:12px; align-items:center; }
:where(.crm-app) .sw-av { width:46px; height:46px; border-radius:50%; background:var(--navy); color:#fff; flex:0 0 auto;
  display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:800; }
:where(.crm-app) .sw-av.stub { background:#c2453f; } :where(.crm-app) .sw-av.adv { background:var(--mid-grey); }
:where(.crm-app) .sw-pn { font-family:'DM Serif Display',Georgia,serif; font-size:19px; font-weight:600; color:var(--navy); line-height:1.15; }
:where(.crm-app) .sw-role { font-size:12px; color:var(--text-tertiary); margin-top:1px; }
:where(.crm-app) .sw-ownerline { margin-top:11px; padding-top:10px; border-top:1px solid var(--border); display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
:where(.crm-app) .sw-owner-ok { display:inline-flex; align-items:center; gap:7px; font-size:12px; color:var(--navy); }
:where(.crm-app) .sw-owner-ok .lk { color:#1a9e6b; font-weight:700; }
/* Informational, NOT an error. It marks a missing Pipedrive link — nothing on this
   card is gated on that link, so it must not wear alarm colours. */
:where(.crm-app) .sw-owner-missing { display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:var(--text-secondary);
  background:var(--neutral-fill); border:1px solid var(--border); padding:4px 10px; border-radius:8px; font-weight:600; }
:where(.crm-app) .sw-owner-missing .sw-owner-note { color:var(--text-tertiary); font-weight:500; }
:where(.crm-app) .sw-pgrid { display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; margin-top:12px; }
/* Contact fields take the whole card width — an email does not fit a half-cell, and
   its inline editor inherited that width and became unusable to type into. */
:where(.crm-app) .sw-pgrid .f.wide { grid-column:1 / -1; }
:where(.crm-app) .sw-pgrid .f.wide .v { white-space:normal; word-break:break-word; }
:where(.crm-app) .sw-pgrid .f { display:flex; flex-direction:column; gap:1px; min-width:0; }
:where(.crm-app) .sw-pgrid .f .k { font-size:9.5px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; color:var(--text-tertiary); }
:where(.crm-app) .sw-pgrid .f .v { color:var(--navy); font-weight:600; font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
:where(.crm-app) .sw-pgrid .f .v a { color:var(--teal-dark); text-decoration:none; }
:where(.crm-app) .sw-pgrid .f .v.muted { color:var(--text-tertiary); font-weight:500; font-style:italic; }

/* entity node */
:where(.crm-app) .sw-entity { width:206px; overflow:hidden; }
:where(.crm-app) .sw-entity .bar { height:5px; }
:where(.crm-app) .sw-entity .in { padding:11px 13px 12px; }
:where(.crm-app) .sw-entity .etop { display:flex; align-items:center; justify-content:space-between; gap:8px; }
:where(.crm-app) .sw-lock { font-size:9px; color:var(--teal-dark); font-weight:700; }
:where(.crm-app) .sw-ename { font-size:13.5px; font-weight:800; color:var(--navy); margin-top:8px; line-height:1.25; }
:where(.crm-app) .sw-etrust { font-size:11px; color:var(--text-secondary); margin-top:2px; }
:where(.crm-app) .sw-egrid { display:grid; grid-template-columns:auto 1fr; gap:5px 8px; margin-top:10px; font-size:11.5px; align-items:baseline; }
:where(.crm-app) .sw-egrid .gk { color:var(--text-tertiary); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
:where(.crm-app) .sw-egrid .gv { color:var(--navy); font-weight:600; }
:where(.crm-app) .sw-egrid .gv.muted { color:var(--text-tertiary); font-weight:500; }

/* account node */
/* Account chip: min-width + fit-content (was a hard 174px, which clipped the ACTIVE
   badge off the right edge once provider + a long account number filled the row). */
:where(.crm-app) .sw-acct { min-width:174px; width:max-content; max-width:230px; padding:9px 10px; }
:where(.crm-app) .sw-acct .atop { display:flex; align-items:center; gap:7px; flex-wrap:nowrap; }
:where(.crm-app) .sw-prov { font-size:9px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; padding:2px 6px; border-radius:5px; background:var(--navy); color:#fff; }
:where(.crm-app) .sw-anum { font-size:12.5px; font-weight:700; color:var(--navy); font-family:'DM Sans',monospace; white-space:nowrap; }
:where(.crm-app) .sw-aval { margin-left:auto; font-size:12.5px; font-weight:700; color:var(--navy); font-variant-numeric:tabular-nums; }
:where(.crm-app) .sw-aval.sup { color:var(--text-tertiary); font-weight:500; }
:where(.crm-app) .sw-afeed { font-size:10.5px; color:var(--text-tertiary); margin-top:6px; }
/* "not in total" — this account's holdings aren't summed into the portfolio value. */
:where(.crm-app) .sw-nosum { color:#b07d1a; font-weight:700; white-space:nowrap; cursor:help; }
:where(.crm-app) .sw-empty { border:1.5px dashed var(--border-strong); border-radius:11px; padding:14px 18px;
  color:var(--text-tertiary); font-size:12.5px; text-align:center; max-width:360px; }

/* Phase 3 — inline editing on nodes */
:where(.crm-app) .sw-ed { cursor:pointer; border-radius:5px; padding:0 3px; margin:0 -3px; border-bottom:1px dashed transparent; transition:background .1s; }
:where(.crm-app) .sw-ed:hover { background:var(--neutral-fill); border-bottom-color:var(--border-strong); }
:where(.crm-app) .sw-ed.empty { color:var(--text-tertiary); font-style:italic; }
/* Inline editor: never inherit a tiny node font (the status badge is 8.5px, which
   made the status <select> a few-px-wide target crammed against "+ Add account").
   Fixed size + min-width give the dropdown arrow a real hit area; position+z-index
   let the open editor win clicks over any adjacent tile. */
:where(.crm-app) .sw-ed-input { font-family:inherit; font-size:12.5px; color:var(--navy); background:#fff; border:1px solid var(--teal);
  border-radius:6px; padding:5px 8px; outline:none; box-shadow:0 0 0 3px rgba(0,141,149,.14); max-width:100%;
  position:relative; z-index:20; }
/* A full-width field's editor fills it, so a long value stays readable while typing. */
:where(.crm-app) .sw-pgrid .f.wide .sw-ed-input { width:100%; }
:where(.crm-app) select.sw-ed-input { cursor:pointer; min-width:96px; }
:where(.crm-app) .sw-del { border:none; background:transparent; color:var(--text-tertiary); cursor:pointer; font-size:13px; line-height:1; padding:2px 5px; border-radius:5px; }
:where(.crm-app) .sw-del:hover { color:#c2453f; background:#fbe9e8; }
/* "Remove" on an account chip — pushed to the right of the feed row, quiet until hover. */
:where(.crm-app) .sw-adel { margin-left:auto; border:none; background:transparent; color:var(--text-tertiary); cursor:pointer;
  font-family:inherit; font-size:10.5px; font-weight:700; padding:2px 6px; border-radius:5px; }
:where(.crm-app) .sw-adel:hover { color:#c2453f; background:#fbe9e8; }
:where(.crm-app) .sw-addnode { border:1.5px dashed var(--border-strong); border-radius:11px; background:transparent; color:var(--teal-dark);
  cursor:pointer; font-weight:700; font-family:inherit; display:flex; align-items:center; justify-content:center; gap:6px; transition:border-color .12s,background .12s; }
:where(.crm-app) .sw-addnode:hover { border-color:var(--teal); background:var(--neutral-fill); }
:where(.crm-app) .sw-addnode.ent { width:128px; padding:14px 10px; font-size:12px; flex-direction:column; gap:4px; }
:where(.crm-app) .sw-addnode.ent .big { font-size:20px; }
/* Compact "＋ Add" tab — was a 174px tile matching the account chip, which gave a
   secondary action the same visual weight as a real account. */
:where(.crm-app) .sw-addnode.acct { width:auto; padding:5px 12px; font-size:11.5px; align-self:center; }
:where(.crm-app) .sw-addform { background:var(--bg-card); border:1px solid var(--teal); border-radius:11px; box-shadow:0 8px 26px rgba(11,35,57,.14);
  padding:11px; display:flex; flex-direction:column; gap:7px; text-align:left; }
:where(.crm-app) .sw-addform.ent { width:196px; } :where(.crm-app) .sw-addform.acct { width:196px; }
:where(.crm-app) .sw-addform label { font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--text-tertiary); }
:where(.crm-app) .sw-addform input, :where(.crm-app) .sw-addform select { width:100%; padding:6px 8px; border:1px solid var(--border-strong); border-radius:7px;
  background:#fff; color:var(--navy); font-size:12.5px; font-family:inherit; outline:none; }
:where(.crm-app) .sw-addform input:focus, :where(.crm-app) .sw-addform select:focus { border-color:var(--teal); }
:where(.crm-app) .sw-addform .btns { display:flex; gap:6px; margin-top:2px; }
:where(.crm-app) .sw-addform .btns button { flex:1; padding:7px; border-radius:7px; font-size:12px; font-weight:700; cursor:pointer;
  border:1px solid var(--border-strong); background:#fff; color:var(--navy); font-family:inherit; }
:where(.crm-app) .sw-addform .btns .go { background:var(--teal); border-color:var(--teal); color:#fff; }
:where(.crm-app) .sw-toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(16px); opacity:0; background:var(--navy);
  color:#fff; padding:9px 15px; border-radius:9px; font-size:12.5px; box-shadow:0 8px 26px rgba(11,35,57,.3);
  transition:opacity .2s,transform .2s; pointer-events:none; z-index:60; }
:where(.crm-app) .sw-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
:where(.crm-app) .sw-toast.err { background:#c2453f; }

/* Account status pill + search-attach ("+ Add account") */
:where(.crm-app) .sw-acct.sw-inactive { opacity:.55; }
:where(.crm-app) .sw-astatus { margin-left:auto; flex-shrink:0; white-space:nowrap; font-size:8.5px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; padding:2px 6px; border-radius:5px; }
:where(.crm-app) .sw-astatus.on { background:#e7f5ee; color:#1a9e6b; }
:where(.crm-app) .sw-astatus.off { background:#fbe9e8; color:#c2453f; }
:where(.crm-app) .sw-aa-results { max-height:190px; overflow-y:auto; margin:2px 0; display:flex; flex-direction:column; gap:5px; }
:where(.crm-app) .sw-aa-hit { display:flex; align-items:center; gap:8px; padding:6px 8px; border:1px solid var(--border); border-radius:8px; }
:where(.crm-app) .sw-aa-hit .nm { font-weight:600; font-size:12px; color:var(--navy); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
:where(.crm-app) .sw-aa-hit .mt { font-size:10px; color:var(--text-tertiary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
:where(.crm-app) .sw-aa-hit .go { flex:0 0 auto; padding:5px 10px; border-radius:6px; font-size:11.5px; font-weight:700; border:1px solid var(--teal); background:var(--teal); color:#fff; cursor:pointer; }
:where(.crm-app) .sw-aa-msg { font-size:11.5px; color:var(--text-tertiary); padding:4px 2px; }
:where(.crm-app) .sw-aa-hint { font-size:10.5px; color:var(--text-tertiary); margin-top:2px; line-height:1.4; }
:where(.crm-app) .sw-aa-hint a { color:var(--teal-dark); }
:where(.crm-app) .sw-portal { margin-left:auto; color:var(--teal-dark); text-decoration:none; font-size:10.5px; font-weight:600; white-space:nowrap; }
:where(.crm-app) .sw-portal:hover { text-decoration:underline; }

/* CRM → Portal "Client Portal" dropdown (client-detail header) */
:where(.crm-app) .crm-portal-menu { display:none; position:absolute; right:0; top:calc(100% + 4px); background:#fff;
  border:1px solid var(--border-strong); border-radius:8px; box-shadow:0 8px 26px rgba(11,35,57,.14);
  z-index:50; min-width:230px; padding:4px; }
:where(.crm-app) .crm-portal-item { padding:8px 10px; font-size:12.5px; color:var(--navy); border-radius:6px; cursor:pointer; white-space:nowrap; }
:where(.crm-app) .crm-portal-item:hover { background:var(--neutral-fill); }

/* entity owners row */
:where(.crm-app) .sw-owners { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin-top:10px; padding-top:9px; border-top:1px solid var(--border); }
:where(.crm-app) .sw-owners-lbl { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--text-tertiary); margin-right:2px; }
:where(.crm-app) .sw-owner-chip { font-size:11px; font-weight:600; color:var(--navy); background:var(--neutral-fill); border-radius:20px; padding:2px 9px; display:inline-flex; align-items:center; gap:5px; }
:where(.crm-app) .sw-owner-chip.primary { background:rgba(0,141,149,.12); color:#006970; }
:where(.crm-app) .sw-owner-chip .rm { cursor:pointer; color:var(--text-tertiary); font-weight:700; }
:where(.crm-app) .sw-owner-chip .rm:hover { color:#c2453f; }
/* the primary chip's control CHANGES the owner (it doesn't delete) — teal, not red. */
:where(.crm-app) .sw-owner-chip.primary .rm { color:rgba(0,105,112,.55); font-size:12px; }
:where(.crm-app) .sw-owner-chip.primary .rm:hover { color:var(--teal-dark); }
:where(.crm-app) .sw-addowner { font-size:11px; font-weight:700; color:var(--teal-dark); cursor:pointer; }
:where(.crm-app) .sw-addowner:hover { text-decoration:underline; }
:where(.crm-app) .sw-owner-search, :where(.crm-app) .sw-rel-search { flex-basis:100%; margin-top:5px; }
:where(.crm-app) .sw-owner-search input, :where(.crm-app) .sw-rel-search input { width:100%; padding:6px 8px; border:1px solid var(--teal); border-radius:7px; background:#fff; color:var(--navy); font-size:12px; font-family:inherit; outline:none; }
/* which action the owner search panel is performing (add co-owner vs change primary) */
:where(.crm-app) .sw-oo-mode { font-size:10px; font-weight:800; letter-spacing:.6px; text-transform:uppercase; color:var(--teal-dark); margin-bottom:4px; }
/* inline "create a new contact" form inside the owner panel */
:where(.crm-app) .sw-oo-new { margin-top:6px; padding:8px; border:1px solid var(--border-strong); border-radius:8px; background:var(--neutral-fill); display:flex; flex-direction:column; gap:6px; }
:where(.crm-app) .sw-oo-new input { width:100%; padding:6px 8px; border:1px solid var(--border-strong); border-radius:6px; background:#fff; color:var(--navy); font-size:12px; font-family:inherit; outline:none; }
:where(.crm-app) .sw-oo-new input:focus { border-color:var(--teal); }
:where(.crm-app) .sw-oo-new .btns { display:flex; justify-content:flex-end; gap:6px; }
:where(.crm-app) .sw-oo-new .btns button { padding:5px 10px; border-radius:6px; font-size:11.5px; font-weight:700; font-family:inherit; cursor:pointer; border:1px solid var(--border-strong); background:#fff; color:var(--text-secondary); }
:where(.crm-app) .sw-oo-new .btns .go { border-color:var(--teal); background:var(--teal); color:#fff; }

/* group toolbar + related people (workspace-level) */
:where(.crm-app) .sw-grouptool { max-width:760px; margin:0 auto 4px; }
:where(.crm-app) .sw-toolbtn { background:var(--bg-card); border:1px solid var(--border-strong); border-radius:9px; padding:8px 14px; font-size:12.5px; font-weight:600; color:var(--teal-dark); cursor:pointer; font-family:inherit; }
:where(.crm-app) .sw-toolbtn:hover { border-color:var(--teal); background:var(--neutral-fill); }
:where(.crm-app) .sw-grouptool > input { width:100%; max-width:420px; padding:7px 10px; border:1px solid var(--teal); border-radius:8px; background:#fff; color:var(--navy); font-size:13px; font-family:inherit; outline:none; }
:where(.crm-app) .sw-related { max-width:760px; margin:22px auto 0; border-top:1px solid var(--border); padding-top:14px; }
:where(.crm-app) .sw-related-h { font-size:11px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; color:var(--text-tertiary); margin-bottom:9px; }
:where(.crm-app) .sw-related-body { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
:where(.crm-app) .sw-rel-chip { font-size:12px; font-weight:600; color:var(--navy); background:var(--neutral-fill); border-radius:20px; padding:3px 11px; display:inline-flex; align-items:center; gap:6px; }
:where(.crm-app) .sw-rel-chip .rt { font-size:10px; color:var(--text-tertiary); text-transform:capitalize; }
:where(.crm-app) .sw-rel-chip .rm { cursor:pointer; color:var(--text-tertiary); font-weight:700; }
:where(.crm-app) .sw-rel-chip .rm:hover { color:#c2453f; }
:where(.crm-app) .sw-rel-none { font-size:12px; color:var(--text-tertiary); }
:where(.crm-app) .sw-rel-type { font-size:11.5px; padding:4px 6px; border:1px solid var(--border-strong); border-radius:6px; font-family:inherit; }

/* Data Health hub */
:where(.crm-app) .dh-top { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
:where(.crm-app) .dh-topsub { font-size:12.5px; color:var(--text-secondary); margin-top:3px; }
:where(.crm-app) .dh-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:14px; }
:where(.crm-app) .dh-card { background:var(--bg-card); border:1px solid var(--border); border-radius:12px; padding:14px 15px; }
:where(.crm-app) .dh-card-h { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px; }
:where(.crm-app) .dh-card-title { font-size:14px; font-weight:700; color:var(--navy); }
:where(.crm-app) .dh-card-sub { font-size:11.5px; color:var(--text-tertiary); margin-top:2px; }
:where(.crm-app) .dh-count { font-family:'DM Serif Display',Georgia,serif; font-size:26px; font-weight:600; line-height:1; color:var(--text-tertiary); }
:where(.crm-app) .dh-count.warn { color:#b8791b; } :where(.crm-app) .dh-count.ok { color:#1a9e6b; }
/* "bad" = money is unattached right now — louder than warn, this one costs the client. */
:where(.crm-app) .dh-count.bad { color:#c2453f; }
:where(.crm-app) .dh-list { max-height:300px; overflow:auto; display:flex; flex-direction:column; gap:6px; }
:where(.crm-app) .dh-grp { border:1px solid var(--border); border-radius:8px; padding:8px; }
:where(.crm-app) .dh-grp-nm { font-size:12px; font-weight:700; color:var(--navy); margin-bottom:5px; }
:where(.crm-app) .dh-grp-c { color:var(--text-tertiary); font-weight:600; }
:where(.crm-app) .dh-item { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 9px; border-radius:7px; text-decoration:none; color:var(--navy); font-size:12.5px; background:var(--neutral-fill); }
:where(.crm-app) .dh-item:hover { background:rgba(0,141,149,.1); }
:where(.crm-app) .dh-item .dh-meta { color:var(--text-tertiary); font-size:11px; white-space:nowrap; }
:where(.crm-app) .dh-empty { font-size:12.5px; color:var(--text-tertiary); padding:6px 2px; }
:where(.crm-app) .dh-note { font-size:12px; color:var(--text-secondary); line-height:1.5; }
:where(.crm-app) .dh-note a { color:var(--teal-dark); font-weight:600; }
/* orphaned-account rows: two-line (account name + provider·number) with the value
   on the right, red — it is money currently attached to nobody. */
:where(.crm-app) .dh-item.dh-orph { align-items:flex-start; background:#fdf3f2; }
:where(.crm-app) .dh-item.dh-orph:hover { background:#fbe9e8; }
:where(.crm-app) .dh-item.dh-orph > span:first-child { display:flex; flex-direction:column; gap:2px; min-width:0; }
:where(.crm-app) .dh-orph-acct { font-size:10.5px; color:var(--text-tertiary); font-weight:600; }
:where(.crm-app) .dh-meta.dh-orph-val { color:#c2453f; font-weight:800; font-size:12px; }
/* unlinked-brokerage rows: account + period on the left, $ and the fix on the right */
:where(.crm-app) .dh-item.dh-brok { align-items:center; }
:where(.crm-app) .dh-item.dh-brok > span:first-child { display:flex; flex-direction:column; gap:1px; min-width:0; }
:where(.crm-app) .dh-brok-meta { font-size:10.5px; color:var(--text-tertiary); font-weight:600; }
:where(.crm-app) .dh-brok-right { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
:where(.crm-app) .dh-brok-val { font-size:12px; font-weight:800; color:#b8791b; font-variant-numeric:tabular-nums; }
:where(.crm-app) .dh-brok-act { font-size:10.5px; font-weight:700; color:var(--text-tertiary); white-space:nowrap; }
:where(.crm-app) .dh-brok-act.go { padding:4px 9px; border-radius:6px; border:1px solid var(--teal);
  background:var(--teal); color:#fff; text-decoration:none; }
:where(.crm-app) .dh-brok-act.go:hover { background:var(--teal-dark); border-color:var(--teal-dark); }
:where(.crm-app) .dh-keep { font-size:8.5px; font-weight:800; letter-spacing:.4px; background:rgba(0,141,149,.14); color:#006970; padding:1px 5px; border-radius:4px; vertical-align:middle; }
:where(.crm-app) .dh-merge-btn { margin-top:8px; width:100%; padding:7px; border-radius:7px; font-size:12px; font-weight:700; cursor:pointer; border:1px solid var(--teal); background:var(--teal); color:#fff; font-family:inherit; }
:where(.crm-app) .dh-merge-btn:hover { background:var(--teal-dark); }

/* Entity owners (multi-owner: joint / SMSF / company) */
:where(.crm-app) .sw-owners { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin-top:10px; padding-top:9px; border-top:1px solid var(--border); }
:where(.crm-app) .sw-owners-lbl { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--text-tertiary); margin-right:2px; }
:where(.crm-app) .sw-owner-chip { font-size:11px; font-weight:600; color:var(--navy); background:var(--neutral-fill); border-radius:20px; padding:2px 9px; display:inline-flex; align-items:center; gap:5px; }
:where(.crm-app) .sw-owner-chip.primary { background:rgba(0,141,149,.12); color:#006970; }
:where(.crm-app) .sw-owner-chip .rm { cursor:pointer; color:var(--text-tertiary); font-weight:700; }
:where(.crm-app) .sw-owner-chip .rm:hover { color:#c2453f; }
:where(.crm-app) .sw-addowner { font-size:11px; font-weight:700; color:var(--teal-dark); cursor:pointer; }
:where(.crm-app) .sw-addowner:hover { text-decoration:underline; }
:where(.crm-app) .sw-owner-search { flex-basis:100%; margin-top:5px; }
:where(.crm-app) .sw-owner-search input { width:100%; padding:6px 8px; border:1px solid var(--teal); border-radius:7px; background:#fff; color:var(--navy); font-size:12px; font-family:inherit; outline:none; }

/* ── Portal Access funnel (/crm/portal-access) ────────────────────────────────
   One row per PERSON through the invite funnel. Stage chips are the filter; the
   table columns change per stage. See docs/systems/PORTAL_ACCESS_BUILD_SCOPE.md. */
:where(.crm-app) .pa-head { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:12px; margin-bottom:14px; }
:where(.crm-app) .pa-controls { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
:where(.crm-app) .pa-seg { display:flex; background:#fff; border:1px solid var(--border); border-radius:9px; padding:3px; align-items:center; }
:where(.crm-app) .pa-seg button { border:0; background:none; font:inherit; font-size:12.5px; cursor:pointer; padding:6px 12px; border-radius:6px; color:var(--text-secondary); white-space:nowrap; }
:where(.crm-app) .pa-seg button.on { background:var(--navy); color:#fff; font-weight:600; }
:where(.crm-app) .pa-seg .k { font-size:9.5px; letter-spacing:.7px; font-weight:700; color:var(--teal); padding:0 7px 0 5px; }
:where(.crm-app) .pa-search { border:1px solid var(--border); border-radius:9px; padding:7px 11px; font-family:inherit; font-size:12.5px; color:var(--navy); outline:none; min-width:190px; }
:where(.crm-app) .pa-search:focus { border-color:var(--teal); }

:where(.crm-app) .pa-funnel { display:flex; align-items:stretch; overflow-x:auto; margin-bottom:6px; }
:where(.crm-app) .pa-stage { flex:1 1 0; min-width:118px; background:#fff; border:1px solid var(--border); padding:11px 12px; cursor:pointer; text-align:left; font-family:inherit; }
:where(.crm-app) .pa-stage:first-child { border-radius:11px 0 0 11px; }
:where(.crm-app) .pa-stage:last-child { border-radius:0 11px 11px 0; }
:where(.crm-app) .pa-stage + .pa-stage { border-left:0; }
:where(.crm-app) .pa-stage:hover { background:#FAFBFB; }
:where(.crm-app) .pa-stage .n { font-size:22px; font-weight:700; letter-spacing:-.4px; line-height:1.15; color:var(--navy); display:block; }
:where(.crm-app) .pa-stage .l { font-size:10px; color:var(--text-tertiary); font-weight:700; letter-spacing:.5px; text-transform:uppercase; margin-top:3px; display:block; }
:where(.crm-app) .pa-stage.act { background:#FFFBF5; border-color:#F0C9A4; }
:where(.crm-app) .pa-stage.act .n { color:#B45309; }
:where(.crm-app) .pa-stage.on { background:var(--navy); border-color:var(--navy); }
:where(.crm-app) .pa-stage.on .n { color:#fff; }
:where(.crm-app) .pa-stage.on .l { color:rgba(255,255,255,.72); }
:where(.crm-app) .pa-gate { font-size:12px; color:var(--text-secondary); margin:8px 0 14px; line-height:1.55; }
:where(.crm-app) .pa-gate b { color:var(--navy); }

:where(.crm-app) .pa-table { width:100%; border-collapse:collapse; font-size:13px; }
:where(.crm-app) .pa-table th { text-align:left; font-size:10px; letter-spacing:.9px; text-transform:uppercase; color:var(--text-tertiary); font-weight:700; padding:9px 12px; border-bottom:1px solid var(--border); white-space:nowrap; background:#FAFBFB; }
:where(.crm-app) .pa-table td { padding:10px 12px; border-bottom:1px solid #F0F1F1; vertical-align:middle; }
:where(.crm-app) .pa-table tr:last-child td { border-bottom:0; }
:where(.crm-app) .pa-table tbody tr:hover { background:#FAFBFB; }
:where(.crm-app) .pa-who { font-weight:600; color:var(--navy); }
:where(.crm-app) .pa-mail { color:var(--text-secondary); font-size:12px; word-break:break-all; }
:where(.crm-app) .pa-dim { color:var(--text-tertiary); font-size:12px; }
:where(.crm-app) .pa-nw { white-space:nowrap; }
:where(.crm-app) .pa-pill { display:inline-block; font-size:10.5px; font-weight:700; padding:3px 8px; border-radius:20px; white-space:nowrap; margin-right:4px; }
:where(.crm-app) .pa-green { background:#DCFAE6; color:#067647; }
:where(.crm-app) .pa-amber { background:#FEF3C7; color:#B45309; }
:where(.crm-app) .pa-red { background:#FEE4E2; color:#B42318; }
:where(.crm-app) .pa-grey { background:var(--neutral-fill); color:var(--text-secondary); }
:where(.crm-app) .pa-blue { background:#EFF4FF; color:#175CD3; }
:where(.crm-app) .pa-bar { height:5px; background:var(--teal); border-radius:3px; opacity:.75; display:inline-block; vertical-align:middle; margin-right:6px; }
:where(.crm-app) .pa-empty { padding:30px; text-align:center; color:var(--text-tertiary); font-size:13px; }
:where(.crm-app) .pa-pager { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; border-top:1px solid var(--border); font-size:12px; color:var(--text-tertiary); }
:where(.crm-app) .pa-pager button { background:#fff; border:1px solid var(--border-strong); border-radius:7px; padding:5px 11px; font-family:inherit; font-size:12px; color:var(--navy); cursor:pointer; }
:where(.crm-app) .pa-pager button:disabled { opacity:.4; cursor:default; }
:where(.crm-app) .pa-note { background:#FFFBF5; border:1px solid #F0C9A4; border-radius:10px; padding:10px 13px; font-size:12px; color:#7C4A11; line-height:1.55; margin-top:12px; }
:where(.crm-app) .pa-note b { color:#B45309; }
:where(.crm-app) .pa-acts { text-align:right; }
:where(.crm-app) .pa-acts .btn-mini, :where(.crm-app) .pa-acts .crm-hb-btn { margin-left:6px; }
:where(.crm-app) .pa-acts .btn-mini:hover { border-color:var(--teal); color:var(--teal); }
:where(.crm-app) .pa-acts .btn-mini.pa-primary { background:var(--teal); border-color:var(--teal); color:#fff; }
:where(.crm-app) .pa-acts .btn-mini.pa-primary:hover { background:var(--teal-dark); border-color:var(--teal-dark); color:#fff; }
:where(.crm-app) .pa-acts .btn-mini:disabled { opacity:.5; cursor:default; }
/* The bulk "restart 30 days" control sits in the stage note, not the actions cell,
   so it needs its own primary styling — .pa-primary is otherwise scoped to .pa-acts. */
:where(.crm-app) .pa-note .btn-mini.pa-primary { background:var(--teal); border-color:var(--teal); color:#fff; cursor:pointer; }
:where(.crm-app) .pa-note .btn-mini.pa-primary:hover { background:var(--teal-dark); border-color:var(--teal-dark); }
:where(.crm-app) .pa-note .btn-mini.pa-primary:disabled { opacity:.5; cursor:default; }
/* Ready to hand back (Insight Sales): the cold-lead toggle and the row hint. Red,
   not amber: the funnel's amber already means "hot, act on this". */
:where(.crm-app) .is-ready-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:10px 0 2px; }
:where(.crm-app) .is-ready-toggle { display:inline-flex; align-items:center; gap:7px; background:#fff; border:1px solid #E6B8B2; color:#A93226; border-radius:20px; padding:4px 12px 4px 5px; font:inherit; font-size:12.5px; font-weight:600; cursor:pointer; }
:where(.crm-app) .is-ready-toggle .n { background:#FBEDEB; border-radius:12px; padding:1px 8px; font-weight:700; font-variant-numeric:tabular-nums; }
:where(.crm-app) .is-ready-toggle:hover { border-color:#C0392B; }
:where(.crm-app) .is-ready-toggle.on { background:#A93226; border-color:#A93226; color:#fff; }
:where(.crm-app) .is-ready-toggle.on .n { background:rgba(255,255,255,.2); }
:where(.crm-app) .is-ready-toggle:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(192,57,43,.25); }
:where(.crm-app) .is-ready-hint { font-size:11px; font-weight:600; color:#A93226; margin-bottom:5px; white-space:nowrap; }

/* Portal Access — mark-inactive modal */
:where(.crm-app) .pa-modal-wrap { position:fixed; inset:0; background:rgba(11,35,57,.45); display:flex; align-items:center; justify-content:center; z-index:9000; padding:20px; }
:where(.crm-app) .pa-modal { background:#fff; border-radius:12px; padding:22px 24px; width:min(480px,100%); box-shadow:0 18px 48px rgba(11,35,57,.28); }
:where(.crm-app) .pa-modal h3 { font-family:'DM Serif Display',Georgia,serif; font-weight:500; font-size:18px; color:var(--navy); margin-bottom:6px; }
:where(.crm-app) .pa-modal p { font-size:12.5px; line-height:1.55; margin-bottom:14px; }
:where(.crm-app) .pa-lbl { display:block; font-size:11.5px; font-weight:700; color:var(--text-secondary); margin:10px 0 4px; }
:where(.crm-app) .pa-input { width:100%; box-sizing:border-box; border:1px solid var(--border-strong); border-radius:8px; padding:8px 10px; font-family:inherit; font-size:13px; color:var(--navy); outline:none; background:#fff; }
:where(.crm-app) .pa-input:focus { border-color:var(--teal); }
:where(.crm-app) textarea.pa-input { resize:vertical; }
:where(.crm-app) .pa-x-err { color:#B42318; font-size:12px; min-height:16px; margin-top:7px; }
:where(.crm-app) .pa-modal-acts { display:flex; justify-content:flex-end; gap:8px; margin-top:6px; }

/* Portal Access — the Setup Queue checklist, inline on a lead_setup row */
:where(.crm-app) .pa-setup { display:flex; flex-direction:column; gap:8px; min-width:300px; }
:where(.crm-app) .pa-setup-items { display:flex; flex-direction:column; gap:5px; }
:where(.crm-app) .pa-chk { display:flex; align-items:flex-start; gap:8px; font-size:12.5px; color:var(--text-secondary); cursor:pointer; line-height:1.4; }
:where(.crm-app) .pa-chk input { margin:2px 0 0; accent-color:var(--teal); cursor:pointer; flex:0 0 auto; }
:where(.crm-app) .pa-chk.on { color:var(--navy); font-weight:600; }
:where(.crm-app) .pa-setup-acts { display:flex; gap:7px; }
:where(.crm-app) .pa-setup-acts .btn-mini.pa-primary { background:var(--teal); border-color:var(--teal); color:#fff; }
:where(.crm-app) .pa-setup-acts .btn-mini.pa-primary:hover { background:var(--teal-dark); border-color:var(--teal-dark); color:#fff; }
:where(.crm-app) .pa-setup-acts .btn-mini:disabled { opacity:.45; cursor:default; }
:where(.crm-app) .pa-setup-acts .btn-mini:disabled:hover { border-color:var(--border-strong); color:var(--navy); }

/* Insight Sales — warmth band */
:where(.crm-app) .is-band { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; padding:3px 9px; border-radius:20px; }
:where(.crm-app) .is-hot  { background:#FEE4E2; color:#B42318; }
:where(.crm-app) .is-warm { background:#FEF3C7; color:#B45309; }
:where(.crm-app) .is-cold { background:var(--neutral-fill); color:var(--text-tertiary); }
:where(.crm-app) .is-link { color:var(--navy); text-decoration:none; border-bottom:1px solid transparent; }
:where(.crm-app) .is-link:hover { color:var(--teal); border-bottom-color:var(--teal); }

/* ── CRM Dashboard — the "what needs me today" tile board ──────────────────────
   One grid per group, auto-fill so new tiles drop in without a layout change
   (the board is expected to keep growing). Status colour is carried on a left
   accent bar + the number, never on the card background: a wall of red panels
   stops reading as urgent, a red number never does. */
:where(.crm-app) .dash-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(238px, 1fr)); gap:12px; margin-bottom:20px; }
:where(.crm-app) .dash-tile { position:relative; display:block; background:var(--bg-card); border:1px solid var(--border);
  border-left:4px solid var(--warm-grey); border-radius:12px; padding:14px 16px 13px; text-decoration:none;
  color:inherit; transition:border-color .12s, box-shadow .12s, transform .12s; }
:where(.crm-app) a.dash-tile:hover { box-shadow:0 3px 12px rgba(11,35,57,.09); transform:translateY(-1px); }
:where(.crm-app) .dash-tile-head { display:flex; align-items:center; gap:7px; margin-bottom:9px; }
:where(.crm-app) .dash-tile-head i { font-size:15px; color:var(--text-tertiary); flex:0 0 auto; }
:where(.crm-app) .dash-tile-label { font-size:12px; font-weight:700; color:var(--navy); line-height:1.3; }
:where(.crm-app) .dash-value { font-size:30px; font-weight:700; line-height:1; color:var(--navy); letter-spacing:-.5px; }
:where(.crm-app) .dash-unit { font-size:11.5px; font-weight:600; color:var(--text-tertiary); margin-left:6px; }
:where(.crm-app) .dash-sub { margin-top:7px; font-size:11.5px; color:var(--text-secondary); line-height:1.4; }
:where(.crm-app) .dash-go { position:absolute; top:13px; right:13px; font-size:14px; color:var(--border-strong); }
:where(.crm-app) a.dash-tile:hover .dash-go { color:var(--teal); }

/* Status. Green is deliberately quiet — "nothing to do here" should not compete
   with the things that do need doing. */
:where(.crm-app) .dash-tile.st-urgent  { border-left-color:#c0392b; }
:where(.crm-app) .dash-tile.st-urgent  .dash-value { color:#c0392b; }
:where(.crm-app) .dash-tile.st-warn    { border-left-color:#C67A00; }
:where(.crm-app) .dash-tile.st-warn    .dash-value { color:#C67A00; }
:where(.crm-app) .dash-tile.st-ok      { border-left-color:#1F9D57; }
:where(.crm-app) .dash-tile.st-ok      .dash-value { color:var(--navy); }
:where(.crm-app) .dash-tile.st-info    { border-left-color:var(--teal); }
:where(.crm-app) .dash-tile.st-unknown { border-left-color:var(--warm-grey); }
:where(.crm-app) .dash-tile.st-unknown .dash-value, :where(.crm-app) .dash-tile.st-unknown .dash-sub { color:var(--text-tertiary); }

/* Group heading + the board's own header row */
:where(.crm-app) .dash-group-head { display:flex; align-items:center; gap:10px; margin:0 2px 10px; }
:where(.crm-app) .dash-group-head .section-label { white-space:nowrap; }
:where(.crm-app) .dash-group-rule { flex:1; height:1px; background:var(--border); }
:where(.crm-app) .dash-top { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap; }
:where(.crm-app) .dash-scope { display:inline-flex; border:1px solid var(--border-strong); border-radius:7px; overflow:hidden; }
:where(.crm-app) .dash-scope button { background:#fff; border:none; font:inherit; font-size:12.5px; font-weight:600; color:var(--text-secondary);
  padding:6px 13px; cursor:pointer; }
:where(.crm-app) .dash-scope button.on { background:var(--teal); color:#fff; }
:where(.crm-app) .dash-scope button + button { border-left:1px solid var(--border-strong); }
:where(.crm-app) .dash-legend { display:flex; gap:14px; flex-wrap:wrap; font-size:11.5px; color:var(--text-tertiary); margin:2px 2px 16px; }
:where(.crm-app) .dash-legend span { display:inline-flex; align-items:center; gap:5px; }
:where(.crm-app) .dash-dot { width:9px; height:9px; border-radius:3px; display:inline-block; }

/* Skeleton shown while the counts load — same geometry as a real tile so the
   board does not jump when the numbers arrive. */
:where(.crm-app) .dash-tile.st-skeleton { border-left-color:var(--border); }
:where(.crm-app) .dash-skel { background:var(--neutral-fill); border-radius:5px; height:11px; }
:where(.crm-app) .dash-skel.big { height:26px; width:58%; margin-bottom:9px; }

/* ── Dashboard drill-down (batch 2) ────────────────────────────────────────
   The rows behind one box. Same status colours as the tile it came from, so
   the page reads as a continuation of the box you clicked rather than a new
   screen. Columns are server-defined (flex-grow per column), never fixed here. */
:where(.crm-app) .dtl-top { border-left:4px solid var(--border); }
:where(.crm-app) .dtl-top.st-urgent { border-left-color:#c0392b; }
:where(.crm-app) .dtl-top.st-urgent .dash-value { color:#c0392b; }
:where(.crm-app) .dtl-top.st-warn   { border-left-color:#C67A00; }
:where(.crm-app) .dtl-top.st-warn   .dash-value { color:#C67A00; }
:where(.crm-app) .dtl-top.st-ok     { border-left-color:#1F9D57; }
:where(.crm-app) .dtl-top.st-info   { border-left-color:var(--teal); }
:where(.crm-app) .dtl-top .section-label { display:inline-flex; align-items:center; gap:6px; }

:where(.crm-app) .dtl-reg { display:inline-flex; align-items:center; gap:6px; background:var(--navy); color:#fff;
  border-radius:7px; padding:7px 13px; font-size:12.5px; font-weight:600; text-decoration:none; white-space:nowrap; }
:where(.crm-app) .dtl-reg:hover { background:var(--teal-dark); }

:where(.crm-app) .dtl-search { display:flex; align-items:center; gap:8px; padding:10px 12px; border-bottom:1px solid var(--border-strong); color:var(--text-tertiary); }
:where(.crm-app) .dtl-search input { flex:1; border:1px solid var(--border-strong); border-radius:6px; padding:7px 10px;
  font:inherit; font-size:12.5px; color:var(--navy); background:#fff; }

:where(.crm-app) .dtl-head { display:flex; gap:12px; padding:7px 12px; font-size:10.5px; letter-spacing:.4px;
  color:var(--text-tertiary); border-bottom:1px solid var(--border-strong); }
:where(.crm-app) .dtl-row { display:flex; align-items:center; gap:12px; padding:11px 12px;
  border-bottom:1px solid var(--neutral-fill); text-decoration:none; color:inherit; }
:where(.crm-app) a.dtl-row:hover { background:var(--neutral-fill); }
:where(.crm-app) .dtl-cell { font-size:12.5px; color:var(--navy); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
:where(.crm-app) .dtl-cell.muted { color:var(--text-tertiary); }
:where(.crm-app) .dtl-go-col { width:16px; flex:0 0 16px; color:var(--text-tertiary); }
:where(.crm-app) .dtl-badge { display:inline-block; font-size:10.5px; font-weight:700; letter-spacing:.3px;
  color:var(--teal-dark); background:rgba(45,156,157,0.10); border:1px solid var(--teal);
  border-radius:5px; padding:2px 7px; white-space:nowrap; }
:where(.crm-app) .dtl-note { padding:10px 12px; font-size:12px; color:var(--text-secondary);
  border-top:1px solid var(--border-strong); display:flex; align-items:center; gap:7px; }

/* ── Lead Response: the call list, scoreboard and dialogs moved to
   static/shared/leadResponse.css (2026-10-16), loaded by both apps. ─ */
/* Lead Response — management view */
:where(.crm-app) .lr-amber { color:#B86E00; }
:where(.crm-app) .lr-mg-summary { display:flex; flex-wrap:wrap; gap:18px; font-size:12.5px; color:var(--navy); margin-bottom:12px; }
:where(.crm-app) .lr-mg-filters { display:flex; gap:8px; margin-bottom:10px; }
:where(.crm-app) .lr-mg-filters .lr-input { width:auto; min-width:180px; }
:where(.crm-app) .lr-mg-table td { vertical-align:top; }
:where(.crm-app) .lr-mg-table td:last-child { white-space:nowrap; }
:where(.crm-app) .lr-mg-table td:last-child .lr-btn + .lr-btn { margin-left:6px; }
:where(.crm-app) .lr-table tr.lr-sev-red td { background:#fdf3f2; }
:where(.crm-app) .lr-table tr.lr-sev-red td:first-child { box-shadow:inset 4px 0 0 #c0392b; }
:where(.crm-app) .lr-table tr.lr-sev-amber td { background:#fff8ec; }
:where(.crm-app) .lr-table tr.lr-sev-amber td:first-child { box-shadow:inset 4px 0 0 #E0A030; }
:where(.crm-app) .lr-table tr.lr-sev-review td:first-child { box-shadow:inset 4px 0 0 var(--text-tertiary); }
:where(.crm-app) .lr-table a { color:var(--navy); text-decoration:none; border-bottom:1px dashed rgba(11,35,57,.3); }
:where(.crm-app) .lr-status { font-weight:600; }
:where(.crm-app) .lr-tag { display:inline-block; font-size:10px; font-weight:700; color:#c0392b; border:1px solid #e3a39b; border-radius:4px; padding:0 5px; margin-left:4px; }
:where(.crm-app) .lr-tag-muted { color:var(--text-secondary); border-color:var(--border-strong); }

/* ── Lifecycle bar (client journey) ─────────────────────────────────────────────
   The ONE control that moves a person along Lead → Account opening → Client →
   Premium → Private, identical on the lead and client pages. Filled by
   crmLoadLifecycle() from GET …/lifecycle. docs/systems/CLIENT_CONVERSION_SCOPE.md §4. */
:where(.crm-app) .lc-card { padding:1.1rem 1.3rem 1rem; }
:where(.crm-app) .lc-loading { font-size:12.5px; color:var(--text-tertiary); display:flex; align-items:center; gap:6px; }
:where(.crm-app) .lc-steps { display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); list-style:none; margin:4px 0 14px; padding:0; }
:where(.crm-app) .lc-step { position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; }
:where(.crm-app) .lc-step::before { content:""; position:absolute; top:12px; left:-50%; width:100%; height:3px; background:var(--border); z-index:0; }
:where(.crm-app) .lc-step:first-child::before { display:none; }
:where(.crm-app) .lc-step.done::before, :where(.crm-app) .lc-step.now::before { background:var(--teal); }
:where(.crm-app) .lc-dot { position:relative; z-index:1; width:26px; height:26px; border-radius:50%; border:3px solid var(--border-strong); background:var(--bg-card);
  display:grid; place-items:center; font-size:12px; font-weight:800; color:var(--text-tertiary); }
:where(.crm-app) .lc-step.done .lc-dot { background:var(--teal); border-color:var(--teal); color:#fff; }
:where(.crm-app) .lc-step.now .lc-dot { border-color:var(--teal); color:var(--teal-dark); box-shadow:0 0 0 4px rgba(0,141,149,.15); }
:where(.crm-app) .lc-step-name { font-size:12.5px; font-weight:700; color:var(--warm-grey); line-height:1.25; }
:where(.crm-app) .lc-step.done .lc-step-name { color:var(--navy); }
:where(.crm-app) .lc-step.now .lc-step-name { color:var(--teal-dark); }
:where(.crm-app) .lc-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 16px; border-top:1px solid var(--border); padding-top:12px; }
:where(.crm-app) .lc-current { font-size:13.5px; color:var(--text-secondary); }
:where(.crm-app) .lc-current b { color:var(--navy); font-weight:800; }
:where(.crm-app) .lc-sub { color:var(--text-tertiary); font-size:12px; margin-left:4px; }
:where(.crm-app) .lc-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
:where(.crm-app) .lc-primary { padding:9px 16px; background:var(--teal); color:#fff; border:1px solid var(--teal); border-radius:8px; font:inherit; font-size:13px; font-weight:700; cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
:where(.crm-app) .lc-primary:hover { background:var(--teal-dark); border-color:var(--teal-dark); }
:where(.crm-app) .lc-primary:disabled { background:var(--neutral-fill); color:var(--text-tertiary); border-color:var(--border-strong); cursor:not-allowed; }
:where(.crm-app) .lc-primary:focus-visible, :where(.crm-app) .lc-more summary:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(0,141,149,.35); }
:where(.crm-app) .lc-reason { font-size:12px; color:var(--text-tertiary); flex-basis:100%; text-align:right; }
:where(.crm-app) .lc-more { position:relative; }
:where(.crm-app) .lc-more summary { list-style:none; cursor:pointer; padding:8px 12px; border:1px solid var(--border-strong); border-radius:8px; font-size:13px; font-weight:600; color:var(--navy); background:#fff; }
:where(.crm-app) .lc-more summary::-webkit-details-marker { display:none; }
:where(.crm-app) .lc-more[open] summary { background:var(--neutral-fill); }
:where(.crm-app) .lc-menu { position:absolute; right:0; top:calc(100% + 4px); z-index:20; min-width:250px; background:var(--bg-card); border:1px solid var(--border-strong); border-radius:8px; box-shadow:0 10px 30px rgba(11,35,57,.14); padding:4px; }
:where(.crm-app) .lc-menu button { display:block; width:100%; text-align:left; background:none; border:0; border-radius:6px; padding:8px 10px; font:inherit; font-size:13px; color:var(--navy); cursor:pointer; }
:where(.crm-app) .lc-menu button:hover:not(:disabled) { background:var(--neutral-fill); }
:where(.crm-app) .lc-menu button:disabled { color:var(--text-tertiary); cursor:not-allowed; }
:where(.crm-app) .lc-menu small { display:block; font-size:11px; color:var(--text-tertiary); }
:where(.crm-app) .lc-checks { display:flex; flex-wrap:wrap; gap:6px 18px; margin:0 0 12px; padding:10px 12px; background:var(--neutral-fill); border-radius:8px; font-size:12.5px; color:var(--text-secondary); }
:where(.crm-app) .lc-checks span { display:inline-flex; align-items:center; gap:5px; }
:where(.crm-app) .lc-checks .ti-circle-check { color:var(--teal); font-size:15px; }
:where(.crm-app) .lc-checks .ti-circle-dashed { color:var(--warm-grey); font-size:15px; }
:where(.crm-app) .lc-checks .ti-clock { color:#9a5b1f; font-size:15px; }
:where(.crm-app) .lc-checks button { background:none; border:0; padding:0; font:inherit; font-size:12.5px; font-weight:700; color:var(--teal); cursor:pointer; text-decoration:underline; }
:where(.crm-app) .lc-stuck { display:inline-block; font-size:10.5px; font-weight:800; letter-spacing:.8px; text-transform:uppercase; padding:1px 7px; border-radius:4px; background:#fbeaea; color:#a13434; vertical-align:1px; }
:where(.crm-app) .lc-setup { margin:0 0 12px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; }
:where(.crm-app) .lc-setup ul { list-style:none; margin:6px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; }
:where(.crm-app) .lc-setup li { display:flex; align-items:flex-start; gap:8px; font-size:13px; color:var(--navy); }
:where(.crm-app) .lc-setup li > span { flex:1; min-width:0; }
:where(.crm-app) .lc-setup small { display:block; font-size:11.5px; color:var(--text-tertiary); }
:where(.crm-app) .lc-setup i { font-size:16px; margin-top:1px; }
:where(.crm-app) .lc-su-done i { color:var(--teal); } :where(.crm-app) .lc-su-waiting i { color:#9a5b1f; } :where(.crm-app) .lc-su-todo i { color:var(--warm-grey); }
:where(.crm-app) .lc-setup button, :where(.crm-app) .lc-setup a { flex-shrink:0; background:#fff; border:1px solid var(--teal); color:var(--teal); border-radius:6px; padding:3px 10px;
  font:inherit; font-size:12px; font-weight:700; cursor:pointer; text-decoration:none; white-space:nowrap; }
:where(.crm-app) .lc-setup button:hover, :where(.crm-app) .lc-setup a:hover { background:rgba(0,141,149,.08); }
:where(.crm-app) .lc-deal { margin:0 0 8px; padding:8px 12px; border-radius:8px; background:#fdf1e7; color:#7a4515; font-size:12.5px; display:flex; gap:8px; align-items:center; }
:where(.crm-app) .lc-deal i { font-size:16px; }
:where(.crm-app) .lc-deal-late { background:#fbeaea; color:#a13434; }
:where(.crm-app) .lc-deal-interest { background:rgba(0,141,149,.08); color:var(--teal-dark); }
:where(.crm-app) .lc-warn { margin:0 0 12px; padding:10px 12px; border-radius:8px; background:#fdf1e7; color:#7a4515; font-size:12.5px; line-height:1.5; display:flex; gap:8px; }
:where(.crm-app) .lc-warn i { font-size:16px; margin-top:1px; }
/* Lifecycle modals: wider than the default crm-modal, same look. */
:where(.crm-app) .crm-modal.lc-modal { max-width:560px; max-height:calc(100vh - 40px); overflow-y:auto; }
:where(.crm-app) .lc-field { display:flex; flex-direction:column; gap:5px; margin-bottom:14px; }
:where(.crm-app) .lc-field > label, :where(.crm-app) .lc-field-label { font-size:11px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:var(--text-tertiary); }
:where(.crm-app) .lc-field input[type=text], :where(.crm-app) .lc-field input[type=email], :where(.crm-app) .lc-field input[type=tel], :where(.crm-app) .lc-field select {
  width:100%; padding:8px 10px; border:1px solid var(--border-strong); border-radius:6px; font:inherit; font-size:13px; color:var(--navy); background:#fff; }
:where(.crm-app) .lc-field input:focus, :where(.crm-app) .lc-field select:focus { outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(0,141,149,.18); }
:where(.crm-app) .lc-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
:where(.crm-app) .lc-tiers { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
:where(.crm-app) .lc-tier { position:relative; }
:where(.crm-app) .lc-tier input { position:absolute; opacity:0; }
:where(.crm-app) .lc-tier span { display:block; text-align:center; padding:10px 6px; border:1px solid var(--border-strong); border-radius:8px; font-size:13px; font-weight:700; color:var(--navy); cursor:pointer; }
:where(.crm-app) .lc-tier input:checked + span { border-color:var(--teal); background:rgba(0,141,149,.08); color:var(--teal-dark); box-shadow:inset 0 0 0 1px var(--teal); }
:where(.crm-app) .lc-tier input:focus-visible + span { box-shadow:0 0 0 3px rgba(0,141,149,.35); }
:where(.crm-app) .lc-people { width:100%; border-collapse:collapse; font-size:13px; }
:where(.crm-app) .lc-people th { text-align:center; font-size:10.5px; font-weight:700; letter-spacing:.8px; text-transform:uppercase; color:var(--text-tertiary); padding:6px 4px; border-bottom:1px solid var(--border); }
:where(.crm-app) .lc-people th:first-child { text-align:left; }
:where(.crm-app) .lc-people td { padding:8px 4px; border-bottom:1px solid var(--neutral-fill); text-align:center; vertical-align:top; }
:where(.crm-app) .lc-people td:first-child { text-align:left; }
:where(.crm-app) .lc-people small { display:block; color:var(--text-tertiary); font-size:11.5px; }
:where(.crm-app) .lc-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
:where(.crm-app) .lc-list li { display:flex; gap:8px; align-items:flex-start; font-size:13px; color:var(--navy); }
:where(.crm-app) .lc-list i { font-size:16px; margin-top:1px; }
:where(.crm-app) .lc-ok { color:var(--teal); } :where(.crm-app) .lc-skip { color:var(--text-tertiary); } :where(.crm-app) .lc-fail { color:#c0392b; }
:where(.crm-app) .lc-list small { color:var(--text-tertiary); }
:where(.crm-app) .lc-note { font-size:12.5px; color:var(--text-secondary); line-height:1.55; margin:0 0 14px; }
@media (max-width:640px) {
  :where(.crm-app) .lc-step-name { font-size:11px; }
  :where(.crm-app) .lc-row, :where(.crm-app) .lc-tiers { grid-template-columns:1fr; }
  :where(.crm-app) .lc-reason { text-align:left; }
}
