/* ===================================
   COMPLETE LAYOUT DARK MODE STYLES
   =================================== */

[data-bs-theme="dark"],
html.dark-mode,
body.dark-mode {
    color-scheme: dark;
    background-color: #121214 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] body,
html.dark-mode body,
body.dark-mode {
    background-color: #121214 !important;
    color: #e2e8f0 !important;
}

/* Sidebar Dark Theme */
[data-bs-theme="dark"] .sidebar,
html.dark-mode .sidebar {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border-right: 1px solid #2d3748 !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .sidebar .nav-link,
html.dark-mode .sidebar .nav-link {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .sidebar .nav-link:hover,
[data-bs-theme="dark"] .sidebar .nav-link.active,
html.dark-mode .sidebar .nav-link:hover,
html.dark-mode .sidebar .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Main Content & Navbar Dark Theme */
[data-bs-theme="dark"] .main-content,
html.dark-mode .main-content {
    background-color: #18181c !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .navbar,
html.dark-mode .navbar {
    background-color: #1e1e24 !important;
    border-bottom: 1px solid #2d3748 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .navbar .navbar-brand,
[data-bs-theme="dark"] .navbar h4,
[data-bs-theme="dark"] .navbar .dropdown-toggle,
html.dark-mode .navbar .navbar-brand,
html.dark-mode .navbar h4,
html.dark-mode .navbar .dropdown-toggle {
    color: #f1f5f9 !important;
}

/* Headers & Typography */
[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, [data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4, [data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .page-title, [data-bs-theme="dark"] .card-title,
html.dark-mode h1, html.dark-mode h2, html.dark-mode h3,
html.dark-mode h4, html.dark-mode h5, html.dark-mode h6,
html.dark-mode .page-title, html.dark-mode .card-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .text-dark,
html.dark-mode .text-dark,
[data-bs-theme="dark"] .text-success,
html.dark-mode .text-success {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-muted,
html.dark-mode .text-secondary,
html.dark-mode .text-muted {
    color: #94a3b8 !important;
}

/* Cards & Containers */
[data-bs-theme="dark"] .card,
html.dark-mode .card {
    background-color: #1e1e24 !important;
    border: 1px solid #2d3748 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer,
html.dark-mode .card-header,
html.dark-mode .card-footer {
    background-color: #26262e !important;
    border-color: #2d3748 !important;
}

/* Settings Items & Navigation */
[data-bs-theme="dark"] .settings-item,
html.dark-mode .settings-item {
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .settings-navigation .list-group-item,
html.dark-mode .settings-navigation .list-group-item {
    background-color: #1e1e24 !important;
    color: #e2e8f0 !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .settings-navigation .list-group-item.active,
html.dark-mode .settings-navigation .list-group-item.active {
    background-color: #0275d8 !important;
    color: #ffffff !important;
}

/* Form Inputs & Selects */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
html.dark-mode .form-control,
html.dark-mode .form-select {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
html.dark-mode .form-control:focus,
html.dark-mode .form-select:focus {
    background-color: #2a2a34 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
}

/* Tables */
[data-bs-theme="dark"] .table,
html.dark-mode .table {
    color: #e2e8f0 !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] .table td,
html.dark-mode .table th,
html.dark-mode .table td {
    background-color: #1e1e24 !important;
    color: #e2e8f0 !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
html.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #26262e !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > *,
html.dark-mode .table-hover > tbody > tr:hover > * {
    background-color: #32323c !important;
}

/* Dropdowns & Modals */
[data-bs-theme="dark"] .dropdown-menu,
html.dark-mode .dropdown-menu {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .dropdown-item,
html.dark-mode .dropdown-item {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus,
html.dark-mode .dropdown-item:hover,
html.dark-mode .dropdown-item:focus {
    background-color: #2d3748 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .modal-content,
html.dark-mode .modal-content {
    background-color: #1e1e24 !important;
    border: 1px solid #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer,
html.dark-mode .modal-header,
html.dark-mode .modal-footer {
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .btn-close,
html.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Utility Background Overrides in Dark Mode */
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-body,
html.dark-mode .bg-white,
html.dark-mode .bg-light,
html.dark-mode .bg-body,
body.dark-mode .bg-white,
body.dark-mode .bg-light,
body.dark-mode .bg-body {
    background-color: #1e1e24 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .card-header.bg-white,
[data-bs-theme="dark"] .card-footer.bg-white,
[data-bs-theme="dark"] .card-header.bg-light,
[data-bs-theme="dark"] .card-footer.bg-light,
html.dark-mode .card-header.bg-white,
html.dark-mode .card-footer.bg-white,
html.dark-mode .card-header.bg-light,
html.dark-mode .card-footer.bg-light {
    background-color: #26262e !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

/* Filter Bars, Search Cards & Panels */
[data-bs-theme="dark"] .filter-bar,
[data-bs-theme="dark"] .filter-card,
[data-bs-theme="dark"] .filter-container,
[data-bs-theme="dark"] .filter-section,
[data-bs-theme="dark"] .filters,
[data-bs-theme="dark"] .search-card,
[data-bs-theme="dark"] .search-bar,
html.dark-mode .filter-bar,
html.dark-mode .filter-card,
html.dark-mode .filter-container,
html.dark-mode .filter-section,
html.dark-mode .filters,
html.dark-mode .search-card,
html.dark-mode .search-bar {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

/* Input Group Addons & Search Inputs */
[data-bs-theme="dark"] .input-group-text,
html.dark-mode .input-group-text {
    background-color: #2b3036 !important;
    border-color: #3f4756 !important;
    color: #94a3b8 !important;
}

/* Nav Tabs & Pills */
[data-bs-theme="dark"] .nav-tabs,
html.dark-mode .nav-tabs {
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link,
html.dark-mode .nav-tabs .nav-link {
    color: #94a3b8 !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover,
html.dark-mode .nav-tabs .nav-link:hover {
    color: #f1f5f9 !important;
    border-color: #2d3748 #2d3748 transparent !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active,
html.dark-mode .nav-tabs .nav-link.active {
    color: #3b82f6 !important;
    background-color: #1e1e24 !important;
    border-color: #2d3748 #2d3748 #1e1e24 !important;
}

[data-bs-theme="dark"] .tab-content,
html.dark-mode .tab-content {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

/* List Groups */
[data-bs-theme="dark"] .list-group-item,
html.dark-mode .list-group-item {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .list-group-item-action:hover,
[data-bs-theme="dark"] .list-group-item-action:focus,
html.dark-mode .list-group-item-action:hover,
html.dark-mode .list-group-item-action:focus {
    background-color: #2d3748 !important;
    color: #ffffff !important;
}

/* Pagination */
[data-bs-theme="dark"] .page-link,
html.dark-mode .page-link {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .page-item.active .page-link,
html.dark-mode .page-item.active .page-link {
    background-color: #0275d8 !important;
    border-color: #0275d8 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .page-link:hover,
html.dark-mode .page-link:hover {
    background-color: #2d3748 !important;
    color: #ffffff !important;
}

/* Accordions */
[data-bs-theme="dark"] .accordion-item,
html.dark-mode .accordion-item {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .accordion-button,
html.dark-mode .accordion-button {
    background-color: #26262e !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed),
html.dark-mode .accordion-button:not(.collapsed) {
    background-color: #2d3748 !important;
    color: #3b82f6 !important;
}

/* Borders & Horizontal Rules */
[data-bs-theme="dark"] hr,
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end,
html.dark-mode hr,
html.dark-mode .border,
html.dark-mode .border-top,
html.dark-mode .border-bottom,
html.dark-mode .border-start,
html.dark-mode .border-end {
    border-color: #2d3748 !important;
}

/* Centralized Page Header in Dark Mode */
[data-bs-theme="dark"] .page-header,
html.dark-mode .page-header,
body.dark-mode .page-header,
[data-bs-theme="dark"] .settings-container .page-header,
html.dark-mode .settings-container .page-header {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .page-header h1,
[data-bs-theme="dark"] .page-header h2,
[data-bs-theme="dark"] .page-header h3,
[data-bs-theme="dark"] .page-header .page-title,
html.dark-mode .page-header h1,
html.dark-mode .page-header h2,
html.dark-mode .page-header h3,
html.dark-mode .page-header .page-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .page-header .text-muted,
[data-bs-theme="dark"] .page-header p,
html.dark-mode .page-header .text-muted,
html.dark-mode .page-header p {
    color: #94a3b8 !important;
}

/* Settings Navigation & Items in Dark Mode */
[data-bs-theme="dark"] .settings-nav,
html.dark-mode .settings-nav {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .settings-nav .nav-tabs,
html.dark-mode .settings-nav .nav-tabs {
    background-color: #18181c !important;
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .settings-nav .nav-tab,
html.dark-mode .settings-nav .nav-tab {
    background-color: transparent !important;
    color: #94a3b8 !important;
    border-bottom-color: transparent !important;
}

[data-bs-theme="dark"] .settings-nav .nav-tab:hover,
html.dark-mode .settings-nav .nav-tab:hover {
    background-color: #25252e !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .settings-nav .nav-tab.active,
html.dark-mode .settings-nav .nav-tab.active {
    background-color: #1e1e24 !important;
    color: #3b82f6 !important;
    border-bottom-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .settings-content,
html.dark-mode .settings-content {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .settings-section h3,
html.dark-mode .settings-section h3 {
    color: #f1f5f9 !important;
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .settings-item,
html.dark-mode .settings-item {
    background-color: #24242c !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .settings-item:hover,
html.dark-mode .settings-item:hover {
    background-color: #2a2a34 !important;
    border-color: #3f4756 !important;
}

[data-bs-theme="dark"] .settings-item-header h4,
html.dark-mode .settings-item-header h4 {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .settings-item-header p,
html.dark-mode .settings-item-header p {
    color: #94a3b8 !important;
}

/* Patient & Billing Content Cards and Filters */
[data-bs-theme="dark"] .content-card,
html.dark-mode .content-card {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .content-card-header,
html.dark-mode .content-card-header {
    background-color: #26262e !important;
    border-bottom-color: #2d3748 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .content-card-header h6,
[data-bs-theme="dark"] .content-card-header h5,
html.dark-mode .content-card-header h6,
html.dark-mode .content-card-header h5 {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .content-card-body,
html.dark-mode .content-card-body {
    background-color: #1e1e24 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] #patientsFilterForm label,
[data-bs-theme="dark"] form label,
[data-bs-theme="dark"] .form-label,
html.dark-mode #patientsFilterForm label,
html.dark-mode form label,
html.dark-mode .form-label {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .table-header-cell,
html.dark-mode .table-header-cell {
    background-color: #26262e !important;
    border-bottom-color: #2d3748 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .table-row:hover,
html.dark-mode .table-row:hover {
    background-color: #2a2a34 !important;
}

[data-bs-theme="dark"] .input-group-sm .input-group-text,
html.dark-mode .input-group-sm .input-group-text {
    background-color: #2b3036 !important;
    border-color: #3f4756 !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .input-group-sm .form-control,
html.dark-mode .input-group-sm .form-control {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .patient-name-link,
html.dark-mode .patient-name-link {
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .patient-name-link:hover,
html.dark-mode .patient-name-link:hover {
    color: #93c5fd !important;
}

/* Centralized .page-header Dark Mode Styling Override */
[data-bs-theme="dark"] .page-header,
html.dark-mode .page-header,
body.dark-mode .page-header {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .page-title,
html.dark-mode .page-title {
    color: #f8fafc !important;
    text-shadow: none !important;
}

[data-bs-theme="dark"] .page-subtitle,
[data-bs-theme="dark"] .page-header .text-muted,
[data-bs-theme="dark"] .page-header p,
html.dark-mode .page-subtitle,
html.dark-mode .page-header .text-muted,
html.dark-mode .page-header p {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .page-header .btn-light,
html.dark-mode .page-header .btn-light {
    background-color: #334155 !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

[data-bs-theme="dark"] .page-header .btn-light:hover,
html.dark-mode .page-header .btn-light:hover {
    background-color: #475569 !important;
    color: #ffffff !important;
}

/* Scheduling Calendar & Appointment Popups Dark Mode */
[data-bs-theme="dark"] .fc,
[data-bs-theme="dark"] .fc-theme-standard td,
[data-bs-theme="dark"] .fc-theme-standard th,
[data-bs-theme="dark"] .fc-theme-standard .fc-scrollgrid,
html.dark-mode .fc,
html.dark-mode .fc-theme-standard td,
html.dark-mode .fc-theme-standard th,
html.dark-mode .fc-theme-standard .fc-scrollgrid {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .fc-col-header-cell,
[data-bs-theme="dark"] .fc-daygrid-day-number,
[data-bs-theme="dark"] .fc-timegrid-slot-label,
[data-bs-theme="dark"] .fc-list-day-cushion,
html.dark-mode .fc-col-header-cell,
html.dark-mode .fc-daygrid-day-number,
html.dark-mode .fc-timegrid-slot-label,
html.dark-mode .fc-list-day-cushion {
    background-color: #26262e !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .appointment-popup-date-menu,
[data-bs-theme="dark"] .appointment-popup,
[data-bs-theme="dark"] .time-picker-dropdown,
html.dark-mode .appointment-popup-date-menu,
html.dark-mode .appointment-popup,
html.dark-mode .time-picker-dropdown {
    background-color: #1e1e24 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6) !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] input.appointment-popup-date-input,
html.dark-mode input.appointment-popup-date-input {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

/* Custom Scheduling Calendar UI Dark Mode */
[data-bs-theme="dark"] .calendar-container,
html.dark-mode .calendar-container {
    background-color: #1e1e24 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .calendar-header,
[data-bs-theme="dark"] .calendar-footer,
html.dark-mode .calendar-header,
html.dark-mode .calendar-footer {
    background-color: #26262e !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .calendar-nav button,
[data-bs-theme="dark"] .calendar-actions button,
html.dark-mode .calendar-nav button,
html.dark-mode .calendar-actions button {
    background-color: #1e1e24 !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .calendar-nav button:hover,
[data-bs-theme="dark"] .calendar-actions button:hover,
html.dark-mode .calendar-nav button:hover,
html.dark-mode .calendar-actions button:hover {
    background-color: #2d3748 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .calendar-actions button.active,
html.dark-mode .calendar-actions button.active {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .calendar-title,
html.dark-mode .calendar-title {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .calendar-weekdays,
html.dark-mode .calendar-weekdays {
    background-color: #1e3a8a !important; 
    color: #ffffff !important;
}

[data-bs-theme="dark"] .calendar-day,
html.dark-mode .calendar-day {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .calendar-day:hover,
html.dark-mode .calendar-day:hover {
    background-color: #26262e !important;
}

[data-bs-theme="dark"] .calendar-day.other-month,
html.dark-mode .calendar-day.other-month {
    background-color: #17171d !important;
    color: #64748b !important;
}

[data-bs-theme="dark"] .calendar-day.today,
html.dark-mode .calendar-day.today {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .day-number,
html.dark-mode .day-number {
    color: #e2e8f0 !important;
}

/* Modals Dark Mode (Scheduling & Billing) */
[data-bs-theme="dark"] .calendar-view-modal-container,
[data-bs-theme="dark"] .billing-modal,
html.dark-mode .calendar-view-modal-container,
html.dark-mode .billing-modal {
    background-color: #1e1e24 !important;
    color: #f1f5f9 !important;
    border: 1px solid #3f4756 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .calendar-view-modal-header,
[data-bs-theme="dark"] .calendar-view-modal-footer,
[data-bs-theme="dark"] .billing-modal-header,
[data-bs-theme="dark"] .billing-modal-footer,
html.dark-mode .calendar-view-modal-header,
html.dark-mode .calendar-view-modal-footer,
html.dark-mode .billing-modal-header,
html.dark-mode .billing-modal-footer {
    border-color: #2d3748 !important;
    background-color: #26262e !important;
}

[data-bs-theme="dark"] .calendar-view-modal-title,
[data-bs-theme="dark"] .billing-modal-header h3,
html.dark-mode .calendar-view-modal-title,
html.dark-mode .billing-modal-header h3 {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .calendar-view-close-btn,
[data-bs-theme="dark"] .billing-modal-close,
html.dark-mode .calendar-view-close-btn,
html.dark-mode .billing-modal-close {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .calendar-view-close-btn:hover,
[data-bs-theme="dark"] .billing-modal-close:hover,
html.dark-mode .calendar-view-close-btn:hover,
html.dark-mode .billing-modal-close:hover {
    color: #f1f5f9 !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Billing Cards & Links Dark Mode */
[data-bs-theme="dark"] .ip-form-card,
[data-bs-theme="dark"] .pr-card,
[data-bs-theme="dark"] .pp-card,
[data-bs-theme="dark"] .billing-module,
[data-bs-theme="dark"] .billing-card,
html.dark-mode .ip-form-card,
html.dark-mode .pr-card,
html.dark-mode .pp-card,
html.dark-mode .billing-module,
html.dark-mode .billing-card {
    background-color: #1e1e24 !important;
    border: 1px solid #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .billing-module-header,
html.dark-mode .billing-module-header {
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .billing-module-title,
html.dark-mode .billing-module-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .billing-card a,
[data-bs-theme="dark"] .billing-link,
[data-bs-theme="dark"] .billing-module-links a,
html.dark-mode .billing-card a,
html.dark-mode .billing-link,
html.dark-mode .billing-module-links a {
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .billing-card a:hover,
[data-bs-theme="dark"] .billing-module-links a:hover,
html.dark-mode .billing-card a:hover,
html.dark-mode .billing-module-links a:hover {
    color: #93c5fd !important;
    background-color: #26262e !important;
}

[data-bs-theme="dark"] .billing-module-links a .link-icon,
html.dark-mode .billing-module-links a .link-icon {
    background-color: #2d3748 !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .billing-module-links a:hover .link-icon,
html.dark-mode .billing-module-links a:hover .link-icon {
    background-color: #3f4756 !important;
    color: #60a5fa !important;
}

/* Service Codes Cards & Tables Dark Mode */
[data-bs-theme="dark"] .service-code-card,
[data-bs-theme="dark"] .service-code-card-simple,
html.dark-mode .service-code-card,
html.dark-mode .service-code-card-simple {
    background-color: #1e1e24 !important;
    border: 1px solid #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .service-code-card .card-header,
[data-bs-theme="dark"] .service-code-card .card-header.bg-light,
html.dark-mode .service-code-card .card-header,
html.dark-mode .service-code-card .card-header.bg-light {
    background-color: #26262e !important;
    border-bottom: 1px solid #2d3748 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .service-type-group-name,
[data-bs-theme="dark"] .table-group-header td,
html.dark-mode .service-type-group-name,
html.dark-mode .table-group-header td {
    background-color: #26262e !important;
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .service-code-card .card-body,
html.dark-mode .service-code-card .card-body,
[data-bs-theme="dark"] .service-code-card .card-body p,
html.dark-mode .service-code-card .card-body p,
[data-bs-theme="dark"] .service-code-card .card-body small,
html.dark-mode .service-code-card .card-body small,
html[data-bs-theme="dark"] body .service-code-card .text-dark,
html.dark-mode body .service-code-card .text-dark,
html[data-bs-theme="dark"] body .service-code-card .text-success,
html.dark-mode body .service-code-card .text-success {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .service-code-card .text-muted,
html.dark-mode .service-code-card .text-muted,
[data-bs-theme="dark"] .service-code-card .card-header .text-muted,
html.dark-mode .service-code-card .card-header .text-muted {
    color: #94a3b8 !important;
}

/* Patient Payment Page Dark Mode Overrides */
[data-bs-theme="dark"] .pp-form-section,
html.dark-mode .pp-form-section {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
}

[data-bs-theme="dark"] .pp-title,
html.dark-mode .pp-title {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
    color: #4ade80 !important;
    border-left-color: #22c55e !important;
}

[data-bs-theme="dark"] .pp-balance-row,
[data-bs-theme="dark"] .pp-patient-context-bar,
html.dark-mode .pp-balance-row,
html.dark-mode .pp-patient-context-bar {
    color: #cbd5e1 !important;
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .pp-patient-context-bar strong,
[data-bs-theme="dark"] .pp-balance-row strong,
html.dark-mode .pp-patient-context-bar strong,
html.dark-mode .pp-balance-row strong {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .pp-form-label,
html.dark-mode .pp-form-label {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .pp-method-btn,
html.dark-mode .pp-method-btn {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .pp-method-btn:hover:not(.active),
html.dark-mode .pp-method-btn:hover:not(.active) {
    background-color: #2d3748 !important;
}

[data-bs-theme="dark"] .pp-method-btn.active,
html.dark-mode .pp-method-btn.active {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .pp-input-short,
[data-bs-theme="dark"] .pp-input-medium,
[data-bs-theme="dark"] .pp-input-wide,
html.dark-mode .pp-input-short,
html.dark-mode .pp-input-medium,
html.dark-mode .pp-input-wide {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .pp-input-short:focus,
[data-bs-theme="dark"] .pp-input-medium:focus,
[data-bs-theme="dark"] .pp-input-wide:focus,
html.dark-mode .pp-input-short:focus,
html.dark-mode .pp-input-medium:focus,
html.dark-mode .pp-input-wide:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25) !important;
}

[data-bs-theme="dark"] .pp-create-btn,
html.dark-mode .pp-create-btn {
    background: linear-gradient(to bottom, #1e293b, #0f172a) !important;
    border-color: #2d3748 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .pp-create-btn:hover,
html.dark-mode .pp-create-btn:hover {
    background: linear-gradient(to bottom, #2d3748, #1e293b) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .pp-divider,
html.dark-mode .pp-divider {
    border-top-color: #2d3748 !important;
}

/* Appointment Popup Wrapper (Custom Popup styles) */
[data-bs-theme="dark"] .appointment-popup-wrapper,
[data-bs-theme="dark"] #appointmentPopupContainer,
html.dark-mode .appointment-popup-wrapper,
html.dark-mode #appointmentPopupContainer {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

[data-bs-theme="dark"] .appointment-popup-wrapper .popup-content,
[data-bs-theme="dark"] #appointmentPopupContainer .popup-content,
[data-bs-theme="dark"] .appointment-popup-content,
html.dark-mode .appointment-popup-wrapper .popup-content,
html.dark-mode #appointmentPopupContainer .popup-content,
html.dark-mode .appointment-popup-content {
    background-color: #1e1e24 !important;
    border: 1px solid #3f4756 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .appointment-popup-wrapper .popup-header,
[data-bs-theme="dark"] #appointmentPopupContainer .popup-header,
[data-bs-theme="dark"] .appointment-popup-header,
html.dark-mode .appointment-popup-wrapper .popup-header,
html.dark-mode #appointmentPopupContainer .popup-header,
html.dark-mode .appointment-popup-header {
    background-color: #26262e !important;
    border-bottom: 1px solid #2d3748 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .appointment-popup-wrapper .popup-title,
[data-bs-theme="dark"] #appointmentPopupContainer .popup-title,
[data-bs-theme="dark"] .appointment-popup-title,
html.dark-mode .appointment-popup-wrapper .popup-title,
html.dark-mode #appointmentPopupContainer .popup-title,
html.dark-mode .appointment-popup-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .appointment-popup-wrapper .popup-body,
[data-bs-theme="dark"] #appointmentPopupContainer .popup-body,
[data-bs-theme="dark"] .appointment-popup-body,
html.dark-mode .appointment-popup-wrapper .popup-body,
html.dark-mode #appointmentPopupContainer .popup-body,
html.dark-mode .appointment-popup-body {
    background-color: #1e1e24 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .appointment-popup-wrapper .popup-footer,
[data-bs-theme="dark"] #appointmentPopupContainer .popup-footer,
[data-bs-theme="dark"] .appointment-popup-footer,
html.dark-mode .appointment-popup-wrapper .popup-footer,
html.dark-mode #appointmentPopupContainer .popup-footer,
html.dark-mode .appointment-popup-footer {
    background-color: #26262e !important;
    border-top: 1px solid #2d3748 !important;
}

[data-bs-theme="dark"] .appointment-popup-wrapper input,
[data-bs-theme="dark"] .appointment-popup-wrapper select,
[data-bs-theme="dark"] .appointment-popup-wrapper textarea,
[data-bs-theme="dark"] #appointmentPopupContainer input,
[data-bs-theme="dark"] #appointmentPopupContainer select,
[data-bs-theme="dark"] #appointmentPopupContainer textarea,
html.dark-mode .appointment-popup-wrapper input,
html.dark-mode .appointment-popup-wrapper select,
html.dark-mode .appointment-popup-wrapper textarea,
html.dark-mode #appointmentPopupContainer input,
html.dark-mode #appointmentPopupContainer select,
html.dark-mode #appointmentPopupContainer textarea {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .appointment-popup-wrapper label,
[data-bs-theme="dark"] #appointmentPopupContainer label,
html.dark-mode .appointment-popup-wrapper label,
html.dark-mode #appointmentPopupContainer label {
    color: #cbd5e1 !important;
}

/* Ensure Generic Tables (Audit Logs, Payers) are styled */
[data-bs-theme="dark"] .table-responsive .table,
html.dark-mode .table-responsive .table {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .table-responsive .table th,
html.dark-mode .table-responsive .table th {
    background-color: #26262e !important;
    border-bottom-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .table-responsive .table td,
html.dark-mode .table-responsive .table td {
    background-color: #1e1e24 !important;
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .table-responsive .table tr:hover td,
html.dark-mode .table-responsive .table tr:hover td {
    background-color: #2d3748 !important;
}

/* Billing Search Panel */
[data-bs-theme="dark"] .billing-search-panel,
html.dark-mode .billing-search-panel {
    background-color: #1e1e24 !important;
    border: 1px solid #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .billing-search-header,
html.dark-mode .billing-search-header {
    background-color: #26262e !important;
    border-bottom: 1px solid #2d3748 !important;
}

[data-bs-theme="dark"] .billing-search-header h3,
html.dark-mode .billing-search-header h3 {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .billing-search-body,
html.dark-mode .billing-search-body {
    background-color: #1e1e24 !important;
}

[data-bs-theme="dark"] .billing-inline-field label,
html.dark-mode .billing-inline-field label {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .billing-inline-field select,
[data-bs-theme="dark"] .billing-inline-field input,
html.dark-mode .billing-inline-field select,
html.dark-mode .billing-inline-field input {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .billing-inline-field select:focus,
[data-bs-theme="dark"] .billing-inline-field input:focus,
html.dark-mode .billing-inline-field select:focus,
html.dark-mode .billing-inline-field input:focus {
    border-color: #60a5fa !important;
}

[data-bs-theme="dark"] .billing-search-actions,
html.dark-mode .billing-search-actions {
    background-color: #26262e !important;
    border-top: 1px solid #2d3748 !important;
}

/* Global Ultra-High-Specificity Overrides for Cards, Headers, and Footers in Billing & Settings */
html[data-bs-theme="dark"] body .card,
html.dark-mode body .card,
html[data-bs-theme="dark"] body .content-card,
html.dark-mode body .content-card,
html[data-bs-theme="dark"] body .settings-item,
html.dark-mode body .settings-item {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] body .card-header,
html[data-bs-theme="dark"] body .card-footer,
html[data-bs-theme="dark"] body .card-header.bg-white,
html[data-bs-theme="dark"] body .card-header.bg-light,
html[data-bs-theme="dark"] body .content-card-header,
html[data-bs-theme="dark"] body .content-card-footer,
html.dark-mode body .card-header,
html.dark-mode body .card-footer,
html.dark-mode body .card-header.bg-white,
html.dark-mode body .card-header.bg-light,
html.dark-mode body .content-card-header,
html.dark-mode body .content-card-footer {
    background: #26262e !important;
    background-color: #26262e !important;
    background-image: none !important;
    border-color: #2d3748 !important;
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] body .card-header *,
html[data-bs-theme="dark"] body .card-footer *,
html.dark-mode body .card-header *,
html.dark-mode body .card-footer * {
    color: #f1f5f9;
}

/* Specific Billing, Aging, Patient Payment & Eligibility Overrides */
html[data-bs-theme="dark"] body .billing-search-footer,
html.dark-mode body .billing-search-footer,
[data-bs-theme="dark"] .billing-search-footer,
html.dark-mode .billing-search-footer {
    background-color: #26262e !important;
    border-top: 1px solid #2d3748 !important;
    color: #cbd5e1 !important;
}

html[data-bs-theme="dark"] body .billing-search-header,
html.dark-mode body .billing-search-header,
[data-bs-theme="dark"] .billing-search-header,
html.dark-mode .billing-search-header {
    background: #26262e !important;
    background-color: #26262e !important;
    background-image: none !important;
    border-bottom: 1px solid #2d3748 !important;
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] body .billing-modal-header,
html.dark-mode body .billing-modal-header,
[data-bs-theme="dark"] .billing-modal-header,
html.dark-mode .billing-modal-header {
    background: #26262e !important;
    background-color: #26262e !important;
    background-image: none !important;
    border-bottom: 1px solid #2d3748 !important;
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] body .billing-module-header,
html.dark-mode body .billing-module-header,
[data-bs-theme="dark"] .billing-module-header,
html.dark-mode .billing-module-header {
    background: #26262e !important;
    background-color: #26262e !important;
    background-image: none !important;
    border-bottom: 1px solid #2d3748 !important;
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] body .billing-module,
html.dark-mode body .billing-module,
[data-bs-theme="dark"] .billing-module,
html.dark-mode .billing-module {
    background-color: #1e1e24 !important;
    border: 1px solid #2d3748 !important;
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] body table thead,
html[data-bs-theme="dark"] body table thead th,
html[data-bs-theme="dark"] body table thead tr,
html.dark-mode body table thead,
html.dark-mode body table thead th,
html.dark-mode body table thead tr,
[data-bs-theme="dark"] table thead th,
html.dark-mode table thead th {
    background: #26262e !important;
    background-color: #26262e !important;
    border-bottom-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] body .pp-table,
html.dark-mode body .pp-table,
[data-bs-theme="dark"] .pp-table,
html.dark-mode .pp-table {
    background-color: #1e1e24 !important;
    color: #e2e8f0 !important;
    border-color: #2d3748 !important;
}

html[data-bs-theme="dark"] body .pp-table thead,
html[data-bs-theme="dark"] body .pp-table thead th,
html.dark-mode body .pp-table thead,
html.dark-mode body .pp-table thead th,
[data-bs-theme="dark"] .pp-table thead th,
html.dark-mode .pp-table thead th {
    background: #26262e !important;
    background-color: #26262e !important;
    border-bottom-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] body .pp-table tbody tr,
html.dark-mode body .pp-table tbody tr {
    background-color: #1e1e24 !important;
    border-bottom-color: #2d3748 !important;
}

html[data-bs-theme="dark"] body .pp-table tbody tr:nth-child(even),
html.dark-mode body .pp-table tbody tr:nth-child(even) {
    background-color: #26262e !important;
}

html[data-bs-theme="dark"] body .pp-table tbody tr:hover,
html.dark-mode body .pp-table tbody tr:hover {
    background-color: #2d3748 !important;
}

html[data-bs-theme="dark"] body .pp-table tbody td,
html.dark-mode body .pp-table tbody td {
    color: #cbd5e1 !important;
    border-bottom-color: #2d3748 !important;
}

html[data-bs-theme="dark"] body .billing-results-panel,
html.dark-mode body .billing-results-panel,
[data-bs-theme="dark"] .billing-results-panel,
html.dark-mode .billing-results-panel {
    background-color: #1e1e24 !important;
    border: 1px solid #2d3748 !important;
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] body .billing-results-header,
html.dark-mode body .billing-results-header,
[data-bs-theme="dark"] .billing-results-header,
html.dark-mode .billing-results-header {
    background-color: #26262e !important;
    border-bottom: 1px solid #2d3748 !important;
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] body .eligibility-page-title,
html.dark-mode body .eligibility-page-title,
[data-bs-theme="dark"] .eligibility-page-title,
html.dark-mode .eligibility-page-title {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
    color: #60a5fa !important;
    border-left-color: #3b82f6 !important;
}

html[data-bs-theme="dark"] body #eligibilitySearchForm,
html.dark-mode body #eligibilitySearchForm,
[data-bs-theme="dark"] #eligibilitySearchForm,
html.dark-mode #eligibilitySearchForm {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] body .billing-tbl,
html.dark-mode body .billing-tbl,
[data-bs-theme="dark"] .billing-tbl,
html.dark-mode .billing-tbl {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] body .billing-tbl thead,
html[data-bs-theme="dark"] body .billing-tbl thead th,
html.dark-mode body .billing-tbl thead,
html.dark-mode body .billing-tbl thead th,
[data-bs-theme="dark"] .billing-tbl thead th,
html.dark-mode .billing-tbl thead th {
    background: #26262e !important;
    background-color: #26262e !important;
    border-bottom-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] body .billing-tbl tbody td,
html.dark-mode body .billing-tbl tbody td {
    background-color: #1e1e24 !important;
    border-bottom-color: #2d3748 !important;
    color: #cbd5e1 !important;
}

/* =================================================================
   SCHEDULING & CALENDAR DARK MODE OVERRIDES (WEEK & DAY VIEWS)
   ================================================================= */
[data-bs-theme="dark"] .calendar-container,
html.dark-mode .calendar-container {
    background: #1e1e24 !important;
    border-color: #2d3748 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .calendar-header,
html.dark-mode .calendar-header {
    background: #26262e !important;
    border-bottom: 1px solid #2d3748 !important;
}

[data-bs-theme="dark"] .calendar-title,
html.dark-mode .calendar-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .calendar-nav button,
html.dark-mode .calendar-nav button {
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
    background: #26262e !important;
}

[data-bs-theme="dark"] .calendar-nav button:hover,
html.dark-mode .calendar-nav button:hover {
    background: #3f4756 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .calendar-actions button,
html.dark-mode .calendar-actions button {
    background: #26262e !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .calendar-actions button:hover,
html.dark-mode .calendar-actions button:hover {
    background: #3f4756 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .calendar-actions button.active,
html.dark-mode .calendar-actions button.active {
    background: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

[data-bs-theme="dark"] .calendar-day,
html.dark-mode .calendar-day {
    background: #1e1e24 !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .calendar-day:hover,
html.dark-mode .calendar-day:hover {
    background: #26262e !important;
}

[data-bs-theme="dark"] .calendar-day.other-month,
html.dark-mode .calendar-day.other-month {
    background: #17171d !important;
    color: #64748b !important;
}

[data-bs-theme="dark"] .calendar-day.today,
html.dark-mode .calendar-day.today {
    background: #2d240d !important;
    border-color: #fbbf24 !important;
}

[data-bs-theme="dark"] .day-number,
html.dark-mode .day-number {
    color: #f1f5f9 !important;
}

/* Day/Week grid overrides */
[data-bs-theme="dark"] .day-grid,
[data-bs-theme="dark"] .week-grid,
html.dark-mode .day-grid,
html.dark-mode .week-grid {
    background: #1e1e24 !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .time-labels,
html.dark-mode .time-labels {
    border-right: 1px solid #2d3748 !important;
    background: #17171d !important;
}

[data-bs-theme="dark"] .time-label,
html.dark-mode .time-label {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .day-column,
html.dark-mode .day-column {
    border-left: 1px solid #2d3748 !important;
    background: repeating-linear-gradient(to bottom, #1e1e24, #1e1e24 59px, #26262e 60px) !important;
}

/* Calendar Week Header */
[data-bs-theme="dark"] .week-header,
html.dark-mode .week-header {
    background: #26262e !important;
    border-bottom: 1px solid #2d3748 !important;
}

[data-bs-theme="dark"] .week-header-day,
html.dark-mode .week-header-day {
    color: #f1f5f9 !important;
    border-right: 1px solid #2d3748 !important;
}

/* Multi-clinician day view header */
[data-bs-theme="dark"] .multi-clinician-header,
html.dark-mode .multi-clinician-header {
    background: #26262e !important;
    border-bottom: 1px solid #2d3748 !important;
}

[data-bs-theme="dark"] .header-time,
html.dark-mode .header-time {
    background: #26262e !important;
    border-right: 1px solid #2d3748 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .header-clinician,
html.dark-mode .header-clinician {
    border-right: 1px solid #2d3748 !important;
}

/* Clinician Working Hours blocks in Dark Mode */
[data-bs-theme="dark"] .working-hours-block,
html.dark-mode .working-hours-block {
    opacity: 0.25 !important;
}

[data-bs-theme="dark"] .working-hours-block:hover,
html.dark-mode .working-hours-block:hover {
    opacity: 0.45 !important;
}

[data-bs-theme="dark"] .working-hours-block .working-hours-start,
[data-bs-theme="dark"] .working-hours-block .working-hours-end,
html.dark-mode .working-hours-block .working-hours-start,
html.dark-mode .working-hours-block .working-hours-end {
    background: rgba(0, 0, 0, 0.5) !important;
    text-shadow: none !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .working-hours-block.clinician-0, html.dark-mode .working-hours-block.clinician-0 { background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%) !important; border-color: #3b82f6 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-1, html.dark-mode .working-hours-block.clinician-1 { background: linear-gradient(135deg, #064e3b 0%, #022c22 100%) !important; border-color: #10b981 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-2, html.dark-mode .working-hours-block.clinician-2 { background: linear-gradient(135deg, #78350f 0%, #451a03 100%) !important; border-color: #f59e0b !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-3, html.dark-mode .working-hours-block.clinician-3 { background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%) !important; border-color: #ef4444 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-4, html.dark-mode .working-hours-block.clinician-4 { background: linear-gradient(135deg, #4c1d95 0%, #2e1065 100%) !important; border-color: #8b5cf6 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-5, html.dark-mode .working-hours-block.clinician-5 { background: linear-gradient(135deg, #7c2d12 0%, #431407 100%) !important; border-color: #f97316 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-6, html.dark-mode .working-hours-block.clinician-6 { background: linear-gradient(135deg, #134e4a 0%, #042f2e 100%) !important; border-color: #140b22 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-7, html.dark-mode .working-hours-block.clinician-7 { background: linear-gradient(135deg, #701a75 0%, #4a044e 100%) !important; border-color: #d946ef !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-8, html.dark-mode .working-hours-block.clinician-8 { background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important; border-color: #6b7280 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-9, html.dark-mode .working-hours-block.clinician-9 { background: linear-gradient(135deg, #065f46 0%, #064e3b 100%) !important; border-color: #34d399 !important; }

[data-bs-theme="dark"] .working-hours-block.clinician-0 .working-hours-start, [data-bs-theme="dark"] .working-hours-block.clinician-0 .working-hours-end, html.dark-mode .working-hours-block.clinician-0 .working-hours-start, html.dark-mode .working-hours-block.clinician-0 .working-hours-end { color: #60a5fa !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-1 .working-hours-start, [data-bs-theme="dark"] .working-hours-block.clinician-1 .working-hours-end, html.dark-mode .working-hours-block.clinician-1 .working-hours-start, html.dark-mode .working-hours-block.clinician-1 .working-hours-end { color: #34d399 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-2 .working-hours-start, [data-bs-theme="dark"] .working-hours-block.clinician-2 .working-hours-end, html.dark-mode .working-hours-block.clinician-2 .working-hours-start, html.dark-mode .working-hours-block.clinician-2 .working-hours-end { color: #fbbf24 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-3 .working-hours-start, [data-bs-theme="dark"] .working-hours-block.clinician-3 .working-hours-end, html.dark-mode .working-hours-block.clinician-3 .working-hours-start, html.dark-mode .working-hours-block.clinician-3 .working-hours-end { color: #fca5a5 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-4 .working-hours-start, [data-bs-theme="dark"] .working-hours-block.clinician-4 .working-hours-end, html.dark-mode .working-hours-block.clinician-4 .working-hours-start, html.dark-mode .working-hours-block.clinician-4 .working-hours-end { color: #a78bfa !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-5 .working-hours-start, [data-bs-theme="dark"] .working-hours-block.clinician-5 .working-hours-end, html.dark-mode .working-hours-block.clinician-5 .working-hours-start, html.dark-mode .working-hours-block.clinician-5 .working-hours-end { color: #fdba74 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-6 .working-hours-start, [data-bs-theme="dark"] .working-hours-block.clinician-6 .working-hours-end, html.dark-mode .working-hours-block.clinician-6 .working-hours-start, html.dark-mode .working-hours-block.clinician-6 .working-hours-end { color: #2dd4bf !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-7 .working-hours-start, [data-bs-theme="dark"] .working-hours-block.clinician-7 .working-hours-end, html.dark-mode .working-hours-block.clinician-7 .working-hours-start, html.dark-mode .working-hours-block.clinician-7 .working-hours-end { color: #f472b6 !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-8 .working-hours-start, [data-bs-theme="dark"] .working-hours-block.clinician-8 .working-hours-end, html.dark-mode .working-hours-block.clinician-8 .working-hours-start, html.dark-mode .working-hours-block.clinician-8 .working-hours-end { color: #d1d5db !important; }
[data-bs-theme="dark"] .working-hours-block.clinician-9 .working-hours-start, [data-bs-theme="dark"] .working-hours-block.clinician-9 .working-hours-end, html.dark-mode .working-hours-block.clinician-9 .working-hours-start, html.dark-mode .working-hours-block.clinician-9 .working-hours-end { color: #6ee7b7 !important; }

/* Event / Appointment Blocks in Day/Week View */
[data-bs-theme="dark"] .event-block,
[data-bs-theme="dark"] .professional-appointment-block,
html.dark-mode .event-block,
html.dark-mode .professional-appointment-block {
    background: #2a3421 !important;
    border-color: #3d4a2f !important;
    border-left: 4px solid #8bc34a !important;
    color: #e2e8f0 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
}

[data-bs-theme="dark"] .event-appointment-text,
html.dark-mode .event-appointment-text {
    background: rgba(0, 0, 0, 0.4) !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .event-clinician,
html.dark-mode .event-clinician {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .event-time-badge,
html.dark-mode .event-time-badge {
    color: #f1f5f9 !important;
}

/* Footer alignment */
[data-bs-theme="dark"] .calendar-footer,
html.dark-mode .calendar-footer {
    background: #26262e !important;
    border-top: 1px solid #2d3748 !important;
}

/* =================================================================
   allEventsModal DARK MODE OVERRIDES
   ================================================================= */
[data-bs-theme="dark"] #allEventsModal > div,
html.dark-mode #allEventsModal > div {
    background: #1e1e24 !important;
    border: 1px solid #3f4756 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] #allEventsModal > div > div:first-child,
html.dark-mode #allEventsModal > div > div:first-child {
    background: #26262e !important;
    border-bottom: 1px solid #2d3748 !important;
}

[data-bs-theme="dark"] #allEventsModal h3,
html.dark-mode #allEventsModal h3 {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] #closeAllEventsModal,
html.dark-mode #closeAllEventsModal {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #closeAllEventsModal:hover,
html.dark-mode #closeAllEventsModal:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] #allEventsModal div,
html.dark-mode #allEventsModal div {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] #allEventsModal .all-events-item,
html.dark-mode #allEventsModal .all-events-item {
    background: #26262e !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

[data-bs-theme="dark"] #allEventsModal .all-events-item:hover,
html.dark-mode #allEventsModal .all-events-item:hover {
    background: #2d3748 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
}

[data-bs-theme="dark"] #allEventsModal .all-events-item div,
[data-bs-theme="dark"] #allEventsModal .all-events-item strong,
[data-bs-theme="dark"] #allEventsModal .all-events-item span,
[data-bs-theme="dark"] #allEventsModal .all-events-item i,
html.dark-mode #allEventsModal .all-events-item div,
html.dark-mode #allEventsModal .all-events-item strong,
html.dark-mode #allEventsModal .all-events-item span,
html.dark-mode #allEventsModal .all-events-item i {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #allEventsModal .all-events-item strong,
html.dark-mode #allEventsModal .all-events-item strong {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] #allEventsModal div[style*="color: #6c757d"],
[data-bs-theme="dark"] #allEventsModal div[style*="color: #9ca3af"],
[data-bs-theme="dark"] #allEventsModal span[style*="color: #6b7280"],
html.dark-mode #allEventsModal div[style*="color: #6c757d"],
html.dark-mode #allEventsModal div[style*="color: #9ca3af"],
html.dark-mode #allEventsModal span[style*="color: #6b7280"] {
    color: #94a3b8 !important;
}

/* =================================================================
   PATIENT CREATE & EDIT PAGES DARK MODE OVERRIDES
   ================================================================= */
[data-bs-theme="dark"] .form-section,
html.dark-mode .form-section {
    background: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

[data-bs-theme="dark"] .form-section:hover,
html.dark-mode .form-section:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
}

[data-bs-theme="dark"] .form-section h6,
html.dark-mode .form-section h6 {
    color: #f1f5f9 !important;
    border-bottom-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .form-section h6 i,
html.dark-mode .form-section h6 i {
    background: none !important;
    -webkit-text-fill-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

[data-bs-theme="dark"] .compact-form .form-label,
html.dark-mode .compact-form .form-label {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .compact-form .form-control,
[data-bs-theme="dark"] .compact-form .form-select,
html.dark-mode .compact-form .form-control,
html.dark-mode .compact-form .form-select {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .compact-form .form-control:focus,
[data-bs-theme="dark"] .compact-form .form-select:focus,
html.dark-mode .compact-form .form-control:focus,
html.dark-mode .compact-form .form-select:focus {
    background-color: #2a2a34 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .form-check,
[data-bs-theme="dark"] .radio-group,
[data-bs-theme="dark"] .reminder-pref-group,
html.dark-mode .form-check,
html.dark-mode .radio-group,
html.dark-mode .reminder-pref-group {
    background: #26262e !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .form-check:hover,
[data-bs-theme="dark"] .radio-group .form-check-label:hover,
html.dark-mode .form-check:hover,
html.dark-mode .radio-group .form-check-label:hover {
    background: #2a2a34 !important;
    border-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .form-check-label,
[data-bs-theme="dark"] .reminder-pref-group .form-check-label,
html.dark-mode .form-check-label,
html.dark-mode .reminder-pref-group .form-check-label {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .radio-group .form-check-input:checked + .form-check-label,
html.dark-mode .radio-group .form-check-input:checked + .form-check-label {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .help-text,
html.dark-mode .help-text {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .progress-indicator,
html.dark-mode .progress-indicator {
    background: #1e1e24 !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .progress-step,
html.dark-mode .progress-step {
    background: #26262e !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .progress-step:hover,
html.dark-mode .progress-step:hover {
    background: #2a2a34 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .progress-step.active,
html.dark-mode .progress-step.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .progress-step.completed,
html.dark-mode .progress-step.completed {
    background: #27ae60 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .submit-section,
html.dark-mode .submit-section {
    background: #26262e !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .btn-light,
html.dark-mode .btn-light {
    background: #26262e !important;
    color: #e2e8f0 !important;
    border: 1px solid #3f4756 !important;
}

[data-bs-theme="dark"] .btn-light:hover,
html.dark-mode .btn-light:hover {
    background: #2a2a34 !important;
    color: #ffffff !important;
}

/* =================================================================
   PATIENT SHOW VIEW DARK MODE OVERRIDES (INSURANCE & PORTAL CARDS)
   ================================================================= */
[data-bs-theme="dark"] .insurance-form-container fieldset,
html.dark-mode .insurance-form-container fieldset {
    background-color: #17171d !important;
    border-color: #3f4756 !important;
}

[data-bs-theme="dark"] .insurance-form-container fieldset legend,
html.dark-mode .insurance-form-container fieldset legend {
    background: #1e1e24 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .portal-access-card,
html.dark-mode .portal-access-card {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .insurance-edit-form .card-footer,
html.dark-mode .insurance-edit-form .card-footer {
    background-color: #26262e !important;
    border-top-color: #2d3748 !important;
}

[data-bs-theme="dark"] .policy-info-container,
html.dark-mode .policy-info-container {
    background: #1e1e24 !important;
    border-color: #2d3748 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .policy-info-container td,
html.dark-mode .policy-info-container td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .policy-info-container td.text-muted,
html.dark-mode .policy-info-container td.text-muted {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .insurance-form-container > .card,
html.dark-mode .insurance-form-container > .card {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .insurance-form-container > .card .card-header,
html.dark-mode .insurance-form-container > .card .card-header {
    background-color: #26262e !important;
    border-bottom: 1px solid #2d3748 !important;
}

[data-bs-theme="dark"] .form-footer,
html.dark-mode .form-footer {
    background-color: #26262e !important;
    border-color: #2d3748 !important;
    color: #cbd5e1 !important;
}

/* =================================================================
   PATIENT SHOW VIEW INSURANCE ENTRY DARK MODE OVERRIDES
   ================================================================= */
[data-bs-theme="dark"] .insurance-entry,
html.dark-mode .insurance-entry {
    background-color: #1e1e24 !important;
    border-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .insurance-entry > div.bg-white,
html.dark-mode .insurance-entry > div.bg-white {
    background-color: #26262e !important;
    border-bottom-color: #2d3748 !important;
    color: #f1f5f9 !important;
}

/* =================================================================
   PORTAL DOCUMENTS & QUESTIONNAIRES DARK MODE OVERRIDES
   ================================================================= */
[data-bs-theme="dark"] .contacts-doc-container,
[data-bs-theme="dark"] .simple-doc-container,
[data-bs-theme="dark"] .insurance-doc-container,
[data-bs-theme="dark"] .questionnaire-doc-container,
[data-bs-theme="dark"] .pending-doc-container,
html.dark-mode .contacts-doc-container,
html.dark-mode .simple-doc-container,
html.dark-mode .insurance-doc-container,
html.dark-mode .questionnaire-doc-container,
html.dark-mode .pending-doc-container {
    background-color: #1e1e24 !important;
    color: #cbd5e1 !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .section-title,
html.dark-mode .section-title {
    color: #f1f5f9 !important;
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .info-label,
html.dark-mode .info-label {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .info-val,
html.dark-mode .info-val {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .doc-footer,
html.dark-mode .doc-footer {
    background-color: #26262e !important;
    border-top-color: #2d3748 !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .scoring-card,
html.dark-mode .scoring-card {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .interpretation-content,
html.dark-mode .interpretation-content {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .results-table,
html.dark-mode .results-table {
    border-color: #3f4756 !important;
}

[data-bs-theme="dark"] .results-table thead th,
html.dark-mode .results-table thead th {
    background-color: #26262e !important;
    color: #94a3b8 !important;
    border-bottom-color: #3f4756 !important;
}

[data-bs-theme="dark"] .results-table tbody td,
html.dark-mode .results-table tbody td {
    border-bottom-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .question-text,
html.dark-mode .question-text {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .option-btn,
html.dark-mode .option-btn {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .option-btn.selected,
html.dark-mode .option-btn.selected {
    background-color: #1e293b !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .success-alert-box,
html.dark-mode .success-alert-box {
    background-color: #14532d !important;
    border-color: #15803d !important;
    color: #4ade80 !important;
}

[data-bs-theme="dark"] .form-header-title,
html.dark-mode .form-header-title {
    color: #3b82f6 !important;
}

[data-bs-theme="dark"] .form-header-meta,
html.dark-mode .form-header-meta {
    color: #94a3b8 !important;
}

/* =================================================================
   PRACTICE LOCATIONS DARK MODE OVERRIDES
   ================================================================= */
[data-bs-theme="dark"] .location-card,
html.dark-mode .location-card {
    background-color: #1e1e24 !important;
    border-color: #3f4756 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .location-card.primary,
html.dark-mode .location-card.primary {
    border-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .location-header,
html.dark-mode .location-header {
    background-color: #26262e !important;
    border-bottom: 1px solid #2d3748 !important;
}

[data-bs-theme="dark"] .location-name-value,
html.dark-mode .location-name-value {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .location-label,
html.dark-mode .location-label {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .location-value,
html.dark-mode .location-value {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .icon-action,
html.dark-mode .icon-action {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .icon-action:hover,
html.dark-mode .icon-action:hover {
    color: #ffffff !important;
}

/* =================================================================
   POPUP MODALS DARK MODE OVERRIDES (ALL 10 POPUPS & ADD LOCATION)
   ================================================================= */
[data-bs-theme="dark"] .esignature-popup-modal-container,
[data-bs-theme="dark"] .esignature-popup-modal-content,
[data-bs-theme="dark"] .password-popup-modal-container,
[data-bs-theme="dark"] .password-popup-modal-content,
[data-bs-theme="dark"] .password-confirm-popup-modal-container,
[data-bs-theme="dark"] .password-confirm-popup-modal-content,
[data-bs-theme="dark"] .pin-popup-modal-container,
[data-bs-theme="dark"] .pin-popup-modal-content,
[data-bs-theme="dark"] .session-popup-modal-container,
[data-bs-theme="dark"] .session-popup-modal-content,
[data-bs-theme="dark"] .tfa-management-popup-modal-container,
[data-bs-theme="dark"] .tfa-management-popup-modal-content,
[data-bs-theme="dark"] .tfa-popup-modal-container,
[data-bs-theme="dark"] .tfa-popup-modal-content,
[data-bs-theme="dark"] .share-modal,
[data-bs-theme="dark"] .share-body,
[data-bs-theme="dark"] .pin-verify-modal,
[data-bs-theme="dark"] .pin-verify-body,
[data-bs-theme="dark"] .draft-confirm-modal,
[data-bs-theme="dark"] .draft-confirm-body,
[data-bs-theme="dark"] .modal-body,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .bg-white.rounded-lg.overflow-hidden,
[data-bs-theme="dark"] .mb-6.bg-white,
[data-bs-theme="dark"] .custom-modal,
[data-bs-theme="dark"] div:has(> .custom-modal),
html.dark-mode .esignature-popup-modal-container,
html.dark-mode .esignature-popup-modal-content,
html.dark-mode .password-popup-modal-container,
html.dark-mode .password-popup-modal-content,
html.dark-mode .password-confirm-popup-modal-container,
html.dark-mode .password-confirm-popup-modal-content,
html.dark-mode .pin-popup-modal-container,
html.dark-mode .pin-popup-modal-content,
html.dark-mode .session-popup-modal-container,
html.dark-mode .session-popup-modal-content,
html.dark-mode .tfa-management-popup-modal-container,
html.dark-mode .tfa-management-popup-modal-content,
html.dark-mode .tfa-popup-modal-container,
html.dark-mode .tfa-popup-modal-content,
html.dark-mode .share-modal,
html.dark-mode .share-body,
html.dark-mode .pin-verify-modal,
html.dark-mode .pin-verify-body,
html.dark-mode .draft-confirm-modal,
html.dark-mode .draft-confirm-body,
html.dark-mode .modal-body,
html.dark-mode .modal-content,
html.dark-mode .bg-white.rounded-lg.overflow-hidden,
html.dark-mode .mb-6.bg-white,
html.dark-mode .custom-modal,
html.dark-mode div:has(> .custom-modal) {
    background: #1e1e24 !important;
    background-color: #1e1e24 !important;
    color: #cbd5e1 !important;
    border-color: #3f4756 !important;
}

[data-bs-theme="dark"] .esignature-popup-modal-header,
[data-bs-theme="dark"] .password-popup-modal-header,
[data-bs-theme="dark"] .password-confirm-popup-modal-header,
[data-bs-theme="dark"] .pin-popup-modal-header,
[data-bs-theme="dark"] .session-popup-modal-header,
[data-bs-theme="dark"] .tfa-management-popup-modal-header,
[data-bs-theme="dark"] .tfa-popup-modal-header,
[data-bs-theme="dark"] .share-header,
[data-bs-theme="dark"] .pin-verify-header,
[data-bs-theme="dark"] .draft-confirm-header,
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-header-primary,
html.dark-mode .esignature-popup-modal-header,
html.dark-mode .password-popup-modal-header,
html.dark-mode .password-confirm-popup-modal-header,
html.dark-mode .pin-popup-modal-header,
html.dark-mode .session-popup-modal-header,
html.dark-mode .tfa-management-popup-modal-header,
html.dark-mode .tfa-popup-modal-header,
html.dark-mode .share-header,
html.dark-mode .pin-verify-header,
html.dark-mode .draft-confirm-header,
html.dark-mode .modal-header,
html.dark-mode .modal-header-primary {
    background: #26262e !important;
    background-color: #26262e !important;
    background-image: none !important;
    border-bottom: 1px solid #2d3748 !important;
}

[data-bs-theme="dark"] .esignature-popup-modal-title,
[data-bs-theme="dark"] .password-popup-modal-title,
[data-bs-theme="dark"] .password-confirm-popup-modal-title,
[data-bs-theme="dark"] .pin-popup-modal-title,
[data-bs-theme="dark"] .session-popup-modal-title,
[data-bs-theme="dark"] .tfa-management-popup-modal-title,
[data-bs-theme="dark"] .tfa-popup-modal-title,
[data-bs-theme="dark"] .share-title,
[data-bs-theme="dark"] .pin-verify-header .title,
[data-bs-theme="dark"] .draft-confirm-header .title,
[data-bs-theme="dark"] .modal-title,
html.dark-mode .esignature-popup-modal-title,
html.dark-mode .password-popup-modal-title,
html.dark-mode .password-confirm-popup-modal-title,
html.dark-mode .pin-popup-modal-title,
html.dark-mode .session-popup-modal-title,
html.dark-mode .tfa-management-popup-modal-title,
html.dark-mode .tfa-popup-modal-title,
html.dark-mode .share-title,
html.dark-mode .pin-verify-header .title,
html.dark-mode .draft-confirm-header .title,
html.dark-mode .modal-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .modal-icon,
html.dark-mode .modal-icon {
    background: #26262e !important;
    color: #3b82f6 !important;
}

[data-bs-theme="dark"] .esignature-popup-close-btn,
[data-bs-theme="dark"] .password-popup-close-btn,
[data-bs-theme="dark"] .password-confirm-popup-close-btn,
[data-bs-theme="dark"] .pin-popup-close-btn,
[data-bs-theme="dark"] .session-popup-close-btn,
[data-bs-theme="dark"] .tfa-management-popup-close-btn,
[data-bs-theme="dark"] .tfa-popup-close-btn,
[data-bs-theme="dark"] .share-close,
[data-bs-theme="dark"] .pin-verify-close,
[data-bs-theme="dark"] .draft-confirm-close,
html.dark-mode .esignature-popup-close-btn,
html.dark-mode .password-popup-close-btn,
html.dark-mode .password-confirm-popup-close-btn,
html.dark-mode .pin-popup-close-btn,
html.dark-mode .session-popup-close-btn,
html.dark-mode .tfa-management-popup-close-btn,
html.dark-mode .tfa-popup-close-btn,
html.dark-mode .share-close,
html.dark-mode .pin-verify-close,
html.dark-mode .draft-confirm-close {
    color: #cbd5e1 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .esignature-popup-close-btn:hover,
[data-bs-theme="dark"] .password-popup-close-btn:hover,
[data-bs-theme="dark"] .password-confirm-popup-close-btn:hover,
[data-bs-theme="dark"] .pin-popup-close-btn:hover,
[data-bs-theme="dark"] .session-popup-close-btn:hover,
[data-bs-theme="dark"] .tfa-management-popup-close-btn:hover,
[data-bs-theme="dark"] .tfa-popup-close-btn:hover,
[data-bs-theme="dark"] .share-close:hover,
[data-bs-theme="dark"] .pin-verify-close:hover,
[data-bs-theme="dark"] .draft-confirm-close:hover,
html.dark-mode .esignature-popup-close-btn:hover,
html.dark-mode .password-popup-close-btn:hover,
html.dark-mode .password-confirm-popup-close-btn:hover,
html.dark-mode .pin-popup-close-btn:hover,
html.dark-mode .session-popup-close-btn:hover,
html.dark-mode .tfa-management-popup-close-btn:hover,
html.dark-mode .tfa-popup-close-btn:hover,
html.dark-mode .share-close:hover,
html.dark-mode .pin-verify-close:hover,
html.dark-mode .draft-confirm-close:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Modal Inputs Background & Border (Black/Dark same like appointment) */
[data-bs-theme="dark"] .esignature-popup-form-control,
[data-bs-theme="dark"] .password-popup-form-control,
[data-bs-theme="dark"] .password-confirm-popup-form-control,
[data-bs-theme="dark"] .pin-popup-form-control,
[data-bs-theme="dark"] .session-popup-form-control,
[data-bs-theme="dark"] .tfa-management-popup-form-control,
[data-bs-theme="dark"] .tfa-popup-form-control,
[data-bs-theme="dark"] .sh-ctrl,
[data-bs-theme="dark"] .share-instructions,
[data-bs-theme="dark"] .pin-verify-input,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .input-sm,
html.dark-mode .esignature-popup-form-control,
html.dark-mode .password-popup-form-control,
html.dark-mode .password-confirm-popup-form-control,
html.dark-mode .pin-popup-form-control,
html.dark-mode .session-popup-form-control,
html.dark-mode .tfa-management-popup-form-control,
html.dark-mode .tfa-popup-form-control,
html.dark-mode .sh-ctrl,
html.dark-mode .share-instructions,
html.dark-mode .pin-verify-input,
html.dark-mode .form-control,
html.dark-mode .input-sm {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .esignature-popup-form-control:focus,
[data-bs-theme="dark"] .password-popup-form-control:focus,
[data-bs-theme="dark"] .password-confirm-popup-form-control:focus,
[data-bs-theme="dark"] .pin-popup-form-control:focus,
[data-bs-theme="dark"] .session-popup-form-control:focus,
[data-bs-theme="dark"] .tfa-management-popup-form-control:focus,
[data-bs-theme="dark"] .tfa-popup-form-control:focus,
[data-bs-theme="dark"] .sh-ctrl:focus,
[data-bs-theme="dark"] .share-instructions:focus,
[data-bs-theme="dark"] .pin-verify-input:focus,
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .input-sm:focus,
html.dark-mode .esignature-popup-form-control:focus,
html.dark-mode .password-popup-form-control:focus,
html.dark-mode .password-confirm-popup-form-control:focus,
html.dark-mode .pin-popup-form-control:focus,
html.dark-mode .session-popup-form-control:focus,
html.dark-mode .tfa-management-popup-form-control:focus,
html.dark-mode .tfa-popup-form-control:focus,
html.dark-mode .sh-ctrl:focus,
html.dark-mode .share-instructions:focus,
html.dark-mode .pin-verify-input:focus,
html.dark-mode .form-control:focus,
html.dark-mode .input-sm:focus {
    background-color: #2a2a34 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* Modal Footers, Actions, Labels */
[data-bs-theme="dark"] .esignature-popup-modal-footer,
[data-bs-theme="dark"] .password-popup-modal-footer,
[data-bs-theme="dark"] .password-confirm-popup-modal-footer,
[data-bs-theme="dark"] .pin-popup-modal-footer,
[data-bs-theme="dark"] .session-popup-modal-footer,
[data-bs-theme="dark"] .tfa-management-popup-modal-footer,
[data-bs-theme="dark"] .tfa-popup-modal-footer,
[data-bs-theme="dark"] .share-footer,
[data-bs-theme="dark"] .pin-verify-footer,
[data-bs-theme="dark"] .draft-confirm-footer,
[data-bs-theme="dark"] .form-actions,
html.dark-mode .esignature-popup-modal-footer,
html.dark-mode .password-popup-modal-footer,
html.dark-mode .password-confirm-popup-modal-footer,
html.dark-mode .pin-popup-modal-footer,
html.dark-mode .session-popup-modal-footer,
html.dark-mode .tfa-management-popup-modal-footer,
html.dark-mode .tfa-popup-modal-footer,
html.dark-mode .share-footer,
html.dark-mode .pin-verify-footer,
html.dark-mode .draft-confirm-footer,
html.dark-mode .form-actions {
    background: #26262e !important;
    background-color: #26262e !important;
    border-top-color: #2d3748 !important;
}

[data-bs-theme="dark"] .esignature-popup-form-label,
[data-bs-theme="dark"] .password-popup-form-label,
[data-bs-theme="dark"] .password-confirm-popup-form-label,
[data-bs-theme="dark"] .pin-popup-form-label,
[data-bs-theme="dark"] .session-popup-form-label,
[data-bs-theme="dark"] .tfa-management-popup-form-label,
[data-bs-theme="dark"] .tfa-popup-form-label,
[data-bs-theme="dark"] .share-label,
[data-bs-theme="dark"] .pin-verify-instructions,
[data-bs-theme="dark"] .draft-confirm-message,
[data-bs-theme="dark"] .draft-confirm-question,
[data-bs-theme="dark"] .form-label,
html.dark-mode .esignature-popup-form-label,
html.dark-mode .password-popup-form-label,
html.dark-mode .password-confirm-popup-form-label,
html.dark-mode .pin-popup-form-label,
html.dark-mode .session-popup-form-label,
html.dark-mode .tfa-management-popup-form-label,
html.dark-mode .tfa-popup-form-label,
html.dark-mode .share-label,
html.dark-mode .pin-verify-instructions,
html.dark-mode .draft-confirm-message,
html.dark-mode .draft-confirm-question,
html.dark-mode .form-label {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .share-included-box,
html.dark-mode .share-included-box {
    background: #26262e !important;
    border-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .share-included-item,
html.dark-mode .share-included-item {
    background: #1e1e24 !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .share-item-status,
html.dark-mode .share-item-status {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .taxonomy-dropdown,
html.dark-mode .taxonomy-dropdown {
    background: #1e1e24 !important;
    border-color: #3f4756 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .taxonomy-item,
html.dark-mode .taxonomy-item {
    border-bottom-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .taxonomy-item:hover,
[data-bs-theme="dark"] .taxonomy-item.highlighted,
html.dark-mode .taxonomy-item:hover,
html.dark-mode .taxonomy-item.highlighted {
    background-color: #2d3748 !important;
}

[data-bs-theme="dark"] .taxonomy-item.selected,
html.dark-mode .taxonomy-item.selected {
    background-color: #1e3a8a !important;
    color: #f1f5f9 !important;
}

/* =================================================================
   CLINICAL NOTES (VIEW, CREATE, EDIT) & HEADER SUMMARY DARK OVERRIDES
   ================================================================= */
[data-bs-theme="dark"] .note-wrapper,
html.dark-mode .note-wrapper {
    background-color: #121214 !important;
    color: #cbd5e1 !important;
}

/* All Notes Form Card Containers */
[data-bs-theme="dark"] .cn-form,
[data-bs-theme="dark"] .contact-form,
[data-bs-theme="dark"] .misc-form,
[data-bs-theme="dark"] .missed-form,
[data-bs-theme="dark"] .pn-form,
[data-bs-theme="dark"] .pe-form,
[data-bs-theme="dark"] .psychotherapy-form,
[data-bs-theme="dark"] .tn-form,
[data-bs-theme="dark"] .tp-form,
[data-bs-theme="dark"] .progress-note-view,
html.dark-mode .cn-form,
html.dark-mode .contact-form,
html.dark-mode .misc-form,
html.dark-mode .missed-form,
html.dark-mode .pn-form,
html.dark-mode .pe-form,
html.dark-mode .psychotherapy-form,
html.dark-mode .tn-form,
html.dark-mode .tp-form,
html.dark-mode .progress-note-view {
    background: #1e1e24 !important;
    background-color: #1e1e24 !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

/* Form Sections */
[data-bs-theme="dark"] .cn-section,
[data-bs-theme="dark"] .contact-section,
[data-bs-theme="dark"] .misc-section,
[data-bs-theme="dark"] .missed-section,
[data-bs-theme="dark"] .pn-section,
[data-bs-theme="dark"] .pe-section,
[data-bs-theme="dark"] .form-section,
[data-bs-theme="dark"] .tn-section,
[data-bs-theme="dark"] .tp-section,
[data-bs-theme="dark"] .section,
html.dark-mode .cn-section,
html.dark-mode .contact-section,
html.dark-mode .misc-section,
html.dark-mode .missed-section,
html.dark-mode .pn-section,
html.dark-mode .pe-section,
html.dark-mode .form-section,
html.dark-mode .tn-section,
html.dark-mode .tp-section,
html.dark-mode .section {
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .cn-section + .cn-section,
[data-bs-theme="dark"] .contact-section + .contact-section,
[data-bs-theme="dark"] .misc-section + .misc-section,
[data-bs-theme="dark"] .missed-section + .missed-section,
[data-bs-theme="dark"] .pn-section + .pn-section,
[data-bs-theme="dark"] .pe-section + .pe-section,
[data-bs-theme="dark"] .form-section + .form-section,
[data-bs-theme="dark"] .tn-section + .tn-section,
[data-bs-theme="dark"] .tp-section + .tp-section,
[data-bs-theme="dark"] .section + .section,
html.dark-mode .cn-section + .cn-section,
html.dark-mode .contact-section + .contact-section,
html.dark-mode .misc-section + .misc-section,
html.dark-mode .missed-section + .missed-section,
html.dark-mode .pn-section + .pn-section,
html.dark-mode .pe-section + .pe-section,
html.dark-mode .form-section + .form-section,
html.dark-mode .tn-section + .tn-section,
html.dark-mode .tp-section + .tp-section,
html.dark-mode .section + .section {
    border-top-color: #2d3748 !important;
}

/* Section Headers */
[data-bs-theme="dark"] .cn-section-header h3,
[data-bs-theme="dark"] .contact-section-header h3,
[data-bs-theme="dark"] .misc-section-header h3,
[data-bs-theme="dark"] .missed-section-header h3,
[data-bs-theme="dark"] .pn-section-header h3,
[data-bs-theme="dark"] .pe-section-header h3,
[data-bs-theme="dark"] .form-section h3,
[data-bs-theme="dark"] .tn-section-header h3,
[data-bs-theme="dark"] .tp-section-header h3,
[data-bs-theme="dark"] .section-header,
html.dark-mode .cn-section-header h3,
html.dark-mode .contact-section-header h3,
html.dark-mode .misc-section-header h3,
html.dark-mode .missed-section-header h3,
html.dark-mode .pn-section-header h3,
html.dark-mode .pe-section-header h3,
html.dark-mode .form-section h3,
html.dark-mode .tn-section-header h3,
html.dark-mode .tp-section-header h3,
html.dark-mode .section-header {
    color: #f1f5f9 !important;
    border-bottom-color: #3b82f6 !important;
}

/* Form Footer */
[data-bs-theme="dark"] .ehr-form-footer,
html.dark-mode .ehr-form-footer {
    background: #1e1e24 !important;
    border-top-color: #2d3748 !important;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3) !important;
}

/* Risk Areas and Lists */
[data-bs-theme="dark"] .risk-areas .risk-row,
[data-bs-theme="dark"] .risk-row,
[data-bs-theme="dark"] .risk-area,
html.dark-mode .risk-areas .risk-row,
html.dark-mode .risk-row,
html.dark-mode .risk-area {
    background: #17171d !important;
    border-color: #3f4756 !important;
    border-left-color: #3f4756 !important;
}

[data-bs-theme="dark"] .risk-row .mini-label,
html.dark-mode .risk-row .mini-label {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .objective-text,
html.dark-mode .objective-text {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .tp-block,
html.dark-mode .tp-block {
    background: #1e1e24 !important;
    border-color: #3f4756 !important;
}

/* Header Summary Block */
[data-bs-theme="dark"] .header-summary,
html.dark-mode .header-summary {
    border-color: #3f4756 !important;
}

[data-bs-theme="dark"] .header-summary .card-body,
html.dark-mode .header-summary .card-body {
    background: #26262e !important;
    background-color: #26262e !important;
    background-image: none !important;
}

[data-bs-theme="dark"] .header-summary .kv-list dt,
html.dark-mode .header-summary .kv-list dt {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .header-summary .kv-list dd,
html.dark-mode .header-summary .kv-list dd {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .header-summary h4,
html.dark-mode .header-summary h4 {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .presenting-title,
html.dark-mode .presenting-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .presenting-underline,
html.dark-mode .presenting-underline {
    background: #3b82f6 !important;
}

/* Note Signature Banner */
[data-bs-theme="dark"] .note-signature-banner,
html.dark-mode .note-signature-banner {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .note-signature-banner.note-draft,
html.dark-mode .note-signature-banner.note-draft {
    background-color: #332400 !important;
    border-color: #664d03 !important;
    color: #ffd666 !important;
}

/* Generic Note Wrapper Elements */
[data-bs-theme="dark"] .note-wrapper .card,
html.dark-mode .note-wrapper .card {
    background-color: #1e1e24 !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .note-wrapper .card-header,
html.dark-mode .note-wrapper .card-header {
    background-color: #26262e !important;
    border-bottom-color: #2d3748 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .note-wrapper .card-body,
html.dark-mode .note-wrapper .card-body {
    background-color: #1e1e24 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .note-wrapper .table,
html.dark-mode .note-wrapper .table {
    background-color: #1e1e24 !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .note-wrapper .table thead,
[data-bs-theme="dark"] .note-wrapper .table thead th,
[data-bs-theme="dark"] .note-wrapper .table-light,
html.dark-mode .note-wrapper .table thead,
html.dark-mode .note-wrapper .table thead th,
html.dark-mode .note-wrapper .table-light {
    background-color: #26262e !important;
    background: #26262e !important;
    color: #f1f5f9 !important;
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .note-wrapper .table tbody td,
html.dark-mode .note-wrapper .table tbody td {
    background-color: #1e1e24 !important;
    color: #cbd5e1 !important;
    border-bottom-color: #2d3748 !important;
}

[data-bs-theme="dark"] .note-wrapper code,
html.dark-mode .note-wrapper code {
    background-color: #17171d !important;
    color: #fca5a5 !important;
}

[data-bs-theme="dark"] .note-wrapper .text-muted,
html.dark-mode .note-wrapper .text-muted {
    color: #94a3b8 !important;
}

/* Explicit inputs/labels dark styling within notes */
[data-bs-theme="dark"] .note-wrapper label,
[data-bs-theme="dark"] .note-wrapper h2,
[data-bs-theme="dark"] .note-wrapper h3,
[data-bs-theme="dark"] .note-wrapper h4,
[data-bs-theme="dark"] .note-wrapper h5,
[data-bs-theme="dark"] .note-wrapper strong,
[data-bs-theme="dark"] .note-wrapper dt,
[data-bs-theme="dark"] .note-wrapper dd,
[data-bs-theme="dark"] .note-wrapper span:not(.badge):not(.btn),
[data-bs-theme="dark"] .note-wrapper p,
[data-bs-theme="dark"] .note-wrapper th,
[data-bs-theme="dark"] .note-wrapper td,
[data-bs-theme="dark"] .note-wrapper b,
[data-bs-theme="dark"] .note-wrapper u,
html.dark-mode .note-wrapper label,
html.dark-mode .note-wrapper h2,
html.dark-mode .note-wrapper h3,
html.dark-mode .note-wrapper h4,
html.dark-mode .note-wrapper h5,
html.dark-mode .note-wrapper strong,
html.dark-mode .note-wrapper dt,
html.dark-mode .note-wrapper dd,
html.dark-mode .note-wrapper span:not(.badge):not(.btn),
html.dark-mode .note-wrapper p,
html.dark-mode .note-wrapper th,
html.dark-mode .note-wrapper td,
html.dark-mode .note-wrapper b,
html.dark-mode .note-wrapper u {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .note-wrapper input,
[data-bs-theme="dark"] .note-wrapper select,
[data-bs-theme="dark"] .note-wrapper textarea,
html.dark-mode .note-wrapper input,
html.dark-mode .note-wrapper select,
html.dark-mode .note-wrapper textarea {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .note-wrapper input:focus,
[data-bs-theme="dark"] .note-wrapper select:focus,
[data-bs-theme="dark"] .note-wrapper textarea:focus,
html.dark-mode .note-wrapper input:focus,
html.dark-mode .note-wrapper select:focus,
html.dark-mode .note-wrapper textarea:focus {
    background-color: #2a2a34 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .form-check-input,
html.dark-mode .form-check-input {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
}

[data-bs-theme="dark"] .form-check-input:checked,
html.dark-mode .form-check-input:checked {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

/* Note About Header Modal (nhp- Dialog Class) */
[data-bs-theme="dark"] .nhp-dialog,
[data-bs-theme="dark"] .nhp-body,
html.dark-mode .nhp-dialog,
html.dark-mode .nhp-body {
    background: #1e1e24 !important;
    background-color: #1e1e24 !important;
    color: #cbd5e1 !important;
    border-color: #3f4756 !important;
}

[data-bs-theme="dark"] .nhp-header,
html.dark-mode .nhp-header {
    background: #26262e !important;
    background-color: #26262e !important;
    background-image: none !important;
    border-bottom: 1px solid #2d3748 !important;
}

[data-bs-theme="dark"] .nhp-title,
html.dark-mode .nhp-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .nhp-close,
html.dark-mode .nhp-close {
    color: #cbd5e1 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .nhp-close:hover,
html.dark-mode .nhp-close:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .nhp-label,
html.dark-mode .nhp-label {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .nhp-input,
html.dark-mode .nhp-input {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .nhp-input:focus,
html.dark-mode .nhp-input:focus {
    background-color: #2a2a34 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .nhp-chip,
html.dark-mode .nhp-chip {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .nhp-footer,
html.dark-mode .nhp-footer {
    background: #26262e !important;
    background-color: #26262e !important;
    border-top: 1px solid #2d3748 !important;
}

/* =================================================================
   INTAKE POPUP & UPLOAD FILE POPUP (PATIENT SHOW) DARK OVERRIDES
   ================================================================= */
[data-bs-theme="dark"] .intake-popup-overlay,
html.dark-mode .intake-popup-overlay {
    background: rgba(0, 0, 0, 0.65) !important;
}

[data-bs-theme="dark"] .intake-popup,
[data-bs-theme="dark"] .intake-popup-body,
html.dark-mode .intake-popup,
html.dark-mode .intake-popup-body {
    background: #1e1e24 !important;
    background-color: #1e1e24 !important;
    color: #cbd5e1 !important;
    border-color: #3f4756 !important;
}

[data-bs-theme="dark"] .intake-popup-header,
[data-bs-theme="dark"] .intake-popup-footer,
html.dark-mode .intake-popup-header,
html.dark-mode .intake-popup-footer {
    background: #26262e !important;
    background-color: #26262e !important;
    border-color: #2d3748 !important;
}

[data-bs-theme="dark"] .intake-popup-title,
html.dark-mode .intake-popup-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .intake-popup-close,
html.dark-mode .intake-popup-close {
    color: #cbd5e1 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .intake-popup-close:hover,
html.dark-mode .intake-popup-close:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .intake-empty,
[data-bs-theme="dark"] .intake-spinner,
[data-bs-theme="dark"] .intake-helper,
html.dark-mode .intake-empty,
html.dark-mode .intake-spinner,
html.dark-mode .intake-helper {
    color: #cbd5e1 !important;
}

/* Upload file popup classes inside intake popup */
[data-bs-theme="dark"] .upload-form-label,
html.dark-mode .upload-form-label {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .upload-static-text,
html.dark-mode .upload-static-text {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .upload-form-control,
html.dark-mode .upload-form-control {
    background-color: #26262e !important;
    border-color: #3f4756 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .upload-form-control:focus,
html.dark-mode .upload-form-control:focus {
    background-color: #2a2a34 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-custom-file-trigger,
html.dark-mode .btn-custom-file-trigger {
    background: #26262e !important;
    border-color: #3f4756 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .btn-custom-file-trigger:hover,
html.dark-mode .btn-custom-file-trigger:hover {
    background: #3f4756 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .file-selection-info,
html.dark-mode .file-selection-info {
    color: #94a3b8 !important;
}



