/*!
 * Tema neutral de la sección administrativa (STI · Ventanilla Digital)
 * Se carga en lugar de frmtheme.css cuando admintheme.enabled = true (ver Config\AdminTheme).
 *
 * Reglas de esta hoja:
 *  - Toda regla cuelga de body.theme-neutral (incluidas las de @media). Única excepción: @font-face.
 *  - Cada sobrescritura repite el selector que reemplaza, con el prefijo delante, para ganar por especificidad.
 *  - Sin !important, salvo para vencer un !important existente (AdminLTE, Bootstrap o app.css); cada uno lleva comentario.
 *  - El guinda (--t-accent) solo se usa en: entrada activa del menú, btn-primary, foco y paginación activa.
 * Tokens y decisiones: .agents/modulos/admin-theme.md · docs/design/admin-tema-neutral-dashboard.md
 */

/* 1. Fuente ------------------------------------------------------------- */
@font-face {
  font-family: Inter;
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens (valores aprobados en la Fase D, 2026-11-08) ---------------- */
body.theme-neutral {
  --t-bg: #f4f6f8;
  --t-surface: #ffffff;
  --t-surface-2: #f8fafb;
  --t-text: #1f2d3f;
  --t-text-muted: #5f6b7c;
  --t-border: #dde3e9;
  --t-accent: #7b1736;
  --t-accent-hover: #64122c;
  --t-accent-soft: #f7edf1;
  --t-success: #12784a;
  --t-warning: #985908;
  --t-danger: #b83131;
  --t-info: #2e6d91;
  --t-radius: 10px;
  --t-shadow: 0 1px 2px rgba(22, 36, 58, .06);
  --t-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Derivados (no son tokens: tintes de estado y anillo de foco) */
  --t-radius-sm: 8px;
  --t-focus: 0 0 0 3px rgba(123, 23, 54, .16);
  --t-success-soft: #e8f5ee;
  --t-warning-soft: #fdf3e3;
  --t-danger-soft: #fbeceb;
  --t-info-soft: #eaf2f7;
  --t-neutral-soft: #eef1f4;
}

/* 3. Base --------------------------------------------------------------- */
body.theme-neutral {
  font-family: var(--t-font);
  font-size: .875rem;
  line-height: 1.5;
  color: var(--t-text);
  background-color: var(--t-bg);
}
body.theme-neutral .content-wrapper {
  background-color: var(--t-bg);
  color: var(--t-text);
}
/* app.css: h1.text-dark, h1.titles, h1 { color: #B17A45 !important } -> hay que vencer su !important */
body.theme-neutral h1,
body.theme-neutral h1.text-dark,
body.theme-neutral h1.titles {
  color: var(--t-text) !important;
  font-weight: 650;
  letter-spacing: -.01em;
}
body.theme-neutral h2, body.theme-neutral h3, body.theme-neutral h4,
body.theme-neutral h5, body.theme-neutral h6 { color: var(--t-text); font-weight: 600; }
/* h1-h6 fijan color propio y vencían al .text-white del contenedor (p. ej. .modal-header.bg-primary.text-white) */
body.theme-neutral .text-white h1, body.theme-neutral .text-white h2, body.theme-neutral .text-white h3,
body.theme-neutral .text-white h4, body.theme-neutral .text-white h5, body.theme-neutral .text-white h6,
body.theme-neutral .text-white .modal-title { color: inherit; }
body.theme-neutral a { color: var(--t-info); }
body.theme-neutral a:hover { color: #245673; }
/* app.css: .card-body a { color: #6A1C32 } y .wrapper table a { color: #6A1C32 } */
body.theme-neutral .card-body a:not(.btn),
body.theme-neutral .wrapper table a:not(.btn) { color: var(--t-info); }
/* Bootstrap: .text-muted { color: #6c757d !important } */
body.theme-neutral .text-muted { color: var(--t-text-muted) !important; }
/* Bootstrap: .text-primary / .bg-* con !important; "primary" es el acento */
body.theme-neutral .text-primary { color: var(--t-accent) !important; }
/* Bootstrap .text-success/.text-danger/.text-warning/.text-info (!important) no llegan a 4.5:1 sobre blanco */
body.theme-neutral .text-success { color: var(--t-success) !important; }
body.theme-neutral .text-danger { color: var(--t-danger) !important; }
body.theme-neutral .text-warning { color: var(--t-warning) !important; }
body.theme-neutral .text-info { color: var(--t-info) !important; }
body.theme-neutral .bg-primary { background-color: var(--t-accent) !important; }
body.theme-neutral .bg-danger { background-color: var(--t-danger) !important; }
body.theme-neutral .bg-success { background-color: var(--t-success) !important; }
body.theme-neutral .bg-info { background-color: var(--t-info) !important; }
body.theme-neutral .tabular,
body.theme-neutral .small-box h3,
body.theme-neutral .info-box-number { font-variant-numeric: tabular-nums; }
body.theme-neutral a:focus-visible,
body.theme-neutral button:focus-visible { outline: 2px solid var(--t-accent); outline-offset: 2px; }

/* 4. Encabezado -------------------------------------------------------- */
body.theme-neutral .main-header,
body.theme-neutral .main-header.navbar-white {
  background-color: var(--t-surface);
  border-bottom: 1px solid var(--t-border);
}
/* app.css: .navbar-light .navbar-nav .nav-link { color: #6A1C32 !important } */
body.theme-neutral .navbar-light .navbar-nav .nav-link { color: var(--t-text-muted) !important; }
body.theme-neutral .navbar-light .navbar-nav .nav-link:hover { color: var(--t-text) !important; } /* idem */
body.theme-neutral .main-header .user-menu .user-image { box-shadow: none !important; } /* .elevation-2 usa !important */
body.theme-neutral .navbar-nav > .user-menu > .dropdown-menu > li.user-header { height: auto; padding: 16px; }
body.theme-neutral .navbar-nav > .user-menu > .dropdown-menu > li.user-header > p { color: var(--t-text); font-size: .9375rem; }
body.theme-neutral .navbar-nav > .user-menu > .dropdown-menu > .user-footer { background-color: var(--t-surface-2); border-top: 1px solid var(--t-border); }
/* app.css: .user-menu .btn.btn-default { background-color: #6A1C32; color: #fff !important } */
body.theme-neutral .user-menu .btn.btn-default,
body.theme-neutral .user-menu .btn.btn-default.float-right {
  background-color: var(--t-surface);
  border: 1px solid var(--t-border);
  color: var(--t-text) !important;
}
body.theme-neutral .dropdown-menu { border-color: var(--t-border); border-radius: var(--t-radius-sm); box-shadow: 0 8px 24px rgba(22, 36, 58, .10); font-size: .875rem; }
body.theme-neutral .dropdown-item { color: var(--t-text); }
body.theme-neutral .dropdown-item:hover,
body.theme-neutral .dropdown-item:focus { background-color: var(--t-surface-2); color: var(--t-text); }
body.theme-neutral .dropdown-item.active,
body.theme-neutral .dropdown-item:active { background-color: var(--t-accent-soft); color: var(--t-accent); }

/* 5. Menú lateral (variante B: superficie gris claro; activo sin fondo + barra de 3px) */
/* .elevation-4 trae box-shadow !important */
body.theme-neutral .main-sidebar,
body.theme-neutral .main-sidebar.sidebar-light-danger,
body.theme-neutral .main-sidebar.elevation-4 {
  background-color: var(--t-surface-2);
  /* Línea derecha como sombra interior: un border-right restaría 1px y OverlayScrollbars mostraría scroll horizontal */
  box-shadow: inset -1px 0 0 var(--t-border) !important;
}
/* app.css:16-17 .layout-fixed .wrapper .sidebar { background-image: url(../img/sidebar.jpg) } */
body.theme-neutral.layout-fixed .wrapper .sidebar,
body.theme-neutral .wrapper .sidebar {
  background-image: none;
  background-color: transparent;
  padding: 0 8px;
}
/* app.css: .bg-logo { background-color: #6A1C32 } en el brand-link */
body.theme-neutral .main-sidebar .brand-link,
body.theme-neutral .main-sidebar .brand-link.bg-logo {
  background-color: var(--t-surface-2);
  border-bottom: 1px solid var(--t-border);
  height: 57px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}
body.theme-neutral .brand-link .brand-image.brand-image-legacy { display: none; }
/* .d-none de Bootstrap es display:none !important: el logo a color solo se muestra con este tema */
body.theme-neutral .brand-link .brand-image.brand-image-neutral.d-none {
  display: block !important;
  float: none;
  max-height: 40px;
  width: auto;
  margin: 0;
  box-shadow: none;
}
/* Menú colapsado (sidebar-mini): solo cabe el escudo, la parte izquierda del logo */
body.theme-neutral.sidebar-collapse .main-sidebar:not(:hover) .brand-link .brand-image.brand-image-neutral.d-none {
  width: 34px;
  height: 40px;
  object-fit: cover;
  object-position: left center;
}
body.theme-neutral.sidebar-collapse .main-sidebar:not(:hover) .brand-link { padding: 0 12px; }
body.theme-neutral .main-sidebar .user-panel { border-bottom: 1px solid var(--t-border); }
body.theme-neutral .main-sidebar .user-panel .info a,
body.theme-neutral .main-sidebar .user-panel .info a.d-block { color: var(--t-text); font-weight: 600; }
body.theme-neutral .main-sidebar .user-panel img { box-shadow: none !important; } /* .elevation-2 usa !important */
body.theme-neutral .sidebar-light-danger .form-control-sidebar,
body.theme-neutral .sidebar-light-danger .btn-sidebar {
  background-color: var(--t-surface);
  border: 1px solid var(--t-border);
  color: var(--t-text);
}
body.theme-neutral .sidebar-light-danger .form-control-sidebar { border-right: 0; }
body.theme-neutral .sidebar-light-danger .form-control-sidebar:focus { border-color: var(--t-accent); box-shadow: none; }
body.theme-neutral .sidebar-light-danger .form-control-sidebar:focus + .input-group-append .btn-sidebar { border-color: var(--t-accent); }
/* app.css: .btn.btn-sidebar .fa-search { color: #6A1C32 !important } */
body.theme-neutral .btn.btn-sidebar .fa-search { color: var(--t-text-muted) !important; }

body.theme-neutral .nav-sidebar .nav-header {
  color: var(--t-text-muted);
  font-size: .8125rem;
  font-weight: 600;
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: .03em;
  padding: 1rem .75rem .25rem;
}
/* app.css: .nav-sidebar .nav-item>.nav-link { color: #6A1C32 } */
body.theme-neutral .nav-sidebar .nav-item > .nav-link {
  color: var(--t-text);
  border-radius: 6px;
  padding: .45rem .75rem;
  margin-bottom: 1px;
}
body.theme-neutral .nav-sidebar .nav-item > .nav-link:hover,
body.theme-neutral .sidebar-light-danger .nav-sidebar > .nav-item > .nav-link:hover {
  background-color: rgba(31, 45, 63, .05);
  color: var(--t-text);
}
body.theme-neutral .nav-sidebar .nav-link > .nav-icon,
body.theme-neutral .nav-sidebar .nav-link > p > .right {
  color: var(--t-text-muted);
  font-size: .95rem;
}
/* app.css: .wrapper .sidebar-light-danger .nav-sidebar > .nav-item > .nav-link.active { background-color: #6A1C32 !important } */
body.theme-neutral .wrapper .sidebar-light-danger .nav-sidebar > .nav-item > .nav-link.active,
body.theme-neutral .sidebar-light-danger .nav-sidebar > .nav-item > .nav-link.active {
  background-color: transparent !important;
  color: var(--t-accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--t-accent);
  border-radius: 0 6px 6px 0;
}
body.theme-neutral .sidebar-light-danger .nav-sidebar > .nav-item > .nav-link.active > .nav-icon,
body.theme-neutral .sidebar-light-danger .nav-sidebar > .nav-item > .nav-link.active > p > .right { color: var(--t-accent); }
/* Submenús (treeview) */
body.theme-neutral .nav-sidebar .nav-treeview { padding-left: .5rem; }
/* app.css: .nav.nav-treeview p { color: #B17A45 } */
body.theme-neutral .nav.nav-treeview p { color: var(--t-text); }
body.theme-neutral .nav-sidebar .nav-treeview > .nav-item > .nav-link > .nav-icon { font-size: .6rem; color: var(--t-text-muted); }
body.theme-neutral .sidebar-light-danger .nav-treeview > .nav-item > .nav-link.active,
body.theme-neutral .sidebar-light-danger .nav-treeview > .nav-item > .nav-link.active:hover {
  background-color: transparent;
  color: var(--t-accent);
  font-weight: 600;
}
body.theme-neutral .sidebar-light-danger .nav-treeview > .nav-item > .nav-link.active p,
body.theme-neutral .sidebar-light-danger .nav-treeview > .nav-item > .nav-link.active > .nav-icon { color: var(--t-accent); }
/* Variante boxed: AdminLTE pone una imagen de fondo en body.layout-boxed */
body.theme-neutral.layout-boxed:not(.iframe-mode) { background: var(--t-bg); }
body.theme-neutral.layout-boxed .wrapper { box-shadow: none; border-left: 1px solid var(--t-border); border-right: 1px solid var(--t-border); }

/* 6. Encabezado de página ---------------------------------------------- */
body.theme-neutral .content-header { padding: 20px .5rem 12px; }
body.theme-neutral .content-header h1 { font-size: 1.25rem; line-height: 1.4; margin: 0; }
body.theme-neutral .breadcrumb { font-size: .8125rem; background: transparent; }
/* app.css: .breadcrumb a { color: #000 } y .breadcrumb .breadcrumb-item.active { color: #B17A45 } */
body.theme-neutral .breadcrumb a { color: var(--t-text-muted); }
body.theme-neutral .breadcrumb .breadcrumb-item.active { color: var(--t-text); }
body.theme-neutral .breadcrumb-item + .breadcrumb-item::before { color: #a6afbb; }

/* 7. Tarjetas ----------------------------------------------------------- */
body.theme-neutral .card {
  background-color: var(--t-surface);
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  box-shadow: var(--t-shadow);
  margin-bottom: 1rem;
}
body.theme-neutral .card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--t-border);
  padding: .75rem 1rem;
}
body.theme-neutral .card-header:first-child { border-radius: calc(var(--t-radius) - 1px) calc(var(--t-radius) - 1px) 0 0; }
body.theme-neutral .card-title { font-size: .9375rem; font-weight: 600; color: var(--t-text); }
body.theme-neutral .card-body { padding: 1rem; }
body.theme-neutral .card-footer { background-color: var(--t-surface-2); border-top: 1px solid var(--t-border); }
/* Cabeceras de color de AdminLTE (card-primary, card-danger, ...) -> neutras */
body.theme-neutral .card-primary:not(.card-outline) > .card-header,
body.theme-neutral .card-secondary:not(.card-outline) > .card-header,
body.theme-neutral .card-success:not(.card-outline) > .card-header,
body.theme-neutral .card-warning:not(.card-outline) > .card-header,
body.theme-neutral .card-dark:not(.card-outline) > .card-header,
body.theme-neutral .wrapper .card-danger:not(.card-outline) > .card-header,
body.theme-neutral .wrapper .card-danger:not(.card-outline) > .card-header a {
  background-color: var(--t-surface);
  color: var(--t-text);
}
/* app.css: .card-info:not(.card-outline)>.card-header { background-color:#fff !important; border:1px solid #6A1C32 } */
body.theme-neutral .card-info:not(.card-outline) > .card-header {
  background-color: var(--t-surface) !important;
  border: 0;
  border-bottom: 1px solid var(--t-border);
  color: var(--t-text);
}
body.theme-neutral .card-primary:not(.card-outline) > .card-header .card-title,
body.theme-neutral .card-success:not(.card-outline) > .card-header .card-title,
body.theme-neutral .card-info:not(.card-outline) > .card-header .card-title { color: var(--t-text); }
body.theme-neutral .card.card-outline,
body.theme-neutral .card-primary.card-outline,
body.theme-neutral .card-danger.card-outline,
body.theme-neutral .card-info.card-outline { border-top: 1px solid var(--t-border); }
/* app.css: .wrapper .card-header .btn.btn-tool { color: #6A1C32 } */
body.theme-neutral .wrapper .card-header .btn.btn-tool,
body.theme-neutral .card-header .btn-tool { color: var(--t-text-muted); }
body.theme-neutral .card-header .btn-tool:hover { color: var(--t-text); }

/* 8. Botones ------------------------------------------------------------ */
body.theme-neutral .btn { border-radius: var(--t-radius-sm); font-size: .875rem; font-weight: 500; }
body.theme-neutral .btn-sm { font-size: .8125rem; border-radius: 6px; }
body.theme-neutral .btn:focus,
body.theme-neutral .btn.focus { box-shadow: var(--t-focus); }
body.theme-neutral .btn-primary,
body.theme-neutral .card-body a.btn.btn-primary {
  background-color: var(--t-accent);
  border-color: var(--t-accent);
  color: #fff;
}
body.theme-neutral .btn-primary:hover,
body.theme-neutral .btn-primary:not(:disabled):not(.disabled):active,
body.theme-neutral .btn-primary:not(:disabled):not(.disabled).active,
body.theme-neutral .show > .btn-primary.dropdown-toggle {
  background-color: var(--t-accent-hover);
  border-color: var(--t-accent-hover);
  color: #fff;
}
body.theme-neutral .btn-primary:focus,
body.theme-neutral .btn-primary.focus,
body.theme-neutral .btn-primary:not(:disabled):not(.disabled):active:focus {
  border-color: var(--t-accent);
  box-shadow: var(--t-focus);
}
body.theme-neutral .btn-primary.disabled,
body.theme-neutral .btn-primary:disabled { background-color: var(--t-accent); border-color: var(--t-accent); opacity: .55; }
body.theme-neutral .btn-default,
body.theme-neutral .btn-secondary,
body.theme-neutral .dt-buttons .btn,
body.theme-neutral .dt-buttons .btn-secondary {
  background-color: var(--t-surface);
  border: 1px solid var(--t-border);
  color: var(--t-text);
}
body.theme-neutral .btn-default:hover,
body.theme-neutral .btn-secondary:hover,
body.theme-neutral .dt-buttons .btn:hover,
body.theme-neutral .btn-secondary:not(:disabled):not(.disabled):active {
  background-color: var(--t-surface-2);
  border-color: #c9d1da;
  color: var(--t-text);
}
body.theme-neutral .btn-success { background-color: var(--t-success); border-color: var(--t-success); color: #fff; }
body.theme-neutral .btn-success:hover { background-color: #0e6440; border-color: #0e6440; color: #fff; }
body.theme-neutral .btn-danger { background-color: var(--t-danger); border-color: var(--t-danger); color: #fff; }
body.theme-neutral .btn-danger:hover { background-color: #9c2828; border-color: #9c2828; color: #fff; }
body.theme-neutral .btn-info { background-color: var(--t-info); border-color: var(--t-info); color: #fff; }
body.theme-neutral .btn-info:hover { background-color: #245673; border-color: #245673; color: #fff; }
body.theme-neutral .btn-warning { background-color: var(--t-warning); border-color: var(--t-warning); color: #fff; }
body.theme-neutral .btn-warning:hover { background-color: #7c4806; border-color: #7c4806; color: #fff; }
body.theme-neutral .btn-outline-primary { color: var(--t-accent); border-color: var(--t-accent); }
body.theme-neutral .btn-outline-primary:hover { background-color: var(--t-accent); color: #fff; }
body.theme-neutral .btn-outline-secondary { color: var(--t-text); border-color: var(--t-border); }
body.theme-neutral .btn-outline-secondary:hover { background-color: var(--t-surface-2); color: var(--t-text); }
body.theme-neutral .btn-outline-danger { color: var(--t-danger); border-color: var(--t-danger); }
body.theme-neutral .btn-outline-danger:hover { background-color: var(--t-danger); color: #fff; }
body.theme-neutral .btn-outline-success { color: var(--t-success); border-color: var(--t-success); }
body.theme-neutral .btn-outline-success:hover { background-color: var(--t-success); color: #fff; }
body.theme-neutral .btn-outline-info { color: var(--t-info); border-color: var(--t-info); }
body.theme-neutral .btn-outline-info:hover { background-color: var(--t-info); color: #fff; }
/* app.css: a.btn.btn-flat { background-color: transparent !important; color: #6A1C32 } -> con el color blanco de .btn-*
   el texto quedaba invisible sobre fondo transparente. Se restaura el fondo sólido (!important para vencer al legado). */
body.theme-neutral a.btn.btn-flat.btn-primary { background-color: var(--t-accent) !important; }
body.theme-neutral a.btn.btn-flat.btn-success { background-color: var(--t-success) !important; }
body.theme-neutral a.btn.btn-flat.btn-danger { background-color: var(--t-danger) !important; }
body.theme-neutral a.btn.btn-flat.btn-info { background-color: var(--t-info) !important; }
body.theme-neutral a.btn.btn-flat.btn-warning { background-color: var(--t-warning) !important; }
body.theme-neutral a.btn.btn-flat.btn-primary:hover { background-color: var(--t-accent-hover) !important; }
body.theme-neutral a.btn.btn-flat.btn-success:hover { background-color: #0e6440 !important; }
body.theme-neutral a.btn.btn-flat.btn-danger:hover { background-color: #9c2828 !important; }
body.theme-neutral a.btn.btn-flat.btn-info:hover { background-color: #245673 !important; }
body.theme-neutral a.btn.btn-flat.btn-warning:hover { background-color: #7c4806 !important; }
body.theme-neutral a.btn.btn-flat.btn-primary,
body.theme-neutral a.btn.btn-flat.btn-success,
body.theme-neutral a.btn.btn-flat.btn-danger,
body.theme-neutral a.btn.btn-flat.btn-info,
body.theme-neutral a.btn.btn-flat.btn-warning { color: #fff; }

/* 9. Formularios -------------------------------------------------------- */
body.theme-neutral .form-control,
body.theme-neutral .custom-select {
  border-color: var(--t-border);
  border-radius: var(--t-radius-sm);
  color: var(--t-text);
  font-size: .875rem;
}
body.theme-neutral .form-control::placeholder { color: #7a8494; }
body.theme-neutral .form-control:focus,
body.theme-neutral .custom-select:focus {
  border-color: var(--t-accent);
  box-shadow: var(--t-focus);
}
body.theme-neutral .form-control:disabled,
body.theme-neutral .form-control[readonly] { background-color: var(--t-surface-2); }
body.theme-neutral .form-control.is-invalid,
body.theme-neutral .was-validated .form-control:invalid { border-color: var(--t-danger); }
body.theme-neutral .invalid-feedback { color: var(--t-danger); }
body.theme-neutral .input-group-text {
  background-color: var(--t-surface-2);
  border-color: var(--t-border);
  color: var(--t-text-muted);
}
/* app.css: .input-group-append span { color: #6A1C32 !important } */
body.theme-neutral .input-group-append span { color: var(--t-text-muted) !important; }
body.theme-neutral span.input-group-text.bg-primary-light { background-color: var(--t-accent); border-color: var(--t-accent); }
/* app.css: label:not(.form-check-label):not(.custom-file-label) { font-weight: 700; color: #6A1C32 } */
body.theme-neutral label:not(.form-check-label):not(.custom-file-label) {
  color: var(--t-text);
  font-weight: 600;
}
body.theme-neutral .custom-control-input:checked ~ .custom-control-label::before { background-color: var(--t-accent); border-color: var(--t-accent); }
body.theme-neutral .custom-control-input:focus ~ .custom-control-label::before { box-shadow: var(--t-focus); }
body.theme-neutral .icheck-danger > input:first-child:checked + label::before,
body.theme-neutral .icheck-danger > input:first-child:checked + input[type="hidden"] + label::before,
body.theme-neutral .icheck-primary > input:first-child:checked + label::before,
body.theme-neutral .icheck-primary > input:first-child:checked + input[type="hidden"] + label::before {
  background-color: var(--t-accent);
  border-color: var(--t-accent);
}
body.theme-neutral .icheck-danger > input:first-child:not(:checked):not(:disabled):hover + label::before,
body.theme-neutral .icheck-primary > input:first-child:not(:checked):not(:disabled):hover + label::before { border-color: var(--t-accent); }
body.theme-neutral [class*="icheck-"] > label:not(.form-check-label):not(.custom-file-label) { font-weight: 400; }

/* 10. Tablas y DataTables 1.x ------------------------------------------ */
body.theme-neutral .table { color: var(--t-text); }
body.theme-neutral .table td,
body.theme-neutral .table th { border-top: 1px solid var(--t-border); padding: .625rem .5rem; vertical-align: middle; } /* .5rem lateral: con 14px las tablas anchas (Usuarios) no se salen de la tarjeta */
/* app.css: .wrapper thead { background-color: #F5F6FA; color: #A3A6B4 } (contraste insuficiente) */
body.theme-neutral .wrapper thead,
body.theme-neutral .table thead th {
  background-color: var(--t-surface-2);
  color: var(--t-text-muted);
}
body.theme-neutral .table thead th {
  border-bottom: 1px solid var(--t-border);
  font-size: .8125rem;
  font-weight: 600;
}
/* app.css: .wrapper table.table-bordered { border: .1px solid #A3A6B4 } */
body.theme-neutral .wrapper table.table-bordered,
body.theme-neutral .table-bordered,
body.theme-neutral .table-bordered td,
body.theme-neutral .table-bordered th { border-color: var(--t-border); }
body.theme-neutral .wrapper .table-striped tbody tr:nth-of-type(odd),
body.theme-neutral .table-striped tbody tr:nth-of-type(odd) { background-color: var(--t-surface); }
body.theme-neutral .table-striped tbody tr:nth-of-type(even) { background-color: var(--t-surface-2); }
body.theme-neutral .table-hover tbody tr:hover { background-color: #f1f4f7; color: var(--t-text); }
/* app.css: table.dataTable { font-size: 13px } -> texto base de 14px */
body.theme-neutral table.dataTable { font-size: .875rem; }
body.theme-neutral .wrapper table a .fa-exclamation-triangle { color: var(--t-warning); }
/* app.css: .wrapper table a i { color: #fff !important } -> en botones claros el icono quedaría invisible */
body.theme-neutral .wrapper table a.btn-default i,
body.theme-neutral .wrapper table a.btn-secondary i,
body.theme-neutral .wrapper table a.btn-outline-secondary i { color: var(--t-text) !important; }
body.theme-neutral .dataTables_wrapper .dataTables_filter input,
body.theme-neutral .dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius-sm);
}
body.theme-neutral .dataTables_wrapper .dataTables_filter input:focus,
body.theme-neutral .dataTables_wrapper .dataTables_length select:focus { border-color: var(--t-accent); box-shadow: var(--t-focus); outline: 0; }
/* app.css: .dataTables_info { color: #6A1C32 } */
body.theme-neutral .dataTables_info,
body.theme-neutral .dataTables_wrapper .dataTables_info { color: var(--t-text-muted); font-size: .8125rem; }
body.theme-neutral .page-link {
  color: var(--t-text);
  border-color: var(--t-border);
  background-color: var(--t-surface);
}
body.theme-neutral .page-link:hover { background-color: var(--t-surface-2); color: var(--t-text); border-color: var(--t-border); }
body.theme-neutral .page-link:focus { box-shadow: var(--t-focus); }
body.theme-neutral .page-item:first-child .page-link { border-radius: var(--t-radius-sm) 0 0 var(--t-radius-sm); }
body.theme-neutral .page-item:last-child .page-link { border-radius: 0 var(--t-radius-sm) var(--t-radius-sm) 0; }
body.theme-neutral .page-item.active .page-link {
  background-color: var(--t-accent);
  border-color: var(--t-accent);
  color: #fff;
}
body.theme-neutral .page-item.disabled .page-link { color: #8b95a3; background-color: var(--t-surface); }
/* app.css: .page-item.next a { background-color: #6A1C32; color: #FFF !important } */
body.theme-neutral .page-item.next a,
body.theme-neutral .page-item.next .page-link {
  background-color: var(--t-surface);
  color: var(--t-text) !important;
}
body.theme-neutral .page-item.next.disabled .page-link { color: #8b95a3 !important; } /* idem */

/* 11. Select2 ------------------------------------------------------------ */
body.theme-neutral .select2-container--bootstrap4 .select2-selection,
body.theme-neutral .select2-container--default .select2-selection--single,
body.theme-neutral .select2-container--default .select2-selection--multiple {
  border-color: var(--t-border);
  border-radius: var(--t-radius-sm);
  color: var(--t-text);
}
body.theme-neutral .select2-container--bootstrap4.select2-container--focus .select2-selection,
body.theme-neutral .select2-container--bootstrap4.select2-container--open .select2-selection,
body.theme-neutral .select2-container--default.select2-container--focus .select2-selection--multiple,
body.theme-neutral .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--t-accent);
  box-shadow: var(--t-focus);
}
body.theme-neutral .select2-container--bootstrap4 .select2-dropdown,
body.theme-neutral .select2-container--default .select2-dropdown { border-color: var(--t-border); }
body.theme-neutral .select2-container--bootstrap4 .select2-results__option--highlighted,
body.theme-neutral .select2-container--bootstrap4 .select2-results__option--highlighted.select2-results__option[aria-selected=true],
body.theme-neutral .select2-container--default .select2-results__option--highlighted[aria-selected],
body.theme-neutral .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--t-accent-soft);
  color: var(--t-accent);
}
body.theme-neutral .select2-container--bootstrap4 .select2-results__option[aria-selected=true],
body.theme-neutral .select2-container--default .select2-results__option[aria-selected=true] { background-color: var(--t-surface-2); color: var(--t-text); }
body.theme-neutral .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice,
body.theme-neutral .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--t-neutral-soft);
  border: 1px solid var(--t-border);
  color: var(--t-text);
  border-radius: 6px;
}
body.theme-neutral .select2-search--dropdown .select2-search__field { border-color: var(--t-border); border-radius: 6px; }

/* 12. Modales, SweetAlert2, Toastr, alertas y pestañas ------------------- */
body.theme-neutral .modal-content { border: 1px solid var(--t-border); border-radius: var(--t-radius); box-shadow: 0 16px 40px rgba(22, 36, 58, .16); }
body.theme-neutral .modal-header { border-bottom: 1px solid var(--t-border); }
body.theme-neutral .modal-footer { border-top: 1px solid var(--t-border); background-color: var(--t-surface-2); border-radius: 0 0 var(--t-radius) var(--t-radius); }
body.theme-neutral .modal-title { font-size: 1rem; font-weight: 600; }
body.theme-neutral .swal2-popup { font-family: var(--t-font); border-radius: var(--t-radius); color: var(--t-text); }
body.theme-neutral .swal2-popup .swal2-title { color: var(--t-text); font-size: 1.25rem; font-weight: 650; }
body.theme-neutral .swal2-popup .swal2-html-container,
body.theme-neutral .swal2-popup .swal2-content { color: var(--t-text-muted); font-size: .9375rem; }
body.theme-neutral .swal2-styled { border-radius: var(--t-radius-sm); font-weight: 500; }
body.theme-neutral .swal2-styled.swal2-confirm { background-color: var(--t-accent); border: 1px solid var(--t-accent); color: #fff; }
body.theme-neutral .swal2-styled.swal2-confirm:hover { background-color: var(--t-accent-hover); background-image: none; }
body.theme-neutral .swal2-styled.swal2-cancel,
body.theme-neutral .swal2-styled.swal2-deny { background-color: var(--t-surface); border: 1px solid var(--t-border); color: var(--t-text); }
body.theme-neutral .swal2-styled:focus { box-shadow: var(--t-focus); }
body.theme-neutral .swal2-input,
body.theme-neutral .swal2-textarea,
body.theme-neutral .swal2-select { border-color: var(--t-border); border-radius: var(--t-radius-sm); }
body.theme-neutral .swal2-input:focus,
body.theme-neutral .swal2-textarea:focus { border-color: var(--t-accent); box-shadow: var(--t-focus); }
body.theme-neutral #toast-container > .toast,
body.theme-neutral #toast-container > div { border-radius: var(--t-radius-sm); box-shadow: 0 8px 24px rgba(22, 36, 58, .16); opacity: 1; font-family: var(--t-font); }
body.theme-neutral .toast-success { background-color: var(--t-success); }
body.theme-neutral .toast-error { background-color: var(--t-danger); }
body.theme-neutral .toast-info { background-color: var(--t-info); }
body.theme-neutral .toast-warning { background-color: var(--t-warning); }
body.theme-neutral .alert { border-radius: var(--t-radius-sm); border-width: 1px; }
body.theme-neutral .alert-success { background-color: var(--t-success-soft); border-color: #cfe7da; color: var(--t-success); }
body.theme-neutral .alert-danger { background-color: var(--t-danger-soft); border-color: #f1d2d0; color: var(--t-danger); }
body.theme-neutral .alert-warning { background-color: var(--t-warning-soft); border-color: #f3dfbd; color: var(--t-warning); }
body.theme-neutral .alert-info { background-color: var(--t-info-soft); border-color: #cfe0ea; color: var(--t-info); }
body.theme-neutral .alert .close,
body.theme-neutral .alert a { color: inherit; }
body.theme-neutral .nav-tabs { border-bottom-color: var(--t-border); }
body.theme-neutral .nav-tabs .nav-link { color: var(--t-text-muted); }
/* app.css: .wrapper .nav-tabs .nav-link.active { color:#FFF; background-color:#B17A45 } */
body.theme-neutral .wrapper .nav-tabs .nav-item.show .nav-link,
body.theme-neutral .wrapper .nav-tabs .nav-link.active,
body.theme-neutral .nav-tabs .nav-link.active {
  color: var(--t-text);
  background-color: var(--t-surface);
  border-color: var(--t-border) var(--t-border) var(--t-surface);
  box-shadow: inset 0 2px 0 var(--t-accent);
}
/* app.css: .wrapper .nav-tabs i { color: #6A1C32 !important } */
body.theme-neutral .wrapper .nav-tabs i { color: inherit !important; }
/* app.css: .nav-user .nav-pills .nav-link.active { background-color: #6A1C32 !important } */
body.theme-neutral .nav-pills .nav-link.active,
body.theme-neutral .nav-user .nav-pills .nav-link.active {
  background-color: var(--t-accent-soft) !important;
  color: var(--t-accent);
}
body.theme-neutral .list-group-item { border-color: var(--t-border); }
body.theme-neutral .list-group-item.active { background-color: var(--t-accent-soft); border-color: var(--t-border); color: var(--t-accent); }

/* 13. small-box, info-box y badge -------------------------------------- */
body.theme-neutral .small-box {
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  box-shadow: var(--t-shadow);
}
/* .bg-* de AdminLTE/Bootstrap usan background-color y color con !important */
body.theme-neutral .small-box[class*="bg-"],
body.theme-neutral .small-box.box-white,
body.theme-neutral .small-box.bg-whiteprimary {
  background-color: var(--t-surface) !important;
  color: var(--t-text) !important;
}
body.theme-neutral .small-box h3,
body.theme-neutral .small-box.box-white h3 { color: var(--t-text); font-size: 1.75rem; font-weight: 650; }
body.theme-neutral .small-box p,
body.theme-neutral .small-box.bg-whiteprimary p,
body.theme-neutral .small-box.box-white .title-box { color: var(--t-text-muted); font-weight: 500; }
body.theme-neutral .small-box .icon > i,
body.theme-neutral .small-box.box-white i { color: rgba(31, 45, 63, .10); font-size: 56px; }
body.theme-neutral .small-box > .small-box-footer,
body.theme-neutral .wrapper .small-box > .small-box-footer {
  background-color: var(--t-surface-2);
  border-top: 1px solid var(--t-border);
  color: var(--t-text-muted);
  border-radius: 0 0 var(--t-radius) var(--t-radius);
}
body.theme-neutral .wrapper .small-box > .small-box-footer i { color: var(--t-text-muted); }
/* Tarjetas de indicador con degradado (p. ej. Pagos: .card.kpi-card.bg-gradient-*.text-white).
   .bg-gradient-* fija background con !important y .text-white color con !important */
body.theme-neutral .card[class*="bg-gradient-"] {
  background: var(--t-surface) !important;
  color: var(--t-text) !important;
}
body.theme-neutral .card[class*="bg-gradient-"].text-white,
body.theme-neutral .card[class*="bg-gradient-"] .text-white { color: var(--t-text) !important; }
body.theme-neutral .card[class*="bg-gradient-"] small,
body.theme-neutral .card[class*="bg-gradient-"] h6,
body.theme-neutral .card[class*="bg-gradient-"] .small { color: var(--t-text-muted); }
body.theme-neutral .card[class*="bg-gradient-"] i { color: rgba(31, 45, 63, .25); }
body.theme-neutral .info-box { border: 1px solid var(--t-border); border-radius: var(--t-radius); box-shadow: var(--t-shadow); }
/* .info-box-icon.bg-* y .elevation-1: color, fondo y sombra con !important */
body.theme-neutral .info-box .info-box-icon,
body.theme-neutral .info-box .info-box-icon[class*="bg-"] {
  background-color: var(--t-neutral-soft) !important;
  color: var(--t-text-muted) !important;
  border-radius: var(--t-radius-sm);
  box-shadow: none !important;
  font-size: 1.25rem;
}
body.theme-neutral .info-box .info-box-text { color: var(--t-text-muted); }
body.theme-neutral .info-box .info-box-number { color: var(--t-text); font-weight: 650; }
body.theme-neutral .badge { border-radius: 6px; font-weight: 600; }
body.theme-neutral .badge-success { background-color: var(--t-success-soft); color: var(--t-success); }
body.theme-neutral .badge-danger { background-color: var(--t-danger-soft); color: var(--t-danger); }
body.theme-neutral .badge-warning { background-color: var(--t-warning-soft); color: var(--t-warning); }
body.theme-neutral .badge-info,
body.theme-neutral .badge-primary { background-color: var(--t-info-soft); color: var(--t-info); }
/* Vistas que usan .badge.bg-* (Usuarios): .bg-* lleva background-color y color con !important */
body.theme-neutral .badge.bg-success { background-color: var(--t-success-soft) !important; color: var(--t-success) !important; }
body.theme-neutral .badge.bg-danger { background-color: var(--t-danger-soft) !important; color: var(--t-danger) !important; }
body.theme-neutral .badge.bg-warning { background-color: var(--t-warning-soft) !important; color: var(--t-warning) !important; }
body.theme-neutral .badge.bg-info,
body.theme-neutral .badge.bg-primary { background-color: var(--t-info-soft) !important; color: var(--t-info) !important; }
body.theme-neutral .badge.bg-secondary { background-color: var(--t-neutral-soft) !important; color: var(--t-text) !important; }
body.theme-neutral .badge-secondary,
body.theme-neutral .badge-light,
body.theme-neutral .badge-dark { background-color: var(--t-neutral-soft); color: var(--t-text); }

/* 14. Pie de página ---------------------------------------------------- */
/* app.css: .wrapper .main-footer { background-color:#6A1C32; border-top:4px solid #B17A45; color:#FFF } */
body.theme-neutral .wrapper .main-footer,
body.theme-neutral .main-footer {
  background-color: var(--t-surface);
  border-top: 1px solid var(--t-border);
  color: var(--t-text-muted);
  font-size: .8125rem;
  padding: .75rem 1rem;
}
/* app.css: .wrapper .main-footer a { color: #B17A45 !important } */
body.theme-neutral .wrapper .main-footer a { color: var(--t-text) !important; }

/* 15. Login (auth/layout.php, variante A) ------------------------------ */
/* app.css:262-263 y 298 (.bg-login, .sgglogin con imágenes) ya no se usan en el layout nuevo */
body.theme-neutral.login-page {
  background: var(--t-bg);
  min-height: 100vh;
  height: auto;
  padding: 40px 0;
}
body.theme-neutral .auth-shell { margin: 0 auto; }
body.theme-neutral .auth-logo { max-width: 220px; height: auto; }
body.theme-neutral .auth-org { color: var(--t-text); font-weight: 650; font-size: 1.125rem; letter-spacing: -.01em; }
body.theme-neutral .auth-card {
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  box-shadow: var(--t-shadow);
  background-color: var(--t-surface);
}
/* app.css: .login-card-body { background-color: transparent !important } -> la tarjeta da el blanco */
body.theme-neutral .auth-card .login-card-body { padding: 28px 28px 24px; border-radius: var(--t-radius); }
/* app.css: .login-box-msg { color:#6A1C32; font-size:30px; font-weight:500 } */
body.theme-neutral .auth-card .login-box-msg,
body.theme-neutral .auth-title {
  color: var(--t-text);
  font-size: 1.25rem;
  font-weight: 650;
  text-align: left;
  padding: 0 0 18px;
  margin: 0;
}
/* app.css: .login-card-body .input-group .form-control { border-right:0; border-radius:10px; font-size:12px } */
body.theme-neutral .login-card-body .input-group .form-control {
  border-radius: var(--t-radius-sm) 0 0 var(--t-radius-sm);
  font-size: .875rem;
  height: 42px;
}
body.theme-neutral .login-card-body .input-group .input-group-text {
  background-color: var(--t-surface);
  border-color: var(--t-border);
  border-radius: 0 var(--t-radius-sm) var(--t-radius-sm) 0;
  color: var(--t-text-muted);
}
body.theme-neutral .login-card-body .input-group .form-control:focus { box-shadow: none; border-color: var(--t-accent); }
body.theme-neutral .login-card-body .input-group .form-control:focus ~ .input-group-append .input-group-text { border-color: var(--t-accent); }
body.theme-neutral .login-card-body .input-group:focus-within { box-shadow: var(--t-focus); border-radius: var(--t-radius-sm); }
body.theme-neutral .auth-card .btn-block { height: 44px; font-weight: 600; }
/* .text-muted usa !important */
body.theme-neutral .auth-link a,
body.theme-neutral .auth-link a.text-muted { color: var(--t-text-muted) !important; font-size: .875rem; }
body.theme-neutral .auth-link a:hover,
body.theme-neutral .auth-link a.text-muted:hover { color: var(--t-text) !important; }
body.theme-neutral .auth-footer { color: var(--t-text-muted); font-size: .8125rem; }
body.theme-neutral .auth-box .alert { margin-bottom: 12px; }

/* Tablas más anchas que su tarjeta (Casos: 12 columnas, 1256 px a 1440 px) scrollean dentro del
   contenedor y no ensanchan la página. */
body.theme-neutral .dataTables_wrapper { overflow-x: auto; }

/* 16. Pantallas angostas ------------------------------------------------ */
@media (max-width: 767.98px) {
  body.theme-neutral .content-header { padding: 14px .25rem 8px; }
  body.theme-neutral .content-header h1 { font-size: 1.125rem; }
  body.theme-neutral .content-header .breadcrumb { padding: 4px 0 0; }
  body.theme-neutral .card-body { padding: .75rem; }
  body.theme-neutral .dataTables_wrapper { overflow-x: auto; }
  body.theme-neutral .dataTables_wrapper .dataTables_filter,
  body.theme-neutral .dataTables_wrapper .dataTables_length { text-align: left; }
  body.theme-neutral .dataTables_wrapper .dataTables_paginate ul.pagination { flex-wrap: wrap; white-space: normal; }
  body.theme-neutral .auth-card .login-card-body { padding: 22px 18px 18px; }
  body.theme-neutral.login-page { padding: 24px 0; }
}
