/* ==================== DARK MODE ==================== */

body.dark-mode {
  background-color: #0d1117 !important;
  color: #e6e6e6 !important;
}

body.dark-mode .login-content {
  background-color: #0d1117 !important;
  color: #e6e6e6 !important;
}

body.dark-mode .menu {
  background-color: #0c1a33 !important;
  color: #e6e6e6 !important;
}

body.dark-mode .menu-item {
  color: #e6e6e6 !important;
}

body.dark-mode .menu-item:hover {
  background-color: #1e2a47 !important;
  color: white !important;
}

body.dark-mode .menu-item.active {
  background-color: white !important;
  color: #0C3379 !important;
}

body.dark-mode .menu-item-user {
  background-color: #8b0000 !important;
  color: white !important;
}

body.dark-mode .menu-item-user:hover {
  background-color: white !important;
  color: #c90000 !important;
}

body.dark-mode .menu img {
  filter: brightness(0.8);
}

body.dark-mode .bar {
  background-color: #161b22 !important;
  color: white !important;
}

body.dark-mode .content {
  background-color: #161b22 !important;
  color: #e6e6e6 !important;
}

body.dark-mode .shadow,
body.dark-mode .table-style,
body.dark-mode .row,
body.dark-mode .card,
body.dark-mode .container,
body.dark-mode .profile .row {
  background-color: #1f2937 !important;
  color: #e6e6e6 !important;
  border-color: #2d3748 !important;
}

body.dark-mode .page-link {
  background-color: #1f2937 !important;
  color: #e6e6e6 !important;
  border-color: #2d3748 !important;
}

body.dark-mode .page-item.active .page-link {
  background-color: #0C3379 !important;
  border-color: #0C3379 !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode .form-control,
body.dark-mode .form-select {
  background-color: #0f172a !important;
  color: #e6e6e6 !important;
  border: 1px solid #334155 !important;
}

body.dark-mode i {
  color: #ff4d4d !important;
}

/* ==================== SPINNER DARK MODE ==================== */

body.dark-mode .spinner {
    background: linear-gradient(180deg, #0d1117 0%, #161b22 100%) !important;
}

body.dark-mode .spinner img {
    background-color: white !important;
    filter: brightness(1) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
}

/* ==================== BOTÓN FLOTANTE DARK MODE ==================== */
.darkmode-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background-color: #0C3379;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 22px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
    z-index: 9999;
}

.darkmode-float:hover {
    transform: scale(1.1);
    background-color: #102f6d;
}

body.dark-mode .darkmode-float {
    background-color: #e6b800;
    color: black;
}

/* ==================== TODAS LAS TABLAS DARK ==================== */

body.dark-mode table,
body.dark-mode .table {
    background-color: #1f2937 !important;
    color: #e6e6e6 !important;
}

body.dark-mode table th,
body.dark-mode table td,
body.dark-mode .table th,
body.dark-mode .table td {
    background-color: transparent !important;
    color: #e6e6e6 !important;
    border-color: #334155 !important;
}

body.dark-mode table thead th,
body.dark-mode .table thead th {
    background-color: #0c3379 !important;
    color: white !important;
    font-weight: 600;
}

body.dark-mode table tbody tr:nth-child(even),
body.dark-mode .table-striped tbody tr:nth-child(even) {
    background-color: #161b22 !important;
}

body.dark-mode table tbody tr:hover,
body.dark-mode .table-hover tbody tr:hover {
    background-color: #2d3748 !important;
    color: white !important;
}

body.dark-mode td.dataTables_empty,
body.dark-mode td.dt-empty,
body.dark-mode .dt-empty {
    background-color: #1f2937 !important;
    color: #94a3b8 !important;
}

/* Mata fondos blancos rebeldes */
body.dark-mode .table-light,
body.dark-mode .table-white,
body.dark-mode .bg-white,
body.dark-mode .bg-light {
    background-color: #1f2937 !important;
}

/* ==================== DATATABLES ESPECÍFICO (TU TABLA #dt_applicants y cualquier otra) ==================== */
body.dark-mode table#dt_applicants,
body.dark-mode table say.dataTable {
    background-color: #1f2937 !important;
    color: #e6e6e6 !important;
}

body.dark-mode table#dt_applicants thead th,
body.dark-mode table.dataTable thead th {
    background-color: #0c3379 !important;
    color: #ffffff !important;
}

body.dark-mode table#dt_applicants tbody tr:nth-child(even) {
    background-color: #161b22 !important;
}

