/* ============================================================
   tema2026.css — Tema moderno 2026
   Compatible con Bootstrap 4 + jQuery
   ============================================================ */

/* ------------------------------------------------------------
   1. VARIABLES (Design Tokens)
   ------------------------------------------------------------ */
:root {
  /* Colores primarios */
  --t26-primary:           #013475;
  --t26-primary-dark:      #0056b3;
  --t26-primary-light:     #e8eef7;

  /* Colores de superficie */
  --t26-bg:                #ffffff;
  --t26-bg-page:           linear-gradient(135deg, #f9fafb 0%, #eff6ff 100%);
  --t26-bg-filter:         linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  --t26-card-bg:           #ffffff;

  /* Texto */
  --t26-text:              #0d0d1a;
  --t26-text-muted:        #717182;
  --t26-text-on-primary:   #ffffff;

  /* Bordes */
  --t26-border:            rgba(0, 0, 0, 0.10);
  --t26-border-color:      #e2e5ea;
  --t26-input-bg:          #f3f3f5;

  /* Estado destructivo */
  --t26-danger:            #d4183d;

  /* Bordes redondeados */
  --t26-radius-sm:         6px;
  --t26-radius-md:         8px;
  --t26-radius-lg:         10px;
  --t26-radius-xl:         14px;

  /* Sombras */
  --t26-shadow-sm:         0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.08);
  --t26-shadow-md:         0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --t26-shadow-lg:         0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.06);

  /* Transiciones */
  --t26-transition:        all 0.3s ease;
  --t26-transition-fast:   all 0.2s ease;

  /* Tipografía */
  --t26-font:              ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t26-font-size-base:    15px;
  --t26-line-height:       1.5;
}


/* ------------------------------------------------------------
   2. BASE / RESET SUAVE
   ------------------------------------------------------------ */
body {
  font-family:   var(--t26-font);
  font-size:     var(--t26-font-size-base);
  line-height:   var(--t26-line-height);
  color:         var(--t26-text);
  background:    var(--t26-bg-page);
  min-height:    100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.3;
  color:       var(--t26-text);
}


/* ------------------------------------------------------------
   3. NAVBAR / HEADER — dos filas
   ------------------------------------------------------------ */

/* Contenedor principal: columna, sin padding propio */
.navbar-two-rows {
  flex-direction: column;
  align-items:    stretch;
  padding:        0;
  box-shadow:     var(--t26-shadow-lg);
}

/* ── Fila 1: gradiente ── */
.navbar-top-row {
  background: linear-gradient(90deg, var(--t26-primary) 0%, var(--t26-primary-dark) 100%);
  padding:    .5rem 1rem;
}

.navbar-top-row .container-fluid {
  display:     flex;
  align-items: center;
  position:    relative;
  min-height:  3rem;
}

/* Derecha fila 1: usuario + salir + toggler */
.navbar-top-right {
  display:     flex;
  align-items: center;
  gap:         .75rem;
  margin-left: auto;
}

.navbar-user-link,
.navbar-logout-link {
  color:       rgba(255,255,255,0.88);
  font-size:   .88rem;
  font-weight: 500;
  text-decoration: none;
  transition:  var(--t26-transition-fast);
  white-space: nowrap;
}

.navbar-user-link:hover,
.navbar-logout-link:hover {
  color: #fff;
}

.navbar-logout-link {
  background:    rgba(255,255,255,0.15);
  border-radius: var(--t26-radius-sm);
  padding:       .25rem .65rem;
}

.navbar-logout-link:hover {
  background: rgba(255,255,255,0.25);
}

/* ── Fila 2: ítems padre ── */
.navbar-menu-row {
  background:    #fff;
  border-bottom: 1px solid var(--t26-border-color);
  padding:       0 1rem;
}

.navbar-menu-row .container-fluid,
.navbar-submenu-row .container-fluid {
  padding: 0;
}

.navbar-parents {
  display:    flex;
  flex-wrap:  nowrap;
  list-style: none;
  margin:     0;
  padding:    .3rem 0 0;
  gap:        .1rem;
}

.nm-parent {
  cursor: pointer;
}

.nm-parent-link {
  display:       inline-flex;
  align-items:   center;
  gap:           .4rem;
  color:         var(--t26-text-muted);
  font-size:     .88rem;
  font-weight:   500;
  white-space:   nowrap;
  border-bottom: 3px solid transparent;
  border-radius: var(--t26-radius-md) var(--t26-radius-md) 0 0;
  padding:       .55rem .9rem;
  transition:    var(--t26-transition-fast);
  user-select:   none;
}

