:root {
    color-scheme: light;
}

html.theme-pending body {
    visibility: hidden;
}

body,
#header,
.sidebar,
.card,
.card-header,
.card-footer,
.dropdown-menu,
.modal-content,
.offcanvas,
.table,
.form-control,
.form-select,
textarea,
input,
select {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0.5rem 0.75rem;
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.theme-toggle:active {
    transform: none;
}

/* Floating toggle removed ? theme control lives in the header nav only */
.theme-toggle-floating {
    display: none !important;
}

/* ============================================================
   DARK MODE — target both html.dark-mode and body.dark-mode
   ============================================================ */

html.dark-mode,
body.dark-mode {
    color-scheme: dark;
}

html.dark-mode body,
body.dark-mode {
    background: #121820;
    color: #dbe4ee;
}

html.dark-mode #header,
html.dark-mode .sidebar,
html.dark-mode .navbar,
html.dark-mode .navbar-collapse,
body.dark-mode #header,
body.dark-mode .sidebar,
body.dark-mode .navbar,
body.dark-mode .navbar-collapse {
    background: #1a222d !important;
    color: #dbe4ee;
}

html.dark-mode a,
html.dark-mode .nav-link,
html.dark-mode .sidebar-nav .nav-link,
html.dark-mode .sidebar-nav .nav-link i,
body.dark-mode a,
body.dark-mode .nav-link,
body.dark-mode .sidebar-nav .nav-link,
body.dark-mode .sidebar-nav .nav-link i {
    color: #b9c9da;
}

html.dark-mode a:hover,
html.dark-mode .nav-link:hover,
html.dark-mode .sidebar-nav .nav-link:hover,
html.dark-mode .sidebar-nav .nav-link:hover i,
html.dark-mode .sidebar-nav .nav-link.active,
html.dark-mode .sidebar-nav .nav-link.active i,
body.dark-mode a:hover,
body.dark-mode .nav-link:hover,
body.dark-mode .sidebar-nav .nav-link:hover,
body.dark-mode .sidebar-nav .nav-link:hover i,
body.dark-mode .sidebar-nav .nav-link.active,
body.dark-mode .sidebar-nav .nav-link.active i {
    color: #8eb7ff;
}

html.dark-mode #main,
html.dark-mode .main,
body.dark-mode #main,
body.dark-mode .main {
    background: #121820;
}

html.dark-mode .card,
html.dark-mode .card-header,
html.dark-mode .card-footer,
html.dark-mode .modal-content,
html.dark-mode .offcanvas,
html.dark-mode .list-group-item,
html.dark-mode .dropdown-menu,
body.dark-mode .card,
body.dark-mode .card-header,
body.dark-mode .card-footer,
body.dark-mode .modal-content,
body.dark-mode .offcanvas,
body.dark-mode .list-group-item,
body.dark-mode .dropdown-menu {
    background-color: #1a222d;
    border-color: #344354;
    color: #dbe4ee;
}

html.dark-mode .card-title,
html.dark-mode .pagetitle h1,
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 label,
html.dark-mode .dropdown-header,
body.dark-mode .card-title,
body.dark-mode .pagetitle h1,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode label,
body.dark-mode .dropdown-header {
    color: #edf4fb;
}

html.dark-mode .logo span,
html.dark-mode .header-nav .nav-icon,
html.dark-mode .header-nav .nav-profile,
html.dark-mode .header-nav .nav-profile span,
html.dark-mode .header-nav .profile .dropdown-header h6,
html.dark-mode .navbar-light .navbar-nav .nav-link,
html.dark-mode .navbar-light .navbar-brand,
body.dark-mode .logo span,
body.dark-mode .header-nav .nav-icon,
body.dark-mode .header-nav .nav-profile,
body.dark-mode .header-nav .nav-profile span,
body.dark-mode .header-nav .profile .dropdown-header h6,
body.dark-mode .navbar-light .navbar-nav .nav-link,
body.dark-mode .navbar-light .navbar-brand {
    color: #dbe4ee !important;
}

html.dark-mode .navbar-light .navbar-nav .nav-link.active,
body.dark-mode .navbar-light .navbar-nav .nav-link.active {
    background-color: #263545;
    border-radius: 0.375rem;
    color: #ffffff !important;
}

html.dark-mode .navbar-light .navbar-nav .nav-link.active i,
body.dark-mode .navbar-light .navbar-nav .nav-link.active i {
    color: #8eb7ff;
}

html.dark-mode .navbar-light .navbar-toggler,
body.dark-mode .navbar-light .navbar-toggler {
    border-color: #405164;
}

html.dark-mode .navbar-light .navbar-toggler-icon,
body.dark-mode .navbar-light .navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(180%);
}

