/**
 * Tema «Azul oscuro» — slate / SaaS (azul #3b82f6, fondo #0f172a)
 * Se aplica cuando html tiene la clase .tema-azul-oscuro
 * (independiente del tema «Oscuro» clásico en tema-oscuro.css)
 */

html.tema-azul-oscuro {
  --erp-bg: #0f172a;
  --erp-surface: #111827;
  --erp-elevated: #1e293b;
  --erp-border: #1e293b;
  --erp-row-hover: #1f2937;
  --erp-primary: #3b82f6;
  --erp-primary-dark: #2563eb;
  --erp-text: #e5e7eb;
  --erp-sidebar: #020617;
  --erp-navbar-toggle-color: #b0b3b8;
}

.tema-azul-oscuro body {
  background-color: var(--erp-bg) !important;
  color: var(--erp-text) !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.tema-azul-oscuro #wrapper {
  background-color: var(--erp-bg);
}

.tema-azul-oscuro #page-wrapper {
  background-color: var(--erp-bg) !important;
  border-left-color: var(--erp-border) !important;
  padding: 20px 24px 32px !important;
}

.tema-azul-oscuro .navbar-default {
  background-color: var(--erp-bg) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro .navbar-header .navbar-brand {
  color: #e4e6eb !important;
}

/*
 * Logo PNG (navbar inicio + pie login): solo una variante visible.
 * Mismas dimensiones que el logo claro (100×35 navbar, 110px ancho pie).
 * html.tema-azul-oscuro por especificidad; sin width/height:auto para no usar tamaño intrínseco del PNG.
 */
.navbar-header .navbar-brand > a > .navbar-logo-oscuro,
.footer .navbar-logo-oscuro {
  display: none !important;
}

html.tema-azul-oscuro .navbar-header .navbar-brand > a > .navbar-logo-claro,
html.tema-azul-oscuro .footer .navbar-logo-claro {
  display: none !important;
}

html.tema-azul-oscuro .navbar-header .navbar-brand > a > .navbar-logo-oscuro {
  display: block !important;
  width: 100px !important;
  height: 35px !important;
  max-width: 100px !important;
  max-height: 35px !important;
  object-fit: contain !important;
  box-sizing: border-box !important;
}

html.tema-azul-oscuro .footer .navbar-logo-oscuro {
  display: inline-block !important;
  width: 110px !important;
  max-width: 110px !important;
  height: auto !important;
  max-height: 40px !important;
  object-fit: contain !important;
  vertical-align: middle;
}

/* Pie del login (index.php): el <style> local pone fondo blanco; alinear con navbar oscura */
html.tema-azul-oscuro footer.footer {
  background-color: var(--erp-surface) !important;
  border-top-color: var(--erp-border) !important;
  color: #94a3b8 !important;
}

.tema-azul-oscuro .indicator-tickets-nav .erp-tickets-nav-badge {
  background-color: #f59e0b !important;
}

.tema-azul-oscuro .indicator-consultas-nav .erp-consultas-nav-badge {
  background-color: #06b6d4 !important;
}

.tema-azul-oscuro .indicator-horas-nav .erp-horas-nav-badge {
  background-color: #22c55e !important;
}

.tema-azul-oscuro .navbar-top-links > li > a {
  color: #b0b3b8 !important;
}

.tema-azul-oscuro .navbar-top-links > li > a:hover,
.tema-azul-oscuro .navbar-top-links > li > a:focus {
  color: #ffffff !important;
  background-color: var(--erp-row-hover) !important;
  text-decoration: none;
}

.tema-azul-oscuro #menu-toggle,
.tema-azul-oscuro #erp-command-palette-trigger {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #b0b3b8 !important;
}

.tema-azul-oscuro #menu-toggle:hover,
.tema-azul-oscuro #menu-toggle:focus,
.tema-azul-oscuro #erp-command-palette-trigger:hover,
.tema-azul-oscuro #erp-command-palette-trigger:focus {
  color: #ffffff !important;
  background-color: var(--erp-row-hover) !important;
}

.tema-azul-oscuro #menu-toggle i,
.tema-azul-oscuro #erp-command-palette-trigger i {
  color: inherit;
}

.tema-azul-oscuro .dropdown-menu {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(148, 163, 184, 0.08) !important;
  padding: 6px 0;
}

.tema-azul-oscuro .dropdown-menu > li > a {
  color: #e4e6eb !important;
  padding: 8px 16px;
}

.tema-azul-oscuro .dropdown-menu > li > a:hover {
  background-color: var(--erp-row-hover) !important;
}

/* Menú lateral: solo existe bajo #sidebar-wrapper (cls_interfaz / inicio) */
.tema-azul-oscuro #sidebar-wrapper {
  --sb-surface: var(--erp-sidebar);
  --sb-text: #cbd5e1;
  --sb-text-soft: #94a3b8;
  --sb-icon: #60a5fa;
  --sb-border: #1e293b;
  --sb-hover: #1f2937;
  --sb-active-bg: #1e293b;
  --sb-active-fg: #f8fafc;
  --sb-input-bg: #0f172a;
  --sb-chevron: #94a3b8;
}

.tema-azul-oscuro #sidebar-wrapper .sidebar.navbar-default {
  background-color: var(--sb-surface) !important;
  border-right-color: var(--sb-border) !important;
}

.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li > a {
  color: var(--sb-text) !important;
}

.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li > a:hover,
.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li > a:focus,
.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li > a:focus-visible {
  background-color: var(--sb-hover) !important;
  color: var(--sb-text) !important;
}

/* Bootstrap: .nav .open > a:focus usa #eee; MetisMenu deja el submenú en .open */
.tema-azul-oscuro #sidebar-wrapper .sidebar .nav .open > a,
.tema-azul-oscuro #sidebar-wrapper .sidebar .nav .open > a:hover,
.tema-azul-oscuro #sidebar-wrapper .sidebar .nav .open > a:focus {
  background-color: var(--sb-hover) !important;
  color: var(--sb-text) !important;
  border-color: var(--sb-border) !important;
}

.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li.active > a {
  background-color: var(--sb-active-bg) !important;
  color: var(--sb-active-fg) !important;
}

.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li.active > a:hover,
.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li.active > a:focus,
.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li.active > a:focus-visible {
  background-color: var(--sb-active-bg) !important;
  color: var(--sb-active-fg) !important;
}

.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li.active.open > a,
.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li.active.open > a:hover,
.tema-azul-oscuro #sidebar-wrapper .sidebar .nav > li.active.open > a:focus {
  background-color: var(--sb-active-bg) !important;
  color: var(--sb-active-fg) !important;
  border-color: var(--sb-border) !important;
}

.tema-azul-oscuro #sidebar-wrapper .nav-second-level > li > a:focus,
.tema-azul-oscuro #sidebar-wrapper .nav-second-level > li > a:focus-visible,
.tema-azul-oscuro #sidebar-wrapper .nav-third-level > li > a:focus,
.tema-azul-oscuro #sidebar-wrapper .nav-third-level > li > a:focus-visible {
  background-color: var(--sb-hover) !important;
  color: var(--sb-text) !important;
}

.tema-azul-oscuro #sidebar-wrapper .nav-second-level > li.active > a:focus,
.tema-azul-oscuro #sidebar-wrapper .nav-second-level > li.active > a:focus-visible,
.tema-azul-oscuro #sidebar-wrapper .nav-third-level > li.active > a:focus,
.tema-azul-oscuro #sidebar-wrapper .nav-third-level > li.active > a:focus-visible {
  background-color: var(--sb-active-bg) !important;
  color: var(--sb-active-fg) !important;
}

.tema-azul-oscuro #sidebar-wrapper .custom-search-form .form-control::placeholder {
  color: #64748b;
}

.tema-azul-oscuro #sidebar-wrapper .custom-search-form .form-control:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

.tema-azul-oscuro .page-header h1,
.tema-azul-oscuro #nombre {
  color: #e4e6eb !important;
}

