/* One visible, theme-aware progression for customer status throughout the CRM. */
:root {
  --stage-new-accent:#64748b; --stage-new-bg:#f1f5f9; --stage-new-ink:#475569;
  --stage-research-accent:#2996cc; --stage-research-bg:#e5f5ff; --stage-research-ink:#165d85;
  --stage-attempted-accent:#4e78dd; --stage-attempted-bg:#edf0ff; --stage-attempted-ink:#344e9c;
  --stage-contacted-accent:#0c9caa; --stage-contacted-bg:#dff8f6; --stage-contacted-ink:#09636d;
  --stage-meeting-accent:#8c59d4; --stage-meeting-bg:#f2e9ff; --stage-meeting-ink:#6536a0;
  --stage-offer-accent:#d87923; --stage-offer-bg:#fff0dc; --stage-offer-ink:#93500a;
  --stage-won-accent:#d89b16; --stage-won-bg:#ffe6a0; --stage-won-ink:#704600;
  --stage-existing-accent:#159568; --stage-existing-bg:#ddf7e9; --stage-existing-ink:#116443;
  --stage-lost-accent:#a56e7c; --stage-lost-bg:#f8eaf0; --stage-lost-ink:#805465;
}
:root[data-theme='dark'] {
  --stage-new-accent:#94a3b8; --stage-new-bg:#243140; --stage-new-ink:#d2dce7;
  --stage-research-accent:#67c9f0; --stage-research-bg:#17374a; --stage-research-ink:#b5e6ff;
  --stage-attempted-accent:#90afff; --stage-attempted-bg:#263254; --stage-attempted-ink:#c8d7ff;
  --stage-contacted-accent:#58d3d5; --stage-contacted-bg:#173d40; --stage-contacted-ink:#a5f1ef;
  --stage-meeting-accent:#bf92f7; --stage-meeting-bg:#3a2850; --stage-meeting-ink:#e5ccff;
  --stage-offer-accent:#ffb66b; --stage-offer-bg:#48321e; --stage-offer-ink:#ffdbac;
  --stage-won-accent:#f4c84c; --stage-won-bg:#493b13; --stage-won-ink:#ffe9a3;
  --stage-existing-accent:#62d9a3; --stage-existing-bg:#183e30; --stage-existing-ink:#b0f1ce;
  --stage-lost-accent:#c591a2; --stage-lost-bg:#3c2c35; --stage-lost-ink:#edc4d1;
}
:is(.stage-new,[data-owned-status="new"],[data-team-status="new"],#leadStatus[data-customer-status="new"],.owned-company-card:has(.stage-new)) { --status-accent:var(--stage-new-accent); --status-bg:var(--stage-new-bg); --status-ink:var(--stage-new-ink); }
:is(.stage-research,[data-owned-status="research"],[data-team-status="research"],#leadStatus[data-customer-status="research"],.owned-company-card:has(.stage-research)) { --status-accent:var(--stage-research-accent); --status-bg:var(--stage-research-bg); --status-ink:var(--stage-research-ink); }
:is(.stage-attempted,[data-owned-status="attempted"],[data-team-status="attempted"],#leadStatus[data-customer-status="attempted"],.owned-company-card:has(.stage-attempted)) { --status-accent:var(--stage-attempted-accent); --status-bg:var(--stage-attempted-bg); --status-ink:var(--stage-attempted-ink); }
:is(.stage-contacted,[data-owned-status="contacted"],[data-team-status="contacted"],#leadStatus[data-customer-status="contacted"],.owned-company-card:has(.stage-contacted)) { --status-accent:var(--stage-contacted-accent); --status-bg:var(--stage-contacted-bg); --status-ink:var(--stage-contacted-ink); }
:is(.stage-meeting,[data-owned-status="meeting"],[data-team-status="meeting"],#leadStatus[data-customer-status="meeting"],.owned-company-card:has(.stage-meeting)) { --status-accent:var(--stage-meeting-accent); --status-bg:var(--stage-meeting-bg); --status-ink:var(--stage-meeting-ink); }
:is(.stage-offer,[data-owned-status="offer"],[data-team-status="offer"],#leadStatus[data-customer-status="offer"],.owned-company-card:has(.stage-offer)) { --status-accent:var(--stage-offer-accent); --status-bg:var(--stage-offer-bg); --status-ink:var(--stage-offer-ink); }
:is(.stage-won,[data-owned-status="won"],[data-team-status="won"],#leadStatus[data-customer-status="won"],.owned-company-card:has(.stage-won)) { --status-accent:var(--stage-won-accent); --status-bg:var(--stage-won-bg); --status-ink:var(--stage-won-ink); }
:is(.stage-existing,[data-owned-status="existing"],[data-team-status="existing"],#leadStatus[data-customer-status="existing"],.owned-company-card:has(.stage-existing)) { --status-accent:var(--stage-existing-accent); --status-bg:var(--stage-existing-bg); --status-ink:var(--stage-existing-ink); }
:is(.stage-lost,[data-owned-status="lost"],[data-team-status="lost"],#leadStatus[data-customer-status="lost"],.owned-company-card:has(.stage-lost)) { --status-accent:var(--stage-lost-accent); --status-bg:var(--stage-lost-bg); --status-ink:var(--stage-lost-ink); }

:is([data-owned-status="not_interested"],[data-team-status="not_interested"]) { --status-accent:var(--stage-lost-accent); --status-bg:var(--stage-lost-bg); --status-ink:var(--stage-lost-ink); }
.crm-stage { gap:7px; padding:6px 10px; border-radius:999px; background:var(--status-bg,var(--surface-soft)); color:var(--status-ink,var(--ink)); border:1px solid color-mix(in srgb,var(--status-accent,var(--line)) 35%,transparent); }
.crm-stage::before { content:''; width:7px; height:7px; border-radius:50%; flex-shrink:0; background:var(--status-accent,var(--muted)); }
.crm-stage.stage-won { background:linear-gradient(115deg,var(--stage-won-bg),color-mix(in srgb,var(--stage-won-bg) 75%,var(--stage-won-accent))); border-color:var(--stage-won-accent); box-shadow:0 2px 10px color-mix(in srgb,var(--stage-won-accent) 20%,transparent); }
.crm-stage.stage-won::before { content:'★'; width:auto; height:auto; background:none; color:var(--stage-won-ink); font-size:12px; }
.owned-status-overview > :is(button[data-owned-status]:not([data-owned-status="all"]),button[data-team-status]) { background:var(--status-bg); color:var(--status-ink); border:1px solid color-mix(in srgb,var(--status-accent) 35%,transparent); }
.owned-status-overview > :is(button[data-owned-status]:not([data-owned-status="all"]),button[data-team-status]):hover { border-color:var(--status-accent); filter:brightness(.98); }
.owned-status-overview > button[data-owned-status][aria-pressed="true"]:not([data-owned-status="all"]) { background:var(--status-bg); color:var(--status-ink); border-color:var(--status-accent); box-shadow:0 0 0 2px color-mix(in srgb,var(--status-accent) 25%,transparent); }
.owned-status-overview button[data-owned-status="won"] { font-weight:800; }
.owned-company-card:has(.crm-stage) { border-top:3px solid var(--status-accent,var(--line)); }
#leadStatus[data-customer-status] { background-color:var(--status-bg,var(--surface-soft)); color:var(--status-ink,var(--ink)); border-color:var(--status-accent,var(--line)); font-weight:700; }
#leadStatus option { background:var(--surface); color:var(--ink); }