html.dark-mode .dropdown-item,
html.dark-mode .dropdown-menu .dropdown-footer a,
body.dark-mode .dropdown-item,
body.dark-mode .dropdown-menu .dropdown-footer a {
    color: #dbe4ee;
}

html.dark-mode .text-primary,
html.dark-mode .active.text-primary,
body.dark-mode .text-primary,
body.dark-mode .active.text-primary {
    color: #8eb7ff !important;
}

html.dark-mode .dropdown-item:hover,
html.dark-mode .dropdown-item:focus,
html.dark-mode .sidebar-nav .nav-content a:hover,
html.dark-mode .sidebar-nav .nav-content a.active,
body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus,
body.dark-mode .sidebar-nav .nav-content a:hover,
body.dark-mode .sidebar-nav .nav-content a.active {
    background-color: #263545;
    color: #ffffff;
}

html.dark-mode .pagination,
body.dark-mode .pagination {
    --bs-pagination-bg: #1a222d;
    --bs-pagination-color: #dbe4ee;
    --bs-pagination-border-color: #405164;
    --bs-pagination-hover-bg: #263545;
    --bs-pagination-hover-color: #ffffff;
    --bs-pagination-hover-border-color: #52708f;
    --bs-pagination-focus-bg: #263545;
    --bs-pagination-focus-color: #ffffff;
    --bs-pagination-active-bg: #42658a;
    --bs-pagination-active-color: #ffffff;
    --bs-pagination-active-border-color: #52708f;
    --bs-pagination-disabled-bg: #151d26;
    --bs-pagination-disabled-color: #667789;
    --bs-pagination-disabled-border-color: #344354;
}

html.dark-mode .page-link,
body.dark-mode .page-link {
    background-color: #1a222d;
    border-color: #405164;
    color: #dbe4ee;
}

html.dark-mode .page-link:hover,
html.dark-mode .page-link:focus,
body.dark-mode .page-link:hover,
body.dark-mode .page-link:focus {
    background-color: #263545;
    border-color: #52708f;
    color: #ffffff;
}

html.dark-mode .page-item.active .page-link,
body.dark-mode .page-item.active .page-link {
    background-color: #42658a;
    border-color: #52708f;
    color: #ffffff;
}

html.dark-mode .page-item.disabled .page-link,
body.dark-mode .page-item.disabled .page-link {
    background-color: #151d26;
    border-color: #344354;
    color: #667789;
}

html.dark-mode .dropdown-menu-arrow::before,
body.dark-mode .dropdown-menu-arrow::before {
    background: #1a222d;
    border-color: #344354;
}

html.dark-mode .breadcrumb-item,
html.dark-mode .breadcrumb-item::before,
html.dark-mode .breadcrumb-item.active,
body.dark-mode .breadcrumb-item,
body.dark-mode .breadcrumb-item::before,
body.dark-mode .breadcrumb-item.active {
    color: #b9c9da;
}

html.dark-mode .header-nav .messages .message-item:hover,
html.dark-mode .header-nav .notifications .notification-item:hover,
html.dark-mode .header-nav .profile .dropdown-item:hover,
body.dark-mode .header-nav .messages .message-item:hover,
body.dark-mode .header-nav .notifications .notification-item:hover,
body.dark-mode .header-nav .profile .dropdown-item:hover {
    background-color: #263545;
}

html.dark-mode .form-control,
html.dark-mode .form-select,
html.dark-mode input,
html.dark-mode select,
html.dark-mode textarea,
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #151d26;
    border-color: #405164;
    color: #edf4fb;
}

html.dark-mode .btn,
body.dark-mode .btn {
    border-color: #52708f;
    color: #edf4fb;
}

html.dark-mode .btn-primary,
body.dark-mode .btn-primary {
    background-color: #3f6fa8;
    border-color: #527fb2;
    color: #ffffff;
}

