﻿[data-bs-theme="dark"] body,
[data-bs-theme="dark"] html {
    background-color: #181a1b !important;
    color: #f1f1f1 !important;
}

    [data-bs-theme="dark"] body::before {
        opacity: 0.08 !important;
    }

[data-bs-theme="dark"] a.navbar-brand,
[data-bs-theme="dark"] .navbar-nav .nav-link {
    color: #7abaff !important;
}

    [data-bs-theme="dark"] a:hover,
    [data-bs-theme="dark"] .navbar-nav .nav-link:hover,
    [data-bs-theme="dark"] .navbar-nav .nav-link:focus {
        color: #fff !important;
        background: #22304a !important;
    }

[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] .footer,
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #23272b !important;
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom {
    border-color: #444 !important;
}

[data-bs-theme="dark"] .box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0,0,0,.25) !important;
}

[data-bs-theme="dark"] .bg-primary-subtle {
    background-color: #22304a !important;
}

[data-bs-theme="dark"] .card-title {
    color: #b8d1f3 !important;
}

[data-bs-theme="dark"] span.text-muted {
    color: #b8b8b8 !important;
}

/*************** jquery datatable **********************/

[data-bs-theme="dark"] .table thead th {
    background-color: #23272b !important;
    color: #fff !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .table tbody tr:not(:last-child) td {
    border-bottom: 1px solid #444 !important;
}

/*************** select2 **********************/