.tema-azul-oscuro .panel {
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.18) !important;
  border: 1px solid var(--erp-border) !important;
  overflow: hidden;
}

.tema-azul-oscuro .panel.panel-default {
  border: none !important;
  box-shadow:
    inset 0 0 0 1px var(--erp-border),
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.18) !important;
}

.tema-azul-oscuro .panel-default {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro .panel-default .panel-heading {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: var(--erp-text) !important;
  padding: 14px 18px !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Título del formulario (h2.erp-form-title): en erp_formulario.css lleva #212529 y tapa el color del heading */
.tema-azul-oscuro .erp-form-card .erp-form-title {
  color: #ffffff !important;
}

.tema-azul-oscuro .panel-default .panel-body {
  background-color: var(--erp-surface) !important;
  color: var(--erp-text) !important;
  padding: 18px 20px !important;
}

/* Bootstrap .well: fondo claro por defecto; con texto claro del panel queda ilegible (p. ej. reportes diarios DGI) */
.tema-azul-oscuro .well {
  background-color: var(--erp-bg) !important;
  border: 1px solid var(--erp-border) !important;
  border-radius: 10px !important;
  color: var(--erp-text) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tema-azul-oscuro .well label,
.tema-azul-oscuro .well .small,
.tema-azul-oscuro .well strong {
  color: #e4e6eb !important;
}

/* Vacío de informes (htmlInformeSinResultados): texto secundario e icono */
.tema-azul-oscuro .informe-sin-resultados .text-muted {
  color: #9ca3af !important;
}
.tema-azul-oscuro .informe-sin-resultados .fa.text-muted {
  color: #6b7280 !important;
}

.tema-azul-oscuro .erp-form-floating-actions-inner {
  background: rgba(17, 24, 39, 0.97) !important;
  border-color: var(--erp-border) !important;
  box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

.tema-azul-oscuro .panel-green .panel-heading { background: #2d5a2d !important; color: #fff !important; }
.tema-azul-oscuro .panel-red .panel-heading { background: #5a2d2d !important; color: #fff !important; }
.tema-azul-oscuro .panel-primary .panel-heading { background: var(--erp-primary-dark) !important; color: #fff !important; }
/* panel-primary: sin estilo de cuerpo, Bootstrap deja fondo blanco → texto claro del body ilegible */
.tema-azul-oscuro .panel-primary {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}
.tema-azul-oscuro .panel-primary .panel-body {
  background-color: var(--erp-surface) !important;
  color: var(--erp-text) !important;
  padding: 18px 20px !important;
}
.tema-azul-oscuro .panel-primary .panel-body code {
  color: #93c5fd !important;
  background-color: var(--erp-bg) !important;
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.tema-azul-oscuro .panel-yellow .panel-heading { background: #5a4a2d !important; color: #fff !important; }

.tema-azul-oscuro .table {
  background-color: var(--erp-surface) !important;
  color: var(--erp-text) !important;
  border-collapse: separate;
  border-spacing: 0;
}

.tema-azul-oscuro .table > thead > tr > th {
  background-color: var(--erp-elevated) !important;
  color: var(--erp-text) !important;
  border-color: transparent !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
  font-weight: 600;
}

.tema-azul-oscuro .table > tbody > tr > td {
  border-color: transparent !important;
  border-top: 1px solid rgba(148, 163, 184, 0.08) !important;
  color: var(--erp-text) !important;
}

.tema-azul-oscuro .table > tbody > tr:hover {
  background-color: var(--erp-row-hover) !important;
}

/* table-striped: Bootstrap pinta filas impares en #f9f9f9; en oscuro deja texto claro ilegible */
.tema-azul-oscuro .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: var(--erp-bg) !important;
}

.tema-azul-oscuro .table-striped > tbody > tr:nth-of-type(even) {
  background-color: var(--erp-surface) !important;
}

.tema-azul-oscuro .table-striped > tbody > tr:nth-of-type(odd) > td,
.tema-azul-oscuro .table-striped > tbody > tr:nth-of-type(odd) > th,
.tema-azul-oscuro .table-striped > tbody > tr:nth-of-type(even) > td,
.tema-azul-oscuro .table-striped > tbody > tr:nth-of-type(even) > th {
  color: var(--erp-text) !important;
  border-color: transparent !important;
  border-top: 1px solid rgba(148, 163, 184, 0.08) !important;
}

.tema-azul-oscuro .table-striped > tbody > tr:hover > td,
.tema-azul-oscuro .table-striped > tbody > tr:hover > th {
  background-color: var(--erp-row-hover) !important;
  color: #f8fafc !important;
}

.tema-azul-oscuro .table-hover > tbody > tr:hover {
  background-color: var(--erp-row-hover) !important;
}

.tema-azul-oscuro .table-bordered > thead > tr > th,
.tema-azul-oscuro .table-bordered > tbody > tr > td {
  border-color: rgba(148, 163, 184, 0.12) !important;
}

/* Fila .info (p. ej. proceso MySQL «esta sesión»): Bootstrap usa #d9edf7; texto claro queda invisible */
.tema-azul-oscuro .table > tbody > tr.info > td,
.tema-azul-oscuro .table > tbody > tr.info > th,
.tema-azul-oscuro .table > tbody > tr > td.info,
.tema-azul-oscuro .table > tbody > tr > th.info {
  background-color: rgba(37, 99, 235, 0.2) !important;
  color: var(--erp-text) !important;
}
.tema-azul-oscuro .table-hover > tbody > tr.info:hover > td,
.tema-azul-oscuro .table-hover > tbody > tr.info:hover > th {
  background-color: rgba(37, 99, 235, 0.32) !important;
  color: #f8fafc !important;
}

/* Alertas Bootstrap en formularios (p. ej. límites al subir adjuntos) */
.tema-azul-oscuro .alert.alert-info {
  background-color: #1a2f4a !important;
  border-color: #2d4a6a !important;
  color: #bfdbfe !important;
}

.tema-azul-oscuro .alert.alert-info .fa {
  color: #7dd3fc !important;
}

.tema-azul-oscuro .alert .close {
  color: #e4e6eb !important;
  opacity: 0.85;
  text-shadow: none;
}

.tema-azul-oscuro .alert .close:hover,
.tema-azul-oscuro .alert .close:focus {
  color: #ffffff !important;
  opacity: 1;
}

/* Dropzone (subida de adjuntos — include/dropzone/dropzone.css) */
.tema-azul-oscuro .dropzone {
  border-color: #475569 !important;
  background-color: var(--erp-bg) !important;
  border-radius: 10px;
}

.tema-azul-oscuro .dropzone .dz-message,
.tema-azul-oscuro .dropzone .dz-message span {
  color: #e4e6eb !important;
}

.tema-azul-oscuro .dropzone.dz-drag-hover {
  border-color: var(--erp-primary) !important;
  background-color: var(--erp-elevated) !important;
}

.tema-azul-oscuro .dropzone .dz-preview,
.tema-azul-oscuro .dropzone-previews .dz-preview {
  background: rgba(17, 24, 39, 0.95) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro .dropzone .dz-preview .dz-details,
.tema-azul-oscuro .dropzone-previews .dz-preview .dz-details {
  background: var(--erp-surface) !important;
}

.tema-azul-oscuro .dropzone .dz-preview .dz-filename span,
.tema-azul-oscuro .dropzone-previews .dz-preview .dz-filename span,
.tema-azul-oscuro .dropzone .dz-preview .dz-size,
.tema-azul-oscuro .dropzone-previews .dz-preview .dz-size {
  color: #e4e6eb !important;
}

.tema-azul-oscuro .dropzone .dz-preview .dz-progress,
.tema-azul-oscuro .dropzone-previews .dz-preview .dz-progress {
  background: #1f2937 !important;
}

.tema-azul-oscuro .dropzone .dz-preview .dz-error-message,
.tema-azul-oscuro .dropzone-previews .dz-preview .dz-error-message {
  background: #3d1f24 !important;
  color: #fecaca !important;
}

.tema-azul-oscuro .dropzone a.dz-remove {
  color: #93c5fd !important;
}

/* Enlaces de nombres de archivo en listado de adjuntos (inline color:black en cls_interfaz) */
.tema-azul-oscuro .erp-form a.gallery-image-options {
  color: #93c5fd !important;
}

.tema-azul-oscuro .form-control {
  background-color: var(--erp-bg) !important;
  border: 1px solid #334155 !important;
  color: var(--erp-text) !important;
  border-radius: 8px !important;
}

/*
 * Focus / hover / autofill: Bootstrap no redefine fondo en :focus, pero el orden de hojas y estilos
 * inyectados (p. ej. operación) puede dejar texto claro sobre fondo claro. Forzamos coherencia en todo el ERP.
 */
html.tema-azul-oscuro .form-control::placeholder {
  color: rgba(228, 230, 235, 0.48) !important;
}

html.tema-azul-oscuro .form-control:hover:not(.btn):not([readonly]):not(:disabled),
html.tema-azul-oscuro select.form-control:hover:not(.btn):not(:disabled):not([disabled]) {
  background-color: var(--erp-elevated) !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

html.tema-azul-oscuro .form-control:focus:not(.btn):not([readonly]):not(:disabled),
html.tema-azul-oscuro select.form-control:focus:not(.btn):not(:disabled):not([disabled]),
html.tema-azul-oscuro textarea.form-control:focus:not(.btn):not([readonly]):not(:disabled) {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22) !important;
}

html.tema-azul-oscuro input.form-control:-webkit-autofill,
html.tema-azul-oscuro input.form-control:-webkit-autofill:hover,
html.tema-azul-oscuro input.form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--erp-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--erp-bg) inset !important;
  -webkit-text-fill-color: var(--erp-text) !important;
  caret-color: var(--erp-text);
  border-color: #334155 !important;
}

html.tema-azul-oscuro input.form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--erp-elevated) inset !important;
  box-shadow: 0 0 0 1000px var(--erp-elevated) inset !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: var(--erp-primary) !important;
}

.tema-azul-oscuro .modal-content {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255,255,255,0.04) !important;
}

.tema-azul-oscuro .modal-header {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: var(--erp-text) !important;
}

.tema-azul-oscuro .modal-body {
  background-color: var(--erp-surface) !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro .modal-footer {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro .loader {
  background-color: var(--erp-bg) !important;
}

.tema-azul-oscuro .nav-tabs > li > a {
  color: #b0b3b8 !important;
}

.tema-azul-oscuro .nav-tabs > li.active > a {
  background-color: var(--erp-surface) !important;
  color: var(--erp-primary) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro .btn-default {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: #e4e6eb !important;
  border-radius: 8px !important;
}

html.tema-azul-oscuro .btn-primary {
  background-color: var(--erp-primary) !important;
  border-color: var(--erp-primary-dark) !important;
  color: #fff !important;
  border-radius: 8px !important;
}

html.tema-azul-oscuro .btn-primary:hover,
html.tema-azul-oscuro .btn-primary:focus,
html.tema-azul-oscuro .btn-primary:active,
html.tema-azul-oscuro .btn-primary.active,
.tema-azul-oscuro .open > .dropdown-toggle.btn-primary {
  background-color: var(--erp-primary-dark) !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
}

/* Bootstrap 3 no define .btn-secondary; el HTML de modales (cls_comprobantes) lo usa → sin estilo queda fondo claro */
html.tema-azul-oscuro .btn-secondary {
  background-color: #3d4450 !important;
  border-color: #4b5563 !important;
  color: #ffffff !important;
}

html.tema-azul-oscuro .btn-secondary:hover,
html.tema-azul-oscuro .btn-secondary:focus {
  background-color: #4d5565 !important;
  border-color: #6b7280 !important;
  color: #ffffff !important;
}

.tema-azul-oscuro .text-muted {
  color: #9ca3af !important;
}

/* DataTables - contenedores y controles */
.tema-azul-oscuro .dataTables_wrapper {
  color: var(--erp-text) !important;
  background-color: transparent !important;
  padding: 4px 0 12px;
}

.tema-azul-oscuro div.dataTables_length label,
.tema-azul-oscuro div.dataTables_filter label,
.tema-azul-oscuro div.dataTables_info {
  color: #e4e6eb !important;
}

.tema-azul-oscuro div.dataTables_length select {
  background-color: var(--erp-bg) !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  color: var(--erp-text) !important;
}

.tema-azul-oscuro div.dataTables_filter input {
  background-color: var(--erp-bg) !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  color: var(--erp-text) !important;
}

.tema-azul-oscuro div.dataTables_paginate {
  color: #e4e6eb !important;
}

.tema-azul-oscuro div.dataTables_paginate .paginate_button {
  background: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: var(--erp-text) !important;
  border-radius: 8px !important;
}

.tema-azul-oscuro div.dataTables_paginate .paginate_button:hover {
  background: var(--erp-row-hover) !important;
  border-color: #475569 !important;
  color: #fff !important;
}

.tema-azul-oscuro div.dataTables_paginate .paginate_button.current {
  background: var(--erp-primary) !important;
  border-color: var(--erp-primary) !important;
  color: #fff !important;
}

.tema-azul-oscuro div.dataTables_paginate .paginate_button.disabled {
  color: #64748b !important;
  background: var(--erp-surface) !important;
}

/* DataTables pagination (Bootstrap style) */
.tema-azul-oscuro div.dataTables_paginate ul.pagination > li > a {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: var(--erp-text) !important;
  border-radius: 8px !important;
}

.tema-azul-oscuro div.dataTables_paginate ul.pagination > li > a:hover {
  background-color: var(--erp-row-hover) !important;
  border-color: #475569 !important;
  color: #fff !important;
}

.tema-azul-oscuro div.dataTables_paginate ul.pagination > li.active > a {
  background-color: var(--erp-primary) !important;
  border-color: var(--erp-primary) !important;
  color: #fff !important;
}

.tema-azul-oscuro div.dataTables_paginate ul.pagination > li.disabled > a {
  color: #64748b !important;
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}

/*
 * Cabeceras DataTables: gana a inicio.php (sorting_* con fondo claro #e9ecef)
 * y mantiene iconos de orden sin romper layout.
 */
html.tema-azul-oscuro table.dataTable thead .sorting,
html.tema-azul-oscuro table.dataTable thead .sorting_asc,
html.tema-azul-oscuro table.dataTable thead .sorting_desc,
html.tema-azul-oscuro table.dataTable thead .sorting_disabled {
  background-color: var(--erp-elevated) !important;
  background-image: none !important;
  color: var(--erp-text) !important;
}

/* DataTables - tabla */
.tema-azul-oscuro table.dataTable {
  background-color: var(--erp-surface) !important;
  color: var(--erp-text) !important;
  border-color: var(--erp-border) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.tema-azul-oscuro table.dataTable thead th,
.tema-azul-oscuro table.dataTable thead td {
  background-color: var(--erp-elevated) !important;
  color: var(--erp-text) !important;
  border-color: transparent !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
  font-weight: 600;
}

.tema-azul-oscuro table.dataTable tbody td,
.tema-azul-oscuro table.dataTable tbody th {
  background-color: var(--erp-surface) !important;
  color: var(--erp-text) !important;
  border-color: transparent !important;
  border-top: 1px solid rgba(148, 163, 184, 0.08) !important;
}

.tema-azul-oscuro table.dataTable tbody tr:hover td,
.tema-azul-oscuro table.dataTable tbody tr:hover th {
  background-color: var(--erp-row-hover) !important;
}

.tema-azul-oscuro table.dataTable.stripe tbody tr.odd,
.tema-azul-oscuro table.dataTable.display tbody tr.odd {
  background-color: var(--erp-bg) !important;
}

.tema-azul-oscuro table.dataTable.stripe tbody tr.odd td,
.tema-azul-oscuro table.dataTable.display tbody tr.odd td {
  background-color: var(--erp-bg) !important;
}

.tema-azul-oscuro table.dataTable.stripe tbody tr.even,
.tema-azul-oscuro table.dataTable.display tbody tr.even {
  background-color: var(--erp-surface) !important;
}

.tema-azul-oscuro table.dataTable.stripe tbody tr.even td,
.tema-azul-oscuro table.dataTable.display tbody tr.even td {
  background-color: var(--erp-surface) !important;
}

.tema-azul-oscuro table.dataTable tfoot th,
.tema-azul-oscuro table.dataTable tfoot td {
  background-color: var(--erp-elevated) !important;
  color: var(--erp-text) !important;
  border-color: rgba(148, 163, 184, 0.12) !important;
}

.tema-azul-oscuro table.dataTable td.dataTables_empty {
  color: #9ca3af !important;
}

.tema-azul-oscuro table.dataTable thead input {
  background-color: var(--erp-bg) !important;
  border: 1px solid #334155 !important;
  border-radius: 6px !important;
  color: var(--erp-text) !important;
}

/* Scroller / scroll body */
.tema-azul-oscuro div.dataTables_scrollBody {
  background-color: var(--erp-surface) !important;
  background: var(--erp-surface) !important;
}

.tema-azul-oscuro div.DTS div.dataTables_scrollBody {
  background: repeating-linear-gradient(
    45deg,
    var(--erp-bg),
    var(--erp-bg) 10px,
    var(--erp-surface) 10px,
    var(--erp-surface) 20px
  ) !important;
}

.tema-azul-oscuro div.dataTables_scrollHead table,
.tema-azul-oscuro div.dataTables_scrollFoot table {
  background-color: var(--erp-elevated) !important;
}

.tema-azul-oscuro div.FixedHeader_Cloned table thead th {
  background-color: var(--erp-elevated) !important;
  color: var(--erp-text) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro div.DTFC_LeftHeadWrapper table,
.tema-azul-oscuro div.DTFC_RightHeadWrapper table,
.tema-azul-oscuro div.DTFC_LeftFootWrapper table,
.tema-azul-oscuro div.DTFC_RightFootWrapper table {
  background-color: var(--erp-elevated) !important;
}

.tema-azul-oscuro table.DTFC_Cloned tr.even {
  background-color: var(--erp-bg) !important;
}

/* Processing / loading */
.tema-azul-oscuro div.dataTables_processing {
  background: rgba(15, 23, 42, 0.92) !important;
  color: var(--erp-text) !important;
  border-radius: 10px !important;
}

/* Botones DT */
.tema-azul-oscuro .dt-buttons .dt-button,
.tema-azul-oscuro .dt-buttons div.dt-btn-split-wrapper button.dt-btn-split-drop,
.tema-azul-oscuro .dt-buttons .buttons-colvis {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: var(--erp-text) !important;
  border-radius: 8px !important;
}

.tema-azul-oscuro .dt-buttons .dt-button:hover,
.tema-azul-oscuro .dt-buttons .dt-button:focus,
.tema-azul-oscuro .dt-buttons .buttons-colvis:hover {
  background-color: var(--erp-row-hover) !important;
  border-color: #475569 !important;
  color: #fff !important;
}

.tema-azul-oscuro .dt-button-collection {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
}

.tema-azul-oscuro .dt-button-collection a {
  color: var(--erp-text) !important;
}

.tema-azul-oscuro .dt-button-collection a:hover {
  background-color: var(--erp-row-hover) !important;
}

.tema-azul-oscuro div.dt-button-info {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  color: var(--erp-text) !important;
  border-radius: 10px !important;
}

.tema-azul-oscuro div.dt-button-info h2 {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: var(--erp-text) !important;
}

/* Responsive / child rows */
.tema-azul-oscuro table.dataTable > tbody > tr.child ul.dtr-details > li {
  border-bottom-color: var(--erp-border) !important;
}

.tema-azul-oscuro div.dtr-modal div.dtr-modal-display {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro div.dtr-modal div.dtr-modal-content {
  color: #e4e6eb !important;
}

.tema-azul-oscuro div.dtr-modal div.dtr-modal-close {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: #e4e6eb !important;
}

/* RowGroup */
.tema-azul-oscuro table.dataTable tr.dtrg-group td {
  background-color: var(--erp-elevated) !important;
  color: #e4e6eb !important;
}

.tema-azul-oscuro table.dataTable tr.dtrg-group.dtrg-level-1 td,
.tema-azul-oscuro table.dataTable tr.dtrg-group.dtrg-level-2 td {
  background-color: var(--erp-surface) !important;
}

/* Sort icons (FontAwesome overrides para tema oscuro) */
.tema-azul-oscuro table.dataTable thead .sorting:after {
  color: rgba(156, 163, 175, 0.7) !important;
}

.tema-azul-oscuro table.dataTable thead .sorting_asc:after,
.tema-azul-oscuro table.dataTable thead .sorting_desc:after {
  color: var(--erp-primary) !important;
}

/* Order-column / sorting columns */
.tema-azul-oscuro table.dataTable.order-column tbody tr > .sorting_1,
.tema-azul-oscuro table.dataTable.display tbody tr > .sorting_1,
.tema-azul-oscuro table.dataTable.order-column tbody tr > .sorting_2,
.tema-azul-oscuro table.dataTable.display tbody tr > .sorting_2,
.tema-azul-oscuro table.dataTable.order-column tbody tr > .sorting_3,
.tema-azul-oscuro table.dataTable.display tbody tr > .sorting_3 {
  background-color: var(--erp-surface) !important;
}

.tema-azul-oscuro table.dataTable.display tbody tr.odd > .sorting_1,
.tema-azul-oscuro table.dataTable.display tbody tr.odd > .sorting_2,
.tema-azul-oscuro table.dataTable.display tbody tr.odd > .sorting_3 {
  background-color: var(--erp-bg) !important;
}

.tema-azul-oscuro table.dataTable tbody tr.selected,
.tema-azul-oscuro table.dataTable tbody tr > .selected {
  background-color: rgba(59, 130, 246, 0.18) !important;
}

.tema-azul-oscuro table.dataTable tbody tr.selected td,
.tema-azul-oscuro table.dataTable tbody tr.selected th {
  background-color: rgba(59, 130, 246, 0.18) !important;
}

/* Login page */
.tema-azul-oscuro .login-panel {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro .login-panel .panel-heading {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: #e4e6eb !important;
}

.tema-azul-oscuro .login-panel .panel-body {
  background-color: var(--erp-surface) !important;
  color: #e4e6eb !important;
}

.tema-azul-oscuro .login-remember {
  border-color: var(--erp-border) !important;
  background: var(--erp-elevated) !important;
  color: #e4e6eb !important;
}

.tema-azul-oscuro .login-remember:hover {
  border-color: #4a6fa8 !important;
  background: rgba(74, 111, 168, 0.15) !important;
}

.tema-azul-oscuro .login-remember:focus-within {
  border-color: var(--erp-primary) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22) !important;
}

/*
 * Login index.php: estilos en línea forzaban addon blanco; usuario + autofill quedaban ilegibles.
 * Especificidad alta para ganar a Bootstrap y a index.php.
 */
/*
 * Login index.php: el .form-control global usa border-radius: 8px !important y rompe el input-group
 * de Bootstrap (dos bloques redondeados separados). Forzamos radios solo en los extremos, como tema oscuro.
 */
html.tema-azul-oscuro .login-panel .input-group .input-group-addon:first-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
  border-right: 0 !important;
}

html.tema-azul-oscuro .login-panel .input-group .form-control:last-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}

html.tema-azul-oscuro .login-panel .input-group .input-group-addon {
  background-color: var(--erp-elevated) !important;
  background-image: none !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

html.tema-azul-oscuro .login-panel .input-group .input-group-addon .fa {
  color: #9ca3af !important;
}

html.tema-azul-oscuro .login-panel .input-group .form-control {
  background-color: var(--erp-elevated) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro .login-panel .input-group .form-control:focus {
  background-color: #273549 !important;
  border-color: var(--erp-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.45) !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}

html.tema-azul-oscuro .login-panel .input-group .form-control::placeholder {
  color: rgba(232, 234, 239, 0.5) !important;
}

html.tema-azul-oscuro .login-panel input.form-control:-webkit-autofill,
html.tema-azul-oscuro .login-panel input.form-control:-webkit-autofill:hover,
html.tema-azul-oscuro .login-panel input.form-control:-webkit-autofill:focus,
html.tema-azul-oscuro .login-panel input.form-control:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--erp-elevated) inset !important;
  box-shadow: 0 0 0 1000px var(--erp-elevated) inset !important;
  -webkit-text-fill-color: #e8eaef !important;
  caret-color: #e8eaef;
  border-color: #334155 !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
  transition: background-color 99999s ease-out 0s !important;
}

html.tema-azul-oscuro .login-panel input.form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #273549 inset !important;
  box-shadow: 0 0 0 1000px #273549 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: var(--erp-primary) !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
}

html.tema-azul-oscuro .login-panel .panel-heading .panel-subtitle {
  color: #9ca3af !important;
}

/* Formulario operación / comprobantes (operacion.php, cls_comprobantes) */
.tema-azul-oscuro #operacion {
  color: #e4e6eb !important;
}

.tema-azul-oscuro #operacion #cabezal {
  background: var(--erp-elevated) !important;
  background-image: none !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro #operacion #cabezal input,
.tema-azul-oscuro #operacion #cabezal select {
  background-color: var(--erp-surface) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro #operacion #cabezal input:hover,
.tema-azul-oscuro #operacion #cabezal input:focus {
  background-color: var(--erp-row-hover) !important;
  border-color: #475569 !important;
}

.tema-azul-oscuro #operacion #busqueda {
  /* Igual que cuerpo de Tabla_Articulos: el gutter de scrollbar-gutter no muestra otro tono a la derecha */
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro #operacion #busqueda input,
.tema-azul-oscuro #operacion #busqueda select {
  background-color: var(--erp-surface) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro #operacion #busqueda input:hover,
.tema-azul-oscuro #operacion #busqueda input:focus {
  background-color: var(--erp-row-hover) !important;
  border-color: #475569 !important;
}

.tema-azul-oscuro #operacion #detalle {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro #operacion #detalle table {
  background-color: var(--erp-surface) !important;
}

.tema-azul-oscuro #operacion #Tabla_Articulos,
.tema-azul-oscuro #operacion #Tabla_LineasArticulos {
  background-color: var(--erp-surface) !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro #operacion #Tabla_Articulos thead th,
.tema-azul-oscuro #operacion #Tabla_LineasArticulos thead th {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro #operacion #Tabla_Articulos tbody tr,
.tema-azul-oscuro #operacion #Tabla_LineasArticulos tbody tr {
  background-color: var(--erp-surface) !important;
}

.tema-azul-oscuro #operacion #Tabla_Articulos tbody tr:hover,
.tema-azul-oscuro #operacion #Tabla_LineasArticulos tbody tr:hover {
  background-color: var(--erp-row-hover) !important;
}

.tema-azul-oscuro #operacion #Tabla_Articulos .form-control,
.tema-azul-oscuro #operacion #Tabla_LineasArticulos .form-control {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro #operacion #Tabla_Articulos .form-control::placeholder,
.tema-azul-oscuro #operacion #Tabla_LineasArticulos .form-control::placeholder {
  color: rgba(228, 230, 235, 0.5) !important;
}