.nm-parent:hover .nm-parent-link {
  color:            var(--t26-primary);
  background-color: var(--t26-primary-light);
}

.nm-parent.active .nm-parent-link {
  color:               var(--t26-primary);
  background-color:    var(--t26-primary-light);
  border-bottom-color: var(--t26-primary);
  font-weight:         600;
}

/* ── Fila 3: hijos del padre activo ── */
.navbar-submenu-row {
  background:    var(--t26-primary-light);
  border-bottom: 2px solid rgba(1, 52, 117, 0.15);
  padding:       0 1rem;
}

.navbar-children {
  display:    none;
  flex-wrap:  nowrap;
  list-style: none;
  margin:     0;
  padding:    0;
  gap:        .1rem;
}

.navbar-children.active {
  display: flex;
}

.nm-child-link {
  display:         inline-flex;
  align-items:     center;
  gap:             .35rem;
  color:           var(--t26-primary);
  font-size:       .82rem;
  font-weight:     500;
  white-space:     nowrap;
  padding:         .4rem .85rem;
  border-bottom:   2px solid transparent;
  border-radius:   var(--t26-radius-sm) var(--t26-radius-sm) 0 0;
  text-decoration: none;
  transition:      var(--t26-transition-fast);
}

.nm-child-link:hover {
  background-color: rgba(1, 52, 117, 0.12);
  color:            var(--t26-primary);
  text-decoration:  none;
}

.nm-child-link.active {
  border-bottom-color: var(--t26-primary);
  background-color:    rgba(1, 52, 117, 0.1);
  font-weight:         600;
}

/* Ajuste del body para compensar navbar de 3 filas */
body {
  padding-top: 8.5rem;
}

.cs-slider {
	margin-top: 1rem;
}

/* Logos centrados en fila 1 */
.navbar-logos-center {
  position:    absolute;
  left:        50%;
  transform:   translateX(-50%);
  display:     flex;
  align-items: center;
  gap:         .75rem;
  pointer-events: none;
}

.navbar-logos-center img {
  pointer-events: auto;
  max-height:     3rem;
  max-width:      15rem;
  margin:         0 .5rem;
}

/* Título de sección (izquierda fila 1) */
.navbar-section-title {
  display:         flex;
  flex-direction:  column;
  justify-content: center;
  line-height:     1.2;
}

.navbar-page-title {
  color:          #fff;
  font-size:      1.9rem;
  font-weight:    600;
  letter-spacing: .01em;
  margin:         0;
}

.navbar-page-subtitle {
  color:       rgba(255,255,255,0.65);
  font-size:   1rem;
  font-weight: 400;
}

/* nav-pills modernos */


/* ------------------------------------------------------------
   4. NAVEGACIÓN POR PESTAÑAS (nav-tabs)
   ------------------------------------------------------------ */
.nav-tabs {
  border-bottom: 2px solid var(--t26-border-color);
  flex-wrap:     nowrap;
  overflow-x:    auto;
  -webkit-overflow-scrolling: touch;
}

.nav-tabs .nav-item .nav-link {
  color:         var(--t26-text-muted);
  font-weight:   500;
  border:        none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding:       .6rem 1rem;
  transition:    var(--t26-transition-fast);
  white-space:   nowrap;
}

.nav-tabs .nav-item .nav-link:hover {
  color:            var(--t26-primary);
  background-color: var(--t26-primary-light);
  border-bottom-color: transparent;
}

.nav-tabs .nav-item .nav-link.active {
  color:               var(--t26-primary);
  background-color:    var(--t26-primary-light);
  border-bottom-color: var(--t26-primary);
  font-weight:         600;
}

/* Logos centrados en navbar */
.navbar-logos-center {
  position:   absolute;
  left:       50%;
  transform:  translateX(-50%);
  display:    flex;
  align-items: center;
  gap:        .75rem;
  pointer-events: none; /* el título/menú siguen siendo clickeables */
}

