/* לוח מלווה — caseload CRM. Master–detail over the portal's identity
   (Open Sans, deep teal + brass). Full-height shell with internal scroll. */

html, body { height: 100%; }
/* Professional consoles run a 16px base (the portal's 18px is an IS 5568 patient
   choice, wrong for a dense work tool — review finding). */
:root { font-size: 16px; }
.crm .btn, .crm .btn-primary, .crm .btn-ghost { min-height: 40px; padding: 8px 16px; font-size: .92rem; }
.crm { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- Page-load reveal (staggered, subtle) ---------- */
@keyframes reveal-up { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.ov-head    { animation: reveal-up .42s ease both; }
.kpi-strip  { animation: reveal-up .42s ease .07s both; }
.ov-grid > .ov-sec:nth-child(1) { animation: reveal-up .42s ease .14s both; }
.ov-grid > .ov-sec:nth-child(2) { animation: reveal-up .42s ease .2s both; }
.client-row.reveal-row { animation: reveal-up .4s ease both; animation-delay: calc(var(--i, 0) * 32ms + .18s); }
@media (prefers-reduced-motion: reduce) {
  .ov-head, .kpi-strip, .ov-sec, .client-row.reveal-row { animation: none !important; }
}

/* Top bar */
.crm-top { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 0 clamp(14px, 2.5vw, 26px); min-height: 52px; background: var(--surface); border-block-end: 1px solid var(--line); box-shadow: 0 1px 0 var(--line), 0 4px 14px rgba(9,40,45,.04); z-index: 2; }
.crm-top .brand { font-weight: 800; font-size: 1.08rem; display: inline-flex; align-items: center; gap: 8px; }
.brand-context { font-size: .78rem; font-weight: 700; color: var(--gold-ink); background: var(--gold-wash); border-radius: 999px; padding: 4px 11px; }
.crm-top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.demo-badge { font-size: .8rem; font-weight: 700; color: var(--gold-ink); background: var(--gold-wash); border-radius: 999px; padding: 6px 13px; }
.chip-name { font-size: .92rem; }

.crm-body { flex: 1 1 auto; display: flex; min-height: 0; }

/* Refined thin scrollbars */
.rail-list, .crm-pane { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.rail-list::-webkit-scrollbar, .crm-pane::-webkit-scrollbar { width: 10px; }
.rail-list::-webkit-scrollbar-thumb, .crm-pane::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid var(--surface); }
.rail-list::-webkit-scrollbar-thumb:hover, .crm-pane::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* ---------- Client rail ---------- */
.crm-rail { flex: 0 0 clamp(300px, 26vw, 360px); display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-inline-start: 1.5px solid var(--line); }
.rail-find { flex: 0 0 auto; padding: 14px 14px 10px; border-block-end: 1.5px solid var(--line); display: grid; gap: 10px; }
.search-wrap { position: relative; }
.search-ic { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); opacity: .55; font-size: .95rem; }
#search { width: 100%; font: inherit; font-weight: 600; padding: 12px 40px 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); color: var(--ink); min-height: 48px; }
#search:focus { border-color: var(--brand); background: var(--surface); }
.stage-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-chip { font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 999px; padding: 5px 11px; display: inline-flex; align-items: center; gap: 6px; }
.stage-chip:hover { border-color: var(--brand); }
.stage-chip.active { background: var(--brand); color: #fff; border-color: transparent; }
.chip-n { font-size: .72rem; opacity: .85; font-variant-numeric: tabular-nums; }
.rail-controls { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.ctl { display: grid; gap: 3px; flex: 1 1 0; }
.ctl-k { font-size: .68rem; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; }
.ctl select { font: inherit; font-weight: 600; font-size: .88rem; padding: 8px 10px; border: 1.5px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); min-height: 40px; }
.attn-toggle { font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); border-radius: 8px; padding: 8px 12px; min-height: 40px; }
.attn-toggle.on { background: var(--warn-wash); color: var(--warn); border-color: transparent; }
.rail-count { font-size: .8rem; color: var(--ink-faint); font-weight: 700; }
/* V4: advisor opens a case for a client */
.rail-open-client { width: 100%; margin-top: 8px; min-height: 42px; }
.open-client-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; align-items: end; }
.open-client-form .btn { min-height: 44px; grid-column: 1 / -1; justify-self: start; }
@media (max-width: 720px) { .open-client-form { grid-template-columns: 1fr 1fr; } }
.oc-note { margin-top: 12px; font-size: .88rem; border-inline-start: 2px solid var(--gold); padding-inline-start: 12px; max-width: 560px; }
.oc-pending .ar-why { color: var(--gold-ink); }