.tema-azul-oscuro #operacion #Tabla_Articulos .form-control[readonly],
.tema-azul-oscuro #operacion #Tabla_LineasArticulos .form-control[readonly],
.tema-azul-oscuro #operacion #Tabla_Articulos .form-control:disabled,
.tema-azul-oscuro #operacion #Tabla_LineasArticulos .form-control:disabled {
  background-color: var(--erp-bg) !important;
  border-color: var(--erp-border) !important;
  color: rgba(228, 230, 235, 0.58) !important;
  opacity: 1 !important;
}
.tema-azul-oscuro #operacion #Tabla_Articulos .form-control[readonly],
.tema-azul-oscuro #operacion #Tabla_LineasArticulos .form-control[readonly] {
  cursor: default;
}
.tema-azul-oscuro #operacion #Tabla_Articulos .form-control:disabled,
.tema-azul-oscuro #operacion #Tabla_LineasArticulos .form-control:disabled {
  cursor: not-allowed;
}

.tema-azul-oscuro #operacion #totales {
  background-color: var(--erp-elevated) !important;
  background-image: none !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro #operacion #totales td {
  color: #e4e6eb !important;
}

.tema-azul-oscuro #operacion input[readonly]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.tema-azul-oscuro #operacion input:disabled:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.tema-azul-oscuro #operacion select[disabled],
.tema-azul-oscuro #operacion select:disabled,
.tema-azul-oscuro #operacion textarea[readonly],
.tema-azul-oscuro #operacion textarea:disabled {
  background-color: var(--erp-bg) !important;
  border-color: var(--erp-border) !important;
  color: rgba(228, 230, 235, 0.58) !important;
  opacity: 1 !important;
}
.tema-azul-oscuro #operacion input[readonly]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.tema-azul-oscuro #operacion textarea[readonly] {
  cursor: default;
}
.tema-azul-oscuro #operacion input:disabled:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.tema-azul-oscuro #operacion select:disabled,
.tema-azul-oscuro #operacion select[disabled],
.tema-azul-oscuro #operacion textarea:disabled {
  cursor: not-allowed;
}

