/* =========================================================
   MCI DARK MODE - CORREGIDO
   Objetivo:
   - Mantener el mismo diseño, estructura, tamaños y espacios
     del CSS original.
   - Cambiar solo colores, fondos, bordes, sombras y estados.
   - No ocultar el body.
   - Funciona con:
     html.mci-dark-preload
     body.dark
========================================================= */

/* =========================================================
   BASE / VARIABLES
========================================================= */

html.mci-dark-preload {
  background: #020617 !important;
}

html.mci-dark-preload body,
body.dark {
  --light: #0f172a;
  --primary: #38bdf8;
  --light-primary: rgba(56, 189, 248, .14);
  --grey: #111827;
  --soft-grey: #1e293b;
  --dark-grey: #94a3b8;
  --dark: #e5e7eb;
  --danger: #f87171;
  --light-danger: rgba(248, 113, 113, .16);
  --warning: #facc15;
  --light-warning: rgba(250, 204, 21, .16);
  --success: #4ade80;
  --light-success: rgba(74, 222, 128, .16);
  --sidebar-bg: #020617;
  --sidebar-item: rgba(255, 255, 255, .075);
  --sidebar-item-hover: rgba(255, 255, 255, .14);
  --border: rgba(255, 255, 255, .12);
  --surface: #111827;
  --muted: #94a3b8;
  --shadow: 0 18px 45px rgba(0, 0, 0, .35);
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, .28);

  color: #e5e7eb !important;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, .10), transparent 36%),
    linear-gradient(135deg, #020617 0%, #0f172a 50%, #111827 100%) !important;
}

/* Nunca ocultar la página */
html.mci-theme-loading body,
html.mci-theme-ready body {
  opacity: 1 !important;
  visibility: visible !important;
}

html.mci-theme-loading .bx,
html.mci-theme-loading .bi,
html.mci-theme-ready .bx,
html.mci-theme-ready .bi,
body.dark .bx,
body.dark .bi,
html.mci-dark-preload .bx,
html.mci-dark-preload .bi {
  opacity: 1 !important;
}

/* =========================================================
   TEXTO GENERAL
========================================================= */

body.dark,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark p,
body.dark span,
body.dark label,
body.dark small,
body.dark li,
body.dark strong {
  color: #e5e7eb;
}

body.dark a {
  color: #93c5fd;
}

body.dark a:hover {
  color: #bfdbfe;
}

/* =========================================================
   SIDEBAR HOMES
   Mantiene estructura original.
========================================================= */

body.dark .sidebar,
html.mci-dark-preload .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 22%),
    #020617 !important;
  border-color: rgba(255, 255, 255, .10) !important;
  box-shadow: 14px 0 35px rgba(0, 0, 0, .36) !important;
}

body.dark .sidebar .logo,
body.dark .sidebar .logo span,
body.dark .sidebar .logo .logo-name,
html.mci-dark-preload .sidebar .logo,
html.mci-dark-preload .sidebar .logo span,
html.mci-dark-preload .sidebar .logo .logo-name {
  color: #ffffff !important;
}

body.dark .sidebar .logo img,
html.mci-dark-preload .sidebar .logo img {
  filter: none !important;
  opacity: 1 !important;
  background: transparent !important;
}

body.dark .sidebar .side-menu li,
html.mci-dark-preload .sidebar .side-menu li {
  background: transparent !important;
}

body.dark .sidebar .side-menu li a,
html.mci-dark-preload .sidebar .side-menu li a {
  color: rgba(255, 255, 255, .78) !important;
  background: transparent !important;
}

body.dark .sidebar .side-menu li a:hover,
html.mci-dark-preload .sidebar .side-menu li a:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .12) !important;
}

body.dark .sidebar .side-menu li.active a,
html.mci-dark-preload .sidebar .side-menu li.active a {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #0891b2) !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .24) !important;
}

body.dark .sidebar .side-menu li a.logout,
html.mci-dark-preload .sidebar .side-menu li a.logout {
  color: #fecaca !important;
  background: rgba(220, 38, 38, .10) !important;
}

body.dark .sidebar .side-menu li a.logout:hover,
html.mci-dark-preload .sidebar .side-menu li a.logout:hover {
  color: #ffffff !important;
  background: rgba(220, 38, 38, .24) !important;
}

/* =========================================================
   CONTENT / NAV HOMES
   Mantiene estructura original.
========================================================= */

body.dark .content,
body.dark .content main,
html.mci-dark-preload .content,
html.mci-dark-preload .content main {
  background: transparent !important;
  color: #e5e7eb !important;
}

