/* Shared dark-theme contrast corrections for HR and ATWMS. */
:root[data-theme="dark"] {--muted:#b7c9de;--text-muted:#b7c9de;--primary:#8dbaff;--navy:#14283f;--panel:#0d1c2f}
:root[data-theme="dark"] :is(
.hr-login-card,.login-card,.login-body,.ops-mini-stat,.ops-card-tabs,.hr-workforce-chart-card,
.wf-ref-stat-card,.wf-ref-toolbar,.wf-ref-search,.wf-ref-table-wrap,.wf-ref-footer,.ref-table-wrap,.approval-type-tabs,
.employee-profile-module,.employee-add-module,.employee-add-body,.agent-profile-card,.agent-profile-detail,.employee-profile-body,
.dashboard-feed-card,.empty-state,.profile-shell,.profile-side,.profile-photo,.profile-coaching-summary,
.work-schedule-calendar-wrap,.work-schedule-weekdays,.request-day-summary,.work-schedule-calendar,
.coaching-picker,.coaching-option-list,.coaching-pip-checklist,.coaching-template-library,.coaching-template-library-head,.coaching-template-library-list,
.form-actions,.team-attendance-view-tabs,.sync-indicator,.biometric-step,.biometric-privacy,.message-compose-intro,
.coaching-link-modal-note,.kudus-recipient-panel,.kudus-recipient-toolbar,.department-announcement-section,.department-announcement-locked,
.team-date-calendar,.team-date-calendar-toolbar,.team-schedule-time-panel,.team-schedule-panel-head,.team-schedule-custom-time,
.team-schedule-selected-summary,.team-schedule-employee-panel,.team-schedule-employee-scroll,.wellness-record-intro,.attendance-entry-notice,.attendance-entry-section
){background:#12243a!important;color:#eef5ff!important;border-color:#38516d!important}
:root[data-theme="dark"] :is(button,.btn,.wf-subtab-btn,.approval-type-tab,.history-reset,.btn-clear-filters){background-color:#203b59!important;color:#f3f7ff!important;border-color:#59738f!important}
:root[data-theme="dark"] :is(button.active,.btn-primary,.btn-submit,.hr-login-submit,.module-tab.active,.wf-monitor-tab.active){background:#2455a4!important;color:#fff!important}
:root[data-theme="dark"] :is([class*="badge"],[class*="chip"],.stat-change,.change,.metric-sub,.ops-date-badge,.coaching-count,.count){background-color:#243d59!important;color:#eaf3ff!important;border-color:#536b85!important}
:root[data-theme="dark"] :is(.badge-green,.badge-success,.stat-change.up,.change.positive,.wf-chip.staffed){background:#12543e!important;color:#d3ffeb!important}
:root[data-theme="dark"] :is(.badge-red,.badge-danger,.wf-chip.danger){background:#702c3b!important;color:#ffe1e5!important}
:root[data-theme="dark"] :is(.badge-amber,.badge-warning,.wf-chip.pending){background:#634717!important;color:#fff0c2!important}
:root[data-theme="dark"] :is(.page-title,.page-sub){background:transparent!important}
:root[data-theme="dark"] :is(.icon,.office-kpi-icon,.attendance-coaching-icon,.employee-service-section-icon,.message-compose-intro-icon,.concern-routing-icon){background-color:#203b59!important;color:#d7e8ff!important}
:root[data-theme="dark"] :is(input,textarea,select):focus-visible,:root[data-theme="dark"] button:focus-visible{outline:2px solid #a8caff;outline-offset:2px}
:root[data-theme="dark"] a:not([class]){color:#a8caff!important;text-decoration:underline}
:root[data-theme="dark"] :is(.text-muted,.helper,.entity-sub){color:#b7c9de!important}
:root[data-theme="dark"] :is(.wf-ref-toolbar span,.wf-ref-filters span,.ref-top-bar span,.biometric-privacy span,.office-module-header i){background-color:#203b59!important;color:#eef5ff!important}
:root[data-theme="dark"] :is([style*="background:#eef5ff"],[style*="background: #fff"],[style*="background:#fff"],[style*="background: white"],[style*="background:white"]){background:#12243a!important;color:#eef5ff!important}
/* Dynamic content: these surfaces are created after sign-in or opening dialogs. */
:root[data-theme="dark"] :is(
.status-bar,.profile-coaching-metric,.profile-tag,.profile-photo,.work-schedule-day,.work-schedule-entry,.availability-detail-tabs,.availability-detail-note,.availability-people-panel,
.toast,.attendance-entry-agent,.attendance-notification-popover,.attendance-notification-card,.history-summary-detail-total,
.coaching-form-head,.coaching-form-step,.tl-analytics-stat,.tl-analytics-panel,.tl-analytics-panel h4,.tl-analytics-agent-item,
.coaching-case-panel,.coaching-thread-panel,.coaching-case-panel-body,.coaching-disclosure,.coaching-thread-message,.coaching-thread-expanded,
.kudus-agent-option,.team-date-option,.team-schedule-group-head,.team-schedule-time-card,.kudus-team-label,.approval-list-item,.approval-detail-reason,.dashboard-feed-item,
.message-conversation,.message-bubble,.announcement-detail-recipient,.attendance-punch-source,
.ops-module-tag,.status-open,.status-elevated,.status-investigating,.status-overdue,.hr-upload-box,.thread-msg,.notif-item,.approval-review-reason,
.employee-leave-history,.leave-history-stat,.leave-history-table-wrap,.employee-profile-left,.employee-profile-right,.employee-profile-id,.employee-tag,.employee-req-pill,
.employee-optional-details,.employee-editor-modal,.employee-editor-scroll,.employee-editor-reason,.employee-editor-section,.employee-editor-footer,.hr-biometric-note,
.agent-profile-fact,.agent-profile-doc,.ref-card,.ref-value,.ref-summary-item,.workforce-group-summary>div,.workforce-member-choice,
.wellness-profile,.wellness-alert,.wellness-stat-row,.wellness-stat-card,.wellness-tabs,.wellness-tab,.wellness-info-card,.wellness-safety-item,.wellness-note-panel,.wellness-footer,
.hr-coaching-panel,.hr-coaching-panel-title,.hr-coaching-disclosure>summary,.hr-coaching-linked-record,.kudos-detail-hero,.kudos-detail-icon,.kudos-detail-meta-item,.kudos-detail-message,
.hr-coaching-entry,.hr-coaching-action-form,.communication-section,.pip-form-section,.benefit-section-title
){background:#14283f!important;color:#eef5ff!important;border-color:#38516d!important}
:root[data-theme="dark"] :is(.profile-coaching-metric strong,.profile-coaching-metric span,.profile-tag,.work-schedule-date,.work-schedule-unscheduled){color:#eef5ff!important}
:root[data-theme="dark"] .ip-banner.ip-allowed{background:#12543e!important;color:#d3ffeb!important;border-color:#428b70!important}
:root[data-theme="dark"] .ip-banner.ip-blocked{background:#702c3b!important;color:#ffe1e5!important;border-color:#ac6370!important}
:root[data-theme="dark"] .ip-banner :is(span,i){color:inherit!important}
:root[data-theme="dark"] .work-schedule-day:is(.is-empty,.is-adjacent-month){background:#0d1c2f!important}
:root[data-theme="dark"] .work-schedule-day.is-today .work-schedule-date{background:#2455a4!important;color:white!important}
:root[data-theme="dark"] button.work-schedule-day:hover{background:#203b59!important;box-shadow:inset 0 0 0 2px #8dbaff}
:root[data-theme="dark"] .profile-photo{background:#29496a!important}
:root[data-theme="dark"] .tl-analytics-pie::after{background:#14283f!important}
/* Payslips retain paper colors for reading and printing. */
:root[data-theme="dark"] .payslip-doc,:root[data-theme="dark"] .payslip-doc *{color:#14283f!important}
:root[data-theme="dark"] .payslip-doc,:root[data-theme="dark"] .payslip-doc :is(table,tbody,tr,td,th){background:#fff!important}
:root[data-theme="dark"] .profile-initials{background:#29496a!important;color:#eef5ff!important}
:root[data-theme="dark"] .modal-box:is(.employee-profile-box,.wellness-profile-box),
:root[data-theme="dark"] :is(.employee-photo,.employee-profile-role,.employee-req-edit){background:#14283f!important;color:#eef5ff!important;border-color:#38516d!important}
:root[data-theme="dark"] #page-hr-records-request .form-section.ui-polished-panel>h3{background:#14283f!important;color:#eef5ff!important;border-color:#38516d!important}
:root[data-theme="dark"] .availability-day{background:#14283f!important;color:#eef5ff!important;border-left-color:#68afff!important}
:root[data-theme="dark"] .availability-day .availability-label{background:transparent!important;border:0!important;color:inherit!important}
:root[data-theme="dark"] .availability-day .availability-alert{color:#ffda91!important}
