/**
 * Dark theme overrides. Applied when html/body has class theme-dark.
 * Site-wide: html and body for full viewport coverage; main, header, footer, containers, nav links.
 * Clients dashboard: cards, tables, status pills.
 */
html.theme-dark,
html.theme-dark body,
body.theme-dark {
    background-color: #1a1d21 !important;
    color: #e4e6eb;
    min-height: 100%;
}

/* Bootstrap/OneUI table variables – override so .table>:not(caption)>*>* use dark bg (fixes dashboard & all .table) */
html.theme-dark,
body.theme-dark {
    --bs-table-bg: #25282c;
    --bs-table-color: #e4e6eb;
    --bs-table-border-color: #3e4348;
    --bs-table-accent-bg: rgba(255, 255, 255, 0.03);
}
/* Force table cell vars and visuals in dark mode (OneUI/_utilities set these on .table, so re-apply here) */
body.theme-dark .table,
html.theme-dark .table {
    --bs-table-bg: #25282c;
    --bs-table-color: #e4e6eb;
    --bs-table-accent-bg: #25282c;
    --bs-table-bg-state: #25282c;
    --bs-table-bg-type: #25282c;
}
/* Direct override for .table>:not(caption)>*>* so background and box-shadow are always dark */
body.theme-dark .table > :not(caption) > * > *,
html.theme-dark .table > :not(caption) > * > * {
    background-color: #25282c !important;
    box-shadow: inset 0 0 0 9999px #25282c !important;
    color: #e4e6eb !important;
}

body.theme-dark main,
body.theme-dark #main-container,
body.theme-dark .container {
    background-color: #1a1d21;
    color: #e4e6eb;
}
body.theme-dark .border-top,
body.theme-dark .border-bottom {
    border-color: #3e4348 !important;
}
body.theme-dark header,
body.theme-dark .d-flex.border-bottom {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
}
body.theme-dark .nav-link,
body.theme-dark .link-body-emphasis,
body.theme-dark a.nav-link {
    color: #b0b3b8 !important;
}
body.theme-dark .nav-link:hover,
body.theme-dark a.nav-link:hover {
    color: #e4e6eb !important;
}
body.theme-dark footer {
    background-color: #25282c;
    border-color: #3e4348;
}
body.theme-dark .text-body-secondary,
body.theme-dark footer p {
    color: #b0b3b8 !important;
}

/* Cards and content areas (Donors report dashboard + any dashboard cards) */
body.theme-dark .dashboard-card,
body.theme-dark #main-container .dashboard-card,
body.theme-dark #report_content_container .dashboard-card,
body.theme-dark .reports-dashboard-grid .dashboard-card,
html.theme-dark #report_content_container .dashboard-card {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
}
body.theme-dark .dashboard-card-header,
body.theme-dark #report_content_container .dashboard-card-header,
html.theme-dark #report_content_container .dashboard-card-header {
    background-color: #2d3136 !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .dashboard-card-body,
body.theme-dark .dashboard-card-body-scroll,
body.theme-dark #report_content_container .dashboard-card-body,
html.theme-dark #report_content_container .dashboard-card-body,
html.theme-dark #report_content_container .dashboard-card-body-scroll {
    background-color: #25282c !important;
    color: #e4e6eb !important;
}
body.theme-dark .dashboard-card-footer,
html.theme-dark #report_content_container .dashboard-card-footer {
    border-color: #3e4348 !important;
    background-color: #25282c !important;
}