body.dark .content nav,
html.mci-dark-preload .content nav {
  background: rgba(15, 23, 42, .90) !important;
  border-color: rgba(255, 255, 255, .10) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25) !important;
}

body.dark .content nav a,
body.dark .content nav .typewriter,
body.dark .content nav .typewriter div,
body.dark .content nav .bx.bx-menu,
html.mci-dark-preload .content nav a,
html.mci-dark-preload .content nav .typewriter,
html.mci-dark-preload .content nav .typewriter div,
html.mci-dark-preload .content nav .bx.bx-menu {
  color: #e5e7eb !important;
}

body.dark .content nav .typewriter span,
body.dark .content nav .typewriter .lili,
html.mci-dark-preload .content nav .typewriter span,
html.mci-dark-preload .content nav .typewriter .lili {
  color: #38bdf8 !important;
}

body.dark .content nav .bx.bx-menu,
html.mci-dark-preload .content nav .bx.bx-menu {
  background: #1e293b !important;
  color: #e5e7eb !important;
}

body.dark .content nav .bx.bx-menu:hover,
html.mci-dark-preload .content nav .bx.bx-menu:hover {
  background: #334155 !important;
  color: #38bdf8 !important;
}

/* Perfil: se mantiene igual en tamaño, solo color de fondo */
body.dark .content nav .profile,
html.mci-dark-preload .content nav .profile {
  background: #ffffff !important;
  border-color: rgba(255, 255, 255, .20) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .30) !important;
}

body.dark .content nav .profile img,
html.mci-dark-preload .content nav .profile img {
  background: transparent !important;
  border-radius: 50% !important;
  filter: none !important;
  opacity: 1 !important;
}

/* =========================================================
   HEADER HORIZONTAL / NAVBAR TABLAS
========================================================= */

body.dark .header,
body.dark .nav-bar,
html.mci-dark-preload .header,
html.mci-dark-preload .nav-bar {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .04), transparent 42%),
    #020617 !important;
  border-color: rgba(255, 255, 255, .10) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35) !important;
}

body.dark .header a,
body.dark .menu li a,
body.dark .logo .PEPI,
body.dark .logo .pipi,
html.mci-dark-preload .header a,
html.mci-dark-preload .menu li a,
html.mci-dark-preload .logo .PEPI,
html.mci-dark-preload .logo .pipi {
  color: rgba(255,255,255,.88) !important;
}

body.dark .menu li a:hover,
html.mci-dark-preload .menu li a:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,.10) !important;
}

body.dark .menu li a strong,
body.dark .header button,
html.mci-dark-preload .menu li a strong,
html.mci-dark-preload .header button {
  color: #020617 !important;
  background: #f8fafc !important;
}

body.dark .salir,
html.mci-dark-preload .salir {
  color: #fecaca !important;
  background: rgba(248, 113, 113, .12) !important;
}

body.dark .salir:hover,
html.mci-dark-preload .salir:hover {
  background: rgba(248, 113, 113, .22) !important;
}

/* =========================================================
   CARDS / CAJAS / HOME CARDS
   No cambia tamaños, grid, paddings ni estructura.
========================================================= */

body.dark .card,
body.dark .Ins,
body.dark .containerr,
body.dark .login-form,
body.dark .form,
body.dark .theme-config-card,
body.dark .content main .insights li,
body.dark .content main .bottom-data > div,
body.dark .container.mb-3 .row .col,
body.dark .container.mt-3 .row .col,
body.dark .container.ciclo .row .col,
body.dark .container.pertenece .row .col,
body.dark #filterByLeader12 .row .col,
body.dark .container:not(.totali):not(.mb-3):not(.mt-3):not(.ciclo):not(.pertenece):has(select) .row .col,
body.dark .container:not(.totali):not(.mb-3):not(.mt-3):not(.ciclo):not(.pertenece):has(input[type="date"]) .row,
html.mci-dark-preload .card,
html.mci-dark-preload .Ins,
html.mci-dark-preload .containerr,
html.mci-dark-preload .login-form,
html.mci-dark-preload .form,
html.mci-dark-preload .theme-config-card,
html.mci-dark-preload .content main .insights li,
html.mci-dark-preload .content main .bottom-data > div {
  background: rgba(17, 24, 39, .94) !important;
  color: #e5e7eb !important;
  border-color: rgba(255, 255, 255, .12) !important;
  box-shadow: var(--shadow) !important;
}