html.dark-mode .btn-primary:hover,
html.dark-mode .btn-primary:focus,
body.dark-mode .btn-primary:hover,
body.dark-mode .btn-primary:focus {
    background-color: #527fb2;
    border-color: #7099c5;
    color: #ffffff;
}

html.dark-mode .btn-secondary,
body.dark-mode .btn-secondary {
    background-color: #4a5868;
    border-color: #63758a;
    color: #ffffff;
}

html.dark-mode .btn-success,
body.dark-mode .btn-success {
    background-color: #287052;
    border-color: #3f966f;
    color: #ffffff;
}

html.dark-mode .btn-info,
body.dark-mode .btn-info {
    background-color: #286b86;
    border-color: #438eaa;
    color: #ffffff;
}

html.dark-mode .btn-warning,
body.dark-mode .btn-warning {
    background-color: #9a711d;
    border-color: #c09635;
    color: #ffffff;
}

html.dark-mode .btn-danger,
body.dark-mode .btn-danger {
    background-color: #963f4c;
    border-color: #bd5b68;
    color: #ffffff;
}

html.dark-mode .btn-light,
html.dark-mode .btn-outline-light,
body.dark-mode .btn-light,
body.dark-mode .btn-outline-light {
    background-color: #344b63;
    border-color: #52708f;
    color: #edf4fb;
}

html.dark-mode .btn-dark,
body.dark-mode .btn-dark {
    background-color: #0f151c;
    border-color: #344354;
    color: #edf4fb;
}

html.dark-mode .btn-outline-primary,
html.dark-mode .btn-outline-secondary,
html.dark-mode .btn-outline-success,
html.dark-mode .btn-outline-info,
html.dark-mode .btn-outline-warning,
html.dark-mode .btn-outline-danger,
body.dark-mode .btn-outline-primary,
body.dark-mode .btn-outline-secondary,
body.dark-mode .btn-outline-success,
body.dark-mode .btn-outline-info,
body.dark-mode .btn-outline-warning,
body.dark-mode .btn-outline-danger {
    background-color: transparent;
}

html.dark-mode .btn-outline-primary,
body.dark-mode .btn-outline-primary {
    border-color: #7099c5;
    color: #a9caff;
}

html.dark-mode .btn-outline-primary.active,
html.dark-mode .btn-outline-primary:active,
body.dark-mode .btn-outline-primary.active,
body.dark-mode .btn-outline-primary:active {
    background-color: #3f6fa8;
    border-color: #7099c5;
    color: #ffffff;
}

html.dark-mode .btn-outline-secondary,
body.dark-mode .btn-outline-secondary {
    border-color: #8292a4;
    color: #dbe4ee;
}

html.dark-mode .btn-outline-success,
body.dark-mode .btn-outline-success {
    border-color: #55ae88;
    color: #8be0b8;
}

html.dark-mode .btn-outline-info,
body.dark-mode .btn-outline-info {
    border-color: #5aa9c3;
    color: #99e3f7;
}

html.dark-mode .btn-outline-warning,
body.dark-mode .btn-outline-warning {
    border-color: #d4aa4d;
    color: #f5d27f;
}

html.dark-mode .btn-outline-danger,
body.dark-mode .btn-outline-danger {
    border-color: #d27580;
    color: #ffadb5;
}

html.dark-mode .btn:disabled,
html.dark-mode .btn.disabled,
body.dark-mode .btn:disabled,
body.dark-mode .btn.disabled {
    background-color: #293541;
    border-color: #405164;
    color: #8290a0;
    opacity: 1;
}

html.dark-mode .btn-link,
body.dark-mode .btn-link {
    color: #a9caff;
}

html.dark-mode .form-control::placeholder,
html.dark-mode input::placeholder,
html.dark-mode textarea::placeholder,
body.dark-mode .form-control::placeholder,
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #8d9cad;
}

html.dark-mode .form-control:focus,
html.dark-mode .form-select:focus,
html.dark-mode input:focus,
html.dark-mode select:focus,
html.dark-mode textarea:focus,
body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus,
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    background-color: #151d26;
    border-color: #8eb7ff;
    color: #ffffff;
}

html.dark-mode .form-check-input,
body.dark-mode .form-check-input {
    background-color: #151d26;
    border-color: #52708f;
}

