/* Final dark-mode contrast pass. Loaded after the shared and Attendance styles. */
.theme-dark{
  --surface:#141f2d;
  --card:#273a50;
  --card-alt:#30465f;
  --control:#203247;
  --control-hover:#36516f;
  --surface-muted:#203247;
  --text:#f5f8ff;
  --heading:#f8fbff;
  --muted:#d2e0f0;
  --line:#6d84a0;
  --blue:#b9d6ff;
  --blue-soft:#30496e;
  color-scheme:dark;
}
.theme-dark.app-shell{background:#141f2d}
.theme-dark .card,.theme-dark .modal,.theme-dark .table-wrap{background:#273a50;color:var(--text);border-color:var(--line)}
.theme-dark .page-heading p,.theme-dark .small,.theme-dark .field label,.theme-dark .table-scroll-hint{color:var(--muted)}
.theme-dark .field .payroll-cutoff-hint{color:#ff9ca8}
.theme-dark :is(.input,.select,.textarea,.custom-select-trigger,.multi-select-control){background:var(--control);color:var(--text);border-color:var(--line)}
.theme-dark :is(.input,.textarea,.multi-select-input)::placeholder{color:#b3c5da;opacity:1}
.theme-dark :is(.input,.select,.textarea,.custom-select-trigger,.multi-select-control):focus-visible{border-color:#9bc5ff;outline:2px solid #9bc5ff;outline-offset:1px}
.theme-dark :is(.custom-select-menu,.multi-select-menu){background:#26384f;border:1px solid #627b99;color:var(--text)}
.theme-dark :is(.custom-select-menu,.multi-select-menu) button{color:var(--text)}
.theme-dark :is(.custom-select-menu,.multi-select-menu) button:is(:hover,.selected,.active,.keyboard-active){background:#3a5575;color:#f8fbff}
.theme-dark .multi-select-chip{background:#385476;color:#e5f1ff}
.theme-dark .btn.secondary{background:#2c4059;border-color:#647d9a;color:#f0f6ff}
.theme-dark .btn.secondary:hover{background:#385574}
.theme-dark .btn:not(.secondary):not(.danger){background:#3866bd;color:#fff}
.theme-dark .btn:not(.secondary):not(.danger):hover{background:#4978d0}
.theme-dark .btn:disabled{opacity:.62}
.theme-dark .data-table th{background:#354e69;color:#eff6ff;border-color:var(--line)}
.theme-dark .data-table td{color:var(--text);border-color:var(--line)}
.theme-dark .data-table tbody tr:nth-child(even){background:#2d425b}
.theme-dark .data-table tbody tr:hover{background:#304862}
.theme-dark .designation-list .data-table th{background:#354e69;color:#eff6ff}
.theme-dark :is(.topbar,.calendar-toolbar,.structure-departments,.policy-types){background:#24384e;border-color:var(--line);color:var(--text)}
.theme-dark :is(.detail-panel,.balance-detail-card,.profile-account-card,.account-create-card,.payroll-profile-card,.payroll-directory-card,.payroll-upload-card,.payroll-editor-page){background:#273a50;border-color:var(--line);color:var(--text)}
.theme-dark :is(.detail-row,.profile-account-details>div,.settings-info-list>div,.approval-step){border-color:#6d84a0}
.theme-dark .detail-row span,.theme-dark .profile-account-details span,.theme-dark .settings-info-list span{color:#d6e4f4}
.theme-dark .detail-row strong,.theme-dark .profile-account-details strong,.theme-dark .settings-info-list strong{color:#f8fbff}
.theme-dark .detail-row strong.missing-value{color:#c6d5e7}
.theme-dark .detail-row:hover{background:#324a65}
.theme-dark .department{background:#30465f;border-color:#7891ad;color:#f5f8ff}
.theme-dark .department small{color:#d2e0f0}
.theme-dark .structure-pane-title{background:#24384e;color:#d6e4f4}
.theme-dark .chart-period,.theme-dark .donut-center{background:#30465f;border-color:#7891ad;color:#f8fbff}
.theme-dark .type-legend span,.theme-dark .type-legend b{color:#e1ebf7}
.theme-dark .calendar-day{background:#273a50;border-color:#6d84a0}
.theme-dark .calendar-day.outside{background:#1d2e42}
.theme-dark .day-number{color:#e0ebf8}
.theme-dark .policy-answer{background:#203247;border-color:#6d84a0;color:#f5f8ff}
.theme-dark .document-file-list{background:#203247;border-color:#6d84a0}
.theme-dark .document-file-row{background:#30465f;border-color:#7891ad;color:#f5f8ff}
.theme-dark .document-file-row small{color:#d2e0f0}
.theme-dark .badge.active,.theme-dark .badge.approved,.theme-dark .badge.valid{background:#194a3c;color:#a6f4d0}
.theme-dark .badge.pending,.theme-dark .badge.submitted_pending_approval{background:#534015;color:#ffe3a0}
.theme-dark .badge.rejected,.theme-dark .badge.inactive,.theme-dark .badge.expired{background:#58303b;color:#ffc5ce}
.theme-dark .notice{background:#294361;color:#d9eaff}
.theme-dark .notice.success,.theme-dark .success{background:#214b3f;color:#bdf5d8}
.theme-dark .notice.error,.theme-dark .error{background:#57313e;color:#ffcad3}
.theme-dark .list-result-count{color:#d4e2f1}
.theme-dark .list-result-count strong{background:#385179;color:#f4f8ff}

/* Dashboard, analytics, and employee directory. */
.theme-dark .dashboard-page .metric-card,.theme-dark .hr-analytics-metrics .metric-card,.theme-dark .employee-mobile-card{background:var(--card);border-color:var(--line)}
.theme-dark .dashboard-page .metric-label,.theme-dark .hr-analytics-metrics .metric-label,.theme-dark .chart-legend,.theme-dark .chart-label,.theme-dark .analytics-completeness{color:#c8d8eb;fill:#c8d8eb}
.theme-dark .dashboard-page .metric-value,.theme-dark .hr-analytics-metrics .metric-value{color:#f6f9ff}
.theme-dark .hr-bar-track,.theme-dark .balance-track{background:#405672}
.theme-dark .hr-bar-label,.theme-dark .hr-bar-row strong,.theme-dark .chart-value{color:#eff6ff;fill:#eff6ff}
.theme-dark .movement-metric{background:#2c4058;border-color:var(--line)}
.theme-dark .movement-metric.metric-tone-green strong{color:#83e2b5}
.theme-dark .movement-metric.metric-tone-red strong{color:#ffadb9}
.theme-dark .movement-metric.metric-tone-blue strong{color:#add0ff}
.theme-dark .nursing-specialities{background:#2a3d56;border-color:#5b7393}
.theme-dark .nursing-specialities h3{color:#e9f3ff}
.theme-dark .nursing-speciality-chips span{background:#385579;color:#dcecff}
.theme-dark .employee-fact-card,.theme-dark .employee-fact-card.primary{background:#30465f;border-color:#7891ad}
.theme-dark .employee-fact-card strong{color:#f1f6ff}

/* Leave, transfer, separation, documents, accounts, and Payroll. */
.theme-dark .calendar-day.outside{background:#1d2e42}
.theme-dark .calendar-day:hover{background:#304660}
.theme-dark .calendar-event{background:#235346;color:#c1f5d8}
.theme-dark .calendar-event.type-sick{background:#58313e;color:#ffc9d3}
.theme-dark .calendar-event.type-emergency,.theme-dark .calendar-event.type-compassionate{background:#58441f;color:#ffe3aa}
.theme-dark .calendar-event.type-maternity,.theme-dark .calendar-event.type-paternity{background:#443867;color:#e0d0ff}
.theme-dark .transfer-modal .transfer-comparison>div,.theme-dark .transfer-modal .confirm-check,.theme-dark .transfer-file-picker{background:#2b3e55;border-color:#5f7896;color:var(--text)}
.theme-dark .transfer-file-picker:hover{background:#344d6b;border-color:#91bcf4}
.theme-dark .transfer-file-picker-button{background:#3866bd;color:#fff}
.theme-dark .separation-tabs{background:#2b3e55;border-color:var(--line)}
.theme-dark .separation-tabs button.active{background:#3866bd;color:#fff}
.theme-dark .document-file-list,.theme-dark .employee-documents-card .document-file-list{background:#203247;border-color:#6d84a0}
.theme-dark .contract-document-upload-card,.theme-dark .contract-document-empty{background:#203247;border-color:#6d84a0;color:var(--text)}
.theme-dark .contract-file-drop,.theme-dark .contract-document-row{background:#30465f;border-color:#7891ad;color:#f5f8ff}
.theme-dark .contract-file-drop:hover{background:#36516f;border-color:#b9d6ff}
.theme-dark .contract-document-icon{background:#385476;color:#dcecff}
.theme-dark .contract-document-type{background:#58303b;color:#ffc5ce}
.theme-dark .contract-document-upload-heading p,.theme-dark .contract-document-list-heading p,.theme-dark .contract-file-drop small,.theme-dark .contract-document-file small,.theme-dark .contract-document-fact span{color:#d2e0f0}
.theme-dark .contract-document-file strong,.theme-dark .contract-document-fact strong{color:#f8fbff}
.theme-dark .notification-panel{background:#273a50;border-color:#7891ad;box-shadow:0 22px 50px rgba(0,0,0,.38)}
.theme-dark .notification-panel-heading,.theme-dark .notification-item{border-color:#6d84a0}
.theme-dark .notification-item{background:#273a50;color:#f5f8ff}
.theme-dark .notification-item:hover{background:#36516f}
.theme-dark .notification-item.is-unread{background:#30496e}
.theme-dark .notification-item-icon{background:#58441f;color:#ffe3aa}
.theme-dark .notification-item-copy small,.theme-dark .notification-empty{color:#d2e0f0}
.theme-dark .notification-error{background:#57313e;color:#ffcad3}
.theme-dark .notification-count{border-color:#273a50;background:#df5263;color:#fff}
.theme-dark .contract-history-card .focused-contract-row{background:#534015;box-shadow:inset 4px 0 0 #ffd166}
.theme-dark.rtl .contract-history-card .focused-contract-row{box-shadow:inset -4px 0 0 #ffd166}
.theme-dark .payroll-profile-tabs button{color:#cad9ec}
.theme-dark .payroll-profile-tabs button.active{color:#b7d7ff;border-color:#a6c8ff}
.theme-dark .payroll-tab-count{background:#3a5176;color:#f0f6ff}
.theme-dark .payroll-profile-meta,.theme-dark .payroll-profile-tabs{background:#344e69;border-color:#7891ad;color:#edf5ff}
.theme-dark .payroll-tab-panel{background:#273a50}
.theme-dark .payroll-detail-row{border-color:#6d84a0}
.theme-dark .payroll-detail-row:hover{background:#304760}
.theme-dark .payroll-detail-label,.theme-dark .payroll-source-note{color:#d5e3f3}
.theme-dark .payroll-detail-value strong,.theme-dark .payroll-detail-group h3{color:#f8fbff}
.theme-dark .payroll-detail-value strong.is-missing{color:#c6d5e7}
.theme-dark .payroll-total-row{background:#214e72}
.theme-dark .payroll-upload-summary{background:#344e69;color:#f8fbff}
.theme-dark .payroll-upload-body{background:#203247}

/* Attendance: the hero, summaries, filters, records, and supporting views. */
.theme-dark .attendance-hero{padding:19px 23px;border:1px solid #7194b7;border-inline-start:4px solid #60d6d4;border-radius:13px;background:linear-gradient(110deg,#243d58,#315775);box-shadow:0 9px 22px rgba(0,0,0,.2)}
.theme-dark .attendance-hero h1,.theme-dark .attendance-workspace-heading h2,.theme-dark .attendance-cutoff-card h2{color:#f5f9ff}
.theme-dark .attendance-hero p,.theme-dark .attendance-kicker,.theme-dark .attendance-date-badge span,.theme-dark .attendance-workspace-heading p{color:#d2e3f2}
.theme-dark .attendance-date-badge{background:#1b3045;border-color:#87a5c1}
.theme-dark .attendance-summary-grid .attendance-metric{min-height:112px;background:#30465f;border-color:#7891ae;box-shadow:0 8px 18px rgba(0,0,0,.18)}
.theme-dark .attendance-metric-copy span,.theme-dark .attendance-metric-copy small{color:#e4edf8}
.theme-dark .attendance-metric-copy small{overflow:visible;white-space:normal;line-height:1.3}
.theme-dark .attendance-metric-copy strong{color:#fff}
.theme-dark .attendance-metric.green .attendance-metric-icon{background:#145344;color:#b5f6d7}
.theme-dark .attendance-metric.red .attendance-metric-icon{background:#613440;color:#ffd2da}
.theme-dark .attendance-metric.violet .attendance-metric-icon{background:#493d6b;color:#e7d8ff}
.theme-dark .attendance-metric.amber .attendance-metric-icon{background:#614b23;color:#ffe8ae}
.theme-dark .attendance-metric.blue .attendance-metric-icon,.theme-dark .attendance-metric.navy .attendance-metric-icon{background:#214a77;color:#c5e1ff}
.theme-dark .attendance-tabs{border-color:#5a7592}
.theme-dark .attendance-tab{color:#c1e8ed}
.theme-dark .attendance-tab.active{color:#fff}
.theme-dark .attendance-tab.active::after{background:#8bdde7}
.theme-dark .attendance-workspace{background:#192a3c;border-color:#7891ad}
.theme-dark .attendance-workspace-heading{background:#344e6a;border-color:#7891ad}
.theme-dark .attendance-workspace .attendance-filters{background:#253a50;border-color:#7891ad}
.theme-dark .attendance-workspace .field label{color:#e0ebf8}
.theme-dark .attendance-workspace :is(.input,.select,.custom-select-trigger){background:#182d42;border-color:#8aa3bd;color:#f7fbff}
.theme-dark .attendance-workspace .input::placeholder{color:#c3d5e7}
.theme-dark .attendance-workspace .list-result-count{color:#e0eaf6}
.theme-dark .attendance-record-card{background:linear-gradient(#2a425c,#2a425c) padding-box,linear-gradient(90deg,#a3afff,#66ddbd) border-box;box-shadow:0 9px 21px rgba(0,0,0,.19)}
.theme-dark .attendance-record-head,.theme-dark .attendance-metrics-row,.theme-dark .attendance-metrics-row>div{background:#35516e;border-color:#7894b2}
.theme-dark .attendance-record-employee strong,.theme-dark .attendance-record-fact strong,.theme-dark .attendance-punch-value strong,.theme-dark .attendance-metrics-row strong{color:#f5f9ff}
.theme-dark .attendance-record-employee small,.theme-dark .attendance-record-fact>span,.theme-dark .attendance-record-status>span,.theme-dark .attendance-metrics-row span{color:#d0e1f1}
.theme-dark .attendance-punch-cell{background:#20364d;border-color:#7894b2}
.theme-dark .attendance-punch-label{color:#b7dcff}
.theme-dark .attendance-punch-value span,.theme-dark .attendance-punch-value.expected strong{color:#d7e7f7}
.theme-dark .attendance-punch-value.expected{border-color:#5c7896}
.theme-dark .attendance-mini-panel p,.theme-dark .attendance-cutoff-card p{color:#c9d9ea}
.theme-dark .attendance-mini-panel>strong{color:#fff}
.theme-dark .attendance-mini-panel>button{color:#aad2ff}
.theme-dark .monthly-summary-row{background:#2b4059;border-color:#607b97}
.theme-dark .monthly-summary-head{background:#304862;color:#e0ebf8}
.theme-dark .attendance-closure-period,.theme-dark .attendance-closure-approval-bar{background:var(--surface-muted);border-color:var(--line);color:var(--text)}
.theme-dark .attendance-closure-period span,.theme-dark .attendance-closure-approval-bar span{color:var(--muted)}

/* Both Shifts entry points: controls, roster cards, schedule links and helpers. */
.theme-dark .shift-tabs{background:#293e56;border-color:#5d7794}
.theme-dark .shift-tabs button{color:#d1e2f3}
.theme-dark .shift-tabs button.active{background:#3563a7;color:#fff}
.theme-dark .shift-day-picker button{background:#2b415a;border-color:#5d7896;color:#d9e9f8}
.theme-dark .shift-day-picker button.selected{background:#1e575e;border-color:#6fc9cd;color:#d4fcfa}
.theme-dark .shift-employee-picker label,.theme-dark .shift-employee-picker label:has(input:checked){background:#2a4058;border-color:#607d9c;color:#f2f7ff}
.theme-dark .shift-employee-picker label:has(input:checked){background:#2d5065;border-color:#75b7c5}
.theme-dark .shift-employee-picker small,.theme-dark .shift-upload-card p,.theme-dark .shift-schedule-heading p{color:#c9dced}
.theme-dark .shift-schedule-link{color:#b4d9ff}
.theme-dark .shift-schedule-link:hover,.theme-dark .shift-schedule-link:focus-visible{color:#b7f1ee}
.theme-dark .shift-week-off{background:#314d6a;color:#d7ecff}
.theme-dark .shift-panel,.theme-dark .shift-form,.theme-dark .shift-fixed-list,.theme-dark .shift-assignment,.theme-dark .shift-upload-card,.theme-dark .shift-schedule{background:var(--card);border-color:#59738f}