/* Clients dashboard tables */
body.theme-dark .clients-dash-table th,
body.theme-dark .clients-dash-table td {
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .clients-dash-table th {
    color: #b0b3b8 !important;
}
body.theme-dark .dash-link {
    color: #8ab4f8 !important;
}
body.theme-dark .dash-link:hover {
    color: #aecbfa !important;
}
body.theme-dark .dash-empty {
    color: #b0b3b8 !important;
}

/* Status pills in dark mode – keep readable contrast */
body.theme-dark .status-new {
    background: #1e3a5f;
    color: #90caf9;
}
body.theme-dark .status-review {
    background: #5c4a1a;
    color: #ffcc80;
}
body.theme-dark .status-rfai {
    background: #5c1a1a;
    color: #ef9a9a;
}
body.theme-dark .status-ready {
    background: #1a3a35;
    color: #80cbc4;
}
body.theme-dark .status-approved {
    background: #1b3a1e;
    color: #a5d6a7;
}
body.theme-dark .status-pending {
    color: #b0b3b8;
}
body.theme-dark .status-responded {
    background: #1b3a1e;
    color: #a5d6a7;
}
body.theme-dark .dash-warning {
    color: #ffab91;
}

/* Bootstrap overrides in dark theme */
body.theme-dark .card {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
    color: #e4e6eb;
}
body.theme-dark .table {
    color: #e4e6eb;
}
body.theme-dark .table th,
body.theme-dark .table td {
    border-color: #3e4348;
}
body.theme-dark .form-control,
body.theme-dark .form-select {
    background-color: #2d3136;
    border-color: #3e4348;
    color: #e4e6eb;
}
body.theme-dark .form-control::placeholder {
    color: #8a8f94;
}

/* Dropdown menus (nav area) */
body.theme-dark .dropdown-menu {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
}
body.theme-dark .dropdown-item {
    color: #e4e6eb !important;
}
body.theme-dark .dropdown-item:hover,
body.theme-dark .dropdown-item:focus {
    background-color: #2d3136 !important;
    color: #e4e6eb !important;
}
body.theme-dark .dropdown-divider {
    border-color: #3e4348 !important;
}

/* Nav tabs and pills – active tab (e.g. Donors Dashboard) */
body.theme-dark .nav-tabs .nav-link.active,
body.theme-dark .nav-pills .nav-link.active {
    background-color: #2d3136 !important;
    border-color: #3e4348 #3e4348 transparent !important;
    color: #e4e6eb !important;
}
body.theme-dark .nav-tabs .nav-link:not(.active) {
    color: #d1d3d6 !important;
}
body.theme-dark .nav-tabs {
    border-color: #3e4348 !important;
}

/* Donors (and similar) search/filter bar – override light utility */
body.theme-dark .bg-info-light,
body.theme-dark #donor_search_table {
    background-color: #2d3136 !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}

/* jQuery UI tabs (Donors, Employees, Donors Reports submenus) – dark tab bar, readable unselected text */
body.theme-dark #tabs_donors_submenu.ui-tabs,
body.theme-dark #tabs_donors_submenu .ui-tabs-nav,
body.theme-dark #tabs_donors_submenu .ui-tabs-panel,
body.theme-dark #tabs_employee_submenu.ui-tabs,
body.theme-dark #tabs_employee_submenu .ui-tabs-nav,
body.theme-dark #tabs_employee_submenu .ui-tabs-panel,
body.theme-dark #tabs_report_submenu.ui-tabs,
body.theme-dark #tabs_report_submenu .ui-tabs-nav,
body.theme-dark #tabs_report_submenu .ui-tabs-panel {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
/* Unselected tab items – dark bg (override jQuery UI light grey), brighter text for readability */
body.theme-dark #tabs_donors_submenu .ui-tabs-nav li,
body.theme-dark #tabs_employee_submenu .ui-tabs-nav li,
body.theme-dark #tabs_report_submenu .ui-tabs-nav li {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
}
body.theme-dark #tabs_donors_submenu .ui-tabs-nav li.ui-state-default a,
body.theme-dark #tabs_donors_submenu .ui-tabs-nav .ui-tabs-tab a,
body.theme-dark #tabs_employee_submenu .ui-tabs-nav li.ui-state-default a,
body.theme-dark #tabs_employee_submenu .ui-tabs-nav .ui-tabs-tab a,
body.theme-dark #tabs_report_submenu .ui-tabs-nav li.ui-state-default a,
body.theme-dark #tabs_report_submenu .ui-tabs-nav li a {
    color: #d1d3d6 !important;
    background-color: transparent !important;
}
body.theme-dark #tabs_donors_submenu .ui-tabs-nav li.ui-state-active a,
body.theme-dark #tabs_donors_submenu .ui-tabs-nav .ui-state-active a,
body.theme-dark #tabs_employee_submenu .ui-tabs-nav li.ui-state-active a,
body.theme-dark #tabs_employee_submenu .ui-tabs-nav .ui-state-active a,
body.theme-dark #tabs_report_submenu .ui-tabs-nav li.ui-state-active a {
    background-color: #2d3136 !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}