body.dark-mode table#dt_applicants tbody tr:hover,
body.dark-mode table.dataTable tbody tr:hover {
    background-color: #2d3748 !important;
}

body.dark-mode table#dt_applicants.table-bordered,
body.dark-mode .table-bordered {
    border-color: #334155 !important;
}

body.dark-mode table#dt_applicants td.dtr-control:before {
    background-color: #2563eb !important;
}

body.dark-mode table#dt_applicants .dtr-details {
    background-color: #161b22 !important;
}

/* ==================== FORM FLOATING LABELS ==================== */
body.dark-mode .form-floating > label {
    color: #adb5bd !important;
}

body.dark-mode .form-floating > .form-control:focus ~ label,
body.dark-mode .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #fff !important;
}

body.dark-mode .form-floating > .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(12, 51, 121, 0.4) !important;
}

body.dark-mode .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
body.dark-mode .form-floating > .form-control:focus ~ label::after,
body.dark-mode .form-floating > textarea:focus ~ label::after,
body.dark-mode .form-floating > textarea:not(:placeholder-shown) ~ label::after,
body.dark-mode .form-floating > .form-select ~ label::after,
body.dark-mode .form-floating > .form-select:focus ~ label::after {
    background-color: transparent !important;
}

body.dark-mode .swal2-popup .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
body.dark-mode .swal2-popup .form-floating > .form-control:focus ~ label::after,
body.dark-mode .swal2-popup .form-floating > textarea:focus ~ label::after,
body.dark-mode .swal2-popup .form-floating > textarea:not(:placeholder-shown) ~ label::after,
body.dark-mode .swal2-popup .form-floating > .form-select ~ label::after,
body.dark-mode .swal2-popup .form-floating > .form-select:focus ~ label::after {
    background-color: transparent !important;
}

body.dark-mode .form-select,
body.dark-mode .swal2-popup .form-select {
    background-color: #0f172a !important;
    color: #e6e6e6 !important;
    border: 1px solid #334155 !important;
    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='%23adb5bd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

body.dark-mode .form-select:focus,
body.dark-mode .swal2-popup .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(12, 51, 121, 0.4) !important;
    border-color: #0c3379 !important;
}

body.dark-mode select option,
body.dark-mode .form-select option {
    background-color: #0f172a !important;
    color: #e6e6e6 !important;
}