body.dark .content main .insights li:hover,
html.mci-dark-preload .content main .insights li:hover {
  border-color: rgba(56, 189, 248, .35) !important;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .42) !important;
}

body.dark .insights img,
html.mci-dark-preload .insights img {
  background: linear-gradient(135deg, #111827, #1e293b) !important;
  border-color: rgba(255, 255, 255, .12) !important;
}

body.dark .content main .insights li .info h3,
body.dark .content main .bottom-data .header h3,
body.dark .content main .header .left h1,
html.mci-dark-preload .content main .insights li .info h3,
html.mci-dark-preload .content main .bottom-data .header h3,
html.mci-dark-preload .content main .header .left h1 {
  color: #f8fafc !important;
}

body.dark .content main .insights li .info p,
body.dark .Ins p,
body.dark .content main .header .left .breadcrumb li a,
html.mci-dark-preload .content main .insights li .info p,
html.mci-dark-preload .Ins p,
html.mci-dark-preload .content main .header .left .breadcrumb li a {
  color: #94a3b8 !important;
}

body.dark .content main .bottom-data .header .bx,
html.mci-dark-preload .content main .bottom-data .header .bx {
  color: #38bdf8 !important;
}

/* Mantiene colores semánticos de cards de iconos */
body.dark .content main .insights li:nth-child(1) .bx {
  background: rgba(56, 189, 248, .14) !important;
  color: #38bdf8 !important;
}

body.dark .content main .insights li:nth-child(2) .bx {
  background: rgba(250, 204, 21, .16) !important;
  color: #facc15 !important;
}

body.dark .content main .insights li:nth-child(3) .bx {
  background: rgba(74, 222, 128, .16) !important;
  color: #4ade80 !important;
}

body.dark .content main .insights li:nth-child(4) .bx {
  background: rgba(248, 113, 113, .16) !important;
  color: #f87171 !important;
}

/* =========================================================
   FORMULARIOS / INPUTS / SELECTS
   Solo colores.
========================================================= */

body.dark input,
body.dark select,
body.dark textarea,
body.dark .form-control,
body.dark .form-select,
body.dark input[type="text"],
body.dark input[type="search"],
body.dark input[type="date"],
html.mci-dark-preload input,
html.mci-dark-preload select,
html.mci-dark-preload textarea,
html.mci-dark-preload .form-control,
html.mci-dark-preload .form-select {
  color: #f8fafc !important;
  background-color: #020617 !important;
  border-color: rgba(255, 255, 255, .16) !important;
  box-shadow: none !important;
}

body.dark input::placeholder,
body.dark textarea::placeholder,
html.mci-dark-preload input::placeholder,
html.mci-dark-preload textarea::placeholder {
  color: #94a3b8 !important;
}

body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus,
body.dark .form-control:focus,
body.dark .form-select:focus,
html.mci-dark-preload input:focus,
html.mci-dark-preload select:focus,
html.mci-dark-preload textarea:focus,
html.mci-dark-preload .form-control:focus,
html.mci-dark-preload .form-select:focus {
  border-color: rgba(56, 189, 248, .65) !important;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .14) !important;
}

body.dark option,
html.mci-dark-preload option {
  color: #f8fafc !important;
  background: #020617 !important;
}

body.dark label,
html.mci-dark-preload label {
  color: #e5e7eb !important;
}

/* =========================================================
   BOTONES
   No cambia tamaños.
========================================================= */

body.dark button,
body.dark .btn,
html.mci-dark-preload button,
html.mci-dark-preload .btn {
  border-color: rgba(255, 255, 255, .14);
}

body.dark .btn-primary,
body.dark button.btn-primary,
body.dark a.btn-primary,
html.mci-dark-preload .btn-primary,
html.mci-dark-preload button.btn-primary,
html.mci-dark-preload a.btn-primary {
  color: #020617 !important;
  background: #38bdf8 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 10px 22px rgba(56, 189, 248, .18) !important;
}

body.dark .btn-primary:hover,
body.dark button.btn-primary:hover,
body.dark a.btn-primary:hover,
html.mci-dark-preload .btn-primary:hover,
html.mci-dark-preload button.btn-primary:hover,
html.mci-dark-preload a.btn-primary:hover {
  color: #020617 !important;
  background: #7dd3fc !important;
  border-color: #7dd3fc !important;
}

body.dark .btn-outline-primary,
body.dark a.btn-outline-primary,
body.dark button.btn-outline-primary,
html.mci-dark-preload .btn-outline-primary,
html.mci-dark-preload a.btn-outline-primary,
html.mci-dark-preload button.btn-outline-primary {
  color: #93c5fd !important;
  background: #111827 !important;
  border-color: rgba(147, 197, 253, .35) !important;
}