html.dark-mode .form-check-input:checked,
body.dark-mode .form-check-input:checked {
    background-color: #3f6fa8;
    border-color: #7099c5;
}

/* ------------------------------------------------------------
   TABLES + HEADERS  (the important part)
   ------------------------------------------------------------ */

html.dark-mode .table,
body.dark-mode .table {
    --bs-table-bg: #1a222d;
    --bs-table-color: #dbe4ee;
    --bs-table-border-color: #344354;
    --bs-table-striped-bg: #1f2937;
    --bs-table-striped-color: #dbe4ee;
    --bs-table-hover-bg: #263545;
    --bs-table-hover-color: #ffffff;
}

html.dark-mode .table> :not(caption)>*>*,
html.dark-mode .table-hover>tbody>tr:hover>*,
body.dark-mode .table> :not(caption)>*>*,
body.dark-mode .table-hover>tbody>tr:hover>* {
    background-color: #1a222d;
    color: #dbe4ee;
    border-color: #344354;
}

/* Header cells — the fix. Uses higher specificity than :is(th) inline rule. */
html.dark-mode body :is(table th),
html.dark-mode body :is(.table > thead > tr > *),
html.dark-mode body table thead th,
html.dark-mode body table th,
html.dark-mode body .table>thead>tr>*,
html.dark-mode body .table-primary,
html.dark-mode body .table-secondary,
html.dark-mode body .table-info,
html.dark-mode body .table-light,
html.dark-mode body .dataTable-table>thead>tr>th,
html.dark-mode body table.dataTable thead th,
body.dark-mode :is(table th),
body.dark-mode :is(.table > thead > tr > *),
body.dark-mode table thead th,
body.dark-mode table th,
body.dark-mode .table>thead>tr>*,
body.dark-mode .table-primary,
body.dark-mode .table-secondary,
body.dark-mode .table-info,
body.dark-mode .table-light,
body.dark-mode .dataTable-table>thead>tr>th,
body.dark-mode table.dataTable thead th {
    background-color: #263545 !important;
    border-color: #405164 !important;
    color: #edf4fb !important;
}

html.dark-mode table thead th a,
html.dark-mode table.dataTable thead th a,
html.dark-mode table.dataTable thead th span,
body.dark-mode table thead th a,
body.dark-mode table.dataTable thead th a,
body.dark-mode table.dataTable thead th span {
    color: #edf4fb !important;
}

/* jQuery DataTables sort arrows */
html.dark-mode table.dataTable thead .sorting::before,
html.dark-mode table.dataTable thead .sorting::after,
html.dark-mode table.dataTable thead .sorting_asc::before,
html.dark-mode table.dataTable thead .sorting_asc::after,
html.dark-mode table.dataTable thead .sorting_desc::before,
html.dark-mode table.dataTable thead .sorting_desc::after,
body.dark-mode table.dataTable thead .sorting::before,
body.dark-mode table.dataTable thead .sorting::after,
body.dark-mode table.dataTable thead .sorting_asc::before,
body.dark-mode table.dataTable thead .sorting_asc::after,
body.dark-mode table.dataTable thead .sorting_desc::before,
body.dark-mode table.dataTable thead .sorting_desc::after {
    opacity: 0.6;
}

html.dark-mode table tr:hover td,
body.dark-mode table tr:hover td {
    background: #263545;
}

/* DataTables wrapper (info / search / length / pagination) */
html.dark-mode .dataTables_wrapper,
body.dark-mode .dataTables_wrapper {
    color: #b9c9da;
}

html.dark-mode .dataTables_wrapper .dataTables_length,
html.dark-mode .dataTables_wrapper .dataTables_filter,
html.dark-mode .dataTables_wrapper .dataTables_info,
html.dark-mode .dataTables_wrapper .dataTables_paginate,
body.dark-mode .dataTables_wrapper .dataTables_length,
body.dark-mode .dataTables_wrapper .dataTables_filter,
body.dark-mode .dataTables_wrapper .dataTables_info,
body.dark-mode .dataTables_wrapper .dataTables_paginate {
    color: #b9c9da;
}

html.dark-mode .dataTables_wrapper .dataTables_length select,
html.dark-mode .dataTables_wrapper .dataTables_filter input,
body.dark-mode .dataTables_wrapper .dataTables_length select,
body.dark-mode .dataTables_wrapper .dataTables_filter input {
    background-color: #151d26;
    border-color: #405164;
    color: #edf4fb;
}

