/**
 * Paleta de las pantallas nuevas (modo claro por defecto y modo oscuro con data-bs-theme="dark").
 * Las hojas de cada módulo usan estas variables en vez de colores fijos.
 * 2026/10/22  Se crea.
 */
:root {
	--lj-fondo: #eef1f5;
	--lj-superficie: #ffffff;
	--lj-superficie-2: #f6f8fb;
	--lj-superficie-3: #eef3fa;
	--lj-borde: #dde3ea;
	--lj-texto: #1f2933;
	--lj-texto-suave: #6b7785;
	--lj-texto-tenue: #98a2b3;
	--lj-titulo: #0b3d6e;
	--lj-enlace: #1565c0;
	--lj-primario: #0b3d6e;
	--lj-primario-hover: #1565c0;
	--lj-rojo: #d71920;
	--lj-rojo-suave: #fdecec;
	--lj-aviso: #ffe8a3;
	--lj-sombra: 0 1px 3px rgba(16, 24, 40, .06);
	--lj-sombra-alta: 0 12px 26px -16px rgba(11, 61, 110, .5);
}

[data-bs-theme="dark"] {
	--lj-fondo: #0e141b;
	--lj-superficie: #161f29;
	--lj-superficie-2: #1c2734;
	--lj-superficie-3: #1f3047;
	--lj-borde: #2b3a4b;
	--lj-texto: #e3e8ee;
	--lj-texto-suave: #9aa7b5;
	--lj-texto-tenue: #6f7d8c;
	--lj-titulo: #8ec5ff;
	--lj-enlace: #6db3ff;
	--lj-primario: #2563a8;
	--lj-primario-hover: #3477c4;
	--lj-rojo: #ff6b6f;
	--lj-rojo-suave: #3a1d22;
	--lj-aviso: #6b5512;
	--lj-sombra: 0 1px 3px rgba(0, 0, 0, .4);
	--lj-sombra-alta: 0 12px 26px -14px rgba(0, 0, 0, .7);
	color-scheme: dark;
}

/* Bootstrap 5.3 ya cambia tarjetas, tablas, formularios y modales; esto cubre lo que queda */
[data-bs-theme="dark"] body { background: var(--lj-fondo); color: var(--lj-texto); }
[data-bs-theme="dark"] .modal-header .btn-close { filter: invert(1) grayscale(1) brightness(2); }
[data-bs-theme="dark"] mark { background: var(--lj-aviso); color: inherit; }
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light > th,
[data-bs-theme="dark"] .table-light > td { --bs-table-bg: var(--lj-superficie-2); --bs-table-color: var(--lj-texto-suave); color: var(--lj-texto-suave); }
[data-bs-theme="dark"] .bg-light { background-color: var(--lj-superficie-2) !important; }
[data-bs-theme="dark"] .text-dark { color: var(--lj-texto) !important; }
[data-bs-theme="dark"] .badge.bg-light { color: var(--lj-texto) !important; }
[data-bs-theme="dark"] .alert-info { --bs-alert-bg: var(--lj-superficie-3); --bs-alert-color: var(--lj-texto); --bs-alert-border-color: var(--lj-borde); }

/* SweetAlert2 y alertify (los usan varias pantallas) */
/* SweetAlert2 carga su CSS después (o lo inyecta por JS) con la misma especificidad: por eso !important.
   Incluye los toast (.swal2-toast) y los parches blancos del ícono de éxito. */
[data-bs-theme="dark"] .swal2-popup,
[data-bs-theme="dark"] .swal2-popup.swal2-toast { background: var(--lj-superficie) !important; color: var(--lj-texto) !important; border: 1px solid var(--lj-borde); }
[data-bs-theme="dark"] .swal2-title,
[data-bs-theme="dark"] .swal2-html-container,
[data-bs-theme="dark"] .swal2-popup.swal2-toast .swal2-title,
[data-bs-theme="dark"] .swal2-popup.swal2-toast .swal2-html-container,
[data-bs-theme="dark"] .swal2-footer { color: var(--lj-texto) !important; }
[data-bs-theme="dark"] .swal2-footer { border-top-color: var(--lj-borde) !important; }
[data-bs-theme="dark"] .swal2-close { color: var(--lj-texto-suave) !important; }
[data-bs-theme="dark"] .swal2-input,
[data-bs-theme="dark"] .swal2-textarea,
[data-bs-theme="dark"] .swal2-select,
[data-bs-theme="dark"] .swal2-file { background: var(--lj-superficie-2) !important; color: var(--lj-texto) !important; border-color: var(--lj-borde) !important; }
[data-bs-theme="dark"] .swal2-validation-message { background: var(--lj-superficie-2) !important; color: var(--lj-texto) !important; }
[data-bs-theme="dark"] .swal2-icon.swal2-success [class^="swal2-success-circular-line"],
[data-bs-theme="dark"] .swal2-icon.swal2-success .swal2-success-fix { background-color: var(--lj-superficie) !important; }
[data-bs-theme="dark"] .swal2-timer-progress-bar { background: var(--lj-texto-tenue) !important; }

/* DataTables (logs) */
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter label,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length label { color: var(--lj-texto-suave); }

/* Etiquetas claras de Bootstrap 5.3 */
[data-bs-theme="dark"] .text-bg-light { background-color: var(--lj-superficie-2) !important; color: var(--lj-texto-suave) !important; border-color: var(--lj-borde) !important; }
[data-bs-theme="dark"] .btn-outline-dark { --bs-btn-color: var(--lj-texto); --bs-btn-border-color: var(--lj-borde); --bs-btn-hover-bg: var(--lj-superficie-2); --bs-btn-hover-color: var(--lj-texto); }

/* Tagify (IPs permitidas en la ficha del operador) */
[data-bs-theme="dark"] .tagify { --tags-border-color: var(--lj-borde); --tag-bg: var(--lj-superficie-3); --tag-text-color: var(--lj-texto); --input-color: var(--lj-texto); background: var(--lj-superficie-2); }