/* jQuery UI dialogs (modals) */
body.theme-dark .ui-dialog,
body.theme-dark .ui-widget-content.ui-dialog-content {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .ui-dialog .ui-dialog-titlebar,
body.theme-dark .ui-widget-header {
    background: #2d3136 !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .ui-dialog .ui-dialog-title,
body.theme-dark .ui-dialog .ui-dialog-titlebar-close {
    color: #e4e6eb !important;
}
body.theme-dark .ui-widget-overlay {
    background: #000 !important;
    opacity: 0.5 !important;
}

/* Table row striping (style.css .row0, .row1, .row2, .row3) – tr and td */
body.theme-dark .row0,
body.theme-dark tr.row0,
body.theme-dark tr.row0 td,
body.theme-dark td.row0 {
    background-color: #25282c !important;
    color: #e4e6eb !important;
}
body.theme-dark .row1,
body.theme-dark tr.row1,
body.theme-dark tr.row1 td,
body.theme-dark td.row1 {
    background-color: #2d3136 !important;
    color: #e4e6eb !important;
}
body.theme-dark .row2,
body.theme-dark .row3 {
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .row0_highlight,
body.theme-dark .row1_highlight {
    background-color: #3d4f5c !important;
    color: #e4e6eb !important;
}

/* Buttons – secondary/light so they’re visible in dark */
body.theme-dark .btn-light {
    background-color: #2d3136 !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .btn-light:hover {
    background-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .btn-secondary {
    background-color: #3e4348 !important;
    border-color: #4a5056 !important;
    color: #e4e6eb !important;
}

/* Generic links inside main content */
body.theme-dark a:not(.nav-link):not(.dropdown-item):not(.btn) {
    color: #8ab4f8 !important;
}
body.theme-dark a:not(.nav-link):not(.dropdown-item):not(.btn):hover {
    color: #aecbfa !important;
}

/* Donors reports dashboard – cards and metrics (higher specificity for AJAX-loaded content) */
body.theme-dark #report_content_container .reports-dashboard-grid,
body.theme-dark .reports-dashboard-grid,
body.theme-dark .dashboard-card-title,
body.theme-dark #report_content_container .dashboard-card-title {
    color: #e4e6eb !important;
}
body.theme-dark #report_content_container .dashboard-fulfillment-table th,
body.theme-dark #report_content_container .dashboard-fulfillment-table td,
body.theme-dark #report_content_container .dashboard-mtd-table th,
body.theme-dark #report_content_container .dashboard-mtd-table td,
body.theme-dark .dashboard-fulfillment-table th,
body.theme-dark .dashboard-fulfillment-table td,
body.theme-dark .dashboard-mtd-table th,
body.theme-dark .dashboard-mtd-table td {
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark #report_content_container .dashboard-card-placeholder {
    border-color: #3e4348 !important;
    background-color: #25282c !important;
}
body.theme-dark #report_content_container .dashboard-card a,
body.theme-dark .reports-dashboard-grid .dashboard-card a {
    color: #8ab4f8 !important;
}
body.theme-dark #report_content_container .dashboard-card a:hover,
body.theme-dark .reports-dashboard-grid .dashboard-card a:hover {
    color: #aecbfa !important;
}
body.theme-dark #report_content_container,
html.theme-dark #report_content_container {
    background-color: #1a1d21 !important;
    color: #e4e6eb !important;
}
/* Force dashboard cards and tables dark (overrides inline styles that load after this sheet) */
html.theme-dark #report_content_container .reports-dashboard-grid,
html.theme-dark #report_content_container .dashboard-card-title {
    color: #e4e6eb !important;
}
html.theme-dark #report_content_container .dashboard-fulfillment-table th,
html.theme-dark #report_content_container .dashboard-fulfillment-table td,
html.theme-dark #report_content_container .dashboard-mtd-table th,
html.theme-dark #report_content_container .dashboard-mtd-table td {
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .dashboard-mtd-row {
    border-color: #3e4348 !important;
}
body.theme-dark .dashboard-mtd-label,
body.theme-dark .dashboard-today-stats__hero-label,
body.theme-dark .dashboard-today-stats__section-title,
body.theme-dark .dashboard-today-stats__stat-label {
    color: #b0b3b8 !important;
}
body.theme-dark .dashboard-mtd-value,
body.theme-dark .dashboard-today-stats__hero-value,
body.theme-dark .dashboard-today-stats__stat-value {
    color: #e4e6eb !important;
}
body.theme-dark .dashboard-card-loading {
    color: #b0b3b8 !important;
}
body.theme-dark .dashboard-card-refreshing .dashboard-card-body::after {
    background: rgba(37, 40, 44, 0.9) !important;
    color: #b0b3b8 !important;
}
/* Donors dashboard – hero stat boxes */
body.theme-dark .dashboard-today-stats__hero-item {
    background: #2d3136 !important;
    border-color: #3e4348 !important;
}
body.theme-dark .dashboard-today-stats__hero-item--money {
    background: #1b3a1e !important;
    border-color: #2d4a30 !important;
}
body.theme-dark .dashboard-today-stats__hero-item--money .dashboard-today-stats__hero-value {
    color: #a5d6a7 !important;
}
body.theme-dark .dashboard-today-stats__hero-item--rate {
    background: #1e3a5f !important;
    border-color: #2d4a6f !important;
}
body.theme-dark .dashboard-today-stats__hero-item--rate .dashboard-today-stats__hero-value {
    color: #90caf9 !important;
}
body.theme-dark .dashboard-today-stats__section-title {
    border-color: #3e4348 !important;
}
/* CC/hr bands in dark (keep semantic colors, darker bg) */
body.theme-dark .dashboard-cc-hr--red {
    color: #ef9a9a !important;
}
body.theme-dark .dashboard-cc-hr--yellow {
    color: #ffcc80 !important;
}
body.theme-dark .dashboard-cc-hr--green {
    color: #a5d6a7 !important;
}
body.theme-dark .dashboard-today-stats__hero-item--cc-hr-red {
    background: #5c1a1a !important;
    border-color: #7a2222 !important;
}
body.theme-dark .dashboard-today-stats__hero-item--cc-hr-red .dashboard-today-stats__hero-value {
    color: #ef9a9a !important;
}
body.theme-dark .dashboard-today-stats__hero-item--cc-hr-yellow {
    background: #5c4a1a !important;
    border-color: #7a6222 !important;
}
body.theme-dark .dashboard-today-stats__hero-item--cc-hr-yellow .dashboard-today-stats__hero-value {
    color: #ffcc80 !important;
}
body.theme-dark .dashboard-today-stats__hero-item--cc-hr-green {
    background: #1b3a1e !important;
    border-color: #2d4a30 !important;
}
body.theme-dark .dashboard-today-stats__hero-item--cc-hr-green .dashboard-today-stats__hero-value {
    color: #a5d6a7 !important;
}

/* Popovers / settings (Donors dashboard) */
body.theme-dark .dashboard-card-info-popover,
body.theme-dark .dashboard-card-settings-popover {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}

/* Progress bar */
body.theme-dark #progress-wrp {
    background: #2d3136 !important;
    border-color: #3e4348 !important;
}
body.theme-dark #progress-wrp .status {
    color: #e4e6eb !important;
}