[data-bs-theme="dark"] .select2-dropdown {
    background-color: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .select2-results__option {
    color: #f1f1f1 !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .select2-results__option--highlighted[aria-selected],
[data-bs-theme="dark"] .select2-results__option--highlighted {
    background-color: #1b6ec2 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-results__option[aria-selected="true"] {
    background-color: #22304a !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field {
    background-color: #181a1b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #23272b !important;
    color: #f1f1f1 !important;
    border: 1px solid #444 !important;
}

    [data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
    [data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__rendered {
        color: #f1f1f1 !important;
    }

    [data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder,
    [data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
        color: #aaa !important;
    }

    [data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
        background-color: #1b6ec2 !important;
        color: #fff !important;
        border: none !important;
    }

    [data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
        color: #fff !important;
        background: transparent !important;
        border: none !important;
        opacity: 0.7;
    }

        [data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
            color: #ffb4b4 !important;
            background: transparent !important;
            opacity: 1;
        }


[data-bs-theme="dark"] .select2-container--default .select2-selection--single {
    background-color: #181a1b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}


/*************** nav bar **********************/

[data-bs-theme="dark"] .profile-icon {
    background-color: #ee7623 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .navbar-toggler .bar {
    background-color: #fff;
}

[data-bs-theme="dark"] #themeToggle {
    background-color: #23272b !important;
    border-color: #444 !important;
    color: #f1f1f1 !important;
}

    [data-bs-theme="dark"] #themeToggle:hover,
    [data-bs-theme="dark"] #themeToggle:focus {
        background-color: #343a40 !important;
        color: #fff !important;
        border-color: #666 !important;
    }

    [data-bs-theme="dark"] #themeToggle .fa-moon,
    [data-bs-theme="dark"] #themeToggle .fa-sun {
        color: #f1f1f1 !important;
    }


[data-bs-theme="dark"] .nav-pills .nav-link {
    color: #b8d1f3 !important;
    background-color: transparent !important;
}

    [data-bs-theme="dark"] .nav-pills .nav-link.active,
    [data-bs-theme="dark"] .nav-pills .show > .nav-link {
        color: #fff !important;
        background-color: #1b6ec2 !important;
        border-color: #1861ac !important;
    }

/*************** bootstrap modal **********************/

[data-bs-theme="dark"] .modal-content {
    background-color: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    background-color: #181a1b !important;
    border-color: #333 !important;
}

[data-bs-theme="dark"] .modal-title {
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/*************** alumni profile **********************/

[data-bs-theme="dark"] .timeline-item {
    border-left: 2px solid #333846 !important;
}

    [data-bs-theme="dark"] .timeline-item::before {
        background-color: #7abaff !important;
    }

    [data-bs-theme="dark"] .timeline-item .badge {
        background-color: #23272b !important;
        color: #f1f1f1 !important;
        border: 1px solid #444 !important;
    }

[data-bs-theme="dark"] .profile-image-wrapper {
    background-color: transparent !important;
}

/*************** country-select **********************/

[data-bs-theme="dark"] .country-select,
[data-bs-theme="dark"] .country-select .country-list,
[data-bs-theme="dark"] .country-select.inside .flag-dropdown {
    background-color: #181a1b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

/*************** ui-autocomplete **********************/

[data-bs-theme="dark"] .ui-autocomplete {
    background-color: #181a1b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .ui-menu-item {
    border-bottom: 1px solid #444 !important;
    color: #f1f1f1 !important;
    background-color: transparent !important;
}

    [data-bs-theme="dark"] .ui-menu-item:hover {
        background-color: #1b6ec2 !important;
        color: #fff !important;
    }

/*************** smart wizard **********************/

[data-bs-theme="dark"] {
    --sw-border-color: #444;
    --sw-toolbar-btn-color: #fff;
    --sw-toolbar-btn-background-color: #1b6ec2;
    --sw-anchor-default-primary-color: #fff;
    --sw-anchor-default-secondary-color: #888;
    --sw-anchor-active-primary-color: #fff;
    --sw-anchor-active-secondary-color: #1b6ec2;
    --sw-anchor-done-primary-color: #23272b;
    --sw-anchor-done-secondary-color: #23272b;
    --sw-anchor-disabled-primary-color: #444;
    --sw-anchor-disabled-secondary-color: #888;
    --sw-anchor-error-primary-color: #ff6b6b;
    --sw-anchor-error-secondary-color: #23272b;
    --sw-anchor-warning-primary-color: #ffc107;
    --sw-anchor-warning-secondary-color: #23272b;
    --sw-progress-color: #1b6ec2;
    --sw-progress-background-color: #23272b;
    --sw-loader-color: #1b6ec2;
    --sw-loader-background-color: #23272b;
    --sw-loader-background-wrapper-color: rgba(24, 26, 27, 0.7);
}

    /**************** dropdown input group ********************/
    [data-bs-theme="dark"] .dropdown.input-group .dropdown-menu {
        background-color: #23272b !important;
        color: #f1f1f1 !important;
        border-color: #444 !important;
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.2);
    }

    [data-bs-theme="dark"] .dropdown.input-group .dropdown-item {
        color: #f1f1f1 !important;
        background-color: transparent !important;
    }

        [data-bs-theme="dark"] .dropdown.input-group .dropdown-item:hover,
        [data-bs-theme="dark"] .dropdown.input-group .dropdown-item:focus,
        [data-bs-theme="dark"] .dropdown.input-group .dropdown-item.active {
            background-color: #1b6ec2 !important;
            color: #fff !important;
        }

    [data-bs-theme="dark"] .dropdown.input-group .btn,
    [data-bs-theme="dark"] .dropdown.input-group .btn-outline-secondary {
        background-color: #23272b !important;
        color: #f1f1f1 !important;
        border-color: #444 !important;
    }

        [data-bs-theme="dark"] .dropdown.input-group .btn:hover,
        [data-bs-theme="dark"] .dropdown.input-group .btn:focus,
        [data-bs-theme="dark"] .dropdown.input-group .btn-outline-secondary:hover,
        [data-bs-theme="dark"] .dropdown.input-group .btn-outline-secondary:focus {
            background-color: #1b6ec2 !important;
            color: #fff !important;
            border-color: #1861ac !important;
        }

/****************** filepond ***************************/
[data-bs-theme="dark"] {
    /* FilePond root background and text */
    --filepond-background-color: #23272b;
    --filepond-drop-label-color: #b8d1f3;
    --filepond-color-primary: #1b6ec2;
    --filepond-color-primary-hover: #1861ac;
    --filepond-color-error: #ff6b6b;
    --filepond-color-success: #22c55e;
    --filepond-border-color: #444;
    --filepond-label-color: #f1f1f1;
    --filepond-panel-background-color: #23272b;
    --filepond-panel-border-color: #444;
    --filepond-item-panel-background-color: #181a1b;
    --filepond-item-panel-hover-background-color: #1b6ec2;
    --filepond-file-action-button-color: #b8d1f3;
    --filepond-file-action-button-color-hover: #fff;
    --filepond-file-action-button-background: transparent;
    --filepond-file-action-button-background-hover: #1b6ec2;
    --filepond-file-info-color: #b8d1f3;
    --filepond-file-size-color: #aaa;
    --filepond-file-status-color: #b8d1f3;
    --filepond-file-status-success-color: #22c55e;
    --filepond-file-status-error-color: #ff6b6b;
    --filepond-file-status-processing-color: #1b6ec2;
}

    /* Fallback for FilePond elements that don't use variables */
    [data-bs-theme="dark"] .filepond--root,
    [data-bs-theme="dark"] .filepond--panel-root {
        background-color: #23272b !important;
        color: #f1f1f1 !important;
        border-color: #444 !important;
    }

    [data-bs-theme="dark"] .filepond--drop-label {
        color: #b8d1f3 !important;
    }

    [data-bs-theme="dark"] .filepond--file-action-button {
        color: #b8d1f3 !important;
    }

        [data-bs-theme="dark"] .filepond--file-action-button:hover,
        [data-bs-theme="dark"] .filepond--file-action-button:focus {
            color: #fff !important;
            background: #1b6ec2 !important;
        }

    [data-bs-theme="dark"] .filepond--file-info {
        color: #b8d1f3 !important;
    }

    [data-bs-theme="dark"] .filepond--file-status {
        color: #b8d1f3 !important;
    }

/***************** btn-secondary and btn-light ***************************/
[data-bs-theme="dark"] .btn-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
    border-color: #6c757d !important;
}

    [data-bs-theme="dark"] .btn-secondary:hover,
    [data-bs-theme="dark"] .btn-secondary:focus {
        background-color: transparent !important;
        color: #fff !important;
        border-color: #6c757d !important;
    }

[data-bs-theme="dark"] .btn-outline-secondary {
    color: #6c757d !important;
    border-color: #6c757d !important;
    background-color: transparent !important;
}

    [data-bs-theme="dark"] .btn-outline-secondary:hover,
    [data-bs-theme="dark"] .btn-outline-secondary:focus {
        color: #fff !important;
        background-color: #6c757d !important;
        border-color: #6c757d !important;
    }

[data-bs-theme="dark"] .btn-light {
    color: #23272b !important;
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
}

    [data-bs-theme="dark"] .btn-light:hover,
    [data-bs-theme="dark"] .btn-light:focus {
        color: #fff !important;
        background-color: transparent !important;
        border-color: #f8f9fa !important;
    }

[data-bs-theme="dark"] .btn-outline-light {
    color: #f8f9fa !important;
    border-color: #f8f9fa !important;
    background-color: transparent !important;
}

    [data-bs-theme="dark"] .btn-outline-light:hover,
    [data-bs-theme="dark"] .btn-outline-light:focus {
        color: #23272b !important;
        background-color: #f8f9fa !important;
        border-color: #f8f9fa !important;
    }

/************************ jquery-confirm **************************************/
[data-bs-theme="dark"] .jconfirm {
    background: rgba(24,26,27,0.95) !important;
    color: #f1f1f1 !important;
}

    [data-bs-theme="dark"] .jconfirm .jconfirm-box {
        background: #23272b !important;
        color: #f1f1f1 !important;
        border: 1px solid #444 !important;
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.5) !important;
    }

    [data-bs-theme="dark"] .jconfirm .jconfirm-title {
        color: #b8d1f3 !important;
    }

    [data-bs-theme="dark"] .jconfirm .jconfirm-content {
        color: #f1f1f1 !important;
    }

    [data-bs-theme="dark"] .jconfirm .jconfirm-buttons button,
    [data-bs-theme="dark"] .jconfirm .jconfirm-buttons .btn {
        background-color: #23272b !important;
        color: #b8d1f3 !important;
        border: 1px solid #444 !important;
        transition: background 0.2s, color 0.2s;
    }

        [data-bs-theme="dark"] .jconfirm .jconfirm-buttons button:hover,
        [data-bs-theme="dark"] .jconfirm .jconfirm-buttons .btn:hover,
        [data-bs-theme="dark"] .jconfirm .jconfirm-buttons button:focus,
        [data-bs-theme="dark"] .jconfirm .jconfirm-buttons .btn:focus {
            background-color: #1b6ec2 !important;
            color: #fff !important;
            border-color: #1861ac !important;
        }

    [data-bs-theme="dark"] .jconfirm .jconfirm-closeIcon {
        filter: invert(1) grayscale(100%) brightness(200%);
    }

/****************** telephone input ***************************/
[data-bs-theme="dark"] .iti__country-list {
    background-color: #181a1b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .iti__country.iti__highlight {
    background-color: #1b6ec2 !important;
    color: #fff !important;
}

/****************** captcha image ***************************/
    [data-bs-theme="dark"] .captcha-img {
        background-color: #222 !important;
        border-color: #495057 !important;
        filter: invert(1) hue-rotate(180deg); /* Invert for dark backgrounds if captcha is black text on white */
    }


/********************** carousel caption *********************************/
    [data-bs-theme="dark"] .carousel-caption {
        background-color: rgba(255, 255, 255, 0.5) !important;
    }

/************* background inversion ****************/
[data-bs-theme="dark"] .bg-white{
    background-color: #23272b !important;
    color: #f1f1f1 !important;
}

[data-bs-theme="dark"] .bg-warning-subtle {
    background-color: #4a3b00 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .payment-card {
    background-color: #23272b !important;
    color: #f1f1f1 !important;
    border: 1px solid #444 !important;
}

[data-bs-theme="dark"] input[type="radio"]:checked + .payment-card {
    border-color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.5);
    background: #e7f1ff;
}

[data-bs-theme="dark"] .text-dark {
    color: #f1f1f1 !important; /* or #fff for pure white */
}