[data-bs-theme="dark"], body.dark-mode {
    --primary-light: rgba(26,115,232,0.15);
    --secondary: #adb5bd;
    --dark: #e9ecef;
    --light: #22252b;
}

[data-bs-theme="dark"] body,
body.dark-mode {
    background: #1a1a2e;
    color: #cfd8e3;
}

[data-bs-theme="dark"] .page-title,
body.dark-mode .page-title {
    color: #e9ecef;
}

[data-bs-theme="dark"] .page-title small,
body.dark-mode .page-title small {
    color: #6c757d;
}

[data-bs-theme="dark"] .card,
body.dark-mode .card {
    background: #16213e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

[data-bs-theme="dark"] .card-header,
body.dark-mode .card-header {
    background: #16213e;
    border-color: #2a3a5e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .card-body,
body.dark-mode .card-body {
    color: #cfd8e3;
}

[data-bs-theme="dark"] .card-footer,
body.dark-mode .card-footer {
    background: #16213e;
    border-color: #2a3a5e;
}

[data-bs-theme="dark"] .card-title,
body.dark-mode .card-title {
    color: #e9ecef;
}

[data-bs-theme="dark"] footer.main-footer,
body.dark-mode footer.main-footer {
    background: #16213e;
    color: #adb5bd;
    border-color: #2a3a5e;
}

[data-bs-theme="dark"] .table,
body.dark-mode .table {
    color: #cfd8e3;
}

[data-bs-theme="dark"] .table > :not(caption) > * > *,
body.dark-mode .table > :not(caption) > * > * {
    border-color: #2a3a5e;
}

[data-bs-theme="dark"] .table thead th,
body.dark-mode .table thead th {
    color: #adb5bd;
    border-color: #2a3a5e;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover,
body.dark-mode .table-hover tbody tr:hover {
    background-color: rgba(26,115,232,0.08);
}

[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd),
body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255,255,255,0.03);
}

[data-bs-theme="dark"] .table-light,
body.dark-mode .table-light {
    background: #1a2744;
    color: #cfd8e3;
}

[data-bs-theme="dark"] .form-control,
body.dark-mode .form-control {
    background: #1a2744;
    border-color: #2a3a5e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control:focus,
body.dark-mode .form-control:focus {
    background: #1a2744;
    border-color: var(--primary);
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control::placeholder,
body.dark-mode .form-control::placeholder {
    color: #6c757d;
}

[data-bs-theme="dark"] .form-select,
body.dark-mode .form-select {
    background: #1a2744;
    border-color: #2a3a5e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .input-group-text,
body.dark-mode .input-group-text {
    background: #1a2744;
    border-color: #2a3a5e;
    color: #adb5bd;
}

[data-bs-theme="dark"] .form-label,
body.dark-mode .form-label {
    color: #cfd8e3;
}

[data-bs-theme="dark"] .btn-light,
body.dark-mode .btn-light {
    background: #2a3a5e;
    border-color: #3a4a6e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .btn-light:hover,
body.dark-mode .btn-light:hover {
    background: #3a4a6e;
}

[data-bs-theme="dark"] .btn-outline-primary,
body.dark-mode .btn-outline-primary {
    border-color: var(--primary);
    color: #66a4ff;
}

[data-bs-theme="dark"] .btn-outline-primary:hover,
body.dark-mode .btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

[data-bs-theme="dark"] .modal-content,
body.dark-mode .modal-content {
    background: #16213e;
    border-color: #2a3a5e;
}

[data-bs-theme="dark"] .modal-header,
body.dark-mode .modal-header {
    border-color: #2a3a5e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .modal-footer,
body.dark-mode .modal-footer {
    border-color: #2a3a5e;
}

[data-bs-theme="dark"] .modal-backdrop.show,
body.dark-mode .modal-backdrop.show {
    opacity: 0.7;
}

[data-bs-theme="dark"] .dropdown-menu,
body.dark-mode .dropdown-menu {
    background: #16213e;
    border-color: #2a3a5e;
}

[data-bs-theme="dark"] .dropdown-item,
body.dark-mode .dropdown-item {
    color: #cfd8e3;
}

[data-bs-theme="dark"] .dropdown-item:hover,
body.dark-mode .dropdown-item:hover {
    background: rgba(26,115,232,0.15);
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-header,
body.dark-mode .dropdown-header {
    color: #adb5bd;
}

[data-bs-theme="dark"] .dropdown-divider,
body.dark-mode .dropdown-divider {
    border-color: #2a3a5e;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input,
body.dark-mode .dataTables_wrapper .dataTables_filter input {
    background: #1a2744;
    border-color: #2a3a5e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select,
body.dark-mode .dataTables_wrapper .dataTables_length select {
    background: #1a2744;
    border-color: #2a3a5e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .dataTables_info,
body.dark-mode .dataTables_info {
    color: #adb5bd;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button,
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection,
body.dark-mode .select2-container--bootstrap-5 .select2-selection {
    background: #1a2744;
    border-color: #2a3a5e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
body.dark-mode .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #e9ecef;
}

[data-bs-theme="dark"] .select2-dropdown,
body.dark-mode .select2-dropdown {
    background: #16213e;
    border-color: #2a3a5e;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option,
body.dark-mode .select2-container--bootstrap-5 .select2-results__option {
    color: #cfd8e3;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted,
body.dark-mode .select2-container--bootstrap-5 .select2-results__option--highlighted {
    background: rgba(26,115,232,0.2);
    color: #fff;
}

[data-bs-theme="dark"] .nav-tabs .nav-link,
body.dark-mode .nav-tabs .nav-link {
    color: #adb5bd;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover,
body.dark-mode .nav-tabs .nav-link:hover {
    color: #e9ecef;
    background: rgba(26,115,232,0.1);
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active,
body.dark-mode .nav-tabs .nav-link.active {
    color: var(--primary);
}

[data-bs-theme="dark"] .list-group-item,
body.dark-mode .list-group-item {
    background: #16213e;
    border-color: #2a3a5e;
    color: #cfd8e3;
}

[data-bs-theme="dark"] .alert-success,
body.dark-mode .alert-success {
    background: rgba(40,167,69,0.2);
    color: #75d787;
}

[data-bs-theme="dark"] .alert-danger,
body.dark-mode .alert-danger {
    background: rgba(220,53,69,0.2);
    color: #f08080;
}

[data-bs-theme="dark"] .alert-warning,
body.dark-mode .alert-warning {
    background: rgba(255,193,7,0.2);
    color: #ffd700;
}

[data-bs-theme="dark"] .alert-info,
body.dark-mode .alert-info {
    background: rgba(23,162,184,0.2);
    color: #5bc0de;
}

[data-bs-theme="dark"] .badge-draft,
body.dark-mode .badge-draft {
    background: #2a3a5e;
    color: #adb5bd;
}

[data-bs-theme="dark"] .badge-sent,
body.dark-mode .badge-sent {
    background: rgba(0,123,255,0.2);
    color: #66a4ff;
}

[data-bs-theme="dark"] .badge-validated,
body.dark-mode .badge-validated {
    background: rgba(40,167,69,0.2);
    color: #75d787;
}

[data-bs-theme="dark"] .badge-pending,
body.dark-mode .badge-pending {
    background: rgba(255,193,7,0.2);
    color: #ffd700;
}

[data-bs-theme="dark"] .badge-rejected,
body.dark-mode .badge-rejected {
    background: rgba(220,53,69,0.2);
    color: #f08080;
}

[data-bs-theme="dark"] .profile-info-card,
body.dark-mode .profile-info-card {
    background: #16213e;
}

[data-bs-theme="dark"] .profile-info-card .info-label,
body.dark-mode .profile-info-card .info-label {
    color: #adb5bd;
}

[data-bs-theme="dark"] .profile-info-card .info-value,
body.dark-mode .profile-info-card .info-value {
    color: #e9ecef;
}

[data-bs-theme="dark"] #preloader,
body.dark-mode #preloader {
    background: #1a1a2e;
}

[data-bs-theme="dark"] .skeleton-loader,
body.dark-mode .skeleton-loader {
    background: linear-gradient(90deg, #2a3a5e 25%, #3a4a6e 50%, #2a3a5e 75%);
    background-size: 200% 100%;
}

[data-bs-theme="dark"] .progress,
body.dark-mode .progress {
    background: #2a3a5e;
}

[data-bs-theme="dark"] .timeline::before,
body.dark-mode .timeline::before {
    background: #2a3a5e;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track,
body.dark-mode ::-webkit-scrollbar-track {
    background: #1a2744;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb,
body.dark-mode ::-webkit-scrollbar-thumb {
    background: #3a4a6e;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover,
body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #4a5a7e;
}

[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, [data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4, [data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: #e9ecef;
}

[data-bs-theme="dark"] .text-muted,
body.dark-mode .text-muted {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .login-card,
body.dark-mode .login-card {
    background: #16213e;
}

[data-bs-theme="dark"] .login-body .form-control,
body.dark-mode .login-body .form-control {
    background: #1a2744;
    border-color: #2a3a5e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .login-body .input-group-text,
body.dark-mode .login-body .input-group-text {
    background: #1a2744;
    border-color: #2a3a5e;
    color: #adb5bd;
}

[data-bs-theme="dark"] .auth-card,
body.dark-mode .auth-card {
    background: #16213e;
}

[data-bs-theme="dark"] .auth-body .form-control,
body.dark-mode .auth-body .form-control {
    background: #1a2744;
    border-color: #2a3a5e;
    color: #e9ecef;
}

[data-bs-theme="dark"] .auth-body .input-group-text,
body.dark-mode .auth-body .input-group-text {
    background: #1a2744;
    border-color: #2a3a5e;
    color: #adb5bd;
}

[data-bs-theme="dark"] .auth-footer,
body.dark-mode .auth-footer {
    color: #adb5bd;
}