/* Labels and headings in content */
body.theme-dark label,
body.theme-dark .form-label {
    color: #e4e6eb !important;
}
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3,
body.theme-dark h4, body.theme-dark h5, body.theme-dark h6 {
    color: #e4e6eb !important;
}

/* DataTables (if used) – avoid white background */
body.theme-dark .dataTables_wrapper {
    color: #e4e6eb !important;
}
/* Bootstrap .table-striped and DataTables .odd/.even – dark alternating rows */
body.theme-dark .table-striped > tbody > tr,
body.theme-dark .table-striped > tbody > tr:nth-of-type(odd),
body.theme-dark .table-striped > tbody > tr.odd,
body.theme-dark table#donor_table tbody tr,
body.theme-dark table#donor_table tbody tr.odd {
    background-color: #25282c !important;
    color: #e4e6eb !important;
}
body.theme-dark .table-striped > tbody > tr:nth-of-type(even),
body.theme-dark .table-striped > tbody > tr.even,
body.theme-dark table#donor_table tbody tr.even {
    background-color: #2d3136 !important;
    color: #e4e6eb !important;
}
body.theme-dark .table-striped > tbody > tr > td,
body.theme-dark table#donor_table tbody tr > td {
    background-color: inherit !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .table-hover > tbody > tr:hover {
    background-color: #3e4348 !important;
}
body.theme-dark .table-hover > tbody > tr:hover > td {
    background-color: #3e4348 !important;
}

/* Dark mode switch in footer – ensure visible */
body.theme-dark .form-check-input {
    background-color: #2d3136;
    border-color: #3e4348;
}
body.theme-dark .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}
body.theme-dark .form-check-label {
    color: #b0b3b8 !important;
}

/* ========== Dark mode review – section blocks, tables, nav, inputs ========== */

