:root{color-scheme:light;--ink:#243b39}
.auth-theme{position:fixed;top:18px;right:18px;z-index:40;background:var(--panel);border:1px solid var(--line);color:inherit}
.auth-step{right:70px}
[data-action=theme] .theme-sun{display:none}
:root[data-theme=dark] [data-action=theme] .theme-sun{display:block}
:root[data-theme=dark] [data-action=theme] .theme-moon{display:none}
.deleted-summary{margin-bottom:24px}
.global-delete-actions{display:flex;flex-wrap:wrap;gap:8px}
:root[data-theme=dark]{color-scheme:dark;color:#deebe5;background:#111b19;--ink:#deebe5;--green:#65cdb5;--dark:#0d1816;--muted:#a3b8ae;--line:#34463f;--panel:#192722;--raised:#21332c}
:root[data-theme=dark] :is(.panel,.stat,.topbar,.role-card,.page-error,.search,.filter,.field input,.field select,.field textarea,.permission-row select,.crm-results button,dialog,.bd-card,.auth-shell,.auth-theme){background:var(--panel);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] :is(.btn,.modal-foot,.welcome,.bd-column,.audit-detail,.code-block,.crm-storage,.field input[readonly],th){background:var(--raised);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] :is(.breadcrumb strong,.stat-value,.table-name strong,.empty h3,.field>label,.auth-form h2,.search input,.crm-link){color:var(--ink)}
:root[data-theme=dark] :is(.breadcrumb,.secure-label,.date-label,.welcome .eyebrow,.welcome p,.stat-top,.stat-foot,.table-name small,.table-foot,.activity-item p,.activity-item small,.security-row,.security-row span:last-child,.empty,.field small,.section-title,.modal-subtitle,.role-card p,.role-meta,.permission-row small,.profile-block p,.definition-list dt,.auth-form .eyebrow,.auth-form>p,.auth-foot,.auth-step,.auth-step span,.scope-label,.login-hint,.data-warning,.crm-metric>span,.crm-metric>small,.crm-secondary,.crm-details dt,.crm-results small,.bd-column header small,.bd-card p,.bd-card small,.bd-card-meta,.bd-totals small,.bd-history small,.bd-criteria span,legend){color:var(--muted)}
:root[data-theme=dark] :is(td,.activity-item,.bd-column header,.bd-request,.bd-criteria>div,fieldset,.bd-form-section,.crm-results button){border-color:var(--line)}
:root[data-theme=dark] td{color:#c3d5cc}
:root[data-theme=dark] :is(.avatar,.table-name .avatar,.stat-icon,.activity-symbol,.empty .empty-icon,.role-card .role-icon,.badge-number,.new-tag,.pill){background:#293f35;color:#c7ddd1;border-color:var(--line)}
:root[data-theme=dark] .pill:is(.active,.approved){background:#193e30;color:#8be0b6}
:root[data-theme=dark] .pill:is(.trial,.invited){background:#453b1f;color:#f0ce87}
:root[data-theme=dark] .pill:is(.suspended,.disabled,.expired,.locked,.deleted){background:#492d2b;color:#f0b2aa}
:root[data-theme=dark] .pill.archived{background:#2e3c40;color:#bdcdd5}
:root[data-theme=dark] :is(.notice,.code-block){background:#203c2c;border-color:#3b614a;color:#bedac8}
:root[data-theme=dark] :is(.notice.warning,.support-banner){background:#3d331c;border-color:#695637;color:#efcf90}
:root[data-theme=dark] :is(.error,.btn.danger){background:#3e2826;color:#f6b4ab;border-color:#734640}
:root[data-theme=dark] .danger-text{color:#f6b4ab}
:root[data-theme=dark] .btn.primary{background:#247d66;color:#fff;border-color:#3a9c83}
:root[data-theme=dark] .btn.primary:hover{background:#2d9278}
:root[data-theme=dark] :is(.btn:hover,.icon-btn:hover,.crm-results button:hover,tbody tr:hover){background:#2b4238}
:root[data-theme=dark] .btn.danger:hover{background:#52312e}
:root[data-theme=dark] :is(.btn.ghost,.btn.text,.search input){background:transparent}
:root[data-theme=dark] .btn.text{color:var(--green)}
:root[data-theme=dark] .brand-mark{color:#10251d}
:root[data-theme=dark] .auth-brand-panel{background:#102b22}
:root[data-theme=dark] .auth-brand-panel .brand-mark{color:#173c2b}
:root[data-theme=dark] .welcome-art{color:#8dbda0}
:root[data-theme=dark] .welcome-art:before,:root[data-theme=dark] .welcome-art:after{border-color:#405b47}
:root[data-theme=dark] .usage{background:#30453a}
:root[data-theme=dark] .bd-history article{border-color:#5e8b74}
:root[data-theme=dark] .bd-card progress{accent-color:#65cdb5}
:root[data-theme=dark] dialog::backdrop{background:#050d0ba8}
:root[data-theme=dark] #toast{background:#264e3d;color:#fff;border:1px solid #50715e}
:root[data-theme=dark] input::placeholder,:root[data-theme=dark] textarea::placeholder{color:#97aca1}
:root[data-theme=dark] .mfa-qr img{background:#fff}
@media(max-width:600px){.auth-theme{top:13px;right:12px}.auth-step{right:60px}.global-delete-actions{display:flex;flex-wrap:wrap;gap:8px}}

:root[data-theme="dark"]{--import-error:#f19e94}