body.dark .btn-outline-primary:hover,
body.dark a.btn-outline-primary:hover,
body.dark button.btn-outline-primary:hover,
body.dark .btn-outline-primary.active,
body.dark .btn-outline-primary:active {
  color: #020617 !important;
  background: #93c5fd !important;
  border-color: #93c5fd !important;
}

body.dark .btn-outline-warning,
body.dark a.btn-outline-warning,
body.dark button.btn-outline-warning {
  color: #fde68a !important;
  background: #111827 !important;
  border-color: rgba(250, 204, 21, .38) !important;
}

body.dark .btn-warning,
body.dark a.btn-warning,
body.dark button.btn-warning {
  color: #111827 !important;
  background: #facc15 !important;
  border-color: #facc15 !important;
}

body.dark .btn-danger,
body.dark a.btn-danger,
body.dark button.btn-danger {
  color: #ffffff !important;
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

body.dark .btn-outline-info {
  color: #67e8f9 !important;
  border-color: #22d3ee !important;
  background: transparent !important;
}

body.dark .btn-outline-info:hover {
  color: #020617 !important;
  background: #67e8f9 !important;
}

body.dark .btn-outline-danger {
  color: #fca5a5 !important;
  border-color: #f87171 !important;
  background: transparent !important;
}

body.dark .btn-outline-danger:hover {
  color: #ffffff !important;
  background: #dc2626 !important;
}

body.dark #toggleLoginForm,
html.mci-dark-preload #toggleLoginForm {
  color: #020617 !important;
  background: linear-gradient(135deg, #38bdf8, #22c55e) !important;
  border-color: transparent !important;
}

body.dark #toggleLoginForm:hover,
html.mci-dark-preload #toggleLoginForm:hover {
  color: #020617 !important;
  background: linear-gradient(135deg, #7dd3fc, #4ade80) !important;
}

body.dark .login-form .btn-login,
html.mci-dark-preload .login-form .btn-login {
  color: #020617 !important;
  background: #38bdf8 !important;
  border-color: #38bdf8 !important;
}

body.dark .password-group .password-eye,
html.mci-dark-preload .password-group .password-eye {
  color: #ffffff !important;
  background-color: #1e293b !important;
  border-color: rgba(255,255,255,.16) !important;
}

body.dark .password-group .password-eye:hover,
html.mci-dark-preload .password-group .password-eye:hover {
  background-color: #334155 !important;
}

body.dark .password-group .password-eye i,
html.mci-dark-preload .password-group .password-eye i {
  color: #ffffff !important;
}

/* =========================================================
   CONFIG PAGE
   Solo colores.
========================================================= */

body.dark .theme-config-card::before,
html.mci-dark-preload .theme-config-card::before {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, .15), transparent 35%),
    radial-gradient(circle at bottom left, rgba(74, 222, 128, .10), transparent 35%) !important;
}

body.dark .theme-config-card h2,
body.dark .theme-option span,
html.mci-dark-preload .theme-config-card h2,
html.mci-dark-preload .theme-option span {
  color: #f8fafc !important;
}

body.dark .theme-config-card p,
body.dark .theme-option small,
html.mci-dark-preload .theme-config-card p,
html.mci-dark-preload .theme-option small {
  color: #94a3b8 !important;
}

body.dark .theme-option,
html.mci-dark-preload .theme-option {
  background: #020617 !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,.14) !important;
}

body.dark .theme-option:hover,
html.mci-dark-preload .theme-option:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 18px 40px rgba(56, 189, 248, .16) !important;
}

body.dark .theme-option.active,
html.mci-dark-preload .theme-option.active {
  background: rgba(56, 189, 248, .12) !important;
  border-color: #38bdf8 !important;
}

body.dark .theme-option i,
html.mci-dark-preload .theme-option i {
  color: #38bdf8 !important;
}

body.dark .theme-status,
html.mci-dark-preload .theme-status {
  color: #bae6fd !important;
  background: rgba(56, 189, 248, .12) !important;
}

body.dark .theme-back-btn,
html.mci-dark-preload .theme-back-btn {
  color: #020617 !important;
  background: #38bdf8 !important;
}

body.dark .theme-back-btn:hover,
html.mci-dark-preload .theme-back-btn:hover {
  background: #7dd3fc !important;
}

/* =========================================================
   DATATABLES
   Mantiene el esquema de tabla original.
   Solo cambia colores/fondos/bordes.
========================================================= */

