/* FILE: v2/assets/css/dark-mode.css */
/* Fail overrides untuk tema gelap MAREOS V2 */

[data-bs-theme="dark"] body {
    background-color: #121212 !important;
    color: #e0e0e0;
}

/* Override kelas statik bg-white / bg-light / bg-body */
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-body {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2b2b2b !important;
    color: #e0e0e0 !important;
}

/* Card overrides */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-body,
[data-bs-theme="dark"] .card-footer {
    background-color: #1e1e1e !important;
    border-color: #2d2d2d !important;
    color: #e0e0e0 !important;
}

/* Form controls & Input groups */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
    background-color: #2b2b2b !important;
    color: #e0e0e0 !important;
    border-color: #3d3d3d !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #333333 !important;
    color: #ffffff !important;
    border-color: #0d6efd !important;
}

/* Text overrides */
[data-bs-theme="dark"] .text-dark {
    color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-secondary {
    color: #a0a0a0 !important;
}
[data-bs-theme="dark"] .text-black-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Footer override */
[data-bs-theme="dark"] footer.bg-white {
    background-color: #1a1d20 !important;
    border-top-color: #2d2d2d !important;
}

/* Select2 Dark Mode Override (Bootstrap 5 theme & Generic) */
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection,
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #2b2b2b !important;
    color: #e0e0e0 !important;
    border-color: #3d3d3d !important;
}
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown,
[data-bs-theme="dark"] .select2-dropdown {
    background-color: #1e1e1e !important;
    border-color: #3d3d3d !important;
}
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-search__field,
[data-bs-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #2b2b2b !important;
    color: #e0e0e0 !important;
    border-color: #3d3d3d !important;
}
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option,
[data-bs-theme="dark"] .select2-results__option {
    color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected],
[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option[aria-selected=true],
[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #333333 !important;
    color: #ffffff !important;
}

/* DataTables Overrides */
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background-color: #2b2b2b !important;
    color: #e0e0e0 !important;
    border-color: #3d3d3d !important;
}
[data-bs-theme="dark"] table.dataTable {
    border-color: #2d2d2d !important;
}
[data-bs-theme="dark"] table.dataTable td,
[data-bs-theme="dark"] table.dataTable th {
    border-color: #2d2d2d !important;
}
[data-bs-theme="dark"] .page-link {
    background-color: #2b2b2b !important;
    border-color: #3d3d3d !important;
    color: #0d6efd !important;
}

/* SweetAlert2 Overrides */
[data-bs-theme="dark"] .swal2-popup {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .swal2-title,
[data-bs-theme="dark"] .swal2-html-container {
    color: #e0e0e0 !important;
}

/* Loading overlay override */
[data-bs-theme="dark"] #overlay {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}