/* ------------------------------------------------------------
   MISC COMPONENTS
   ------------------------------------------------------------ */

html.dark-mode .modal-backdrop,
body.dark-mode .modal-backdrop {
    --bs-backdrop-bg: #000000;
}

html.dark-mode .btn-close,
body.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

html.dark-mode .text-dark,
body.dark-mode .text-dark {
    color: #dbe4ee !important;
}

html.dark-mode .daterange,
html.dark-mode .daterangepicker,
body.dark-mode .daterange,
body.dark-mode .daterangepicker {
    background-color: #1a222d !important;
    border-color: #405164 !important;
    color: #dbe4ee;
}

html.dark-mode .daterangepicker td,
html.dark-mode .daterangepicker th,
html.dark-mode .daterangepicker .drp-buttons,
html.dark-mode .daterangepicker select,
html.dark-mode .daterangepicker input,
body.dark-mode .daterangepicker td,
body.dark-mode .daterangepicker th,
body.dark-mode .daterangepicker .drp-buttons,
body.dark-mode .daterangepicker select,
body.dark-mode .daterangepicker input {
    background-color: #1a222d;
    color: #dbe4ee;
}

html.dark-mode .daterangepicker td.off,
html.dark-mode .daterangepicker td.disabled,
body.dark-mode .daterangepicker td.off,
body.dark-mode .daterangepicker td.disabled {
    color: #667789;
}

html.dark-mode .bg-white,
html.dark-mode .bg-light,
body.dark-mode .bg-white,
body.dark-mode .bg-light {
    background-color: #1a222d !important;
    color: #dbe4ee !important;
}

html.dark-mode .border,
html.dark-mode .border-top,
html.dark-mode .border-end,
html.dark-mode .border-bottom,
html.dark-mode .border-start,
body.dark-mode .border,
body.dark-mode .border-top,
body.dark-mode .border-end,
body.dark-mode .border-bottom,
body.dark-mode .border-start {
    border-color: #344354 !important;
}

html.dark-mode .theme-toggle-floating,
body.dark-mode .theme-toggle-floating {
    border-color: #405164;
    background: #1a222d;
    color: #edf4fb;
}

html.dark-mode .input-group-text,
html.dark-mode .accordion-item,
html.dark-mode .accordion-button,
html.dark-mode .popover,
html.dark-mode .tooltip-inner,
html.dark-mode .select2-container--default .select2-selection--single,
html.dark-mode .select2-container--default .select2-selection--multiple,
html.dark-mode .select2-dropdown,
body.dark-mode .input-group-text,
body.dark-mode .accordion-item,
body.dark-mode .accordion-button,
body.dark-mode .popover,
body.dark-mode .tooltip-inner,
body.dark-mode .select2-container--default .select2-selection--single,
body.dark-mode .select2-container--default .select2-selection--multiple,
body.dark-mode .select2-dropdown {
    background-color: #1a222d;
    border-color: #405164;
    color: #dbe4ee;
}

html.dark-mode .accordion-button:not(.collapsed),
body.dark-mode .accordion-button:not(.collapsed) {
    background-color: #263545;
    color: #edf4fb;
}

html.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered,
html.dark-mode .select2-container--default .select2-selection--single .select2-selection__placeholder,
html.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__rendered,
html.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__placeholder,
html.dark-mode .select2-results__option,
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered,
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__placeholder,
body.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__rendered,
body.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__placeholder,
body.dark-mode .select2-results__option {
    color: #dbe4ee;
}

html.dark-mode .select2-container--default .select2-selection--single .select2-selection__arrow b,
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #b9c9da transparent transparent transparent;
}

html.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__choice,
body.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #344b63;
    border-color: #52708f;
    color: #edf4fb;
}

html.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
body.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #dbe4ee;
}

html.dark-mode .select2-container--default .select2-search--inline .select2-search__field,
html.dark-mode .select2-search__field,
body.dark-mode .select2-container--default .select2-search--inline .select2-search__field,
body.dark-mode .select2-search__field {
    background-color: transparent !important;
    color: #edf4fb !important;
}

html.dark-mode .select2-search__field::placeholder,
body.dark-mode .select2-search__field::placeholder {
    color: #8d9cad !important;
}