body.dark .dataTables_wrapper,
body.dark .dt-container,
body.dark .dataTables_scroll,
body.dark .dataTables_scrollBody,
body.dark .dataTables_scrollHead,
body.dark .dataTables_scrollFoot,
html.mci-dark-preload .dataTables_wrapper,
html.mci-dark-preload .dt-container,
html.mci-dark-preload .dataTables_scroll,
html.mci-dark-preload .dataTables_scrollBody,
html.mci-dark-preload .dataTables_scrollHead,
html.mci-dark-preload .dataTables_scrollFoot {
  background: #0f172a !important;
  color: #e5e7eb !important;
}

body.dark .dataTables_wrapper .dataTables_length,
body.dark .dataTables_wrapper .dataTables_filter,
body.dark .dataTables_wrapper .dataTables_info,
body.dark .dataTables_wrapper .dataTables_paginate,
body.dark .dataTables_wrapper label,
body.dark .dt-length,
body.dark .dt-search,
body.dark .dt-info,
body.dark .dt-paging {
  color: #e5e7eb !important;
}

body.dark .dataTables_wrapper .dataTables_length select,
body.dark .dataTables_wrapper .dataTables_filter input,
body.dark .dt-length select,
body.dark .dt-search input {
  color: #f8fafc !important;
  background: #020617 !important;
  border-color: rgba(255, 255, 255, .18) !important;
  box-shadow: none !important;
}

body.dark table.dataTable,
body.dark table.table,
body.dark #calmo,
body.dark .mci-theme-table-ready,
html.mci-dark-preload table.dataTable,
html.mci-dark-preload table.table,
html.mci-dark-preload #calmo {
  background: #111827 !important;
  color: #e5e7eb !important;
  border-color: rgba(255, 255, 255, .12) !important;
}

body.dark table.dataTable thead,
body.dark table.dataTable thead tr,
body.dark table.dataTable thead th,
body.dark table.dataTable thead td,
body.dark table.table thead,
body.dark table.table thead tr,
body.dark table.table thead th,
body.dark #calmo thead,
body.dark #calmo thead tr,
body.dark #calmo thead th,
html.mci-dark-preload table.dataTable thead,
html.mci-dark-preload table.dataTable thead tr,
html.mci-dark-preload table.dataTable thead th,
html.mci-dark-preload #calmo thead,
html.mci-dark-preload #calmo thead tr,
html.mci-dark-preload #calmo thead th {
  background: #020617 !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, .14) !important;
}

body.dark table.dataTable tbody tr,
body.dark table.table tbody tr,
body.dark #calmo tbody tr {
  background: #111827 !important;
  color: #e5e7eb !important;
}

body.dark table.dataTable tbody tr:nth-child(even),
body.dark table.table tbody tr:nth-child(even),
body.dark #calmo tbody tr:nth-child(even) {
  background: #162033 !important;
}

body.dark table.dataTable tbody tr:hover,
body.dark table.table tbody tr:hover,
body.dark #calmo tbody tr:hover {
  background: #1e3a5f !important;
}

body.dark table.dataTable tbody td,
body.dark table.dataTable tbody th,
body.dark table.table tbody td,
body.dark table.table tbody th,
body.dark #calmo tbody td,
body.dark #calmo tbody th {
  color: #e5e7eb !important;
  border-color: rgba(255, 255, 255, .12) !important;
}

/* Tabla usuarios sistema */
body.dark #calmo.usuarios-sistema-table {
  background: #111827 !important;
}

body.dark #calmo.usuarios-sistema-table thead th {
  background: #020617 !important;
  color: #f8fafc !important;
  border-color: rgba(255,255,255,.14) !important;
}

body.dark #calmo.usuarios-sistema-table tbody td {
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,.12) !important;
}

body.dark #calmo.usuarios-sistema-table tbody tr:nth-child(even) {
  background: #162033 !important;
}

body.dark #calmo.usuarios-sistema-table tbody tr:hover {
  background: #1e3a5f !important;
}

/* Botones exportar */
body.dark div.dt-buttons,
html.mci-dark-preload div.dt-buttons {
  background: rgba(17, 24, 39, .94) !important;
  border-color: rgba(255, 255, 255, .12) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .28) !important;
}

body.dark div.dt-buttons .dt-button,
body.dark div.dt-buttons button,
body.dark button.dt-button,
body.dark .dt-button {
  color: #f8fafc !important;
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, .12) !important;
}

