[data-bs-theme="dark"] {
    input, textarea, select, .dropdown {
        color: #F2F2F2;
    }

    --bs-blue: #0d6efd;
    --bs-indigo: #6610f2;
    --bs-purple: #6f42c1;
    --bs-pink: #d63384;
    --bs-red: #dc3545;
    --bs-orange: #fd7e14;
    --bs-yellow: #ffc107;
    --bs-green: #198754;
    --bs-teal: #20c997;
    --bs-cyan: #0dcaf0;
    --bs-black: #000;
    --bs-white: #fff;
    --bs-gray: #6c757d;
    --bs-gray-dark: #343a40;
    --bs-gray-100: #f8f9fa;
    --bs-gray-200: #e9ecef;
    --bs-gray-300: #dee2e6;
    --bs-gray-400: #ced4da;
    --bs-gray-500: #adb5bd;
    --bs-gray-600: #6c757d;
    --bs-gray-700: #495057;
    --bs-gray-800: #343a40;
    --bs-gray-900: #212529;

    --bs-primary: #052966;
    --bs-secondary: #5C6B7A;
    --bs-success: #2ECC71;
    --bs-info: #43C9F4;
    --bs-warning: #F39C12;
    --bs-danger: #E74C3C;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;

    --bs-primary-rgb: 5, 41, 102;
    --bs-secondary-rgb: 92, 107, 122;
    --bs-success-rgb: 46, 204, 113;
    --bs-info-rgb: 67, 201, 244;
    --bs-warning-rgb: 243, 156, 18;
    --bs-danger-rgb: 231, 76, 60;
    --bs-light-rgb: 248, 249, 250;
    --bs-dark-rgb: 33, 37, 41;


    --bs-primary-text-emphasis: #052c65;
    --bs-secondary-text-emphasis: #2b2f32;
    --bs-success-text-emphasis: #1F9E55;
    --bs-info-text-emphasis: #0F9FCC;
    --bs-warning-text-emphasis: #B9770E;
    --bs-danger-text-emphasis: #A93226;
    --bs-light-text-emphasis: #495057;
    --bs-dark-text-emphasis: #495057;

    --bs-primary-bg-subtle: #cfe2ff;
    --bs-secondary-bg-subtle: #e2e3e5;
    --bs-success-bg-subtle: #E9F8F1;
    --bs-info-bg-subtle: #D6F1FC;
    --bs-warning-bg-subtle: #FFF6E0;
    --bs-danger-bg-subtle: #FDECEA;
    --bs-light-bg-subtle: #fcfcfd;
    --bs-dark-bg-subtle: #ced4da;

    --bs-primary-border-subtle: #cfe2ff;
    --bs-secondary-border-subtle: #e2e3e5;
    --bs-success-border-subtle: #E9F8F1;
    --bs-info-border-subtle: #D6F1FC;
    --bs-warning-border-subtle: #FFF6E0;
    --bs-danger-border-subtle: #FDECEA;
    --bs-light-border-subtle: #fcfcfd;
    --bs-dark-border-subtle: #ced4da;

    --bs-white-rgb: 255, 255, 255;
    --bs-black-rgb: 0, 0, 0;
    --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-font-size: 1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color: #212529;
    --bs-body-color-rgb: 33, 37, 41;
    --bs-body-bg: #fff;
    --bs-body-bg-rgb: 255, 255, 255;
    --bs-emphasis-color: #000;
    --bs-emphasis-color-rgb: 0, 0, 0;
    --bs-secondary-color: rgba(33, 37, 41, 0.75);
    --bs-secondary-color-rgb: 33, 37, 41;
    --bs-secondary-bg: #e9ecef;
    --bs-secondary-bg-rgb: 233, 236, 239;
    --bs-tertiary-color: rgba(33, 37, 41, 0.5);
    --bs-tertiary-color-rgb: 33, 37, 41;
    --bs-tertiary-bg: #f8f9fa;
    --bs-tertiary-bg-rgb: 248, 249, 250;
    --bs-heading-color: inherit;
    --bs-link-color: #0F9FCC;
    --bs-link-color-rgb: 15, 159, 204;
    --bs-link-decoration: underline;
    --bs-link-hover-color: #43C9F4;
    --bs-link-hover-color-rgb: 67, 201, 244;
    --bs-code-color: #d63384;
    --bs-highlight-color: #212529;
    --bs-highlight-bg: #fff3cd;
    --bs-border-width: 1px;
    --bs-border-style: solid;
    --bs-border-color: #dee2e6;
    --bs-border-color-translucent: rgba(0, 0, 0, 0.175);
    --bs-border-radius: 4px;
    --bs-border-radius-sm: 0.25rem;
    --bs-border-radius-lg: 0.5rem;
    --bs-border-radius-xl: 1rem;
    --bs-border-radius-xxl: 2rem;
    --bs-border-radius-2xl: var(--bs-border-radius-xxl);
    --bs-border-radius-pill: 50rem;
    --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
    --bs-focus-ring-width: 0.25rem;
    --bs-focus-ring-opacity: 0.25;
    --bs-focus-ring-color: rgba(13, 110, 253, 0.25);
    --bs-form-valid-color: #198754;
    --bs-form-valid-border-color: #198754;
    --bs-form-invalid-color: #dc3545;
    --bs-form-invalid-border-color: #dc3545;
}