.navbar-logos-center img {
  pointer-events: auto;
  max-height: 3rem;
  max-width: 15rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

/* Título de sección en navbar (izquierda) */
.navbar-section-title {
  display:        flex;
  flex-direction: column;
  justify-content: center;
  line-height:    1.2;
}

.navbar-page-title {
  color:       #fff;
  font-size:   1.9rem;
  font-weight: 600;
  letter-spacing: .01em;
  margin:      0;
}

.navbar-page-subtitle {
  color:       rgba(255,255,255,0.65);
  font-size:   1rem;
  font-weight: 400;
}

/* nav-pills modernos */
.nav-pills .nav-link {
  border-radius:  var(--t26-radius-md);
  color:          var(--t26-primary);
  font-weight:    500;
  transition:     var(--t26-transition-fast);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background: linear-gradient(90deg, var(--t26-primary) 0%, var(--t26-primary-dark) 100%);
  color:      #fff;
}


/* ------------------------------------------------------------
   5. CARDS
   ------------------------------------------------------------ */
.card {
  background:    var(--t26-card-bg);
  border:        1px solid var(--t26-border-color);
  border-radius: var(--t26-radius-xl) !important;
  box-shadow:    var(--t26-shadow-md);
  transition:    var(--t26-transition);
}

.card:hover {
  box-shadow:  var(--t26-shadow-lg);
  transform:   translateY(-2px);
}

.card-header {
  background:    transparent;
  border-bottom: 1px solid var(--t26-border-color);
  font-weight:   600;
  color:         var(--t26-text);
  padding:       1rem 1.25rem .75rem;
  border-radius: var(--t26-radius-xl) var(--t26-radius-xl) 0 0 !important;
}

.card-header.bg-primary,
.card-header.card-header-primary {
  background: linear-gradient(90deg, var(--t26-primary) 0%, var(--t26-primary-dark) 100%) !important;
  color:      #fff;
  border:     none;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  background:    transparent;
  border-top:    1px solid var(--t26-border-color);
  padding:       .75rem 1.25rem;
  border-radius: 0 0 var(--t26-radius-xl) var(--t26-radius-xl) !important;
}

/* Card de resumen / KPI */
.card-kpi {
  border-left: 4px solid var(--t26-primary);
}

.card-kpi .card-kpi-value {
  font-size:   1.75rem;
  font-weight: 700;
  color:       var(--t26-primary);
  line-height: 1.1;
}

.card-kpi .card-kpi-label {
  font-size:  .8rem;
  color:      var(--t26-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}


/* ------------------------------------------------------------
   6. BOTONES
   ------------------------------------------------------------ */
.btn {
  font-weight:   500;
  border-radius: var(--t26-radius-md) !important;
  transition:    var(--t26-transition-fast);
  letter-spacing: 0.01em;
}

.btn:focus,
.btn:focus-visible {
  outline:     none;
  box-shadow:  0 0 0 3px rgba(1, 52, 117, 0.25);
}

/* Primary */
.btn-primary {
  background: linear-gradient(90deg, var(--t26-primary) 0%, var(--t26-primary-dark) 100%);
  border:     none;
  color:      #fff;
}
.btn-primary:hover {
  background: linear-gradient(90deg, #012a60 0%, #004494 100%);
  color:      #fff;
  transform:  translateY(-1px);
  box-shadow: var(--t26-shadow-md);
}
.btn-primary:active {
  transform:  translateY(0);
}

/* Outline primary */
.btn-outline-primary {
  border-color: var(--t26-primary);
  color:        var(--t26-primary);
}
.btn-outline-primary:hover {
  background-color: var(--t26-primary);
  border-color:     var(--t26-primary);
  color:            #fff;
}

/* Secondary */
.btn-secondary {
  background:   #ececf0;
  border-color: #ececf0;
  color:        var(--t26-text);
}
.btn-secondary:hover {
  background:   #dddde4;
  border-color: #dddde4;
  color:        var(--t26-text);
}

/* Danger */
.btn-danger {
  background: var(--t26-danger);
  border:     none;
  color:      #fff;
}
.btn-danger:hover {
  background: #b5142f;
  color:      #fff;
}

/* Tamaños */
.btn-sm {
  padding:       .3rem .75rem;
  font-size:     .82rem;
  border-radius: var(--t26-radius-sm) !important;
}
.btn-lg {
  padding:       .6rem 1.5rem;
  font-size:     1rem;
  border-radius: var(--t26-radius-lg) !important;
}

/* Icono */
.btn-icon {
  width:         36px;
  height:        36px;
  padding:       0;
  display:       inline-flex;
  align-items:   center;
  justify-content: center;
  border-radius: var(--t26-radius-md) !important;
}


/* ------------------------------------------------------------
   7. FORMULARIOS / INPUTS
   ------------------------------------------------------------ */
.form-control,
.form-select,
select.form-control {
  background-color: var(--t26-input-bg);
  border:           1px solid var(--t26-border-color);
  border-radius:    var(--t26-radius-md) !important;
  color:            var(--t26-text);
  font-size:        .9rem;
  height:           auto;
  padding:          .45rem .75rem;
  transition:       var(--t26-transition-fast);
}

.form-control:focus,
.form-select:focus,
select.form-control:focus {
  background-color: #fff;
  border-color:     var(--t26-primary);
  box-shadow:       0 0 0 3px rgba(1, 52, 117, 0.18);
  outline:          none;
}

.form-control:disabled,
.form-control[readonly] {
  background-color: #e9ecef;
  opacity:          .7;
  cursor:           not-allowed;
}

.form-control.is-invalid,
.was-validated .form-control:invalid {
  border-color: var(--t26-danger);
  box-shadow:   0 0 0 3px rgba(212, 24, 61, 0.15);
}

label,
.form-label {
  font-weight: 500;
  font-size:   .88rem;
  color:       var(--t26-text);
  margin-bottom: .35rem;
}

.form-text,
small.form-text {
  color:     var(--t26-text-muted);
  font-size: .8rem;
}

/* Sección de filtros */
.filter-section {
  background: var(--t26-bg-filter);
  border:     1px solid var(--t26-border-color);
  border-radius: var(--t26-radius-lg);
  padding:    1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--t26-shadow-sm);
}


/* ------------------------------------------------------------
   8. TABLAS
   ------------------------------------------------------------ */
.table {
  color:         var(--t26-text);
  border-radius: var(--t26-radius-lg);
  overflow:      hidden;
}

.table thead th {
  background:   var(--t26-primary-light);
  color:        var(--t26-primary);
  font-weight:  600;
  font-size:    .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid var(--t26-border-color);
  padding:      .6rem .75rem;
  white-space:  nowrap;
}

.table tbody tr {
  transition: background-color .15s ease;
}

.table tbody tr:hover {
  background-color: var(--t26-primary-light);
}

.table td {
  padding:     .5rem .75rem;
  vertical-align: middle;
  border-color: var(--t26-border-color);
  font-size:   .9rem;
}

.table-bordered {
  border-color: var(--t26-border-color);
}

.table-bordered td,
.table-bordered th {
  border-color: var(--t26-border-color);
}

/* Contenedor de tabla con scroll */
.table-responsive {
  border-radius: var(--t26-radius-lg);
  border:        1px solid var(--t26-border-color);
  box-shadow:    var(--t26-shadow-sm);
}


/* ------------------------------------------------------------
   9. BADGES
   ------------------------------------------------------------ */
.badge {
  font-weight:   500;
  font-size:     .75rem;
  padding:       .3em .6em;
  border-radius: var(--t26-radius-sm) !important;
}

.badge-primary,
.badge.bg-primary {
  background: linear-gradient(90deg, var(--t26-primary) 0%, var(--t26-primary-dark) 100%) !important;
  color:      #fff;
}

.badge-secondary,
.badge.bg-secondary {
  background: #ececf0 !important;
  color:      var(--t26-text);
}

.badge-danger,
.badge.bg-danger {
  background: var(--t26-danger) !important;
  color:      #fff;
}

.badge-success,
.badge.bg-success {
  background: #1a8a4a !important;
  color:      #fff;
}

.badge-warning,
.badge.bg-warning {
  background: #e6a700 !important;
  color:      #fff;
}


/* ------------------------------------------------------------
   10. ALERTS
   ------------------------------------------------------------ */
.alert {
  border-radius: var(--t26-radius-lg) !important;
  border:        none;
  font-size:     .9rem;
  padding:       .85rem 1rem;
  box-shadow:    var(--t26-shadow-sm);
}

.alert-primary {
  background:  var(--t26-primary-light);
  color:       var(--t26-primary);
  border-left: 4px solid var(--t26-primary);
}

.alert-danger {
  background:  #fdf0f3;
  color:       var(--t26-danger);
  border-left: 4px solid var(--t26-danger);
}

.alert-success {
  background:  #edf7f1;
  color:       #1a8a4a;
  border-left: 4px solid #1a8a4a;
}

.alert-warning {
  background:  #fffbeb;
  color:       #92620a;
  border-left: 4px solid #e6a700;
}

.alert-info {
  background:  #eff6ff;
  color:       #1d4ed8;
  border-left: 4px solid #3b82f6;
}


/* ------------------------------------------------------------
   11. MODALES
   ------------------------------------------------------------ */
.modal-content {
  border:        none;
  border-radius: var(--t26-radius-xl) !important;
  box-shadow:    var(--t26-shadow-lg);
}

.modal-header {
  background:    linear-gradient(90deg, var(--t26-primary) 0%, var(--t26-primary-dark) 100%);
  color:         #fff;
  border-radius: var(--t26-radius-xl) var(--t26-radius-xl) 0 0 !important;
  border:        none;
  padding:       1rem 1.25rem;
}

.modal-header .close,
.modal-header .btn-close {
  color:   #fff;
  opacity: .85;
  text-shadow: none;
}

.modal-header .close:hover,
.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-title {
  font-weight: 600;
  font-size:   1rem;
}

.modal-footer {
  border-top:    1px solid var(--t26-border-color);
  border-radius: 0 0 var(--t26-radius-xl) var(--t26-radius-xl) !important;
  padding:       .75rem 1.25rem;
}

.modal-backdrop.show {
  opacity: .45;
}


/* ------------------------------------------------------------
   12. DROPDOWNS
   ------------------------------------------------------------ */
.dropdown-menu {
  border:        1px solid var(--t26-border-color);
  border-radius: var(--t26-radius-lg) !important;
  box-shadow:    var(--t26-shadow-lg);
  padding:       .4rem;
  font-size:     .9rem;
}

.dropdown-item {
  border-radius: var(--t26-radius-sm);
  padding:       .45rem .75rem;
  color:         var(--t26-text);
  transition:    var(--t26-transition-fast);
}

.dropdown-item:hover {
  background-color: var(--t26-primary-light);
  color:            var(--t26-primary);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--t26-primary);
  color:            #fff;
}

.dropdown-divider {
  border-color: var(--t26-border-color);
  margin:       .3rem 0;
}


/* ------------------------------------------------------------
   13. PAGINATION
   ------------------------------------------------------------ */
.page-link {
  border:        1px solid var(--t26-border-color);
  border-radius: var(--t26-radius-md) !important;
  color:         var(--t26-primary);
  margin:        0 2px;
  font-size:     .88rem;
  transition:    var(--t26-transition-fast);
}

.page-link:hover {
  background-color: var(--t26-primary-light);
  border-color:     var(--t26-primary);
  color:            var(--t26-primary);
}

.page-item.active .page-link {
  background: linear-gradient(90deg, var(--t26-primary) 0%, var(--t26-primary-dark) 100%);
  border-color: var(--t26-primary);
  color:       #fff;
}

.page-item.disabled .page-link {
  opacity: .5;
}


/* ------------------------------------------------------------
   14. BREADCRUMB
   ------------------------------------------------------------ */
.breadcrumb {
  background:    transparent;
  padding:       .5rem 0;
  font-size:     .85rem;
  margin-bottom: .5rem;
}

.breadcrumb-item a {
  color: var(--t26-primary);
}

.breadcrumb-item.active {
  color: var(--t26-text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--t26-text-muted);
}


/* ------------------------------------------------------------
   15. SELECT2 (overrides)
   ------------------------------------------------------------ */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  background-color: var(--t26-input-bg);
  border:           1px solid var(--t26-border-color);
  border-radius:    var(--t26-radius-md) !important;
  min-height:       36px;
  transition:       var(--t26-transition-fast);
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--t26-primary);
  box-shadow:   0 0 0 3px rgba(1, 52, 117, 0.18);
  outline:      none;
}

