/* ═══ CRM Theme — dark mode token overrides ═══
   All components use var(--crm-*) from app.css :root.
   Dark theme only redefines tokens; no per-component patches needed. */

html.theme-dark {
    color-scheme: dark;

    --crm-brand: #818cf8;
    --crm-brand-hover: #6366f1;
    --crm-brand-soft: rgba(99, 102, 241, 0.16);
    --crm-brand-ring: rgba(129, 140, 248, 0.24);

    --crm-surface: #0c1017;
    --crm-card: #151b26;
    --crm-elevated: #1c2433;

    --crm-border: #2a3344;
    --crm-border-strong: #3d4a5f;
    --crm-border-subtle: #222b3c;
    --crm-border-light: #2a3344;
    --crm-border-faint: #1f2836;
    --crm-brand-border: rgba(129, 140, 248, 0.35);
    --crm-brand-muted: rgba(99, 102, 241, 0.22);
    --crm-accent: #a5b4fc;
    --crm-accent-light: #818cf8;
    --crm-violet-soft: rgba(124, 58, 237, 0.16);
    --crm-blue-soft: rgba(37, 99, 235, 0.16);
    --crm-teal-soft: rgba(13, 148, 136, 0.16);
    --crm-amber-soft: rgba(245, 158, 11, 0.16);

    --crm-text: #e2e8f0;
    --crm-text-secondary: #cbd5e1;
    --crm-muted: #94a3b8;
    --crm-muted-light: #64748b;

    --crm-input-bg: #101622;
    --crm-hover: #1c2433;
    --crm-hover-strong: #222b3c;
    --crm-hover-soft: #1a2230;

    --crm-nav-active-bg: rgba(99, 102, 241, 0.18);
    --crm-nav-active-text: #a5b4fc;

    --crm-overlay: rgba(0, 0, 0, 0.62);
    --crm-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
}

html.theme-dark body {
    background-color: var(--crm-surface) !important;
    color: var(--crm-text) !important;
}

/* Tailwind CDN utility fallbacks loaded before theme */
html.theme-dark .bg-slate-50 { background-color: var(--crm-surface) !important; }
html.theme-dark .text-slate-800,
html.theme-dark .text-slate-900 { color: var(--crm-text) !important; }
html.theme-dark .text-slate-600,
html.theme-dark .text-slate-500,
html.theme-dark .text-slate-700 { color: var(--crm-muted) !important; }
html.theme-dark .border-slate-200,
html.theme-dark .border-slate-100 { border-color: var(--crm-border) !important; }
html.theme-dark .bg-white { background-color: var(--crm-card) !important; }