body.dark div.dt-buttons .dt-button:hover,
body.dark div.dt-buttons button:hover,
body.dark button.dt-button:hover,
body.dark .dt-button:hover {
  color: #ffffff !important;
  background: #334155 !important;
}

/* Paginación DataTables normal */
body.dark .dataTables_wrapper .dataTables_paginate {
  background: #0f172a !important;
  color: #e5e7eb !important;
}

body.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #bfdbfe !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.next {
  color: #93c5fd !important;
}

body.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  color: #38bdf8 !important;
  background: transparent !important;
  border-color: transparent !important;
}

body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  color: #ffffff !important;
  background: #0d6efd !important;
  border-color: #0d6efd !important;
}

body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: #64748b !important;
  background: transparent !important;
  border-color: transparent !important;
  opacity: .75 !important;
}

/* Paginación Bootstrap dentro de DataTables */
body.dark .dataTables_wrapper .pagination,
body.dark .dt-container .pagination,
body.dark #calmo_paginate,
body.dark #calmo_paginate .pagination {
  background: transparent !important;
}

body.dark .dataTables_wrapper .pagination li,
body.dark #calmo_paginate .pagination li,
body.dark .dt-container .pagination li {
  background: transparent !important;
  border-color: rgba(255, 255, 255, .14) !important;
}

body.dark .dataTables_wrapper .pagination .page-link,
body.dark .dt-container .pagination .page-link,
body.dark #calmo_paginate .pagination li a {
  color: #93c5fd !important;
  background: #111827 !important;
  border-color: rgba(255, 255, 255, .14) !important;
  box-shadow: none !important;
}

body.dark .dataTables_wrapper .pagination .page-link:hover,
body.dark .dt-container .pagination .page-link:hover,
body.dark #calmo_paginate .pagination li a:hover {
  color: #020617 !important;
  background: #93c5fd !important;
  border-color: #93c5fd !important;
}

body.dark .dataTables_wrapper .pagination .page-item.active .page-link,
body.dark .dt-container .pagination .page-item.active .page-link,
body.dark #calmo_paginate .pagination li.active {
  color: #ffffff !important;
  background: #0d6efd !important;
  border-color: #0d6efd !important;
}

body.dark .dataTables_wrapper .pagination .page-item.disabled .page-link,
body.dark .dt-container .pagination .page-item.disabled .page-link {
  color: #64748b !important;
  background: #111827 !important;
  border-color: rgba(255, 255, 255, .10) !important;
  opacity: .75 !important;
}

/* =========================================================
   FILA NO PAGÓ / SIN PAGO
========================================================= */

body.dark table.dataTable tbody tr.mci-no-pago td,
body.dark #calmo tbody tr.mci-no-pago td,
body.dark table.dataTable tbody td[style*="#FFA984"],
body.dark table.dataTable tbody td[style*="255, 169, 132"],
body.dark #calmo tbody td[style*="#FFA984"],
body.dark #calmo tbody td[style*="255, 169, 132"] {
  background-color: #7c2d12 !important;
  color: #ffedd5 !important;
  border-color: rgba(255, 237, 213, .20) !important;
}

body.dark table.dataTable tbody tr.mci-no-pago:hover td,
body.dark #calmo tbody tr.mci-no-pago:hover td {
  background-color: #9a3412 !important;
  color: #fff7ed !important;
}

table.dataTable tbody tr.mci-no-pago td,
#calmo tbody tr.mci-no-pago td {
  background-color: #FFA984 !important;
  color: #ffffff !important;
}

/* =========================================================
   SELECT CHECKBOX PERSONALIZADO
========================================================= */

body.dark .mci-select-checkbox-btn,
body.dark .mci-select-checkbox-menu {
  color: #f8fafc !important;
  background: #020617 !important;
  border-color: rgba(255, 255, 255, .16) !important;
}

body.dark .mci-select-checkbox-header {
  border-bottom-color: rgba(255, 255, 255, .12) !important;
}

body.dark .mci-select-checkbox-option {
  color: #e5e7eb !important;
}

body.dark .mci-select-checkbox-option:hover {
  background: #1e3a5f !important;
}

/* =========================================================
   SCROLL DARK
========================================================= */

body.dark .dataTables_scrollBody::-webkit-scrollbar,
body.dark .table-responsive::-webkit-scrollbar,
body.dark .containerr::-webkit-scrollbar,
body.dark::-webkit-scrollbar {
  height: 12px;
  width: 12px;
}

body.dark .dataTables_scrollBody::-webkit-scrollbar-track,
body.dark .table-responsive::-webkit-scrollbar-track,
body.dark .containerr::-webkit-scrollbar-track,
body.dark::-webkit-scrollbar-track {
  background: #020617;
}