/* Main content area – ensure no white panel (AJAX-loaded content) */
body.theme-dark #main-container,
body.theme-dark #main-container > div {
    background-color: #1a1d21 !important;
    color: #e4e6eb !important;
}
/* Section block (wraps list views) – dark background so content panel isn’t white */
body.theme-dark .block {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .block-content {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
/* Section header bar (CHARITY MANAGEMENT, DONORS, CLIENT MANAGEMENT, etc.) */
body.theme-dark .block-header,
body.theme-dark .block-header.bg-primary-light,
body.theme-dark .ui-corner-all.block-header.bg-primary-light {
    background-color: #2d3136 !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .block-title,
body.theme-dark .block-header .block-title,
body.theme-dark .display-6,
body.theme-dark .display-9 {
    color: #e4e6eb !important;
}

/* Main nav pills – active item: dark bg + light text (not light bg) */
body.theme-dark .nav-pills .nav-link.active,
body.theme-dark .nav-pills .nav-link.show,
body.theme-dark header .nav-pills .nav-link.active {
    background-color: #2d3136 !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
/* Dropdown toggle arrow in header – visible in dark */
body.theme-dark .nav-link.dropdown-toggle::after,
body.theme-dark header .nav-pills .dropdown-toggle::after {
    border-top-color: #b0b3b8 !important;
    opacity: 1;
}

/* Secondary tabs (Bootstrap nav-tabs) – active dark, unselected readable */
body.theme-dark .nav-tabs .nav-link.active {
    background-color: #2d3136 !important;
    border-color: #3e4348 #3e4348 transparent !important;
    color: #e4e6eb !important;
}
body.theme-dark .nav-tabs .nav-link:not(.active) {
    background-color: transparent !important;
    color: #d1d3d6 !important;
}
body.theme-dark .nav-tabs .nav-link:not(.active):hover {
    color: #e4e6eb !important;
}
body.theme-dark .nav-tabs {
    border-bottom-color: #3e4348 !important;
}

/* Employee reports subtabs (KPI Report, Chain of Command) – readable inactive text */
body.theme-dark #tabs_employee_reports.employee-reports-container .employee-reports-nav {
    border-bottom-color: #3e4348 !important;
}
body.theme-dark #tabs_employee_reports .employee-reports-nav a {
    color: #d1d3d6 !important;
}
body.theme-dark #tabs_employee_reports .employee-reports-nav a:hover {
    color: #e4e6eb !important;
}
body.theme-dark #tabs_employee_reports .employee-reports-nav li.ui-tabs-active a {
    color: #e4e6eb !important;
    border-bottom-color: #6b9bd1 !important;
}

/* Nice-table and generic tables – header row (row2) and cells dark */
body.theme-dark .nice-table,
body.theme-dark table.nice-table {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .nice-table th,
body.theme-dark .nice-table td,
body.theme-dark .nice-table thead th,
body.theme-dark table.nice-table th,
body.theme-dark table.nice-table td {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .row2,
body.theme-dark th.row2,
body.theme-dark td.row2 {
    background-color: #2d3136 !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .row2 a {
    color: #8ab4f8 !important;
}
body.theme-dark .row2 a:hover {
    color: #aecbfa !important;
}
/* Alternating rows inside tables (row0/row1 already in theme-dark) – ensure nice-table body rows */
body.theme-dark .nice-table tbody tr:nth-of-type(odd),
body.theme-dark .nice-table tbody tr.row0 {
    background-color: #25282c !important;
}
body.theme-dark .nice-table tbody tr:nth-of-type(even),
body.theme-dark .nice-table tbody tr.row1 {
    background-color: #2d3136 !important;
}

/* DataTables – wrapper and table header */
body.theme-dark .dataTables_wrapper,
body.theme-dark .dataTables_wrapper .dataTables_scroll,
body.theme-dark table.dataTable {
    background-color: #25282c !important;
    color: #e4e6eb !important;
}
body.theme-dark table.dataTable thead th,
body.theme-dark table.dataTable thead td,
body.theme-dark table.dataTable thead {
    background-color: #2d3136 !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark table.dataTable tbody tr {
    background-color: #25282c !important;
    color: #e4e6eb !important;
}
body.theme-dark table.dataTable tbody tr:nth-child(odd) {
    background-color: #25282c !important;
}
body.theme-dark table.dataTable tbody tr:nth-child(even) {
    background-color: #2d3136 !important;
}
body.theme-dark table.dataTable thead th a,
body.theme-dark table.dataTable thead td a {
    color: #8ab4f8 !important;
}

/* Default .btn (e.g. Add when not .btn-primary) – dark in dark mode */
body.theme-dark .btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info) {
    background-color: #3e4348 !important;
    border-color: #4a5056 !important;
    color: #e4e6eb !important;
}
body.theme-dark .btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):hover {
    background-color: #4a5056 !important;
    color: #e4e6eb !important;
}