.select2-dropdown {
  border:        1px solid var(--t26-border-color);
  border-radius: var(--t26-radius-lg) !important;
  box-shadow:    var(--t26-shadow-lg);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--t26-primary);
}

.select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: var(--t26-primary-light);
  color:            var(--t26-primary);
}


/* ------------------------------------------------------------
   16. DATATABLES (overrides)
   ------------------------------------------------------------ */
.dataTables_wrapper .dataTables_filter input {
  background:    var(--t26-input-bg);
  border:        1px solid var(--t26-border-color);
  border-radius: var(--t26-radius-md);
  padding:       .35rem .65rem;
  font-size:     .88rem;
  transition:    var(--t26-transition-fast);
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--t26-primary);
  box-shadow:   0 0 0 3px rgba(1, 52, 117, 0.18);
  outline:      none;
}

.dataTables_wrapper .dataTables_length select {
  background:    var(--t26-input-bg);
  border:        1px solid var(--t26-border-color);
  border-radius: var(--t26-radius-md);
  padding:       .25rem .5rem;
  font-size:     .88rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: linear-gradient(90deg, var(--t26-primary) 0%, var(--t26-primary-dark) 100%);
  border-color: var(--t26-primary);
  color:       #fff !important;
  border-radius: var(--t26-radius-md);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background:   var(--t26-primary-light);
  border-color: var(--t26-border-color);
  color:        var(--t26-primary) !important;
  border-radius: var(--t26-radius-md);
}