html.dark-mode .select2-container--default .select2-results__option--highlighted[aria-selected],
body.dark-mode .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #263545;
    color: #ffffff;
}

html.dark-mode .quill,
html.dark-mode .ql-toolbar,
html.dark-mode .ql-container,
html.dark-mode .tox-tinymce,
body.dark-mode .quill,
body.dark-mode .ql-toolbar,
body.dark-mode .ql-container,
body.dark-mode .tox-tinymce {
    border-color: #405164;
    background-color: #151d26;
    color: #dbe4ee;
}

html.dark-mode .ql-editor,
html.dark-mode .ql-editor.ql-blank::before,
body.dark-mode .ql-editor,
body.dark-mode .ql-editor.ql-blank::before {
    color: #dbe4ee;
}

html.dark-mode .msl-config-page .card.bg-light,
html.dark-mode .msl-config-page .bg-light,
body.dark-mode .msl-config-page .card.bg-light,
body.dark-mode .msl-config-page .bg-light {
    background-color: #202c39 !important;
    border-color: #405164 !important;
    color: #dbe4ee !important;
}

html.dark-mode .msl-config-page .text-muted,
html.dark-mode .msl-config-page .text-dark,
body.dark-mode .msl-config-page .text-muted,
body.dark-mode .msl-config-page .text-dark {
    color: #b9c9da !important;
}

html.dark-mode .msl-config-page .card-title,
html.dark-mode .msl-config-page .card-body h3,
html.dark-mode .msl-config-page .card-body h6,
html.dark-mode .msl-config-page label,
html.dark-mode .msl-config-page small,
body.dark-mode .msl-config-page .card-title,
body.dark-mode .msl-config-page .card-body h3,
body.dark-mode .msl-config-page .card-body h6,
body.dark-mode .msl-config-page label,
body.dark-mode .msl-config-page small {
    color: #edf4fb;
}

html.dark-mode .msl-config-page .card-header.bg-info,
body.dark-mode .msl-config-page .card-header.bg-info {
    background-color: #285a78 !important;
    color: #ffffff !important;
}

html.dark-mode .msl-config-page .card-header.bg-primary,
html.dark-mode .msl-config-page .card-header.bg-success,
html.dark-mode .msl-config-page .card-header.bg-danger,
body.dark-mode .msl-config-page .card-header.bg-primary,
body.dark-mode .msl-config-page .card-header.bg-success,
body.dark-mode .msl-config-page .card-header.bg-danger {
    color: #ffffff !important;
}

html.dark-mode .msl-config-page .badge.bg-light,
body.dark-mode .msl-config-page .badge.bg-light {
    background-color: #344b63 !important;
    color: #edf4fb !important;
}

html.dark-mode .msl-config-page .form-control,
html.dark-mode .msl-config-page .form-select,
html.dark-mode .msl-config-page textarea,
html.dark-mode .msl-config-page select,
body.dark-mode .msl-config-page .form-control,
body.dark-mode .msl-config-page .form-select,
body.dark-mode .msl-config-page textarea,
body.dark-mode .msl-config-page select {
    background-color: #151d26 !important;
    border-color: #52708f;
    color: #edf4fb !important;
}

html.dark-mode .msl-config-page option,
body.dark-mode .msl-config-page option {
    background-color: #1a222d;
    color: #edf4fb;
}

html.dark-mode .modal-content,
html.dark-mode .modal-header,
html.dark-mode .modal-body,
html.dark-mode .modal-footer,
html.dark-mode .modal-title,
body.dark-mode .modal-content,
body.dark-mode .modal-header,
body.dark-mode .modal-body,
body.dark-mode .modal-footer,
body.dark-mode .modal-title {
    color: #edf4fb;
}

html.dark-mode .modal-content .text-muted,
html.dark-mode .modal-content small,
body.dark-mode .modal-content .text-muted,
body.dark-mode .modal-content small {
    color: #b9c9da !important;
}

html.dark-mode .modal-content .form-select,
html.dark-mode .modal-content .form-control,
html.dark-mode .modal-content option,
body.dark-mode .modal-content .form-select,
body.dark-mode .modal-content .form-control,
body.dark-mode .modal-content option {
    background-color: #151d26;
    color: #edf4fb;
}