/* Select2 – dark dropdown and input */
body.theme-dark .select2-container--default .select2-selection--single,
body.theme-dark .select2-container--default .select2-selection--multiple {
    background-color: #2d3136 !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e4e6eb !important;
}
body.theme-dark .select2-dropdown {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
}
body.theme-dark .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #2d3136 !important;
    color: #e4e6eb !important;
}
body.theme-dark .select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #3e4348 !important;
    color: #e4e6eb !important;
}

/* Scrollbars – dark track/thumb */
body.theme-dark ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
body.theme-dark ::-webkit-scrollbar-track {
    background: #1a1d21;
}
body.theme-dark ::-webkit-scrollbar-thumb {
    background: #3e4348;
    border-radius: 6px;
}
body.theme-dark ::-webkit-scrollbar-thumb:hover {
    background: #4a5056;
}

/* Focus outline – subtle for dark (e.g. Reports tab) */
body.theme-dark .nav-tabs .nav-link:focus-visible,
body.theme-dark .nav-pills .nav-link:focus-visible {
    outline: 1px solid #4a5056;
    outline-offset: 2px;
}

/* Checkboxes in tables – darker so they don’t glare */
body.theme-dark input[type="checkbox"].form-check-input {
    background-color: #2d3136 !important;
    border-color: #4a5056 !important;
}
body.theme-dark input[type="checkbox"].form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Dashboard cards – stat boxes and values (e.g. Pledged 30d) – ensure text contrast */
body.theme-dark .dashboard-card-body p,
body.theme-dark .dashboard-card-body span:not([class*="bg-"]),
body.theme-dark .dashboard-card-body td,
body.theme-dark .dashboard-card-body th {
    color: #e4e6eb !important;
}
/* Dashboard card tables (Today's CC Top/Bottom 5, timecard, etc.) – no white background */
body.theme-dark .dashboard-card-body .table,
body.theme-dark .dashboard-card-body table,
html.theme-dark #report_content_container .dashboard-card-body .table,
html.theme-dark #report_content_container .dashboard-card-body table {
    background-color: #25282c !important;
    color: #e4e6eb !important;
    border-color: #3e4348 !important;
}
body.theme-dark .dashboard-card-body .table th,
body.theme-dark .dashboard-card-body .table td,
body.theme-dark .dashboard-card-body table th,
body.theme-dark .dashboard-card-body table td,
html.theme-dark #report_content_container .dashboard-card-body .table th,
html.theme-dark #report_content_container .dashboard-card-body .table td,
html.theme-dark #report_content_container .dashboard-card-body table th,
html.theme-dark #report_content_container .dashboard-card-body table td {
    background-color: #25282c !important;
    color: #e4e6eb !important;
    border-color: #3e4348 !important;
}
body.theme-dark .dashboard-card-info-popover,
body.theme-dark .dashboard-card-settings-popover {
    background-color: #25282c !important;
    border-color: #3e4348 !important;
    color: #e4e6eb !important;
}
body.theme-dark .dashboard-card-info-popover dt,
body.theme-dark .dashboard-card-settings-popover label {
    color: #b0b3b8 !important;
}
body.theme-dark .dashboard-card-info-icon,
body.theme-dark .dashboard-card-settings-icon {
    background-color: transparent !important;
    border-color: #4a5056 !important;
    color: #b0b3b8 !important;
}
body.theme-dark .dashboard-card-info-icon:hover,
body.theme-dark .dashboard-card-settings-icon:hover {
    background-color: #3e4348 !important;
    color: #e4e6eb !important;
}

/* Badge / “X Found” and similar – dark */
/* Answer Times heat map: cell backgrounds are light (scaled by intensity); keep text dark so % is readable */
body.theme-dark .answer-times-heatmap .heatmap-cell,
html.theme-dark .answer-times-heatmap .heatmap-cell {
    color: #1a1d21 !important;
}

body.theme-dark .badge.bg-light,
body.theme-dark .badge.bg-secondary {
    background-color: #3e4348 !important;
    color: #e4e6eb !important;
}