.tema-azul-oscuro #operacion input.subtotal:not([readonly]):not(:disabled),
.tema-azul-oscuro #operacion input.neto:not([readonly]):not(:disabled),
.tema-azul-oscuro #operacion input.iva:not([readonly]):not(:disabled),
.tema-azul-oscuro #operacion input.redondeo:not([readonly]):not(:disabled),
.tema-azul-oscuro #operacion input.total:not([readonly]):not(:disabled),
.tema-azul-oscuro #operacion input.descuento:not([readonly]):not(:disabled),
.tema-azul-oscuro #operacion input.descuento_porcentaje:not([readonly]):not(:disabled) {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro #operacion textarea#operacion_observaciones,
.tema-azul-oscuro #operacion #operacion_observaciones {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro #operacion button.agregar {
  background-color: #2d5a2d !important;
  border-color: #3a6a3a !important;
  color: #fff !important;
}

.tema-azul-oscuro #operacion button.agregar:hover {
  background-color: #3a6a3a !important;
}

/*
 * Comprobante / operacion.php (layout .comprobante — sin wrapper #operacion).
 * cls_comprobantes usa color: #000000 en etiquetas y fondos #fff en #busqueda / tablas.
 */
html.tema-azul-oscuro .comprobante .panel.panel-default {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}