body.dark .dataTables_scrollBody::-webkit-scrollbar-thumb,
body.dark .table-responsive::-webkit-scrollbar-thumb,
body.dark .containerr::-webkit-scrollbar-thumb,
body.dark::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 999px;
}

body.dark .dataTables_scrollBody::-webkit-scrollbar-thumb:hover,
body.dark .table-responsive::-webkit-scrollbar-thumb:hover,
body.dark .containerr::-webkit-scrollbar-thumb:hover,
body.dark::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* =========================================================
   RESPONSIVE DARK
   No cambia estructura; solo colores móviles.
========================================================= */

@media (max-width: 900px) {
  body.dark .menu,
  html.mci-dark-preload .menu {
    background: #020617 !important;
    border-color: rgba(255, 255, 255, .10) !important;
  }

  body.dark .menu li a,
  html.mci-dark-preload .menu li a {
    color: #ffffff !important;
    background: rgba(255, 255, 255, .065) !important;
  }

  body.dark .menu li a:hover,
  html.mci-dark-preload .menu li a:hover {
    background: rgba(255, 255, 255, .12) !important;
  }

  body.dark .menu li a strong,
  html.mci-dark-preload .menu li a strong {
    color: #020617 !important;
    background: linear-gradient(135deg, #38bdf8, #22c55e) !important;
  }

  body.dark .open-menu,
  body.dark .close-menu,
  html.mci-dark-preload .open-menu,
  html.mci-dark-preload .close-menu {
    color: #ffffff !important;
    background: rgba(255, 255, 255, .10) !important;
  }
}
/* =========================================================
   CONFIG PAGE - DISEÑO COMPLETO
   Agregar al FINAL de mci-dark-mode.css
   Recupera el diseño de cambio Claro/Oscuro
========================================================= */

.theme-config-wrapper {
  width: 100%;
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
}

.theme-config-card {
  width: min(850px, 100%);
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(226, 232, 240, .95);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
}

.theme-config-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(25, 118, 210, .12), transparent 35%),
    radial-gradient(circle at bottom left, rgba(15, 159, 110, .10), transparent 35%);
  pointer-events: none;
}

.theme-config-card > * {
  position: relative;
  z-index: 1;
}

.theme-config-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1976D2, #0f9f6e);
  color: #ffffff;
  font-size: 34px;
}

.theme-config-card h2 {
  margin-bottom: 8px;
  color: #111827;
  font-size: 30px;
  font-weight: 800;
}

.theme-config-card p {
  max-width: 680px;
  margin-bottom: 26px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.7;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.theme-option {
  width: 100%;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border: 2px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  color: #111827;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .06);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.theme-option:hover {
  transform: translateY(-3px);
  border-color: #1976D2;
  box-shadow: 0 18px 40px rgba(25, 118, 210, .16);
}

.theme-option.active {
  border-color: #1976D2;
  background: #e8f2ff;
}

.theme-option i {
  display: block;
  margin-bottom: 14px;
  color: #1976D2;
  font-size: 34px;
}

.theme-option span {
  display: block;
  margin-bottom: 5px;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
}

.theme-option small {
  color: #64748b;
  font-size: 13px;
}

.theme-status {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 14px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 700;
}

.theme-actions {
  margin-top: 24px;
}

.theme-back-btn {
  width: fit-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  color: #ffffff !important;
  background: #111827;
  font-weight: 800;
  text-decoration: none;
}

.theme-back-btn:hover {
  color: #ffffff !important;
  background: #1f2937;
}

/* =========================================================
   CONFIG PAGE - DARK COLORS
   Mantiene el diseño anterior, solo cambia colores
========================================================= */

body.dark .theme-config-card,
html.mci-dark-preload .theme-config-card {
  background: rgba(17, 24, 39, .94) !important;
  border-color: rgba(255, 255, 255, .12) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .35) !important;
}

body.dark .theme-config-card::before,
html.mci-dark-preload .theme-config-card::before {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, .15), transparent 35%),
    radial-gradient(circle at bottom left, rgba(74, 222, 128, .10), transparent 35%) !important;
}

body.dark .theme-config-icon,
html.mci-dark-preload .theme-config-icon {
  background: linear-gradient(135deg, #38bdf8, #22c55e) !important;
  color: #020617 !important;
}

body.dark .theme-config-card h2,
html.mci-dark-preload .theme-config-card h2 {
  color: #f8fafc !important;
}

body.dark .theme-config-card p,
html.mci-dark-preload .theme-config-card p {
  color: #94a3b8 !important;
}

body.dark .theme-option,
html.mci-dark-preload .theme-option {
  background: #020617 !important;
  color: #e5e7eb !important;
  border-color: rgba(255, 255, 255, .14) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .28) !important;
}