/* ==================== APEXCHARTS ==================== */
body.dark-mode .apexcharts-text,
body.dark-mode .apexcharts-title-text,
body.dark-mode .apexcharts-legend-text,
body.dark-mode .apexcharts-tooltip { fill: #e6e6e6 !important; color: #e6e6e6 !important; }

body.dark-mode .apexcharts-tooltip {
    background: #161b22 !important;
    border-color: #334155 !important;
}

body.dark-mode .modal-content,
body.dark-mode .card {
    background-color: #161b22 !important;
    color: #e6e6e6 !important;
    border-color: #334155 !important;
}

body.dark-mode .nav-link.active {
    background-color: #0c3379 !important;
    color: white !important;
}

body.dark-mode .tooltip-inner {
    background-color: #161b22 !important;
    color: #e6e6e6 !important;
}

body.dark-mode .swal2-popup {
    background-color: #161b22 !important;
}

body.dark-mode .swal2-html-container,
body.dark-mode .swal2-html-container * {
    color: #e6e6e6 !important;
    background-color: transparent !important;
}

body.dark-mode .swal2-html-container table {
    background-color: #1f2937 !important;
}

body.dark-mode .swal2-html-container thead th {
    background-color: #0c3379 !important;
    color: white !important;
}

body.darkmode .swal2-html-container tbody tr:nth-child(even) {
    background-color: #161b22 !important;
}

body.dark-mode .swal2-html-container tbody tr:hover {
    background-color: #2d3748 !important;
}
// TOAST
body.dark-mode .swal2-toast {
    background: #161b22 !important;
    color: #e6e6e6 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8) !important;
}

body.dark-mode .swal2-toast .swal2-title,
body.dark-mode .swal2-toast .swal2-content {
    color: #e6e6e6 !important;
    background: transparent !important;
}

body.dark-mode .swal2-toast .swal2-icon.swal2-success,
body.dark-mode .swal2-toast .swal2-icon.swal2-error,
body.dark-mode .swal2-toast .swal2-icon.swal2-warning,
body.dark-mode .swal2-toast .swal2-icon.swal2-info,
body.dark-mode .swal2-toast .swal2-icon.swal2-question {
    color: #e6e6e6 !important;
}

body.dark-mode .swal2-toast .swal2-success-line-tip,
body.dark-mode .swal2-toast .swal2-success-line-long,
body.dark-mode .swal2-toast .swal2-x-mark-line-left,
body.dark-mode .swal2-toast .swal2-x-mark-line-right {
    background-color: #e6e6e6 !important;
}

body.dark-mode .swal2-toast .swal2-timer-progress-bar {
    background-color: #0c3379 !important;
}
/* ==================== STEPPER DARK ==================== */

body.dark-mode .stepper::before {
    background-color: #334155 !important;
}
body.dark-mode .step-option p {
    background-color: #1f2937 !important;
    color: #e6e6e6 !important;
}
body.dark-mode .stepper .step:hover .step-option span,
body.dark-mode .stepper .current .step-option span {
    border-color: #0d1117 !important;
}
body.dark-mode .stepper .ready .step-option span {
    background-color: #198754 !important;
    border-color: #0d1117 !important;
}

body.dark-mode .current .step-option p {
    color: white !important;
    background-color: transparent !important;
}

/* ==================== INPUTS HISTORICOS ==================== */

body.dark-mode input:-webkit-autofill,
body.dark-mode input:-webkit-autofill:hover,
body.dark-mode input:-webkit-autofill:focus,
body.dark-mode input:-webkit-autofill:active,
body.dark-mode select:-webkit-autofill,
body.dark-mode textarea:-webkit-autofill {
    -webkit-text-fill-color: #e6e6e6 !important;
    -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
    background-color: #0f172a !important;
    border-color: #334155 !important;
    caret-color: #e6e6e6 !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

body.dark-mode input:-webkit-autofill::first-line {
    color: white !important;
    font-weight: 600 !important;
}

body.dark-mode input[inputmode]:-moz-autofill,
body.dark-mode input:-moz-autofill {
    background-color: #0f172a !important;
    color: #e6e6e6 !important;
    border-color: #334155 !important;
}

body.dark-mode ::-webkit-autofill-selected-candidate {
    background-color: #0c3379 !important;
    color: white !important;
}

body.dark-mode input:-webkit-autofill:focus {
    -webkit-text-fill-color: #e6e6e6 !important;
    background-color: #1e293b !important;
    border-color: #0c3379 !important;
    box-shadow: 0 0 0 0.25rem rgba(12, 51, 121, 0.4) !important;
}

/* ==================== SCROLLBAR DARK ==================== */

body.dark-mode::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

body.dark-mode::-webkit-scrollbar-track {
    background: #0d1117;
    border-radius: 10px;
}

body.dark-mode::-webkit-scrollbar-track:hover {
    background: #161b22;
}

body.dark-mode::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
    border: 3px solid #0d1117;
}

body.dark-mode::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

body.dark-mode::-webkit-scrollbar-thumb:active {
    background: #0c3379;
}

body.dark-mode::-webkit-scrollbar-corner {
    background: #0d1117;
}

/* ==================== SCROLL DARK ==================== */

body.dark-mode .modal-body::-webkit-scrollbar,
body.dark-mode .swal2-html-container::-webkit-scrollbar,
body.dark-mode .dataTables_scrollBody::-webkit-scrollbar,
body.dark-mode .dt-scroll-body::-webkit-scrollbar,
body.dark-mode .card-body::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.dark-mode .modal-body::-webkit-scrollbar-thumb,
body.dark-mode .swal2-html-container::-webkit-scrollbar-thumb,
body.dark-mode .dataTables_scrollBody::-webkit-scrollbar-thumb,
body.dark-mode .card-body::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
    border: 2px solid #161b22;
}