[data-bs-theme="dark"] {

    body { background-color: #3A3A3A; }

    .bg-panel {
        color: #F2F2F2;
        background-color: #2A2A2A;
    }

    .btn-success {
        --bs-btn-color: #2ECC71 !important;
        --bs-btn-bg: #143A2A;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #143A2A;
        --bs-btn-hover-bg: #1F7E55;
        --bs-btn-hover-border-color: #3A3A3A;
        --bs-btn-focus-shadow-rgb: 40, 180, 99;
        --bs-btn-active-color: #1F9E55;
        --bs-btn-active-bg: #143A2A;
        --bs-btn-active-border-color: #1F9E55;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-outline-success {
        --bs-btn-color: #2ECC71;
        --bs-btn-bg: #143A2A;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #143A2A;
        --bs-btn-hover-bg: #1F7E55;
        --bs-btn-hover-border-color: #3A3A3A;
        --bs-btn-focus-shadow-rgb: 40, 180, 99;
        --bs-btn-active-color: #1F9E55;
        --bs-btn-active-bg: #143A2A;
        --bs-btn-active-border-color: #1F9E55;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-primary {
        --bs-btn-color: #2f65c5;
        --bs-btn-bg: #052966;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #052966;
        --bs-btn-hover-bg: #2f65c5;
        --bs-btn-hover-border-color: #3A3A3A;
        --bs-btn-focus-shadow-rgb: 31, 180, 229;
        --bs-btn-active-color: #2f65c5;
        --bs-btn-active-bg: #052966;
        --bs-btn-active-border-color: #2f65c5;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-outline-primary {
        --bs-btn-color: #2f65c5;
        --bs-btn-bg: #052966;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #052966;
        --bs-btn-hover-bg: #2f65c5;
        --bs-btn-hover-border-color: #3A3A3A;
        --bs-btn-focus-shadow-rgb: 31, 180, 229;
        --bs-btn-active-color: #2f65c5;
        --bs-btn-active-bg: #052966;
        --bs-btn-active-border-color: #2f65c5;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-info {
        --bs-btn-color: #0F9FCC;
        --bs-btn-bg: #1B3342;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #1B3342;
        --bs-btn-hover-bg: #0094DA;
        --bs-btn-hover-border-color: #1B3342;
        --bs-btn-focus-shadow-rgb: 31, 180, 229;
        --bs-btn-active-color: #0F9FCC;
        --bs-btn-active-bg: #1B3342;
        --bs-btn-active-border-color: #0F9FCC;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-outline-info {
        --bs-btn-color: #0F9FCC;
        --bs-btn-bg: #1B3342;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #1B3342;
        --bs-btn-hover-bg: #0094DA;
        --bs-btn-hover-border-color: #1B3342;
        --bs-btn-focus-shadow-rgb: 31, 180, 229;
        --bs-btn-active-color: #0F9FCC;
        --bs-btn-active-bg: #1B3342;
        --bs-btn-active-border-color: #0F9FCC;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-danger {
        --bs-btn-color: #E74C3C;
        --bs-btn-bg: #3D1B1B;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #3D1B1B;
        --bs-btn-hover-bg: #C0392B;
        --bs-btn-hover-border-color: #3A3A3A;
        --bs-btn-focus-shadow-rgb: 231, 76, 60;
        --bs-btn-active-color: #E74C3C;
        --bs-btn-active-bg: #3D1B1B;
        --bs-btn-active-border-color: #E74C3C;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-outline-danger {
        --bs-btn-color: #E74C3C;
        --bs-btn-bg: #3D1B1B;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #3D1B1B;
        --bs-btn-hover-bg: #C0392B;
        --bs-btn-hover-border-color: #3A3A3A;
        --bs-btn-focus-shadow-rgb: 231, 76, 60;
        --bs-btn-active-color: #E74C3C;
        --bs-btn-active-bg: #3D1B1B;
        --bs-btn-active-border-color: #E74C3C;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-warning {
        --bs-btn-color: #F39C12;
        --bs-btn-bg: #3D2A11;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #3D2A11;
        --bs-btn-hover-bg: #D68910;
        --bs-btn-hover-border-color: #3A3A3A;
        --bs-btn-focus-shadow-rgb: 243, 156, 18;
        --bs-btn-active-color: #F39C12;
        --bs-btn-active-bg: #3D2A11;
        --bs-btn-active-border-color: #F39C12;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-outline-warning {
        --bs-btn-color: #F39C12;
        --bs-btn-bg: #3D2A11;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #3D2A11;
        --bs-btn-hover-bg: #D68910;
        --bs-btn-hover-border-color: #3A3A3A;
        --bs-btn-focus-shadow-rgb: 243, 156, 18;
        --bs-btn-active-color: #F39C12;
        --bs-btn-active-bg: #3D2A11;
        --bs-btn-active-border-color: #F39C12;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-light {
        --bs-btn-color: #B5B5B5;
        --bs-btn-bg: #2A2A2A;
        --bs-btn-border-color: #6A6A6A;
        --bs-btn-hover-color: #DCE2E6;
        --bs-btn-hover-bg: #4A4A4A;
        --bs-btn-hover-border-color: #4A4A4A;
        --bs-btn-focus-shadow-rgb: 244, 248, 250;
        --bs-btn-active-color: #DCE2E6;
        --bs-btn-active-bg: #2A2A2A;
        --bs-btn-active-border-color: #DCE2E6;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-outline-light {
        --bs-btn-color: #B5B5B5;
        --bs-btn-bg: #2A2A2A;
        --bs-btn-border-color: #6A6A6A;
        --bs-btn-hover-color: #DCE2E6;
        --bs-btn-hover-bg: #4A4A4A;
        --bs-btn-hover-border-color: #4A4A4A;
        --bs-btn-focus-shadow-rgb: 244, 248, 250;
        --bs-btn-active-color: #DCE2E6;
        --bs-btn-active-bg: #2A2A2A;
        --bs-btn-active-border-color: #DCE2E6;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-secondary {
        --bs-btn-color: #F2F2F2;
        --bs-btn-bg: #4A4A4A;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #FFFFFF;
        --bs-btn-hover-bg: #5C6B7A;
        --bs-btn-hover-border-color: #5C6B7A;
        --bs-btn-focus-shadow-rgb: 244, 248, 250;
        --bs-btn-active-color: #FFFFFF;
        --bs-btn-active-bg: #444B53;
        --bs-btn-active-border-color: #FFFFFF;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-outline-secondary {
        --bs-btn-color: #F2F2F2;
        --bs-btn-bg: #4A4A4A;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #FFFFFF;
        --bs-btn-hover-bg: #5C6B7A;
        --bs-btn-hover-border-color: #5C6B7A;
        --bs-btn-focus-shadow-rgb: 244, 248, 250;
        --bs-btn-active-color: #FFFFFF;
        --bs-btn-active-bg: #444B53;
        --bs-btn-active-border-color: #FFFFFF;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .btn-outline-bw {
        --bs-btn-color: #F2F2F2;
        --bs-btn-bg: #4A4A4A;
        --bs-btn-border-color: #3A3A3A;
        --bs-btn-hover-color: #FFFFFF;
        --bs-btn-hover-bg: #5C6B7A;
        --bs-btn-hover-border-color: #5C6B7A;
        --bs-btn-focus-shadow-rgb: 244, 248, 250;
        --bs-btn-active-color: #FFFFFF;
        --bs-btn-active-bg: #444B53;
        --bs-btn-active-border-color: #FFFFFF;
        --bs-btn-disabled-color: #B5B5B5;
        --bs-btn-disabled-bg: #2A2A2A;
        --bs-btn-disabled-border-color: #3A3A3A;
    }

    .form-check-input[type="radio"] {
        border: 1px solid #00A3D5;
        background-color: inherit !important;
    }

    .form-check-input[type="radio"]:checked:disabled {
      border-color: #AEB0BA !important;
    }


    .form-check-input[type="checkbox"] {
        border: 1px solid #00A3D5;
    }

    .form-check-input:disabled {
        border-color: #AEB0BA;
        background-color: inherit;
        opacity: 1;
    }

input.form-check-input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'%3E%3Cpath fill='none' stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8.5l2.5 2.5l5.5 -5.5'/%3E%3C/svg%3E") !important;
}


    .form-check-input:checked:disabled {
        border-color: #AEB0BA;
        background-color: #AEB0BA;
        opacity: 1;
    }

    .form-check-input:disabled + .form-check-label {
        color: #B5B5B5;
        opacity: 1;
    }

    .form-check-input {
        --bs-form-check-bg: inherit;
    }

    .text-primary { color: #9DDDF9 !important; }
    .text-secondary { color: #B5B5B5 !important; }
    .text-success { color: #2ECC71 !important; }
    .text-danger { color: #E74C3C !important;}
    .text-warning { color: #F39C12 !important; }
    .text-info { color: #43C9F4 !important; }
    .text-light { color: white !important; }
    .text-dark { color: white !important; }
    .text-body { color: #2B2B2B !important; }
    .text-muted { color: #B5B5B5 !important; }
    .text-white { color: white !important; }
    .text-black { color: black !important; }
    .text-disabled { color: #6A6A6A !important; }

    .bg-primary { background-color: #9DDDF9; }
    .bg-secondary { background-color: #B5B5B5; }
    .bg-success { background-color: #2ECC71; }
    .bg-danger { background-color: #E74C3C; }
    .bg-warning { background-color: #F39C12; }
    .bg-info { background-color: #43C9F4; }
    .bg-light { background-color: white; }
    .bg-dark { background-color: #2B2B2B; }
    .bg-body { background-color: #2B2B2B; }
    .bg-muted { background-color: #5C6B7A; }
    .bg-white { background-color: white; }
    .bg-black { background-color: black; }
    .bg-info-light { background-color: #1B3342; }
    .bg-aqua-light { background-color: #F7FEFF; }

    .bg-gray-100 { background-color: #F4F8FA !important; }

    .bg-bright-gray-1 { background-color: #3A3A3A !important; }
    .bg-bright-gray-2 { background-color: #3A3A3A !important; }


    .text-bg-primary { background-color: #9DDDF9; color: black; }
    .text-bg-secondary { background-color: #B5B5B5; color: black; }
    .text-bg-success { background-color: #2ECC71; color: white; }
    .text-bg-danger { background-color: #E74C3C; color: white; }
    .text-bg-warning { background-color: #F39C12; color: white; }
    .text-bg-info { background-color: #43C9F4; color: white; }
    .text-bg-light { background-color: white; color: #2B2B2B; }
    .text-bg-dark { background-color: #2B2B2B; color: white; }
    .text-bg-body { background-color: #2B2B2B; color: white; }
    .text-bg-muted { background-color: #5C6B7A; color: white; }
    .text-bg-white { background-color: white; color: #2B2B2B; }
    .text-bg-black { background-color: black; color: white; }

    input.form-control, textarea.form-control {
        background: #4A4A4A;
        border: 1px solid #3A3A3A;
        box-shadow: none !important;
        color: #F2F2F2;
    }

    input.form-control:disabled,
    textarea.form-control:disabled {
        color: #F2F2F2;
    }

    input.form-control.full-disabled:disabled,
    textarea.form-control:disabled {
        color: #F2F2F2;
        background: #2A2A2A;
    }

    input.form-control::placeholder, textarea.form-control::placeholder {
        color: #8d9ca8;
    }

    input.form-control:focus, textarea.form-control:focus {
        background-color: #4A4A4A;
    }

    input.custom-disabled:disabled,
    textarea.custom-disabled:disabled {
      background: #4a4a4a;
    }

    /*============================Dropdown==========================*/

    .dropdown-toggle.dropdown-toggle::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-primary::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232f65c5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-primary:hover::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23052966' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-primary.show:hover::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232f65c5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-info::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230F9FCC' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-info:hover::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231B3342' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-info.show:hover::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230F9FCC' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-success::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231F9E55' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-success:hover::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23143A2A' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-success.show:hover::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231F9E55' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-danger::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23E74C3C' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-danger:hover::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%233D1B1B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-danger.show:hover::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23E74C3C' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }


    .dropdown-toggle.dropdown-toggle.btn-warning::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F39C12' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-warning:hover::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%233D2A11' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle.btn-danger.show:hover::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F39C12' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .btn-light.dropdown-toggle-split::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.btn-outline-primary::after {
        /* 2f65c5 */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232f65c5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.btn-outline-success::after {
        /* 2ECC71 */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232ECC71' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.btn-outline-info::after {
        /* 0F9FCC */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230F9FCC' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.btn-outline-warning::after {
        /* F39C12 */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F39C12' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.btn-outline-danger::after {
        /* E74C3C */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23E74C3C' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.btn-outline-light::after {
        /* B5B5B5 */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23B5B5B5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.btn-outline-secondary::after {
        /* F2F2F2 */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown.bootstrap-select.form-control {
        background: inherit !important;
    }

    .bootstrap-select>.dropdown-toggle.bs-placeholder,
    .bootstrap-select>.dropdown-toggle.bs-placeholder:hover,
    .bootstrap-select>.dropdown-toggle.bs-placeholder:focus,
    .bootstrap-select>.dropdown-toggle.bs-placeholder:active {
        color: #8d9ca8;
        background-color: #4A4A4A;
    }

    .bootstrap-select .dropdown-toggle::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .dropdown-toggle.dropdown-toggle::after,
    .dropdown-toggle.dropdown-toggle:hover::after,
    .dropdown-toggle.dropdown-toggle.show::after,
    .dropdown-toggle.dropdown-toggle.show:hover::after,
    .dropdown-toggle.dropdown-toggle[aria-expanded="true"]::after,
    .bootstrap-select .dropdown-toggle::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    }

    .dropdown-toggle.dropdown-toggle:active,
    .dropdown-toggle.dropdown-toggle.show,
    .dropdown-toggle.dropdown-toggle[aria-expanded="true"] {
        color: #ffffff !important;
    }

    .bootstrap-select > select.mobile-device:focus + .dropdown-toggle, .bootstrap-select .dropdown-toggle:focus {
        outline: none !important;
        box-shadow: none !important;
        /*box-shadow: 0 0 0 .25rem rgba(67, 201, 244, 0.2) !important;*/
        border-color: #43C9F4 !important;
    }

    .dropdown-toggle.show.dropdown-toggle {
        border-color: #43C9F4;
    }

    .dropdown-menu.show {
        box-shadow: 0 44px 54px rgba(0, 0, 0, 0.15);
        background-color: #3A3A3A;
        & .dropdown-item {
            color: #F2F2F2;
        }

        & .dropdown-item:hover {
            color: #F2F2F2;
            background-color: #4A4A4A;
        }

        & .dropdown-item.active, & .dropdown-item:active {
            color: #0F9FCC;
            background-color: #1B3342;
        }
    }

    /* Додаємо іконку лупи через псевдоелемент */

    .bootstrap-select .bs-searchbox::before {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23B5B5B5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3e%3cpath d='M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0'/%3e%3cpath d='M21 21l-6 -6'/%3e%3c/svg%3e");
    }

    .bootstrap-select .bs-searchbox input {
        border: 1px solid #DCE2E6;
    }

    /* ===========================Datepicker======================== */
    /* 📦 Контейнер календаря */

    .ui-datepicker {
        border: 1px solid #4A4A4A;
        background-color: #3A3A3A;
        color: #F2F2F2;
        box-shadow: 0 44px 54px rgba(0, 0, 0, 0.15);
    }

    .ui-datepicker-title {
        color: #F2F2F2;
    }

    .ui-datepicker thead th span {
        color: #B5B5B5;
    }

    .ui-datepicker-prev {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
        transform: rotate(90deg);
    }

    .ui-datepicker-next {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
        transform: rotate(-90deg);
    }

    /* 🚀 Наводимо — збільшується тільки стрілка, а не кнопка */

    .ui-datepicker-prev:hover,
    .ui-datepicker-next:hover {
        background-color: transparent !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
        border: none !important;
    }

    .ui-datepicker-prev:focus,
    .ui-datepicker-next:focus {
        background-color: transparent !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
        border: none !important;
    }

    /* 🔘 Оформлення кожного дня */

    .ui-datepicker td a,
    .ui-datepicker td span,
    .ui-datepicker td .ui-state-default {
        color: #F2F2F2;
        background-color: #3A3A3A;
        border: none;
        box-shadow: none;
    }

    /* 🔵 Наведення */
    .ui-datepicker td a:hover { background-color: #6A6A6A; }


    /* 🟦 Вибрана дата */
    .ui-datepicker td .ui-state-active {
        background-color: #1B3342 !important;
        color: #0F9FCC !important;
        border: 1px solid #0F9FCC;
    }

    /* 🔷 Сьогодні */
    .ui-datepicker-today a {
        border: 1px solid #3A3A3A;
        background-color: #4A4A4A !important;
        color: #f2f2f2 !important;
    }

    .ui-datepicker-custom-buttons {
        border-top: 1px solid #4A4A4A;
    }

    .ui-datepicker-custom-buttons button {
        background-color: #6A6A6A;
        border: 1px solid #3A3A3A;
        border-radius: 4px;
        color: #F2F2F2;
    }

    .ui-datepicker-custom-buttons button:hover {
        background-color: #6A6A6A;
    }

    /* 📆 Випадаючі списки місяця і року */
    .ui-datepicker select.ui-datepicker-month,
    .ui-datepicker select.ui-datepicker-year {
        background-color: transparent;
        color: #F2F2F2;
    }

    .ui-datepicker select.ui-datepicker-month:focus,
    .ui-datepicker select.ui-datepicker-year:focus {
        border: 1px solid #0F9FCC;
    }

    .ui-datepicker select.ui-datepicker-month:focus,
    .ui-datepicker select.ui-datepicker-year:focus {
        border: 1px solid #0F9FCC; /* яскравіший бордер при фокусі */
    }

    /* =================================================== */

    .calendar-wrapper input::placeholder {
        color: #8d9ca8;
    }

    .calendar-icon {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23f2f2f2' class='bi bi-calendar2-check' viewBox='0 0 16 16'%3E%3Cpath d='M10.854 8.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708 0'/%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M2 2a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1z'/%3E%3Cpath d='M2.5 4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H3a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
    }

    .calendar-icon.clear-icon {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23f2f2f2' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 1 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    }

    .bootstrap-select > .dropdown-toggle.bs-placeholder,
    .bootstrap-select > .dropdown-toggle.bs-placeholder:hover,
    .bootstrap-select > .dropdown-toggle.bs-placeholder:focus,
    .bootstrap-select > .dropdown-toggle.bs-placeholder:active {
        color: #8d9ca8;
    }

    .form-select {
        background-color: #4A4A4A;
        border: 1px solid #3A3A3A;
        border-radius: 4px;
        box-shadow: none !important;
    }

    .form-select option[selected], .form-select option[aria-selected="true"], .form-select option:hover, .form-select option:active, .form-select option:focus, .form-select option:checked {
        color: #0F9FCC !important;
        text-decoration: none;
        background-color: #1B3342 !important;
    }

    .dropdown-item.active, .dropdown-item:active {
        color: #0F9FCC;
        text-decoration: none;
        background-color: #1B3342;
    }



    .active > .page-link,
    .page-link.active {
        background-color: #6A6A6A !important;
        border-color: #3A3A3A !important;
        color: #F2F2F2 !important;
    }

    .page-item.disabled .page-link {
        background-color: #2A2A2A !important;
        border-color: #2A2A2A !important;
        color: #6A6A6A !important;
    }

    .active > .page-link:hover,
    .page-link.active:hover {
        background-color: #4A4A4A !important;
        border-color: #3A3A3A !important;
        color: #F2F2F2 !important;
    }

    .page-link {
        color: #F2F2F2 !important;
        border-color: #3A3A3A !important;
    }

    .page-link:hover {
        color: #F2F2F2 !important;
    }

    .page-link:active, .page-link:focus {
        box-shadow: none;
    }

    .custom-pre-table-row-border {
        border: 1px solid #3A3A3A;
    }

    .table-responsive {
        background: inherit !important;
    }

    .table-responsive thead tr th {
        background: inherit !important;
    }

    .table-responsive tbody tr td {
        background: inherit !important;
    }

    .table-responsive tfoot tr th {
        background: inherit !important;
        border-bottom: none !important;
    }

    .table-responsive tfoot .bg-gray-100 {
        color: #0f9fcc !important;
        background-color: #1b3342 !important;
    }

    .table thead .tr-custom-color th{
        color: white !important;
        font-weight: 500 !important;
    }

    .datatable-container {
        color: #f2f2f2;

        & .border {
            border-color: #3A3A3A !important;
        }

        & table.table-bordered {
            border-color: #3A3A3A !important;
        }

        & .filter-row {
            background: #3a3a3a;
        }

        & table thead .tr-custom-color th {
            color: white !important;
        }

        & .dt-info-custom.text-muted {
            color: #B5B5B5 !important;
        }

        & table tbody tr td.text-muted {
            color: #B5B5B5 !important;
        }

        & .dt-search::before {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23B5B5B5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3e%3cpath d='M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0'/%3e%3cpath d='M21 21l-6 -6'/%3e%3c/svg%3e");
        }

        & .dt-length-gl .dropdown-toggle {
            border-radius: 4px;
        }

        & .dt-length-gl .dropdown-toggle::after {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
        }

        & .dropdown-toggle.dropdown-toggle.btn-colvis-custom::after {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
        }

        & .dropdown-toggle.dropdown-toggle.btn-colvis-custom:active,
        & .dropdown-toggle.dropdown-toggle.btn-colvis-custom[aria-expanded="true"] {
            border-color: #0F9FCC !important;
            background-color: #4A4A4A;
        }

        & .dt-empty {
            font-size: 12px;
            color: #B5B5B5;
        }

        & .dt-button-collection {
            background-color: #3A3A3A;
            border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);
            box-shadow: 0 44px 54px rgba(0, 0, 0, 0.15);

            & .dropdown-item {
                color: #F2F2F2;
            }

            & .dropdown-item:hover {
                color: #F2F2F2;
                background-color: #4A4A4A;
            }
        }

        & tfoot .bg-gray-100 {
            color: #0F9FCC !important;
            background-color: #1B3342 !important;
        }

    }

    .datatable-container-sm {
        & .dt-empty {
            color: #B5B5B5;
        }
    }

    .datatable-container-xs {
        & .dt-empty {
            color: #B5B5B5;
        }
    }

    .custom-table-header-label-row {
        border: 1px solid #3A3A3A;
    }

    .active>.page-link,
    .page-link.active {
        background-color: #6A6A6A;
        border-color: #6A6A6A;
        color: #f2f2f2;
    }
    .page-item.disabled .page-link {
        background-color: #2A2A2A;
        border-color: #2A2A2A;
        color: #B5B5B5;
    }
    .active>.page-link:hover,
    .page-link.active:hover
    {
        background-color: #4A4A4A;
        border-color: #3A3A3A;
        color: #f2f2f2;
    }
    .page-link {
        color: #f2f2f2;
        background: #2a2a2a;
        border-color: #2a2a2a;
    }
    .page-link:hover {
        background-color: #4A4A4A;
        border-color: #3A3A3A;
        color: #f2f2f2;
    }

    .form-range:focus::-webkit-slider-thumb {
        box-shadow: 0 0 0 1px #fff, 0 0 0 .25rem rgba(15, 159, 204, .25)
    }

    .form-range:focus::-moz-range-thumb {
        box-shadow: 0 0 0 1px #fff, 0 0 0 .25rem rgba(15, 159, 204, .25)
    }

    .form-range::-webkit-slider-thumb {
        background-color: #0F9FCC;
    }

    .form-range::-webkit-slider-thumb:active {
        background-color: #D6F1FC
    }

    .form-range::-moz-range-thumb {
        background-color: #0F9FCC;
    }

    .form-range::-moz-range-thumb:active {
        background-color: #D6F1FC
    }

    .progress, .progress-stacked {
        --bs-progress-bar-bg: #1FB4E5;
    }

    .tooltip {
        --bs-tooltip-bg: #2B2B2B;
        --bs-tooltip-color: #F4F8FA;
    }

    .block-content {
        background: #2A2A2A;
    }

    .tab-content {
        background: #2A2A2A;
        border: none;
    }

    .card {
        background-color: #2A2A2A;
    }

    .card-gl {
        border-color: #3A3A3A !important;
    }

    .card-gl-header {
        color: #B5B5B5;
        background-color: #2A2A2A;
    }

    .card-gl-secondary {
        background-color: #2A2A2A;
    }

    label {
        color: #F2F2F2;
    }

    .bootstrap-select > .dropdown-toggle.bs-placeholder {
        color: #8d9ca8 !important;
    }

    .bootstrap-select > .dropdown-toggle {
        color: #F2F2F2;
    }

    .table-perimeter {
        border: 1px solid #3A3A3A;
        border-radius: 4px !important;
    }

    .modal-content {
        color: #f2f2f2;
        background-color: #2A2A2A;
    }

    .modal-header {
        border-bottom:  1px solid #3A3A3A;
    }

    .modal-body table td {
        color: #B5B5B5 !important;
        background: inherit;
    }

    .modal-body table th {
        color: #B5B5B5 !important;
        background: inherit;
        font-weight: 400 !important;
    }

    .drop-table-header-row {
        background: #3A3A3A;
        border: #4A4A4A !important;
    }

    .drop-table-row {
        border-color: #4A4A4A;
    }

    .select-custom-tooltip {
        background: #6A6A6A;
        color: #F4F8FA;
    }

    .btn-close:focus {
        box-shadow: none;
        border: 1px solid #DCE2E6;
    }

    .bc-start {
        border-left: 1px solid #DCE2E6;
    }

    .bc-end {
        border-right: 1px solid #DCE2E6;
    }

    @media (min-width: 576px) {
        .bc-sm-start {
            border-left: 1px solid #DCE2E6;
        }

        .bc-sm-end {
            border-right: 1px solid #DCE2E6;
        }
    }

    @media (min-width: 768px) {
        .bc-md-start {
            border-left: 1px solid #3A3A3A;
        }

        .bc-md-end {
            border-right: 1px solid #3A3A3A;
        }
    }

    @media (min-width: 992px) {
        .bc-lg-start {
            border-left: 1px solid #3A3A3A;
        }

        .bc-lg-end {
            border-right: 1px solid #3A3A3A;
        }
    }

    @media (min-width: 1200px) {
        .bc-xl-start {
            border-left: 1px solid #3A3A3A;
        }

        .bc-xl-end {
            border-right: 1px solid #3A3A3A;
        }
    }

    @media (min-width: 1400px) {
        .bc-xxl-start {
            border-left: 1px solid #3A3A3A;
        }

        .bc-xxl-end {
            border-right: 1px solid #3A3A3A;
        }
    }

    .tabs-row-bg {
        background: var(--app-dark-panel-3);
        /*background-color: #4A4A4A;*/
    }

    .custom-tabs-pills .nav-link {
        color: var(--app-dark-muted) !important;
    }

    .custom-tabs-pills .nav-link.active {
        background-color: var(--app-dark-accent-soft);
        color: var(--app-dark-accent) !important;
    }

    .custom-tabs-pills .nav-link:hover {
        background-color: var(--app-dark-hover);
        color: var(--app-dark-text-strong) !important;
    }

    .list-group-item {
        background: #4a4a4a;
        border-color: #5a5a5a;

        & a {
            color: #f2f2f2 !important;
        }
    }

    .list-group-item-action {
        color: #F2F2F2 !important;
    }

    .list-group {
        --bs-list-group-action-active-bg: #1B3342;
        --bs-list-group-action-hover-bg: #1B3342;
    }

    .tooltip {
        --bs-tooltip-bg: #6A6A6A;
        --bs-tooltip-color: #F2F2F2;
    }

    .inner>ul>li {
        color: #F2F2F2;
    }

    .modal-list-group-item {
        border: 1px solid #3A3A3A;
        background: #1B3342;
        color: #F2F2F2;
    }

    .modal-list-group-item:hover {
        border-color: #007ABF;
    }
    /*.dropdown-header {*/
    /*    color: #6A6A6A !important;*/
    /*}*/

    .dropdown-header {
        color: #B5B5B5 !important;
    }

    /* ================ DATALIST INPUT =================== */
    .input-custom-tooltip {
        background: #4a4a4a !important;
        color: #f2f2f2 !important;
    }
    /* chevron on the right */
    .datalist-wrapper::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .datalist-menu {
        color: #f2f2f2;
        border: 1px solid #4a4a4a;
        background: #3a3a3a;
    }

    .datalist-menu li:hover {
        color: #f2f2f2;
        background: #4a4a4a;
    }

    .datalist-menu li.active {
        color: #0f9fcc;
        background: #1b3342;
    }

    .datalist-menu li.selected {
        color: #0f9fcc;
        background: #1b3342;
    }

    /* ================= TEXTAREA DATALIST ================= */

    .datalist-textarea-wrapper::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }

    .datalist-menu-textarea {
        color: #f2f2f2;
        border: 1px solid #4a4a4a;
        background: #3a3a3a;
    }

    .datalist-menu-textarea li:hover {
        color: #f2f2f2;
        background: #4a4a4a;
    }

    .datalist-menu-textarea li.active {
        color: #0f9fcc;
        background: #1b3342;
    }

    .datalist-menu-textarea li.selected {
        color: #0f9fcc;
        background: #1b3342;
    }

    .select-disabled {
        background-color: #4A4A4A !important;
    }

    textarea::-webkit-scrollbar-track {
        background: #3a3a3a;
    }
    textarea::-webkit-scrollbar-thumb {
        background: #B5B5B5;
    }
}

/* Dark theme palette */
[data-bs-theme="dark"] {
    --app-dark-page: #0b1117;
    --app-dark-bg: #101820;
    --app-dark-panel: #18222b;
    --app-dark-panel-2: #111922;
    --app-dark-panel-3: #202c36;
    --app-dark-input: #131d26;
    --app-dark-border: #465764;
    --app-dark-border-soft: #384854;
    --app-dark-grid-border: #2f3e49;
    --app-dark-text: #e5edf3;
    --app-dark-text-strong: #f3f7fa;
    --app-dark-muted: #8d9ca8;
    --app-dark-accent: #43c9f4;
    --app-dark-accent-2: #0f9fcc;
    --app-dark-accent-soft: #173746;
    --app-dark-hover: #24313b;
    --app-dark-scrollbar: #465662;
    --app-dark-success: #4ad184;
    --app-dark-success-bg: #143424;
    --app-dark-success-border: #2b7650;
    --app-dark-danger: #ef6f62;
    --app-dark-danger-bg: #3a1717;
    --app-dark-danger-border: #7c312c;
    --app-dark-warning: #e0aa45;
    --app-dark-warning-bg: #352712;
    --app-dark-warning-border: #735622;

    --bs-body-bg: var(--app-dark-bg);
    --bs-body-bg-rgb: 16, 24, 32;
    --bs-body-color: var(--app-dark-text);
    --bs-body-color-rgb: 229, 237, 243;
    --bs-emphasis-color: var(--app-dark-text-strong);
    --bs-emphasis-color-rgb: 243, 247, 250;
    --bs-secondary-color: var(--app-dark-muted);
    --bs-secondary-bg: var(--app-dark-panel);
    --bs-tertiary-bg: var(--app-dark-panel-2);
    --bs-border-color: var(--app-dark-border);
    --bs-border-color-translucent: rgba(36, 49, 59, 0.58);
    --bs-link-color: var(--app-dark-accent);
    --bs-link-hover-color: var(--app-dark-text-strong);
    --bs-primary: var(--app-dark-accent-2);
    --bs-primary-rgb: 15, 159, 204;
    --bs-info: var(--app-dark-accent);
    --bs-info-rgb: 67, 201, 244;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .theme-dark,
[data-bs-theme="dark"] .main-content.bg-dark {
    background-color: var(--app-dark-page) !important;
    color: var(--app-dark-text);
}

[data-bs-theme="dark"] .block-content {
    background-color: var(--app-dark-bg) !important;
    color: var(--app-dark-text);
}

[data-bs-theme="dark"] main {
    color: var(--app-dark-text);
}

[data-bs-theme="dark"] .bg-panel,
[data-bs-theme="dark"] .header-row .row,
[data-bs-theme="dark"] .top-menu,
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text);
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .sidebar,
[data-bs-theme="dark"] .sb,
[data-bs-theme="dark"] .sb-content,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--app-dark-panel-2) !important;
    color: var(--app-dark-text);
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card-gl,
[data-bs-theme="dark"] .card-gl-secondary,
[data-bs-theme="dark"] .datatable-container,
[data-bs-theme="dark"] .table-responsive,
[data-bs-theme="dark"] .tabsContent {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text);
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .card-header {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table > :not(caption) > * > *,
[data-bs-theme="dark"] .table-bordered > :not(caption) > * {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-control[readonly],
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle,
[data-bs-theme="dark"] .selectpicker,
[data-bs-theme="dark"] .datalist-input,
[data-bs-theme="dark"] .datalist-textarea,
[data-bs-theme="dark"] .sb-search input {
    background-color: var(--app-dark-input) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .datalist-input::placeholder,
[data-bs-theme="dark"] .datalist-textarea::placeholder {
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:hover,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:focus,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:active,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder .filter-option-inner-inner {
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] .dropdown-container > input.form-control[role="combobox"]:not(:disabled):not([readonly]) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F2F2F2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right .75rem center !important;
    background-size: 16px 12px !important;
}

[data-bs-theme="dark"] .dropdown-container > input.form-control[role="combobox"]:disabled,
[data-bs-theme="dark"] .dropdown-container > input.form-control[role="combobox"][readonly] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23495057' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right .75rem center !important;
    background-size: 16px 12px !important;
}

[data-bs-theme="dark"] .dropdown-container > input#search-order.form-control[role="combobox"] {
    background-image: none !important;
}

[data-bs-theme="dark"] .dropdown-item,
[data-bs-theme="dark"] .datalist-menu li,
[data-bs-theme="dark"] .datalist-menu-textarea li,
[data-bs-theme="dark"] .sb li > .btn.btn-link,
[data-bs-theme="dark"] .sb li > .btn.collapsed,
[data-bs-theme="dark"] div.sb-item a {
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus,
[data-bs-theme="dark"] .datalist-menu li:hover,
[data-bs-theme="dark"] .datalist-menu-textarea li:hover,
[data-bs-theme="dark"] .sb .btn:hover,
[data-bs-theme="dark"] div.sb-item a:hover {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .dropdown-item.active,
[data-bs-theme="dark"] .dropdown-item:active,
[data-bs-theme="dark"] .datalist-menu li.active,
[data-bs-theme="dark"] .datalist-menu li.selected,
[data-bs-theme="dark"] .datalist-menu-textarea li.active,
[data-bs-theme="dark"] .datalist-menu-textarea li.selected,
[data-bs-theme="dark"] .scroll-content.sc-dark a.active,
[data-bs-theme="dark"] .scroll-content.sc-dark button.active {
    background-color: var(--app-dark-accent-soft) !important;
    color: var(--app-dark-accent) !important;
}

[data-bs-theme="dark"] .btn-info,
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-header,
[data-bs-theme="dark"] .btn-outline-info:hover,
[data-bs-theme="dark"] .btn-outline-primary:hover {
    --bs-btn-color: #eef6fd;
    --bs-btn-bg: var(--app-dark-accent-2);
    --bs-btn-border-color: var(--app-dark-accent-2);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--app-dark-accent);
    --bs-btn-hover-border-color: var(--app-dark-accent);
    --bs-btn-active-bg: var(--app-dark-accent-soft);
    --bs-btn-active-border-color: var(--app-dark-accent);
}

[data-bs-theme="dark"] .btn-outline-info,
[data-bs-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-header {
    --bs-btn-color: var(--app-dark-accent);
    --bs-btn-border-color: var(--app-dark-accent-2);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--app-dark-accent-2);
    --bs-btn-hover-border-color: var(--app-dark-accent-2);
}

[data-bs-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .form-label-xs,
[data-bs-theme="dark"] .breadcrumb,
[data-bs-theme="dark"] .breadcrumb a {
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--app-dark-panel-2);
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--app-dark-scrollbar);
}

[data-bs-theme="dark"] .bg-info-light,
[data-bs-theme="dark"] .bg-bright-gray-1,
[data-bs-theme="dark"] .bg-bright-gray-2,
[data-bs-theme="dark"] .bg-table-gray-1,
[data-bs-theme="dark"] .bg-table-gray-2,
[data-bs-theme="dark"] .table .bg-bright-gray-1,
[data-bs-theme="dark"] .table .bg-bright-gray-2,
[data-bs-theme="dark"] .table .bg-table-gray-1,
[data-bs-theme="dark"] .table .bg-table-gray-2 {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .gl-collapse,
[data-bs-theme="dark"] .gl-collapse-body,
[data-bs-theme="dark"] .filters-panel {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .gl-collapse-toggle.accordion-button,
[data-bs-theme="dark"] .accordion-button,
[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .gl-collapse-toggle.accordion-button::after,
[data-bs-theme="dark"] .accordion-button::after {
    filter: invert(82%) sepia(14%) saturate(547%) hue-rotate(171deg) brightness(94%) contrast(92%);
}

[data-bs-theme="dark"] .filter-item label,
[data-bs-theme="dark"] .filters-panel label,
[data-bs-theme="dark"] .lbl-500,
[data-bs-theme="dark"] .form-check-label {
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .form-check-input {
    background-color: var(--app-dark-input) !important;
    border-color: var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: var(--app-dark-accent) !important;
    border-color: var(--app-dark-accent) !important;
}

[data-bs-theme="dark"] .form-check-input:focus,
[data-bs-theme="dark"] .form-check-input:focus-visible {
    border-color: var(--app-dark-accent) !important;
    box-shadow: 0 0 0 2px var(--app-dark-accent-soft) !important;
    outline: 1px solid var(--app-dark-accent) !important;
    outline-offset: 2px;
}

[data-bs-theme="dark"] .dt-container,
[data-bs-theme="dark"] .dt-layout-row,
[data-bs-theme="dark"] .dataTables_wrapper,
[data-bs-theme="dark"] .dataTables_scroll {
    background-color: transparent !important;
    color: var(--app-dark-text) !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .dt-scroll,
[data-bs-theme="dark"] .dt-scroll-head,
[data-bs-theme="dark"] .dt-scroll-body,
[data-bs-theme="dark"] .dt-scroll-foot,
[data-bs-theme="dark"] .dataTables_scrollHead,
[data-bs-theme="dark"] .dataTables_scrollBody,
[data-bs-theme="dark"] .dataTables_scrollFoot {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .datatable-container {
    background-color: transparent !important;
    color: var(--app-dark-text);
}

[data-bs-theme="dark"] .datatable-container .row,
[data-bs-theme="dark"] .datatable-container .dt-layout-row,
[data-bs-theme="dark"] .datatable-container .dt-layout-cell,
[data-bs-theme="dark"] .datatable-container .dt-search,
[data-bs-theme="dark"] .datatable-container .dt-length,
[data-bs-theme="dark"] .datatable-container .dt-paging,
[data-bs-theme="dark"] .datatable-container .dataTables_filter,
[data-bs-theme="dark"] .datatable-container .dataTables_length,
[data-bs-theme="dark"] .datatable-container .dataTables_paginate {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll {
    border: 1px solid var(--app-dark-border);
    border-radius: 4px;
    overflow: hidden;
}

[data-bs-theme="dark"] .datatable-container .dt-search input,
[data-bs-theme="dark"] .datatable-container .dataTables_filter input {
    background-color: var(--app-dark-input) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .datatable-container .dt-info,
[data-bs-theme="dark"] .datatable-container .dataTables_info {
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll + .dt-layout-row,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll + .row {
    margin-top: 8px;
}

[data-bs-theme="dark"] .dt-info,
[data-bs-theme="dark"] .dataTables_info,
[data-bs-theme="dark"] .dt-length label,
[data-bs-theme="dark"] .dataTables_length label,
[data-bs-theme="dark"] .dt-search label,
[data-bs-theme="dark"] .dataTables_filter label {
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] .pagination .page-link,
[data-bs-theme="dark"] .page-link {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .active > .page-link,
[data-bs-theme="dark"] .page-link.active,
[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--app-dark-accent-2) !important;
    border-color: var(--app-dark-accent-2) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .page-item.disabled .page-link {
    background-color: var(--app-dark-panel-2) !important;
    color: var(--app-dark-muted) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .sb-footer,
[data-bs-theme="dark"] .sb-footer .btn,
[data-bs-theme="dark"] .sb .user-info,
[data-bs-theme="dark"] .sb .user-info-expanded,
[data-bs-theme="dark"] .sb .user-info-collapsed .user-menu-btn {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .sb-footer hr {
    border-color: var(--app-dark-border) !important;
    opacity: 1;
}

[data-bs-theme="dark"] .sb-footer .text-muted,
[data-bs-theme="dark"] .sb .user-role {
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] .btn-logout {
    --bs-btn-color: var(--app-dark-text);
    --bs-btn-bg: var(--app-dark-panel-3);
    --bs-btn-border-color: var(--app-dark-border);
    --bs-btn-hover-color: var(--app-dark-text-strong);
    --bs-btn-hover-bg: var(--app-dark-hover);
    --bs-btn-hover-border-color: var(--app-dark-border);
    --bs-btn-active-bg: var(--app-dark-accent-soft);
    --bs-btn-active-border-color: var(--app-dark-accent-2);
}

[data-bs-theme="dark"] .table-responsive::-webkit-scrollbar,
[data-bs-theme="dark"] .dt-scroll-body::-webkit-scrollbar,
[data-bs-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

[data-bs-theme="dark"] .table-responsive::-webkit-scrollbar-track,
[data-bs-theme="dark"] .dt-scroll-body::-webkit-scrollbar-track,
[data-bs-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar-track {
    background: var(--app-dark-panel-2) !important;
}

[data-bs-theme="dark"] .table-responsive::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .dt-scroll-body::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: var(--app-dark-scrollbar) !important;
    border: 2px solid var(--app-dark-panel-2);
    border-radius: 8px;
}

[data-bs-theme="dark"] .table-responsive::-webkit-scrollbar-corner,
[data-bs-theme="dark"] .dt-scroll-body::-webkit-scrollbar-corner,
[data-bs-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar-corner {
    background: var(--app-dark-panel-2) !important;
}

[data-bs-theme="dark"] .sb li > .btn,
[data-bs-theme="dark"] .sb li > .btn.btn-link,
[data-bs-theme="dark"] .sb li > .btn.btn-toggle,
[data-bs-theme="dark"] .sb li > .btn.btn-only-link,
[data-bs-theme="dark"] .sb li > .btn.collapsed,
[data-bs-theme="dark"] .sb li > .btn.btn-toggle.collapsed {
    --bs-btn-color: var(--app-dark-text);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--app-dark-text-strong);
    --bs-btn-hover-bg: var(--app-dark-hover);
    --bs-btn-hover-border-color: var(--app-dark-hover);
    --bs-btn-active-color: var(--app-dark-accent);
    --bs-btn-active-bg: var(--app-dark-accent-soft);
    --bs-btn-active-border-color: var(--app-dark-accent-soft);
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .sb li > .btn:not(.collapsed),
[data-bs-theme="dark"] .sb li > .btn.btn-only-link.active,
[data-bs-theme="dark"] .sb li > .btn.btn-only-link[aria-current="page"] {
    background-color: var(--app-dark-accent-soft) !important;
    border-color: var(--app-dark-accent-soft) !important;
    color: var(--app-dark-accent) !important;
}

[data-bs-theme="dark"] .sb li > .btn:hover,
[data-bs-theme="dark"] .sb li > .btn.btn-link:hover,
[data-bs-theme="dark"] .sb li > .btn.btn-toggle:hover {
    background-color: var(--app-dark-hover) !important;
    border-color: var(--app-dark-hover) !important;
    color: #f4f8fb !important;
}

[data-bs-theme="dark"] div.sb-item {
    border-left-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] div.sb-item a {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] div.sb-item a.active {
    background-color: transparent !important;
    color: var(--app-dark-text-strong) !important;
    font-weight: 600;
}

[data-bs-theme="dark"] div.sb-item a:hover {
    background-color: var(--app-dark-hover) !important;
    color: #f4f8fb !important;
}

[data-bs-theme="dark"] .sb-footer {
    background-color: transparent !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .sb-footer > .d-flex {
    background-color: var(--app-dark-panel) !important;
    border: 1px solid var(--app-dark-border);
    border-radius: 4px;
    padding: 8px;
}

[data-bs-theme="dark"] .sb-footer .btn,
[data-bs-theme="dark"] .sb .user-info,
[data-bs-theme="dark"] .sb .user-info-expanded,
[data-bs-theme="dark"] .sb .user-info-collapsed .user-menu-btn {
    background-color: transparent !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .sb-footer .btn:hover,
[data-bs-theme="dark"] .sb .user-info-expanded:hover,
[data-bs-theme="dark"] .sb .user-info-collapsed .user-menu-btn:hover {
    background-color: var(--app-dark-hover) !important;
}

[data-bs-theme="dark"] .bootstrap-select,
[data-bs-theme="dark"] .dropdown.bootstrap-select,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:hover,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:focus,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:active {
    background-color: var(--app-dark-input) !important;
    border-color: var(--app-dark-border) !important;
    color: var(--app-dark-text) !important;
}


[data-bs-theme="dark"] .bootstrap-select .filter-option,
[data-bs-theme="dark"] .bootstrap-select .filter-option-inner,
[data-bs-theme="dark"] .bootstrap-select .filter-option-inner-inner {
    color: var(--app-dark-text) !important;
}

/* Selectpicker placeholder — match datalist ::placeholder color */
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder .filter-option-inner-inner,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:hover .filter-option-inner-inner,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:focus .filter-option-inner-inner,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:active .filter-option-inner-inner {
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] .bootstrap-select .dropdown-menu,
[data-bs-theme="dark"] .bootstrap-select .dropdown-menu.show,
[data-bs-theme="dark"] .bootstrap-select .inner,
[data-bs-theme="dark"] .bootstrap-select .dropdown-menu .inner {
    background-color: var(--app-dark-panel-2) !important;
    border-color: var(--app-dark-border) !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .bootstrap-select .dropdown-menu li a,
[data-bs-theme="dark"] .bootstrap-select .dropdown-menu .dropdown-item {
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .bootstrap-select .dropdown-menu li a:hover,
[data-bs-theme="dark"] .bootstrap-select .dropdown-menu .dropdown-item:hover,
[data-bs-theme="dark"] .bootstrap-select .dropdown-menu .selected > a,
[data-bs-theme="dark"] .bootstrap-select .dropdown-menu .active > a {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .table.text-dark,
[data-bs-theme="dark"] .table-perimeter,
[data-bs-theme="dark"] .custom-thead-size,
[data-bs-theme="dark"] .custom-thead-size tr th {
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .card-gl .card-gl-header {
    background-color: transparent !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .sb-footer > .d-flex {
    background-color: var(--app-dark-panel) !important;
    border: 1px solid var(--app-dark-border);
    border-radius: 4px;
    padding: 8px;
}

[data-bs-theme="dark"] .sb-footer .btn.icon-tumbler-on,
[data-bs-theme="dark"] .sb-footer .btn.icon-tumbler-off {
    background-color: var(--app-dark-panel-3) !important;
    border-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .sb .change-color-scheme {
    color: var(--app-dark-muted) !important;
    padding: 8px 12px;
}

[data-bs-theme="dark"] .sb .user-info-expanded {
    display: flex;
    width: 100%;
    padding: 8px 12px;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    gap: 8px;
    background-color: var(--app-dark-panel-3) !important;
    border: 1px solid var(--app-dark-border) !important;
    border-radius: 4px;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .sb .user-info-expanded > div:first-child {
    min-width: 0;
}

[data-bs-theme="dark"] .sb .user-info-expanded > div:last-child {
    display: flex;
    flex-shrink: 0;
    gap: 4px;
}

[data-bs-theme="dark"] .sb .user-name {
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .sb .user-info-expanded .btn-light,
[data-bs-theme="dark"] .sb .user-info-expanded .btn-logout {
    background-color: var(--app-dark-panel-2) !important;
    border-color: var(--app-dark-border) !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .sb .user-info-expanded .btn-light:hover,
[data-bs-theme="dark"] .sb .user-info-expanded .btn-logout:hover {
    background-color: var(--app-dark-hover) !important;
    border-color: var(--app-dark-border) !important;
}

/* Keep the sidebar footer structure aligned with the light theme. */
[data-bs-theme="dark"] .sb-footer > .d-flex {
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

[data-bs-theme="dark"] .sb-footer .btn.icon-tumbler-on,
[data-bs-theme="dark"] .sb-footer .btn.icon-tumbler-off {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--app-dark-text) !important;
    justify-content: flex-start !important;
    padding: 4px 8px !important;
}

[data-bs-theme="dark"] .sb-footer .btn.icon-tumbler-on:hover,
[data-bs-theme="dark"] .sb-footer .btn.icon-tumbler-off:hover {
    background-color: var(--app-dark-hover) !important;
    border-color: var(--app-dark-hover) !important;
}

[data-bs-theme="dark"] .sb .change-color-scheme {
    padding: 8px 12px !important;
}

[data-bs-theme="dark"] .sb .user-info-expanded {
    border: 0 !important;
    background-color: var(--app-dark-panel-3) !important;
}

[data-bs-theme="dark"] .sb .user-info-expanded:hover {
    background-color: var(--app-dark-panel-3) !important;
}

[data-bs-theme="dark"] .sb .user-info-expanded > div:first-child {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

[data-bs-theme="dark"] .sb .user-info-expanded > div:last-child {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
}

[data-bs-theme="dark"] .sb .user-info-expanded .btn-light,
[data-bs-theme="dark"] .sb .user-info-expanded .btn-logout {
    width: 32px;
    height: 32px;
    padding: 4px 8px !important;
    background-color: var(--app-dark-panel-2) !important;
    border: 1px solid var(--app-dark-border) !important;
    color: var(--app-dark-text) !important;
}

/* Final border pass: dark UI should separate surfaces softly, not outline every part. */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card-gl,
[data-bs-theme="dark"] .card-gl-secondary,
[data-bs-theme="dark"] .gl-collapse,
[data-bs-theme="dark"] .datatable-container .dt-scroll,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll,
[data-bs-theme="dark"] .table-perimeter,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu {
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table > :not(caption) > * > *,
[data-bs-theme="dark"] .table-bordered > :not(caption) > *,
[data-bs-theme="dark"] .table-bordered > :not(caption) > * > *,
[data-bs-theme="dark"] .table-responsive,
[data-bs-theme="dark"] .dt-scroll-head,
[data-bs-theme="dark"] .dt-scroll-body,
[data-bs-theme="dark"] .dt-scroll-foot,
[data-bs-theme="dark"] .dataTables_scrollHead,
[data-bs-theme="dark"] .dataTables_scrollBody,
[data-bs-theme="dark"] .dataTables_scrollFoot {
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle,
[data-bs-theme="dark"] .selectpicker,
[data-bs-theme="dark"] .datalist-input,
[data-bs-theme="dark"] .datalist-textarea,
[data-bs-theme="dark"] .datatable-container .dt-search input,
[data-bs-theme="dark"] .datatable-container .dataTables_filter input {
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle:focus {
    border-color: var(--app-dark-accent-2) !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .btn:not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-primary),
[data-bs-theme="dark"] .dropdown-toggle.dropdown-toggle.btn-colvis-custom,
[data-bs-theme="dark"] .dt-length-gl .dropdown-toggle,
[data-bs-theme="dark"] .dt-order-gl .dropdown-toggle,
[data-bs-theme="dark"] .pagination .page-link,
[data-bs-theme="dark"] .page-link {
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .btn:hover:not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-primary),
[data-bs-theme="dark"] .dropdown-toggle.dropdown-toggle.btn-colvis-custom:hover,
[data-bs-theme="dark"] .dt-length-gl .dropdown-toggle:hover,
[data-bs-theme="dark"] .dt-order-gl .dropdown-toggle:hover,
[data-bs-theme="dark"] .pagination .page-link:hover,
[data-bs-theme="dark"] .page-link:hover {
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] .btn-outline-info,
[data-bs-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-header {
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .btn-outline-info:hover,
[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-header:hover {
    border-color: var(--app-dark-accent-2) !important;
}

/* Harmonized dark button palette. */
[data-bs-theme="dark"] .btn-light,
[data-bs-theme="dark"] .btn-secondary,
[data-bs-theme="dark"] .btn-outline-light,
[data-bs-theme="dark"] .btn-outline-secondary,
[data-bs-theme="dark"] .dropdown-toggle.dropdown-toggle.btn-colvis-custom,
[data-bs-theme="dark"] .dt-length-gl .dropdown-toggle,
[data-bs-theme="dark"] .dt-order-gl .dropdown-toggle,
[data-bs-theme="dark"] .pagination .page-link,
[data-bs-theme="dark"] .page-link {
    --bs-btn-color: var(--app-dark-text);
    --bs-btn-bg: var(--app-dark-panel-3);
    --bs-btn-border-color: var(--app-dark-border-soft);
    --bs-btn-hover-color: var(--app-dark-text-strong);
    --bs-btn-hover-bg: var(--app-dark-hover);
    --bs-btn-hover-border-color: var(--app-dark-border);
    --bs-btn-active-color: var(--app-dark-text-strong);
    --bs-btn-active-bg: var(--app-dark-panel);
    --bs-btn-active-border-color: var(--app-dark-border);
    --bs-btn-disabled-color: var(--app-dark-muted);
    --bs-btn-disabled-bg: var(--app-dark-panel-2);
    --bs-btn-disabled-border-color: var(--app-dark-border-soft);
    background-color: var(--app-dark-panel-3) !important;
    border-color: var(--app-dark-border-soft) !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .btn-info,
[data-bs-theme="dark"] .btn-primary {
    --bs-btn-color: #f4fbff;
    --bs-btn-bg: var(--app-dark-accent-2);
    --bs-btn-border-color: #158eb5;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #16addb;
    --bs-btn-hover-border-color: var(--app-dark-accent);
    --bs-btn-active-bg: #0c85ad;
    --bs-btn-active-border-color: #0c85ad;
    --bs-btn-disabled-color: #7fbdd0;
    --bs-btn-disabled-bg: #12303d;
    --bs-btn-disabled-border-color: #275f73;
}

[data-bs-theme="dark"] .btn-outline-info,
[data-bs-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-header {
    --bs-btn-color: var(--app-dark-accent);
    --bs-btn-bg: var(--app-dark-accent-soft);
    --bs-btn-border-color: #246277;
    --bs-btn-hover-color: #f4fbff;
    --bs-btn-hover-bg: var(--app-dark-accent-2);
    --bs-btn-hover-border-color: var(--app-dark-accent);
    --bs-btn-active-bg: #0c85ad;
    --bs-btn-active-border-color: #0c85ad;
    --bs-btn-disabled-color: #6faec2;
    --bs-btn-disabled-bg: #102833;
    --bs-btn-disabled-border-color: #214f60;
}

[data-bs-theme="dark"] .btn-success,
[data-bs-theme="dark"] .btn-outline-success {
    --bs-btn-color: var(--app-dark-success);
    --bs-btn-bg: var(--app-dark-success-bg);
    --bs-btn-border-color: var(--app-dark-success-border);
    --bs-btn-hover-color: #eafff2;
    --bs-btn-hover-bg: #185233;
    --bs-btn-hover-border-color: #2e9460;
    --bs-btn-active-color: #eafff2;
    --bs-btn-active-bg: #1f6b43;
    --bs-btn-active-border-color: #35a86c;
}

[data-bs-theme="dark"] .btn-danger,
[data-bs-theme="dark"] .btn-outline-danger {
    --bs-btn-color: var(--app-dark-danger);
    --bs-btn-bg: var(--app-dark-danger-bg);
    --bs-btn-border-color: var(--app-dark-danger-border);
    --bs-btn-hover-color: #fff2f0;
    --bs-btn-hover-bg: #5b211f;
    --bs-btn-hover-border-color: #a5463f;
    --bs-btn-active-color: #fff2f0;
    --bs-btn-active-bg: #722b27;
    --bs-btn-active-border-color: #b75049;
    --bs-btn-disabled-color: #b66760;
    --bs-btn-disabled-bg: #2a1515;
    --bs-btn-disabled-border-color: #5c2b28;
}

[data-bs-theme="dark"] .btn-warning,
[data-bs-theme="dark"] .btn-outline-warning {
    --bs-btn-color: var(--app-dark-warning);
    --bs-btn-bg: var(--app-dark-warning-bg);
    --bs-btn-border-color: var(--app-dark-warning-border);
    --bs-btn-hover-color: #fff7e5;
    --bs-btn-hover-bg: #4c3818;
    --bs-btn-hover-border-color: #9a7430;
    --bs-btn-active-color: #fff7e5;
    --bs-btn-active-bg: #63491f;
    --bs-btn-active-border-color: #b48637;
    --bs-btn-disabled-color: #b08a45;
    --bs-btn-disabled-bg: #2b2214;
    --bs-btn-disabled-border-color: #5a4724;
}

[data-bs-theme="dark"] .btn-info:disabled,
[data-bs-theme="dark"] .btn-info.disabled,
[data-bs-theme="dark"] .btn-outline-info:disabled,
[data-bs-theme="dark"] .btn-outline-info.disabled {
    --bs-btn-disabled-color: #7fbdd0;
    --bs-btn-disabled-bg: #12303d;
    --bs-btn-disabled-border-color: #275f73;
}

[data-bs-theme="dark"] .btn-danger:disabled,
[data-bs-theme="dark"] .btn-danger.disabled,
[data-bs-theme="dark"] .btn-outline-danger:disabled,
[data-bs-theme="dark"] .btn-outline-danger.disabled {
    --bs-btn-disabled-color: #b66760;
    --bs-btn-disabled-bg: #2a1515;
    --bs-btn-disabled-border-color: #5c2b28;
}

[data-bs-theme="dark"] .btn-warning:disabled,
[data-bs-theme="dark"] .btn-warning.disabled,
[data-bs-theme="dark"] .btn-outline-warning:disabled,
[data-bs-theme="dark"] .btn-outline-warning.disabled {
    --bs-btn-disabled-color: #b08a45;
    --bs-btn-disabled-bg: #2b2214;
    --bs-btn-disabled-border-color: #5a4724;
}

[data-bs-theme="dark"] .active > .page-link,
[data-bs-theme="dark"] .page-link.active,
[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--app-dark-accent-2) !important;
    border-color: #158eb5 !important;
    color: #f4fbff !important;
}

/* Final dark balance: readable structure without adding more accent colors. */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card-gl,
[data-bs-theme="dark"] .card-gl-secondary,
[data-bs-theme="dark"] .gl-collapse,
[data-bs-theme="dark"] .custom-table-header-label-row,
[data-bs-theme="dark"] .datatable-container .dt-scroll,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll,
[data-bs-theme="dark"] .table-perimeter {
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .custom-table-header-label-row.bg-info-light,
[data-bs-theme="dark"] .custom-table-header-label-row {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .custom-table-header-label-row .text-dark,
[data-bs-theme="dark"] .custom-table-header-label-row span {
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .table-perimeter {
    border-width: 1px !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .custom-table-header-label-row + .row .table-responsive,
[data-bs-theme="dark"] .custom-table-header-label-row + .row .table-perimeter {
    border-top-width: 1px !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll {
    border: 1px solid var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll .table-perimeter,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll .table-perimeter {
    border: 0 !important;
    border-radius: 0 !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll-head,
[data-bs-theme="dark"] .datatable-container .dt-scroll-body,
[data-bs-theme="dark"] .datatable-container .dt-scroll-foot,
[data-bs-theme="dark"] .datatable-container .dataTables_scrollHead,
[data-bs-theme="dark"] .datatable-container .dataTables_scrollBody,
[data-bs-theme="dark"] .datatable-container .dataTables_scrollFoot {
    border-left: 0 !important;
    border-right: 0 !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll-head,
[data-bs-theme="dark"] .datatable-container .dataTables_scrollHead {
    border-top: 0 !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll-body,
[data-bs-theme="dark"] .datatable-container .dataTables_scrollBody {
    border-bottom: 0 !important;
}

[data-bs-theme="dark"] .datatable-container > .border-search-table-row {
    border-color: var(--app-dark-grid-border) !important;
    border-bottom: 0 !important;
}

[data-bs-theme="dark"] .datatable-container > .border-search-table-row + .table-responsive .table-perimeter {
    border-top-width: 1px !important;
}

[data-bs-theme="dark"] .datatable-container > .table-responsive {
    border: 1px solid var(--app-dark-grid-border) !important;
    border-radius: 0 0 4px 4px !important;
    background-color: var(--app-dark-panel) !important;
    overflow: auto;
}

[data-bs-theme="dark"] .datatable-container > .border-search-table-row + .table-responsive {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

[data-bs-theme="dark"] .datatable-container > .table-responsive .table-perimeter {
    border: 0 !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
}

[data-bs-theme="dark"] .datatable-container > .table-responsive .table-perimeter > thead:first-child > tr:first-child > th,
[data-bs-theme="dark"] .datatable-container > .table-responsive .table-perimeter > thead:first-child > tr:first-child > td {
    border-top: 0 !important;
}

[data-bs-theme="dark"] .table-perimeter > :not(caption) > tr:first-child > *,
[data-bs-theme="dark"] .table-perimeter > :not(caption) > * > tr:first-child > * {
    border-top: 0 !important;
}

[data-bs-theme="dark"] .table-perimeter > :not(caption) > tr > :first-child,
[data-bs-theme="dark"] .table-perimeter > :not(caption) > * > tr > :first-child {
    border-left: 0 !important;
}

[data-bs-theme="dark"] .table-perimeter > :not(caption) > tr > :last-child,
[data-bs-theme="dark"] .table-perimeter > :not(caption) > * > tr > :last-child {
    border-right: 0 !important;
}

[data-bs-theme="dark"] .table-perimeter > tbody > tr:last-child > *,
[data-bs-theme="dark"] .table-perimeter > tfoot > tr:last-child > *,
[data-bs-theme="dark"] .datatable-container > .table-responsive .table > tbody > tr:last-child > *,
[data-bs-theme="dark"] .datatable-container > .table-responsive .table > tfoot > tr:last-child > * {
    border-bottom: 0 !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll table.dataTable,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll table.dataTable,
[data-bs-theme="dark"] .datatable-container .dt-scroll .table,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll .table {
    border: 0 !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll table.dataTable thead:first-child tr:first-child > *,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll table.dataTable thead:first-child tr:first-child > *,
[data-bs-theme="dark"] .datatable-container .dt-scroll .table thead:first-child tr:first-child > *,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll .table thead:first-child tr:first-child > * {
    border-top: 0 !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll table.dataTable tr > :first-child,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll table.dataTable tr > :first-child,
[data-bs-theme="dark"] .datatable-container .dt-scroll .table tr > :first-child,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll .table tr > :first-child {
    border-left: 0 !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll table.dataTable tr > :last-child,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll table.dataTable tr > :last-child,
[data-bs-theme="dark"] .datatable-container .dt-scroll .table tr > :last-child,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll .table tr > :last-child {
    border-right: 0 !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll table.dataTable tbody tr:last-child > *,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll table.dataTable tbody tr:last-child > *,
[data-bs-theme="dark"] .datatable-container .dt-scroll .table tbody tr:last-child > *,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll .table tbody tr:last-child > * {
    border-bottom: 0 !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll .dt-scroll-head table,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll .dataTables_scrollHead table {
    border-bottom: 0 !important;
}

[data-bs-theme="dark"] .datatable-container .dt-scroll .dt-scroll-body table,
[data-bs-theme="dark"] .datatable-container .dataTables_scroll .dataTables_scrollBody table {
    border-top: 0 !important;
}

[data-bs-theme="dark"] .dtfc-fixed-left,
[data-bs-theme="dark"] .dtfc-fixed-start,
[data-bs-theme="dark"] .dtfc-fixed-right,
[data-bs-theme="dark"] .dtfc-fixed-end,
[data-bs-theme="dark"] .dtfc-fixed-left *,
[data-bs-theme="dark"] .dtfc-fixed-start *,
[data-bs-theme="dark"] .dtfc-fixed-right *,
[data-bs-theme="dark"] .dtfc-fixed-end * {
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .table > :not(caption) > * > *,
[data-bs-theme="dark"] .table-bordered > :not(caption) > * > * {
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .btn-success {
    color: #eafff2 !important;
    background-color: #1d6a42 !important;
    border-color: #2e8a5b !important;
}

[data-bs-theme="dark"] .btn-success:hover,
[data-bs-theme="dark"] .btn-success:focus {
    background-color: #248052 !important;
    border-color: #3ba36d !important;
}

[data-bs-theme="dark"] .btn-outline-success {
    color: var(--app-dark-success) !important;
    background-color: var(--app-dark-success-bg) !important;
    border-color: var(--app-dark-success-border) !important;
}

[data-bs-theme="dark"] .btn-outline-success:hover,
[data-bs-theme="dark"] .btn-outline-success:focus {
    color: #eafff2 !important;
    background-color: #1d6a42 !important;
    border-color: #3ba36d !important;
}

[data-bs-theme="dark"] .dropdown-container[data-theme="dark"] .dropdown-table,
[data-bs-theme="dark"] .dropdown-table {
    background-color: var(--app-dark-panel) !important;
    border-color: var(--app-dark-grid-border) !important;
    color: var(--app-dark-text) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32) !important;
}

[data-bs-theme="dark"] .dropdown-container[data-theme="dark"] .dropdown-table table,
[data-bs-theme="dark"] .dropdown-table table {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .dropdown-container[data-theme="dark"] .dropdown-table thead,
[data-bs-theme="dark"] .dropdown-container[data-theme="dark"] .dropdown-table thead tr,
[data-bs-theme="dark"] .dropdown-container[data-theme="dark"] .dropdown-table th,
[data-bs-theme="dark"] .dropdown-table thead,
[data-bs-theme="dark"] .dropdown-table thead tr,
[data-bs-theme="dark"] .dropdown-table th {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .dropdown-container[data-theme="dark"] .dropdown-table tbody tr,
[data-bs-theme="dark"] .dropdown-table tbody tr {
    background-color: var(--app-dark-panel) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .dropdown-container[data-theme="dark"] .dropdown-table td,
[data-bs-theme="dark"] .dropdown-table td {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .dropdown-container[data-theme="dark"] .dropdown-table tbody tr:hover td,
[data-bs-theme="dark"] .dropdown-container[data-theme="dark"] .dropdown-table tbody tr.highlighted td,
[data-bs-theme="dark"] .dropdown-container[data-theme="dark"] .dropdown-table tbody tr.dt-highlighted td,
[data-bs-theme="dark"] .dropdown-table tbody tr:hover td,
[data-bs-theme="dark"] .dropdown-table tbody tr.highlighted td,
[data-bs-theme="dark"] .dropdown-table tbody tr.dt-highlighted td {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] body > .dropdown-table.dropdown-table-dark,
[data-bs-theme="dark"] .dropdown-table.dropdown-table-dark {
    background: var(--app-dark-panel) !important;
    background-color: var(--app-dark-panel) !important;
    border: 1px solid var(--app-dark-grid-border) !important;
    color: var(--app-dark-text) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32) !important;
}

[data-bs-theme="dark"] body > .dropdown-table.dropdown-table-dark table,
[data-bs-theme="dark"] .dropdown-table.dropdown-table-dark table {
    background: var(--app-dark-panel) !important;
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] body > .dropdown-table.dropdown-table-dark thead,
[data-bs-theme="dark"] body > .dropdown-table.dropdown-table-dark thead tr,
[data-bs-theme="dark"] body > .dropdown-table.dropdown-table-dark thead th,
[data-bs-theme="dark"] .dropdown-table.dropdown-table-dark thead,
[data-bs-theme="dark"] .dropdown-table.dropdown-table-dark thead tr,
[data-bs-theme="dark"] .dropdown-table.dropdown-table-dark thead th {
    background: var(--app-dark-panel-3) !important;
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] body > .dropdown-table.dropdown-table-dark tbody tr,
[data-bs-theme="dark"] .dropdown-table.dropdown-table-dark tbody tr,
[data-bs-theme="dark"] body > .dropdown-table.dropdown-table-dark tbody td,
[data-bs-theme="dark"] .dropdown-table.dropdown-table-dark tbody td {
    background: var(--app-dark-panel) !important;
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] #poAvailMenu {
    background: var(--app-dark-panel) !important;
    background-color: var(--app-dark-panel) !important;
    border-color: var(--app-dark-grid-border) !important;
    color: var(--app-dark-text) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32) !important;
}

[data-bs-theme="dark"] #poAvailMenu .table-responsive,
[data-bs-theme="dark"] #poAvailMenu .table,
[data-bs-theme="dark"] #poAvailMenu table {
    background-color: var(--app-dark-panel) !important;
    border-color: var(--app-dark-grid-border) !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] #poAvailMenu thead,
[data-bs-theme="dark"] #poAvailMenu thead tr,
[data-bs-theme="dark"] #poAvailMenu thead th {
    background: var(--app-dark-panel-3) !important;
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] #poAvailMenu tbody tr,
[data-bs-theme="dark"] #poAvailMenu tbody td {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] #poAvailMenu tbody tr:hover td {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] #poAvailMenu .table-responsive::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

[data-bs-theme="dark"] #poAvailMenu .table-responsive::-webkit-scrollbar-track {
    background: var(--app-dark-panel-2) !important;
}

[data-bs-theme="dark"] #poAvailMenu .table-responsive::-webkit-scrollbar-thumb {
    background: var(--app-dark-scrollbar) !important;
    border: 2px solid var(--app-dark-panel-2);
    border-radius: 8px;
}

[data-bs-theme="dark"] .dropdown-table.po-dropdown-table::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

[data-bs-theme="dark"] .dropdown-table.po-dropdown-table::-webkit-scrollbar-track {
    background: var(--app-dark-panel-2) !important;
}

[data-bs-theme="dark"] .dropdown-table.po-dropdown-table::-webkit-scrollbar-thumb {
    background: var(--app-dark-scrollbar) !important;
    border: 2px solid var(--app-dark-panel-2);
    border-radius: 8px;
}

[data-bs-theme="dark"] .btn-favourite-star,
[data-bs-theme="dark"] .btn-favourite-star:hover,
[data-bs-theme="dark"] .btn-favourite-star:focus,
[data-bs-theme="dark"] .btn-favourite-star:active {
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .sb-footer .icon-tumbler-on::after,
[data-bs-theme="dark"] .sb-footer .icon-tumbler-off::after {
    border-radius: 8px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 34px 16px !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .sb-footer .icon-tumbler-off::after {
    background: radial-gradient(circle at 9px 8px, #f2f2f2 0 5.5px, transparent 6px), #5d6267 !important;
}

[data-bs-theme="dark"] .sb-footer .icon-tumbler-on::after {
    background: radial-gradient(circle at 25px 8px, #f2f2f2 0 5.5px, transparent 6px), var(--app-dark-accent-2) !important;
}

/* Modal dark cleanup: neutralize legacy light utility classes inside dialog surfaces. */
[data-bs-theme="dark"] .modal {
    --bs-modal-bg: var(--app-dark-panel-2);
    --bs-modal-color: var(--app-dark-text);
    --bs-modal-border-color: var(--app-dark-border-soft);
    --bs-modal-header-border-color: var(--app-dark-border-soft);
    --bs-modal-footer-border-color: var(--app-dark-border-soft);
}

[data-bs-theme="dark"] .modal .modal-content {
    background-color: var(--app-dark-panel-2) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-soft) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42) !important;
}

[data-bs-theme="dark"] .modal .modal-header,
[data-bs-theme="dark"] .modal .modal-footer {
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .modal .modal-header {
    background-color: var(--app-dark-panel) !important;
}

[data-bs-theme="dark"] .modal .modal-footer {
    background-color: var(--app-dark-panel-2) !important;
}

[data-bs-theme="dark"] .modal .modal-body {
    background-color: var(--app-dark-panel-2) !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .modal .modal-title,
[data-bs-theme="dark"] .modal .action-title,
[data-bs-theme="dark"] .modal .text-dark,
[data-bs-theme="dark"] .modal h1,
[data-bs-theme="dark"] .modal h2,
[data-bs-theme="dark"] .modal h3,
[data-bs-theme="dark"] .modal h4,
[data-bs-theme="dark"] .modal h5,
[data-bs-theme="dark"] .modal h6 {
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .modal p,
[data-bs-theme="dark"] .modal span,
[data-bs-theme="dark"] .modal div,
[data-bs-theme="dark"] .modal label {
    border-color: var(--app-dark-border-soft);
}

[data-bs-theme="dark"] .modal .bg-white,
[data-bs-theme="dark"] .modal .bg-light,
[data-bs-theme="dark"] .modal .bg-gray-100,
[data-bs-theme="dark"] .modal .bg-bright-gray-1,
[data-bs-theme="dark"] .modal .bg-bright-gray-2,
[data-bs-theme="dark"] .modal .bg-table-gray-1,
[data-bs-theme="dark"] .modal .bg-table-gray-2,
[data-bs-theme="dark"] .modal .bg-aqua-light,
[data-bs-theme="dark"] .modal .bg-info-light {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .modal .card,
[data-bs-theme="dark"] .modal .card-gl,
[data-bs-theme="dark"] .modal .card-gl-secondary,
[data-bs-theme="dark"] .modal .card-gl-header,
[data-bs-theme="dark"] .modal .list-group-item,
[data-bs-theme="dark"] .modal .table-responsive,
[data-bs-theme="dark"] .modal .datatable-container {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .modal .tabsContainer,
[data-bs-theme="dark"] .modal .tabsController,
[data-bs-theme="dark"] .modal .tabs-row-bg {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .modal .tab-content,
[data-bs-theme="dark"] .modal .tab-pane {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .modal .custom-tabs-pills .nav-link {
    background-color: transparent !important;
    color: var(--app-dark-muted) !important;
    border: 1px solid transparent !important;
}

[data-bs-theme="dark"] .modal .custom-tabs-pills .nav-link:hover,
[data-bs-theme="dark"] .modal .custom-tabs-pills .nav-link:focus {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .modal .custom-tabs-pills .nav-link.active,
[data-bs-theme="dark"] .modal .custom-tabs-pills .show > .nav-link {
    background-color: var(--app-dark-accent-soft) !important;
    color: var(--app-dark-accent) !important;
    border-color: #246277 !important;
}

[data-bs-theme="dark"] .modal .table,
[data-bs-theme="dark"] .modal .table > :not(caption) > * > *,
[data-bs-theme="dark"] .modal .table-bordered > :not(caption) > * > *,
[data-bs-theme="dark"] .modal .table-striped > tbody > tr:nth-of-type(odd) > *,
[data-bs-theme="dark"] .modal .table-striped > tbody > tr:nth-of-type(even) > * {
    --bs-table-bg: var(--app-dark-panel);
    --bs-table-color: var(--app-dark-text);
    --bs-table-striped-bg: var(--app-dark-panel-2);
    --bs-table-striped-color: var(--app-dark-text);
    --bs-table-hover-bg: var(--app-dark-hover);
    --bs-table-hover-color: var(--app-dark-text-strong);
    background-color: var(--bs-table-bg) !important;
    color: var(--bs-table-color) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .modal thead,
[data-bs-theme="dark"] .modal thead tr,
[data-bs-theme="dark"] .modal thead th,
[data-bs-theme="dark"] .modal tfoot,
[data-bs-theme="dark"] .modal tfoot tr,
[data-bs-theme="dark"] .modal tfoot th,
[data-bs-theme="dark"] .modal tfoot td {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .modal tbody tr:hover > * {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .modal table.table,
[data-bs-theme="dark"] .modal table.table-perimeter,
[data-bs-theme="dark"] .modal table.bg-table-gray-1,
[data-bs-theme="dark"] .modal table.bg-table-gray-2 {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .modal .table-perimeter > :not(caption) > * > *,
[data-bs-theme="dark"] .modal table.table > :not(caption) > * > th,
[data-bs-theme="dark"] .modal table.table > :not(caption) > * > td {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .modal table.table > thead > tr > th,
[data-bs-theme="dark"] .modal table.table > tfoot > tr > th,
[data-bs-theme="dark"] .modal table.table > tfoot > tr > td {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .modal #tablePoExpensesTable > tfoot,
[data-bs-theme="dark"] .modal #tablePoExpensesTable > tfoot > tr,
[data-bs-theme="dark"] .modal #tablePoExpensesTable > tfoot > tr > th,
[data-bs-theme="dark"] .modal #tablePoExpensesTable > tfoot > tr > td,
[data-bs-theme="dark"] .modal table.dataTable > tfoot > tr > th,
[data-bs-theme="dark"] .modal table.dataTable > tfoot > tr > td {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-grid-border) !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(1.8);
    opacity: 0.75;
}

[data-bs-theme="dark"] .modal .btn-close:hover,
[data-bs-theme="dark"] .modal .btn-close:focus {
    opacity: 1;
}

[data-bs-theme="dark"] .modal .form-control,
[data-bs-theme="dark"] .modal .form-select,
[data-bs-theme="dark"] .modal .bootstrap-select > .dropdown-toggle,
[data-bs-theme="dark"] .modal .selectpicker,
[data-bs-theme="dark"] .modal .datalist-input,
[data-bs-theme="dark"] .modal .datalist-textarea {
    background-color: var(--app-dark-input) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .modal .form-control:disabled,
[data-bs-theme="dark"] .modal .form-control[readonly],
[data-bs-theme="dark"] .modal .form-select:disabled,
[data-bs-theme="dark"] .modal .custom-disabled:disabled,
[data-bs-theme="dark"] .modal .custom-disabled[readonly] {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-muted) !important;
    border-color: var(--app-dark-border-soft) !important;
    opacity: 1;
}

[data-bs-theme="dark"] .modal .dropdown-menu,
[data-bs-theme="dark"] .modal .dropdown-menu.show,
[data-bs-theme="dark"] .modal .bootstrap-select .dropdown-menu,
[data-bs-theme="dark"] .modal .inner.show,
[data-bs-theme="dark"] .modal .datalist-menu,
[data-bs-theme="dark"] .modal .datalist-menu-textarea {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .modal .dropdown-item,
[data-bs-theme="dark"] .modal .bootstrap-select .dropdown-menu li a,
[data-bs-theme="dark"] .modal .datalist-menu li,
[data-bs-theme="dark"] .modal .datalist-menu-textarea li {
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .modal .dropdown-item:hover,
[data-bs-theme="dark"] .modal .dropdown-item:focus,
[data-bs-theme="dark"] .modal .bootstrap-select .dropdown-menu li a:hover,
[data-bs-theme="dark"] .modal .bootstrap-select .dropdown-menu li.selected a,
[data-bs-theme="dark"] .modal .datalist-menu li:hover,
[data-bs-theme="dark"] .modal .datalist-menu li.active,
[data-bs-theme="dark"] .modal .datalist-menu-textarea li:hover,
[data-bs-theme="dark"] .modal .datalist-menu-textarea li.active {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .modal-backdrop.show {
    opacity: 0.72;
}

/* Floating form popups: keep datalist and datepicker on the current dark palette. */
[data-bs-theme="dark"] .datalist-menu,
[data-bs-theme="dark"] .datalist-menu-textarea {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-soft) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32) !important;
}

[data-bs-theme="dark"] .datalist-menu li,
[data-bs-theme="dark"] .datalist-menu-textarea li {
    color: var(--app-dark-text) !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .datalist-menu li:hover,
[data-bs-theme="dark"] .datalist-menu li:focus,
[data-bs-theme="dark"] .datalist-menu-textarea li:hover,
[data-bs-theme="dark"] .datalist-menu-textarea li:focus {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .datalist-menu li.active,
[data-bs-theme="dark"] .datalist-menu li.selected,
[data-bs-theme="dark"] .datalist-menu-textarea li.active,
[data-bs-theme="dark"] .datalist-menu-textarea li.selected {
    background-color: var(--app-dark-accent-soft) !important;
    color: var(--app-dark-accent) !important;
    border-color: #246277 !important;
}

[data-bs-theme="dark"] .ui-datepicker {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border: 1px solid var(--app-dark-border-soft) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38) !important;
}

[data-bs-theme="dark"] .ui-datepicker-header,
[data-bs-theme="dark"] .ui-datepicker-title {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .ui-datepicker table,
[data-bs-theme="dark"] .ui-datepicker-calendar,
[data-bs-theme="dark"] .ui-datepicker-calendar thead,
[data-bs-theme="dark"] .ui-datepicker-calendar tbody,
[data-bs-theme="dark"] .ui-datepicker-calendar tr,
[data-bs-theme="dark"] .ui-datepicker-calendar th,
[data-bs-theme="dark"] .ui-datepicker-calendar td {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .ui-datepicker thead th span {
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] .ui-datepicker td a,
[data-bs-theme="dark"] .ui-datepicker td span,
[data-bs-theme="dark"] .ui-datepicker td .ui-state-default {
    background-color: transparent !important;
    color: var(--app-dark-text) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .ui-datepicker td a:hover,
[data-bs-theme="dark"] .ui-datepicker td .ui-state-hover {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .ui-datepicker td .ui-state-active,
[data-bs-theme="dark"] .ui-datepicker td.ui-range-start a,
[data-bs-theme="dark"] .ui-datepicker td.ui-range-end a,
[data-bs-theme="dark"] .ui-datepicker td.ui-range-start .ui-state-default,
[data-bs-theme="dark"] .ui-datepicker td.ui-range-end .ui-state-default {
    background-color: var(--app-dark-accent-soft) !important;
    color: var(--app-dark-accent) !important;
    border-color: #246277 !important;
}

[data-bs-theme="dark"] .ui-datepicker-today a,
[data-bs-theme="dark"] .ui-datepicker-today .ui-state-default {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .ui-datepicker td.ui-range a,
[data-bs-theme="dark"] .ui-datepicker td.ui-range .ui-state-default,
[data-bs-theme="dark"] .ui-datepicker td.ui-range-hover a,
[data-bs-theme="dark"] .ui-datepicker td.ui-range-hover .ui-state-default {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .ui-datepicker-other-month,
[data-bs-theme="dark"] .ui-datepicker-other-month .ui-state-default {
    color: var(--app-dark-muted) !important;
    opacity: 0.62;
}

[data-bs-theme="dark"] .ui-datepicker select.ui-datepicker-month,
[data-bs-theme="dark"] .ui-datepicker select.ui-datepicker-year,
[data-bs-theme="dark"] .ui-datepicker-custom-buttons button {
    background-color: var(--app-dark-input) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .ui-datepicker select.ui-datepicker-month:focus,
[data-bs-theme="dark"] .ui-datepicker select.ui-datepicker-year:focus,
[data-bs-theme="dark"] .ui-datepicker-custom-buttons button:hover {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .ui-datepicker select.ui-datepicker-month option,
[data-bs-theme="dark"] .ui-datepicker select.ui-datepicker-year option {
    background-color: var(--app-dark-input) !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .ui-datepicker select.ui-datepicker-month option:checked,
[data-bs-theme="dark"] .ui-datepicker select.ui-datepicker-year option:checked,
[data-bs-theme="dark"] .ui-datepicker select.ui-datepicker-month option:hover,
[data-bs-theme="dark"] .ui-datepicker select.ui-datepicker-year option:hover {
    background-color: var(--app-dark-accent-soft) !important;
    color: var(--app-dark-accent) !important;
}

[data-bs-theme="dark"] .dp-hdr-dd {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-soft) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38) !important;
}

[data-bs-theme="dark"] .dp-hdr-dd .dp-hdr-item {
    color: var(--app-dark-text) !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .dp-hdr-dd .dp-hdr-item:hover,
[data-bs-theme="dark"] .dp-hdr-dd .dp-hdr-item:focus {
    background-color: var(--app-dark-hover) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .dp-hdr-dd .dp-hdr-item.is-selected,
[data-bs-theme="dark"] .dp-hdr-dd .dp-hdr-item.is-selected:hover,
[data-bs-theme="dark"] .dp-hdr-dd .dp-hdr-item.is-selected:focus {
    background-color: var(--app-dark-accent-soft) !important;
    color: var(--app-dark-accent) !important;
}

[data-bs-theme="dark"] .ui-datepicker-custom-buttons {
    background-color: var(--app-dark-panel) !important;
    border-top-color: var(--app-dark-border-soft) !important;
}

/* Bootstrap-select should show the same focused border as regular inputs. */
[data-bs-theme="dark"] .bootstrap-select:focus-within > .dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select > select.mobile-device:focus + .dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle:focus,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle:focus-visible,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle:active,
[data-bs-theme="dark"] .bootstrap-select.show > .dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select.open > .dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select.dropup.show > .dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select.dropup.open > .dropdown-toggle,
[data-bs-theme="dark"] .dropdown.bootstrap-select.show > .dropdown-toggle,
[data-bs-theme="dark"] .dropdown.bootstrap-select.open > .dropdown-toggle {
    --bs-btn-border-color: var(--app-dark-accent-2) !important;
    --bs-btn-active-border-color: var(--app-dark-accent-2) !important;
    --bs-btn-focus-shadow-rgb: 67, 201, 244 !important;
    border-color: var(--app-dark-accent-2) !important;
    outline: none !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .dropdown.bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.btn-outline-bw:focus,
[data-bs-theme="dark"] .dropdown.bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.btn-outline-bw:focus-visible,
[data-bs-theme="dark"] .dropdown.bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.btn-outline-bw:active,
[data-bs-theme="dark"] .dropdown.bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.btn-outline-bw.show,
[data-bs-theme="dark"] .dropdown.bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.btn-outline-bw[aria-expanded="true"],
[data-bs-theme="dark"] .bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.btn-outline-bw:focus,
[data-bs-theme="dark"] .bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.btn-outline-bw:focus-visible,
[data-bs-theme="dark"] .bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.btn-outline-bw:active,
[data-bs-theme="dark"] .bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.btn-outline-bw.show,
[data-bs-theme="dark"] .bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.btn-outline-bw[aria-expanded="true"],
[data-bs-theme="dark"] .dropdown.bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary:focus,
[data-bs-theme="dark"] .dropdown.bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary:focus-visible,
[data-bs-theme="dark"] .dropdown.bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary:active,
[data-bs-theme="dark"] .dropdown.bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.show,
[data-bs-theme="dark"] .dropdown.bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary[aria-expanded="true"],
[data-bs-theme="dark"] .bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary:focus,
[data-bs-theme="dark"] .bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary:focus-visible,
[data-bs-theme="dark"] .bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary:active,
[data-bs-theme="dark"] .bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary.show,
[data-bs-theme="dark"] .bootstrap-select > button.btn.dropdown-toggle.btn-outline-secondary[aria-expanded="true"] {
    --bs-btn-border-color: var(--app-dark-accent-2) !important;
    --bs-btn-active-border-color: var(--app-dark-accent-2) !important;
    --bs-btn-focus-shadow-rgb: 67, 201, 244 !important;
    border-color: var(--app-dark-accent-2) !important;
    border-top-color: var(--app-dark-accent-2) !important;
    border-right-color: var(--app-dark-accent-2) !important;
    border-bottom-color: var(--app-dark-accent-2) !important;
    border-left-color: var(--app-dark-accent-2) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Unified dark scrollbars across native scroll areas, tables, dropdowns and popups. */
[data-bs-theme="dark"] {
    --app-dark-scrollbar-track: #0f171f;
    --app-dark-scrollbar-track-soft: var(--app-dark-panel-2);
    --app-dark-scrollbar-thumb: #465662;
    --app-dark-scrollbar-thumb-hover: #5b6d7a;
    --app-dark-scrollbar-thumb-active: #6f8290;
}

[data-bs-theme="dark"],
[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .scroll-content,
[data-bs-theme="dark"] .sc-dark,
[data-bs-theme="dark"] .modal,
[data-bs-theme="dark"] .modal-body,
[data-bs-theme="dark"] .table-responsive,
[data-bs-theme="dark"] .dt-scroll-body,
[data-bs-theme="dark"] .dataTables_scrollBody,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .bootstrap-select .dropdown-menu .inner,
[data-bs-theme="dark"] .bootstrap-select .inner,
[data-bs-theme="dark"] .datalist-menu,
[data-bs-theme="dark"] .datalist-menu-textarea,
[data-bs-theme="dark"] .dp-hdr-dd,
[data-bs-theme="dark"] .ui-datepicker,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] .dt-dropdown-table .dt-table-wrapper,
[data-bs-theme="dark"] .dropdown-table.po-dropdown-table,
[data-bs-theme="dark"] #poAvailMenu .table-responsive {
    scrollbar-width: thin;
    scrollbar-color: var(--app-dark-scrollbar-thumb) var(--app-dark-scrollbar-track-soft);
}

[data-bs-theme="dark"] ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background-color: var(--app-dark-scrollbar-track-soft) !important;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: var(--app-dark-scrollbar-thumb) !important;
    border: 2px solid var(--app-dark-scrollbar-track-soft) !important;
    border-radius: 999px !important;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background-color: var(--app-dark-scrollbar-thumb-hover) !important;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:active {
    background-color: var(--app-dark-scrollbar-thumb-active) !important;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-corner {
    background-color: var(--app-dark-scrollbar-track-soft) !important;
}

[data-bs-theme="dark"] .table-responsive::-webkit-scrollbar,
[data-bs-theme="dark"] .dt-scroll-body::-webkit-scrollbar,
[data-bs-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar,
[data-bs-theme="dark"] .dropdown-table.po-dropdown-table::-webkit-scrollbar,
[data-bs-theme="dark"] #poAvailMenu .table-responsive::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

[data-bs-theme="dark"] .dropdown-menu::-webkit-scrollbar,
[data-bs-theme="dark"] .bootstrap-select .dropdown-menu .inner::-webkit-scrollbar,
[data-bs-theme="dark"] .bootstrap-select .inner::-webkit-scrollbar,
[data-bs-theme="dark"] .datalist-menu::-webkit-scrollbar,
[data-bs-theme="dark"] .datalist-menu-textarea::-webkit-scrollbar,
[data-bs-theme="dark"] .dp-hdr-dd::-webkit-scrollbar,
[data-bs-theme="dark"] .ui-datepicker::-webkit-scrollbar,
[data-bs-theme="dark"] textarea::-webkit-scrollbar,
[data-bs-theme="dark"] .dt-dropdown-table .dt-table-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-bs-theme="dark"] .dropdown-menu::-webkit-scrollbar-track,
[data-bs-theme="dark"] .bootstrap-select .dropdown-menu .inner::-webkit-scrollbar-track,
[data-bs-theme="dark"] .bootstrap-select .inner::-webkit-scrollbar-track,
[data-bs-theme="dark"] .datalist-menu::-webkit-scrollbar-track,
[data-bs-theme="dark"] .datalist-menu-textarea::-webkit-scrollbar-track,
[data-bs-theme="dark"] .dp-hdr-dd::-webkit-scrollbar-track,
[data-bs-theme="dark"] .ui-datepicker::-webkit-scrollbar-track,
[data-bs-theme="dark"] textarea::-webkit-scrollbar-track,
[data-bs-theme="dark"] .dt-dropdown-table .dt-table-wrapper::-webkit-scrollbar-track {
    background-color: var(--app-dark-scrollbar-track) !important;
}

[data-bs-theme="dark"] .dropdown-menu::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .bootstrap-select .dropdown-menu .inner::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .bootstrap-select .inner::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .datalist-menu::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .datalist-menu-textarea::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .dp-hdr-dd::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .ui-datepicker::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] textarea::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .dt-dropdown-table .dt-table-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--app-dark-scrollbar-thumb) !important;
    border-color: var(--app-dark-scrollbar-track) !important;
}

/* Palette dark preview surfaces and text utilities. */
[data-bs-theme="dark"] .palette-demo-surface {
    background-color: var(--app-dark-panel) !important;
    color: var(--app-dark-text) !important;
    border: 1px solid var(--app-dark-border-soft) !important;
    border-radius: 6px;
    padding: 1rem;
}

[data-bs-theme="dark"] .text-primary { color: #9dddf9 !important; }
[data-bs-theme="dark"] .text-secondary { color: var(--app-dark-muted) !important; }
[data-bs-theme="dark"] .text-success { color: var(--app-dark-success) !important; }
[data-bs-theme="dark"] .text-danger { color: var(--app-dark-danger) !important; }
[data-bs-theme="dark"] .text-warning { color: var(--app-dark-warning) !important; }
[data-bs-theme="dark"] .text-info { color: var(--app-dark-accent) !important; }
[data-bs-theme="dark"] .text-light { color: var(--app-dark-text-strong) !important; }
[data-bs-theme="dark"] .text-dark { color: var(--app-dark-text-strong) !important; }
[data-bs-theme="dark"] .text-body { color: var(--app-dark-text) !important; }
[data-bs-theme="dark"] .text-muted { color: var(--app-dark-muted) !important; }
[data-bs-theme="dark"] .text-white { color: #ffffff !important; }
[data-bs-theme="dark"] .text-black { color: #0b1117 !important; }

[data-bs-theme="dark"] .tabsController,
.tabsContainer[data-bs-theme="dark"] > .tabsController,
[data-bs-theme="dark"] .tabs-row-bg,
.tabsContainer[data-bs-theme="dark"] .tabs-row-bg {
    background: var(--app-dark-panel-3) !important;
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .tabs-content-gap,
.tabsContainer[data-bs-theme="dark"] .tabs-content-gap {
    height: 8px;
    background-color: var(--app-dark-panel) !important;
}

[data-bs-theme="dark"] .custom-tabs-pills .nav-link,
.tabsContainer[data-bs-theme="dark"] .custom-tabs-pills .nav-link {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] .custom-tabs-pills .nav-link:hover,
[data-bs-theme="dark"] .custom-tabs-pills .nav-link:focus-visible,
.tabsContainer[data-bs-theme="dark"] .custom-tabs-pills .nav-link:hover,
.tabsContainer[data-bs-theme="dark"] .custom-tabs-pills .nav-link:focus-visible {
    background-color: var(--app-dark-hover) !important;
    border-color: var(--app-dark-border-soft) !important;
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .custom-tabs-pills .nav-link.active,
.tabsContainer[data-bs-theme="dark"] .custom-tabs-pills .nav-link.active {
    background-color: var(--app-dark-accent-soft) !important;
    border-color: var(--app-dark-accent-2) !important;
    color: var(--app-dark-accent) !important;
}

[data-bs-theme="dark"] .text-bg-primary {
    background-color: var(--app-dark-accent-soft) !important;
    color: #9dddf9 !important;
    border: 1px solid #246277 !important;
}

[data-bs-theme="dark"] .text-bg-secondary,
[data-bs-theme="dark"] .text-bg-muted {
    background-color: var(--app-dark-panel-3) !important;
    color: #b7c5d0 !important;
    border: 1px solid var(--app-dark-border-soft) !important;
}

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

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

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

[data-bs-theme="dark"] .text-bg-info {
    background-color: rgba(46, 185, 232, 0.12) !important;
    color: var(--app-dark-accent) !important;
    border: 1px solid #246277 !important;
}

[data-bs-theme="dark"] .text-bg-light,
[data-bs-theme="dark"] .text-bg-body,
[data-bs-theme="dark"] .text-bg-white {
    background-color: var(--app-dark-panel-2) !important;
    color: var(--app-dark-text-strong) !important;
    border: 1px solid var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .text-bg-dark,
[data-bs-theme="dark"] .text-bg-black {
    background-color: #0f171f !important;
    color: var(--app-dark-text) !important;
    border: 1px solid var(--app-dark-border) !important;
}

/* Core Bootstrap components on dark surfaces. */
[data-bs-theme="dark"] .alert {
    background-color: var(--app-dark-panel-2);
    color: var(--app-dark-text);
    border-color: var(--app-dark-border-soft);
}

[data-bs-theme="dark"] .alert-primary {
    background-color: var(--app-dark-accent-soft);
    color: #9dddf9;
    border-color: #246277;
}

[data-bs-theme="dark"] .alert-secondary {
    background-color: var(--app-dark-panel-3);
    color: var(--app-dark-muted);
    border-color: var(--app-dark-border-soft);
}

[data-bs-theme="dark"] .alert-success {
    background-color: var(--app-dark-success-bg);
    color: var(--app-dark-success);
    border-color: var(--app-dark-success-border);
}

[data-bs-theme="dark"] .alert-danger {
    background-color: var(--app-dark-danger-bg);
    color: var(--app-dark-danger);
    border-color: var(--app-dark-danger-border);
}

[data-bs-theme="dark"] .alert-warning {
    background-color: var(--app-dark-warning-bg);
    color: var(--app-dark-warning);
    border-color: var(--app-dark-warning-border);
}

[data-bs-theme="dark"] .alert-info {
    background-color: rgba(46, 185, 232, 0.12);
    color: var(--app-dark-accent);
    border-color: #246277;
}

[data-bs-theme="dark"] .alert-light {
    background-color: var(--app-dark-panel-3);
    color: var(--app-dark-text-strong);
    border-color: var(--app-dark-grid-border);
}

[data-bs-theme="dark"] .alert-dark {
    background-color: #111923;
    color: var(--app-dark-text);
    border-color: var(--app-dark-border);
}

[data-bs-theme="dark"] .list-group {
    --bs-list-group-bg: var(--app-dark-panel);
    --bs-list-group-color: var(--app-dark-text);
    --bs-list-group-border-color: var(--app-dark-grid-border);
    --bs-list-group-action-color: var(--app-dark-text);
    --bs-list-group-action-hover-color: var(--app-dark-text-strong);
    --bs-list-group-action-hover-bg: var(--app-dark-panel-3);
    --bs-list-group-action-active-color: var(--app-dark-text-strong);
    --bs-list-group-action-active-bg: var(--app-dark-panel-4);
    --bs-list-group-active-color: #ffffff;
    --bs-list-group-active-bg: var(--app-dark-accent-2);
    --bs-list-group-active-border-color: var(--app-dark-accent-2);
    border-color: var(--app-dark-grid-border);
}

[data-bs-theme="dark"] .list-group-item {
    background-color: var(--bs-list-group-bg) !important;
    color: var(--bs-list-group-color) !important;
    border-color: var(--bs-list-group-border-color) !important;
}

[data-bs-theme="dark"] .list-group-item-primary {
    background-color: var(--app-dark-accent-soft) !important;
    color: #9dddf9 !important;
    border-color: #246277 !important;
}

[data-bs-theme="dark"] .list-group-item-secondary {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-muted) !important;
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] .list-group-item-success {
    background-color: var(--app-dark-success-bg) !important;
    color: var(--app-dark-success) !important;
    border-color: var(--app-dark-success-border) !important;
}

[data-bs-theme="dark"] .list-group-item-danger {
    background-color: var(--app-dark-danger-bg) !important;
    color: var(--app-dark-danger) !important;
    border-color: var(--app-dark-danger-border) !important;
}

[data-bs-theme="dark"] .list-group-item-warning {
    background-color: var(--app-dark-warning-bg) !important;
    color: var(--app-dark-warning) !important;
    border-color: var(--app-dark-warning-border) !important;
}

[data-bs-theme="dark"] .list-group-item-info {
    background-color: rgba(46, 185, 232, 0.12) !important;
    color: var(--app-dark-accent) !important;
    border-color: #246277 !important;
}

[data-bs-theme="dark"] .list-group-item-light {
    background-color: var(--app-dark-panel-2) !important;
    color: var(--app-dark-text-strong) !important;
    border-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .list-group-item-dark {
    background-color: #111923 !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

/* Palette-only legacy demo blocks that still carried hardcoded gray/blue fills. */
[data-bs-theme="dark"] .palette-demo-surface [style*="background-color: #2A2A2A"],
[data-bs-theme="dark"] .palette-demo-surface [style*="background-color:#2A2A2A"],
[data-bs-theme="dark"] [style*="background-color: #2A2A2A"],
[data-bs-theme="dark"] [style*="background-color:#2A2A2A"] {
    background-color: var(--app-dark-panel-2) !important;
}

[data-bs-theme="dark"] main .bg-panel .row[data-bs-theme="dark"] > .col-12 {
    background-color: var(--app-dark-panel-2) !important;
    border: 1px solid var(--app-dark-border-soft);
    border-radius: 6px;
}

[data-bs-theme="dark"] .palette-demo-surface .col-md-6[style*="background-color"] {
    background-color: var(--app-dark-panel-2) !important;
}

[data-bs-theme="dark"] input[type="date"].form-control {
    color-scheme: dark;
    background-color: var(--app-dark-input) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border) !important;
}

[data-bs-theme="dark"] input[type="date"].form-control:focus {
    border-color: var(--app-dark-accent-2) !important;
    box-shadow: none !important;
}

/*[data-bs-theme="dark"] a,*/
/*[data-bs-theme="dark"] .link-primary {*/
/*    color: #7ed7f4 !important;*/
/*}*/

[data-bs-theme="dark"] a:hover,
[data-bs-theme="dark"] .link-primary:hover {
    color: #a7e8fb !important;
}

[data-bs-theme="dark"] .link-secondary {
    color: #b7c5d0 !important;
}

[data-bs-theme="dark"] .link-success {
    color: var(--app-dark-success) !important;
}

[data-bs-theme="dark"] .link-danger {
    color: var(--app-dark-danger) !important;
}

[data-bs-theme="dark"] .link-warning {
    color: var(--app-dark-warning) !important;
}

[data-bs-theme="dark"] .link-info {
    color: var(--app-dark-accent) !important;
}

[data-bs-theme="dark"] .link-light,
[data-bs-theme="dark"] .link-dark,
[data-bs-theme="dark"] .link-body-emphasis {
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] input[type="date"].form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(92%) sepia(10%) saturate(290%) hue-rotate(170deg) brightness(105%) contrast(96%);
    opacity: 0.92;
}

[data-bs-theme="dark"] input[type="date"].form-control::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

[data-bs-theme="dark"] select.form-select {
    color-scheme: dark;
    accent-color: var(--app-dark-accent);
    background-color: var(--app-dark-input) !important;
    color: var(--app-dark-text) !important;
    border-color: var(--app-dark-border-soft) !important;
}

[data-bs-theme="dark"] select.form-select option {
    background-color: var(--app-dark-input) !important;
    color: var(--app-dark-text) !important;
    -webkit-text-fill-color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] select.form-select option:checked,
[data-bs-theme="dark"] select.form-select option[selected],
[data-bs-theme="dark"] select.form-select option[aria-selected="true"] {
    background-color: var(--app-dark-accent-soft) !important;
    color: var(--app-dark-accent) !important;
    -webkit-text-fill-color: var(--app-dark-accent) !important;
}

[data-bs-theme="dark"] select.form-select option:hover,
[data-bs-theme="dark"] select.form-select option:focus,
[data-bs-theme="dark"] select.form-select option:active,
[data-bs-theme="dark"] select.form-select option:checked:hover,
[data-bs-theme="dark"] select.form-select option[selected]:hover,
[data-bs-theme="dark"] select.form-select option[aria-selected="true"]:hover {
    background-color: var(--app-dark-hover) !important;
    box-shadow: 0 0 10px 100px var(--app-dark-hover) inset !important;
    color: var(--app-dark-text-strong) !important;
    -webkit-text-fill-color: var(--app-dark-text-strong) !important;
    text-decoration: none;
}

[data-bs-theme="dark"] select.form-select:focus > option:checked {
    background-color: var(--app-dark-accent-soft) !important;
    box-shadow: 0 0 10px 100px var(--app-dark-accent-soft) inset !important;
    color: var(--app-dark-accent) !important;
    -webkit-text-fill-color: var(--app-dark-accent) !important;
}

[data-bs-theme="dark"] select.form-select option:disabled {
    background: var(--app-dark-panel-3) !important;
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-muted) !important;
    -webkit-text-fill-color: var(--app-dark-muted) !important;
}

/* Form states: mixed(readonly + disabled) intentionally inherits disabled visuals. */
[data-bs-theme="dark"] .form-control[readonly]:not(:disabled),
[data-bs-theme="dark"] .form-select[readonly]:not(:disabled),
[data-bs-theme="dark"] textarea.form-control[readonly]:not(:disabled),
[data-bs-theme="dark"] input.form-control[readonly]:not(:disabled) {
    background-color: var(--app-dark-accent-soft) !important;
    border-color: #246277 !important;
    color: var(--app-dark-text-strong) !important;
    -webkit-text-fill-color: var(--app-dark-text-strong) !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-select:disabled,
[data-bs-theme="dark"] textarea.form-control:disabled,
[data-bs-theme="dark"] input.form-control:disabled {
    background-color: var(--app-dark-panel-2) !important;
    border-color: var(--app-dark-grid-border) !important;
    color: var(--app-dark-muted) !important;
    -webkit-text-fill-color: var(--app-dark-muted) !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .bootstrap-select:has(> select[readonly]:not(:disabled)) > .dropdown-toggle,
[data-bs-theme="dark"] .dropdown-toggle[aria-readonly="true"]:not(:disabled),
[data-bs-theme="dark"] .btn-group[aria-readonly="true"] > .btn:not(:disabled) {
    --bs-btn-color: var(--app-dark-text-strong);
    --bs-btn-bg: var(--app-dark-accent-soft);
    --bs-btn-border-color: #246277;
    --bs-btn-hover-color: var(--app-dark-text-strong);
    --bs-btn-hover-bg: var(--app-dark-accent-soft);
    --bs-btn-hover-border-color: #246277;
    background-color: var(--app-dark-accent-soft) !important;
    border-color: #246277 !important;
    color: var(--app-dark-text-strong) !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .bootstrap-select:has(> select:disabled) > .dropdown-toggle,
[data-bs-theme="dark"] .dropdown-toggle:disabled,
[data-bs-theme="dark"] .btn-group:has(.dropdown-toggle-split) > .btn:disabled {
    --bs-btn-disabled-color: var(--app-dark-muted);
    --bs-btn-disabled-bg: var(--app-dark-panel-2);
    --bs-btn-disabled-border-color: var(--app-dark-grid-border);
    background-color: var(--app-dark-panel-2) !important;
    border-color: var(--app-dark-grid-border) !important;
    color: var(--app-dark-muted) !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .calendar-wrapper:has(input[readonly]:not(:disabled)) .calendar-icon {
    opacity: 1 !important;
    filter: none !important;
}

[data-bs-theme="dark"] .calendar-wrapper:has(input:disabled) .calendar-icon {
    opacity: 0.45 !important;
    filter: grayscale(1) !important;
}

[data-bs-theme="dark"] .dropdown.bootstrap-select:has(> select[readonly]:not(:disabled)) > button.btn.dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select:has(> select[readonly]:not(:disabled)) > button.btn.dropdown-toggle,
[data-bs-theme="dark"] button.btn.dropdown-toggle[aria-readonly="true"]:not(:disabled),
[data-bs-theme="dark"] .btn-group[aria-readonly="true"] > button.btn:not(:disabled) {
    border-color: #246277 !important;
    border-top-color: #246277 !important;
    border-right-color: #246277 !important;
    border-bottom-color: #246277 !important;
    border-left-color: #246277 !important;
}

[data-bs-theme="dark"] .dropdown.bootstrap-select:has(> select:disabled) > button.btn.dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select:has(> select:disabled) > button.btn.dropdown-toggle,
[data-bs-theme="dark"] button.btn.dropdown-toggle:disabled,
[data-bs-theme="dark"] .btn-group:has(.dropdown-toggle-split) > button.btn:disabled {
    border-color: var(--app-dark-grid-border) !important;
    border-top-color: var(--app-dark-grid-border) !important;
    border-right-color: var(--app-dark-grid-border) !important;
    border-bottom-color: var(--app-dark-grid-border) !important;
    border-left-color: var(--app-dark-grid-border) !important;
}

[data-bs-theme="dark"] .native-select-size-hack-wrap {
    position: relative;
}

[data-bs-theme="dark"] select.native-select-size-hack.is-open {
    position: absolute;
    z-index: 1060;
    left: 0;
    right: 0;
    width: 100%;
}

[data-bs-theme="dark"] select.native-select-size-hack.is-open option {
    background-color: var(--app-dark-input) !important;
    box-shadow: none !important;
    color: var(--app-dark-text) !important;
    -webkit-text-fill-color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] select.native-select-size-hack.is-open option:hover,
[data-bs-theme="dark"] select.native-select-size-hack.is-open option:focus,
[data-bs-theme="dark"] select.native-select-size-hack.is-open option:active {
    background-color: var(--app-dark-hover) !important;
    box-shadow: 0 0 10px 100px var(--app-dark-hover) inset !important;
    color: var(--app-dark-text-strong) !important;
    -webkit-text-fill-color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] select.native-select-size-hack.is-open option:checked {
    background-color: var(--app-dark-accent-soft) !important;
    box-shadow: 0 0 10px 100px var(--app-dark-accent-soft) inset !important;
    color: var(--app-dark-accent) !important;
    -webkit-text-fill-color: var(--app-dark-accent) !important;
}

[data-bs-theme="dark"] .tooltip {
    --bs-tooltip-bg: var(--app-dark-panel-3);
    --bs-tooltip-color: var(--app-dark-text-strong);
    --bs-tooltip-opacity: 1;
    --bs-tooltip-max-width: 260px;
    --bs-tooltip-padding-x: 0.65rem;
    --bs-tooltip-padding-y: 0.35rem;
}

[data-bs-theme="dark"] .tooltip .tooltip-inner {
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border: 1px solid var(--app-dark-accent-2) !important;
    border-radius: 4px !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34) !important;
    text-align: left !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-top .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-arrow::before {
    border-left-color: var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-arrow::before {
    border-right-color: var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .input-custom-tooltip,
[data-bs-theme="dark"] .select-custom-tooltip {
    width: auto !important;
    max-width: 260px !important;
    min-width: 0 !important;
    background-color: var(--app-dark-panel-3) !important;
    color: var(--app-dark-text-strong) !important;
    border: 1px solid var(--app-dark-accent-2) !important;
    border-radius: 4px !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
    text-align: left !important;
}

[data-bs-theme="dark"] .input-custom-tooltip.is-placeholder {
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] .input-custom-tooltip.is-top::after,
[data-bs-theme="dark"] .select-custom-tooltip.is-top::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--app-dark-accent-2);
}

[data-bs-theme="dark"] .input-custom-tooltip.is-top::before,
[data-bs-theme="dark"] .select-custom-tooltip.is-top::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    z-index: 1;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--app-dark-panel-3);
}

[data-bs-theme="dark"] .input-custom-tooltip.is-bottom::after,
[data-bs-theme="dark"] .select-custom-tooltip.is-bottom::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -6px;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--app-dark-accent-2);
}

[data-bs-theme="dark"] .input-custom-tooltip.is-bottom::before,
[data-bs-theme="dark"] .select-custom-tooltip.is-bottom::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    z-index: 1;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--app-dark-panel-3);
}

[data-bs-theme="dark"] .palette-page-header {
    background-color: var(--app-dark-panel) !important;
    border-color: var(--app-dark-border-soft) !important;
    color: var(--app-dark-text) !important;
}

[data-bs-theme="dark"] .palette-page-title {
    color: var(--app-dark-text-strong) !important;
}

[data-bs-theme="dark"] .palette-page-description {
    color: var(--app-dark-muted) !important;
}

[data-bs-theme="dark"] .palette-theme-switch {
    --bs-btn-color: var(--app-dark-accent);
    --bs-btn-border-color: var(--app-dark-accent-2);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: var(--app-dark-accent-2);
    --bs-btn-hover-border-color: var(--app-dark-accent);
    --bs-btn-active-color: var(--app-dark-accent);
    --bs-btn-active-bg: var(--app-dark-accent-soft);
    --bs-btn-active-border-color: var(--app-dark-accent-2);
}

[data-bs-theme="dark"] .tooltip .tooltip-arrow::before {
    border-color: transparent !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-top .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: transparent !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: transparent !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-arrow::before {
    border-left-color: transparent !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-arrow::before {
    border-right-color: transparent !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-top .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-top .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 1px;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--app-dark-panel-3);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 1px;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--app-dark-panel-3);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-arrow::before {
    border-left-color: var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-arrow::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1px;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid var(--app-dark-panel-3);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-arrow::before {
    border-right-color: var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-arrow::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 1px;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid var(--app-dark-panel-3);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-top .tooltip-arrow,
[data-bs-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-arrow,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow {
    width: 12px !important;
    height: 6px !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-arrow,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-arrow,
[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-arrow,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-arrow,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-arrow,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-arrow {
    width: 6px !important;
    height: 12px !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-top .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    top: 0 !important;
    left: 0 !important;
    border-width: 6px 6px 0 6px !important;
    border-color: var(--app-dark-accent-2) transparent transparent transparent !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-top .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::after {
    top: 0 !important;
    left: 1px !important;
    bottom: auto !important;
    transform: none !important;
    border-width: 5px 5px 0 5px !important;
    border-color: var(--app-dark-panel-3) transparent transparent transparent !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    bottom: 0 !important;
    left: 0 !important;
    border-width: 0 6px 6px 6px !important;
    border-color: transparent transparent var(--app-dark-accent-2) transparent !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::after {
    top: auto !important;
    bottom: 0 !important;
    left: 1px !important;
    transform: none !important;
    border-width: 0 5px 5px 5px !important;
    border-color: transparent transparent var(--app-dark-panel-3) transparent !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-arrow::before {
    top: 0 !important;
    left: 0 !important;
    border-width: 6px 0 6px 6px !important;
    border-color: transparent transparent transparent var(--app-dark-accent-2) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-arrow::after {
    top: 1px !important;
    right: auto !important;
    left: 0 !important;
    transform: none !important;
    border-width: 5px 0 5px 5px !important;
    border-color: transparent transparent transparent var(--app-dark-panel-3) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-arrow::before {
    top: 0 !important;
    right: 0 !important;
    border-width: 6px 6px 6px 0 !important;
    border-color: transparent var(--app-dark-accent-2) transparent transparent !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-arrow::after {
    top: 1px !important;
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    border-width: 5px 5px 5px 0 !important;
    border-color: transparent var(--app-dark-panel-3) transparent transparent !important;
}

[data-bs-theme="dark"] .tooltip .tooltip-arrow::before,
[data-bs-theme="dark"] .tooltip .tooltip-arrow::after {
    display: none !important;
}

[data-bs-theme="dark"] .tooltip .tooltip-inner {
    position: relative;
    --tooltip-arrow-safe-offset: clamp(12px, 25%, calc(100% - 18px));
    --tooltip-arrow-safe-offset-inner: clamp(13px, calc(25% + 1px), calc(100% - 18px));
    --tooltip-arrow-top-x: clamp(18px, 75%, calc(100% - 18px));
    --tooltip-arrow-top-x-inner: clamp(19px, calc(75% + 1px), calc(100% - 18px));
    --tooltip-arrow-bottom-x: clamp(18px, 25%, calc(100% - 18px));
    --tooltip-arrow-bottom-x-inner: clamp(19px, calc(25% + 1px), calc(100% - 18px));
    --tooltip-arrow-x: var(--tooltip-arrow-top-x);
    --tooltip-arrow-x-inner: var(--tooltip-arrow-top-x-inner);
    --tooltip-arrow-y: clamp(18px, 50%, calc(100% - 18px));
    --tooltip-arrow-y-inner: clamp(19px, calc(50% + 1px), calc(100% - 18px));
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-top .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-inner::before {
    content: "";
    position: absolute;
    left: var(--tooltip-arrow-x);
    bottom: -6px;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--app-dark-accent-2);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-top .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-inner::after {
    content: "";
    position: absolute;
    left: var(--tooltip-arrow-x-inner);
    bottom: -4px;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--app-dark-panel-3);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-inner::before {
    content: "";
    position: absolute;
    left: var(--tooltip-arrow-bottom-x);
    right: auto;
    top: -6px;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--app-dark-accent-2);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-inner::after {
    content: "";
    position: absolute;
    left: var(--tooltip-arrow-bottom-x-inner);
    right: auto;
    top: -4px;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--app-dark-panel-3);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-inner::before {
    content: "";
    position: absolute;
    top: 12px;
    right: -6px;
    transform: none;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid var(--app-dark-accent-2);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-inner::after {
    content: "";
    position: absolute;
    top: 13px;
    right: -4px;
    transform: none;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid var(--app-dark-panel-3);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-inner::before {
    content: "";
    position: absolute;
    top: 12px;
    left: -6px;
    transform: none;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid var(--app-dark-accent-2);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-inner::after {
    content: "";
    position: absolute;
    top: 13px;
    left: -4px;
    transform: none;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid var(--app-dark-panel-3);
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-inner::before {
    top: var(--tooltip-arrow-y) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-start .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-left .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="start"] .tooltip-inner::after {
    top: var(--tooltip-arrow-y-inner) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-inner::before,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-inner::before {
    top: var(--tooltip-arrow-y) !important;
}

[data-bs-theme="dark"] .tooltip.bs-tooltip-end .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-right .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-inner::after,
[data-bs-theme="dark"] .tooltip.bs-tooltip-auto[data-popper-placement^="end"] .tooltip-inner::after {
    top: var(--tooltip-arrow-y-inner) !important;
}

/* Final dark state contrast pass. Readonly must read differently from disabled. */
[data-bs-theme="dark"] .form-control[readonly]:not(:disabled),
[data-bs-theme="dark"] .form-select[readonly]:not(:disabled),
[data-bs-theme="dark"] textarea.form-control[readonly]:not(:disabled),
[data-bs-theme="dark"] input.form-control[readonly]:not(:disabled) {
    background-color: var(--app-dark-panel-2) !important;
    border-color: var(--app-dark-grid-border) !important;
    color: var(--app-dark-muted) !important;
    -webkit-text-fill-color: var(--app-dark-muted) !important;
    opacity: 1 !important;
    cursor: text !important;
}

[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-select:disabled,
[data-bs-theme="dark"] textarea.form-control:disabled,
[data-bs-theme="dark"] input.form-control:disabled {
    background-color: #0d141b !important;
    border-color: #26323c !important;
    color: #667784 !important;
    -webkit-text-fill-color: #667784 !important;
    opacity: 1 !important;
    cursor: text !important;
}

[data-bs-theme="dark"] textarea.form-control:read-only,
[data-bs-theme="dark"] input.form-control:read-only {
    background-color: var(--app-dark-panel-2) !important;
    border-color: var(--app-dark-grid-border) !important;
    color: var(--app-dark-muted) !important;
    -webkit-text-fill-color: var(--app-dark-muted) !important;
    opacity: 1 !important;
    cursor: text !important;
}

[data-bs-theme="dark"] .dropdown.bootstrap-select:has(> select[readonly]:not(:disabled)) > button.btn.dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select:has(> select[readonly]:not(:disabled)) > button.btn.dropdown-toggle,
[data-bs-theme="dark"] button.btn.dropdown-toggle[aria-readonly="true"]:not(:disabled),
[data-bs-theme="dark"] .btn-group[aria-readonly="true"] > button.btn:not(:disabled) {
    --bs-btn-color: #f4fbff;
    --bs-btn-bg: #12384a;
    --bs-btn-border-color: #43c9f4;
    --bs-btn-hover-color: #f4fbff;
    --bs-btn-hover-bg: #12384a;
    --bs-btn-hover-border-color: #43c9f4;
    background-color: #12384a !important;
    border-color: #43c9f4 !important;
    color: #f4fbff !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .dropdown.bootstrap-select:has(> select:disabled) > button.btn.dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select:has(> select:disabled) > button.btn.dropdown-toggle,
[data-bs-theme="dark"] .dropdown.bootstrap-select.disabled > button.btn.dropdown-toggle,
[data-bs-theme="dark"] .bootstrap-select.disabled > button.btn.dropdown-toggle,
[data-bs-theme="dark"] button.btn.dropdown-toggle.disabled,
[data-bs-theme="dark"] button.btn.dropdown-toggle[aria-disabled="true"],
[data-bs-theme="dark"] button.btn.dropdown-toggle:disabled,
[data-bs-theme="dark"] .btn-group:has(.dropdown-toggle-split) > button.btn:disabled {
    --bs-btn-disabled-color: #667784;
    --bs-btn-disabled-bg: #0d141b;
    --bs-btn-disabled-border-color: #26323c;
    background-color: #0d141b !important;
    border-color: #26323c !important;
    border-top-color: #26323c !important;
    border-right-color: #26323c !important;
    border-bottom-color: #26323c !important;
    border-left-color: #26323c !important;
    color: #667784 !important;
    -webkit-text-fill-color: #667784 !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .dropdown.bootstrap-select:has(> select:disabled) > button.btn.dropdown-toggle *,
[data-bs-theme="dark"] .bootstrap-select:has(> select:disabled) > button.btn.dropdown-toggle *,
[data-bs-theme="dark"] .dropdown.bootstrap-select.disabled > button.btn.dropdown-toggle *,
[data-bs-theme="dark"] .bootstrap-select.disabled > button.btn.dropdown-toggle *,
[data-bs-theme="dark"] button.btn.dropdown-toggle.disabled *,
[data-bs-theme="dark"] button.btn.dropdown-toggle[aria-disabled="true"] *,
[data-bs-theme="dark"] button.btn.dropdown-toggle:disabled * {
    color: #667784 !important;
    -webkit-text-fill-color: #667784 !important;
}

[data-bs-theme="dark"] .dropdown.bootstrap-select:has(> select:disabled) .filter-option-inner-inner,
[data-bs-theme="dark"] .bootstrap-select:has(> select:disabled) .filter-option-inner-inner,
[data-bs-theme="dark"] .dropdown.bootstrap-select.disabled .filter-option-inner-inner,
[data-bs-theme="dark"] .bootstrap-select.disabled .filter-option-inner-inner {
    color: #667784 !important;
    -webkit-text-fill-color: #667784 !important;
}

/* Disabled radios/checks/switches must not look active in dark mode. */
[data-bs-theme="dark"] .form-check-input:disabled {
    background-color: #0d141b !important;
    border-color: #52616d !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .form-check-input:checked:disabled {
    background-color: #26323c !important;
    border-color: #667784 !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .form-check-input[type="radio"]:checked:disabled::after {
    background-color: #8d9ca8 !important;
}

[data-bs-theme="dark"] .form-check-input[type="radio"]:checked:disabled {
    background-color: #26323c !important;
    border-color: #667784 !important;
}

[data-bs-theme="dark"] input.form-check-input[type="checkbox"]:checked:disabled {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'%3E%3Cpath fill='none' stroke='%238d9ca8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8.5l2.5 2.5l5.5 -5.5'/%3E%3C/svg%3E") !important;
}

[data-bs-theme="dark"] input.form-check-input[role="switch"]:disabled {
    background-color: #0d141b !important;
    border: 1px solid #52616d !important;
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23667784'/%3e%3c/svg%3e") !important;
    background-image: var(--bs-form-switch-bg) !important;
}

[data-bs-theme="dark"] input.form-check-input[role="switch"]:checked:disabled {
    background-color: #26323c !important;
    border-color: #667784 !important;
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%238d9ca8'/%3e%3c/svg%3e") !important;
    background-image: var(--bs-form-switch-bg) !important;
}

[data-bs-theme="dark"] .form-check-input:disabled + .form-check-label {
    color: #667784 !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] :disabled,
[data-bs-theme="dark"] .disabled,
[data-bs-theme="dark"] [aria-disabled="true"],
[data-bs-theme="dark"] .bootstrap-select:has(> select:disabled) > .dropdown-toggle,
[data-bs-theme="dark"] .calendar-wrapper:has(input:disabled) .calendar-icon,
[data-bs-theme="dark"] .form-check-input:disabled + .form-check-label {
    cursor: not-allowed !important;
}

[data-bs-theme="dark"] .btn:disabled,
[data-bs-theme="dark"] .btn.disabled,
[data-bs-theme="dark"] .dropdown-item.disabled,
[data-bs-theme="dark"] .dropdown-item[aria-disabled="true"],
[data-bs-theme="dark"] .bootstrap-select:has(> select:disabled) > .dropdown-toggle {
    pointer-events: auto !important;
    cursor: not-allowed !important;
}