body.dark .theme-option:hover,
html.mci-dark-preload .theme-option:hover {
  transform: translateY(-3px);
  border-color: #38bdf8 !important;
  box-shadow: 0 18px 40px rgba(56, 189, 248, .16) !important;
}

body.dark .theme-option.active,
html.mci-dark-preload .theme-option.active {
  background: rgba(56, 189, 248, .12) !important;
  border-color: #38bdf8 !important;
}

body.dark .theme-option i,
html.mci-dark-preload .theme-option i {
  color: #38bdf8 !important;
}

body.dark .theme-option span,
html.mci-dark-preload .theme-option span {
  color: #f8fafc !important;
}

body.dark .theme-option small,
html.mci-dark-preload .theme-option small {
  color: #94a3b8 !important;
}

body.dark .theme-status,
html.mci-dark-preload .theme-status {
  color: #bae6fd !important;
  background: rgba(56, 189, 248, .12) !important;
  border: 1px solid rgba(56, 189, 248, .20) !important;
}

body.dark .theme-back-btn,
html.mci-dark-preload .theme-back-btn {
  color: #020617 !important;
  background: #38bdf8 !important;
}

body.dark .theme-back-btn:hover,
html.mci-dark-preload .theme-back-btn:hover {
  color: #020617 !important;
  background: #7dd3fc !important;
}

/* =========================================================
   CONFIG PAGE RESPONSIVE
========================================================= */

@media (max-width: 768px) {
  .theme-options {
    grid-template-columns: 1fr;
  }

  .theme-config-card {
    padding: 24px;
  }
}

/* =========================================================
   AJUSTE FILA NO PAGÓ / SIN PAGO - MODO CLARO
   Más oscuro, sin brillo, pero legible
========================================================= */

body:not(.dark) table.dataTable tbody tr.mci-no-pago td,
body:not(.dark) #calmo tbody tr.mci-no-pago td,
body:not(.dark) table.dataTable tbody tr.mci-no-pago:hover td,
body:not(.dark) #calmo tbody tr.mci-no-pago:hover td {
  background-color: #e7b2a3 !important;
  color: #1f2937 !important;
  border-color: #d79584 !important;
}

/* Cuando el color naranja viene inline desde JS o EJS */
body:not(.dark) table.dataTable tbody td[style*="#FFA984"],
body:not(.dark) table.dataTable tbody td[style*="#ffa984"],
body:not(.dark) table.dataTable tbody td[style*="255, 169, 132"],
body:not(.dark) table.dataTable tbody td[style*="255,169,132"],
body:not(.dark) #calmo tbody td[style*="#FFA984"],
body:not(.dark) #calmo tbody td[style*="#ffa984"],
body:not(.dark) #calmo tbody td[style*="255, 169, 132"],
body:not(.dark) #calmo tbody td[style*="255,169,132"] {
  background-color: #e7b2a3 !important;
  color: #1f2937 !important;
  border-color: #d79584 !important;
}

/* Hover modo claro: un poco más profundo, no brillante */
body:not(.dark) table.dataTable tbody tr.mci-no-pago:hover td,
body:not(.dark) #calmo tbody tr.mci-no-pago:hover td,
body:not(.dark) table.dataTable tbody tr:hover td[style*="#FFA984"],
body:not(.dark) table.dataTable tbody tr:hover td[style*="#ffa984"],
body:not(.dark) table.dataTable tbody tr:hover td[style*="255, 169, 132"],
body:not(.dark) table.dataTable tbody tr:hover td[style*="255,169,132"],
body:not(.dark) #calmo tbody tr:hover td[style*="#FFA984"],
body:not(.dark) #calmo tbody tr:hover td[style*="#ffa984"],
body:not(.dark) #calmo tbody tr:hover td[style*="255, 169, 132"],
body:not(.dark) #calmo tbody tr:hover td[style*="255,169,132"] {
  background-color: #d99a89 !important;
  color: #111827 !important;
  border-color: #c47d6b !important;
}

/* Línea lateral más sobria */
body:not(.dark) table.dataTable tbody tr.mci-no-pago td:first-child,
body:not(.dark) #calmo tbody tr.mci-no-pago td:first-child {
  box-shadow: inset 4px 0 0 #9f3f32 !important;
}