html.tema-azul-oscuro .comprobante .panel-default > .panel-heading {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: var(--erp-text) !important;
}

html.tema-azul-oscuro .comprobante .panel-default > .panel-body,
html.tema-azul-oscuro .comprobante .panel-default > .panel-body.comprobante-layout {
  background-color: var(--erp-surface) !important;
  color: #e8eaef !important;
}

/*
 * Modales operación / cls_comprobantes (.comprobante-modal-cabezal): CSS inyectado fuerza cabezal y cuerpo claros,
 * título #0f172a y .close oscuro. html.tema-azul-oscuro gana en cascada frente a esas reglas solo con clase.
 */
html.tema-azul-oscuro .modal-content.comprobante-modal-cabezal {
  border-color: var(--erp-border) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-header {
  background-color: var(--erp-elevated) !important;
  background-image: none !important;
  border-bottom-color: var(--erp-border) !important;
  color: var(--erp-text) !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-title,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-header h4.modal-title,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-header h5.modal-title {
  color: #ffffff !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-header .close {
  color: #e8eaef !important;
  text-shadow: none !important;
  opacity: 0.9 !important;
  filter: none !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-header .close:hover,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-header .close:focus {
  color: #ffffff !important;
  opacity: 1 !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body {
  background-color: var(--erp-surface) !important;
  background-image: none !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-footer {
  background-color: var(--erp-elevated) !important;
  background-image: none !important;
  border-top-color: var(--erp-border) !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .form-control,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body select.form-control,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body textarea.form-control {
  color: #e8eaef !important;
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  box-shadow: none !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .form-control:hover:not(.btn):not([readonly]):not(:disabled),
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body select.form-control:hover:not(.btn):not(:disabled):not([disabled]) {
  background-color: var(--erp-elevated) !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .form-control:focus:not(.btn):not([readonly]):not(:disabled),
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body select.form-control:focus:not(.btn):not(:disabled):not([disabled]),
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body textarea.form-control:focus:not(.btn):not([readonly]):not(:disabled) {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22) !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body input[readonly].form-control,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body textarea[readonly].form-control {
  background-color: var(--erp-bg) !important;
  color: rgba(228, 230, 235, 0.65) !important;
  border-color: var(--erp-border) !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body input:disabled.form-control,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body select:disabled.form-control,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body textarea:disabled.form-control {
  background-color: var(--erp-bg) !important;
  color: rgba(228, 230, 235, 0.55) !important;
  border-color: var(--erp-border) !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22none%22%20viewBox%3D%220%200%2024%2024%22%20stroke%3D%22%23e8eaef%22%3E%3Cpath%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M19%209l-7%207-7-7%22%2F%3E%3C%2Fsvg%3E") !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .comprobante-modal-cabezal-buscar label {
  color: #e8eaef !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .comprobante-modal-inline-label,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body table td label,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body table th label {
  color: #e8eaef !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .table thead th {
  color: #cbd5e1 !important;
  border-bottom-color: var(--erp-border) !important;
  background-color: transparent !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .table td,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .table tbody th {
  border-color: var(--erp-border) !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .table-striped > tbody > tr:nth-child(odd) > td,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .table-striped > tbody > tr:nth-child(odd) > th {
  background-color: rgba(0, 0, 0, 0.15) !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .nav-tabs {
  border-bottom-color: var(--erp-border) !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .nav-tabs > li > a {
  color: #b0b3b8 !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .nav-tabs > li.active > a,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .nav-tabs > li.active > a:hover,
html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .nav-tabs > li.active > a:focus {
  color: #f8fafc !important;
  background-color: var(--erp-bg) !important;
  border-color: var(--erp-border) !important;
  border-bottom-color: transparent !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .comprobante-modal-cabezal-buscar .erp-ref-buscar-group > .input-group-addon {
  color: #e8eaef !important;
  background-color: var(--erp-elevated) !important;
  border-color: #334155 !important;
}

html.tema-azul-oscuro .comprobante-modal-cabezal .modal-body .comprobante-modal-cabezal-buscar .erp-ref-buscar-group > .form-control:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22) !important;
}

html.tema-azul-oscuro .comprobante-shell,
html.tema-azul-oscuro .comprobante-bloque--cabezal,
html.tema-azul-oscuro .comprobante-cabezal-wrap,
html.tema-azul-oscuro .comprobante-cabezal {
  background-color: var(--erp-surface) !important;
}

html.tema-azul-oscuro .comprobante-bloque--detalle {
  background-color: var(--erp-surface) !important;
  border-top-color: rgba(255, 255, 255, 0.06) !important;
}

html.tema-azul-oscuro .comprobante-bloque--detalle #busqueda,
html.tema-azul-oscuro .comprobante-bloque--detalle #detalle {
  background-color: var(--erp-surface) !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro .comprobante .comprobante-bloque--detalle #busqueda table#Tabla_Articulos thead.linea-articulo > tr > th {
  color: #cbd5e1 !important;
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
}

html.tema-azul-oscuro .comprobante-bloque--detalle .table,
html.tema-azul-oscuro .comprobante-bloque--detalle .table-responsive {
  background-color: var(--erp-surface) !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro .comprobante #Tabla_Articulos > tbody > tr > td,
html.tema-azul-oscuro .comprobante #Tabla_LineasArticulos > tbody > tr > td {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro .comprobante-bloque--pie {
  background-color: var(--erp-surface) !important;
}

.tema-azul-oscuro .comprobante .comprobante-cabezal-col .form-group.row > label.col-form-label,
.tema-azul-oscuro .comprobante .comprobante-cabezal-col .form-group.row > .col-form-label {
  color: #e4e6eb !important;
}

.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales .form-group.row > label.col-form-label,
.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales .form-group.row > .col-form-label {
  color: #e4e6eb !important;
}

.tema-azul-oscuro .comprobante #busqueda {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro .comprobante .comprobante-bloque--detalle #busqueda,
.tema-azul-oscuro .comprobante .comprobante-bloque--detalle #detalle {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.tema-azul-oscuro .comprobante .comprobante-bloque--detalle #busqueda table#Tabla_Articulos thead.linea-articulo > tr > th {
  color: #cbd5e1 !important;
  background-color: var(--erp-elevated) !important;
}

.tema-azul-oscuro .comprobante #Tabla_Articulos tr[style*="background-color:white"],
.tema-azul-oscuro .comprobante #Tabla_Articulos tr[style*="background-color: white"],
.tema-azul-oscuro .comprobante #Tabla_LineasArticulos tr[style*="background-color:white"],
.tema-azul-oscuro .comprobante #Tabla_LineasArticulos tr[style*="background-color: white"] {
  background-color: var(--erp-surface) !important;
}

.tema-azul-oscuro .comprobante .table-fixed-header thead th {
  background: var(--erp-elevated) !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro .comprobante #Tabla_Articulos thead th,
.tema-azul-oscuro .comprobante #Tabla_LineasArticulos thead th {
  background-color: var(--erp-elevated) !important;
  color: #e8eaef !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro .comprobante .comprobante-cabezal > .row + .row {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.tema-azul-oscuro .comprobante .comprobante-bloque--pie > .col-lg-12 hr {
  border-top-color: rgba(255, 255, 255, 0.12) !important;
}

.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales {
  border-top-color: rgba(255, 255, 255, 0.12) !important;
}

/* Cabezal: Serie/Número readonly — mismo tono que el resto de controles */
.tema-azul-oscuro .comprobante .comprobante-cabezal .form-control[readonly]:not(.btn),
.tema-azul-oscuro .comprobante .comprobante-cabezal select[disabled],
.tema-azul-oscuro .comprobante .comprobante-cabezal select:disabled {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #dce1ea !important;
  opacity: 1 !important;
}

/* Pie: observaciones + Subtotal / Total (evita campos que se ven “blancos”) */
.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales .form-control:not(.btn),
.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales select.form-control,
.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales textarea.form-control {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales .form-control[readonly]:not(.btn),
.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales textarea.form-control[readonly] {
  background-color: var(--erp-bg) !important;
  color: #f8fafc !important;
}

/*
 * Pie #totales: cssComprobante() inyecta fondo rgba(255,255,255,0.45) y labels #000 después del tema.
 * html.tema-azul-oscuro gana en cascada y alinea observaciones / importes con el resto de .form-control.
 */
html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales .form-control:not(.btn),
html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales select.form-control {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
  box-shadow: none !important;
}

html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales .form-control:hover:not([readonly]):not(:disabled),
html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales select.form-control:hover:not(:disabled):not([disabled]) {
  background-color: var(--erp-elevated) !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales .form-control:focus,
html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales select.form-control:focus,
html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales textarea.form-control:focus {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22) !important;
  outline: none !important;
}

html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales .form-group.row > label.col-form-label,
html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales .form-group.row > .col-form-label,
html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales .col-lg-9 .form-group:not(.row) > label {
  color: #e8eaef !important;
}

html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales textarea#operacion_observaciones.form-control {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro .comprobante .comprobante-bloque--pie #totales.totales textarea#operacion_observaciones.form-control::placeholder {
  color: rgba(232, 234, 239, 0.48) !important;
}

/* Vista legacy con div#operacion */
html.tema-azul-oscuro #operacion #totales textarea#operacion_observaciones,
html.tema-azul-oscuro #operacion textarea#operacion_observaciones {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro #operacion #totales .form-group > label,
html.tema-azul-oscuro #operacion #totales label {
  color: #e8eaef !important;
}

/* operacion.php (.comprobante-layout): refuerzo en cabezal y grillas (solo editables; readonly sigue reglas de abajo) */
html.tema-azul-oscuro .comprobante .comprobante-cabezal input.form-control:not(.btn):not([readonly]):not(:disabled),
html.tema-azul-oscuro .comprobante .comprobante-cabezal select.form-control:not(.btn):not(:disabled):not([disabled]),
html.tema-azul-oscuro .comprobante .comprobante-cabezal textarea.form-control:not(.btn):not([readonly]):not(:disabled),
html.tema-azul-oscuro .comprobante .comprobante-bloque--detalle #busqueda input.form-control:not(.btn):not([readonly]):not(:disabled),
html.tema-azul-oscuro .comprobante .comprobante-bloque--detalle #busqueda select.form-control:not(.btn):not(:disabled):not([disabled]),
html.tema-azul-oscuro .comprobante .comprobante-bloque--detalle #busqueda textarea.form-control:not(.btn):not([readonly]):not(:disabled),
html.tema-azul-oscuro .comprobante .comprobante-bloque--detalle #detalle input.form-control:not(.btn):not([readonly]):not(:disabled),
html.tema-azul-oscuro .comprobante .comprobante-bloque--detalle #detalle select.form-control:not(.btn):not(:disabled):not([disabled]),
html.tema-azul-oscuro .comprobante .comprobante-bloque--detalle #detalle textarea.form-control:not(.btn):not([readonly]):not(:disabled) {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro .comprobante select.form-control option {
  background-color: var(--erp-bg) !important;
  color: #e8eaef !important;
}

/* Forma de pago / referencias: btn-info menos chillón */
.tema-azul-oscuro .comprobante .comprobante-bloque--pie .btn-info.btn-sm {
  background-color: #2d4a6a !important;
  border-color: #3d5a80 !important;
  color: #e8f4ff !important;
}

.tema-azul-oscuro .comprobante .comprobante-bloque--pie .btn-info.btn-sm:hover,
.tema-azul-oscuro .comprobante .comprobante-bloque--pie .btn-info.btn-sm:focus {
  background-color: #355a82 !important;
  border-color: #4a6fa8 !important;
  color: #ffffff !important;
}

/* Novedades / noticias (include/noticias_listado_contenido.php + dashboards/estandar.php) */
.tema-azul-oscuro .noticias-title {
  color: #e4e6eb !important;
}

.tema-azul-oscuro .noticias-title i {
  color: #5a9fd4 !important;
}

.tema-azul-oscuro .noticia-card {
  background: var(--erp-surface) !important;
  border: 1px solid var(--erp-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

.tema-azul-oscuro .noticia-titulo {
  color: #f8fafc !important;
}

.tema-azul-oscuro .noticia-fecha {
  color: #94a3b8 !important;
}

.tema-azul-oscuro .noticia-cuerpo,
.tema-azul-oscuro .noticia-cuerpo p,
.tema-azul-oscuro .noticia-cuerpo div,
.tema-azul-oscuro .noticia-cuerpo li,
.tema-azul-oscuro .noticia-cuerpo span:not(.fa):not([class*="fa-"]) {
  color: #e4e6eb !important;
}

.tema-azul-oscuro .noticia-cuerpo a {
  color: #7eb8ff !important;
}

.tema-azul-oscuro .noticia-cuerpo a:hover,
.tema-azul-oscuro .noticia-cuerpo a:focus {
  color: #bae0ff !important;
}

.tema-azul-oscuro .dashboard-estandar-panel.panel.panel-default .panel-body h2 {
  color: #e4e6eb !important;
}

/* #detalle global (modales, etc.) */
.tema-azul-oscuro #detalle {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro #detalle table {
  background-color: var(--erp-surface) !important;
}

/* .linea-articulo - filas de artículos */
.tema-azul-oscuro .linea-articulo,
.tema-azul-oscuro tbody.linea-articulo tr {
  background-color: var(--erp-surface) !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro .linea-articulo td,
.tema-azul-oscuro tbody.linea-articulo td {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro .linea-articulo tr:hover td,
.tema-azul-oscuro tbody.linea-articulo tr:hover td {
  background-color: var(--erp-bg) !important;
}

.tema-azul-oscuro .linea-articulo input,
.tema-azul-oscuro tbody.linea-articulo input {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

/* Forma de pago: tab_container y tab_content */
.tema-azul-oscuro .tab_container {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro .tab_content {
  background-color: var(--erp-surface) !important;
  color: #e4e6eb !important;
}

.tema-azul-oscuro ul.tabs {
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro ul.tabs li {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro ul.tabs li a {
  color: #e4e6eb !important;
}

.tema-azul-oscuro ul.tabs li.active,
.tema-azul-oscuro ul.tabs li.active a:hover {
  background-color: var(--erp-surface) !important;
  border-bottom-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  color: #e4e6eb !important;
}

/* Tablas forma de pago: PagoEfectivo, PagoTarjetaCredito, PagoChequeRecibido, etc. */
.tema-azul-oscuro table[id^="Pago"],
.tema-azul-oscuro #PagoEfectivo,
.tema-azul-oscuro #PagoTarjetaCredito,
.tema-azul-oscuro #PagoChequeRecibido,
.tema-azul-oscuro #PagoCuentaBancaria,
.tema-azul-oscuro #efectivo,
.tema-azul-oscuro #chequerecibido,
.tema-azul-oscuro #tarjetadecredito,
.tema-azul-oscuro #cuentabancaria,
.tema-azul-oscuro #documentorecibido,
.tema-azul-oscuro #documentoemitido,
.tema-azul-oscuro #chequeemitido {
  background-color: var(--erp-surface) !important;
  color: #e4e6eb !important;
}

.tema-azul-oscuro table[id^="Pago"] th,
.tema-azul-oscuro table[id^="Pago"] td,
.tema-azul-oscuro #PagoEfectivo th,
.tema-azul-oscuro #PagoEfectivo td,
.tema-azul-oscuro #efectivo th,
.tema-azul-oscuro #efectivo td,
.tema-azul-oscuro #chequerecibido th,
.tema-azul-oscuro #chequerecibido td,
.tema-azul-oscuro #tarjetadecredito th,
.tema-azul-oscuro #tarjetadecredito td,
.tema-azul-oscuro #cuentabancaria th,
.tema-azul-oscuro #cuentabancaria td,
.tema-azul-oscuro #documentorecibido th,
.tema-azul-oscuro #documentorecibido td,
.tema-azul-oscuro #documentoemitido th,
.tema-azul-oscuro #documentoemitido td {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  color: #e4e6eb !important;
}

.tema-azul-oscuro table[id^="Pago"] input,
.tema-azul-oscuro table[id^="Pago"] select,
.tema-azul-oscuro #PagoEfectivo input,
.tema-azul-oscuro #efectivo input,
.tema-azul-oscuro #chequerecibido input,
.tema-azul-oscuro #tarjetadecredito input,
.tema-azul-oscuro #cuentabancaria input,
.tema-azul-oscuro #documentorecibido input,
.tema-azul-oscuro #documentoemitido input {
  background-color: var(--erp-elevated) !important;
  border-color: var(--erp-border) !important;
  color: #e4e6eb !important;
}

/* Tab-pane Bootstrap: mismo fondo y texto que .panel-default .panel-body */
.tema-azul-oscuro .tab-pane {
  background-color: var(--erp-surface) !important;
  color: #e8eaef !important;
}

/* #pagos - listado de pagos agregados */
.tema-azul-oscuro #pagos {
  background-color: var(--erp-surface) !important;
  color: #e4e6eb !important;
}

.tema-azul-oscuro #pagos table {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
}

.tema-azul-oscuro #pagos tbody {
  background-color: var(--erp-surface) !important;
}

.tema-azul-oscuro #pagos tbody tr {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  color: #e4e6eb !important;
}

.tema-azul-oscuro #pagos tbody tr:hover {
  background-color: var(--erp-row-hover) !important;
}

.tema-azul-oscuro #pagos tbody td {
  background-color: inherit !important;
  border-color: var(--erp-border) !important;
  color: #e4e6eb !important;
}

.tema-azul-oscuro #pagos input,
.tema-azul-oscuro #pagos label {
  color: #e4e6eb !important;
}

.tema-azul-oscuro #pagos input[readonly],
.tema-azul-oscuro #pagos input:disabled,
.tema-azul-oscuro #pagos select:disabled,
.tema-azul-oscuro #pagos select[disabled],
.tema-azul-oscuro #pagos textarea[readonly],
.tema-azul-oscuro #pagos textarea:disabled {
  background-color: var(--erp-bg) !important;
  border-color: var(--erp-border) !important;
  color: rgba(228, 230, 235, 0.58) !important;
  opacity: 1 !important;
}

/* Autocompletar (jQuery Autocomplete - .ac_results); html. refuerza sobre estilos inyectados en operación */
html.tema-azul-oscuro .ac_results {
  background-color: var(--erp-elevated) !important;
  border-color: #3d4654 !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

html.tema-azul-oscuro .ac_results ul {
  background-color: var(--erp-elevated) !important;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent !important;
}

html.tema-azul-oscuro .ac_results ul::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.4) !important;
}

html.tema-azul-oscuro .ac_results li {
  background-color: var(--erp-elevated) !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro .ac_results .ac_even {
  background-color: var(--erp-elevated) !important;
}

html.tema-azul-oscuro .ac_results .ac_odd {
  background-color: var(--erp-bg) !important;
  color: #e8eaef !important;
}

html.tema-azul-oscuro .ac_results .ac_over {
  background-color: rgba(59, 130, 246, 0.18) !important;
  color: #f8fafc !important;
}

html.tema-azul-oscuro .ac_results li strong {
  color: #93c5fd !important;
}

html.tema-azul-oscuro .ac_results .ac_over strong {
  color: #e2e8f0 !important;
}

html.tema-azul-oscuro .ac_loading {
  background-color: var(--erp-elevated) !important;
  background-image: none !important;
}

/* Modal Forma de Pago - Total a pagar, Pendiente */
.tema-azul-oscuro #ModalFormaPago input.total:not([readonly]):not(:disabled),
.tema-azul-oscuro #ModalFormaPago input.pendiente_pago:not([readonly]):not(:disabled),
.tema-azul-oscuro .modal-body input.total:not([readonly]):not(:disabled),
.tema-azul-oscuro .modal-body input.pendiente_pago:not([readonly]):not(:disabled) {
  background-color: var(--erp-bg) !important;
  border-color: #334155 !important;
  color: #e8eaef !important;
}

.tema-azul-oscuro #ModalFormaPago .modal-body > div table td,
.tema-azul-oscuro #ModalFormaPago .modal-body > div table {
  background-color: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  color: #e8eaef !important;
}

/* Solo lectura / deshabilitado: tono más apagado que campos editables (toda la app en tema oscuro) */
.tema-azul-oscuro input[readonly]:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]),
.tema-azul-oscuro textarea[readonly] {
  background-color: var(--erp-bg) !important;
  color: rgba(232, 234, 239, 0.65) !important;
  border-color: #334155 !important;
  cursor: default;
  opacity: 1 !important;
}

.tema-azul-oscuro input:disabled:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]),
.tema-azul-oscuro select:disabled,
.tema-azul-oscuro select[disabled],
.tema-azul-oscuro textarea:disabled {
  background-color: var(--erp-bg) !important;
  color: rgba(232, 234, 239, 0.52) !important;
  border-color: #334155 !important;
  cursor: not-allowed;
  opacity: 1 !important;
}