body.dark-mode .modal-body::-webkit-scrollbar-thumb:hover,
body.dark-mode .swal2-html-container::-webkit-scrollbar:hover {
    background: #161b22;
}

body.dark-mode {
    scrollbar-color: #334155 #0d1117;
    scrollbar-width: thin;
}

/* ==================== TABLA CHECKLIST DARK ==================== */

body.dark-mode .table-checklist thead th.bg-primary,
body.dark-mode .table-checklist thead th.bg-success,
body.dark-mode .table-checklist thead th.bg-danger,
body.dark-mode .table-checklist thead th.bg-secondary {
    background-color: inherit !important;
    color: white !important;
}

body.dark-mode .bg-custom,
body.dark-mode .bg-primary,
body.dark-mode .bg-success,
body.dark-mode .bg-danger,
body.dark-mode .bg-secondary,
body.dark-mode .bg-info,
body.dark-mode .bg-warning {
    background-color: inherit !important;
    border-color: inherit !important;
}

body.dark-mode .table-checklist thead th.bg-success   { background-color: #0f5132 !important; }
body.dark-mode .table-checklist thead th.bg-primary   { background-color: #0c3379 !important; }
body.dark-mode .table-checklist thead th.bg-danger    { background-color: #842029 !important; }
body.dark-mode .table-checklist thead th.bg-secondary  { background-color: #41464b !important; }


/* DarkMode tabla responsiva*/

@media screen and (max-width: 991px) {

  body.dark-mode .table-checklist tr {
    background-color: #1f2937 !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
    color: #e6e6e6 !important;
  }

  body.dark-mode .table-checklist tr:hover {
    background-color: #2d3748 !important;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8) !important;
  }

  body.dark-mode .table-checklist tr::after {
    color: #94a3b8 !important;
  }
  body.dark-mode .table-checklist tr:hover::after {
    color: #cbd5e1 !important;
  }

  body.dark-mode .table-checklist td::before {
    color: #94a3b8 !important;
  }

  body.dark-mode .table-checklist td:nth-child(1) {
    color: #e6e6e6 !important;
  }

  body.dark-mode .table-checklist td:nth-child(2),
  body.dark-mode .table-checklist td:nth-child(2)::before {
    color: #60a5fa !important;
    font-weight: 600 !important;
  }

  body.dark-mode .table-checklist tr:hover td:nth-child(2) {
    color: #93c5fd !important;
  }

  body.dark-mode .table-checklist td input[type="checkbox"] {
    accent-color: #0c3379;
    transform: scale(1.4);
  }

  body.dark-mode .table-checklist .obs span.text-muted {
    color: #94a3b8 !important;
  }

  body.dark-mode .table-hover tbody tr:hover td {
    background-color: #2d3748 !important;
  }

  body.dark-mode .table-checklist tbody tr.table-danger,
  body.dark-mode .table-checklist tbody tr.table-danger td {
    background-color: #7f1d1d !important;
    color: #fca5a5 !important;
  }
  body.dark-mode .table-checklist tbody tr.table-danger:hover {
    background-color: #991b1b !important;
  }
}

@media screen and (max-width: 991px) {

  body.dark-mode .table-checklist tbody tr,
  body.dark-mode .table-checklist tbody tr td,
  body.dark-mode .table-checklist tr:nth-of-type(odd),
  body.dark-mode .table-checklist tr:nth-of-type(even),
  body.dark-mode .table-checklist tr:nth-of-type(odd) > *,
  body.dark-mode .table-checklist tr:nth-of-type(even) > * {
    background-color: transparent !important;
    background-image: none !important;
    --bs-table-bg-type: transparent !important;
    --bs-table-color-type: inherit !important;
  }

  body.dark-mode .table-checklist tr {
    background-color: #1f2937 !important;
  }
  body.dark-mode .table-checklist tr:hover {
    background-color: #2d3748 !important;
  }
}