.dataTables_info {
  font-size: .85rem;
  color:     var(--t26-text-muted);
}


/* ------------------------------------------------------------
   17. LAYOUT HELPERS
   ------------------------------------------------------------ */
/* Contenedor de página */
.page-container {
  padding: 1.5rem;
}

/* Cabecera de sección */
.section-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-bottom:   1.25rem;
  padding-bottom:  .75rem;
  border-bottom:   2px solid var(--t26-border-color);
}

.section-title {
  font-size:   1.1rem;
  font-weight: 600;
  color:       var(--t26-primary);
  margin:      0;
}

/* Separador */
.t26-divider {
  border: none;
  border-top: 1px solid var(--t26-border-color);
  margin: 1.25rem 0;
}

/* Contenedor con borde izquierdo de acento */
.accent-left {
  border-left: 4px solid var(--t26-primary);
  padding-left: .85rem;
}


/* ------------------------------------------------------------
   18. UTILIDADES
   ------------------------------------------------------------ */
.text-primary   { color: var(--t26-primary) !important; }
.text-muted     { color: var(--t26-text-muted) !important; }
.bg-primary-light { background-color: var(--t26-primary-light) !important; }

.shadow-sm { box-shadow: var(--t26-shadow-sm) !important; }
.shadow-md { box-shadow: var(--t26-shadow-md) !important; }
.shadow-lg { box-shadow: var(--t26-shadow-lg) !important; }