html.dark-mode .swal2-popup,
body.dark-mode .swal2-popup {
    background: #1a222d;
    color: #dbe4ee;
}

html.dark-mode .swal2-title,
html.dark-mode .swal2-html-container,
html.dark-mode .swal2-content,
body.dark-mode .swal2-title,
body.dark-mode .swal2-html-container,
body.dark-mode .swal2-content {
    color: #edf4fb;
}

html.dark-mode .swal2-input,
html.dark-mode .swal2-textarea,
html.dark-mode .swal2-select,
body.dark-mode .swal2-input,
body.dark-mode .swal2-textarea,
body.dark-mode .swal2-select {
    background: #151d26;
    border-color: #405164;
    color: #edf4fb;
}

html.dark-mode .swal2-input::placeholder,
html.dark-mode .swal2-textarea::placeholder,
body.dark-mode .swal2-input::placeholder,
body.dark-mode .swal2-textarea::placeholder {
    color: #8d9cad;
}

html.dark-mode .swal2-confirm,
body.dark-mode .swal2-confirm {
    background-color: #3f6fa8 !important;
    color: #ffffff !important;
}

html.dark-mode .swal2-cancel,
body.dark-mode .swal2-cancel {
    background-color: #4a5868 !important;
    color: #ffffff !important;
}

html.dark-mode .swal2-close,
body.dark-mode .swal2-close {
    color: #b9c9da;
}

html.dark-mode .swal2-timer-progress-bar,
body.dark-mode .swal2-timer-progress-bar {
    background: #7099c5;
}

/* Landing page (separate Bootstrap theme) */
html.dark-mode body.index-page,
body.index-page.dark-mode {
    --background-color: #101820;
    --default-color: #dbe4ee;
    --heading-color: #edf4fb;
    --surface-color: #1a222d;
    --nav-color: #dbe4ee;
    --nav-hover-color: #8eb7ff;
    --nav-mobile-background-color: #1a222d;
    --nav-dropdown-background-color: #1a222d;
    --nav-dropdown-color: #dbe4ee;
    background-color: #101820;
}

html.dark-mode body.index-page .light-background,
html.dark-mode body.index-page .section,
html.dark-mode body.index-page .card,
html.dark-mode body.index-page .icon-box,
html.dark-mode body.index-page .service-item,
html.dark-mode body.index-page .portfolio-content,
html.dark-mode body.index-page .team-member,
html.dark-mode body.index-page .pricing-item,
html.dark-mode body.index-page .faq-item,
html.dark-mode body.index-page .info-item,
html.dark-mode body.index-page .php-email-form,
body.index-page.dark-mode .light-background,
body.index-page.dark-mode .section,
body.index-page.dark-mode .card,
body.index-page.dark-mode .icon-box,
body.index-page.dark-mode .service-item,
body.index-page.dark-mode .portfolio-content,
body.index-page.dark-mode .team-member,
body.index-page.dark-mode .pricing-item,
body.index-page.dark-mode .faq-item,
body.index-page.dark-mode .info-item,
body.index-page.dark-mode .php-email-form {
    --background-color: #101820;
    --surface-color: #1a222d;
    background-color: #1a222d;
    color: #dbe4ee;
}

html.dark-mode body.index-page .header,
html.dark-mode body.index-page .footer,
html.dark-mode body.index-page .navmenu ul,
html.dark-mode body.index-page .mobile-nav-active .mobile-nav-toggle,
body.index-page.dark-mode .header,
body.index-page.dark-mode .footer,
body.index-page.dark-mode .navmenu ul,
body.index-page.dark-mode .mobile-nav-active .mobile-nav-toggle {
    background-color: #1a222d;
    color: #dbe4ee;
}

html.dark-mode body.index-page .header .logo h1,
html.dark-mode body.index-page .section-title h2,
html.dark-mode body.index-page h1,
html.dark-mode body.index-page h2,
html.dark-mode body.index-page h3,
html.dark-mode body.index-page h4,
html.dark-mode body.index-page h5,
html.dark-mode body.index-page h6,
html.dark-mode body.index-page p,
html.dark-mode body.index-page li,
html.dark-mode body.index-page label,
body.index-page.dark-mode .header .logo h1,
body.index-page.dark-mode .section-title h2,
body.index-page.dark-mode h1,
body.index-page.dark-mode h2,
body.index-page.dark-mode h3,
body.index-page.dark-mode h4,
body.index-page.dark-mode h5,
body.index-page.dark-mode h6,
body.index-page.dark-mode p,
body.index-page.dark-mode li,
body.index-page.dark-mode label {
    color: #edf4fb;
}