.rail-list { flex: 1 1 auto; overflow-y: auto; padding: 8px; display: grid; gap: 6px; align-content: start; }
.rail-empty { padding: 30px 16px; color: var(--ink-soft); text-align: center; }
.client-row { display: flex; align-items: center; gap: 12px; text-align: start; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; cursor: pointer; color: var(--ink); transition: transform .12s, border-color .15s, box-shadow .15s, background .15s; }
.client-row:hover { border-color: var(--line-strong); background: var(--surface-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.client-row.sel { border-color: var(--brand); background: var(--brand-wash); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.cr-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.cr-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.cr-name { font-weight: 800; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-sub { font-size: .84rem; color: var(--ink-soft); }
.cr-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.cr-flag { font-size: .72rem; font-weight: 700; color: var(--warn); background: var(--warn-wash); border-radius: 999px; padding: 2px 8px; }

/* Stage pills */
.cr-stage { flex: 0 0 auto; font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 2px 9px; }
.stage-new { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }
.stage-docs { background: var(--gold-wash); color: var(--gold-ink); }
.stage-submitted { background: var(--brand-wash); color: var(--brand-ink); }
.stage-committee { background: #dfe9f5; color: #29527f; }
.stage-appeal { background: var(--crit-wash); color: var(--crit); }
.stage-done { background: var(--ok-wash); color: var(--ok); }
@media (prefers-color-scheme: dark) { .stage-committee { background: #16324f; color: #9cc2ee; } }

/* Rings */
.ring-xs { width: 44px; height: 44px; flex: 0 0 auto; }
.ring-xs span { font-size: .74rem; }
.ring-warn { background: conic-gradient(var(--warn) calc(var(--pct)*1%), var(--line-strong) 0); }
.ring-warn span { color: var(--warn); }
.cw-ring { width: 64px; height: 64px; flex: 0 0 auto; }

/* ---------- Pane ---------- */
.crm-pane { flex: 1 1 auto; overflow-y: auto; min-width: 0; padding: clamp(14px, 2vw, 24px); }
.crm-pane .stat:nth-child(2) .stat-big { color: var(--crit); }
.crm-pane .stat:nth-child(4) .stat-big { color: var(--gold-ink); }

/* Overview — dense console */
.ov { max-width: 1180px; }
.ov-head { margin-bottom: 12px; }
.ov-head h1 { font-size: 1.4rem; font-weight: 800; margin: 0; }
.ov-sub { color: var(--ink-soft); font-size: .9rem; margin: 2px 0 0; }

/* KPI strip — one unified bar with hairline dividers, not four floating boxes */
.kpi-strip { display: flex; background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow); }
.kpi { flex: 1 1 0; padding: 12px 18px; display: flex; flex-direction: column; gap: 1px; border-inline-start: 1px solid var(--line); }
.kpi:first-child { border-inline-start: 0; }
.kpi b { font-size: 1.55rem; font-weight: 800; color: var(--brand-ink); line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi span { font-size: .8rem; color: var(--ink-soft); font-weight: 700; }
.kpi-warn b { color: var(--crit); }
.kpi-gold b { color: var(--gold-ink); }

.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ov-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.ov-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.ov-sec-h h2 { font-size: .95rem; font-weight: 800; margin: 0; }
.ov-sec-n { font-size: .8rem; color: var(--ink-faint); font-weight: 700; }

/* Pipeline — proportional bar (with glass sheen) + compact clickable cells */
.pipe-bar { position: relative; display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--surface-2); margin-bottom: 12px; box-shadow: inset 0 1px 2px rgba(9,40,45,.09); }
.pipe-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 60%); pointer-events: none; }
.pipe-seg { min-width: 5px; transition: flex-grow .35s ease; }
.pipe-cells { display: flex; gap: 6px; }
.pipe-cell { flex: 1 1 0; display: grid; gap: 2px; justify-items: center; padding: 8px 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; font: inherit; color: var(--ink); transition: transform .12s, border-color .15s, box-shadow .15s, background .15s; }
.pipe-cell:hover { border-color: var(--brand); background: var(--surface); transform: translateY(-1px); box-shadow: var(--shadow); }
.pipe-cell b { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pipe-cell > span:last-child { font-size: .66rem; color: var(--ink-soft); font-weight: 700; text-align: center; line-height: 1.1; }
.pipe-dot { width: 7px; height: 7px; border-radius: 50%; }

/* Attention — tight hairline-separated list */
.attn-list { display: flex; flex-direction: column; }
.attn-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--line); background: none; border-radius: 6px; cursor: pointer; font: inherit; color: var(--ink); text-align: start; }
.attn-row:first-child { border-top: 0; }
.attn-row:hover { background: var(--surface-2); }
.ar-name { font-weight: 700; font-size: .92rem; }
.ar-why { font-size: .8rem; color: var(--warn); white-space: nowrap; }
.ov-note { color: var(--ink-faint); font-size: .82rem; margin: 14px 0 0; }
/* Overview access panel (mockup v5 p13): pending access requests + RBAC model. */
.ov-access { margin-top: 14px; }
.ar-req { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-top: 1px solid var(--line); }
.ar-req:first-child { border-top: 0; }
.ar-req .ar-why { color: var(--gold-ink); display: inline-flex; align-items: center; gap: 5px; }
.ar-cap { margin-inline-start: auto; font-size: .74rem; font-weight: 800; color: var(--gold-ink); background: var(--gold-wash); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.ov-rbac { font-size: .88rem; color: var(--ink-soft); margin: 0; line-height: 1.6; }
.ov-rbac strong { color: var(--brand-ink); }

/* Stage segment colors (bar + cell dots) */
.seg-new { background: var(--line-strong); }
.seg-docs { background: var(--gold); }
.seg-submitted { background: var(--brand); }
.seg-committee { background: #6f9bd1; }
.seg-appeal { background: var(--crit); }
.seg-done { background: var(--ok); }

/* Client workspace */
.back-ov { margin-bottom: 10px; }
.cw-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-block-end: 1.5px solid var(--line); }
.cw-avatar { width: 44px; height: 44px; border-radius: 11px; background: linear-gradient(145deg, var(--brand), var(--brand-deep)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: 0 0 auto; box-shadow: 0 2px 6px rgba(9,40,45,.22), inset 0 1px 0 rgba(255,255,255,.15); }
.cw-id { flex: 1 1 auto; min-width: 0; }
.cw-id h1 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
.cw-meta { color: var(--ink-soft); font-size: .88rem; margin: 2px 0 0; }
.cw-stage { display: grid; gap: 3px; }
.cw-stage-k { font-size: .68rem; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; }
.cw-stage select { font: inherit; font-weight: 700; padding: 9px 12px; border: 1.5px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink); }
.cw-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; align-items: center; }
.qa { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .9rem; font-weight: 700; text-decoration: none; cursor: pointer; color: var(--brand-ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 15px; }
.qa:hover { border-color: var(--brand); background: var(--brand-wash); }
.qa-money { margin-inline-start: auto; font-weight: 800; color: var(--gold-ink); font-size: .95rem; }
.cw-tabs { display: flex; gap: 4px; border-block-end: 1.5px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.cw-tab { font: inherit; font-weight: 700; cursor: pointer; background: none; border: 0; color: var(--ink-soft); padding: 11px 16px; position: relative; white-space: nowrap; }
.cw-tab:hover { color: var(--ink); }
.cw-tab.active { color: var(--brand-ink); }
.cw-tab.active::after { content: ""; position: absolute; inset-inline: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--gold); }

/* Workspace tab content — advisor-scoped density (portal keeps its larger
   patient-facing sizing; here the detail view matches the tight overview) */
.crm-pane .dash-cols { gap: 14px; }
.crm-pane .col { gap: 14px; }
.crm-pane .card h2 { font-size: 1rem; }
.crm-pane .next-step { font-size: .98rem; }
.crm-pane .money-big { font-size: clamp(1.9rem, 5vw, 2.6rem); letter-spacing: -.02em; font-weight: 800; color: var(--gold-ink); }
.crm-pane .money-big.money-none { font-size: 1.1rem; font-weight: 700; color: var(--ink-soft); }
.crm-pane .money-per { font-size: .7rem; font-weight: 700; color: var(--ink-soft); margin-inline-start: 8px; }
.crm-pane .money-explain { font-size: .95rem; margin-top: 12px; }
.crm-pane .money-disc { font-size: .82rem; color: var(--ink-soft); margin-top: 8px; padding-inline-start: 12px; border-inline-start: 2px solid var(--line-strong); }
.crm-pane .docs-ready { margin-bottom: 13px; }
.crm-pane .docs-list { gap: 7px; }
.crm-pane .doc-row { padding: 10px 13px; gap: 11px; align-items: center; }
.crm-pane .doc-row input { width: 20px; height: 20px; margin-top: 0; }
.crm-pane .doc-label { font-size: .95rem; }
.crm-pane .alert-row { padding: 10px 12px; }
.crm-pane .fld { gap: 6px; font-size: .92rem; }
.crm-pane .fld input, .crm-pane .fld select { min-height: 42px; padding: 9px 12px; font-size: .95rem; border-width: 1px; }
.crm-pane .fld-check input { width: 20px; height: 20px; }
.crm-pane .money-inputs { gap: 12px; }

/* Tab content bits */
.task-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.task-list li { font-size: 1rem; display: flex; gap: 8px; }
.task-due { font-size: .8rem; color: var(--warn); font-weight: 700; }
.adv-rights { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.adv-rights li { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid var(--line); }
.adv-rights li:first-child { border-top: 0; padding-top: 0; }
.adv-rights li strong { font-size: 1.02rem; }
.adv-rights li span { color: var(--ink-soft); font-size: .9rem; }
.money-result { margin-top: 16px; padding-top: 16px; border-top: 3px solid var(--gold); }
.pk-sec2 { padding: 16px 0; border-top: 1.5px solid var(--line); }
.pk-sec2:first-child { border-top: 0; padding-top: 0; }
.pk-sec2 h3 { font-size: 1.08rem; font-weight: 800; color: var(--brand-ink); margin: 0 0 10px; }
.pk-sec2 ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.pk-sec2 li { display: flex; align-items: flex-start; gap: 10px; font-size: 1.02rem; line-height: 1.5; }
.pk-sec2 li::before { content: "•"; color: var(--gold); font-weight: 900; font-size: 1.3rem; line-height: 1.05; }
.prec li { display: grid; gap: 4px; }
.prec li::before { display: none; }
.prec-cite { font-weight: 800; font-size: 1rem; }
.prec-cite .ok { color: var(--ok); }
.prec-hold { color: var(--ink-soft); font-size: .95rem; }

/* Notes & tasks */
.note-form { display: grid; gap: 8px; margin-bottom: 14px; }
.note-form textarea { font: inherit; padding: 11px 13px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); color: var(--ink); resize: vertical; }
.note-form textarea:focus { border-color: var(--brand); background: var(--surface); }
.note-form button { justify-self: start; }
.notes-list { display: grid; gap: 10px; }
.note { background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.note p { margin: 0 0 6px; }
.note-meta { font-size: .78rem; color: var(--ink-faint); }
.task-mgr { display: grid; gap: 8px; }
.task-item { display: flex; align-items: center; gap: 10px; font-size: 1rem; cursor: pointer; }
.task-item input { width: 22px; height: 22px; accent-color: var(--brand); }
.task-item.done span { text-decoration: line-through; color: var(--ink-faint); }
.activity { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.activity li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.activity li:first-child { border-top: 0; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.act-at { font-size: .8rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* Responsive: stack rail + pane */
@media (max-width: 900px) {
  .crm-body { flex-direction: column; }
  .crm-rail { flex: 1 1 auto; border-inline-start: 0; }
  .crm-pane { display: none; }
  .crm.show-pane .crm-rail { display: none; }
  .crm.show-pane .crm-pane { display: block; }
  .demo-badge, .chip-name { display: none; }
}

@media print {
  .crm-top, .crm-rail, .cw-head, .cw-actions, .cw-tabs, .back-ov, .no-print { display: none !important; }
  .crm, .crm-body, .crm-pane { display: block; height: auto; overflow: visible; }
  .card { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff; }
}

/* Acting-for banner (the consent lens) */
.acting-banner { display: flex; align-items: center; gap: 8px; background: linear-gradient(180deg, var(--brand-wash), var(--surface)); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: .88rem; margin-bottom: 10px; box-shadow: var(--shadow); }
.acting-banner .ro { color: var(--warn); font-weight: 800; }

/* ---------- Advisor signup gate + provider role switch ---------- */
.advisor-gate { position: fixed; inset: 0; z-index: 90; background: var(--ground); display: grid; place-items: center; padding: 24px; }
.gate-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 28px; max-width: 420px; width: 100%; display: grid; gap: 12px; }
.gate-card h1 { font-size: 1.3rem; }
.gate-sep { text-align: center; color: var(--ink-faint); font-size: .85rem; margin: 4px 0; }
.gate-row { display: grid; }
.role-switch { display: inline-flex; gap: 2px; background: var(--surface-2); border-radius: 999px; padding: 2px; margin-inline-start: 10px; }
.role-btn { font: inherit; font-size: .8rem; font-weight: 600; border: 0; background: none; color: var(--ink-soft); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.role-btn.on { background: var(--brand-wash); color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand); }
.join-card { max-width: 720px; }
.oc-portal-facts { margin: 0; padding-inline-start: 20px; display: grid; gap: 10px; font-size: .95rem; max-width: 640px; }

/* Claim-form prep tab */
.cf-sec { padding: 6px 0; }
.cf-sec-h { font-size: 1rem; font-weight: 800; color: var(--brand-ink); margin: 12px 0 6px; display: flex; align-items: center; gap: 8px; }

/* Clinical info card (provider-recorded diagnoses + meds) */
.clin-row { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-block-end: 1px solid var(--line); flex-wrap: wrap; }
.clin-row:last-of-type { border-block-end: 0; }
.clin-k { font-weight: 700; color: var(--ink-soft); min-width: 110px; }
.clin-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.clin-chips .brief-chip { font-size: .8rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.clin-chips .brief-chip.meds { border-color: var(--gold); color: var(--gold-ink, var(--gold)); }

/* ---- Redesign v1.3 (mockup p6): caseload client table ---- */
.ov-table-sec { margin-top: 14px; }
.ct-wrap { display: grid; overflow-x: auto; }
.ct-head, .ct-row { display: grid; grid-template-columns: 2fr 1.3fr 1fr 1.4fr 1fr; gap: 12px; align-items: center; padding: 10px 12px; min-inline-size: 560px; }
.ct-head { font-size: .78rem; font-weight: 800; color: var(--ink-soft); border-block-end: 1.5px solid var(--line); }
.ct-row { background: none; border: 0; border-block-end: 1px solid var(--line); font: inherit; color: var(--ink); text-align: start; cursor: pointer; border-radius: 0; transition: background .12s; }
.ct-row:hover { background: var(--surface-2); }
.ct-row:last-child { border-block-end: 0; }
.ct-name { display: flex; align-items: center; gap: 9px; font-weight: 700; min-inline-size: 0; }
.ct-avatar { display: grid; place-items: center; inline-size: 30px; block-size: 30px; border-radius: 50%; background: var(--gold-wash); color: var(--gold-ink); font-weight: 800; font-size: .85rem; flex: 0 0 auto; }
.ct-track { color: var(--ink-soft); font-size: .88rem; }
.ct-stage { font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); white-space: nowrap; }
.ct-stage.stage-committee { background: var(--gold-wash); color: var(--gold-ink); }
.ct-stage.stage-done { background: var(--ok-wash); color: var(--ok); }
.ct-stage.stage-appeal { background: var(--crit-wash); color: var(--crit); }
.ct-stage.stage-submitted { background: var(--brand-wash); color: var(--brand-ink); }
.ct-ready { display: flex; align-items: center; gap: 8px; }
.ct-bar { flex: 1 1 auto; max-inline-size: 90px; }
.ct-pct { font-size: .8rem; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ct-money { font-weight: 700; color: var(--gold-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- Redesign v1.3 (mockup p7): client workspace metric cards ---- */
.cwm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.cwm { display: grid; justify-items: center; align-content: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 10px; box-shadow: var(--shadow); text-align: center; }
.cwm b { font-size: 1.45rem; font-weight: 800; color: var(--brand-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cwm-l { font-size: .78rem; color: var(--ink-soft); font-weight: 700; }
.cwm-ring { inline-size: 52px; block-size: 52px; }
.cwm-warn b { color: var(--warn); }
.cwm-crit b { color: var(--crit); }
.cwm-ok b { color: var(--ok); }
@media (max-width: 900px) { .cwm-grid { grid-template-columns: repeat(2, 1fr); } .ct-head, .ct-row { grid-template-columns: 2fr 1fr 1fr; } .ct-ready, .ct-head span:nth-child(4), .ct-row .ct-ready, .ct-head span:nth-child(5), .ct-money { display: none; } }