.rounded-sm { border-radius: var(--t26-radius-sm) !important; }
.rounded-md { border-radius: var(--t26-radius-md) !important; }
.rounded-lg { border-radius: var(--t26-radius-lg) !important; }
.rounded-xl { border-radius: var(--t26-radius-xl) !important; }

.hover-lift {
  transition: var(--t26-transition);
}
.hover-lift:hover {
  transform:  translateY(-2px);
  box-shadow: var(--t26-shadow-lg);
}


/* ------------------------------------------------------------
   19. SCROLLBAR (Webkit)
   ------------------------------------------------------------ */
::-webkit-scrollbar {
  width:  6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f1f4;
}
::-webkit-scrollbar-thumb {
  background:    #c5cad4;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--t26-primary);
}


/* ------------------------------------------------------------
   20. DASHBOARD — Header, Tabs y Loading
   ------------------------------------------------------------ */

/* Header del dashboard */
.dashboard-header {
  background:    linear-gradient(135deg, var(--t26-primary) 0%, var(--t26-primary-dark) 100%);
  border-radius: var(--t26-radius-xl);
  padding:       1.5rem 2rem;
  box-shadow:    var(--t26-shadow-md);
}

.dashboard-header-inner {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
}

.dashboard-title {
  color:       #fff;
  font-size:   1.35rem;
  font-weight: 600;
  margin:      0 0 .2rem;
}

.dashboard-title .fa {
  margin-right: .5rem;
  opacity:      .85;
}

.dashboard-subtitle {
  color:     rgba(255,255,255,0.75);
  font-size: .85rem;
  margin:    0;
}

/* Contenedor de tabs del dashboard */
.dashboard-tabs-wrap {
  background:    #fff;
  border:        1px solid var(--t26-border-color);
  border-radius: var(--t26-radius-lg);
  box-shadow:    var(--t26-shadow-sm);
  overflow:      hidden;
}

/* Tabs */
.dashboard-tabs {
  border-bottom: none;
  flex-wrap:     nowrap;
  overflow-x:    auto;
  -webkit-overflow-scrolling: touch;
  padding:       .35rem .5rem 0;
  gap:           .2rem;
  scrollbar-width: none;
}

.dashboard-tabs::-webkit-scrollbar {
  display: none;
}