html.dark-mode body.index-page input,
html.dark-mode body.index-page textarea,
html.dark-mode body.index-page select,
body.index-page.dark-mode input,
body.index-page.dark-mode textarea,
body.index-page.dark-mode select {
    background-color: #151d26;
    border-color: #405164;
    color: #edf4fb;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

.ripple,
.waves-ripple,
.waves-effect::before,
.waves-effect::after {
    display: none !important;
    animation: none !important;
}

html.dark-mode .apexcharts-tooltip.apexcharts-theme-light,
body.dark-mode .apexcharts-tooltip.apexcharts-theme-light {
    background: #1a222d !important;
    border-color: #405164 !important;
    color: #edf4fb !important;
}

html.dark-mode .apexcharts-tooltip.apexcharts-theme-light *,
body.dark-mode .apexcharts-tooltip.apexcharts-theme-light * {
    color: #edf4fb !important;
}

html.dark-mode .apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,
body.dark-mode .apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
    background: #263545 !important;
    border-bottom-color: #405164 !important;
}

html.dark-mode .apexcharts-xaxistooltip,
html.dark-mode .apexcharts-yaxistooltip,
body.dark-mode .apexcharts-xaxistooltip,
body.dark-mode .apexcharts-yaxistooltip {
    background: #1a222d !important;
    border-color: #405164 !important;
    color: #edf4fb !important;
}
/* ============================================================
   BP Theme — dark mode adjustments for new sidebar shell
   ============================================================ */
html.dark-mode .sidebar-brand,
body.dark-mode .sidebar-brand {
    border-bottom-color: #344354;
}

html.dark-mode .sidebar .logo .logo-title,
body.dark-mode .sidebar .logo .logo-title {
    color: #8eb7ff;
}

html.dark-mode .sidebar .logo .logo-subtitle,
body.dark-mode .sidebar .logo .logo-subtitle {
    color: #7a8fa3;
}

html.dark-mode .sidebar-nav .nav-heading,
body.dark-mode .sidebar-nav .nav-heading {
    color: #7a8fa3;
}

html.dark-mode .sidebar-nav .nav-link,
html.dark-mode .sidebar-nav .nav-link.collapsed,
body.dark-mode .sidebar-nav .nav-link,
body.dark-mode .sidebar-nav .nav-link.collapsed {
    background: transparent;
    color: #b9c9da;
    border-left-color: transparent;
}

html.dark-mode .sidebar-nav .nav-link i,
html.dark-mode .sidebar-nav .nav-link.collapsed i,
body.dark-mode .sidebar-nav .nav-link i,
body.dark-mode .sidebar-nav .nav-link.collapsed i {
    color: #7a8fa3;
}

html.dark-mode .sidebar-nav .nav-link:hover,
html.dark-mode .sidebar-nav .nav-link.collapsed:hover,
body.dark-mode .sidebar-nav .nav-link:hover,
body.dark-mode .sidebar-nav .nav-link.collapsed:hover {
    background: rgba(21, 101, 192, 0.18);
    color: #8eb7ff;
}

html.dark-mode .sidebar-nav .nav-link.active,
html.dark-mode .sidebar-nav .nav-link:not(.collapsed),
body.dark-mode .sidebar-nav .nav-link.active,
body.dark-mode .sidebar-nav .nav-link:not(.collapsed) {
    background: rgba(38, 166, 154, 0.18);
    color: #8eb7ff;
    border-left-color: #26A69A;
}

html.dark-mode .header,
body.dark-mode .header {
    border-bottom-color: #344354;
}

html.dark-mode .header .toggle-sidebar-btn,
body.dark-mode .header .toggle-sidebar-btn {
    color: #b9c9da;
}

html.dark-mode body .table thead th,
html.dark-mode body :is(th),
body.dark-mode .table thead th,
body.dark-mode :is(th) {
    background-color: #263545 !important;
    color: #dbe4ee !important;
    border-color: #344354 !important;
}
