/* Dark theme for Coliban Group CORE. Light mode is the existing page CSS. */
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c0f14;
    --surface: #151a22;
    --surface2: #1c2330;
    --border: #2a3444;
    --text: #e8edf5;
    --muted: #8b9cb3;
    --accent: #dc2626;
    --link: #fca5a5;
    --ok: #22c55e;
    --warn: #eab308;
    --err: #ef4444;
}

html[data-theme="dark"] body {
    background: var(--bg) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .header {
    background-color: #d32f2f !important;
    color: #fff !important;
}

html[data-theme="dark"] .content,
html[data-theme="dark"] .dashboard-content,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .admin-content,
html[data-theme="dark"] .admin-nav,
html[data-theme="dark"] .reports-content,
html[data-theme="dark"] .report-section,
html[data-theme="dark"] .help-sidebar,
html[data-theme="dark"] .help-section,
html[data-theme="dark"] .content-box,
html[data-theme="dark"] .db-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-back .modal,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .feedback-item,
html[data-theme="dark"] .feedback-dropdown-content,
html[data-theme="dark"] .day-column,
html[data-theme="dark"] .appliance-item,
html[data-theme="dark"] .resource-card,
html[data-theme="dark"] .search-results,
html[data-theme="dark"] .search-result,
html[data-theme="dark"] .person-results,
html[data-theme="dark"] .booking,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .section,
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .accordion-item,
html[data-theme="dark"] .accordion-button,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .popover {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .feedback-message {
    background-color: var(--bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
}

html[data-theme="dark"] .feedback-subject {
    color: var(--text) !important;
}

html[data-theme="dark"] .feedback-meta {
    color: var(--muted) !important;
}

html[data-theme="dark"] .day-column.today {
    background-color: #2a1518 !important;
    border-color: #dc2626 !important;
}

html[data-theme="dark"] .date-range-btn {
    background-color: var(--surface2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] #dateRange {
    background: transparent !important;
    color: inherit !important;
}
html[data-theme="dark"] .readiness-picker {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .picker-head strong,
html[data-theme="dark"] .picker-nav,
html[data-theme="dark"] .picker-week,
html[data-theme="dark"] .picker-day {
    background-color: transparent !important;
    color: var(--text) !important;
    border-color: transparent !important;
}
html[data-theme="dark"] .picker-nav:hover,
html[data-theme="dark"] .picker-week:hover,
html[data-theme="dark"] .picker-day:hover {
    background-color: var(--surface2) !important;
}
html[data-theme="dark"] .picker-day.outside,
html[data-theme="dark"] .picker-dow,
html[data-theme="dark"] .picker-legend,
html[data-theme="dark"] .picker-note {
    color: var(--muted) !important;
}
html[data-theme="dark"] .picker-week,
html[data-theme="dark"] .date-range-btn:hover,
html[data-theme="dark"] .date-range-btn[aria-expanded="true"] {
    color: #fca5a5 !important;
}
html[data-theme="dark"] .picker-day.in-view {
    background-color: #2a1518 !important;
    border-color: #dc2626 !important;
}
html[data-theme="dark"] .picker-day.today {
    box-shadow: inset 0 0 0 1px #fca5a5 !important;
}

html[data-theme="dark"] .day-bdo,
html[data-theme="dark"] .day-brigade-status {
    background-color: var(--surface2) !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
    box-shadow: none !important;
}
html[data-theme="dark"] .day-bdo-title,
html[data-theme="dark"] .day-status-title {
    color: #fca5a5 !important;
}
html[data-theme="dark"] .member-quals .qual-more {
    color: var(--text) !important;
    border-color: var(--border) !important;
    background: transparent !important;
}

.card-header.duty-week-header,
html[data-theme="dark"] .card-header.duty-week-header {
    background-color: #d32f2f !important;
    color: #fff !important;
    border-color: #b91c1c !important;
}
.card-header.duty-week-header.next,
html[data-theme="dark"] .card-header.duty-week-header.next {
    background-color: #7f1d1d !important;
    border-color: #7f1d1d !important;
}
.card-header.duty-week-header .week-range,
html[data-theme="dark"] .card-header.duty-week-header .week-range,
html[data-theme="dark"] .card-header.duty-week-header h5 {
    color: #fff !important;
}

html[data-theme="dark"] .card-header:not(.bg-primary):not(.bg-success):not(.bg-warning):not(.bg-danger):not(.bg-info):not(.bg-secondary):not(.duty-week-header),
html[data-theme="dark"] .modal-header:not(.bg-primary):not(.bg-success):not(.bg-warning):not(.bg-danger):not(.bg-info),
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .card h2,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .crew-member,
html[data-theme="dark"] .duty-roster-details,
html[data-theme="dark"] .appliances-header,
html[data-theme="dark"] .compact-day-header {
    background-color: var(--surface2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .day-header,
html[data-theme="dark"] .day-header.today,
html[data-theme="dark"] .bar {
    background-color: #d32f2f !important;
    color: #fff !important;
}

html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .table-light {
    background-color: var(--surface2) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-body,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] label,
html[data-theme="dark"] dt,
html[data-theme="dark"] .member-name,
html[data-theme="dark"] .crew-role,
html[data-theme="dark"] strong {
    color: var(--text) !important;
}

html[data-theme="dark"] .appliance-callsign,
html[data-theme="dark"] .help-section h2,
html[data-theme="dark"] .help-sidebar h3,
html[data-theme="dark"] .report-section h3 {
    color: var(--link) !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .db-host,
html[data-theme="dark"] .search-results .member-name,
html[data-theme="dark"] .search-results .member-name * {
    color: #f8fafc !important;
}

html[data-theme="dark"] .search-results .member-details {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .search-result:hover {
    background-color: #243044 !important;
}

html[data-theme="dark"] .search-separator,
html[data-theme="dark"] .search-separator span {
    background-color: #151a22 !important;
    color: #cbd5e1 !important;
    border-color: #2a3444 !important;
}

html[data-theme="dark"] .search-result-create {
    background-color: #172554 !important;
    border-top-color: #38bdf8 !important;
}

html[data-theme="dark"] .search-result-create .member-name,
html[data-theme="dark"] .search-result-create .member-details {
    color: #7dd3fc !important;
}

html[data-theme="dark"] .crew-member-item {
    background-color: #1c2330 !important;
    border-color: #2a3444 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .crew-member-item span {
    color: #f8fafc !important;
}

html[data-theme="dark"] .drop-zone {
    background-color: #1c2330 !important;
    border-color: #3d4d63 !important;
    color: #e8edf5 !important;
}

html[data-theme="dark"] .drop-zone [style*="color: #6c757d"],
html[data-theme="dark"] .drop-zone [style*="color:#6c757d"] {
    color: #8b9cb3 !important;
}

html[data-theme="dark"] .member-details,
html[data-theme="dark"] .appliance-crew,
html[data-theme="dark"] small,
html[data-theme="dark"] .form-text {
    color: var(--muted) !important;
}

html[data-theme="dark"] a:not(.nav-link):not(.btn):not(.badge):not(.page-link) {
    color: var(--link) !important;
}

html[data-theme="dark"] a.back-link,
html[data-theme="dark"] .help-toc a {
    color: var(--link) !important;
}

html[data-theme="dark"] .help-toc a.active,
html[data-theme="dark"] .seg button.on,
html[data-theme="dark"] .btn-primary {
    background-color: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}

html[data-theme="dark"] .admin-controls,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .request-card,
html[data-theme="dark"] .request-message,
html[data-theme="dark"] .editor-container,
html[data-theme="dark"] .strike-team-list,
html[data-theme="dark"] .strike-team-item,
html[data-theme="dark"] .adhoc-vehicle-selector,
html[data-theme="dark"] .report-preview,
html[data-theme="dark"] .view-selector {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .help-section-content,
html[data-theme="dark"] .help-section-content p,
html[data-theme="dark"] .help-section-content li,
html[data-theme="dark"] .help-section-content span,
html[data-theme="dark"] .help-section-content td,
html[data-theme="dark"] .section-card-info h4,
html[data-theme="dark"] .section-card-info p,
html[data-theme="dark"] .request-meta,
html[data-theme="dark"] .empty-state {
    color: var(--text) !important;
}

html[data-theme="dark"] .help-section-content h1,
html[data-theme="dark"] .help-section-content h2,
html[data-theme="dark"] .help-section-content h3,
html[data-theme="dark"] .help-section-content h4,
html[data-theme="dark"] .request-title {
    color: var(--link) !important;
}

html[data-theme="dark"] .help-section-content a,
html[data-theme="dark"] .help-section-content a[style*="color"],
html[data-theme="dark"] .help-section-content a span {
    color: var(--link) !important;
}

html[data-theme="dark"] .view-selector {
    border-bottom-color: var(--border) !important;
}

html[data-theme="dark"] .help-toc a:hover,
html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .feedback-dropdown-content a:hover,
html[data-theme="dark"] .person-results button:hover,
html[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: var(--surface2) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .feedback-dropdown-content a,
html[data-theme="dark"] .dropdown-item,
html[data-theme="dark"] .person-results button,
html[data-theme="dark"] .seg button {
    background-color: var(--surface) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([class*="brigade-status"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select:not([class*="brigade-status"]),
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select:not([class*="brigade-status"]) {
    background-color: var(--bg) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.2) !important;
}

html[data-theme="dark"] input[readonly],
html[data-theme="dark"] input.locked,
html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] {
    background-color: var(--surface2) !important;
    color: var(--muted) !important;
}

html[data-theme="dark"] [class*="brigade-status"] option,
html[data-theme="dark"] select option {
    background-color: var(--surface) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .brigade-status-available {
    background-color: #15803d !important;
    color: #fff !important;
    border-color: #15803d !important;
}
html[data-theme="dark"] .brigade-status-limited {
    background-color: #ca8a04 !important;
    color: #111 !important;
    border-color: #ca8a04 !important;
}
html[data-theme="dark"] .brigade-status-no-crews {
    background-color: #dc2626 !important;
    color: #fff !important;
    border-color: #dc2626 !important;
}
html[data-theme="dark"] .brigade-status-offline {
    background-color: #4b5563 !important;
    color: #fff !important;
    border-color: #4b5563 !important;
}
html[data-theme="dark"] .brigade-status-in-situ {
    background-color: #7e22ce !important;
    color: #fff !important;
    border-color: #7e22ce !important;
}

html[data-theme="dark"] .table,
html[data-theme="dark"] table {
    color: var(--text) !important;
    border-color: var(--border) !important;
    --bs-table-bg: var(--surface);
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: var(--surface2);
    --bs-table-striped-color: var(--text);
    --bs-table-hover-bg: #243044;
    --bs-table-hover-color: var(--text);
}

html[data-theme="dark"] .table > :not(caption) > * > *,
html[data-theme="dark"] td,
html[data-theme="dark"] th {
    background-color: transparent;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .nav-tabs {
    border-color: var(--border) !important;
}
html[data-theme="dark"] .nav-tabs .nav-link {
    color: var(--muted) !important;
}
html[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border) var(--border) var(--surface) !important;
}

html[data-theme="dark"] .page-link {
    background-color: var(--surface) !important;
    color: var(--link) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .page-item.active .page-link {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-muted,
html[data-theme="dark"] .btn-secondary {
    background-color: var(--surface2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .alert-info {
    background-color: #13283a !important;
    color: #d6e8f8 !important;
    border-color: #24506e !important;
}
html[data-theme="dark"] .alert-success,
html[data-theme="dark"] .banner.ok,
html[data-theme="dark"] .msg.ok {
    background-color: #12301c !important;
    color: #d8f5e1 !important;
    border-color: #1f6b38 !important;
}
html[data-theme="dark"] .alert-warning,
html[data-theme="dark"] .banner.warn,
html[data-theme="dark"] .msg.warn,
html[data-theme="dark"] .strike-team-highlight {
    background-color: #3a2e0d !important;
    color: #fde68a !important;
    border-color: #854d0e !important;
}
html[data-theme="dark"] .alert-danger,
html[data-theme="dark"] .banner.error,
html[data-theme="dark"] .banner.info,
html[data-theme="dark"] .msg.bad {
    background-color: #3a1518 !important;
    color: #fecaca !important;
    border-color: #7f1d1d !important;
}

html[data-theme="dark"] .badge.bg-warning,
html[data-theme="dark"] .bg-warning,
html[data-theme="dark"] .bg-warning h6,
html[data-theme="dark"] .bg-warning small,
html[data-theme="dark"] .bg-warning strong,
html[data-theme="dark"] .bg-warning .badge {
    color: #111 !important;
}

html[data-theme="dark"] .day,
html[data-theme="dark"] .pill,
html[data-theme="dark"] .badge {
    border-color: var(--border);
}
html[data-theme="dark"] .day.chosen.free {
    background-color: #12301c !important;
}
html[data-theme="dark"] .day.chosen.busy {
    background-color: #3a1518 !important;
}
html[data-theme="dark"] .pill {
    background-color: #3a2e0d !important;
    color: var(--text) !important;
}
html[data-theme="dark"] .pill.approved {
    background-color: #12301c !important;
}
html[data-theme="dark"] .pill.rejected {
    background-color: #3a1518 !important;
}
html[data-theme="dark"] .pill.cancelled {
    background-color: var(--surface2) !important;
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .dropdown-divider {
    border-color: var(--border) !important;
    opacity: 1;
}

html[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(1);
}

html[data-theme="dark"] .ql-toolbar,
html[data-theme="dark"] .ql-container,
html[data-theme="dark"] .ql-editor {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}
html[data-theme="dark"] .ql-stroke { stroke: var(--text) !important; }
html[data-theme="dark"] .ql-fill { fill: var(--text) !important; }
html[data-theme="dark"] .ql-picker { color: var(--text) !important; }

html[data-theme="dark"] [style*="background-color: #fff;"],
html[data-theme="dark"] [style*="background-color:#fff;"],
html[data-theme="dark"] [style*="background-color: #fff\""],
html[data-theme="dark"] [style*="background-color: white"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background-color: #ffffff"],
html[data-theme="dark"] [style*="background-color: #f8f9fa"],
html[data-theme="dark"] [style*="background-color:#f8f9fa"],
html[data-theme="dark"] [style*="background-color: #f5f5f5"],
html[data-theme="dark"] [style*="background-color: #fafafa"],
html[data-theme="dark"] [style*="background: #f5f5f5"],
html[data-theme="dark"] [style*="background: #fff"] {
    background-color: var(--surface) !important;
    color: var(--text);
}

html[data-theme="dark"] [style*="color: #333"],
html[data-theme="dark"] [style*="color:#333"],
html[data-theme="dark"] [style*="color: #666"],
html[data-theme="dark"] [style*="color:#666"],
html[data-theme="dark"] [style*="color: #222"],
html[data-theme="dark"] [style*="color: #000"] {
    color: var(--muted) !important;
}

html[data-theme="dark"] .theme-toggle {
    min-width: 40px;
}

/* Dashboard readiness grid: status cells stay colour-coded, on dark fills with light text. */
html[data-theme="dark"] #readiness thead th,
html[data-theme="dark"] #readiness .day-title {
    background-color: transparent !important;
    color: #e8edf5 !important;
}
html[data-theme="dark"] #readiness .day-kicker {
    color: #8b9cb3 !important;
}
html[data-theme="dark"] #readiness thead th:nth-child(2) .day-kicker,
html[data-theme="dark"] #readiness thead th:nth-child(3) .day-kicker {
    color: #fca5a5 !important;
}
html[data-theme="dark"] #readiness th:first-child,
html[data-theme="dark"] #readiness thead th:first-child,
html[data-theme="dark"] #readiness td:first-child {
    background-color: #151a22 !important;
    box-shadow: 8px 0 0 #151a22 !important;
    color: #e8edf5 !important;
}

html[data-theme="dark"] #readiness td:first-child a,
html[data-theme="dark"] #readiness td:first-child strong,
html[data-theme="dark"] #readiness td:first-child .text-dark,
html[data-theme="dark"] #readiness td:first-child .text-muted {
    color: #e8edf5 !important;
}

html[data-theme="dark"] #readiness td.status-cell {
    border-left-width: 3px;
    border-left-style: solid;
    --bs-table-accent-bg: transparent !important;
    --bs-table-bg-type: transparent !important;
    --bs-table-bg-state: transparent !important;
    box-shadow: none !important;
}
html[data-theme="dark"] #readiness td.status-complete {
    background-color: rgba(34, 197, 94, 0.14) !important;
    color: #d8f5e1 !important;
    border-left-color: #4ade80 !important;
}
html[data-theme="dark"] #readiness td.status-partial {
    background-color: rgba(225, 29, 72, 0.16) !important;
    color: #fecdd3 !important;
    border-left-color: #fb7185 !important;
}
html[data-theme="dark"] #readiness td.status-incomplete {
    background-color: rgba(225, 29, 72, 0.16) !important;
    color: #fecdd3 !important;
    border-left-color: #fb7185 !important;
}
html[data-theme="dark"] #readiness td.status-empty {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #8b9cb3 !important;
    border-color: #2a3444 !important;
    border-left-color: #2a3444 !important;
}
html[data-theme="dark"] .not-allocated-label {
    color: #8b9cb3 !important;
}

html[data-theme="dark"] .local-crew-intro {
    background: rgba(34, 197, 94, 0.16) !important;
    color: #86efac !important;
    border-color: rgba(34, 197, 94, 0.45) !important;
}

html[data-theme="dark"] .crew-available-flag {
    background: rgba(34, 197, 94, 0.16) !important;
    color: #86efac !important;
    border-color: rgba(34, 197, 94, 0.45) !important;
}
html[data-theme="dark"] .crew-available-flag i {
    color: #4ade80 !important;
}
html[data-theme="dark"] #readiness td.status-empty .text-muted {
    color: #8b9cb3 !important;
}
html[data-theme="dark"] #readiness td.status-cell:hover {
    filter: brightness(1.08);
}

html[data-theme="dark"] #readiness .text-success {
    color: #4ade80 !important;
}
html[data-theme="dark"] #readiness .text-warning {
    color: #fbbf24 !important;
}
html[data-theme="dark"] #readiness .text-danger,
html[data-theme="dark"] #readiness .text-danger small {
    color: #fca5a5 !important;
}
html[data-theme="dark"] #readiness .status-incomplete .text-danger,
html[data-theme="dark"] #readiness .status-partial .text-danger {
    color: #fda4af !important;
}

html[data-theme="dark"] .brigade-status-available {
    background-color: #15803d !important;
    color: #fff !important;
}
html[data-theme="dark"] .brigade-status-limited {
    background-color: #ca8a04 !important;
    color: #111 !important;
}

html[data-theme="dark"] .admin-nav .nav-pills .nav-link {
    background: #1c2330 !important;
    color: #e8edf5 !important;
    border-color: #2a3444 !important;
}
html[data-theme="dark"] .admin-nav .nav-pills .nav-link i {
    color: #fca5a5 !important;
}
html[data-theme="dark"] .admin-nav .nav-pills .nav-link:hover {
    background: #2a1518 !important;
    border-color: #dc2626 !important;
    color: #e8edf5 !important;
}
html[data-theme="dark"] .admin-nav .nav-pills .nav-link.active,
html[data-theme="dark"] .admin-nav .nav-pills .nav-link.active i,
html[data-theme="dark"] .admin-nav .nav-pills .nav-link.active:hover,
html[data-theme="dark"] .admin-nav .nav-pills .nav-link.active:hover i {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}
html[data-theme="dark"] a.admin-home-card,
html[data-theme="dark"] a.admin-home-card:hover {
    background: #1c2330 !important;
    color: #e8edf5 !important;
    border-color: #2a3444 !important;
}
html[data-theme="dark"] a.admin-home-card:hover {
    border-color: #dc2626 !important;
}
html[data-theme="dark"] .admin-home-icon {
    background: #2a1518 !important;
    color: #fca5a5 !important;
}
html[data-theme="dark"] .admin-home-desc,
html[data-theme="dark"] .admin-home-group h4 {
    color: #8b9cb3 !important;
}
html[data-theme="dark"] a.admin-home-card .count {
    color: #fca5a5 !important;
}

html[data-theme="dark"] .phone-tabs {
    background: var(--surface) !important;
    border-top-color: var(--border) !important;
}

html[data-theme="dark"] .phone-tabs a {
    color: var(--muted) !important;
}

html[data-theme="dark"] .phone-tabs a.on {
    color: #fca5a5 !important;
}

html[data-theme="dark"] .phone-daybar,
html[data-theme="dark"] .date-navigation,
html[data-theme="dark"] .phone-book-tabs,
html[data-theme="dark"] .book-request .actions {
    background: var(--surface) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .phone-brigade,
html[data-theme="dark"] .phone-daychip,
html[data-theme="dark"] .phone-daybar button,
html[data-theme="dark"] .phone-book-tabs button {
    background: var(--surface2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .phone-daychip.on,
html[data-theme="dark"] .phone-book-tabs button.on {
    background: #d32f2f !important;
    color: #fff !important;
    border-color: #d32f2f !important;
}

html[data-theme="dark"] .status-button label {
    background-color: var(--surface2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .status-button label:hover {
    background-color: #243044 !important;
    border-color: var(--muted) !important;
}

html[data-theme="dark"] .status-button input[value="available_long_haul"]:checked + label {
    background-color: #15803d !important;
    border-color: #15803d !important;
    color: #fff !important;
}

html[data-theme="dark"] .status-button input[value="available_short_haul"]:checked + label {
    background-color: #0e7490 !important;
    border-color: #0e7490 !important;
    color: #fff !important;
}

html[data-theme="dark"] .status-button input[value="available_locally"]:checked + label {
    background-color: #eab308 !important;
    border-color: #eab308 !important;
    color: #111 !important;
}

html[data-theme="dark"] .status-button input[value="unavailable"]:checked + label {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}

html[data-theme="dark"] .status-button input[value="not_set"]:checked + label {
    background-color: var(--surface) !important;
    border-color: var(--muted) !important;
    color: var(--muted) !important;
}

html[data-theme="dark"] .radio-option {
    background-color: var(--surface2);
    border-color: var(--border);
    color: var(--text) !important;
}

html[data-theme="dark"] .radio-option:hover {
    background-color: #243044 !important;
}

html[data-theme="dark"] .radio-option.selected {
    border-color: #d32f2f !important;
    background-color: #2a1518 !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .compact-availability-grid.editing-mode .compact-day:hover {
    background-color: var(--surface2) !important;
}

html[data-theme="dark"] .availability-sidebar-list {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .availability-sidebar-list::-webkit-scrollbar-track {
    background: var(--surface2);
}

html[data-theme="dark"] .availability-sidebar-item {
    background-color: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .availability-sidebar-item:hover {
    background-color: #243044 !important;
    border-color: var(--muted) !important;
}

html[data-theme="dark"] .availability-sidebar-item.text-success,
html[data-theme="dark"] .availability-sidebar-item.text-success span {
    color: #4ade80 !important;
}

html[data-theme="dark"] .availability-sidebar-item.text-danger,
html[data-theme="dark"] .availability-sidebar-item.text-danger span {
    color: #fca5a5 !important;
}

html[data-theme="dark"] .availability-sidebar-item [style*="color: #155724"],
html[data-theme="dark"] .availability-sidebar-item [style*="color:#155724"] {
    color: #86efac !important;
}

html[data-theme="dark"] .availability-sidebar-item [style*="color: #856404"],
html[data-theme="dark"] .availability-sidebar-item [style*="color:#856404"] {
    color: #fde68a !important;
}

html[data-theme="dark"] .availability-sidebar-item[style*="#d4edda"] {
    background-color: #14532d !important;
    border-color: #166534 !important;
    color: #ecfdf5 !important;
}

html[data-theme="dark"] .availability-sidebar-item[style*="#fff3cd"] {
    background-color: #713f12 !important;
    border-color: #a16207 !important;
    color: #fef3c7 !important;
}

html[data-theme="dark"] .availability-member-badge {
    background-color: var(--surface2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .availability-member-badge[style*="#d4edda"] {
    background-color: #14532d !important;
    border-color: #166534 !important;
    color: #ecfdf5 !important;
}

html[data-theme="dark"] .availability-member-badge[style*="#fff3cd"] {
    background-color: #713f12 !important;
    border-color: #a16207 !important;
    color: #fef3c7 !important;
}

@media print {
    html[data-theme="dark"] body,
    html[data-theme="dark"] .content,
    html[data-theme="dark"] .card,
    html[data-theme="dark"] .section,
    html[data-theme="dark"] .info-box,
    html[data-theme="dark"] table,
    html[data-theme="dark"] td,
    html[data-theme="dark"] th {
        background: #fff !important;
        color: #111 !important;
    }
    html[data-theme="dark"] a:not(.nav-link):not(.btn) {
        color: #7f1d1d !important;
    }
}