.dashboard-tabs .nav-item .nav-link {
  display:       inline-flex;
  align-items:   center;
  gap:           .4rem;
  white-space:   nowrap;
  border:        none;
  border-bottom: 3px solid transparent;
  border-radius: var(--t26-radius-md) var(--t26-radius-md) 0 0;
  color:         var(--t26-text-muted);
  font-size:     .85rem;
  font-weight:   500;
  padding:       .55rem .9rem;
  transition:    var(--t26-transition-fast);
}

.dashboard-tabs .nav-item .nav-link .fa {
  font-size: .9rem;
}

.dashboard-tabs .nav-item .nav-link:hover {
  color:            var(--t26-primary);
  background-color: var(--t26-primary-light);
  border-bottom-color: transparent;
}

.dashboard-tabs .nav-item .nav-link.active {
  color:               var(--t26-primary);
  background-color:    var(--t26-primary-light);
  border-bottom-color: var(--t26-primary);
  font-weight:         600;
}

/* Loading global */
#loading-global {
  position:   fixed;
  inset:      0;
  background: rgba(255,255,255,0.88);
  z-index:    99999;
  backdrop-filter: blur(2px);
}

#loading-global .loading-content {
  position:   absolute;
  top:        50%;
  left:       50%;
  transform:  translate(-50%, -50%);
  text-align: center;
}

.loading-spinner {
  width:         48px;
  height:        48px;
  border:        4px solid var(--t26-primary-light);
  border-top:    4px solid var(--t26-primary);
  border-radius: 50%;
  animation:     t26-spin .7s linear infinite;
  margin:        0 auto 1rem;
}

@keyframes t26-spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color:       var(--t26-primary);
  font-size:   .88rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Badges en filtro de periodo */
.badges-periodo {
  position: absolute;
  top:      0;
  right:    0;
}

.badges-periodo .badge {
  cursor: pointer;
  transition: var(--t26-transition-fast);
}

.badges-periodo .badge:hover {
  opacity: .85;
  transform: scale(1.05);
}

/* ─── DASHBOARD DE 3 COLUMNAS (ventas, cierres, etc.) ───────────────────── */

.dash-wrap {
  display:        flex;
  flex-direction: column;
  gap: 1rem;
  padding: .75rem 1rem 1.5rem;
  margin-top: 1rem;
}

.dash-slider-track {
  width: 100%;
  margin: 2.5rem ;
}

/* 3-column grid */
.dash-grid {
  display:               grid;
  grid-template-columns: 24% 1fr 27%;
  gap:                   1rem;
  align-items:           start;
}

.dash-col-left,
.dash-col-center,
.dash-col-right {
  min-width: 0; /* prevent grid blowout */
}

/* Grafico cards produced by JS */
.dash-wrap .grafico {
  margin-bottom: .75rem;
}

.dash-wrap .grafico .card {
  border:        1px solid var(--t26-border);
  border-radius: var(--t26-radius);
  box-shadow:    var(--t26-shadow-sm);
  overflow:      hidden;
}

.dash-wrap .grafico .card-header {
  background:    linear-gradient(135deg, var(--t26-primary) 0%, var(--t26-secondary) 100%);
  color:         #fff;
  font-weight:   600;
  font-size:     .82rem;
  padding:       .45rem 1rem;
  border-bottom: none;
}

.dash-wrap .grafico .card-body {
  padding: .75rem;
}

.titulo {
	color: #1e2939;
	font-size: 1.125rem;
	text-align: left;
	padding: 1rem;
}

.card .titulo {
  border-top-left-radius:  var(--t26-radius-lg);
  border-top-right-radius: var(--t26-radius-lg);
  background: linear-gradient(180deg, #0f4c8a 0%, #003366 100%);
  color: #ffffff;
}

.grafico .table {
	border-radius: 0;
}

.grafico table thead th {
    background-color: #003366;
    color: #fcfcfc;
    font-weight: 600;    
    letter-spacing: .05em;
    border-bottom: 2px solid var(--t26-border-color);
    padding: .6rem .75rem;
    white-space: nowrap;
}

.grafico table tbody td, .grafico table tbody td a {
	font-size: .9rem;
}

/* Responsive: stack columns on smaller screens */
@media (max-width: 1400px) {
  .dash-grid {
    grid-template-columns: 28% 1fr;
    grid-template-rows:    auto auto;
  }
  .dash-col-right {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .dash-col-right {
    grid-column: auto;
  }
}