/* Semantic status badges — slightly dimmed backgrounds in dark */
html.theme-dark .crm-badge-blue { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
html.theme-dark .crm-badge-sky { background: rgba(14, 165, 233, 0.18); color: #7dd3fc; }
html.theme-dark .crm-badge-amber { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
html.theme-dark .crm-badge-green { background: rgba(34, 197, 94, 0.18); color: #86efac; }
html.theme-dark .crm-badge-red { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
html.theme-dark .crm-badge-slate { background: var(--crm-hover-strong); color: var(--crm-muted); }

html.theme-dark .crm-alert-error {
    background: rgba(127, 29, 29, 0.28);
    border-color: #991b1b;
    color: #fca5a5;
}
html.theme-dark .crm-alert-success {
    background: rgba(21, 128, 61, 0.22);
    border-color: #166534;
    color: #86efac;
}

html.theme-dark .crm-flash {
    background: var(--crm-card);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.25),
        0 16px 32px -8px rgba(0, 0, 0, 0.45);
}
html.theme-dark .crm-flash--success {
    border-color: rgba(52, 211, 153, 0.35);
    background: linear-gradient(135deg, var(--crm-card) 0%, rgba(6, 78, 59, 0.45) 100%);
}
html.theme-dark .crm-flash--error {
    border-color: rgba(248, 113, 113, 0.35);
    background: linear-gradient(135deg, var(--crm-card) 0%, rgba(127, 29, 29, 0.35) 100%);
}
html.theme-dark .crm-flash--success .crm-flash__label { color: #6ee7b7; }
html.theme-dark .crm-flash--error .crm-flash__label { color: #fca5a5; }
html.theme-dark .crm-flash--success .crm-flash__icon {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}
html.theme-dark .crm-flash--error .crm-flash__icon {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}
html.theme-dark .client-toast.is-success {
    background: linear-gradient(135deg, var(--crm-card) 0%, rgba(6, 78, 59, 0.5) 100%);
    border-color: rgba(52, 211, 153, 0.35);
}
html.theme-dark .client-toast.is-error {
    background: linear-gradient(135deg, var(--crm-card) 0%, rgba(127, 29, 29, 0.4) 100%);
    border-color: rgba(248, 113, 113, 0.35);
}

/* Impersonation banner */
html.theme-dark .crm-impersonation-banner {
    background: linear-gradient(90deg, #422006 0%, #451a03 100%);
    border-bottom-color: #92400e;
    color: #fcd34d;
}
html.theme-dark .crm-impersonation-banner__text strong { color: #fef3c7; }
html.theme-dark .crm-impersonation-banner__btn {
    background: var(--crm-card);
    border-color: #d97706;
    color: #fcd34d;
}

/* Locked module overlay */
html.theme-dark .module-card-wrap__veil { background: rgba(12, 16, 23, 0.5); }
html.theme-dark .module-card-wrap__lock {
    background: var(--crm-card);
    border-color: #92400e;
    color: #fcd34d;
}

/* Login hero panel stays dark gradient — intentional brand panel */
html.theme-dark .bg-surface { background-color: var(--crm-surface) !important; }

/* Scrollbars */
html.theme-dark ::-webkit-scrollbar { width: 10px; height: 10px; }
html.theme-dark ::-webkit-scrollbar-track { background: var(--crm-surface); }
html.theme-dark ::-webkit-scrollbar-thumb {
    background: var(--crm-border-strong);
    border-radius: 999px;
    border: 2px solid var(--crm-surface);
}
html.theme-dark ::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Shadows tuned for dark surfaces */
html.theme-dark .clients-stat-card:hover,
html.theme-dark .crm-stat-card:hover,
html.theme-dark .cw-btn:hover:not(:disabled) {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

html.theme-dark .icon-btn:hover:not(:disabled) {
    background: var(--crm-hover);
    color: var(--crm-text);
}

html.theme-dark .icon-btn-primary:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(96, 165, 250, 0.35);
    color: #93c5fd;
}

html.theme-dark .icon-btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

html.theme-dark .icon-btn-success:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(74, 222, 128, 0.35);
    color: #86efac;
}

html.theme-dark .cw-modal.is-open,
html.theme-dark .crm-modal-overlay.is-open {
    background: var(--crm-overlay);
}

html.theme-dark .cw-modal__backdrop,
html.theme-dark .crm-modal-backdrop {
    background: rgba(0, 0, 0, 0.55);
}

/* ── Page surfaces (dashboard, tasks, tickets, chats, calendar, users, services, roles) ── */
html.theme-dark .dashboard__hero,
html.theme-dark .dashboard__stat,
html.theme-dark .dashboard__panel,
html.theme-dark .tasks-workspace,
html.theme-dark .tasks-stat-card,
html.theme-dark .tasks-table-wrap,
html.theme-dark .it-toolbar,
html.theme-dark .it-stat-card,
html.theme-dark .it-table-wrap,
html.theme-dark .it-show-layout,
html.theme-dark .it-sidebar,
html.theme-dark .sc-layout,
html.theme-dark .sc-list,
html.theme-dark .sc-thread,
html.theme-dark .cal-workspace,
html.theme-dark .cal-hero,
html.theme-dark .users-workspace,
html.theme-dark .svc-settings,
html.theme-dark .svc-panel,
html.theme-dark .roles-workspace {
    background-color: var(--crm-card);
    border-color: var(--crm-border);
    color: var(--crm-text);
}

html.theme-dark .sc-list,
html.theme-dark .svc-settings__sidebar,
html.theme-dark .roles-workspace__sidebar {
    background: var(--crm-card);
    border-color: var(--crm-border);
}

html.theme-dark .dashboard__hero,
html.theme-dark .cal-hero,
html.theme-dark .tasks-workspace__hero,
html.theme-dark .it-toolbar {
    background: linear-gradient(135deg, var(--crm-card) 0%, var(--crm-surface) 55%, var(--crm-brand-soft) 100%);
}

html.theme-dark .sc-conv,
html.theme-dark .sc-conv:hover {
    background: var(--crm-card);
    border-color: var(--crm-border-faint);
}

html.theme-dark .sc-conv.is-active {
    background: linear-gradient(135deg, var(--crm-brand-soft) 0%, rgba(99, 102, 241, 0.08) 100%);
    border-color: var(--crm-brand-border);
}

html.theme-dark .sc-thread__messages,
html.theme-dark .sc-compose,
html.theme-dark .it-show-main,
html.theme-dark .roles-workspace__main {
    background: var(--crm-surface);
}

html.theme-dark .tasks-table__row:hover,
html.theme-dark .it-ticket-row:hover,
html.theme-dark .dashboard__task-item:hover {
    background: var(--crm-hover);
}

/* Semantic status pills — lighter text in dark */
html.theme-dark .dashboard__badge--progress,
html.theme-dark .it-status--open,
html.theme-dark .it-priority--normal,
html.theme-dark .sc-status--open,
html.theme-dark .tasks-status--progress,
html.theme-dark .tasks-priority--medium { color: #93c5fd; }

html.theme-dark .dashboard__badge--overdue,
html.theme-dark .dashboard__badge--priority-urgent,
html.theme-dark .it-status--urgent,
html.theme-dark .it-priority--urgent,
html.theme-dark .sc-status--waiting-agent,
html.theme-dark .tasks-priority--urgent,
html.theme-dark .tasks-cell-due--overdue .tasks-cell-due__date { color: #fca5a5; }

html.theme-dark .dashboard__badge--due-today,
html.theme-dark .dashboard__badge--priority-high,
html.theme-dark .it-status--waiting-user,
html.theme-dark .it-priority--high,
html.theme-dark .sc-status--waiting-client,
html.theme-dark .tasks-priority--high { color: #fcd34d; }

html.theme-dark .it-status--resolved,
html.theme-dark .it-status--progress,
html.theme-dark .sc-status--resolved,
html.theme-dark .tasks-status--done { color: #86efac; }

html.theme-dark .it-cat-pill[style*="blue"],
html.theme-dark .it-cat-pill[style*="violet"],
html.theme-dark .it-cat-pill[style*="amber"],
html.theme-dark .it-cat-pill[style*="green"],
html.theme-dark .it-cat-pill[style*="red"],
html.theme-dark .it-cat-pill[style*="orange"] {
    filter: brightness(1.15);
}

html.theme-dark .roles-workspace__sidebar-item-wrap.is-active {
    background: var(--crm-nav-active-bg);
}

html.theme-dark .roles-workspace__sidebar-item-wrap.is-active .roles-workspace__sidebar-item-name {
    color: var(--crm-nav-active-text);
}

html.theme-dark .svc-nav-card:hover,
html.theme-dark .svc-settings__nav-item:hover {
    background: var(--crm-hover);
}

html.theme-dark .cal-workspace .cal-day-cell.is-other-month {
    background: var(--crm-surface);
    opacity: 0.55;
}

html.theme-dark .cal-workspace .cal-day-cell.is-today {
    background: var(--crm-brand-soft);
}

html.theme-dark .users-workspace__avatar-ring {
    border-color: var(--crm-card);
}

/* ── Client profile: status pill (Lead / Client) ── */
html.theme-dark .status-pill-select__trigger:hover:not(:disabled) {
    filter: brightness(1.08);
}

html.theme-dark .status-pill-select.is-open .status-pill-select__trigger,
html.theme-dark .status-pill-select__trigger:focus-visible {
    box-shadow: 0 0 0 2px var(--crm-brand-ring);
}

html.theme-dark .status-pill-menu {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.28);
}

html.theme-dark .status-pill__type-dot {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

/* Legacy slug pills — lighter label text on dark surfaces */
html.theme-dark .status-pill-select.status-new .status-pill-select__trigger,
html.theme-dark .status-pill.status-new { color: #93c5fd; }
html.theme-dark .status-pill-select.status-call-again .status-pill-select__trigger,
html.theme-dark .status-pill.status-call-again { color: #fcd34d; }
html.theme-dark .status-pill-select.status-no-answer-2 .status-pill-select__trigger,
html.theme-dark .status-pill.status-no-answer-2 { color: #fdba74; }
html.theme-dark .status-pill-select.status-no-answer-3 .status-pill-select__trigger,
html.theme-dark .status-pill.status-no-answer-3 { color: #fca5a5; }
html.theme-dark .status-pill-select.status-interested .status-pill-select__trigger,
html.theme-dark .status-pill.status-interested { color: #c4b5fd; }
html.theme-dark .status-pill-select.status-converted .status-pill-select__trigger,
html.theme-dark .status-pill.status-converted { color: #6ee7b7; }
html.theme-dark .status-pill-select.status-archived .status-pill-select__trigger,
html.theme-dark .status-pill.status-archived {
    background: var(--crm-hover-strong) !important;
    color: var(--crm-muted) !important;
    border-color: var(--crm-border-strong) !important;
}

/* Dynamic status colors — replace light-theme hex backgrounds */
html.theme-dark .status-pill-select.status-color-pink .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-pink {
    background: rgba(236, 72, 153, 0.18) !important;
    color: #f9a8d4 !important;
    border-color: rgba(236, 72, 153, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-purple .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-purple {
    background: var(--crm-violet-soft) !important;
    color: #d8b4fe !important;
    border-color: var(--crm-brand-border) !important;
}
html.theme-dark .status-pill-select.status-color-violet .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-violet {
    background: var(--crm-violet-soft) !important;
    color: #c4b5fd !important;
    border-color: var(--crm-brand-border) !important;
}
html.theme-dark .status-pill-select.status-color-blue .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-blue {
    background: var(--crm-blue-soft) !important;
    color: #93c5fd !important;
    border-color: var(--crm-brand-border) !important;
}
html.theme-dark .status-pill-select.status-color-indigo .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-indigo {
    background: var(--crm-brand-soft) !important;
    color: var(--crm-accent) !important;
    border-color: var(--crm-brand-border) !important;
}
html.theme-dark .status-pill-select.status-color-rose .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-rose {
    background: rgba(244, 63, 94, 0.18) !important;
    color: #fda4af !important;
    border-color: rgba(244, 63, 94, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-red .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-red {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-orange .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-orange {
    background: rgba(249, 115, 22, 0.18) !important;
    color: #fdba74 !important;
    border-color: rgba(249, 115, 22, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-amber .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-amber {
    background: var(--crm-amber-soft) !important;
    color: #fcd34d !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-yellow .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-yellow {
    background: rgba(234, 179, 8, 0.16) !important;
    color: #fde047 !important;
    border-color: rgba(234, 179, 8, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-lime .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-lime {
    background: rgba(132, 204, 22, 0.16) !important;
    color: #bef264 !important;
    border-color: rgba(132, 204, 22, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-green .status-pill-select__trigger,
html.theme-dark .status-pill-select.status-color-emerald .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-green,
html.theme-dark .status-pill.status-color-emerald {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-teal .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-teal {
    background: var(--crm-teal-soft) !important;
    color: #5eead4 !important;
    border-color: rgba(45, 212, 191, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-cyan .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-cyan {
    background: rgba(6, 182, 212, 0.16) !important;
    color: #67e8f9 !important;
    border-color: rgba(6, 182, 212, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-sky .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-sky {
    background: rgba(14, 165, 233, 0.16) !important;
    color: #7dd3fc !important;
    border-color: rgba(14, 165, 233, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-fuchsia .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-fuchsia {
    background: rgba(217, 70, 239, 0.16) !important;
    color: #f0abfc !important;
    border-color: rgba(217, 70, 239, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-neutral .status-pill-select__trigger,
html.theme-dark .status-pill-select.status-color-stone .status-pill-select__trigger,
html.theme-dark .status-pill-select.status-color-zinc .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-neutral,
html.theme-dark .status-pill.status-color-stone,
html.theme-dark .status-pill.status-color-zinc {
    background: var(--crm-hover-strong) !important;
    color: var(--crm-text-secondary) !important;
    border-color: var(--crm-border-strong) !important;
}
html.theme-dark .status-pill-select.status-color-brown .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-brown {
    background: rgba(146, 64, 14, 0.22) !important;
    color: #fdba74 !important;
    border-color: rgba(249, 115, 22, 0.35) !important;
}
html.theme-dark .status-pill-select.status-color-olive .status-pill-select__trigger,
html.theme-dark .status-pill.status-color-olive {
    background: rgba(101, 163, 13, 0.16) !important;
    color: #bef264 !important;
    border-color: rgba(101, 163, 13, 0.35) !important;
}

/* Dropdown option text — readable on dark menu */
html.theme-dark .status-pill-menu__option.status-new { color: #93c5fd; }
html.theme-dark .status-pill-menu__option.status-call-again { color: #fcd34d; }
html.theme-dark .status-pill-menu__option.status-interested { color: #c4b5fd; }
html.theme-dark .status-pill-menu__option.status-converted { color: #6ee7b7; }
html.theme-dark .status-pill-menu__option.status-color-pink { color: #f9a8d4; }
html.theme-dark .status-pill-menu__option.status-color-violet { color: #c4b5fd; }
html.theme-dark .status-pill-menu__option.status-color-blue { color: #93c5fd; }
html.theme-dark .status-pill-menu__option.status-color-green,
html.theme-dark .status-pill-menu__option.status-color-emerald { color: #6ee7b7; }

/* ── Client profile: active service card (e.g. Bank) ── */
html.theme-dark .cws-service-btn.is-active {
    border-color: rgba(74, 222, 128, 0.45);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.22) 0%, var(--crm-card) 100%);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}
html.theme-dark .cws-service-btn.is-active:hover:not(:disabled) {
    border-color: rgba(74, 222, 128, 0.65);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}
html.theme-dark .cws-service-btn.is-active .cws-service-btn__icon {
    color: #4ade80;
}
html.theme-dark .cws-service-btn.is-active .cws-service-btn__label {
    color: #86efac;
}
html.theme-dark .cws-service-btn.is-active .cws-service-btn__status-dot {
    box-shadow: 0 0 0 2px var(--crm-card);
}
html.theme-dark .cws-service-btn.is-active.is-pending {
    border-color: rgba(251, 191, 36, 0.45);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.2) 0%, var(--crm-card) 100%);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.18);
}
html.theme-dark .cws-service-btn.is-active.is-pending .cws-service-btn__icon {
    color: #fbbf24;
}
html.theme-dark .cws-service-btn.is-active.is-pending .cws-service-btn__label {
    color: #fcd34d;
}
html.theme-dark .cws-service-btn.is-active.is-blocked {
    border-color: rgba(248, 113, 113, 0.45);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.2) 0%, var(--crm-card) 100%);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.18);
}
html.theme-dark .cws-service-btn.is-active.is-blocked .cws-service-btn__icon {
    color: #f87171;
}
html.theme-dark .cws-service-btn.is-active.is-blocked .cws-service-btn__label {
    color: #fca5a5;
}
html.theme-dark .cws-services-stage.is-expanded .cws-service-cell.is-slot-center .cws-service-btn.is-active {
    background: linear-gradient(165deg, rgba(16, 185, 129, 0.24) 0%, var(--crm-card) 72%);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(16, 185, 129, 0.25);
}

/* Passport AI modal + Documents actions */
html.theme-dark .cws-passport-data-modal .crm-modal-body {
    background: var(--crm-card);
}

html.theme-dark .cws-passport-data-modal .cw-modal__footer,
html.theme-dark .cws-passport-data-modal .crm-modal-footer {
    background: var(--crm-elevated);
    border-top: 1px solid var(--crm-border-subtle);
}

html.theme-dark .cws-passport-data-modal__status.is-success {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.28);
}

html.theme-dark .cws-passport-data-modal__status.is-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.28);
}

html.theme-dark .cws-passport-data-modal__field {
    background: var(--crm-hover);
    border-color: var(--crm-border-subtle);
}

html.theme-dark .cws-passport-data-modal__field dt {
    color: var(--crm-muted);
}

html.theme-dark .cws-passport-data-modal__field dd {
    color: var(--crm-text);
}

html.theme-dark .cws-passport-data-modal__hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, var(--crm-hover) 72%);
    border-color: rgba(129, 140, 248, 0.22);
}

html.theme-dark .cws-passport-data-modal__fullname {
    color: var(--crm-text);
}

html.theme-dark .cws-passport-data-modal__hero-doc {
    color: var(--crm-muted);
}

html.theme-dark .cws-passport-data-modal__section + .cws-passport-data-modal__section {
    border-top-color: var(--crm-border-subtle);
}

html.theme-dark .cws-passport-data-modal__section-title {
    color: var(--crm-muted);
}

html.theme-dark .cws-vacancy-card,
html.theme-dark .cws-vacancy-modal__archive-pane {
    background: var(--crm-hover);
    border-color: var(--crm-border-subtle);
}

html.theme-dark .cws-vacancy-modal__form-pane {
    border-right-color: var(--crm-border-subtle);
}

html.theme-dark .cws-vacancy-amount {
    background: var(--crm-elevated);
    border-color: var(--crm-border-subtle);
}

html.theme-dark .cws-vacancy-amount__prefix {
    background: var(--crm-hover);
    border-right-color: var(--crm-border-subtle);
}

html.theme-dark .cws-vacancy-amount--auto {
    background: var(--crm-hover);
}

html.theme-dark .cws-vacancy-archive__search-input {
    background: var(--crm-elevated);
    border-color: var(--crm-border-subtle);
    color: var(--crm-text);
}

html.theme-dark .cws-vacancy-archive__item {
    background: var(--crm-elevated);
    border-color: var(--crm-border-subtle);
}

html.theme-dark .cws-vacancy-form__error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.28);
    color: #fca5a5;
}

html.theme-dark .cws-vacancy__header-btn {
    background: var(--crm-elevated);
    border-color: var(--crm-border-subtle);
}

html.theme-dark .cws-docs__action-btn {
    background: var(--crm-elevated);
    border-color: var(--crm-border);
    color: var(--crm-text-secondary);
}

html.theme-dark .cws-docs__action-btn:hover {
    background: var(--crm-hover-strong);
    border-color: var(--crm-border-strong);
    color: var(--crm-text);
}

html.theme-dark .cws-docs__action-btn--primary {
    background: var(--crm-brand-soft);
    border-color: var(--crm-brand-border);
    color: var(--crm-accent);
}

html.theme-dark .cws-docs__action-btn--primary:hover {
    background: rgba(99, 102, 241, 0.22);
    color: #c7d2fe;
}

html.theme-dark .cws-docs__row.is-filled .cws-docs__row-status {
    color: #86efac;
}
