:root[data-theme=light]{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark;--ink:#e8edf7;--muted:#a3b2c9;--line:#30405a;--surface:#182338;--bg:#101827;--primary:#2dc3f0;--primary-dark:#08a7df;--danger:#ffa7aa;--success:#8ce5b9;--nav:#0b1220;--mora-ink:#e8edf7;--mora-muted:#a3b2c9;--mora-soft:#111c2c;--mora-line:#30405a}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;flex-shrink:0;padding:8px 12px;border:1px solid #b7c8dc;border-radius:12px;background:#edf4fb;color:#263a54;cursor:pointer;font-size:12px;font-weight:700;white-space:nowrap;line-height:1.4}
.theme-toggle:hover{border-color:#08a7df;box-shadow:0 0 0 3px #08a7df1c}.theme-toggle:focus-visible{outline:3px solid #08a7df;outline-offset:3px}.theme-toggle svg{flex-shrink:0}.theme-moon{display:block}.theme-sun{display:none}
[data-theme=dark] .theme-moon{display:none}[data-theme=dark] .theme-sun{display:block}[data-theme=dark] .theme-toggle{background:#26374f;color:#ffe779;border-color:#53647d}
.topbar .theme-toggle{background:#ffffff0d;border-color:#ffffff30;color:#fff}.auth-page>.theme-toggle{position:fixed;top:20px;inset-inline-end:24px;z-index:30}.public-header-actions{display:flex;align-items:center;gap:12px}
.multi-choice-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-block:10px 14px}.multi-choice-options label[hidden]{display:none!important}
.lifecycle-steps{list-style:none;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:14px 0 20px}.lifecycle-steps li{display:flex;align-items:center;gap:13px;border:1px solid var(--line);background:#f5f8fc;padding:17px;border-radius:12px}.lifecycle-steps b{width:38px;height:38px;border-radius:50%;background:#e4eaf4;color:#5c6a82;display:grid;place-items:center;flex-shrink:0}.lifecycle-steps strong,.lifecycle-steps small{display:block}.lifecycle-steps small{color:var(--muted);font-size:12px;margin-top:5px}.lifecycle-steps .complete{border-color:#99ddc3;background:#f1fcf7}.lifecycle-steps .complete b{background:#087c56;color:#fff}.customer-lifecycle>form{display:inline-block;margin-inline-end:8px}.customer-threshold{padding:15px 18px;margin-block:14px 20px;border:1px solid var(--line);border-radius:12px;background:#f5f8fc}.customer-threshold p{margin:0 0 8px}.customer-threshold summary{cursor:pointer;color:var(--primary);font-weight:700}.threshold-form{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin-top:15px}.threshold-form label{display:flex;flex-direction:column;gap:7px;max-width:340px}
[data-theme=dark] body{background:var(--bg);color:var(--ink)}
[data-theme=dark] :is(.panel,.stat,.card,.sales-card,.insight-card,.activity-entry,.activity-card,.notification-card,.notification-popover,.topbar-search-results,.search-select-dropdown,.native-search-select,.searchable-options,.searchable-menu,.confirm-dialog,.crm-transfer-dialog,.kanban-card,.document-card,.sms-balance-panel,.user-kpi-header,.approval-section,.approval-content,.deal-approval-card,.customer-kpis>div,.calendar-day,.calendar-task,.global-search-group,.auth-card,.event-card,.events-empty){background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:0 8px 28px #00000012}
[data-theme=dark] :is(h1,h2,h3,h4,legend,th,dt,.stat strong,.sales-card strong,.document-card strong,.approval-section h2,.notification-copy strong,.notification-head strong,.customer-kpis strong,.user-kpi-identity strong,.auth-card h1,.auth-welcome,.public-brand,.event-body h3){color:var(--ink)}
[data-theme=dark] :is(.muted,.cell-subtitle,.form-hint,.stat span,.stat small,.sales-card span,.sales-card small,.auth-card .muted,.event-body p,.public-brand small,.release-version,.event-meta,.activity-entry-foot,.dashboard-context,.notification-list small,.notification-copy p){color:var(--muted)}
[data-theme=dark] :is(input,select,textarea){background:#101c2e;color:var(--ink);border-color:#43516a}
[data-theme=dark] input::placeholder,[data-theme=dark] textarea::placeholder{color:#9eacc2;opacity:1}[data-theme=dark] :is(input,select,textarea):focus{outline:3px solid #08a7df38;border-color:#2dc3f0}[data-theme=dark] :is(input,select,textarea):disabled{opacity:.65}
[data-theme=dark] :is(th,.details dt,.checks label,.checkbox-control,.form-hint,.filters-panel,.advanced-filters,.precheck-row,.customer-threshold,.lifecycle-steps li,.aging-item,.customer-tabs,.calendar-weekdays,.kanban-column,.dashboard-context,.user-kpi-header,.conversion-summary,.sms-balance-result,.search-select-option:hover,.searchable-option:hover,.notification-list .unread){background:#202e44;color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(td,th,fieldset,.details>div,.activity-changes,.approval-list article,.notification-head,.notification-list>a,.notification-all,.global-search-group,.customer-tabs a,.search-select-option){border-color:var(--line)}
[data-theme=dark] tbody tr:hover{background:#22324b}[data-theme=dark] .table-wrap{background:var(--surface)}
[data-theme=dark] .button{color:#071c2e;background:#2dc3f0}[data-theme=dark] .button:hover{background:#64d5f8}[data-theme=dark] .button.secondary{background:#344864;color:#f1f5fc}[data-theme=dark] .button.ghost{background:#26374f;color:#e5edfa}[data-theme=dark] .link-button{color:inherit}
[data-theme=dark] :is(.badge,.task-status,.activity-kind,.status-pill.inactive){background:#2d3c54;color:#d6dfed}[data-theme=dark] :is(.badge.ok,.status-pill.active,.approval-complete,.activation-summary.active,.deal-approval-card.approved,.lifecycle-steps .complete){background:#143a32;color:#9beac6;border-color:#2e765b}[data-theme=dark] :is(.overdue,.badge.overdue,.field-error,.danger-link){color:#ffacb5}[data-theme=dark] .required-mark{color:#ff83c5}
[data-theme=dark] .alert.success{background:#153b32;color:#9beac6}[data-theme=dark] .alert.danger{background:#412832;color:#ffc1c7}[data-theme=dark] .security-note{background:#163448;color:#9ce1fb}[data-theme=dark] .activation-summary.inactive{background:#363023;color:#ffdda1}[data-theme=dark] .approval-empty{color:var(--muted)}
[data-theme=dark] .page-link{background:#202e44;color:var(--ink);border-color:var(--line)}[data-theme=dark] .active>.page-link{background:#087ca6;color:#fff}
[data-theme=dark] :is(.chart-label,.chart-axis text,.crm-chart text){fill:#bdcce1;color:#bdcce1}[data-theme=dark] :is(.chart-grid line,.chart-axis line){stroke:#3a4a62}[data-theme=dark] :is(.metric-track,.aging-track){background:#2e3e56}
[data-theme=dark] .auth-page{background:radial-gradient(ellipse at top right,#15354a,#101827 65%)}[data-theme=dark] .auth-input{background:#101c2e;border-color:#43516a}[data-theme=dark] .auth-input input{background:transparent;color:var(--ink)}[data-theme=dark] .auth-card{box-shadow:0 25px 65px #0005}[data-theme=dark] .auth-identity{color:#e5edf8}
[data-theme=dark] .public-site{background:var(--bg);color:var(--ink)}[data-theme=dark] .public-header{background:#131f31f7;border-color:var(--line)}[data-theme=dark] .public-brand img{background:white;border-radius:8px;padding:3px}[data-theme=dark] .events-section{background:linear-gradient(180deg,#101827,#152137)}[data-theme=dark] .event-meta span{background:#133d51;color:#a6e2f6}[data-theme=dark] .event-image{background:#28364d}[data-theme=dark] .public-brand span{border-color:var(--line)}
@media(max-width:680px){.lifecycle-steps{grid-template-columns:1fr}.theme-toggle{padding:9px;min-width:38px}.topbar .theme-toggle span{display:none}.public-header-actions{gap:8px}.public-header .theme-toggle span{display:none}.auth-page>.theme-toggle{top:12px;inset-inline-end:14px}.auth-layout{margin-top:40px}.customer-lifecycle .panel-title{align-items:flex-start;gap:10px;flex-wrap:wrap}}
@media print{.theme-toggle{display:none!important}}

[data-theme=dark] :is([contenteditable=true],.rich-editor,.rich-text-editor,.editor-toolbar,.search-select-menu,.search-select-trigger,.search-select-input){background:#182338;color:var(--ink);border-color:var(--line)}
[data-theme=dark] .sidebar{background:linear-gradient(180deg,#122239,#0c1524)}
.panel,.panel>*,.two-columns>*,.page-heading>*,.topbar-search,.topbar-search input{min-width:0}.table-wrap{max-width:100%;min-width:0}.two-columns{grid-template-columns:repeat(2,minmax(0,1fr))}.panel-title>div{min-width:0}.panel-title h2{overflow-wrap:anywhere}.topbar-search input{flex:1;width:0}.customer-lifecycle,.customer-threshold{overflow-wrap:anywhere}
[data-theme=dark] .content{background:radial-gradient(circle at 12% 0,#112b40 0,transparent 28%),#101827}[data-theme=dark] :is(.page-heading,.topbar-search,.filters-panel summary,.notification-head,.notification-all,.user-kpi-profile){background:#182338;color:var(--ink);border-color:var(--line)}[data-theme=dark] .topbar-search-results a{color:var(--ink);border-color:var(--line)}[data-theme=dark] :is(.searchable-options button,.searchable-options div,.searchable-select>input){background:#17253b;color:var(--ink);border-color:var(--line)}
@media(max-width:980px){.two-columns{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.panel-title{flex-wrap:wrap;gap:12px}.panel-title .button{max-width:100%}.panel h2{font-size:17px}.customer-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.content>.panel{max-width:100%}.topbar{max-width:100%}}

[data-theme=dark] .auth-welcome{background:#143d53;color:#b9eaff}[data-theme=dark] .dashboard-month-filter label>span{color:#bdcce1}