.tema-azul-oscuro input[readonly]:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.tema-azul-oscuro textarea[readonly]:focus,
.tema-azul-oscuro input:disabled:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.tema-azul-oscuro select:disabled:focus,
.tema-azul-oscuro textarea:disabled:focus {
  background-color: var(--erp-bg) !important;
  color: rgba(232, 234, 239, 0.65) !important;
  border-color: #475569 !important;
  box-shadow: none !important;
  outline: none;
}

/* Espera al guardar / transmitir (modulos/operacion/css/operacion-busy-overlay.css) */
html.tema-azul-oscuro .op-busy-overlay {
  background: rgba(6, 7, 9, 0.9) !important;
}

html.tema-azul-oscuro .op-busy-inner {
  background: var(--erp-surface) !important;
  border: 1px solid var(--erp-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

html.tema-azul-oscuro .op-busy-inner .fa-spinner {
  color: var(--erp-primary) !important;
}

html.tema-azul-oscuro .op-busy-msg {
  color: #e8eaef !important;
}

/* -------------------------------------------------------------------------
   Listados DataTables ERP (.dt-erp-shell) — paleta SaaS sobre datatables-erp-list.css
   ------------------------------------------------------------------------- */
html.tema-azul-oscuro .dt-erp-shell.panel {
  background: var(--erp-surface);
  border-color: var(--erp-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.18);
}

html.tema-azul-oscuro .dt-erp-header {
  background: var(--erp-bg);
  border-color: rgba(148, 163, 184, 0.18);
}

html.tema-azul-oscuro .dt-erp-footer {
  background: var(--erp-bg);
  border-color: rgba(148, 163, 184, 0.18);
}

html.tema-azul-oscuro .dt-erp-table-scroll {
  background: var(--erp-elevated);
  border-color: rgba(148, 163, 184, 0.15);
  scrollbar-color: #475569 var(--erp-elevated);
}

html.tema-azul-oscuro .dt-erp-table-scroll::-webkit-scrollbar-track {
  background: var(--erp-bg);
}

html.tema-azul-oscuro .dt-erp-table-scroll::-webkit-scrollbar-thumb {
  background: #475569;
}

html.tema-azul-oscuro .dt-erp-table-scroll::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

html.tema-azul-oscuro .dt-erp-shell.dt-erp-is-processing .dt-erp-table-scroll::after {
  background: rgba(15, 23, 42, 0.65);
}

html.tema-azul-oscuro .dt-erp-slot-info,
html.tema-azul-oscuro .dt-erp-record-meta,
html.tema-azul-oscuro .dt-erp-count,
html.tema-azul-oscuro .dt-erp-column-filters-label {
  color: #9ca3af;
}

html.tema-azul-oscuro .dt-erp-title {
  color: var(--erp-text);
}

html.tema-azul-oscuro .dt-erp-table thead th.sorting_asc,
html.tema-azul-oscuro .dt-erp-table thead th.sorting_desc {
  background-color: rgba(59, 130, 246, 0.14) !important;
  color: #93c5fd !important;
}

html.tema-azul-oscuro .dt-erp-slot-paginate .dataTables_paginate .paginate_button {
  color: #cbd5e1 !important;
  background: var(--erp-elevated) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

html.tema-azul-oscuro .dt-erp-slot-paginate .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: var(--erp-row-hover) !important;
  border-color: #475569 !important;
  color: #f1f5f9 !important;
}

html.tema-azul-oscuro .dt-erp-slot-paginate .dataTables_paginate .paginate_button.current,
html.tema-azul-oscuro .dt-erp-slot-paginate .dataTables_paginate .paginate_button.current:hover {
  background: var(--erp-primary) !important;
  border-color: var(--erp-primary) !important;
  color: #fff !important;
}

html.tema-azul-oscuro .dt-erp-slot-paginate .dataTables_paginate .paginate_button.disabled,
html.tema-azul-oscuro .dt-erp-slot-paginate .dataTables_paginate .paginate_button.disabled:hover {
  background: var(--erp-elevated) !important;
}
