/* ==========================================================================
   PAAET PRO - LUXURY RACING SYSTEMS THEME (DÍA & NOCHE)
   Identidad Gráfica Oficial: Obsidian Leather & Gold (Noche) / Ivory Marble & Champagne (Día)
   100% adaptado para el SISTEMA PAAET PRO
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   1. VARIABLES DE SISTEMA: MODO NOCHE (DEFAULT) Y MODO DÍA
   ========================================================================== */
:root,
html.dark,
body.theme-dark,
[data-bs-theme="dark"] {
  --paaet-bg: #14110f;
  --paaet-bg-img: none;
  --paaet-card: #1c1714;
  --paaet-card-gradient: linear-gradient(145deg, #221c17 0%, #16120f 100%);
  --paaet-panel: #171310;
  --paaet-sidebar-bg: #161210;
  --paaet-topbar-bg: #181412;
  --paaet-border: #443527;
  --paaet-border-gold: #5c4734;
  --paaet-border-light: rgba(197, 160, 89, 0.2);
  --paaet-text: #eae2d5;
  --paaet-text-strong: #ffffff;
  --paaet-muted: #a89c8d;
  --paaet-gold: #d4af37;
  --paaet-gold-light: #f3e5ab;
  --paaet-focus-glow: 0 0 0 3px rgba(212, 175, 55, 0.25);
  --paaet-cyan: #00e5ff;
  --paaet-amber: #fbbf24;
  --paaet-emerald: #34d399;
  --paaet-primary: #d4af37;
  --paaet-primary-hover: #b89528;
  --paaet-blue-header: #1f1914;
  --paaet-danger: #ef4444;
  --paaet-danger-soft: rgba(239, 68, 68, 0.22);
  --paaet-danger-text: #fca5a5;
  --paaet-success: #10b981;
  --paaet-success-soft: rgba(16, 185, 129, 0.2);
  --paaet-warning: #f59e0b;
  --paaet-input-bg: #120f0d;
  --paaet-input-border: #443527;
  --paaet-input-text: #ffffff;
  --paaet-table-hover: rgba(197, 160, 89, 0.08);
  --paaet-table-zebra: rgba(255, 255, 255, 0.02);
  --paaet-user-card-bg: linear-gradient(180deg, #241d17 0%, #181410 100%);
  --paaet-nav-hover: rgba(197, 160, 89, 0.1);
  --paaet-nav-active-bg: linear-gradient(135deg, rgba(197, 160, 89, 0.18) 0%, rgba(138, 100, 48, 0.12) 100%);
  --paaet-nav-active-border: rgba(197, 160, 89, 0.65);
  --paaet-nav-active-text: #ffffff;

  /* Aliases para compatibilidad */
  --bg: #14110f;
  --card: #1c1714;
  --panel: #171310;
  --border: #443527;
  --text: #eae2d5;
  --muted: #a89c8d;
  --primary: #d4af37;
  --input-bg: #120f0d;

  /* Bootstrap 5.3 Overrides para Dark Mode */
  --bs-primary: #d4af37;
  --bs-primary-rgb: 212, 175, 55;
  --bs-body-color: #eae2d5;
  --bs-body-bg: #14110f;
  --bs-secondary-color: #a89c8d;
  --bs-tertiary-color: #c5b596;
  --bs-emphasis-color: #ffffff;
  --bs-border-color: #443527;
  --bs-table-color: #eae2d5;
  --bs-table-bg: transparent;
  --bs-table-striped-color: #eae2d5;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
  --bs-table-hover-color: #ffffff;
  --bs-table-hover-bg: rgba(197, 160, 89, 0.08);
  --bs-card-color: #eae2d5;
  --bs-card-bg: #1c1714;
  --bs-modal-color: #eae2d5;
  --bs-modal-bg: #1c1714;

  color-scheme: dark;
}

html:not(.dark),
html.light,
body.theme-light,
[data-bs-theme="light"] {
  /* Modo Claro - Mármol Italiano & Champagne Gold */
  --paaet-bg: #f7f4ec;
  --paaet-bg-img: url('/marble_bg.jpg');
  --paaet-card: #fdfcf9;
  --paaet-card-gradient: linear-gradient(145deg, #fdfcf9 0%, #f5efe4 100%);
  --paaet-panel: #f7f2e8;
  --paaet-sidebar-bg: #ece5d8;
  --paaet-topbar-bg: #f5f0e6;
  --paaet-border: #d8caa8;
  --paaet-border-gold: #cbb994;
  --paaet-border-light: #e8dfcd;
  --paaet-text: #241c16;
  --paaet-text-strong: #120c08;
  --paaet-muted: #5c4f42;
  --paaet-gold: #9a7218;
  --paaet-gold-light: #f9f5ea;
  --paaet-focus-glow: 0 0 0 3px rgba(154, 114, 24, 0.25);
  --paaet-cyan: #0284c7;
  --paaet-amber: #b45309;
  --paaet-emerald: #15803d;
  --paaet-primary: #9a7218;
  --paaet-primary-hover: #805d10;
  --paaet-blue-header: #221c17;
  --paaet-danger: #dc2626;
  --paaet-danger-soft: #fbe7e7;
  --paaet-danger-text: #991b1b;
  --paaet-success: #15803d;
  --paaet-success-soft: #e3f3e8;
  --paaet-warning: #b45309;
  --paaet-input-bg: #fdfbf7;
  --paaet-input-border: #cfbf9f;
  --paaet-input-text: #1c1612;
  --paaet-table-hover: #ebe3d5;
  --paaet-table-zebra: #f6f0e4;
  --paaet-user-card-bg: linear-gradient(180deg, #fdfbf7 0%, #f4ede2 100%);
  --paaet-nav-hover: #e6ddce;
  --paaet-nav-active-bg: linear-gradient(135deg, #ded2bf 0%, #ecd8bb 100%);
  --paaet-nav-active-border: #c5a059;
  --paaet-nav-active-text: #1a140f;

  /* Aliases para compatibilidad */
  --bg: #f7f4ec;
  --card: #fdfcf9;
  --panel: #fdfcf9;
  --border: #d8caa8;
  --text: #241c16;
  --muted: #5c4f42;
  --primary: #9a7218;
  --input-bg: #fdfbf7;

  /* Bootstrap 5.3 Overrides para Light Mode */
  --bs-primary: #9a7218;
  --bs-primary-rgb: 154, 114, 24;
  --bs-body-color: #241c16;
  --bs-body-bg: #f7f4ec;
  --bs-secondary-color: #5c4f42;
  --bs-tertiary-color: #7a6a57;
  --bs-emphasis-color: #120c08;
  --bs-border-color: #d8caa8;
  --bs-table-color: #241c16;
  --bs-table-bg: transparent;
  --bs-table-striped-color: #241c16;
  --bs-table-striped-bg: #f6f0e4;
  --bs-table-hover-color: #120c08;
  --bs-table-hover-bg: #ebe3d5;
  --bs-card-color: #241c16;
  --bs-card-bg: #fdfcf9;
  --bs-modal-color: #241c16;
  --bs-modal-bg: #fdfcf9;

  color-scheme: light;
}

.text-primary {
  color: var(--paaet-primary) !important;
}

body,
body.paaet-theme-body,
body.dashboard-bg,
body.theme-dark,
body.theme-light {
  background-color: var(--paaet-bg) !important;
  color: var(--paaet-text) !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.theme-dark,
html.dark,
html.dark body {
  background-image: radial-gradient(circle at 50% 0%, #251e18 0%, #14110f 85%) !important;
  background-repeat: repeat, no-repeat !important;
  background-attachment: scroll !important;
}

body.theme-light:not(.pagina-jugador),
html.light body:not(.pagina-jugador),
html:not(.dark) body:not(.pagina-jugador) {
  background-image: var(--paaet-bg-img), linear-gradient(180deg, #faf7f0 0%, #f2ece0 100%) !important;
  background-repeat: repeat, no-repeat !important;
  background-attachment: scroll !important;
  background-size: cover, auto !important;
}

/* Visibilidad de los logos del caballo según el modo */
html.dark .horse-logo-dark,
body.theme-dark .horse-logo-dark {
  display: block !important;
}
html.dark .horse-logo-light,
body.theme-dark .horse-logo-light {
  display: none !important;
}
html:not(.dark) .horse-logo-dark,
html.light .horse-logo-dark,
body.theme-light .horse-logo-dark {
  display: none !important;
}
html:not(.dark) .horse-logo-light,
html.light .horse-logo-light,
body.theme-light .horse-logo-light {
  display: block !important;
}

/* ==========================================================================
   2. CONTENEDOR GLOBAL Y SIDEBAR PERSISTENTE
   ========================================================================== */
#layoutPAAET {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  background: transparent !important;
  color: var(--paaet-text) !important;
  overflow: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#sidebarPAAET {
  width: 220px;
  min-width: 220px;
  background: var(--paaet-sidebar-bg) !important;
  border-right: 1.5px solid var(--paaet-border-gold) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 10px;
  box-sizing: border-box;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.2s ease, min-width 0.2s ease, background-color 0.2s ease;
  z-index: 1020;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
}

#sidebarPAAET.collapsed {
  width: 68px;
  min-width: 68px;
}

#sidebarPAAET.collapsed .nav-label,
#sidebarPAAET.collapsed .user-info-text,
#sidebarPAAET.collapsed .footer-text {
  display: none !important;
}

#sidebarPAAET.collapsed .sidebar-header {
  justify-content: center;
}

/* Brand Emblem en Sidebar */
.sidebar-brand-top {
  text-align: center;
  padding: 4px 0 10px;
  border-bottom: 1px solid var(--paaet-border);
  margin-bottom: 10px;
}
.sidebar-horse-emblem {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: contain;
  margin: 0 auto;
  border: 1.5px solid var(--paaet-border-gold);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}
body.theme-light .sidebar-horse-emblem {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.15);
}
.sidebar-horse-emblem:hover {
  transform: scale(1.06);
}

/* Header del Sidebar */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.btn-sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--paaet-text) !important;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.btn-sidebar-toggle:hover {
  background: var(--paaet-nav-hover) !important;
}

.sidebar-header .nav-label {
  color: var(--paaet-text-strong) !important;
}

/* Tarjeta de usuario en Sidebar */
.sidebar-user-card {
  background: var(--paaet-user-card-bg) !important;
  border: 1px solid var(--paaet-border) !important;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  transition: background-color 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.sidebar-user-card strong {
  font-size: 13px;
  color: var(--paaet-text-strong) !important;
  display: block;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.sidebar-user-card .user-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--paaet-text-strong) !important;
  letter-spacing: 0.5px;
}

.sidebar-user-card .user-meta {
  font-size: 11.5px;
  color: var(--paaet-muted) !important;
  line-height: 1.3;
}

/* Lista de navegación */
.sidebar-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  color: var(--paaet-text) !important;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-nav-item a:hover {
  background: var(--paaet-nav-hover) !important;
  color: var(--paaet-text-strong) !important;
}

.sidebar-nav-item.active a {
  background: var(--paaet-nav-active-bg) !important;
  border: 1.5px solid var(--paaet-nav-active-border) !important;
  color: var(--paaet-nav-active-text) !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sidebar-nav-item .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--paaet-gold) !important;
}

.sidebar-nav-item.active .nav-icon {
  color: var(--paaet-gold) !important;
}

.sidebar-nav-item.d-none,
[data-permiso].d-none {
  display: none !important;
}

/* Pie del sidebar */
.sidebar-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--paaet-border) !important;
  text-align: center;
}

.sidebar-version {
  font-size: 11px;
  color: var(--paaet-muted) !important;
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.sidebar-footer-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px auto 10px;
}

.sidebar-footer-logo .sidebar-horse-emblem {
  width: 54px;
  height: 54px;
}

#sidebarPAAET.collapsed .sidebar-footer-logo .sidebar-horse-emblem {
  width: 42px;
  height: 42px;
}

.sidebar-logo {
  max-width: 120px;
  max-height: 58px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.35));
}

.btn-sidebar-logout {
  width: 100%;
  background: transparent;
  border: 1px solid var(--paaet-border);
  color: var(--paaet-text) !important;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sidebar-logout:hover {
  background: var(--paaet-danger-soft) !important;
  border-color: var(--paaet-danger) !important;
  color: var(--paaet-danger) !important;
}

/* ==========================================================================
   3. TOP BAR PRINCIPAL PAAET PRO
   ========================================================================== */
#mainWrapperPAAET {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  background: transparent !important;
  transition: background-color 0.2s ease;
}

#topBarPAAET {
  height: 60px;
  min-height: 60px;
  background: var(--paaet-topbar-bg) !important;
  border-bottom: 1.5px solid var(--paaet-border-gold) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s ease;
  z-index: 1010;
}

/* Brand Section en Topbar */
.topbar-brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-horse-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--paaet-border-gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.25);
}

body.theme-light .topbar-horse-logo {
  background: rgba(255, 255, 255, 0.6);
}

.topbar-horse-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.topbar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.topbar-brand-text .brand-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--paaet-text-strong) !important;
}

.topbar-brand-text .brand-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--paaet-muted) !important;
  text-transform: uppercase;
}

.paaet-group-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--paaet-user-card-bg);
  border: 1px solid var(--paaet-border-gold);
  color: var(--paaet-amber) !important;
}

.topbar-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Date input estilo luxury */
.luxury-date-input {
  background: var(--paaet-input-bg) !important;
  border: 1.5px solid var(--paaet-border-gold) !important;
  color: var(--paaet-text) !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  outline: none;
}
.luxury-date-input:focus {
  border-color: var(--paaet-gold) !important;
  box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.25) !important;
}

.btn-cerrar-semana-top {
  background: var(--paaet-user-card-bg) !important;
  border: 1.5px solid var(--paaet-border-gold) !important;
  color: var(--paaet-text) !important;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: all 0.15s;
}

.btn-cerrar-semana-top:hover {
  border-color: var(--paaet-gold) !important;
  color: var(--paaet-text-strong) !important;
  transform: translateY(-1px);
}

.btn-theme-toggle {
  background: var(--paaet-user-card-bg) !important;
  border: 1.5px solid var(--paaet-border-gold) !important;
  color: var(--paaet-text) !important;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: all 0.15s;
}

.btn-theme-toggle:hover {
  border-color: var(--paaet-gold) !important;
  transform: translateY(-1px);
}

/* User Profile Badge en Topbar */
.topbar-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paaet-user-card-bg);
  border: 1.5px solid var(--paaet-border-gold);
  border-radius: 12px;
  padding: 5px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.topbar-user-badge:hover {
  transform: translateY(-1px);
  border-color: var(--paaet-gold);
}

.topbar-user-avatar {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.topbar-user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.topbar-user-name {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--paaet-text-strong) !important;
}

.topbar-user-meta {
  font-size: 10.5px;
  color: var(--paaet-muted) !important;
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-meta-dot {
  opacity: 0.6;
}

.topbar-user-card-icon {
  color: var(--paaet-gold);
  font-size: 14px;
  margin-left: 2px;
}

/* ==========================================================================
   4. VISTAS Y CONTENEDOR PRINCIPAL
   ========================================================================== */
#viewContainerPAAET {
  flex: 1;
  padding: 20px;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  min-height: 0;
  box-sizing: border-box;
  background: var(--paaet-bg) !important;
  color: var(--paaet-text) !important;
  transition: background-color 0.2s ease, color 0.2s ease;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: var(--paaet-gold) rgba(0, 0, 0, 0.15);
}

#viewContainerPAAET::-webkit-scrollbar {
  width: 12px !important;
  height: 12px !important;
  display: block !important;
}

#viewContainerPAAET::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.08) !important;
  border-left: 1px solid var(--paaet-border) !important;
}

body.theme-dark #viewContainerPAAET::-webkit-scrollbar-track,
html.dark #viewContainerPAAET::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35) !important;
  border-left: 1px solid var(--paaet-border-gold) !important;
}

body.theme-light #viewContainerPAAET::-webkit-scrollbar-track,
html.light #viewContainerPAAET::-webkit-scrollbar-track,
html:not(.dark) #viewContainerPAAET::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05) !important;
  border-left: 1px solid var(--paaet-border) !important;
}

#viewContainerPAAET::-webkit-scrollbar-thumb {
  background: var(--paaet-gold) !important;
  border-radius: 6px !important;
  border: 2px solid transparent !important;
  background-clip: padding-box !important;
  min-height: 40px !important;
}

#viewContainerPAAET::-webkit-scrollbar-thumb:hover {
  background: var(--paaet-primary-hover, #b89528) !important;
}

#viewContainerPAAET::-webkit-scrollbar-thumb:active {
  background: var(--paaet-gold-light, #f3e5ab) !important;
}

.paaet-view {
  display: block;
}

.paaet-view.d-none {
  display: none !important;
}

/* Encabezados de pantalla */
.paaet-screen-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 2px;
  color: var(--paaet-text-strong) !important;
  letter-spacing: -0.3px;
}

.paaet-screen-subtitle {
  font-size: 13px;
  color: var(--paaet-muted) !important;
  margin-bottom: 14px;
}

/* ==========================================================================
   4.1 TARJETAS LUXURY PAAET PRO (ESTILO IMAGEN OFICIAL)
   ========================================================================== */
.luxury-kpi-card {
  background: var(--paaet-card-gradient) !important;
  border: 1.5px solid var(--paaet-border-gold) !important;
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.luxury-kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--paaet-gold) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2), 0 0 12px rgba(197, 160, 89, 0.2);
}
.luxury-kpi-card .kpi-content {
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.luxury-kpi-card .kpi-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--paaet-muted) !important;
  margin-bottom: 3px;
}
.luxury-kpi-card .kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  font-family: 'Outfit', monospace;
}
.kpi-pozos .kpi-value { color: var(--paaet-gold) !important; }
.kpi-traslados .kpi-value { color: var(--paaet-cyan) !important; }
.kpi-jugando .kpi-value { color: var(--paaet-amber) !important; }
.kpi-disponible .kpi-value { color: var(--paaet-emerald) !important; }

.luxury-kpi-card .kpi-visual {
  width: 70px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 1;
}
.kpi-svg-accent {
  width: 65px;
  height: 36px;
}
.kpi-pozos .kpi-svg-accent { color: var(--paaet-gold); }
.kpi-traslados .kpi-svg-accent { color: var(--paaet-cyan); }
.kpi-jugando .kpi-svg-accent { color: var(--paaet-amber); }

/* Luxury Shortcut Cards */
.luxury-shortcut-card {
  background: var(--paaet-card-gradient) !important;
  border: 1.5px solid var(--paaet-border-gold) !important;
  border-radius: 16px;
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.luxury-shortcut-card:hover {
  transform: translateY(-5px);
  border-color: var(--paaet-gold) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25), 0 0 16px rgba(197, 160, 89, 0.25);
}
.shortcut-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.shortcut-icon-badge.badge-blue {
  background: rgba(212, 175, 55, 0.15);
  color: var(--paaet-gold);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
}
.shortcut-icon-badge.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
}
.shortcut-icon-badge.badge-gold {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  border: 1.5px solid rgba(212, 175, 55, 0.35);
}
.luxury-shortcut-card .shortcut-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--paaet-text-strong) !important;
  margin: 14px 0 6px;
  letter-spacing: 0.2px;
}
.luxury-shortcut-card .shortcut-desc {
  font-size: 0.88rem;
  color: var(--paaet-muted) !important;
  margin: 0;
  line-height: 1.4;
}

/* Luxury Date Range Pill */
.luxury-date-pill {
  background: var(--paaet-user-card-bg) !important;
  border: 1.5px solid var(--paaet-border-gold) !important;
  border-radius: 20px;
  padding: 6px 20px;
  color: var(--paaet-text) !important;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   4.2 MEJORAS DE CONTRASTE Y LEGIBILIDAD UNIVERSAL (DÍA & NOCHE)
   ========================================================================== */
/* Tablas en Modo Noche */
html.dark .table-paaet thead th,
body.theme-dark .table-paaet thead th,
html.dark .table-paaet-excel th,
body.theme-dark .table-paaet-excel th {
  background-color: #1f1914 !important;
  color: #ffffff !important;
  border-bottom: 2px solid #5c4734 !important;
}

/* Tablas en Modo Día (Mármol/Ivory) */
html:not(.dark) .table-paaet thead th,
html.light .table-paaet thead th,
body.theme-light .table-paaet thead th,
html:not(.dark) .table-paaet-excel th,
html.light .table-paaet-excel th,
body.theme-light .table-paaet-excel th {
  background-color: #241c16 !important;
  color: #ffffff !important;
  border-bottom: 2px solid #9a7218 !important;
}

/* Celdas de tabla */
html.dark .table-paaet-excel td,
body.theme-dark .table-paaet-excel td {
  color: #eae2d5 !important;
  border-bottom: 1px solid #33281e !important;
}
html:not(.dark) .table-paaet-excel td,
html.light .table-paaet-excel td,
body.theme-light .table-paaet-excel td {
  color: #241c16 !important;
  border-bottom: 1px solid #d8caa8 !important;
}

/* Números de alta legibilidad en Modo Noche */
html.dark .paaet-num-disponible-ok,
body.theme-dark .paaet-num-disponible-ok {
  color: #34d399 !important;
}
html.dark .paaet-num-pozo,
body.theme-dark .paaet-num-pozo {
  color: #d4af37 !important;
}
html.dark .paaet-num-jugando,
body.theme-dark .paaet-num-jugando {
  color: #fbbf24 !important;
}
html.dark .paaet-alias-text,
body.theme-dark .paaet-alias-text {
  color: #ffffff !important;
}

/* Números de alta legibilidad en Modo Día */
html:not(.dark) .paaet-num-disponible-ok,
html.light .paaet-num-disponible-ok,
body.theme-light .paaet-num-disponible-ok {
  color: #15803d !important;
}
html:not(.dark) .paaet-num-pozo,
html.light .paaet-num-pozo,
body.theme-light .paaet-num-pozo {
  color: #9a7218 !important;
}
html:not(.dark) .paaet-num-jugando,
html.light .paaet-num-jugando,
body.theme-light .paaet-num-jugando {
  color: #b45309 !important;
}
html:not(.dark) .paaet-alias-text,
html.light .paaet-alias-text,
body.theme-light .paaet-alias-text {
  color: #120c08 !important;
}
html:not(.dark) .paaet-index-text,
html.light .paaet-index-text,
body.theme-light .paaet-index-text {
  color: #5c4f42 !important;
}
html:not(.dark) .text-muted,
html.light .text-muted,
body.theme-light .text-muted {
  color: #5c4f42 !important;
}


/* ==========================================================================
   5. TABLAS ELECTRIC BLUE (PAAET MODERNA)
   ========================================================================== */
.paaet-table-card {
  background: var(--paaet-card) !important;
  border: 1px solid var(--paaet-border) !important;
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table-paaet {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--paaet-text) !important;
  margin: 0;
}

.table-paaet thead th {
  background-color: var(--paaet-blue-header) !important;
  color: #ffffff !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  text-align: center;
  border: none;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-paaet tbody tr {
  border-bottom: 1px solid var(--paaet-border) !important;
  background-color: var(--paaet-card);
  transition: background 0.1s;
}

.table-paaet tbody tr:nth-child(even) {
  background-color: var(--paaet-table-zebra) !important;
}

.table-paaet tbody tr:hover {
  background-color: var(--paaet-table-hover) !important;
}

.table-paaet td {
  padding: 7px 10px;
  vertical-align: middle;
  color: var(--paaet-text) !important;
}

/* Píldoras para números negativos y estados */
.pill-negativo {
  background: var(--paaet-danger-soft) !important;
  color: var(--paaet-danger-text) !important;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.num-positivo {
  color: var(--paaet-success) !important;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.num-cero {
  color: var(--paaet-muted) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   6. PIZARRA DE PLANOS (GRID INTERACTIVO)
   ========================================================================== */
.pizarra-toolbar {
  background: var(--paaet-card) !important;
  border: 1px solid var(--paaet-border) !important;
  border-radius: 6px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 3px;
}

.pizarra-toolbar-container {
  background: var(--paaet-card) !important;
  border: 1px solid var(--paaet-border) !important;
  border-radius: 6px;
  padding: 3px 6px !important;
  margin-bottom: 3px !important;
}

.btn-xs {
  padding: 1px 6px !important;
  font-size: 10.5px !important;
  line-height: 1.3 !important;
  border-radius: 3px !important;
  height: 22px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.pizarra-select {
  background: var(--paaet-input-bg) !important;
  border: 1px solid var(--paaet-input-border) !important;
  color: var(--paaet-input-text) !important;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
  height: 23px;
}

.btn-pizarra-action {
  background: var(--paaet-card) !important;
  border: 1px solid var(--paaet-border) !important;
  color: var(--paaet-text) !important;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  height: 23px;
  min-height: 23px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  transition: all 0.15s;
}

.btn-pizarra-action:hover {
  background: var(--paaet-table-hover) !important;
  color: var(--paaet-text-strong) !important;
}

.btn-pizarra-primary {
  background: var(--paaet-primary) !important;
  border-color: var(--paaet-primary) !important;
  color: #fff !important;
}

.btn-pizarra-primary:hover {
  background: var(--paaet-primary-hover) !important;
}

.btn-pizarra-danger {
  background: rgba(220, 38, 38, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
  color: #f87171 !important;
  font-weight: 700 !important;
}

.btn-pizarra-danger:hover {
  background: #dc2626 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

html.light .btn-pizarra-danger,
html:not(.dark) .btn-pizarra-danger,
body.theme-light .btn-pizarra-danger {
  background: #fee2e2 !important;
  border: 1px solid #fca5a5 !important;
  color: #b91c1c !important;
}

html.light .btn-pizarra-danger:hover,
html:not(.dark) .btn-pizarra-danger:hover,
body.theme-light .btn-pizarra-danger:hover {
  background: #dc2626 !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

/* ==========================================================================
   BOTONES OPERATIVOS EN PLANOS (COLORES SÓLIDOS POR DEFECTO DÍA Y NOCHE)
   ========================================================================== */

/* Contenedor Hero central (sin recuadro alrededor) */
.pizarra-hero-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

html.light .pizarra-hero-group,
html:not(.dark) .pizarra-hero-group,
body.theme-light .pizarra-hero-group {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Base de los botones Hero */
button.btn-pizarra-hero,
.btn-pizarra-hero {
  height: 28px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  padding: 4px 11px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

button.btn-pizarra-hero:hover,
.btn-pizarra-hero:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.1) !important;
}

/* 1. ABRIR NACIONALES (Verde sólido por defecto) */
button.btn-pizarra-hero-nac,
.btn-pizarra-hero-nac {
  background: #16a34a !important;
  border: 1px solid #22c55e !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.35) !important;
}
button.btn-pizarra-hero-nac:hover,
.btn-pizarra-hero-nac:hover {
  background: #15803d !important;
  color: #ffffff !important;
}
html.light button.btn-pizarra-hero-nac,
html.light .btn-pizarra-hero-nac,
html:not(.dark) button.btn-pizarra-hero-nac,
html:not(.dark) .btn-pizarra-hero-nac,
body.theme-light button.btn-pizarra-hero-nac,
body.theme-light .btn-pizarra-hero-nac {
  background: #15803d !important;
  border: 1px solid #166534 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(21, 128, 61, 0.25) !important;
}

/* 2. ABRIR AMERICANAS (Azul sólido por defecto) */
button.btn-pizarra-hero-amer,
.btn-pizarra-hero-amer {
  background: #2563eb !important;
  border: 1px solid #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.35) !important;
}
button.btn-pizarra-hero-amer:hover,
.btn-pizarra-hero-amer:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}
html.light button.btn-pizarra-hero-amer,
html.light .btn-pizarra-hero-amer,
html:not(.dark) button.btn-pizarra-hero-amer,
html:not(.dark) .btn-pizarra-hero-amer,
body.theme-light button.btn-pizarra-hero-amer,
body.theme-light .btn-pizarra-hero-amer {
  background: #1d4ed8 !important;
  border: 1px solid #1e40af !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.25) !important;
}

/* 3. CERRAR Y TOTALIZAR (Rojo/Carmesí sólido por defecto) */
button.btn-pizarra-hero-cerrar,
.btn-pizarra-hero-cerrar {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  border: 1px solid #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.4) !important;
}
button.btn-pizarra-hero-cerrar:hover,
.btn-pizarra-hero-cerrar:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%) !important;
  color: #ffffff !important;
}
html.light button.btn-pizarra-hero-cerrar,
html.light .btn-pizarra-hero-cerrar,
html:not(.dark) button.btn-pizarra-hero-cerrar,
html:not(.dark) .btn-pizarra-hero-cerrar,
body.theme-light button.btn-pizarra-hero-cerrar,
body.theme-light .btn-pizarra-hero-cerrar {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%) !important;
  border: 1px solid #7f1d1d !important;
  color: #ffffff !important;
  box-shadow: 0 2px 5px rgba(185, 28, 28, 0.3) !important;
}

/* 4. COPIAR PLANO (Verde WhatsApp sólido por defecto) */
button.btn-pizarra-hero-plano,
.btn-pizarra-hero-plano {
  background: #25D366 !important;
  border: 1px solid #20ba5a !important;
  color: #052e16 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 4px rgba(37, 211, 102, 0.35) !important;
}
button.btn-pizarra-hero-plano:hover,
.btn-pizarra-hero-plano:hover {
  background: #20ba5a !important;
  color: #052e16 !important;
}
html.light button.btn-pizarra-hero-plano,
html.light .btn-pizarra-hero-plano,
html:not(.dark) button.btn-pizarra-hero-plano,
html:not(.dark) .btn-pizarra-hero-plano,
body.theme-light button.btn-pizarra-hero-plano,
body.theme-light .btn-pizarra-hero-plano {
  background: #25D366 !important;
  border: 1px solid #1ebd5a !important;
  color: #052e16 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 4px rgba(37, 211, 102, 0.25) !important;
}

/* 5. PLANO POZO (Ámbar Dorado sólido por defecto) */
button.btn-pizarra-hero-pozo,
.btn-pizarra-hero-pozo {
  background: #d97706 !important;
  border: 1px solid #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.35) !important;
}
button.btn-pizarra-hero-pozo:hover,
.btn-pizarra-hero-pozo:hover {
  background: #f59e0b !important;
  color: #ffffff !important;
}
html.light button.btn-pizarra-hero-pozo,
html.light .btn-pizarra-hero-pozo,
html:not(.dark) button.btn-pizarra-hero-pozo,
html:not(.dark) .btn-pizarra-hero-pozo,
body.theme-light button.btn-pizarra-hero-pozo,
body.theme-light .btn-pizarra-hero-pozo {
  background: #b45309 !important;
  border: 1px solid #92400e !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(180, 83, 9, 0.25) !important;
}

/* 6. GUARDAR PLANO MANUAL (Azul cielo sólido por defecto) */
button.btn-pizarra-guardar-manual,
.btn-pizarra-guardar-manual {
  background: #0284c7 !important;
  border: 1px solid #38bdf8 !important;
  color: #ffffff !important;
  height: 27px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: filter 0.15s ease, transform 0.15s ease !important;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3) !important;
  line-height: 1 !important;
}
button.btn-pizarra-guardar-manual:hover,
.btn-pizarra-guardar-manual:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.1) !important;
}
html.light button.btn-pizarra-guardar-manual,
html.light .btn-pizarra-guardar-manual,
html:not(.dark) button.btn-pizarra-guardar-manual,
html:not(.dark) .btn-pizarra-guardar-manual,
body.theme-light button.btn-pizarra-guardar-manual,
body.theme-light .btn-pizarra-guardar-manual {
  background: #0369a1 !important;
  border: 1px solid #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(3, 105, 161, 0.25) !important;
}

/* 7. EDITAR CARRERA (Ámbar cálido sólido por defecto) */
button.btn-pizarra-editar,
.btn-pizarra-editar,
button.btn-pizarra-action.btn-pizarra-editar {
  background: #b45309 !important;
  border: 1px solid #f59e0b !important;
  color: #ffffff !important;
  height: 25px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 5px !important;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.3) !important;
}
button.btn-pizarra-editar:hover,
.btn-pizarra-editar:hover,
button.btn-pizarra-action.btn-pizarra-editar:hover {
  background: #d97706 !important;
  color: #ffffff !important;
}
html.light button.btn-pizarra-editar,
html.light .btn-pizarra-editar,
html.light button.btn-pizarra-action.btn-pizarra-editar,
html:not(.dark) button.btn-pizarra-editar,
html:not(.dark) .btn-pizarra-editar,
html:not(.dark) button.btn-pizarra-action.btn-pizarra-editar,
body.theme-light button.btn-pizarra-editar,
body.theme-light .btn-pizarra-editar,
body.theme-light button.btn-pizarra-action.btn-pizarra-editar {
  background: #d97706 !important;
  border: 1px solid #b45309 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.25) !important;
}
html.light button.btn-pizarra-editar:hover,
html:not(.dark) button.btn-pizarra-editar:hover,
body.theme-light button.btn-pizarra-editar:hover {
  background: #b45309 !important;
  color: #ffffff !important;
}

/* 8. TOTALES ANTERIORES (Púrpura sólido por defecto) */
button.btn-pizarra-totales,
.btn-pizarra-totales,
button.btn-pizarra-action.btn-pizarra-totales {
  background: #7c3aed !important;
  border: 1px solid #a855f7 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3) !important;
}
button.btn-pizarra-totales:hover,
.btn-pizarra-totales:hover,
button.btn-pizarra-action.btn-pizarra-totales:hover {
  background: #6d28d9 !important;
  color: #ffffff !important;
}
html.light button.btn-pizarra-totales,
html.light .btn-pizarra-totales,
html.light button.btn-pizarra-action.btn-pizarra-totales,
html:not(.dark) button.btn-pizarra-totales,
html:not(.dark) .btn-pizarra-totales,
html:not(.dark) button.btn-pizarra-action.btn-pizarra-totales,
body.theme-light button.btn-pizarra-totales,
body.theme-light .btn-pizarra-totales,
body.theme-light button.btn-pizarra-action.btn-pizarra-totales {
  background: #6d28d9 !important;
  border: 1px solid #5b21b6 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(109, 40, 217, 0.25) !important;
}
html.light button.btn-pizarra-totales:hover,
html:not(.dark) button.btn-pizarra-totales:hover,
body.theme-light button.btn-pizarra-totales:hover {
  background: #5b21b6 !important;
  color: #ffffff !important;
}

/* 9. SALDOS EN VIVO (Cian / Turquesa sólido por defecto) */
button.btn-pizarra-saldos,
.btn-pizarra-saldos,
button.btn-pizarra-action.btn-pizarra-saldos {
  background: #0891b2 !important;
  border: 1px solid #22d3ee !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(8, 145, 178, 0.3) !important;
}
button.btn-pizarra-saldos:hover,
.btn-pizarra-saldos:hover,
button.btn-pizarra-action.btn-pizarra-saldos:hover {
  background: #0e7490 !important;
  color: #ffffff !important;
}
html.light button.btn-pizarra-saldos,
html.light .btn-pizarra-saldos,
html.light button.btn-pizarra-action.btn-pizarra-saldos,
html:not(.dark) button.btn-pizarra-saldos,
html:not(.dark) .btn-pizarra-saldos,
html:not(.dark) button.btn-pizarra-action.btn-pizarra-saldos,
body.theme-light button.btn-pizarra-saldos,
body.theme-light .btn-pizarra-saldos,
body.theme-light button.btn-pizarra-action.btn-pizarra-saldos {
  background: #0e7490 !important;
  border: 1px solid #0891b2 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(14, 116, 144, 0.25) !important;
}
html.light button.btn-pizarra-saldos:hover,
html:not(.dark) button.btn-pizarra-saldos:hover,
body.theme-light button.btn-pizarra-saldos:hover {
  background: #155e75 !important;
  color: #ffffff !important;
}

/* 10. REPORTE (Gris pizarra sólido por defecto) */
button.btn-pizarra-reporte,
.btn-pizarra-reporte,
button.btn-pizarra-action.btn-pizarra-reporte {
  background: #334155 !important;
  border: 1px solid #64748b !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(51, 65, 85, 0.3) !important;
}
button.btn-pizarra-reporte:hover,
.btn-pizarra-reporte:hover,
button.btn-pizarra-action.btn-pizarra-reporte:hover {
  background: #1e293b !important;
  color: #ffffff !important;
}
html.light button.btn-pizarra-reporte,
html.light .btn-pizarra-reporte,
html.light button.btn-pizarra-action.btn-pizarra-reporte,
html:not(.dark) button.btn-pizarra-reporte,
html:not(.dark) .btn-pizarra-reporte,
html:not(.dark) button.btn-pizarra-action.btn-pizarra-reporte,
body.theme-light button.btn-pizarra-reporte,
body.theme-light .btn-pizarra-reporte,
body.theme-light button.btn-pizarra-action.btn-pizarra-reporte {
  background: #475569 !important;
  border: 1px solid #334155 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(71, 85, 105, 0.2) !important;
}
html.light button.btn-pizarra-reporte:hover,
html:not(.dark) button.btn-pizarra-reporte:hover,
body.theme-light button.btn-pizarra-reporte:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

/* Mini Pizarra de Resultados (1..10) */
.pizarra-resultados-strip {
  background: var(--paaet-card) !important;
  border: 1px solid var(--paaet-border) !important;
  border-radius: 5px;
  padding: 3px 6px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.res-box-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 26px;
}

.res-box-col .res-label {
  font-size: 8px;
  color: var(--paaet-muted) !important;
  font-weight: 700;
  line-height: 1;
}

.res-box-input {
  width: 27px;
  height: 19px;
  background: var(--paaet-input-bg) !important;
  border: 1px solid var(--paaet-input-border) !important;
  color: var(--paaet-input-text) !important;
  font-weight: 700;
  text-align: center;
  font-size: 10.5px;
  border-radius: 3px;
  padding: 0;
}

.res-box-input:focus {
  border-color: var(--paaet-primary) !important;
  outline: none;
}

/* Cajas de llegada (Oro Luxury PAAET) y Retirados (Rojo) */
.res-box-cab {
  border-color: rgba(212, 175, 55, 0.55) !important;
  color: #f3e5ab !important;
  font-weight: 800;
  background: rgba(212, 175, 55, 0.1) !important;
}
.res-box-cab:focus {
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35) !important;
  background: rgba(212, 175, 55, 0.18) !important;
}

.res-box-ret {
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #f87171 !important;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.08) !important;
}
.res-box-ret:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3) !important;
  background: rgba(239, 68, 68, 0.18) !important;
}

html:not(.dark) .res-box-cab,
html.light .res-box-cab,
body.theme-light .res-box-cab {
  color: #855e10 !important;
  border-color: #cbb994 !important;
  background: #fbf8f0 !important;
}
html:not(.dark) .res-box-cab:focus,
html.light .res-box-cab:focus,
body.theme-light .res-box-cab:focus {
  border-color: #9a7218 !important;
  box-shadow: 0 0 0 2px rgba(154, 114, 24, 0.25) !important;
  background: #ffffff !important;
}

html:not(.dark) .res-box-ret,
html.light .res-box-ret {
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
  background: #fef2f2 !important;
}

.paaet-err-chip {
  transition: all 0.15s ease;
  user-select: none;
  cursor: pointer;
}
.paaet-err-chip:hover {
  background: rgba(239, 68, 68, 0.32) !important;
  border-color: #ef4444 !important;
  transform: translateY(-1px);
}

/* Grilla de jugadas y Zoom dinámico (Estilo PAAET Modular) */
.grilla-jugadas-wrap {
  --pz-zoom: 1;
  background: #14110f !important;
  border: 1px solid #443527 !important;
  border-radius: 6px;
  max-height: calc(100vh - 225px) !important;
  min-height: 380px;
  overflow-x: auto !important;
  overflow-y: scroll !important;
  scrollbar-width: thin !important;
  scrollbar-color: #5c4734 #16120f !important;
}

/* Barra de desplazamiento (scrollbar) siempre visible y estilizada para la Pizarra */
.grilla-jugadas-wrap::-webkit-scrollbar {
  width: 12px !important;
  height: 10px !important;
}

.grilla-jugadas-wrap::-webkit-scrollbar-track {
  background: #16120f !important;
  border-left: 1px solid #443527 !important;
  border-radius: 0 5px 5px 0;
}

.grilla-jugadas-wrap::-webkit-scrollbar-thumb {
  background: #5c4734 !important;
  border-radius: 6px !important;
  border: 2px solid #16120f !important;
  min-height: 40px;
}

.grilla-jugadas-wrap::-webkit-scrollbar-thumb:hover {
  background: #d4af37 !important;
}

.grilla-jugadas-wrap::-webkit-scrollbar-thumb:active {
  background: #f3e5ab !important;
}

.grilla-jugadas-wrap .table-paaet {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: calc(13px * var(--pz-zoom, 1));
}

.grilla-jugadas-wrap .table-paaet thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 15 !important;
  background: #1c1714 !important;
  color: #d4af37 !important;
  font-weight: 700;
  font-size: calc(11px * var(--pz-zoom, 1)) !important;
  padding: calc(7px * var(--pz-zoom, 1)) calc(6px * var(--pz-zoom, 1)) !important;
  height: calc(34px * var(--pz-zoom, 1));
  border-bottom: 2px solid #5c4734 !important;
  border-right: 1px solid #33281e !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.grilla-jugadas-wrap .table-paaet tbody tr {
  border-bottom: 1px solid #2a2017 !important;
}

.grilla-jugadas-wrap .table-paaet tbody tr:hover {
  background-color: rgba(212, 175, 55, 0.08) !important;
}

.grilla-jugadas-wrap .table-paaet tbody td {
  padding: calc(4px * var(--pz-zoom, 1)) calc(5px * var(--pz-zoom, 1)) !important;
  font-size: calc(12.5px * var(--pz-zoom, 1)) !important;
  height: calc(36px * var(--pz-zoom, 1));
  border-right: 1px solid #2a2017 !important;
  border-bottom: 1px solid #2a2017 !important;
  vertical-align: middle;
}

.grilla-jugadas-wrap .input-grilla {
  width: 100%;
  background: #16120f !important;
  border: 1px solid #443527 !important;
  color: #f1f5f9 !important;
  font-size: calc(12.5px * var(--pz-zoom, 1)) !important;
  padding: calc(3px * var(--pz-zoom, 1)) calc(6px * var(--pz-zoom, 1)) !important;
  height: calc(29px * var(--pz-zoom, 1)) !important;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.grilla-jugadas-wrap .input-grilla:focus {
  background: #221c17 !important;
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3) !important;
  outline: none;
}

.btn-calc-recorte {
  width: 26px;
  height: 29px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(234, 179, 8, 0.35);
  background: rgba(234, 179, 8, 0.08);
  color: #fbbf24;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-calc-recorte:hover {
  background: rgba(234, 179, 8, 0.25);
  border-color: #f59e0b;
  color: #fff;
  transform: scale(1.05);
}

.grilla-jugadas-wrap .form-check-input {
  width: calc(15px * var(--pz-zoom, 1)) !important;
  height: calc(15px * var(--pz-zoom, 1)) !important;
}

/* Soporte de Zoom dinámico en Adelantadas */
.grilla-adelantadas-wrap {
  --ad-zoom: 1;
  background: #14110f !important;
  border: 1px solid #443527 !important;
  border-radius: 6px;
  max-height: calc(100vh - 225px) !important;
  min-height: 380px;
  overflow-x: auto !important;
  overflow-y: scroll !important;
  scrollbar-width: thin !important;
  scrollbar-color: #5c4734 #16120f !important;
}

.grilla-adelantadas-wrap::-webkit-scrollbar {
  width: 12px !important;
  height: 10px !important;
}

.grilla-adelantadas-wrap::-webkit-scrollbar-track {
  background: #16120f !important;
  border-left: 1px solid #443527 !important;
  border-radius: 0 5px 5px 0;
}

.grilla-adelantadas-wrap::-webkit-scrollbar-thumb {
  background: #5c4734 !important;
  border-radius: 6px !important;
  border: 2px solid #16120f !important;
  min-height: 40px;
}

.grilla-adelantadas-wrap::-webkit-scrollbar-thumb:hover {
  background: #d4af37 !important;
}

.grilla-adelantadas-wrap::-webkit-scrollbar-thumb:active {
  background: #f3e5ab !important;
}

.grilla-adelantadas-wrap .table-paaet,
#tablaAdelantadasPAAET {
  font-size: calc(13px * var(--ad-zoom, 1));
}

.grilla-adelantadas-wrap .table-paaet thead th,
#tablaAdelantadasPAAET thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 15 !important;
  background: #1c1714 !important;
  color: #d4af37 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  font-size: calc(11px * var(--ad-zoom, 1)) !important;
  padding: calc(6px * var(--ad-zoom, 1)) calc(6px * var(--ad-zoom, 1)) !important;
  border-bottom: 2px solid #5c4734 !important;
  border-right: 1px solid #33281e !important;
}

.grilla-adelantadas-wrap .table-paaet tbody td,
#tablaAdelantadasPAAET tbody td {
  padding: calc(4px * var(--ad-zoom, 1)) calc(5px * var(--ad-zoom, 1)) !important;
  font-size: calc(12.5px * var(--ad-zoom, 1)) !important;
  border-right: 1px solid #2a2017 !important;
  border-bottom: 1px solid #2a2017 !important;
}

.grilla-adelantadas-wrap .input-grilla,
#tablaAdelantadasPAAET .input-grilla,
#tablaAdelantadasPAAET .input-grilla-adelantadas {
  font-size: calc(12px * var(--ad-zoom, 1)) !important;
  padding: calc(2px * var(--ad-zoom, 1)) calc(4px * var(--ad-zoom, 1)) !important;
  height: calc(28px * var(--ad-zoom, 1)) !important;
  background: #16120f !important;
  border: 1px solid #443527 !important;
  color: #f1f5f9 !important;
}

.grilla-adelantadas-wrap .input-grilla:focus,
#tablaAdelantadasPAAET .input-grilla:focus,
#tablaAdelantadasPAAET .input-grilla-adelantadas:focus {
  background: #221c17 !important;
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3) !important;
}

/* ==========================================================================
   GRILLAS EN MODO DÍA (MÁRMOL IVORY & CHAMPAGNE) - CERO FONDOS OSCUROS
   ========================================================================== */
html:not(.dark) .grilla-jugadas-wrap,
html.light .grilla-jugadas-wrap,
body.theme-light .grilla-jugadas-wrap,
html:not(.dark) .grilla-adelantadas-wrap,
html.light .grilla-adelantadas-wrap,
body.theme-light .grilla-adelantadas-wrap {
  background: #fdfcf9 !important;
  border: 1px solid #d8caa8 !important;
  scrollbar-color: #c5a059 #f5efe4 !important;
}

html:not(.dark) .grilla-jugadas-wrap::-webkit-scrollbar-track,
html.light .grilla-jugadas-wrap::-webkit-scrollbar-track,
body.theme-light .grilla-jugadas-wrap::-webkit-scrollbar-track,
html:not(.dark) .grilla-adelantadas-wrap::-webkit-scrollbar-track,
html.light .grilla-adelantadas-wrap::-webkit-scrollbar-track,
body.theme-light .grilla-adelantadas-wrap::-webkit-scrollbar-track {
  background: #f5efe4 !important;
  border-left: 1px solid #d8caa8 !important;
}

html:not(.dark) .grilla-jugadas-wrap::-webkit-scrollbar-thumb,
html.light .grilla-jugadas-wrap::-webkit-scrollbar-thumb,
body.theme-light .grilla-jugadas-wrap::-webkit-scrollbar-thumb,
html:not(.dark) .grilla-adelantadas-wrap::-webkit-scrollbar-thumb,
html.light .grilla-adelantadas-wrap::-webkit-scrollbar-thumb,
body.theme-light .grilla-adelantadas-wrap::-webkit-scrollbar-thumb {
  background: #c5a059 !important;
  border: 2px solid #f5efe4 !important;
}

html:not(.dark) .grilla-jugadas-wrap::-webkit-scrollbar-thumb:hover,
html.light .grilla-jugadas-wrap::-webkit-scrollbar-thumb:hover,
body.theme-light .grilla-jugadas-wrap::-webkit-scrollbar-thumb:hover,
html:not(.dark) .grilla-adelantadas-wrap::-webkit-scrollbar-thumb:hover,
html.light .grilla-adelantadas-wrap::-webkit-scrollbar-thumb:hover,
body.theme-light .grilla-adelantadas-wrap::-webkit-scrollbar-thumb:hover {
  background: #9a7218 !important;
}

html:not(.dark) .grilla-jugadas-wrap .table-paaet thead th,
html.light .grilla-jugadas-wrap .table-paaet thead th,
body.theme-light .grilla-jugadas-wrap .table-paaet thead th,
html:not(.dark) .grilla-adelantadas-wrap .table-paaet thead th,
html.light .grilla-adelantadas-wrap .table-paaet thead th,
body.theme-light .grilla-adelantadas-wrap .table-paaet thead th,
html:not(.dark) #tablaAdelantadasPAAET thead th,
html.light #tablaAdelantadasPAAET thead th,
body.theme-light #tablaAdelantadasPAAET thead th {
  background: linear-gradient(180deg, #fdfbf7 0%, #ece2ce 100%) !important;
  color: #19140e !important;
  border-bottom: 2px solid #c5a059 !important;
  border-right: 1px solid #d8caa8 !important;
  box-shadow: 0 2px 4px rgba(44, 36, 28, 0.08) !important;
}

html:not(.dark) .grilla-jugadas-wrap .table-paaet tbody tr,
html.light .grilla-jugadas-wrap .table-paaet tbody tr,
body.theme-light .grilla-jugadas-wrap .table-paaet tbody tr,
html:not(.dark) .grilla-adelantadas-wrap .table-paaet tbody tr,
html.light .grilla-adelantadas-wrap .table-paaet tbody tr,
body.theme-light .grilla-adelantadas-wrap .table-paaet tbody tr {
  border-bottom: 1px solid #e8dfcd !important;
}

html:not(.dark) .grilla-jugadas-wrap .table-paaet tbody tr:hover,
html.light .grilla-jugadas-wrap .table-paaet tbody tr:hover,
body.theme-light .grilla-jugadas-wrap .table-paaet tbody tr:hover,
html:not(.dark) .grilla-adelantadas-wrap .table-paaet tbody tr:hover,
html.light .grilla-adelantadas-wrap .table-paaet tbody tr:hover,
body.theme-light .grilla-adelantadas-wrap .table-paaet tbody tr:hover {
  background-color: rgba(197, 160, 89, 0.15) !important;
}

html:not(.dark) .grilla-jugadas-wrap .table-paaet tbody td,
html.light .grilla-jugadas-wrap .table-paaet tbody td,
body.theme-light .grilla-jugadas-wrap .table-paaet tbody td,
html:not(.dark) .grilla-adelantadas-wrap .table-paaet tbody td,
html.light .grilla-adelantadas-wrap .table-paaet tbody td,
body.theme-light .grilla-adelantadas-wrap .table-paaet tbody td,
html:not(.dark) #tablaAdelantadasPAAET tbody td,
html.light #tablaAdelantadasPAAET tbody td,
body.theme-light #tablaAdelantadasPAAET tbody td {
  border-right: 1px solid #e8dfcd !important;
  border-bottom: 1px solid #e8dfcd !important;
  color: #19140e !important;
}

html:not(.dark) .grilla-jugadas-wrap .input-grilla,
html.light .grilla-jugadas-wrap .input-grilla,
body.theme-light .grilla-jugadas-wrap .input-grilla,
html:not(.dark) .grilla-adelantadas-wrap .input-grilla,
html.light .grilla-adelantadas-wrap .input-grilla,
body.theme-light .grilla-adelantadas-wrap .input-grilla,
html:not(.dark) #tablaAdelantadasPAAET .input-grilla,
html.light #tablaAdelantadasPAAET .input-grilla,
body.theme-light #tablaAdelantadasPAAET .input-grilla,
html:not(.dark) #tablaAdelantadasPAAET .input-grilla-adelantadas,
html.light #tablaAdelantadasPAAET .input-grilla-adelantadas,
body.theme-light #tablaAdelantadasPAAET .input-grilla-adelantadas {
  background: #ffffff !important;
  border: 1px solid #cfbf9f !important;
  color: #19140e !important;
}

html:not(.dark) .grilla-jugadas-wrap .input-grilla:focus,
html.light .grilla-jugadas-wrap .input-grilla:focus,
body.theme-light .grilla-jugadas-wrap .input-grilla:focus,
html:not(.dark) .grilla-adelantadas-wrap .input-grilla:focus,
html.light .grilla-adelantadas-wrap .input-grilla:focus,
body.theme-light .grilla-adelantadas-wrap .input-grilla:focus,
html:not(.dark) #tablaAdelantadasPAAET .input-grilla:focus,
html.light #tablaAdelantadasPAAET .input-grilla:focus,
body.theme-light #tablaAdelantadasPAAET .input-grilla:focus,
html:not(.dark) #tablaAdelantadasPAAET .input-grilla-adelantadas:focus,
html.light #tablaAdelantadasPAAET .input-grilla-adelantadas:focus,
body.theme-light #tablaAdelantadasPAAET .input-grilla-adelantadas:focus {
  background: #ffffff !important;
  border-color: #9a7218 !important;
  box-shadow: 0 0 0 2px rgba(154, 114, 24, 0.25) !important;
}

/* ==========================================================================
   7. COMISIONES POR SOCIOS - GRÁFICO PASTEL + LEYENDA SIN BARRITAS + ALTO CONTRASTE
   ========================================================================== */

/* Barra Horizontal Compacta de Resumen (3 Indicadores Limpios) */
.comisiones-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--paaet-card);
  border: 1px solid var(--paaet-border);
  border-radius: 8px;
  padding: 8px 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.summary-col {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.summary-col-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--paaet-muted);
  text-transform: capitalize;
}

.summary-col-val {
  font-size: 16px;
  font-weight: 800;
  font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
  letter-spacing: -0.01em;
}

.summary-divider {
  width: 1px;
  height: 24px;
  background: var(--paaet-border);
  opacity: 0.6;
}

.summary-col.highlight-col {
  background: rgba(16, 185, 129, 0.08);
  padding: 3px 12px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   CONTRASTE NUMÉRICO MÁXIMO (MODO NOCHE Y DÍA)
   ========================================================================== */
.bento-val-neutral,
.num-contrast-neutral {
  color: #ffffff !important;
}

.bento-val-positive,
.num-contrast-positive {
  color: #34d399 !important;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.25);
}

.bento-val-negative,
.num-contrast-negative {
  color: #f87171 !important;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.25);
}

.bento-val-gold,
.num-contrast-gold {
  color: #fbbf24 !important;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.25);
}

/* Modo Día: Contraste para números */
html:not(.dark) .bento-val-neutral,
html.light .bento-val-neutral,
body.theme-light .bento-val-neutral {
  color: #0f172a !important;
  text-shadow: none !important;
}

html:not(.dark) .bento-val-positive,
html.light .bento-val-positive,
body.theme-light .bento-val-positive {
  color: #047857 !important;
  text-shadow: none !important;
}

html:not(.dark) .bento-val-negative,
html.light .bento-val-negative,
body.theme-light .bento-val-negative {
  color: #b91c1c !important;
  text-shadow: none !important;
}

html:not(.dark) .bento-val-gold,
html.light .bento-val-gold,
body.theme-light .bento-val-gold {
  color: #9a7218 !important;
  text-shadow: none !important;
}

html:not(.dark) .comisiones-summary-bar,
html.light .comisiones-summary-bar,
body.theme-light .comisiones-summary-bar {
  background: #fdfcf9 !important;
  border-color: #d8caa8 !important;
}

html:not(.dark) .summary-col.highlight-col,
html.light .summary-col.highlight-col,
body.theme-light .summary-col.highlight-col {
  background: rgba(4, 120, 87, 0.08) !important;
  border-color: rgba(4, 120, 87, 0.25) !important;
}

/* ==========================================================================
   LAYOUT SPLIT: TERCIOS (IZQUIERDA) Y DONUT + LEYENDA (DERECHA)
   ========================================================================== */
.comisiones-split-wrap {
  display: grid;
  grid-template-columns: 1fr 385px;
  gap: 14px;
  align-items: start;
}

@media (max-width: 992px) {
  .comisiones-split-wrap {
    grid-template-columns: 1fr;
  }
}

/* Donut Chart SVG */
.donut-chart-wrapper {
  background: rgba(0, 0, 0, 0.05);
  position: relative;
}

html:not(.dark) .donut-chart-wrapper,
html.light .donut-chart-wrapper,
body.theme-light .donut-chart-wrapper {
  background: rgba(0, 0, 0, 0.02);
}

.donut-chart-svg {
  display: block;
  overflow: visible;
}

/* Proteccion y Estilos de Rebanadas del Donut (neutraliza svg [fill]{fill:currentColor!important} de fenix.css) */
#svgDonutComisionesPAAET path,
#svgDonutComisionesPAAET path[fill],
#svgDonutComisionesPAAET .donut-slice,
svg.donut-chart-svg path,
svg.donut-chart-svg path[fill] {
  fill: var(--slice-color, #d4af37) !important;
  stroke: var(--paaet-card, #1c1815) !important;
  stroke-width: 1.5px !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s, stroke 0.2s;
  transform-origin: 100px 100px;
}

html:not(.dark) #svgDonutComisionesPAAET path,
html:not(.dark) #svgDonutComisionesPAAET path[fill],
html:not(.dark) #svgDonutComisionesPAAET .donut-slice,
html.light #svgDonutComisionesPAAET path,
html.light #svgDonutComisionesPAAET path[fill],
html.light #svgDonutComisionesPAAET .donut-slice,
body.theme-light #svgDonutComisionesPAAET path,
body.theme-light #svgDonutComisionesPAAET path[fill],
body.theme-light #svgDonutComisionesPAAET .donut-slice {
  stroke: #fdfcf9 !important;
}

#svgDonutComisionesPAAET circle.donut-slice {
  fill: none !important;
  stroke: var(--slice-color, #d4af37) !important;
}

#svgDonutComisionesPAAET path.donut-slice:hover {
  transform: scale(1.04);
  opacity: 0.95;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.45));
}

#svgDonutComisionesPAAET path.donut-slice.selected {
  transform: scale(1.03);
  stroke: #d4af37 !important;
  stroke-width: 2.5px !important;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
}

.donut-center-title {
  font-size: 11px;
  font-weight: 800;
  fill: var(--paaet-muted, #94a3b8) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.donut-center-amount {
  font-size: 15px;
  font-weight: 800;
  fill: var(--paaet-text-strong, #ffffff) !important;
  letter-spacing: -0.01em;
}

.donut-center-sub {
  font-size: 11px;
  font-weight: 700;
  fill: var(--paaet-gold, #d4af37) !important;
}

html:not(.dark) .donut-center-title,
html.light .donut-center-title,
body.theme-light .donut-center-title {
  fill: #64748b !important;
}

html:not(.dark) .donut-center-amount,
html.light .donut-center-amount,
body.theme-light .donut-center-amount {
  fill: #0f172a !important;
}

html:not(.dark) .donut-center-sub,
html.light .donut-center-sub,
body.theme-light .donut-center-sub {
  fill: #b45309 !important;
}

/* Buscador de la Leyenda */
.comisiones-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.comisiones-search-wrapper .search-icon {
  position: absolute;
  left: 10px;
  font-size: 11px;
  pointer-events: none;
}

.comisiones-search-wrapper input {
  background: var(--paaet-input-bg) !important;
  border: 1px solid var(--paaet-input-border) !important;
  color: var(--paaet-input-text) !important;
  border-radius: 6px;
}

/* Leyenda Interactiva (reemplaza las barritas) */
.socio-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
}

.socio-legend-item:hover {
  background: var(--paaet-table-hover) !important;
}

.socio-legend-item.selected {
  background: var(--paaet-nav-active-bg) !important;
  border-left: 3px solid var(--paaet-gold, #d4af37) !important;
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.08);
}

.legend-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.socio-name-text {
  color: var(--paaet-text-strong);
  font-weight: 700;
}

.legend-pct-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--paaet-muted);
}

html:not(.dark) .legend-pct-pill,
html.light .legend-pct-pill,
body.theme-light .legend-pct-pill {
  background: rgba(0, 0, 0, 0.05);
  color: #5c4f42;
}

html:not(.dark) .socio-legend-item,
html.light .socio-legend-item,
body.theme-light .socio-legend-item {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

html:not(.dark) .socio-legend-item:hover,
html.light .socio-legend-item:hover,
body.theme-light .socio-legend-item:hover {
  background: #f4ede0 !important;
}

html:not(.dark) .socio-legend-item.selected,
html.light .socio-legend-item.selected,
body.theme-light .socio-legend-item.selected {
  background: #ede3d2 !important;
  border-left-color: #9a7218 !important;
}

/* Filas de Tercios y Desglose de Carreras */
.tercio-codigo-text {
  color: var(--paaet-text-strong);
  font-weight: 700;
}

.tercio-monto-num {
  font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.fila-jugador-socio:hover {
  background: var(--paaet-table-hover) !important;
}

.comision-carreras-box {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 6px;
  margin: 4px 10px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

html:not(.dark) .comision-carreras-box,
html.light .comision-carreras-box,
body.theme-light .comision-carreras-box {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.comision-carreras-table th {
  font-size: 10px;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--paaet-gold, #d4af37);
  padding: 6px 8px;
}

.comision-carreras-table td {
  padding: 5px 8px;
}

.hipodromo-nombre-text {
  color: var(--paaet-text-strong);
}

.carrera-bruta-num {
  font-variant-numeric: tabular-nums;
}

/* Resaltado amarillo de celdas con error */
.input-celda-error {
  background-color: #fef08a !important;
  color: #000000 !important;
  border: 1px solid #eab308 !important;
  font-weight: 700 !important;
}

.dia-row-paaet {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dia-row-paaet:hover {
  background-color: var(--paaet-nav-active-bg) !important;
}

/* Escudo anti-doble clic */
.btn-clicked-cooldown {
  pointer-events: none !important;
  opacity: 0.72 !important;
  cursor: wait !important;
  filter: grayscale(20%);
  transition: opacity 0.12s ease-in-out;
}

/* ==========================================================================
   8. FORMULARIOS, INPUTS Y CONTROLES ADAPTATIVOS (DÍA Y NOCHE)
   ========================================================================== */

/* Etiquetas globales */
.form-label,
label.form-label,
label {
  color: var(--paaet-text);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  letter-spacing: 0.2px;
}

/* Campos de texto, áreas de texto y desplegables */
.form-control,
input.form-control,
textarea.form-control,
.form-select,
select.form-select,
select.form-control {
  background-color: var(--paaet-input-bg) !important;
  border: 1px solid var(--paaet-input-border) !important;
  color: var(--paaet-input-text) !important;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
input.form-control:focus,
textarea.form-control:focus,
.pizarra-select:focus,
.form-select:focus {
  background-color: var(--paaet-input-bg) !important;
  border-color: var(--paaet-primary) !important;
  color: var(--paaet-input-text) !important;
  box-shadow: var(--paaet-focus-glow) !important;
  outline: none !important;
}

/* Placeholders siempre legibles */
::placeholder,
input::placeholder,
textarea::placeholder,
.form-control::placeholder,
.pizarra-select::placeholder,
.input-grilla::placeholder,
.swal2-input::placeholder,
.swal2-textarea::placeholder {
  color: var(--paaet-muted) !important;
  opacity: 1 !important;
  font-style: normal;
}

::-webkit-input-placeholder { color: var(--paaet-muted) !important; opacity: 1 !important; }
::-moz-placeholder { color: var(--paaet-muted) !important; opacity: 1 !important; }
:-ms-input-placeholder { color: var(--paaet-muted) !important; opacity: 1 !important; }

/* Desplegables Select */
.form-select option,
select option {
  background-color: var(--paaet-card) !important;
  color: var(--paaet-text) !important;
  padding: 6px 10px;
}

/* Inputs de tipo fecha */
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control,
input[type="date"].pizarra-select {
  color-scheme: inherit;
}

/* Checkboxes y Radios */
.form-check-input {
  background-color: var(--paaet-input-bg) !important;
  border: 1px solid var(--paaet-input-border) !important;
  cursor: pointer;
}
.form-check-input:checked {
  background-color: var(--paaet-primary) !important;
  border-color: var(--paaet-primary) !important;
}
.form-check-label {
  color: var(--paaet-text) !important;
  cursor: pointer;
  user-select: none;
}

/* Tarjetas genéricas */
.card.bg-dark,
.paaet-card,
.form-card,
.pizarra-card {
  background-color: var(--paaet-card) !important;
  border: 1px solid var(--paaet-border) !important;
  color: var(--paaet-text) !important;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.card.bg-dark .card-header,
.card.bg-dark .card-footer {
  background-color: var(--paaet-panel) !important;
  border-color: var(--paaet-border) !important;
  color: var(--paaet-text) !important;
}

/* Diálogos SweetAlert2 y Modales */
.swal2-container {
  background-color: rgba(0, 0, 0, 0.65) !important;
}

/* Los toasts emergentes y alertas sin backdrop NUNCA deben oscurecer la pantalla ni generar bandas oscuras */
body.swal2-toast-shown .swal2-container,
.swal2-container.swal2-no-backdrop,
.swal2-container.swal2-backdrop-hide,
.swal2-container:not(.swal2-backdrop-show),
.swal2-container:has(.swal2-toast) {
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.swal2-popup.swal2-modal,
div[role="dialog"].swal2-popup {
  background: var(--paaet-card, #1c1714) !important;
  color: var(--paaet-text, #eae2d5) !important;
  border: 1px solid var(--paaet-border, #443527) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

/* Soporte visual completo para Notificaciones Toast de SweetAlert2 */
.swal2-popup.swal2-toast {
  background: var(--paaet-card, #1c1714) !important;
  color: var(--paaet-text, #eae2d5) !important;
  border: 1px solid var(--paaet-border, #443527) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65) !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem !important;
}

.swal2-popup.swal2-toast .swal2-title {
  color: var(--paaet-text, #eae2d5) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

.swal2-popup.swal2-toast .swal2-html-container {
  color: var(--paaet-muted, #9c8a77) !important;
  font-size: 0.8rem !important;
}

.swal2-popup.swal2-toast .swal2-timer-progress-bar {
  background: var(--paaet-primary, #d4af37) !important;
}

.swal2-popup.swal2-toast .swal2-icon [class^='swal2-success-circular-line'],
.swal2-popup.swal2-toast .swal2-icon [class^='swal2-success-fix'] {
  background-color: transparent !important;
}

div.swal2-popup > div:not(.swal2-icon):not(.swal2-actions) {
  background: transparent !important;
}

.swal2-title,
.swal2-html-container {
  color: var(--paaet-text-strong) !important;
  background: transparent !important;
}

.swal2-input,
.swal2-textarea,
.swal2-select {
  background-color: var(--paaet-input-bg) !important;
  border: 1px solid var(--paaet-input-border) !important;
  color: var(--paaet-input-text) !important;
  font-size: 0.95rem !important;
  box-shadow: none !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
  border-color: var(--paaet-primary) !important;
  box-shadow: var(--paaet-focus-glow) !important;
  background-color: var(--paaet-input-bg) !important;
}

.swal2-html-container label {
  color: var(--paaet-text) !important;
  font-weight: 600 !important;
  display: block;
  margin-bottom: 4px;
}

/* ==========================================================================
   MODALES Y DIÁLOGOS UNIVERSALES PAAET (DÍA Y NOCHE)
   Garantiza coherencia total en todas las funciones del sistema.
   ========================================================================== */

/* Corrección de recuadros: Asegurar que el diálogo contenedor sea 100% transparente */
.modal,
.modal-dialog,
div[role="dialog"] > div.modal-dialog,
.modal > .modal-dialog {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Contenedor del Modal */
.modal-content {
  background-color: var(--paaet-card) !important;
  color: var(--paaet-text) !important;
  border: 1px solid var(--paaet-border) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background-clip: padding-box !important;
}

/* Cabecera del Modal */
.modal-header {
  background-color: var(--paaet-panel) !important;
  border-bottom: 1px solid var(--paaet-border) !important;
  color: #ffffff !important;
  padding: 14px 20px !important;
  border-top-left-radius: 13px !important;
  border-top-right-radius: 13px !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Título */
.modal-title,
.modal-header .modal-title,
.modal-header h5,
.modal-header h6 {
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
}

/* Cuerpo del Modal */
.modal-body {
  background-color: var(--paaet-bg) !important;
  color: var(--paaet-text) !important;
}

/* Pie del Modal */
.modal-footer {
  background-color: var(--paaet-panel) !important;
  border-top: 1px solid var(--paaet-border) !important;
  padding: 12px 20px !important;
  border-bottom-left-radius: 13px !important;
  border-bottom-right-radius: 13px !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

/* Botón de Cerrar (X) Universal con contraste perfecto */
.btn-close,
.modal-header .btn-close,
.offcanvas-header .btn-close,
button.btn-close {
  box-sizing: content-box !important;
  width: 1em !important;
  height: 1em !important;
  padding: 0.35em !important;
  opacity: 0.85 !important;
  border: none !important;
  border-radius: 6px !important;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
  cursor: pointer !important;
  transition: opacity 0.15s, transform 0.15s, background-color 0.15s !important;
}

.btn-close:hover,
.modal-header .btn-close:hover,
.offcanvas-header .btn-close:hover {
  opacity: 1 !important;
  background-color: rgba(255, 255, 255, 0.18) !important;
  transform: scale(1.08) !important;
}

html:not(.dark) .modal-header .btn-close,
html.light .modal-header .btn-close,
body.theme-light .modal-header .btn-close,
html:not(.dark) .btn-close,
html.light .btn-close,
body.theme-light .btn-close {
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2319140e'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
}


/* Controles dentro de Modales (Inputs, Selects, Áreas de texto) */
.modal .form-control,
.modal input.form-control,
.modal select.form-control,
.modal textarea.form-control,
.modal .form-select,
.modal select,
.offcanvas .form-control,
.offcanvas .form-select,
.offcanvas select {
  background-color: var(--paaet-input-bg) !important;
  border: 1px solid var(--paaet-input-border) !important;
  color: var(--paaet-input-text) !important;
  border-radius: 8px !important;
}

.modal .form-control:focus,
.modal .form-select:focus,
.modal select:focus,
.offcanvas .form-control:focus,
.offcanvas .form-select:focus {
  background-color: var(--paaet-input-bg) !important;
  border-color: var(--paaet-primary) !important;
  color: var(--paaet-input-text) !important;
  box-shadow: var(--paaet-focus-glow) !important;
}

.modal select option,
.offcanvas select option,
select option {
  background-color: var(--paaet-card) !important;
  color: var(--paaet-text) !important;
}

.modal .input-group-text,
.offcanvas .input-group-text {
  background-color: var(--paaet-panel) !important;
  color: var(--paaet-muted) !important;
  border: 1px solid var(--paaet-input-border) !important;
}

.modal .form-label,
.modal label {
  color: var(--paaet-text) !important;
  font-weight: 600 !important;
}

/* Botones en Modales y Sistema */
.modal .btn-secondary,
.modal .btn-outline-secondary,
.btn-outline-secondary {
  background-color: transparent !important;
  border: 1px solid var(--paaet-border, #475569) !important;
  color: var(--paaet-text, #cbd5e1) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: all 0.15s ease !important;
}

.modal .btn-secondary:hover,
.modal .btn-outline-secondary:hover,
.btn-outline-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--paaet-primary) !important;
  color: var(--paaet-text-strong, #ffffff) !important;
}

.btn-outline-primary {
  border: 1px solid var(--paaet-primary) !important;
  color: var(--paaet-primary) !important;
  background-color: transparent !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

.btn-outline-primary:hover {
  background-color: var(--paaet-nav-active-bg) !important;
  color: #ffffff !important;
}

.btn-outline-success {
  border: 1px solid var(--paaet-success) !important;
  color: var(--paaet-success) !important;
  background-color: transparent !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

.btn-outline-success:hover {
  background-color: var(--paaet-success-soft) !important;
  color: var(--paaet-success) !important;
}

.btn-outline-danger {
  border: 1px solid var(--paaet-danger) !important;
  color: var(--paaet-danger) !important;
  background-color: transparent !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

.btn-outline-danger:hover {
  background-color: var(--paaet-danger-soft) !important;
  color: var(--paaet-danger-text) !important;
}

/* Offcanvas PAAET */
.offcanvas {
  background-color: var(--paaet-card) !important;
  color: var(--paaet-text) !important;
  border-left: 1px solid var(--paaet-border) !important;
}

.offcanvas-header {
  border-bottom: 1px solid var(--paaet-border) !important;
}

.offcanvas-body {
  background-color: var(--paaet-bg) !important;
  color: var(--paaet-text) !important;
}

/* ==========================================================================
   9. MÓDULO TERCIOS / JUGADORES COMPLETO
   ========================================================================== */
.tercios-page {
  padding: 16px;
  color: var(--paaet-text);
}

.tercios-tab-btn {
  padding: 7px 16px;
  border: 1px solid var(--paaet-border);
  background: var(--paaet-card);
  color: var(--paaet-muted);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}

.tercios-tab-btn:hover {
  background: var(--paaet-table-hover);
  color: var(--paaet-text);
  border-color: var(--paaet-border);
}

.tercios-tab-btn.active {
  background: var(--paaet-primary) !important;
  border-color: var(--paaet-primary) !important;
  color: #ffffff !important;
  font-weight: 700;
}

.tercios-grid-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 280px);
  border: 1px solid var(--paaet-border) !important;
  border-radius: 8px;
  background: var(--paaet-card) !important;
}

.tercios-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.tercios-grid thead.table-header.primary th {
  background-color: var(--paaet-blue-header) !important;
  color: #ffffff !important;
  font-weight: 700;
  padding: 9px 12px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid var(--paaet-gold) !important;
  white-space: nowrap;
}

.tercios-grid tbody tr {
  border-top: 1px solid var(--paaet-border) !important;
  background-color: var(--paaet-card);
  transition: background 0.15s ease;
}

.tercios-grid tbody tr:nth-child(even) {
  background-color: var(--paaet-table-zebra) !important;
}

.tercios-grid tbody tr:hover {
  background-color: var(--paaet-table-hover) !important;
}

.tercios-grid td {
  padding: 8px 12px;
  vertical-align: middle;
  color: var(--paaet-text) !important;
}

.btn-tercio-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--paaet-border);
  background: var(--paaet-panel);
  color: var(--paaet-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-tercio-action:hover {
  background: var(--paaet-nav-active-bg);
  color: var(--paaet-primary);
  border-color: var(--paaet-primary);
}

.btn-tercio-action.danger:hover {
  background: var(--paaet-danger-soft);
  border-color: var(--paaet-danger);
  color: var(--paaet-danger);
}

/* Selector de Tipo en Modal */
.tipo-cliente-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.tipo-cliente-card {
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--paaet-border);
  background: var(--paaet-card);
  color: var(--paaet-text);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tipo-cliente-card:hover {
  border-color: var(--paaet-primary);
  background: var(--paaet-table-hover);
}

.tipo-cliente-card.selected {
  border-color: var(--paaet-primary);
  background: var(--paaet-nav-active-bg);
  box-shadow: 0 0 0 1px var(--paaet-primary);
}

.tipo-cliente-card .tipo-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tipo-cliente-card .tipo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--paaet-panel);
  color: var(--paaet-muted);
}

.tipo-cliente-card.selected .tipo-icon {
  background: var(--paaet-primary);
  color: #ffffff;
}

.tipo-cliente-card .tipo-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--paaet-text-strong);
}

.tipo-cliente-card.selected .tipo-title {
  color: var(--paaet-primary);
}

.tipo-cliente-card .tipo-desc {
  font-size: 11px;
  color: var(--paaet-muted);
  line-height: 1.35;
}

/* ==========================================================================
   10. REGLAS EXCLUSIVAS DE ALTO CONTRASTE PARA MODO DÍA (SEPIA CÁLIDO)
   Paleta sepia suave, descansada para la vista y sin blanco puro.
   ========================================================================== */
html:not(.dark),
html.light,
body.theme-light,
[data-bs-theme="light"] {
  background-color: #f4efe6 !important;
  color: #2c241c !important;
}

html:not(.dark) #layoutPAAET,
html.light #layoutPAAET,
body.theme-light #layoutPAAET {
  background: transparent !important;
  color: #241c16 !important;
}

html:not(.dark) #sidebarPAAET,
html.light #sidebarPAAET,
body.theme-light #sidebarPAAET {
  background: #ece5d8 !important;
  border-right: 1.5px solid #d4c5a9 !important;
  box-shadow: 2px 0 16px rgba(110, 80, 40, 0.08) !important;
}

html:not(.dark) #mainWrapperPAAET,
html.light #mainWrapperPAAET,
body.theme-light #mainWrapperPAAET {
  background: transparent !important;
}

html:not(.dark) #topBarPAAET,
html.light #topBarPAAET,
body.theme-light #topBarPAAET {
  background: #f5f0e6 !important;
  border-bottom: 1.5px solid #d4c5a9 !important;
  box-shadow: 0 4px 14px rgba(110, 80, 40, 0.08) !important;
}

html:not(.dark) #viewContainerPAAET,
html.light #viewContainerPAAET,
body.theme-light #viewContainerPAAET {
  background: transparent !important;
  color: #241c16 !important;
}

html:not(.dark) .sidebar-user-card,
html.light .sidebar-user-card,
body.theme-light .sidebar-user-card {
  background: linear-gradient(180deg, #fdfbf7 0%, #f4ede2 100%) !important;
  border: 1.5px solid #d4c5a9 !important;
}

html:not(.dark) .sidebar-nav-item a,
html.light .sidebar-nav-item a,
body.theme-light .sidebar-nav-item a {
  color: #241c16 !important;
}

html:not(.dark) .sidebar-nav-item a:hover,
html.light .sidebar-nav-item a:hover,
body.theme-light .sidebar-nav-item a:hover {
  background: #e6ddce !important;
  color: #000000 !important;
}

html:not(.dark) .sidebar-nav-item.active a,
html.light .sidebar-nav-item.active a,
body.theme-light .sidebar-nav-item.active a {
  background: linear-gradient(135deg, #ded2bf 0%, #ecd8bb 100%) !important;
  border: 1.5px solid #c5a059 !important;
  color: #1a140f !important;
  box-shadow: 0 2px 8px rgba(138, 100, 48, 0.15), inset 0 1px 0 #ffffff !important;
}

html:not(.dark) .card.bg-dark,
html.light .card.bg-dark,
body.theme-light .card.bg-dark,
html:not(.dark) .paaet-card,
html.light .paaet-card,
body.theme-light .paaet-card,
html:not(.dark) .form-card,
html.light .form-card,
body.theme-light .form-card,
html:not(.dark) .pizarra-card,
html.light .pizarra-card,
body.theme-light .pizarra-card {
  background-color: #fcf9f2 !important;
  border: 1px solid #d8cdbd !important;
  color: #2c241c !important;
  box-shadow: 0 1px 3px rgba(80, 60, 40, 0.05), 0 4px 12px rgba(80, 60, 40, 0.03) !important;
}

html:not(.dark) .card.bg-dark .card-header,
html.light .card.bg-dark .card-header,
body.theme-light .card.bg-dark .card-header,
html:not(.dark) .card-header,
html.light .card-header,
body.theme-light .card-header {
  background-color: #f4efe4 !important;
  border-bottom: 1px solid #d8cdbd !important;
  color: #19140e !important;
}

html:not(.dark) .card.bg-dark .card-footer,
html.light .card.bg-dark .card-footer,
body.theme-light .card.bg-dark .card-footer,
html:not(.dark) .card-footer,
html.light .card-footer,
body.theme-light .card-footer {
  background-color: #f4efe4 !important;
  border-top: 1px solid #d8cdbd !important;
  color: #7a6d5f !important;
}

/* Override de inputs que tengan clases duras bg-dark en HTML */
html:not(.dark) input.bg-dark,
html:not(.dark) select.bg-dark,
html:not(.dark) textarea.bg-dark,
html:not(.dark) .form-control.bg-dark,
html.light input.bg-dark,
html.light select.bg-dark,
html.light textarea.bg-dark,
html.light .form-control.bg-dark,
body.theme-light input.bg-dark,
body.theme-light select.bg-dark,
body.theme-light textarea.bg-dark,
body.theme-light .form-control.bg-dark {
  background-color: #fdfbf7 !important;
  color: #2c241c !important;
  border-color: #cfc2b2 !important;
}

html:not(.dark) .form-control,
html:not(.dark) input.form-control,
html:not(.dark) select.form-control,
html:not(.dark) textarea.form-control,
html:not(.dark) .form-select,
html.light .form-control,
html.light input.form-control,
html.light select.form-control,
html.light textarea.form-control,
html.light .form-select,
body.theme-light .form-control,
body.theme-light input.form-control,
body.theme-light select.form-control,
body.theme-light textarea.form-control,
body.theme-light .form-select {
  background-color: #fdfbf7 !important;
  color: #2c241c !important;
  border: 1px solid #cfc2b2 !important;
}

html:not(.dark) .form-control:focus,
html:not(.dark) input.form-control:focus,
html:not(.dark) select.form-control:focus,
html:not(.dark) textarea.form-control:focus,
html:not(.dark) .form-select:focus,
html.light .form-control:focus,
html.light input.form-control:focus,
html.light select.form-control:focus,
html.light textarea.form-control:focus,
html.light .form-select:focus,
body.theme-light .form-control:focus,
body.theme-light input.form-control:focus,
body.theme-light select.form-control:focus,
body.theme-light textarea.form-control:focus,
body.theme-light .form-select:focus {
  background-color: #fdfbf7 !important;
  border-color: #1d5bbf !important;
  color: #2c241c !important;
  box-shadow: 0 0 0 3px rgba(29, 91, 191, 0.16) !important;
}

html:not(.dark) label,
html:not(.dark) .form-label,
html:not(.dark) label.text-light,
html:not(.dark) .form-label.text-light,
html.light label,
html.light .form-label,
html.light label.text-light,
html.light .form-label.text-light,
body.theme-light label,
body.theme-light .form-label,
body.theme-light label.text-light,
body.theme-light .form-label.text-light {
  color: #3d3126 !important;
  font-weight: 600 !important;
}

html:not(.dark) .text-muted,
html.light .text-muted,
body.theme-light .text-muted {
  color: #7a6d5f !important;
}

html:not(.dark) .text-secondary,
html.light .text-secondary,
body.theme-light .text-secondary {
  color: #5a4e42 !important;
}

html:not(.dark) .date-badge,
html.light .date-badge,
body.theme-light .date-badge {
  background-color: #fcf9f2 !important;
  color: #b45309 !important;
  border: 1px solid #d8cdbd !important;
}

html:not(.dark) .pizarra-toolbar,
html.light .pizarra-toolbar,
body.theme-light .pizarra-toolbar {
  background: #fcf9f2 !important;
  border: 1px solid #d8cdbd !important;
}

html:not(.dark) .pizarra-select,
html.light .pizarra-select,
body.theme-light .pizarra-select {
  background: #fdfbf7 !important;
  border: 1px solid #cfc2b2 !important;
  color: #2c241c !important;
}

html:not(.dark) .btn-pizarra-action:not(.btn-pizarra-totales):not(.btn-pizarra-saldos):not(.btn-pizarra-reporte):not(.btn-pizarra-editar):not(.btn-pizarra-danger),
html.light .btn-pizarra-action:not(.btn-pizarra-totales):not(.btn-pizarra-saldos):not(.btn-pizarra-reporte):not(.btn-pizarra-editar):not(.btn-pizarra-danger),
body.theme-light .btn-pizarra-action:not(.btn-pizarra-totales):not(.btn-pizarra-saldos):not(.btn-pizarra-reporte):not(.btn-pizarra-editar):not(.btn-pizarra-danger) {
  background: #fdfbf7 !important;
  border: 1px solid #d8cdbd !important;
  color: #3d3126 !important;
}

html:not(.dark) .btn-pizarra-action:not(.btn-pizarra-totales):not(.btn-pizarra-saldos):not(.btn-pizarra-reporte):not(.btn-pizarra-editar):not(.btn-pizarra-danger):hover,
html.light .btn-pizarra-action:not(.btn-pizarra-totales):not(.btn-pizarra-saldos):not(.btn-pizarra-reporte):not(.btn-pizarra-editar):not(.btn-pizarra-danger):hover,
body.theme-light .btn-pizarra-action:not(.btn-pizarra-totales):not(.btn-pizarra-saldos):not(.btn-pizarra-reporte):not(.btn-pizarra-editar):not(.btn-pizarra-danger):hover {
  background: #ebe2d3 !important;
  color: #19140e !important;
}

html:not(.dark) .pizarra-resultados-strip,
html.light .pizarra-resultados-strip,
body.theme-light .pizarra-resultados-strip {
  background: #fcf9f2 !important;
  border: 1px solid #d8cdbd !important;
}

html:not(.dark) .res-box-input,
html.light .res-box-input,
body.theme-light .res-box-input {
  background: #f7f1e6 !important;
  border: 1px solid #cfc2b2 !important;
  color: #2c241c !important;
}

/* Modales en Modo Día (Sepia Cálido) */
html:not(.dark) .modal-content,
html.light .modal-content,
body.theme-light .modal-content {
  background-color: #fcf9f2 !important;
  color: #2c241c !important;
  border: 1px solid #d8cdbd !important;
  box-shadow: 0 20px 45px rgba(80, 60, 40, 0.15) !important;
}

html:not(.dark) .modal-header:not(.bg-danger):not(.bg-info):not(.bg-success):not(.bg-warning):not(.bg-dark),
html.light .modal-header:not(.bg-danger):not(.bg-info):not(.bg-success):not(.bg-warning):not(.bg-dark),
body.theme-light .modal-header:not(.bg-danger):not(.bg-info):not(.bg-success):not(.bg-warning):not(.bg-dark) {
  background: linear-gradient(135deg, #fdfbf7 0%, #ece2ce 100%) !important;
  border-bottom: 2px solid #c5a059 !important;
  color: #19140e !important;
}

html:not(.dark) .modal-header:not(.bg-danger):not(.bg-info):not(.bg-success):not(.bg-warning):not(.bg-dark) .modal-title,
html.light .modal-header:not(.bg-danger):not(.bg-info):not(.bg-success):not(.bg-warning):not(.bg-dark) .modal-title,
body.theme-light .modal-header:not(.bg-danger):not(.bg-info):not(.bg-success):not(.bg-warning):not(.bg-dark) .modal-title {
  color: #19140e !important;
  font-weight: 800 !important;
}

html:not(.dark) .modal-header .btn-close,
html.light .modal-header .btn-close,
body.theme-light .modal-header .btn-close {
  filter: none !important;
  opacity: 0.75 !important;
}

/* ==========================================================================
   COMPONENTES Y TABLAS PARA MODALES Y APARTADOS PAAET (DÍA & NOCHE)
   ========================================================================== */
.modal-paaet-table-wrap {
  border: 1px solid var(--paaet-border) !important;
  background: var(--paaet-card) !important;
}

.modal-paaet-table {
  color: var(--paaet-text) !important;
  margin-bottom: 0 !important;
}

.modal-paaet-thead th {
  background: #1c1714 !important;
  color: #d4af37 !important;
  border-bottom: 2px solid #5c4734 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
}

html:not(.dark) .modal-paaet-thead th,
html.light .modal-paaet-thead th,
body.theme-light .modal-paaet-thead th {
  background: #ece2ce !important;
  color: #19140e !important;
  border-bottom: 2px solid #c5a059 !important;
}

.modal-paaet-label {
  color: #d4af37 !important;
}

html:not(.dark) .modal-paaet-label,
html.light .modal-paaet-label,
body.theme-light .modal-paaet-label {
  color: #9a7218 !important;
}

.modal-paaet-card-strip {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: var(--text, #eae2d5) !important;
  border-radius: 8px;
}

html:not(.dark) .modal-paaet-card-strip,
html.light .modal-paaet-card-strip,
body.theme-light .modal-paaet-card-strip {
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
  color: #19140e !important;
}

.modal-paaet-details {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text, #eae2d5) !important;
  border-radius: 8px;
}

html:not(.dark) .modal-paaet-details,
html.light .modal-paaet-details,
body.theme-light .modal-paaet-details {
  background: rgba(0, 0, 0, 0.02) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #19140e !important;
}

.modal-paaet-item-row {
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text, #eae2d5) !important;
}

html:not(.dark) .modal-paaet-item-row,
html.light .modal-paaet-item-row,
body.theme-light .modal-paaet-item-row {
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #19140e !important;
}

/* ==========================================================================
   PIZARRA INTERACTIVA EN MODAL TOTALIZAR Y BOTONES SWAL LIMPIOS
   ========================================================================== */

/* Contenedor de la pizarra de 10 posiciones en el modal */
.swal-pizarra-board-container {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
}
html:not(.dark) .swal-pizarra-board-container,
html.light .swal-pizarra-board-container,
body.theme-light .swal-pizarra-board-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* Etiquetas de columnas 1°..10° */
.swal-piz-col-label {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-align: center;
  width: 32px;
  flex: 1 1 0px;
  display: inline-block;
}
html:not(.dark) .swal-piz-col-label,
html.light .swal-piz-col-label,
body.theme-light .swal-piz-col-label {
  color: #64748b;
}

/* Badges de LLEGADA y RETIRADOS */
.swal-piz-badge-llegada {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.3);
  border-radius: 5px;
}
.swal-piz-badge-retirados {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3);
  border-radius: 5px;
}

/* Inputs de llegada (Oro) */
.swal-piz-input {
  width: 32px;
  height: 28px;
  border-radius: 4px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  padding: 0;
  flex: 1 1 0px;
  transition: all 0.15s ease;
}
.swal-piz-input.swal-piz-cab {
  border: 1.5px solid rgba(212, 175, 55, 0.65) !important;
  background: rgba(212, 175, 55, 0.12) !important;
  color: #fbbf24 !important;
}
.swal-piz-input.swal-piz-cab:focus {
  border-color: #f59e0b !important;
  background: rgba(212, 175, 55, 0.25) !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35) !important;
  outline: none;
}
html:not(.dark) .swal-piz-input.swal-piz-cab,
html.light .swal-piz-input.swal-piz-cab,
body.theme-light .swal-piz-input.swal-piz-cab {
  border: 1.5px solid #d97706 !important;
  background: #fffbeb !important;
  color: #92400e !important;
}
html:not(.dark) .swal-piz-input.swal-piz-cab:focus,
html.light .swal-piz-input.swal-piz-cab:focus,
body.theme-light .swal-piz-input.swal-piz-cab:focus {
  border-color: #b45309 !important;
  background: #fef3c7 !important;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25) !important;
}

/* Inputs de retirados (Rojo) */
.swal-piz-input.swal-piz-ret {
  border: 1.5px solid rgba(239, 68, 68, 0.55) !important;
  background: rgba(239, 68, 68, 0.1) !important;
  color: #f87171 !important;
}
.swal-piz-input.swal-piz-ret:focus {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.22) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3) !important;
  outline: none;
}
html:not(.dark) .swal-piz-input.swal-piz-ret,
html.light .swal-piz-input.swal-piz-ret,
body.theme-light .swal-piz-input.swal-piz-ret {
  border: 1.5px solid #ef4444 !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
}
html:not(.dark) .swal-piz-input.swal-piz-ret:focus,
html.light .swal-piz-input.swal-piz-ret:focus,
body.theme-light .swal-piz-input.swal-piz-ret:focus {
  border-color: #dc2626 !important;
  background: #fee2e2 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

/* BOTONES LIMPIOS EN SWEETALERT (Sin manchas negras) */
.btn-swal-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
  text-decoration: none;
}
.btn-swal-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  color: #f87171 !important;
}
.btn-swal-danger:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}
html:not(.dark) .btn-swal-danger,
html.light .btn-swal-danger,
body.theme-light .btn-swal-danger {
  background: #fef2f2 !important;
  border: 1px solid #fca5a5 !important;
  color: #dc2626 !important;
}
html:not(.dark) .btn-swal-danger:hover,
html.light .btn-swal-danger:hover,
body.theme-light .btn-swal-danger:hover {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
}

.btn-swal-secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #e2e8f0 !important;
}
.btn-swal-secondary:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}
html:not(.dark) .btn-swal-secondary,
html.light .btn-swal-secondary,
body.theme-light .btn-swal-secondary {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}
html:not(.dark) .btn-swal-secondary:hover,
html.light .btn-swal-secondary:hover,
body.theme-light .btn-swal-secondary:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  color: #1e293b !important;
}

.btn-swal-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border: 1px solid #b45309 !important;
  color: #1a0f00 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35) !important;
}
.btn-swal-gold:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #000000 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5) !important;
}

.btn-swal-success {
  background: rgba(34, 197, 94, 0.12) !important;
  border: 1px solid rgba(34, 197, 94, 0.45) !important;
  color: #22c55e !important;
}
.btn-swal-success:hover {
  background: rgba(34, 197, 94, 0.25) !important;
  border-color: #16a34a !important;
  color: #86efac !important;
}
html:not(.dark) .btn-swal-success,
html.light .btn-swal-success,
body.theme-light .btn-swal-success {
  background: #f0fdf4 !important;
  border: 1px solid #86efac !important;
  color: #15803d !important;
}
html:not(.dark) .btn-swal-success:hover,
html.light .btn-swal-success:hover,
body.theme-light .btn-swal-success:hover {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #166534 !important;
}

.btn-swal-primary {
  background: rgba(212, 175, 55, 0.15) !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  color: var(--paaet-gold, #d4af37) !important;
}
.btn-swal-primary:hover {
  background: rgba(212, 175, 55, 0.28) !important;
  border-color: var(--paaet-gold, #d4af37) !important;
  color: #ffffff !important;
}
html:not(.dark) .btn-swal-primary,
html.light .btn-swal-primary,
body.theme-light .btn-swal-primary {
  background: #fdfbf7 !important;
  border: 1px solid #d4c5b3 !important;
  color: #9a7218 !important;
}
html:not(.dark) .btn-swal-primary:hover,
html.light .btn-swal-primary:hover,
body.theme-light .btn-swal-primary:hover {
  background: #f5efe4 !important;
  border-color: #9a7218 !important;
  color: #1a140f !important;
}

/* Apartado de Saldos en Vivo (Drawer) */
.pizarra-saldos-drawer {
  background: #171310 !important;
  border: 1px solid #443527 !important;
  color: #eae2d5 !important;
}

html:not(.dark) .pizarra-saldos-drawer,
html.light .pizarra-saldos-drawer,
body.theme-light .pizarra-saldos-drawer {
  background: #fdfcf9 !important;
  border: 1px solid #d8caa8 !important;
  color: #19140e !important;
}

/* Tabla interna de Saldos en Vivo */
.table-paaet-en-vivo {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #171310 !important;
  color: #eae2d5 !important;
}

.table-paaet-en-vivo thead th {
  background: #1c1714 !important;
  color: #d4af37 !important;
  border-bottom: 2px solid #5c4734 !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  padding: 6px 8px !important;
}

.table-paaet-en-vivo tbody td {
  border-bottom: 1px solid #2a2017 !important;
  color: #eae2d5 !important;
  padding: 5px 8px !important;
}

html:not(.dark) .table-paaet-en-vivo,
html.light .table-paaet-en-vivo,
body.theme-light .table-paaet-en-vivo {
  background: #fdfcf9 !important;
  color: #19140e !important;
}

html:not(.dark) .table-paaet-en-vivo thead th,
html.light .table-paaet-en-vivo thead th,
body.theme-light .table-paaet-en-vivo thead th {
  background: #ece2ce !important;
  color: #19140e !important;
  border-bottom: 2px solid #c5a059 !important;
}

html:not(.dark) .table-paaet-en-vivo tbody td,
html.light .table-paaet-en-vivo tbody td,
body.theme-light .table-paaet-en-vivo tbody td {
  border-bottom: 1px solid #e8dfcd !important;
  color: #19140e !important;
}

/* Cabecera del panel de Comisiones */
.comision-panel-header {
  background: linear-gradient(135deg, #241c16 0%, #1c1714 100%) !important;
  border-bottom: 2px solid #5c4734 !important;
  color: #d4af37 !important;
}

html:not(.dark) .comision-panel-header,
html.light .comision-panel-header,
body.theme-light .comision-panel-header {
  background: linear-gradient(135deg, #fdfbf7 0%, #ece2ce 100%) !important;
  border-bottom: 2px solid #c5a059 !important;
  color: #19140e !important;
}

html:not(.dark) .modal-body,
html.light .modal-body,
body.theme-light .modal-body {
  background-color: #f7f1e6 !important;
  color: #2c241c !important;
}

html:not(.dark) .modal-footer,
html.light .modal-footer,
body.theme-light .modal-footer {
  background-color: #efe8dc !important;
  border-top: 1px solid #d8cdbd !important;
  color: #2c241c !important;
}

/* Inputs, Selects y Áreas de Texto en Modo Día (Modales y Pantallas) */
html:not(.dark) .modal .form-control,
html:not(.dark) .modal input.form-control,
html:not(.dark) .modal select.form-control,
html:not(.dark) .modal textarea.form-control,
html:not(.dark) .modal .form-select,
html:not(.dark) .modal select,
html.light .modal .form-control,
html.light .modal input.form-control,
html.light .modal select.form-control,
html.light .modal textarea.form-control,
html.light .modal .form-select,
html.light .modal select,
body.theme-light .modal .form-control,
body.theme-light .modal .form-select,
body.theme-light .modal select,
html:not(.dark) .offcanvas .form-control,
html:not(.dark) .offcanvas .form-select,
html:not(.dark) .offcanvas select,
html.light .offcanvas .form-control,
html.light .offcanvas .form-select,
html.light .offcanvas select,
body.theme-light .offcanvas .form-control,
body.theme-light .offcanvas .form-select,
body.theme-light .offcanvas select {
  background-color: #fdfbf7 !important;
  color: #2c241c !important;
  border: 1px solid #cfc2b2 !important;
}

html:not(.dark) .modal select option,
html.light .modal select option,
body.theme-light .modal select option,
html:not(.dark) select option,
html.light select option,
body.theme-light select option {
  background-color: #fcf9f2 !important;
  color: #2c241c !important;
}

html:not(.dark) .modal .input-group-text,
html.light .modal .input-group-text,
body.theme-light .modal .input-group-text,
html:not(.dark) .offcanvas .input-group-text,
html.light .offcanvas .input-group-text,
body.theme-light .offcanvas .input-group-text {
  background-color: #efe8dc !important;
  color: #5a4e42 !important;
  border: 1px solid #cfc2b2 !important;
}

html:not(.dark) .modal .form-label,
html:not(.dark) .modal label,
html.light .modal .form-label,
html.light .modal label,
body.theme-light .modal .form-label,
body.theme-light .modal label {
  color: #2c241c !important;
  font-weight: 600 !important;
}

/* Botones en Modales en Modo Día */
html:not(.dark) .modal .btn-secondary,
html:not(.dark) .modal .btn-outline-secondary,
html.light .modal .btn-secondary,
html.light .modal .btn-outline-secondary,
body.theme-light .modal .btn-secondary,
body.theme-light .modal .btn-outline-secondary {
  background-color: #efe8dc !important;
  border: 1px solid #d8cdbd !important;
  color: #3d3126 !important;
}

html:not(.dark) .modal .btn-secondary:hover,
html:not(.dark) .modal .btn-outline-secondary:hover,
html.light .modal .btn-secondary:hover,
html.light .modal .btn-outline-secondary:hover,
body.theme-light .modal .btn-secondary:hover,
body.theme-light .modal .btn-outline-secondary:hover {
  background-color: #ebe2d3 !important;
  color: #19140e !important;
  border-color: #c4b198 !important;
}

html:not(.dark) .modal .btn-outline-primary,
html.light .modal .btn-outline-primary,
body.theme-light .modal .btn-outline-primary {
  border: 1px solid #1d5bbf !important;
  color: #1d5bbf !important;
  background-color: #fdfbf7 !important;
}

html:not(.dark) .modal .btn-outline-primary:hover,
html.light .modal .btn-outline-primary:hover,
body.theme-light .modal .btn-outline-primary:hover {
  background-color: #dfd2c0 !important;
  color: #1e4fa8 !important;
}

html:not(.dark) .modal .btn-outline-success,
html.light .modal .btn-outline-success,
body.theme-light .modal .btn-outline-success {
  border: 1px solid #15803d !important;
  color: #15803d !important;
  background-color: #fdfbf7 !important;
}

html:not(.dark) .modal .btn-outline-success:hover,
html.light .modal .btn-outline-success:hover,
body.theme-light .modal .btn-outline-success:hover {
  background-color: #e3f3e8 !important;
  color: #127339 !important;
}

/* Offcanvas en Modo Día */
html:not(.dark) .offcanvas,
html.light .offcanvas,
body.theme-light .offcanvas {
  background-color: #fcf9f2 !important;
  color: #2c241c !important;
  border-left: 1px solid #d8cdbd !important;
}

html:not(.dark) .offcanvas-body,
html.light .offcanvas-body,
body.theme-light .offcanvas-body {
  background-color: #f7f1e6 !important;
  color: #2c241c !important;
}

/* Selector de Tipo Cliente en Modal (Modo Día) */
html:not(.dark) .tipo-cliente-card,
html.light .tipo-cliente-card,
body.theme-light .tipo-cliente-card {
  background-color: #f7f1e6 !important;
  border: 1px solid #d8cdbd !important;
  color: #2c241c !important;
}

html:not(.dark) .tipo-cliente-card:hover,
html.light .tipo-cliente-card:hover,
body.theme-light .tipo-cliente-card:hover {
  background-color: #ebe2d3 !important;
  border-color: #1d5bbf !important;
}

html:not(.dark) .tipo-cliente-card.selected,
html.light .tipo-cliente-card.selected,
body.theme-light .tipo-cliente-card.selected {
  background-color: #dfd2c0 !important;
  border-color: #1d5bbf !important;
}

html:not(.dark) .tipo-cliente-card .tipo-icon,
html.light .tipo-cliente-card .tipo-icon,
body.theme-light .tipo-cliente-card .tipo-icon {
  background-color: #e6ddcf !important;
  color: #44372c !important;
}

html:not(.dark) .tipo-cliente-card.selected .tipo-icon,
html.light .tipo-cliente-card.selected .tipo-icon,
body.theme-light .tipo-cliente-card.selected .tipo-icon {
  background-color: #1d5bbf !important;
  color: #ffffff !important;
}

html:not(.dark) .tipo-cliente-card .tipo-title,
html.light .tipo-cliente-card .tipo-title,
body.theme-light .tipo-cliente-card .tipo-title {
  color: #19140e !important;
}

html:not(.dark) .tipo-cliente-card.selected .tipo-title,
html.light .tipo-cliente-card.selected .tipo-title,
body.theme-light .tipo-cliente-card.selected .tipo-title {
  color: #1e4fa8 !important;
}

html:not(.dark) .tipo-cliente-card .tipo-desc,
html.light .tipo-cliente-card .tipo-desc,
body.theme-light .tipo-cliente-card .tipo-desc {
  color: #7a6d5f !important;
}

/* Neutralizar clases hardcodeadas dentro de Modales y Offcanvas */
html.dark .modal .bg-light,
html.dark .modal .bg-white,
html.dark .offcanvas .bg-light,
html.dark .offcanvas .bg-white,
body.theme-dark .modal .bg-light,
body.theme-dark .modal .bg-white,
body.theme-dark .offcanvas .bg-light,
body.theme-dark .offcanvas .bg-white {
  background-color: var(--paaet-card, #1c1714) !important;
  color: var(--paaet-text, #eae2d5) !important;
  border-color: var(--paaet-border, #443527) !important;
}

html.dark .modal .text-dark,
html.dark .offcanvas .text-dark,
body.theme-dark .modal .text-dark,
body.theme-dark .offcanvas .text-dark {
  color: var(--paaet-text-strong, #ffffff) !important;
}

html.dark .modal .text-muted,
html.dark .offcanvas .text-muted,
body.theme-dark .modal .text-muted,
body.theme-dark .offcanvas .text-muted {
  color: #94a3b8 !important;
}

/* Modales y Offcanvas en Modo Día (Tono Cálido Sepia) */
html:not(.dark) .modal .bg-dark,
html:not(.dark) .offcanvas .bg-dark,
html.light .modal .bg-dark,
html.light .offcanvas .bg-dark,
body.theme-light .modal .bg-dark,
body.theme-light .offcanvas .bg-dark {
  background-color: #fcf9f2 !important;
  color: #2c241c !important;
  border-color: #d8cdbd !important;
}

html:not(.dark) .modal .text-white:not(.btn):not(.btn *):not(.badge):not(.modal-header *):not(.table-header *),
html.light .modal .text-white:not(.btn):not(.btn *):not(.badge):not(.modal-header *):not(.table-header *),
body.theme-light .modal .text-white:not(.btn):not(.btn *):not(.badge):not(.modal-header *):not(.table-header *) {
  color: #2c241c !important;
}

html:not(.dark) .modal .text-muted,
html.light .modal .text-muted,
body.theme-light .modal .text-muted {
  color: #7a6d5f !important;
}

/* Modales de Gestión / Diálogos de Acción en Modo Día (Sepia) */
html:not(.dark) #modalGestionPozos .modal-content,
html:not(.dark) #modalLotes .modal-content,
html:not(.dark) #modalTablasPozos .modal-content,
html:not(.dark) #modalBalance .modal-content,
html.light #modalGestionPozos .modal-content,
html.light #modalLotes .modal-content,
html.light #modalTablasPozos .modal-content,
html.light #modalBalance .modal-content,
body.theme-light #modalGestionPozos .modal-content,
body.theme-light #modalLotes .modal-content,
body.theme-light #modalTablasPozos .modal-content,
body.theme-light #modalBalance .modal-content {
  background: #fcf9f2 !important;
  color: #2c241c !important;
  border: 1px solid #d8cdbd !important;
}

html:not(.dark) #modalGestionPozos .modal-title,
html:not(.dark) #modalLotes .modal-title,
html:not(.dark) #modalTablasPozos .modal-title,
html:not(.dark) #modalBalance .modal-title,
html.light #modalGestionPozos .modal-title,
html.light #modalLotes .modal-title,
html.light #modalTablasPozos .modal-title,
html.light #modalBalance .modal-title,
body.theme-light #modalGestionPozos .modal-title,
body.theme-light #modalLotes .modal-title,
body.theme-light #modalTablasPozos .modal-title,
body.theme-light #modalBalance .modal-title {
  color: #19140e !important;
}

/* ==========================================================================
   ESTILOS PAAET PRO: MODAL DE CARGA POR LOTES
   ========================================================================== */
#modalLotes .nav-pills .nav-link {
  color: var(--paaet-muted, #a09282);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13.5px;
  transition: all 0.2s ease;
}

#modalLotes .nav-pills .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

#modalLotes .nav-pills .nav-link.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.12)) !important;
  color: var(--paaet-gold, #d4af37) !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#modalLotes textarea.font-monospace {
  line-height: 1.5;
  letter-spacing: 0.5px;
}

#modalLotes textarea.font-monospace:focus {
  border-color: var(--paaet-gold, #d4af37) !important;
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.2) !important;
}

/* Modo Día para Modal Lotes */
html:not(.dark) #modalLotes .modal-body,
html.light #modalLotes .modal-body,
body.theme-light #modalLotes .modal-body {
  background: #fdfaf3 !important;
}

html:not(.dark) #modalLotes .modal-header,
html:not(.dark) #modalLotes .modal-footer,
html.light #modalLotes .modal-header,
html.light #modalLotes .modal-footer,
body.theme-light #modalLotes .modal-header,
body.theme-light #modalLotes .modal-footer {
  background: #f3ede2 !important;
  border-color: #d8cdbd !important;
}

html:not(.dark) #modalLotes textarea.font-monospace,
html.light #modalLotes textarea.font-monospace,
body.theme-light #modalLotes textarea.font-monospace {
  background: #ffffff !important;
  color: #19140e !important;
  border-color: #d8cdbd !important;
}

html:not(.dark) #modalLotes .nav-pills .nav-link,
html.light #modalLotes .nav-pills .nav-link,
body.theme-light #modalLotes .nav-pills .nav-link {
  color: #5c4e3f !important;
}

html:not(.dark) #modalLotes .nav-pills .nav-link.active,
html.light #modalLotes .nav-pills .nav-link.active,
body.theme-light #modalLotes .nav-pills .nav-link.active {
  background: #ecdcb9 !important;
  color: #19140e !important;
  border-color: #bfa168 !important;
}


/* SweetAlert2 en Modo Día (Marfil & Champán) */
html:not(.dark) .swal2-popup.swal2-modal,
html.light .swal2-popup.swal2-modal,
body.theme-light .swal2-popup.swal2-modal {
  background: #fdfcf9 !important;
  color: #19140e !important;
  border: 1px solid #d8caa8 !important;
  box-shadow: 0 12px 36px rgba(44, 36, 28, 0.15) !important;
}

html:not(.dark) .swal2-popup.swal2-toast,
html.light .swal2-popup.swal2-toast,
body.theme-light .swal2-popup.swal2-toast {
  background: #fdfcf9 !important;
  color: #19140e !important;
  border: 1px solid #d8caa8 !important;
  box-shadow: 0 8px 24px rgba(44, 36, 28, 0.15) !important;
}

html:not(.dark) .swal2-popup.swal2-toast .swal2-title,
html.light .swal2-popup.swal2-toast .swal2-title,
body.theme-light .swal2-popup.swal2-toast .swal2-title {
  color: #19140e !important;
}

html:not(.dark) .swal2-title,
html.light .swal2-title,
body.theme-light .swal2-title {
  color: #19140e !important;
}

html:not(.dark) .swal2-html-container,
html.light .swal2-html-container,
body.theme-light .swal2-html-container {
  color: #4a3b2c !important;
}

html:not(.dark) .swal2-input,
html:not(.dark) .swal2-textarea,
html:not(.dark) .swal2-select,
html.light .swal2-input,
html.light .swal2-textarea,
html.light .swal2-select,
body.theme-light .swal2-input,
body.theme-light .swal2-textarea,
body.theme-light .swal2-select {
  background-color: #ffffff !important;
  border: 1px solid #cfc2b2 !important;
  color: #19140e !important;
}

/* SweetAlert2 en Modo Noche (Obsidian Leather & Warm Gold) */
html.dark .swal2-popup.swal2-modal,
body.theme-dark .swal2-popup.swal2-modal {
  background: #1c1714 !important;
  color: #eae2d5 !important;
  border: 1px solid #443527 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8) !important;
}

html.dark .swal2-popup.swal2-toast,
body.theme-dark .swal2-popup.swal2-toast {
  background: #1c1714 !important;
  color: #eae2d5 !important;
  border: 1px solid #443527 !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75) !important;
}

html.dark .swal2-popup.swal2-toast .swal2-title,
body.theme-dark .swal2-popup.swal2-toast .swal2-title {
  color: #f5eedf !important;
}

html.dark .swal2-title,
body.theme-dark .swal2-title {
  color: #f3e5ab !important;
}

html.dark .swal2-html-container,
body.theme-dark .swal2-html-container {
  color: #d8caa8 !important;
}

html.dark .swal2-input,
html.dark .swal2-textarea,
html.dark .swal2-select,
body.theme-dark .swal2-input,
body.theme-dark .swal2-textarea,
body.theme-dark .swal2-select {
  background-color: #16120f !important;
  border: 1px solid #443527 !important;
  color: #eae2d5 !important;
}

.swal2-confirm {
  background-color: var(--paaet-primary, #d4af37) !important;
  color: #120e0a !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

.swal2-confirm:hover {
  background-color: var(--paaet-primary-hover, #b89528) !important;
}

.swal2-cancel {
  background-color: #443527 !important;
  color: #eae2d5 !important;
  border: 1px solid #5c4734 !important;
}

html:not(.dark) .swal2-cancel,
html.light .swal2-cancel,
body.theme-light .swal2-cancel {
  background-color: #ece2ce !important;
  color: #19140e !important;
  border: 1px solid #d8caa8 !important;
}

/* Botones y toggles en Modo Día */
html:not(.dark) .btn-outline-secondary,
html.light .btn-outline-secondary,
body.theme-light .btn-outline-secondary {
  color: #55483a !important;
  border-color: #cfc2b2 !important;
  background-color: #fdfbf7 !important;
}

html:not(.dark) .btn-outline-secondary:hover,
html.light .btn-outline-secondary:hover,
body.theme-light .btn-outline-secondary:hover {
  background: #ebe2d3 !important;
  color: #19140e !important;
}

html:not(.dark) .btn-theme-toggle,
html.light .btn-theme-toggle,
body.theme-light .btn-theme-toggle {
  background: #efe8dc !important;
  border: 1px solid #cfc2b2 !important;
  color: #2c241c !important;
}

html:not(.dark) .btn-theme-toggle:hover,
html.light .btn-theme-toggle:hover,
body.theme-light .btn-theme-toggle:hover {
  background: #e3d8c8 !important;
}

/* Evitar texto blanco en elementos de texto comunes en modo claro */
html:not(.dark) .card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet th *):not(.tercios-grid th *):not(.control-bar *):not(.modal-header *),
html:not(.dark) .paaet-card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet th *):not(.tercios-grid th *):not(.control-bar *):not(.modal-header *),
html:not(.dark) #viewContainerPAAET .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet th *):not(.tercios-grid th *):not(.control-bar *):not(.modal-header *),
html.light .card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet th *):not(.tercios-grid th *):not(.control-bar *):not(.modal-header *),
html.light .paaet-card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet th *):not(.tercios-grid th *):not(.control-bar *):not(.modal-header *),
html.light #viewContainerPAAET .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet th *):not(.tercios-grid th *):not(.control-bar *):not(.modal-header *),
body.theme-light .card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet th *):not(.tercios-grid th *):not(.control-bar *):not(.modal-header *),
body.theme-light .paaet-card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet th *):not(.tercios-grid th *):not(.control-bar *):not(.modal-header *),
body.theme-light #viewContainerPAAET .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet th *):not(.tercios-grid th *):not(.control-bar *):not(.modal-header *) {
  color: #2c241c !important;
}

/* List group items */
html:not(.dark) .list-group-item,
html.light .list-group-item,
body.theme-light .list-group-item {
  background-color: #fcf9f2 !important;
  color: #2c241c !important;
  border-color: #e8dfd3 !important;
}

html.dark .list-group-item,
body.theme-dark .list-group-item {
  background-color: var(--paaet-card, #1c1714) !important;
  color: var(--paaet-text, #eae2d5) !important;
  border-color: var(--paaet-border, #443527) !important;
}

/* ==========================================================================
   10. POLISH INTEGRAL DE TODAS LAS FUNCIONES Y MÓDULOS (DÍA / NOCHE)
   ========================================================================== */

/* Subrows de desglose en comisiones / tablas */
.subrow-dia-paaet {
  background-color: var(--paaet-card) !important;
  color: var(--paaet-text) !important;
}
html:not(.dark) .subrow-dia-paaet,
html.light .subrow-dia-paaet,
body.theme-light .subrow-dia-paaet {
  background-color: #f7f1e6 !important;
  color: #2c241c !important;
}

/* Tablas table-dark en modo día */
html:not(.dark) .table-dark,
html.light .table-dark,
body.theme-light .table-dark {
  background-color: #fcf9f2 !important;
  color: #2c241c !important;
}
html:not(.dark) .table-dark th,
html:not(.dark) .table-dark td,
html.light .table-dark th,
html.light .table-dark td,
body.theme-light .table-dark th,
body.theme-light .table-dark td {
  background-color: transparent !important;
  color: #2c241c !important;
  border-color: #e8dfd3 !important;
}

/* Badges y Toolbars específicos */
.date-badge {
  background: var(--paaet-card);
  border: 1px solid var(--paaet-border);
  color: var(--paaet-warning);
}
html:not(.dark) .date-badge,
html.light .date-badge,
body.theme-light .date-badge {
  background: #efe8dc !important;
  border-color: #d8cdbd !important;
  color: #9a7218 !important;
}

.zoom-pizarra-box {
  background: var(--paaet-card) !important;
  border-color: var(--paaet-border) !important;
  color: var(--paaet-text) !important;
}
html:not(.dark) .zoom-pizarra-box,
html.light .zoom-pizarra-box,
body.theme-light .zoom-pizarra-box {
  background: #efe8dc !important;
  border-color: #d8cdbd !important;
  color: #2c241c !important;
}

.grilla-top-bar {
  background: var(--paaet-card) !important;
  border-color: var(--paaet-border) !important;
  color: var(--paaet-text) !important;
}
html:not(.dark) .grilla-top-bar,
html.light .grilla-top-bar,
body.theme-light .grilla-top-bar {
  background: #efe8dc !important;
  border-color: #d8cdbd !important;
  color: #2c241c !important;
}

/* Tarjetas de socios en Comisiones (Modo Día) */
html:not(.dark) .socio-card-item,
html.light .socio-card-item,
body.theme-light .socio-card-item {
  background: #fcf9f2 !important;
  background-image: none !important;
  border: 1px solid #d8cdbd !important;
  color: #120c08 !important;
}
html:not(.dark) .socio-card-item:hover,
html.light .socio-card-item:hover,
body.theme-light .socio-card-item:hover {
  background: #f4ede0 !important;
}
html:not(.dark) .socio-card-item.selected,
html.light .socio-card-item.selected,
body.theme-light .socio-card-item.selected {
  background: #ede3d2 !important;
  border-color: #9a7218 !important;
  border-left: 3px solid #9a7218 !important;
}
html:not(.dark) .socio-item-avatar,
html.light .socio-item-avatar,
body.theme-light .socio-item-avatar {
  background: rgba(154, 114, 24, 0.15) !important;
  border: 1px solid rgba(154, 114, 24, 0.3) !important;
  color: #9a7218 !important;
}

/* Neutralizar bg-dark en modo día */
html:not(.dark) .bg-dark:not(.btn):not(.btn *):not(.badge):not(.modal-header *),
html.light .bg-dark:not(.btn):not(.btn *):not(.badge):not(.modal-header *),
body.theme-light .bg-dark:not(.btn):not(.btn *):not(.badge):not(.modal-header *) {
  background-color: #fcf9f2 !important;
  color: #2c241c !important;
  border-color: #d8cdbd !important;
}

/* Neutralizar bg-white y bg-light en modo noche */
html.dark .card-body.bg-white,
html.dark .card-body.bg-light,
html.dark .card.bg-white,
html.dark .card.bg-light,
html.dark .bg-light:not(.btn):not(.badge):not(.btn *):not(.badge *),
html.dark .bg-white:not(.btn):not(.badge):not(.btn *):not(.badge *):not(#ticketPozoContenedor):not(#ticketPozoContenedor *):not([id*="ticket"]):not([id*="ticket"] *):not(.printable-ticket):not(.printable-ticket *),
body.theme-dark .card-body.bg-white,
body.theme-dark .card-body.bg-light,
body.theme-dark .card.bg-white,
body.theme-dark .card.bg-light,
body.theme-dark .bg-light:not(.btn):not(.badge):not(.btn *):not(.badge *),
body.theme-dark .bg-white:not(.btn):not(.badge):not(.btn *):not(.badge *):not(#ticketPozoContenedor):not(#ticketPozoContenedor *):not([id*="ticket"]):not([id*="ticket"] *):not(.printable-ticket):not(.printable-ticket *) {
  background-color: var(--paaet-card) !important;
  color: var(--paaet-text) !important;
  border-color: var(--paaet-border) !important;
}

/* ==========================================================================
   REGLAS GLOBALES DE LEGIBILIDAD Y ALTO CONTRASTE EN MODO NOCHE (NIGHT MODE)
   Resuelve textos oscuros/negros sobre fondos oscuros en todas las secciones
   ========================================================================== */
html.dark .text-dark,
html.dark .text-black,
html.dark .text-body,
body.theme-dark .text-dark,
body.theme-dark .text-black,
body.theme-dark .text-body {
  color: #f1f5f9 !important;
}

html.dark .text-muted,
html.dark small.text-muted,
html.dark p.text-muted,
html.dark span.text-muted,
html.dark div.text-muted,
html.dark .text-secondary,
html.dark .text-body-secondary,
html.dark .text-body-tertiary,
body.theme-dark .text-muted,
body.theme-dark small.text-muted,
body.theme-dark p.text-muted,
body.theme-dark span.text-muted,
body.theme-dark div.text-muted,
body.theme-dark .text-secondary,
body.theme-dark .text-body-secondary,
body.theme-dark .text-body-tertiary {
  color: #94a3b8 !important;
}

/* Neutralizar estilos en línea oscuros en modo noche (excepto tickets de exportación) */
html.dark [style*="color: #333"]:not(#ticketPozoWrapper *):not([id*="ticket"] *):not(#contenidoBalanceDiario *),
html.dark [style*="color:#333"]:not(#ticketPozoWrapper *):not([id*="ticket"] *):not(#contenidoBalanceDiario *),
html.dark [style*="color: #0f172a"]:not(#ticketPozoWrapper *):not([id*="ticket"] *):not(#contenidoBalanceDiario *),
html.dark [style*="color:#0f172a"]:not(#ticketPozoWrapper *):not([id*="ticket"] *):not(#contenidoBalanceDiario *),
body.theme-dark [style*="color: #333"]:not(#ticketPozoWrapper *):not([id*="ticket"] *):not(#contenidoBalanceDiario *),
body.theme-dark [style*="color:#333"]:not(#ticketPozoWrapper *):not([id*="ticket"] *):not(#contenidoBalanceDiario *),
body.theme-dark [style*="color: #0f172a"]:not(#ticketPozoWrapper *):not([id*="ticket"] *):not(#contenidoBalanceDiario *),
body.theme-dark [style*="color:#0f172a"]:not(#ticketPozoWrapper *):not([id*="ticket"] *):not(#contenidoBalanceDiario *) {
  color: #f1f5f9 !important;
}

/* Tablas consistentes en Modo Noche */
html.dark .table:not(.table-paaet-excel, .table-paaet-excel),
body.theme-dark .table:not(.table-paaet-excel, .table-paaet-excel) {
  --bs-table-color: var(--paaet-text, #eae2d5) !important;
  --bs-table-bg: transparent !important;
  --bs-table-border-color: var(--paaet-border, #443527) !important;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
  --bs-table-striped-color: var(--paaet-text, #eae2d5) !important;
  --bs-table-hover-bg: rgba(212, 175, 55, 0.08) !important;
  --bs-table-hover-color: #ffffff !important;
  color: var(--paaet-text, #eae2d5) !important;
  border-color: var(--paaet-border, #443527) !important;
}

html.dark .table:not(.table-paaet-excel, .table-paaet-excel) th,
html.dark .table:not(.table-paaet-excel, .table-paaet-excel) td,
body.theme-dark .table:not(.table-paaet-excel, .table-paaet-excel) th,
body.theme-dark .table:not(.table-paaet-excel, .table-paaet-excel) td {
  color: var(--paaet-text, #eae2d5) !important;
  border-color: var(--paaet-border, #443527) !important;
}

html.dark .table-light,
body.theme-dark .table-light {
  --bs-table-color: var(--paaet-text, #eae2d5) !important;
  --bs-table-bg: var(--paaet-card, #1c1714) !important;
  --bs-table-border-color: var(--paaet-border, #443527) !important;
  background-color: var(--paaet-card, #1c1714) !important;
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .table-light th,
html.dark .table-light td,
body.theme-dark .table-light th,
body.theme-dark .table-light td {
  background-color: var(--paaet-card, #1c1714) !important;
  color: var(--paaet-text, #eae2d5) !important;
  border-color: var(--paaet-border, #443527) !important;
}

/* Dropdown menus en modo noche */
.dropdown-menu {
  border-radius: 12px !important;
  overflow: hidden !important;
  background-clip: padding-box !important;
}

html.dark .dropdown-menu,
body.theme-dark .dropdown-menu {
  background-color: var(--paaet-card, #1c1714) !important;
  border: 1px solid var(--paaet-border, #443527) !important;
  color: var(--paaet-text, #eae2d5) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
html.dark .dropdown-item,
body.theme-dark .dropdown-item {
  color: var(--paaet-text, #eae2d5) !important;
}
html.dark .dropdown-item:hover,
html.dark .dropdown-item:focus,
body.theme-dark .dropdown-item:hover,
body.theme-dark .dropdown-item:focus {
  background-color: rgba(212, 175, 55, 0.15) !important;
  color: var(--paaet-gold, #d4af37) !important;
}

/* Dropdown menus en modo día (sepia) */
html:not(.dark) .dropdown-menu,
html.light .dropdown-menu,
body.theme-light .dropdown-menu {
  background-color: #fcf9f2 !important;
  border: 1px solid #d8cdbd !important;
  color: #2c241c !important;
  box-shadow: 0 10px 30px rgba(44, 36, 28, 0.12) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
html:not(.dark) .dropdown-item,
html.light .dropdown-item,
body.theme-light .dropdown-item {
  color: #2c241c !important;
}
html:not(.dark) .dropdown-item:hover,
html:not(.dark) .dropdown-item:focus,
html.light .dropdown-item:hover,
html.light .dropdown-item:focus,
body.theme-light .dropdown-item:hover,
body.theme-light .dropdown-item:focus {
  background-color: #ebe2d3 !important;
  color: #19140e !important;
}

/* Neutralizar text-white en contenido de texto dentro de tablas y tarjetas en modo claro */
html:not(.dark) .table-paaet td.text-white,
html:not(.dark) .table-paaet th:not(.table-header th):not(.table-paaet thead th).text-white,
html:not(.dark) .table-paaet .text-white:not(.badge):not(.btn):not(.btn *),
html:not(.dark) .tercios-grid td.text-white,
html:not(.dark) .tercios-grid .text-white:not(.badge):not(.btn):not(.btn *),
html:not(.dark) .card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet thead th *):not(.tercios-grid thead th *):not(.control-bar *):not(.modal-header *):not(.bg-primary *):not(.bg-danger *):not(.bg-success *):not(.bg-info *),
html:not(.dark) .paaet-card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet thead th *):not(.tercios-grid thead th *):not(.control-bar *):not(.modal-header *):not(.bg-primary *):not(.bg-danger *):not(.bg-success *):not(.bg-info *),
html:not(.dark) .pizarra-toolbar .text-white:not(.badge):not(.btn):not(.btn *),
html:not(.dark) .pizarra-resultados-strip .text-white:not(.badge):not(.btn):not(.btn *),
html:not(.dark) #viewContainerPAAET .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet thead th *):not(.tercios-grid thead th *):not(.control-bar *):not(.modal-header *):not(.bg-primary *):not(.bg-danger *):not(.bg-success *):not(.bg-info *):not(th),
html.light .table-paaet td.text-white,
html.light .table-paaet th:not(.table-header th):not(.table-paaet thead th).text-white,
html.light .table-paaet .text-white:not(.badge):not(.btn):not(.btn *),
html.light .tercios-grid td.text-white,
html.light .tercios-grid .text-white:not(.badge):not(.btn):not(.btn *),
html.light .card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet thead th *):not(.tercios-grid thead th *):not(.control-bar *):not(.modal-header *):not(.bg-primary *):not(.bg-danger *):not(.bg-success *):not(.bg-info *),
html.light .paaet-card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet thead th *):not(.tercios-grid thead th *):not(.control-bar *):not(.modal-header *):not(.bg-primary *):not(.bg-danger *):not(.bg-success *):not(.bg-info *),
html.light .pizarra-toolbar .text-white:not(.badge):not(.btn):not(.btn *),
html.light .pizarra-resultados-strip .text-white:not(.badge):not(.btn):not(.btn *),
html.light #viewContainerPAAET .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet thead th *):not(.tercios-grid thead th *):not(.control-bar *):not(.modal-header *):not(.bg-primary *):not(.bg-danger *):not(.bg-success *):not(.bg-info *):not(th),
body.theme-light .table-paaet td.text-white,
body.theme-light .table-paaet th:not(.table-header th):not(.table-paaet thead th).text-white,
body.theme-light .table-paaet .text-white:not(.badge):not(.btn):not(.btn *),
body.theme-light .tercios-grid td.text-white,
body.theme-light .tercios-grid .text-white:not(.badge):not(.btn):not(.btn *),
body.theme-light .card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet thead th *):not(.tercios-grid thead th *):not(.control-bar *):not(.modal-header *):not(.bg-primary *):not(.bg-danger *):not(.bg-success *):not(.bg-info *),
body.theme-light .paaet-card .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet thead th *):not(.tercios-grid thead th *):not(.control-bar *):not(.modal-header *):not(.bg-primary *):not(.bg-danger *):not(.bg-success *):not(.bg-info *),
body.theme-light .pizarra-toolbar .text-white:not(.badge):not(.btn):not(.btn *),
body.theme-light .pizarra-resultados-strip .text-white:not(.badge):not(.btn):not(.btn *),
body.theme-light #viewContainerPAAET .text-white:not(.btn):not(.btn *):not(.badge):not(.table-header *):not(.table-paaet thead th *):not(.tercios-grid thead th *):not(.control-bar *):not(.modal-header *):not(.bg-primary *):not(.bg-danger *):not(.bg-success *):not(.bg-info *):not(th) {
  color: #2c241c !important;
}

/* Selects y Options en todo el sistema */
select,
.form-select,
.pizarra-select {
  background-color: var(--paaet-input-bg) !important;
  color: var(--paaet-input-text) !important;
  border: 1px solid var(--paaet-input-border) !important;
}
select option,
.form-select option,
.pizarra-select option {
  background-color: var(--paaet-card) !important;
  color: var(--paaet-text) !important;
}
html:not(.dark) select,
html:not(.dark) .form-select,
html:not(.dark) .pizarra-select,
html.light select,
html.light .form-select,
html.light .pizarra-select,
body.theme-light select,
body.theme-light .form-select,
body.theme-light .pizarra-select {
  background-color: #fdfbf7 !important;
  color: #2c241c !important;
  border: 1px solid #cfc2b2 !important;
}
html:not(.dark) select option,
html:not(.dark) .form-select option,
html:not(.dark) .pizarra-select option,
html.light select option,
html.light .form-select option,
html.light .pizarra-select option,
body.theme-light select option,
body.theme-light .form-select option,
body.theme-light .pizarra-select option {
  background-color: #fcf9f2 !important;
  color: #2c241c !important;
}

/* ==========================================================================
   11. MÓDULO COMISIÓN DIARIA / SEMANAL — ESTILO PAAET SYSTEM (ALTA FIDELIDAD)
   ========================================================================== */

.comision-page {
  padding: 8px 16px 24px 16px;
  width: 100%;
  max-width: 100%;
}

.comision-header-block {
  margin-bottom: 14px;
}

.comision-page-title {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  color: var(--paaet-heading, #19140e);
  margin: 0 0 3px 0 !important;
  text-transform: uppercase;
}

.comision-page-subtitle {
  font-size: 13px;
  color: var(--paaet-muted, #7a6d5f);
  font-weight: 500;
  margin: 0;
  text-transform: capitalize;
}

.comision-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex-wrap: wrap;
}

.comision-week-select {
  min-height: 38px;
  height: 38px;
  min-width: 165px;
  background-color: var(--paaet-input-bg, #fdfbf7);
  border: 1px solid var(--paaet-input-border, #cfc2b2);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paaet-text, #2c241c);
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(44, 36, 28, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.comision-week-select:focus {
  border-color: var(--paaet-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

.comision-btn-action {
  min-height: 38px;
  height: 38px;
  min-width: 38px;
  width: 38px;
  background-color: var(--paaet-input-bg, #fdfbf7);
  border: 1px solid var(--paaet-input-border, #cfc2b2);
  border-radius: 8px;
  color: var(--paaet-muted, #7a6d5f);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(44, 36, 28, 0.04);
  transition: all 0.2s ease-in-out;
  padding: 0;
  outline: none;
  user-select: none;
}

.comision-btn-action:focus,
.comision-btn-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35);
}

.comision-btn-action:hover {
  background-color: var(--paaet-table-hover, #ebe2d3);
  border-color: var(--paaet-border, #d8cdbd);
  color: var(--paaet-heading, #19140e);
  transform: translateY(-1px);
}

.comision-btn-action:active {
  transform: translateY(0);
}

/* Tarjetas de Comisión Diaria (Estilo PAAET) */
.comision-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comision-card {
  background-color: var(--paaet-card, #fcf9f2);
  border: 1px solid var(--paaet-border, #d8cdbd);
  border-radius: 9px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(44, 36, 28, 0.03);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.comision-card:hover {
  box-shadow: 0 2px 6px rgba(44, 36, 28, 0.06);
}

/* Cabecera adaptativa de la tarjeta */
.comision-card-header {
  background: linear-gradient(135deg, #fdfbf7 0%, #ece2ce 100%);
  border-left: 4px solid var(--paaet-gold);
  border-bottom: 1px solid var(--paaet-border);
  color: var(--paaet-heading, #19140e);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: filter 0.15s ease;
}

.comision-card-header:hover {
  filter: brightness(1.04);
}

.comision-card-header .comision-chevron {
  font-size: 11px;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.comision-card-header.is-open .comision-chevron {
  transform: rotate(180deg);
}

/* Grilla de 5 columnas de métricas */
.comision-card-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px 8px;
  padding: 4px 2px;
}

.comision-metric-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.comision-metric-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--paaet-muted, #7a6d5f);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comision-metric-value {
  font-family: 'Cascadia Mono', 'Consolas', monospace, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--paaet-text, #2c241c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comision-metric-value.text-emerald {
  color: #059669 !important;
  font-weight: 700 !important;
}

/* Tarjeta de TOTALES (borde dorado PAAET) */
.comision-totales-card {
  border: 1.5px solid var(--paaet-gold) !important;
  background-color: var(--paaet-table-zebra, #f7f1e6) !important;
  margin-top: 10px;
}

.comision-totales-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--paaet-heading, #19140e);
  margin-bottom: 6px;
  padding-left: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.comision-totales-card .comision-metric-value {
  color: #059669 !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
}

/* Desglose por Hipódromo (unfolded accordion) */
.comision-detalle {
  margin-top: 8px;
  padding: 10px 2px 2px;
  border-top: 1px solid var(--paaet-border, #d8cdbd);
}

.comision-hipodromos-box {
  background-color: var(--paaet-table-zebra, #f7f1e6);
  border: 1px solid var(--paaet-border, #d8cdbd);
  border-radius: 6px;
  overflow: hidden;
}

.comision-hipodromos-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 12.5px;
}

.comision-hipodromos-table thead {
  background-color: var(--paaet-sidebar-bg, #efe8dc);
}

.comision-hipodromos-table th {
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--paaet-muted, #7a6d5f);
  border-bottom: 1px solid var(--paaet-border, #d8cdbd);
  letter-spacing: 0.02em;
}

.comision-hipodromos-table td {
  padding: 7px 12px;
  color: var(--paaet-text, #2c241c);
  border-bottom: 1px solid var(--paaet-table-border, #e8dfd3);
}

.comision-hipodromos-table tr:last-child td {
  border-bottom: none;
}

.comision-subtotal-row {
  border-top: 2px solid var(--paaet-gold) !important;
  background-color: var(--paaet-sidebar-bg, #efe8dc) !important;
}

.comision-subtotal-row td {
  font-weight: 700 !important;
  font-size: 13px !important;
}

.comision-footer-info {
  font-size: 12.5px;
  color: var(--paaet-muted, #7a6d5f);
  padding: 6px 4px;
}

/* ==========================================================================
   DISEÑO ESTRUCTURADO Y ELEVADO PARA TABLA DE COMISIÓN POR DÍAS (FULL WIDTH)
   ========================================================================== */
.comision-table-wrapper {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 12px;
}

/* Tarjeta Elevada - Modo Oscuro */
.paaet-table-card.comision-card-elevated {
  background: var(--paaet-card, #191410) !important;
  border: 1.5px solid rgba(212, 175, 55, 0.28) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.paaet-table-card.comision-card-elevated:hover {
  border-color: rgba(212, 175, 55, 0.45) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.52) !important;
}

/* Tarjeta Elevada - Modo Claro (Sombras suaves, sin manchas oscuras) */
html:not(.dark) .paaet-table-card.comision-card-elevated,
html.light .paaet-table-card.comision-card-elevated,
body.theme-light .paaet-table-card.comision-card-elevated {
  background: #ffffff !important;
  border: 1.5px solid #ded5c5 !important;
  box-shadow: 0 4px 18px rgba(60, 48, 36, 0.07), 0 1px 3px rgba(60, 48, 36, 0.04) !important;
}

html:not(.dark) .paaet-table-card.comision-card-elevated:hover,
html.light .paaet-table-card.comision-card-elevated:hover,
body.theme-light .paaet-table-card.comision-card-elevated:hover {
  border-color: #c5a059 !important;
  box-shadow: 0 6px 22px rgba(60, 48, 36, 0.11), 0 2px 5px rgba(60, 48, 36, 0.05) !important;
}

.table-paaet.comision-grid {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 14.5px;
  margin: 0;
}

/* Encabezados de Comisión - Modo Oscuro */
.table-paaet.comision-grid thead th {
  background: linear-gradient(180deg, #241c16 0%, #1a1410 100%) !important;
  color: #f8fafc !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 16px 20px !important;
  border: none !important;
  border-bottom: 2px solid #c5a059 !important;
  white-space: nowrap;
  box-shadow: none !important;
}

/* Encabezados de Comisión - Modo Claro */
html:not(.dark) .table-paaet.comision-grid thead th,
html.light .table-paaet.comision-grid thead th,
body.theme-light .table-paaet.comision-grid thead th {
  background: linear-gradient(180deg, #faf5ec 0%, #ede2d0 100%) !important;
  color: #241c14 !important;
  border: none !important;
  border-bottom: 2px solid #b89148 !important;
  box-shadow: none !important;
}

.table-paaet.comision-grid thead th.col-fecha {
  width: 25%;
  min-width: 200px;
  padding-left: 26px !important;
}

.table-paaet.comision-grid thead th.col-num {
  width: 15%;
  min-width: 130px;
}

.table-paaet.comision-grid thead th.col-total {
  width: 15%;
  min-width: 140px;
  padding-right: 26px !important;
}

/* Filas de Día - Modo Oscuro */
.table-paaet.comision-grid tbody tr.dia-row-paaet {
  background-color: #1c1714 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  transition: background-color 0.18s ease;
  cursor: pointer;
}

.table-paaet.comision-grid tbody tr.dia-row-paaet:nth-child(4n+1) {
  background-color: #171310 !important;
}

.table-paaet.comision-grid tbody tr.dia-row-paaet:hover {
  background-color: rgba(212, 175, 55, 0.1) !important;
}

/* Filas de Día - Modo Claro */
html:not(.dark) .table-paaet.comision-grid tbody tr.dia-row-paaet,
html.light .table-paaet.comision-grid tbody tr.dia-row-paaet,
body.theme-light .table-paaet.comision-grid tbody tr.dia-row-paaet {
  background-color: #ffffff !important;
  border-bottom: 1px solid #eee5d7 !important;
}

html:not(.dark) .table-paaet.comision-grid tbody tr.dia-row-paaet:nth-child(4n+1),
html.light .table-paaet.comision-grid tbody tr.dia-row-paaet:nth-child(4n+1),
body.theme-light .table-paaet.comision-grid tbody tr.dia-row-paaet:nth-child(4n+1) {
  background-color: #fcf9f4 !important;
}

html:not(.dark) .table-paaet.comision-grid tbody tr.dia-row-paaet:hover,
html.light .table-paaet.comision-grid tbody tr.dia-row-paaet:hover,
body.theme-light .table-paaet.comision-grid tbody tr.dia-row-paaet:hover {
  background-color: #f7efe1 !important;
}

.table-paaet.comision-grid tbody tr.dia-row-paaet td {
  padding: 16px 20px !important;
  vertical-align: middle;
  font-size: 14.5px;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: none !important;
}

html:not(.dark) .table-paaet.comision-grid tbody tr.dia-row-paaet td,
html.light .table-paaet.comision-grid tbody tr.dia-row-paaet td,
body.theme-light .table-paaet.comision-grid tbody tr.dia-row-paaet td {
  border-bottom: 1px solid #ebdccb !important;
  color: #1a1510 !important;
  box-shadow: none !important;
}

.table-paaet.comision-grid tbody tr.dia-row-paaet td:first-child {
  padding-left: 26px !important;
  font-size: 14.5px;
  font-weight: 700;
  color: #f3f4f6 !important;
}

html:not(.dark) .table-paaet.comision-grid tbody tr.dia-row-paaet td:first-child,
html.light .table-paaet.comision-grid tbody tr.dia-row-paaet td:first-child,
body.theme-light .table-paaet.comision-grid tbody tr.dia-row-paaet td:first-child {
  color: #1a1510 !important;
}

.table-paaet.comision-grid tbody tr.dia-row-paaet td:last-child {
  padding-right: 26px !important;
}

html:not(.dark) .table-paaet.comision-grid tbody tr.dia-row-paaet td.text-emerald,
html.light .table-paaet.comision-grid tbody tr.dia-row-paaet td.text-emerald,
body.theme-light .table-paaet.comision-grid tbody tr.dia-row-paaet td.text-emerald {
  color: #047857 !important;
}

/* Icono Chevron */
.comision-chevron-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  font-size: 11px;
  transition: all 0.2s ease;
  vertical-align: middle;
  border: 1px solid rgba(212, 175, 55, 0.28);
}

.dia-row-paaet:hover .comision-chevron-icon {
  background: rgba(212, 175, 55, 0.25);
  color: #f59e0b;
}

html:not(.dark) .comision-chevron-icon,
html.light .comision-chevron-icon,
body.theme-light .comision-chevron-icon {
  background: #f4ecdf !important;
  color: #8c6a23 !important;
  border: 1px solid #ded2be !important;
}

html:not(.dark) .dia-row-paaet:hover .comision-chevron-icon,
html.light .dia-row-paaet:hover .comision-chevron-icon,
body.theme-light .dia-row-paaet:hover .comision-chevron-icon {
  background: #ecdfcb !important;
  color: #6b4d10 !important;
  border-color: #c5a059 !important;
}

/* Fila de Totales - Modo Oscuro */
.table-paaet.comision-grid tfoot,
.table-paaet.comision-grid tfoot tr,
.table-paaet.comision-grid tfoot tr.comision-subtotal-row {
  background: linear-gradient(180deg, #1f1813 0%, #140f0c 100%) !important;
  border-top: 2.5px solid #d4af37 !important;
  box-shadow: none !important;
}

.table-paaet.comision-grid tfoot td,
.table-paaet.comision-grid tfoot tr.comision-subtotal-row td {
  padding: 18px 20px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  border: none !important;
  border-top: 2.5px solid #d4af37 !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: #34d399 !important;
}

.table-paaet.comision-grid tfoot tr.comision-subtotal-row td:first-child {
  padding-left: 26px !important;
  letter-spacing: 0.5px;
}

.table-paaet.comision-grid tfoot tr.comision-subtotal-row td:last-child {
  padding-right: 26px !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  color: #10b981 !important;
}

/* Fila de Totales - Modo Claro (Cero sombras, fila homogénea y armónica) */
html:not(.dark) .table-paaet.comision-grid tfoot,
html.light .table-paaet.comision-grid tfoot,
body.theme-light .table-paaet.comision-grid tfoot,
html:not(.dark) .table-paaet.comision-grid tfoot tr.comision-subtotal-row,
html.light .table-paaet.comision-grid tfoot tr.comision-subtotal-row,
body.theme-light .table-paaet.comision-grid tfoot tr.comision-subtotal-row {
  background: linear-gradient(180deg, #ede3cf 0%, #e2d6bf 100%) !important;
  border-top: 2.5px solid #b89148 !important;
  box-shadow: none !important;
}

html:not(.dark) .table-paaet.comision-grid tfoot td,
html.light .table-paaet.comision-grid tfoot td,
body.theme-light .table-paaet.comision-grid tfoot td,
html:not(.dark) .table-paaet.comision-grid tfoot tr.comision-subtotal-row td,
html.light .table-paaet.comision-grid tfoot tr.comision-subtotal-row td,
body.theme-light .table-paaet.comision-grid tfoot tr.comision-subtotal-row td {
  border: none !important;
  border-top: 2.5px solid #b89148 !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: #1a1510 !important;
  padding: 18px 20px !important;
}

html:not(.dark) .table-paaet.comision-grid tfoot tr.comision-subtotal-row td.text-emerald,
html.light .table-paaet.comision-grid tfoot tr.comision-subtotal-row td.text-emerald,
body.theme-light .table-paaet.comision-grid tfoot tr.comision-subtotal-row td.text-emerald {
  color: #047857 !important;
}

/* Footer info badge y texto */
.comision-badge-counter {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
}

html:not(.dark) .comision-badge-counter,
html.light .comision-badge-counter,
body.theme-light .comision-badge-counter {
  background-color: #ede3d0 !important;
  color: #4a3821 !important;
  border: 1px solid #dcd0bc !important;
}

html.dark .comision-badge-counter,
body.theme-dark .comision-badge-counter {
  background-color: #241c16 !important;
  color: #f1ebd9 !important;
  border: 1px solid #5c4734 !important;
}

html:not(.dark) .comision-hint-text,
html.light .comision-hint-text,
body.theme-light .comision-hint-text {
  color: #786957 !important;
}

html.dark .comision-hint-text,
body.theme-dark .comision-hint-text {
  color: #94a3b8 !important;
}

/* Desglose de Carreras en Comisión Diaria */
.comision-hipodromos-box-header {
  background-color: var(--paaet-sidebar-bg, #efe8dc);
  border-bottom: 1px solid var(--paaet-border, #d8cdbd);
}

.comision-hip-row {
  transition: background-color 0.15s ease;
  user-select: none;
}

.comision-hip-row:hover {
  background-color: rgba(37, 99, 235, 0.05);
}

.comision-hip-chevron {
  display: inline-block;
  font-size: 10px;
  width: 14px;
  transition: transform 0.2s ease;
}

.comision-hip-chevron.is-open {
  transform: rotate(90deg);
}

.comision-carreras-subrow {
  background-color: var(--paaet-card, #fcf9f2);
}

.comision-carreras-table {
  width: 100%;
  border-collapse: collapse;
}

.comision-carreras-table td {
  padding: 6px 14px !important;
  border-bottom: 1px dashed rgba(44, 36, 28, 0.08) !important;
}

.comision-carrera-item:last-child td {
  border-bottom: none !important;
}

.comision-carreras-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background-color: var(--paaet-border, #d8cdbd);
  color: var(--paaet-text, #2c241c);
  display: inline-block;
}

/* ==========================================================================
   Modo Oscuro para Comisión Diaria
   ========================================================================== */
html.dark .comision-page-title,
body.theme-dark .comision-page-title {
  color: #f8fafc !important;
}

html.dark .comision-page-subtitle,
body.theme-dark .comision-page-subtitle {
  color: #94a3b8 !important;
}

html.dark .comision-week-select,
body.theme-dark .comision-week-select {
  background-color: #16120f !important;
  border-color: #443527 !important;
  color: #f8fafc !important;
}

html.dark .comision-btn-action,
body.theme-dark .comision-btn-action {
  background-color: #16120f !important;
  border-color: #443527 !important;
  color: #eae2d5 !important;
}

html.dark .comision-btn-action:hover,
body.theme-dark .comision-btn-action:hover {
  background-color: #241c16 !important;
  border-color: #d4af37 !important;
  color: #d4af37 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

html.dark .comision-card,
body.theme-dark .comision-card {
  background-color: #1c1714 !important;
  border-color: #443527 !important;
}

html.dark .comision-card-header,
body.theme-dark .comision-card-header {
  background: linear-gradient(135deg, #241c16 0%, #1c1714 100%) !important;
  border-left: 4px solid #d4af37 !important;
  border-bottom: 1px solid #443527 !important;
  color: #d4af37 !important;
}

html.dark .comision-metric-label,
body.theme-dark .comision-metric-label {
  color: #a89c8d !important;
}

html.dark .comision-metric-value,
body.theme-dark .comision-metric-value {
  color: #eae2d5 !important;
}

html.dark .comision-metric-value.text-emerald,
body.theme-dark .comision-metric-value.text-emerald {
  color: #10b981 !important;
}

html.dark .comision-totales-card,
body.theme-dark .comision-totales-card {
  border-color: #d4af37 !important;
  background-color: #171310 !important;
}

html.dark .comision-totales-title,
body.theme-dark .comision-totales-title {
  color: #d4af37 !important;
}

html.dark .comision-detalle,
body.theme-dark .comision-detalle {
  border-color: #443527 !important;
}

html.dark .comision-hipodromos-box,
body.theme-dark .comision-hipodromos-box {
  background-color: #171310 !important;
  border-color: #443527 !important;
}

html.dark .comision-hipodromos-table thead,
body.theme-dark .comision-hipodromos-table thead,
html.dark .comision-subtotal-row,
body.theme-dark .comision-subtotal-row {
  background-color: #1c1714 !important;
}

html.dark .comision-subtotal-row,
body.theme-dark .comision-subtotal-row {
  border-top: 2px solid #d4af37 !important;
}

html.dark .comision-hipodromos-table th,
body.theme-dark .comision-hipodromos-table th {
  color: #a89c8d !important;
  border-color: #443527 !important;
}

html.dark .comision-hipodromos-table td,
body.theme-dark .comision-hipodromos-table td {
  color: #eae2d5 !important;
  border-color: #33281e !important;
}

html.dark .comision-hipodromos-box-header,
body.theme-dark .comision-hipodromos-box-header {
  background-color: #1a1512 !important;
  border-bottom-color: #443527 !important;
}

html.dark .comision-hip-row:hover,
body.theme-dark .comision-hip-row:hover {
  background-color: rgba(212, 175, 55, 0.08) !important;
}

html.dark .comision-carreras-subrow,
body.theme-dark .comision-carreras-subrow {
  background-color: #14110f !important;
}

html.dark .comision-carreras-table td,
body.theme-dark .comision-carreras-table td {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07) !important;
}

html.dark .comision-carreras-badge,
body.theme-dark .comision-carreras-badge {
  background-color: #241c16 !important;
  color: #d4af37 !important;
  border: 1px solid #443527 !important;
}

/* ==========================================================================
   ESTILOS PAAET SYSTEM PARA SALDOS (CARDS, TOOLBAR Y TOTALES)
   ========================================================================== */
#viewContainerPAAET:has(#view_saldos:not(.d-none)) {
  overflow-y: hidden !important;
  padding-top: 14px !important;
  padding-bottom: 8px !important;
}

.saldos-page {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--paaet-text, #2c241c);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: calc(100vh - 85px);
}

.saldos-page .saldos-header-block {
  flex-shrink: 0;
  margin-bottom: 6px !important;
}

.saldos-page .saldos-table-wrapper {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: calc(100vh - 245px);
  overflow-x: auto !important;
  overflow-y: scroll !important;
}

.saldos-page .saldos-footer {
  flex-shrink: 0;
  margin-top: 4px !important;
  padding: 2px 0 !important;
}

.saldos-page-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--paaet-heading, #19140e);
  margin: 0;
  letter-spacing: -0.01em;
}

.saldos-page-subtitle {
  font-size: 12.5px;
  color: var(--paaet-muted, #7a6d5f);
  margin: 3px 0 0 0;
}

.saldos-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--paaet-muted, #7a6d5f);
}

.saldos-select,
.saldos-date-input {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--paaet-input-border, #cfc2b2);
  border-radius: 5px;
  background-color: var(--paaet-input-bg, #fdfbf7);
  color: var(--paaet-text, #2c241c);
  outline: none;
  transition: border-color 0.15s ease;
}

.saldos-select:focus,
.saldos-date-input:focus {
  border-color: var(--paaet-gold);
  box-shadow: var(--paaet-focus-glow);
}

.btn-saldos-toolbar {
  padding: 6px 11px;
  font-size: 12.5px;
  border: 1px solid var(--paaet-input-border, #cfc2b2);
  border-radius: 5px;
  background-color: var(--paaet-input-bg, #fdfbf7);
  color: var(--paaet-muted, #7a6d5f);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.btn-saldos-toolbar:hover {
  background-color: var(--paaet-table-hover, #ebe2d3);
  border-color: var(--paaet-border, #d8cdbd);
  color: var(--paaet-heading, #19140e);
}

.btn-saldos-primary {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  background-color: var(--paaet-gold) !important;
  color: #14110f !important;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-saldos-primary:hover {
  background-color: var(--paaet-gold-hover) !important;
}

html:not(.dark) .btn-saldos-primary,
html.light .btn-saldos-primary,
body.theme-light .btn-saldos-primary {
  background-color: #9a7218 !important;
  color: #ffffff !important;
}

html:not(.dark) .btn-saldos-primary:hover,
html.light .btn-saldos-primary:hover,
body.theme-light .btn-saldos-primary:hover {
  background-color: #805d10 !important;
}

.saldos-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.saldos-search-input {
  width: 100%;
  padding: 7px 32px 7px 12px;
  font-size: 13px;
  border: 1px solid var(--paaet-input-border, #cfc2b2);
  border-radius: 5px;
  background-color: var(--paaet-input-bg, #fdfbf7);
  color: var(--paaet-text, #2c241c);
  outline: none;
  transition: border-color 0.15s ease;
}

.saldos-search-input:focus {
  border-color: var(--paaet-gold);
  box-shadow: var(--paaet-focus-glow);
}

.saldos-search-clear {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--paaet-muted, #7a6d5f);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.saldos-search-clear:hover {
  color: var(--paaet-heading, #19140e);
}

/* CARDS DE SALDOS (PAAET GRID) */
.saldos-cards-container {
  width: 100%;
}

.saldos-card {
  background-color: var(--paaet-card, #fcf9f2);
  border: 1px solid var(--paaet-border, #d8cdbd);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(44, 36, 28, 0.03);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
}

.saldos-card:hover {
  box-shadow: 0 4px 6px -1px rgba(44, 36, 28, 0.07);
}

.saldos-card-header {
  padding: 10px 14px 4px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--paaet-heading, #19140e);
  display: flex;
  align-items: center;
  gap: 8px;
}

.saldos-card-index {
  font-size: 12px;
  color: var(--paaet-muted, #7a6d5f);
  font-weight: 600;
}

.saldos-card-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 6px;
  padding: 8px 14px 14px;
  text-align: center;
}

.saldos-metric-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.saldos-metric-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--paaet-muted, #7a6d5f);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.saldos-metric-value {
  font-size: 14.5px;
  font-weight: 800 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html.dark .saldos-metric-value,
body.theme-dark .saldos-metric-value {
  color: #ffffff !important;
}

html:not(.dark) .saldos-metric-value,
html.light .saldos-metric-value,
body.theme-light .saldos-metric-value {
  color: #0f0b07 !important;
}

.saldos-pill-negative {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  font-weight: 800 !important;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.4);
}

.saldos-pill-neutral {
  font-weight: 700 !important;
}

html.dark .saldos-pill-neutral,
body.theme-dark .saldos-pill-neutral {
  color: #ffffff !important;
}

html:not(.dark) .saldos-pill-neutral,
html.light .saldos-pill-neutral,
body.theme-light .saldos-pill-neutral {
  color: #0f0b07 !important;
}

/* Card Actions (segmented footer buttons) */
.saldos-card-actions {
  display: flex;
  border-top: 1px solid var(--paaet-border, #d8cdbd);
  background-color: var(--paaet-table-zebra, #f7f1e6);
  overflow: hidden;
}

.saldos-card-action-btn {
  flex: 1;
  padding: 9px 8px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--paaet-border, #d8cdbd);
  color: var(--paaet-muted, #7a6d5f);
  cursor: pointer;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.saldos-card-action-btn:last-child {
  border-right: none;
}

.saldos-card-action-btn:hover {
  background-color: var(--paaet-table-hover, #ebe2d3);
  color: var(--paaet-heading, #19140e);
}

/* TARJETA TOTALES (— TOTALES) */
.saldos-totales-card {
  background-color: var(--paaet-table-zebra, #f7f1e6);
  border: 1.5px solid var(--paaet-gold);
  border-radius: 8px;
  padding: 12px 14px;
}

.saldos-totales-header {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--paaet-heading, #19140e);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.saldos-totales-footer {
  font-size: 14px;
  color: var(--paaet-muted, #7a6d5f);
  text-align: center;
  margin-top: 8px;
}

/* Colores específicos de Alto Contraste para Totales PAAET */
/* Modo Noche (fondo oscuro) */
html.dark .text-saldos-disp,
body.theme-dark .text-saldos-disp,
html.dark .table-paaet-saldos tfoot td.text-saldos-disp,
body.theme-dark .table-paaet-saldos tfoot td.text-saldos-disp,
:root .text-saldos-disp {
  color: #38bdf8 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html.dark .text-saldos-dia,
body.theme-dark .text-saldos-dia,
html.dark .table-paaet-saldos tfoot td.text-saldos-dia,
body.theme-dark .table-paaet-saldos tfoot td.text-saldos-dia,
:root .text-saldos-dia {
  color: #f87171 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html.dark .text-saldos-ret,
body.theme-dark .text-saldos-ret,
html.dark .table-paaet-saldos tfoot td.text-saldos-ret,
body.theme-dark .table-paaet-saldos tfoot td.text-saldos-ret,
:root .text-saldos-ret {
  color: #c084fc !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html.dark .text-saldos-sem,
body.theme-dark .text-saldos-sem,
html.dark .table-paaet-saldos tfoot td.text-saldos-sem,
body.theme-dark .table-paaet-saldos tfoot td.text-saldos-sem,
:root .text-saldos-sem {
  color: #c084fc !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html.dark .text-saldos-trf,
body.theme-dark .text-saldos-trf,
html.dark .table-paaet-saldos tfoot td.text-saldos-trf,
body.theme-dark .table-paaet-saldos tfoot td.text-saldos-trf,
:root .text-saldos-trf {
  color: #34d399 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html.dark .text-saldos-avl,
body.theme-dark .text-saldos-avl,
html.dark .table-paaet-saldos tfoot td.text-saldos-avl,
body.theme-dark .table-paaet-saldos tfoot td.text-saldos-avl,
:root .text-saldos-avl {
  color: #fb923c !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html.dark .text-saldos-tra,
body.theme-dark .text-saldos-tra,
html.dark .table-paaet-saldos tfoot td.text-saldos-tra,
body.theme-dark .table-paaet-saldos tfoot td.text-saldos-tra,
:root .text-saldos-tra {
  color: #38bdf8 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html.dark .text-saldos-pol,
body.theme-dark .text-saldos-pol,
html.dark .table-paaet-saldos tfoot td.text-saldos-pol,
body.theme-dark .table-paaet-saldos tfoot td.text-saldos-pol,
:root .text-saldos-pol {
  color: #f59e0b !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html.dark .text-saldos-rem,
body.theme-dark .text-saldos-rem,
html.dark .table-paaet-saldos tfoot td.text-saldos-rem,
body.theme-dark .table-paaet-saldos tfoot td.text-saldos-rem,
:root .text-saldos-rem {
  color: #06b6d4 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html.dark .text-saldos-rti,
body.theme-dark .text-saldos-rti,
html.dark .table-paaet-saldos tfoot td.text-saldos-rti,
body.theme-dark .table-paaet-saldos tfoot td.text-saldos-rti,
:root .text-saldos-rti {
  color: #38bdf8 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

/* Modo Día (fondo claro) - Alto contraste y saturación profunda */
html:not(.dark) .text-saldos-disp,
html.light .text-saldos-disp,
body.theme-light .text-saldos-disp,
html:not(.dark) .table-paaet-saldos tfoot td.text-saldos-disp,
html.light .table-paaet-saldos tfoot td.text-saldos-disp,
body.theme-light .table-paaet-saldos tfoot td.text-saldos-disp {
  color: #0369a1 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html:not(.dark) .text-saldos-dia,
html.light .text-saldos-dia,
body.theme-light .text-saldos-dia,
html:not(.dark) .table-paaet-saldos tfoot td.text-saldos-dia,
html.light .table-paaet-saldos tfoot td.text-saldos-dia,
body.theme-light .table-paaet-saldos tfoot td.text-saldos-dia {
  color: #b91c1c !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html:not(.dark) .text-saldos-ret,
html.light .text-saldos-ret,
body.theme-light .text-saldos-ret,
html:not(.dark) .table-paaet-saldos tfoot td.text-saldos-ret,
html.light .table-paaet-saldos tfoot td.text-saldos-ret,
body.theme-light .table-paaet-saldos tfoot td.text-saldos-ret {
  color: #581c87 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html:not(.dark) .text-saldos-sem,
html.light .text-saldos-sem,
body.theme-light .text-saldos-sem,
html:not(.dark) .table-paaet-saldos tfoot td.text-saldos-sem,
html.light .table-paaet-saldos tfoot td.text-saldos-sem,
body.theme-light .table-paaet-saldos tfoot td.text-saldos-sem {
  color: #4338ca !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html:not(.dark) .text-saldos-trf,
html.light .text-saldos-trf,
body.theme-light .text-saldos-trf,
html:not(.dark) .table-paaet-saldos tfoot td.text-saldos-trf,
html.light .table-paaet-saldos tfoot td.text-saldos-trf,
body.theme-light .table-paaet-saldos tfoot td.text-saldos-trf {
  color: #047857 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html:not(.dark) .text-saldos-avl,
html.light .text-saldos-avl,
body.theme-light .text-saldos-avl,
html:not(.dark) .table-paaet-saldos tfoot td.text-saldos-avl,
html.light .table-paaet-saldos tfoot td.text-saldos-avl,
body.theme-light .table-paaet-saldos tfoot td.text-saldos-avl {
  color: #c2410c !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html:not(.dark) .text-saldos-tra,
html.light .text-saldos-tra,
body.theme-light .text-saldos-tra,
html:not(.dark) .table-paaet-saldos tfoot td.text-saldos-tra,
html.light .table-paaet-saldos tfoot td.text-saldos-tra,
body.theme-light .table-paaet-saldos tfoot td.text-saldos-tra {
  color: #0284c7 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html:not(.dark) .text-saldos-pol,
html.light .text-saldos-pol,
body.theme-light .text-saldos-pol,
html:not(.dark) .table-paaet-saldos tfoot td.text-saldos-pol,
html.light .table-paaet-saldos tfoot td.text-saldos-pol,
body.theme-light .table-paaet-saldos tfoot td.text-saldos-pol {
  color: #d97706 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html:not(.dark) .text-saldos-rem,
html.light .text-saldos-rem,
body.theme-light .text-saldos-rem,
html:not(.dark) .table-paaet-saldos tfoot td.text-saldos-rem,
html.light .table-paaet-saldos tfoot td.text-saldos-rem,
body.theme-light .table-paaet-saldos tfoot td.text-saldos-rem {
  color: #0891b2 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

html:not(.dark) .text-saldos-rti,
html.light .text-saldos-rti,
body.theme-light .text-saldos-rti,
html:not(.dark) .table-paaet-saldos tfoot td.text-saldos-rti,
html.light .table-paaet-saldos tfoot td.text-saldos-rti,
body.theme-light .table-paaet-saldos tfoot td.text-saldos-rti {
  color: #0284c7 !important;
  font-weight: 900 !important;
  font-size: 16.5px !important;
}

/* ==========================================================================
   TABLA SALDOS PAAET SYSTEM (SCROLL BI-DIRECCIONAL, STICKY HEADER & FOOTER)
   ========================================================================== */
.saldos-table-wrapper {
  max-height: calc(100vh - 245px);
  min-height: 220px;
  overflow-x: auto !important;
  overflow-y: scroll !important; /* Siempre visible para usuarios sin ruedita o en laptop */
  scrollbar-gutter: stable;
  background-color: #14110f !important;
  border: 1px solid #443527 !important;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  position: relative;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #c5a059 #14110f !important;
}

#totalesCardSaldosPAAET {
  position: sticky;
  bottom: 0;
  z-index: 25;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.5) !important;
}

/* Barra de desplazamiento prominente y arrastrable (laptop / sin rueda) */
.saldos-table-wrapper::-webkit-scrollbar,
#tablaPAAETScrollContainer::-webkit-scrollbar {
  width: 14px !important;
  height: 14px !important;
  display: block !important;
}

.saldos-table-wrapper::-webkit-scrollbar-track,
#tablaPAAETScrollContainer::-webkit-scrollbar-track {
  background: #14110f !important;
  border-left: 1px solid #3d2f23 !important;
  border-top: 1px solid #3d2f23 !important;
  border-radius: 6px;
}

.saldos-table-wrapper::-webkit-scrollbar-thumb,
#tablaPAAETScrollContainer::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c5a059 0%, #9a7638 100%) !important;
  border-radius: 7px;
  border: 2px solid #14110f !important;
  min-height: 44px !important;
  cursor: grab !important;
}

.saldos-table-wrapper::-webkit-scrollbar-thumb:hover,
#tablaPAAETScrollContainer::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e4bf6f 0%, #b38c43 100%) !important;
  box-shadow: 0 0 10px rgba(197, 160, 89, 0.6) !important;
}

.saldos-table-wrapper::-webkit-scrollbar-thumb:active,
#tablaPAAETScrollContainer::-webkit-scrollbar-thumb:active {
  background: #f1c97a !important;
  cursor: grabbing !important;
}

.saldos-table-wrapper::-webkit-scrollbar-corner,
#tablaPAAETScrollContainer::-webkit-scrollbar-corner {
  background: #14110f !important;
}

.table-paaet-saldos {
  width: 100%;
  min-width: 950px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background-color: #14110f !important;
  color: #eae2d5 !important;
  margin: 0;
}

.table-paaet-saldos thead th {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: #1c1714 !important;
  color: #d4af37 !important;
  padding: 5px 6px !important;
  font-size: 11.5px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.3px;
  border-bottom: 2px solid #5c4734 !important;
  border-top: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.table-paaet-saldos thead th.text-center {
  text-align: center !important;
}

.table-paaet-saldos tbody td.text-center,
.table-paaet-saldos tfoot td.text-center {
  text-align: center !important;
}

.table-paaet-saldos thead th.th-sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.table-paaet-saldos thead th.th-sortable:hover {
  background-color: #241c16 !important;
}

.table-paaet-saldos thead th .sort-icon {
  font-size: 0.85em;
  margin-left: 3px;
  opacity: 0.8;
  display: inline-block;
}

.table-paaet-saldos thead th .sort-icon.active {
  opacity: 1;
  font-weight: 900;
  color: #fef08a !important;
}

.table-paaet-saldos thead th .header-filter-btn {
  font-size: 9px;
  margin-left: 3px;
  opacity: 0.75;
  display: inline-block;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.table-paaet-saldos thead th .header-filter-btn:hover {
  opacity: 1;
}

.table-paaet-saldos tbody tr {
  background-color: #14110f !important;
  border-bottom: 1px solid #2a2017 !important;
  transition: background-color 0.1s ease;
  height: 27px !important;
}

.table-paaet-saldos tbody tr:nth-child(even) {
  background-color: #171310 !important;
}

.table-paaet-saldos tbody tr:hover {
  background-color: rgba(212, 175, 55, 0.12) !important;
}

.table-paaet-saldos tbody td {
  padding: 3px 6px !important;
  color: #ffffff !important;
  white-space: nowrap;
  vertical-align: middle;
  border-bottom: 1px solid #2a2017 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.table-paaet-saldos tbody td.saldos-alias-col {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.2px;
}

.table-paaet-saldos tbody td:first-child,
.table-paaet-saldos tbody td.saldos-index-col {
  color: #cbd5e1 !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  padding: 3px 4px !important;
  width: 32px !important;
  max-width: 36px !important;
}

.table-paaet-saldos tbody td.font-monospace {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, ui-monospace !important;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.15px;
  color: #ffffff !important;
}

.saldos-table-pill-negativo {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid rgba(220, 38, 38, 0.25) !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
  display: inline-block !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, ui-monospace !important;
  font-variant-numeric: tabular-nums lining-nums;
  text-align: center;
  min-width: auto !important;
  box-shadow: none !important;
}

html.dark .saldos-table-pill-negativo,
body.theme-dark .saldos-table-pill-negativo {
  background-color: rgba(239, 68, 68, 0.22) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

html:not(.dark) .saldos-table-pill-negativo,
html.light .saldos-table-pill-negativo,
body.theme-light .saldos-table-pill-negativo {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid rgba(220, 38, 38, 0.25) !important;
}

.saldos-num-positivo {
  font-weight: 700 !important;
  font-size: 13px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, ui-monospace !important;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.15px;
}
html.dark .saldos-num-positivo,
body.theme-dark .saldos-num-positivo {
  color: #ffffff !important;
}
html:not(.dark) .saldos-num-positivo,
html.light .saldos-num-positivo,
body.theme-light .saldos-num-positivo {
  color: #000000 !important;
}

.saldos-num-cero {
  font-weight: 700 !important;
  font-size: 13px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, ui-monospace !important;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.15px;
}
html.dark .saldos-num-cero,
body.theme-dark .saldos-num-cero {
  color: #cbd5e1 !important;
}
html:not(.dark) .saldos-num-cero,
html.light .saldos-num-cero,
body.theme-light .saldos-num-cero {
  color: #0f172a !important;
}

.table-paaet-saldos tfoot,
.table-paaet-saldos tfoot tr {
  position: sticky;
  bottom: 0;
  z-index: 28;
}

.table-paaet-saldos tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 28;
  padding: 4px 6px !important;
  font-size: 13.5px !important;
  font-weight: 900 !important;
  white-space: nowrap;
  vertical-align: middle;
  background-color: #1c1714 !important;
  color: #ffffff !important;
  border-top: 2px solid #5c4734 !important;
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.6) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, ui-monospace !important;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.2px;
}

.table-paaet-saldos tfoot td.saldos-totales-label,
.table-paaet-saldos tfoot td:first-child {
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px;
}

/* Botones de Acción PAAET por Fila Compactos */
.saldos-row-btn {
  width: 23px !important;
  height: 23px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #1c1714 !important;
  border: 1px solid #443527 !important;
  border-radius: 3px !important;
  color: #d8caa8 !important;
  cursor: pointer !important;
  font-size: 10.5px !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
}

.saldos-row-btn:hover {
  background-color: #241c16 !important;
  color: #ffffff !important;
  border-color: var(--paaet-gold, #d4af37) !important;
  transform: translateY(-1px);
}

.saldos-row-btn.btn-delete {
  color: #ef4444 !important;
}

.saldos-row-btn.btn-delete:hover {
  background-color: rgba(239, 68, 68, 0.22) !important;
  color: #f87171 !important;
  border-color: #ef4444 !important;
}

/* ==========================================================================
   TABLA SALDOS PAAET SYSTEM EN MODO DÍA (MÁRMOL & CHAMPÁN)
   ========================================================================== */
html:not(.dark) .saldos-table-wrapper,
html.light .saldos-table-wrapper,
body.theme-light .saldos-table-wrapper {
  background-color: #fdfcf9 !important;
  border: 1px solid #d8caa8 !important;
  box-shadow: 0 4px 18px rgba(44, 36, 28, 0.08) !important;
  scrollbar-color: #9d7830 #ece2ce !important;
}

html:not(.dark) .saldos-table-wrapper::-webkit-scrollbar-track,
html.light .saldos-table-wrapper::-webkit-scrollbar-track,
body.theme-light .saldos-table-wrapper::-webkit-scrollbar-track,
html:not(.dark) #tablaPAAETScrollContainer::-webkit-scrollbar-track,
html.light #tablaPAAETScrollContainer::-webkit-scrollbar-track,
body.theme-light #tablaPAAETScrollContainer::-webkit-scrollbar-track {
  background: #ece2ce !important;
  border-left: 1px solid #d8caa8 !important;
  border-top: 1px solid #d8caa8 !important;
}

html:not(.dark) .saldos-table-wrapper::-webkit-scrollbar-thumb,
html.light .saldos-table-wrapper::-webkit-scrollbar-thumb,
body.theme-light .saldos-table-wrapper::-webkit-scrollbar-thumb,
html:not(.dark) #tablaPAAETScrollContainer::-webkit-scrollbar-thumb,
html.light #tablaPAAETScrollContainer::-webkit-scrollbar-thumb,
body.theme-light #tablaPAAETScrollContainer::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #bfa061 0%, #8e6d2b 100%) !important;
  border: 2px solid #ece2ce !important;
  border-radius: 7px;
}

html:not(.dark) .saldos-table-wrapper::-webkit-scrollbar-thumb:hover,
html.light .saldos-table-wrapper::-webkit-scrollbar-thumb:hover,
body.theme-light .saldos-table-wrapper::-webkit-scrollbar-thumb:hover,
html:not(.dark) #tablaPAAETScrollContainer::-webkit-scrollbar-thumb:hover,
html.light #tablaPAAETScrollContainer::-webkit-scrollbar-thumb:hover,
body.theme-light #tablaPAAETScrollContainer::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d4af37 0%, #a47f34 100%) !important;
}

html:not(.dark) .saldos-table-wrapper::-webkit-scrollbar-corner,
html.light .saldos-table-wrapper::-webkit-scrollbar-corner,
body.theme-light .saldos-table-wrapper::-webkit-scrollbar-corner {
  background: #ece2ce !important;
}

html:not(.dark) .table-paaet-saldos,
html.light .table-paaet-saldos,
body.theme-light .table-paaet-saldos {
  background-color: #fdfcf9 !important;
  color: #19140e !important;
}

html:not(.dark) .table-paaet-saldos thead th,
html.light .table-paaet-saldos thead th,
body.theme-light .table-paaet-saldos thead th {
  background-color: #ece2ce !important;
  color: #19140e !important;
  border-bottom: 2px solid #c5a059 !important;
  padding: 5px 6px !important;
  font-size: 11.5px !important;
}

html:not(.dark) .table-paaet-saldos thead th.th-sortable:hover,
html.light .table-paaet-saldos thead th.th-sortable:hover,
body.theme-light .table-paaet-saldos thead th.th-sortable:hover {
  background-color: #dfd4be !important;
}

html:not(.dark) .table-paaet-saldos tbody tr,
html.light .table-paaet-saldos tbody tr,
body.theme-light .table-paaet-saldos tbody tr {
  background-color: #fdfcf9 !important;
  border-bottom: 1px solid #e8dfd3 !important;
  height: 27px !important;
}

html:not(.dark) .table-paaet-saldos tbody tr:nth-child(even),
html.light .table-paaet-saldos tbody tr:nth-child(even),
body.theme-light .table-paaet-saldos tbody tr:nth-child(even) {
  background-color: #f7f1e6 !important;
}

html:not(.dark) .table-paaet-saldos tbody tr:hover,
html.light .table-paaet-saldos tbody tr:hover,
body.theme-light .table-paaet-saldos tbody tr:hover {
  background-color: #ebe2d3 !important;
}

html:not(.dark) .table-paaet-saldos tbody td,
html.light .table-paaet-saldos tbody td,
body.theme-light .table-paaet-saldos tbody td {
  color: #000000 !important;
  border-bottom: 1px solid #e8dfd3 !important;
  font-size: 13px !important;
  padding: 3px 6px !important;
  line-height: 1.2 !important;
}

html:not(.dark) .table-paaet-saldos tbody td.saldos-alias-col,
html.light .table-paaet-saldos tbody td.saldos-alias-col,
body.theme-light .table-paaet-saldos tbody td.saldos-alias-col {
  color: #000000 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

html:not(.dark) .table-paaet-saldos tbody td:first-child,
html:not(.dark) .table-paaet-saldos tbody td.saldos-index-col,
html.light .table-paaet-saldos tbody td:first-child,
html.light .table-paaet-saldos tbody td.saldos-index-col,
body.theme-light .table-paaet-saldos tbody td:first-child,
body.theme-light .table-paaet-saldos tbody td.saldos-index-col {
  color: #334155 !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  padding: 3px 4px !important;
  width: 32px !important;
  max-width: 36px !important;
}

html:not(.dark) .table-paaet-saldos tbody td.font-monospace,
html.light .table-paaet-saldos tbody td.font-monospace,
body.theme-light .table-paaet-saldos tbody td.font-monospace {
  color: #000000 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.15px;
}

html:not(.dark) .table-paaet-saldos tfoot,
html:not(.dark) .table-paaet-saldos tfoot tr,
html.light .table-paaet-saldos tfoot,
html.light .table-paaet-saldos tfoot tr,
body.theme-light .table-paaet-saldos tfoot,
body.theme-light .table-paaet-saldos tfoot tr {
  position: sticky;
  bottom: 0;
  z-index: 28;
}

html:not(.dark) .table-paaet-saldos tfoot td,
html.light .table-paaet-saldos tfoot td,
body.theme-light .table-paaet-saldos tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 28;
  background-color: #eae1d2 !important;
  color: #000000 !important;
  font-weight: 900 !important;
  font-size: 13.5px !important;
  padding: 4px 6px !important;
  border-top: 2px solid #bfa068 !important;
  box-shadow: 0 -3px 8px rgba(44, 36, 28, 0.15) !important;
}

html:not(.dark) .table-paaet-saldos tfoot td.saldos-totales-label,
html:not(.dark) .table-paaet-saldos tfoot td:first-child,
html.light .table-paaet-saldos tfoot td.saldos-totales-label,
html.light .table-paaet-saldos tfoot td:first-child,
body.theme-light .table-paaet-saldos tfoot td.saldos-totales-label,
body.theme-light .table-paaet-saldos tfoot td:first-child {
  color: #000000 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

html:not(.dark) .saldos-row-btn,
html.light .saldos-row-btn,
body.theme-light .saldos-row-btn {
  background-color: #fdfbf7 !important;
  border: 1px solid #cfc2b2 !important;
  color: #55483a !important;
  width: 23px !important;
  height: 23px !important;
  font-size: 10.5px !important;
}

html:not(.dark) .saldos-row-btn:hover,
html.light .saldos-row-btn:hover,
body.theme-light .saldos-row-btn:hover {
  background-color: #ebe2d3 !important;
  color: #19140e !important;
  border-color: #9a7218 !important;
}

/* ==========================================================================
   REFUERZO MODO NOCHE EXCLUSIVO (CUERO OBSIDIANA & ORO CÁLIDO)
   ========================================================================== */
html.dark .saldos-table-wrapper,
body.theme-dark .saldos-table-wrapper {
  background-color: #14110f !important;
  border: 1px solid #443527 !important;
  scrollbar-color: #c5a059 #14110f !important;
}

html.dark .saldos-table-wrapper::-webkit-scrollbar-track,
body.theme-dark .saldos-table-wrapper::-webkit-scrollbar-track {
  background: #14110f !important;
  border-left: 1px solid #3d2f23 !important;
  border-top: 1px solid #3d2f23 !important;
}

html.dark .saldos-table-wrapper::-webkit-scrollbar-thumb,
body.theme-dark .saldos-table-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c5a059 0%, #9a7638 100%) !important;
  border: 2px solid #14110f !important;
  border-radius: 7px;
}

html.dark .table-paaet-saldos,
body.theme-dark .table-paaet-saldos {
  background-color: #14110f !important;
  color: #eae2d5 !important;
}

html.dark .table-paaet-saldos thead th,
body.theme-dark .table-paaet-saldos thead th {
  background-color: #1c1714 !important;
  color: #d4af37 !important;
  border-bottom: 2px solid #5c4734 !important;
  padding: 5px 6px !important;
  font-size: 11.5px !important;
}

html.dark .table-paaet-saldos thead th.th-sortable:hover,
body.theme-dark .table-paaet-saldos thead th.th-sortable:hover {
  background-color: #241c16 !important;
}

html.dark .table-paaet-saldos tbody tr,
body.theme-dark .table-paaet-saldos tbody tr {
  background-color: #14110f !important;
  border-bottom: 1px solid #2a2017 !important;
  height: 27px !important;
}

html.dark .table-paaet-saldos tbody tr:nth-child(even),
body.theme-dark .table-paaet-saldos tbody tr:nth-child(even) {
  background-color: #171310 !important;
}

html.dark .table-paaet-saldos tbody tr:hover,
body.theme-dark .table-paaet-saldos tbody tr:hover {
  background-color: rgba(212, 175, 55, 0.12) !important;
}

html.dark .table-paaet-saldos tbody td,
body.theme-dark .table-paaet-saldos tbody td {
  color: #ffffff !important;
  border-bottom: 1px solid #2a2017 !important;
  font-size: 13px !important;
  padding: 3px 6px !important;
  line-height: 1.2 !important;
}

html.dark .table-paaet-saldos tbody td.saldos-alias-col,
body.theme-dark .table-paaet-saldos tbody td.saldos-alias-col {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

html.dark .table-paaet-saldos tbody td:first-child,
html.dark .table-paaet-saldos tbody td.saldos-index-col,
body.theme-dark .table-paaet-saldos tbody td:first-child,
body.theme-dark .table-paaet-saldos tbody td.saldos-index-col {
  color: #94a3b8 !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  padding: 3px 4px !important;
  width: 32px !important;
  max-width: 36px !important;
}

html.dark .table-paaet-saldos tbody td.font-monospace,
body.theme-dark .table-paaet-saldos tbody td.font-monospace {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.15px;
}

html.dark .table-paaet-saldos tfoot,
html.dark .table-paaet-saldos tfoot tr,
body.theme-dark .table-paaet-saldos tfoot,
body.theme-dark .table-paaet-saldos tfoot tr {
  position: sticky;
  bottom: 0;
  z-index: 28;
}

html.dark .table-paaet-saldos tfoot td,
body.theme-dark .table-paaet-saldos tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 28;
  background-color: #1c1714 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 13.5px !important;
  padding: 4px 6px !important;
  border-top: 2px solid #5c4734 !important;
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.75) !important;
}

html.dark .table-paaet-saldos tfoot td.saldos-totales-label,
html.dark .table-paaet-saldos tfoot td:first-child,
body.theme-dark .table-paaet-saldos tfoot td.saldos-totales-label,
body.theme-dark .table-paaet-saldos tfoot td:first-child {
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

html.dark .saldos-row-btn,
body.theme-dark .saldos-row-btn {
  background-color: #1c1714 !important;
  border: 1px solid #443527 !important;
  color: #d8caa8 !important;
  width: 23px !important;
  height: 23px !important;
  font-size: 10.5px !important;
}

html.dark .saldos-row-btn:hover,
body.theme-dark .saldos-row-btn:hover {
  background-color: #241c16 !important;
  color: #ffffff !important;
  border-color: var(--paaet-gold, #d4af37) !important;
}

/* Footer PAAET */
.saldos-footer {
  font-size: 12px;
  color: var(--paaet-muted, #7a6d5f);
  padding: 8px 4px;
}

.saldos-footer-total {
  font-weight: 600;
  color: var(--paaet-text, #2c241c);
}

.saldos-footer-shortcuts {
  color: var(--paaet-muted, #7a6d5f);
  font-size: 11.5px;
}

.saldos-kbd {
  background: var(--paaet-sidebar-bg, #efe8dc);
  border: 1px solid var(--paaet-input-border, #cfc2b2);
  border-radius: 4px;
  padding: 2px 5px;
  font-family: monospace;
  font-size: 10.5px;
  color: var(--paaet-text, #2c241c);
}

/* ==========================================================================
   MODO OSCURO PARA SALDOS PAAET
   ========================================================================== */
html.dark .saldos-page-title,
body.theme-dark .saldos-page-title {
  color: var(--paaet-heading, #ffffff) !important;
}

html.dark .saldos-page-subtitle,
body.theme-dark .saldos-page-subtitle {
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .saldos-filter-label,
body.theme-dark .saldos-filter-label {
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .saldos-select,
body.theme-dark .saldos-select,
html.dark .saldos-date-input,
body.theme-dark .saldos-date-input {
  background-color: var(--paaet-input-bg, #120f0d) !important;
  border-color: var(--paaet-border, #443527) !important;
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .saldos-select:focus,
body.theme-dark .saldos-select:focus,
html.dark .saldos-date-input:focus,
body.theme-dark .saldos-date-input:focus {
  border-color: var(--paaet-gold, #d4af37) !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25) !important;
}

html.dark .btn-saldos-toolbar,
body.theme-dark .btn-saldos-toolbar {
  background-color: var(--paaet-card, #1c1714) !important;
  border-color: var(--paaet-border, #443527) !important;
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .btn-saldos-toolbar:hover,
body.theme-dark .btn-saldos-toolbar:hover {
  background-color: rgba(212, 175, 55, 0.15) !important;
  border-color: var(--paaet-gold, #d4af37) !important;
  color: var(--paaet-gold, #d4af37) !important;
}

html.dark .saldos-search-input,
body.theme-dark .saldos-search-input {
  background-color: var(--paaet-input-bg, #120f0d) !important;
  border-color: var(--paaet-border, #443527) !important;
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .saldos-search-input:focus,
body.theme-dark .saldos-search-input:focus {
  border-color: var(--paaet-gold, #d4af37) !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25) !important;
}

html.dark .saldos-search-clear,
body.theme-dark .saldos-search-clear {
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .saldos-search-clear:hover,
body.theme-dark .saldos-search-clear:hover {
  color: var(--paaet-gold, #d4af37) !important;
}

html.dark .btn-saldos-primary,
body.theme-dark .btn-saldos-primary {
  background-color: var(--paaet-gold, #d4af37) !important;
  color: #14110f !important;
  border: 1px solid #c5a059 !important;
}

html.dark .btn-saldos-primary:hover,
body.theme-dark .btn-saldos-primary:hover {
  background-color: var(--paaet-gold-hover, #b89528) !important;
  color: #14110f !important;
}

html.dark .saldos-card,
body.theme-dark .saldos-card {
  background-color: var(--paaet-card, #1c1714) !important;
  border-color: var(--paaet-border, #443527) !important;
}

html.dark .saldos-card-header,
body.theme-dark .saldos-card-header {
  color: var(--paaet-heading, #ffffff) !important;
}

html.dark .saldos-metric-label,
body.theme-dark .saldos-metric-label {
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .saldos-metric-value,
body.theme-dark .saldos-metric-value {
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .saldos-card-actions,
body.theme-dark .saldos-card-actions {
  background-color: #15110f !important;
  border-color: var(--paaet-border, #443527) !important;
}

html.dark .saldos-card-action-btn,
body.theme-dark .saldos-card-action-btn {
  border-color: var(--paaet-border, #443527) !important;
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .saldos-card-action-btn:hover,
body.theme-dark .saldos-card-action-btn:hover {
  background-color: rgba(212, 175, 55, 0.12) !important;
  color: var(--paaet-gold, #d4af37) !important;
  border-color: var(--paaet-gold, #d4af37) !important;
}

html.dark .saldos-totales-card,
body.theme-dark .saldos-totales-card {
  background-color: #171310 !important;
  border-color: #d4af37 !important;
}

html.dark .saldos-totales-header,
body.theme-dark .saldos-totales-header {
  color: #d4af37 !important;
}

html.dark .saldos-footer-total,
body.theme-dark .saldos-footer-total {
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .saldos-footer-shortcuts,
body.theme-dark .saldos-footer-shortcuts {
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .saldos-kbd,
body.theme-dark .saldos-kbd {
  background: var(--paaet-card, #1c1714) !important;
  border-color: var(--paaet-border, #443527) !important;
  color: var(--paaet-gold, #d4af37) !important;
}

/* Badge de Volumen Total en Comisión por Días */
.comision-badge-volumen {
  background: rgba(212, 175, 55, 0.15) !important;
  color: #d4af37 !important;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  font-size: 11px !important;
}

html.light .comision-badge-volumen,
html:not(.dark) .comision-badge-volumen,
body.theme-light .comision-badge-volumen {
  background: rgba(154, 114, 24, 0.12) !important;
  color: #805d10 !important;
  border: 1px solid rgba(154, 114, 24, 0.35) !important;
}

/* ==========================================================================
   ESTILOS DE AUDITORÍA (ESTILO PAAET SYSTEM)
   ========================================================================== */
.auditoria-top-tabs-wrapper {
  display: flex;
  gap: 6px;
  border-bottom: none;
}

.auditoria-nav-tab {
  background: var(--paaet-sidebar-bg, #efe8dc);
  border: 1px solid var(--paaet-border, #d8cdbd);
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paaet-muted, #7a6d5f);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auditoria-nav-tab:hover {
  color: var(--paaet-heading, #19140e);
  background: var(--paaet-table-hover, #ebe2d3);
}

.auditoria-nav-tab.active {
  background: var(--paaet-card, #fcf9f2);
  color: var(--paaet-heading, #19140e);
  border-color: var(--paaet-input-border, #cfc2b2);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(44, 36, 28, 0.05);
}

.auditoria-screen-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--paaet-heading, #19140e);
  letter-spacing: -0.01em;
}

.auditoria-pill-badge {
  background: #e0f2fe;
  color: #0284c7;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #bae6fd;
}

.auditoria-updated-wrapper {
  font-size: 12px;
  color: var(--paaet-muted, #7a6d5f);
  font-family: monospace;
}

.auditoria-field-lbl {
  font-size: 12px;
  color: var(--paaet-muted, #7a6d5f);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.auditoria-form-control {
  width: 100%;
  height: 38px;
  border-radius: 6px;
  border: 1px solid var(--paaet-input-border, #cfc2b2);
  background: var(--paaet-input-bg, #fdfbf7);
  color: var(--paaet-text, #2c241c);
  padding: 6px 12px;
  font-size: 13.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auditoria-form-control:focus {
  border-color: var(--paaet-gold);
  outline: none;
  box-shadow: var(--paaet-focus-glow);
}

.auditoria-checkbox-label {
  font-size: 13px;
  color: var(--paaet-text, #2c241c);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.auditoria-counter-liq {
  font-size: 14px;
  font-weight: 700;
  color: var(--paaet-heading, #19140e);
}

.auditoria-counter-mod {
  font-size: 14px;
  font-weight: 700;
  color: #dc2626;
}

.auditoria-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auditoria-race-card {
  background: var(--paaet-card, #fcf9f2);
  border: 1px solid var(--paaet-border, #d8cdbd);
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: 0 1px 3px rgba(44, 36, 28, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auditoria-race-card:hover {
  border-color: var(--paaet-input-border, #cfc2b2);
  box-shadow: 0 2px 6px rgba(44, 36, 28, 0.05);
}

.auditoria-race-card-top {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.auditoria-arrow-icon {
  font-size: 11px;
  color: var(--paaet-muted, #7a6d5f);
  line-height: 1;
}

.auditoria-race-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px 36px;
  margin-bottom: 12px;
}

.auditoria-race-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auditoria-field {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
}

.auditoria-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--paaet-muted, #7a6d5f);
  letter-spacing: 0.5px;
  min-width: 90px;
  text-transform: uppercase;
}

.auditoria-val {
  color: var(--paaet-text, #2c241c);
  font-weight: 600;
}

.auditoria-race-footer {
  margin-top: 6px;
}

.btn-auditoria-ficha {
  width: 100%;
  border: 1px solid var(--paaet-input-border, #cfc2b2);
  background: var(--paaet-input-bg, #fdfbf7);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paaet-text, #2c241c);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-auditoria-ficha:hover {
  background: var(--paaet-table-hover, #ebe2d3);
  border-color: var(--paaet-border, #d8cdbd);
  color: #0284c7;
}

.auditoria-eliminados-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auditoria-eliminados-card {
  background: var(--paaet-card, #fcf9f2);
  border: 1px solid var(--paaet-border, #d8cdbd);
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: 0 1px 3px rgba(44, 36, 28, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Auditoría Timeline & Inline Expansion */
.auditoria-arrow-icon {
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s ease;
  user-select: none;
  font-size: 12px;
  color: var(--paaet-muted, #7a6d5f);
}
.auditoria-arrow-icon.expanded {
  transform: rotate(90deg);
  color: #0284c7 !important;
}
.auditoria-card-timeline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--paaet-border, #d8cdbd);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auditoria-timeline-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auditoria-timeline-row {
  display: grid;
  grid-template-columns: 170px 140px 1fr auto;
  gap: 12px;
  padding: 9px 14px;
  background: var(--paaet-input-bg, #fdfbf7);
  border: 1px solid var(--paaet-border, #d8cdbd);
  border-radius: 6px;
  align-items: center;
  font-size: 13px;
  transition: all 0.15s ease;
}
@media (max-width: 768px) {
  .auditoria-timeline-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
.auditoria-timeline-row.is-post-liq {
  border-color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.05) !important;
}
.alert-tag-postliq {
  background: #dc2626;
  color: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  display: inline-block;
  margin-top: 2px;
  letter-spacing: 0.3px;
}
.btn-auditoria-detail {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--paaet-border, #d8cdbd);
  background: var(--paaet-card, #fcf9f2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--paaet-heading, #19140e);
  transition: all 0.15s ease;
}
.btn-auditoria-detail:hover {
  background: var(--paaet-table-hover, #ebe2d3);
  color: #0284c7;
  border-color: #0284c7;
}
.code-action-tag {
  font-family: monospace;
  font-size: 11.5px;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.timeline-cell {
  background: var(--paaet-table-hover, #ebe2d3) !important;
  padding: 12px 16px !important;
}
.tr-alerta-auditoria {
  background-color: #fff1f2 !important;
}
html.dark .tr-alerta-auditoria,
body.theme-dark .tr-alerta-auditoria {
  background-color: rgba(220, 38, 38, 0.14) !important;
}
.tr-clickable {
  cursor: pointer;
}
.badge-alerta-auditoria {
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  width: 26px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.3);
}
.btn-auditoria-ficha-tabla {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-auditoria-ficha-tabla:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}
html.dark .btn-auditoria-ficha-tabla,
body.theme-dark .btn-auditoria-ficha-tabla {
  background: var(--paaet-card, #1c1714);
  border-color: var(--paaet-border, #443527);
  color: var(--paaet-text, #eae2d5);
}
html.dark .btn-auditoria-ficha-tabla:hover,
body.theme-dark .btn-auditoria-ficha-tabla:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--paaet-gold, #d4af37);
  color: var(--paaet-gold, #d4af37);
}

/* Modals Auditoría */
.ficha-resultados-box {
  background: var(--paaet-input-bg, #fdfbf7);
  border: 1px solid var(--paaet-border, #d8cdbd);
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}
.ficha-row-anulada {
  background: rgba(220, 38, 38, 0.06) !important;
  text-decoration: line-through;
  text-decoration-color: rgba(220, 38, 38, 0.5);
  color: #dc2626 !important;
}
.ficha-row-agregada {
  background: rgba(37, 99, 235, 0.07) !important;
  border-left: 3px solid #2563eb !important;
}
.badge-nueva-jugada {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-left: 4px;
}
.tech-payload-box {
  background: var(--paaet-input-bg, #120f0d);
  color: #eae2d5;
  font-family: monospace;
  font-size: 11.5px;
  border-radius: 6px;
  padding: 12px;
  max-height: 250px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--paaet-border, #443527);
}
.detalle-cabecera-box {
  background: var(--paaet-input-bg, #fdfbf7);
  border: 1px solid var(--paaet-border, #d8cdbd);
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}


/* ==========================================================================
   AUDITORÍA - DARK MODE SUPPORT
   ========================================================================== */
html.dark .auditoria-nav-tab,
body.theme-dark .auditoria-nav-tab {
  background: var(--paaet-card, #1c1714) !important;
  border-color: var(--paaet-border, #443527) !important;
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .auditoria-nav-tab:hover,
body.theme-dark .auditoria-nav-tab:hover {
  background: rgba(212, 175, 55, 0.12) !important;
  color: var(--paaet-gold, #d4af37) !important;
}

html.dark .auditoria-nav-tab.active,
body.theme-dark .auditoria-nav-tab.active {
  background: #241c16 !important;
  color: #d4af37 !important;
  border-color: #d4af37 !important;
}

html.dark .auditoria-screen-title,
body.theme-dark .auditoria-screen-title {
  color: var(--paaet-heading, #ffffff) !important;
}

html.dark .auditoria-pill-badge,
body.theme-dark .auditoria-pill-badge {
  background: rgba(212, 175, 55, 0.15) !important;
  color: #d4af37 !important;
  border-color: rgba(212, 175, 55, 0.35) !important;
}

html.dark .auditoria-updated-wrapper,
body.theme-dark .auditoria-updated-wrapper {
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .auditoria-field-lbl,
body.theme-dark .auditoria-field-lbl {
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .auditoria-form-control,
body.theme-dark .auditoria-form-control {
  background: var(--paaet-input-bg, #120f0d) !important;
  border-color: var(--paaet-input-border, #443527) !important;
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .auditoria-form-control:focus,
body.theme-dark .auditoria-form-control:focus {
  border-color: var(--paaet-gold, #d4af37) !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25) !important;
}

html.dark .auditoria-checkbox-label,
body.theme-dark .auditoria-checkbox-label {
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .auditoria-counter-liq,
body.theme-dark .auditoria-counter-liq {
  color: var(--paaet-heading, #ffffff) !important;
}

html.dark .auditoria-race-card,
body.theme-dark .auditoria-race-card {
  background: var(--paaet-card, #1c1714) !important;
  border-color: var(--paaet-border, #443527) !important;
  box-shadow: none !important;
}

html.dark .auditoria-race-card:hover,
body.theme-dark .auditoria-race-card:hover {
  border-color: var(--paaet-border-gold, #5c4734) !important;
}

html.dark .auditoria-arrow-icon,
body.theme-dark .auditoria-arrow-icon {
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .auditoria-lbl,
body.theme-dark .auditoria-lbl {
  color: var(--paaet-muted, #a89c8d) !important;
}

html.dark .auditoria-val,
body.theme-dark .auditoria-val {
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .btn-auditoria-ficha,
body.theme-dark .btn-auditoria-ficha {
  background: var(--paaet-card, #1c1714) !important;
  border-color: var(--paaet-border, #443527) !important;
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .btn-auditoria-ficha:hover,
body.theme-dark .btn-auditoria-ficha:hover {
  background: rgba(212, 175, 55, 0.12) !important;
  border-color: var(--paaet-gold, #d4af37) !important;
  color: var(--paaet-gold, #d4af37) !important;
}

html.dark .auditoria-eliminados-card,
body.theme-dark .auditoria-eliminados-card {
  background: var(--paaet-card, #1c1714) !important;
  border-color: var(--paaet-border, #443527) !important;
}

html.dark .auditoria-timeline-row,
body.theme-dark .auditoria-timeline-row {
  background: #191411 !important;
  border-color: var(--paaet-border, #443527) !important;
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .auditoria-timeline-row.is-post-liq,
body.theme-dark .auditoria-timeline-row.is-post-liq {
  background: rgba(220, 38, 38, 0.15) !important;
  border-color: #ef4444 !important;
}

html.dark .btn-auditoria-detail,
body.theme-dark .btn-auditoria-detail {
  background: var(--paaet-card, #1c1714) !important;
  border-color: var(--paaet-border, #443527) !important;
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .btn-auditoria-detail:hover,
body.theme-dark .btn-auditoria-detail:hover {
  background: rgba(212, 175, 55, 0.12) !important;
  border-color: var(--paaet-gold, #d4af37) !important;
  color: var(--paaet-gold, #d4af37) !important;
}

html.dark .code-action-tag,
body.theme-dark .code-action-tag {
  background: rgba(212, 175, 55, 0.12) !important;
  border-color: rgba(212, 175, 55, 0.3) !important;
  color: #d4af37 !important;
}

html.dark .timeline-cell,
body.theme-dark .timeline-cell {
  background: #14110f !important;
  border-color: var(--paaet-border, #443527) !important;
}

html.dark .ficha-resultados-box,
body.theme-dark .ficha-resultados-box,
html.dark .detalle-cabecera-box,
body.theme-dark .detalle-cabecera-box {
  background: #191411 !important;
  border-color: var(--paaet-border, #443527) !important;
  color: var(--paaet-text, #eae2d5) !important;
}

html.dark .ficha-row-anulada,
body.theme-dark .ficha-row-anulada {
  background: rgba(220, 38, 38, 0.15) !important;
  color: #f87171 !important;
}

html.dark .ficha-row-agregada,
body.theme-dark .ficha-row-agregada {
  background: rgba(37, 99, 235, 0.15) !important;
  border-left: 3px solid #3b82f6 !important;
}


/* ==========================================================================
   MÓDULO REPORTES PAAET (ESTILO OFICIAL EXACTO)
   ========================================================================== */
.reporte-config-card {
  background: var(--paaet-card, #1c1714);
  border: 1px solid var(--paaet-border, #443527);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 20px;
  max-width: 820px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.reporte-config-title {
  color: var(--paaet-heading, #ffffff);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.reporte-config-label {
  color: var(--paaet-muted, #a89c8d);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

.reporte-config-input {
  background: var(--paaet-input-bg) !important;
  border: 1px solid var(--paaet-input-border) !important;
  color: var(--paaet-input-text) !important;
  border-radius: 6px !important;
  font-size: 13.5px !important;
  padding: 7px 12px !important;
}

.reporte-config-input:focus {
  border-color: var(--paaet-primary) !important;
  box-shadow: var(--paaet-focus-glow) !important;
}

.reporte-btn-cancelar {
  background: var(--paaet-card, #1c1714) !important;
  border: 1px solid var(--paaet-border, #443527) !important;
  color: var(--paaet-text, #eae2d5) !important;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.15s ease;
}

.reporte-btn-cancelar:hover {
  background: rgba(212, 175, 55, 0.12) !important;
  border-color: var(--paaet-gold, #d4af37) !important;
  color: var(--paaet-gold, #d4af37) !important;
}

.reporte-btn-consultar {
  background: var(--paaet-gold) !important;
  border: 1px solid #c5a059 !important;
  color: #14110f !important;
  font-weight: 700;
  padding: 6px 22px;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.15s ease;
}

.reporte-btn-consultar:hover {
  background: var(--paaet-gold-hover) !important;
}

html:not(.dark) .reporte-btn-consultar,
html.light .reporte-btn-consultar,
body.theme-light .reporte-btn-consultar {
  background: #9a7218 !important;
  border: 1px solid #805d10 !important;
  color: #ffffff !important;
}

/* Tabla de Reportes PAAET */
.reporte-table-card {
  background: #14110f;
  border: 1px solid #443527;
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.table-reporte-paaet {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
  color: #eae2d5;
  font-size: 12.5px;
}

.table-reporte-paaet thead th {
  background: #1c1714 !important;
  color: #d4af37 !important;
  font-weight: 700;
  padding: 9px 12px;
  border-bottom: 2px solid #5c4734;
  white-space: nowrap;
  user-select: none;
}

.table-reporte-paaet thead th.sortable {
  cursor: pointer;
}

.table-reporte-paaet thead th.sortable:hover {
  background: #241c16 !important;
}

.table-reporte-paaet tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #2a2017;
  background: #14110f;
  color: #eae2d5;
  vertical-align: middle;
}

.table-reporte-paaet tbody tr:hover td {
  background: rgba(212, 175, 55, 0.08) !important;
}

.reporte-badge-csv {
  background: #059669;
  border: 1px solid #047857;
  color: white;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.reporte-badge-csv:hover {
  opacity: 0.9;
}

.reporte-badge-pdf {
  background: #dc2626;
  border: 1px solid #b91c1c;
  color: white;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.reporte-badge-pdf:hover {
  opacity: 0.9;
}

/* Reportes en Modo Día (Sepia) */
html:not(.dark) .reporte-config-card,
html.light .reporte-config-card,
body.theme-light .reporte-config-card {
  background: #fcf9f2 !important;
  border: 1px solid #d8cdbd !important;
  box-shadow: 0 4px 18px rgba(44, 36, 28, 0.06) !important;
}

html:not(.dark) .reporte-config-title,
html.light .reporte-config-title,
body.theme-light .reporte-config-title {
  color: #19140e !important;
}

html:not(.dark) .reporte-config-label,
html.light .reporte-config-label,
body.theme-light .reporte-config-label {
  color: #55483a !important;
}

html:not(.dark) .reporte-config-input,
html.light .reporte-config-input,
body.theme-light .reporte-config-input {
  background: #fdfbf7 !important;
  border: 1px solid #cfc2b2 !important;
  color: #2c241c !important;
}

html:not(.dark) .reporte-btn-cancelar,
html.light .reporte-btn-cancelar,
body.theme-light .reporte-btn-cancelar {
  background: #efe8dc !important;
  border: 1px solid #cfc2b2 !important;
  color: #44372c !important;
}

html:not(.dark) .reporte-table-card,
html.light .reporte-table-card,
body.theme-light .reporte-table-card {
  background: #fcf9f2 !important;
  border: 1px solid #d8cdbd !important;
  box-shadow: 0 4px 20px rgba(44, 36, 28, 0.06) !important;
}

html:not(.dark) .table-reporte-paaet,
html.light .table-reporte-paaet,
body.theme-light .table-reporte-paaet {
  color: #2c241c !important;
}

html:not(.dark) .table-reporte-paaet thead th,
html.light .table-reporte-paaet thead th,
body.theme-light .table-reporte-paaet thead th {
  background: #ece2ce !important;
  color: #19140e !important;
  border-bottom: 2px solid #c5a059 !important;
}

html:not(.dark) .table-reporte-paaet thead th.sortable:hover,
html.light .table-reporte-paaet thead th.sortable:hover,
body.theme-light .table-reporte-paaet thead th.sortable:hover {
  background: #dfd4be !important;
}

html:not(.dark) .table-reporte-paaet tbody td,
html.light .table-reporte-paaet tbody td,
body.theme-light .table-reporte-paaet tbody td {
  background: #fcf9f2 !important;
  color: #2c241c !important;
  border-bottom: 1px solid #e8dfd3 !important;
}

html:not(.dark) .table-reporte-paaet tbody tr:nth-child(even) td,
html.light .table-reporte-paaet tbody tr:nth-child(even) td,
body.theme-light .table-reporte-paaet tbody tr:nth-child(even) td {
  background: #f7f1e6 !important;
}

html:not(.dark) .table-reporte-paaet tbody tr:hover td,
html.light .table-reporte-paaet tbody tr:hover td,
body.theme-light .table-reporte-paaet tbody tr:hover td {
  background: #ebe2d3 !important;
}

/* ==========================================================================
   PAAET AUTOCOMPLETE ELEGANTE DE JUGADORES (REEMPLAZO TOTAL DE DATALIST NATIVO)
   ========================================================================== */
.paaet-player-autocomplete-dropdown {
  position: fixed;
  background: #1c1714;
  border: 1px solid #443527;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  max-height: 290px;
  overflow-y: auto;
  width: max-content;
  min-width: 280px;
  max-width: 400px;
  display: none;
  z-index: 999999;
  font-family: inherit;
  animation: paaetAutoFadeIn 0.12s ease-out;
}

@keyframes paaetAutoFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.paaet-auto-header {
  padding: 6px 12px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a89c8d;
  background: #14110f;
  border-bottom: 1px solid #33281e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 2;
}

.paaet-auto-item {
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.1s ease;
  user-select: none;
}

.paaet-auto-item:last-child {
  border-bottom: none;
}

.paaet-auto-item:hover,
.paaet-auto-item.active {
  background: rgba(212, 175, 55, 0.15);
  border-left: 3px solid #d4af37;
  padding-left: 9px;
}

.paaet-auto-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-grow: 1;
}

.paaet-auto-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c5a059, #8a6430);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.paaet-auto-avatar.phone-prov {
  background: linear-gradient(135deg, #475569, #64748b);
}

.paaet-auto-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.paaet-auto-alias {
  font-size: 12.5px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paaet-auto-sub {
  font-size: 10.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paaet-auto-badge-atajo {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.paaet-auto-phone {
  font-size: 10px;
  color: #64748b;
}

.paaet-auto-right {
  text-align: right;
  flex-shrink: 0;
}

.paaet-auto-saldo {
  font-size: 11.5px;
  font-family: var(--font-monospace, monospace);
  font-weight: 700;
}

.paaet-auto-saldo.positive {
  color: #10b981;
}

.paaet-auto-saldo.negative {
  color: #ef4444;
}

.paaet-auto-saldo.zero {
  color: #64748b;
}

.paaet-auto-match-hl {
  color: var(--paaet-gold, #d4af37);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Modo Día (Sepia) */
html:not(.dark) .paaet-player-autocomplete-dropdown,
html.light .paaet-player-autocomplete-dropdown,
body.theme-light .paaet-player-autocomplete-dropdown,
html:not(.dark) .paaet-modal-autocomplete-dropdown,
html.light .paaet-modal-autocomplete-dropdown,
body.theme-light .paaet-modal-autocomplete-dropdown {
  background: #fcf9f2 !important;
  border-color: #d8cdbd !important;
  box-shadow: 0 16px 40px rgba(44, 36, 28, 0.18), 0 0 0 1px rgba(154, 114, 24, 0.25) !important;
}

html:not(.dark) .paaet-auto-header,
html.light .paaet-auto-header,
body.theme-light .paaet-auto-header {
  background: #efe8dc !important;
  border-color: #d8cdbd !important;
  color: #7a6d5f !important;
}

html:not(.dark) .paaet-auto-alias,
html.light .paaet-auto-alias,
body.theme-light .paaet-auto-alias {
  color: #19140e !important;
}

html:not(.dark) .paaet-auto-sub,
html.light .paaet-auto-sub,
body.theme-light .paaet-auto-sub {
  color: #7a6d5f !important;
}

html:not(.dark) .paaet-auto-item,
html.light .paaet-auto-item,
body.theme-light .paaet-auto-item {
  border-bottom: 1px solid rgba(44, 36, 28, 0.08) !important;
}

html:not(.dark) .paaet-auto-item:hover,
html:not(.dark) .paaet-auto-item.active,
html.light .paaet-auto-item:hover,
html.light .paaet-auto-item.active,
body.theme-light .paaet-auto-item:hover,
body.theme-light .paaet-auto-item.active {
  background: rgba(154, 114, 24, 0.12) !important;
  border-left: 3px solid #9a7218 !important;
}

/* Scrollbar estilizado para el dropdown */
.paaet-player-autocomplete-dropdown::-webkit-scrollbar {
  width: 6px;
}
.paaet-player-autocomplete-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.paaet-player-autocomplete-dropdown::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}
.paaet-player-autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* Autocomplete integrado para modales PAAET (Pozo, Aval, Retiro, Traslado) */
.paaet-modal-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: #1c1714;
  border: 1px solid #443527;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1075;
  margin-top: 4px;
  font-family: inherit;
  animation: paaetAutoFadeIn 0.12s ease-out;
}

.paaet-modal-autocomplete-dropdown::-webkit-scrollbar {
  width: 6px;
}
.paaet-modal-autocomplete-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.paaet-modal-autocomplete-dropdown::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}
.paaet-modal-autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* ==========================================================================
   GARANTÍA DE AISLAMIENTO: NINGUNA REMINISCENCIA DE LA INTERFAZ ANTERIOR
   Bloquea absolutamente y bajo cualquier circunstancia la interfaz legacy
   ========================================================================== */
#pantallaOperaciones,
#pantallaAjustesMenu,
#pantallaGestionHipodromos,
#pantallaEditarPlanos,
#pantallaTransferencia,
#pantallaMovimientos,
#pantallaAjusteManual,
#pantallaAdminUsuario,
#pantallaCorredores,
#pantallaListaCarreras,
#pantallaListaTotales,
#pantallaJugadores,
#pantallaJugadoresPendientes,
#pantallaPozoMenu,
#pantallaRetirosMenu,
#pantallaBalanceMenu,
#pantallaBalanceDetalle,
#pantallaReportePozo,
#pantallaAgregarPozo,
#pantallaQuitarPozo,
#pantallaDevoluciones,
#pantallaComisionesMenu,
#pantallaComisionesDetalle,
#pantallaTicketTotal,
#pantallaTransmision,
#pantallaAuditoria,
#pantallaTutorial,
#pantallaInicio {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
}

/* Evitar scroll global del body fuera del layout PAAET */
html,
body.dashboard-bg {
  overflow: hidden !important;
  height: 100vh !important;
  width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
}

#layoutPAAET {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

#viewContainerPAAET {
  height: calc(100vh - 52px) !important;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
}

/* ==========================================================================
   CONFIGURACIÓN BOT - ESTILOS VISUALES PAAET
   ========================================================================== */
.vincular-jugador-item {
  padding: 10px 14px;
  border: 1px solid var(--paaet-border, #cfc2b2);
  background: var(--paaet-card, #fcf9f2);
  color: var(--paaet-text, #2c241c);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.vincular-jugador-item:hover {
  border-color: var(--paaet-gold, #d4af37);
  background: rgba(212, 175, 55, 0.08);
}

.vincular-jugador-item.selected {
  border-color: var(--paaet-gold, #d4af37) !important;
  background: rgba(212, 175, 55, 0.16) !important;
  font-weight: 700;
}

.corredor-item-card {
  background: var(--paaet-card, #fcf9f2);
  border: 1px solid var(--paaet-border, #e5dec9);
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.corredor-item-card:hover {
  border-color: var(--paaet-input-border, #cfc2b2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.pendiente-item-card {
  background: var(--paaet-card, #fcf9f2);
  border: 1px solid var(--paaet-border, #e5dec9);
  border-left: 4px solid #f59e0b !important;
  border-radius: 10px;
  padding: 16px;
  transition: all 0.2s ease;
}

.pendiente-item-card:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
}

/* =========================================================================
   SISTEMA DE NOTIFICACIONES PAAET (CAMPANITA, HISTORIAL Y TOASTS EMERGENTES)
   ========================================================================= */

.btn-topbar-bell {
  background: var(--paaet-card) !important;
  border: 1px solid var(--paaet-border) !important;
  color: var(--paaet-text) !important;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.btn-topbar-bell:hover {
  background: var(--paaet-nav-hover) !important;
  color: var(--paaet-warning) !important;
  border-color: var(--paaet-warning) !important;
  transform: translateY(-1px);
}

.paaet-toast-container {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 390px;
  width: calc(100vw - 40px);
  pointer-events: none;
}

.paaet-toast {
  pointer-events: auto;
  background: var(--paaet-card);
  border: 1px solid var(--paaet-border);
  color: var(--paaet-text);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.25);
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  animation: paaetToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes paaetToastSlideIn {
  from {
    opacity: 0;
    transform: translateX(80px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.paaet-toast.toast-movimiento {
  border-left: 5px solid #10b981 !important;
}

.paaet-toast.toast-creacion {
  border-left: 5px solid var(--paaet-gold, #d4af37) !important;
}

.paaet-toast.toast-eliminacion {
  border-left: 5px solid #ef4444 !important;
}

.toast-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.toast-type-pill {
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.toast-time-label {
  font-size: 11px;
  color: var(--paaet-muted);
}

.toast-close-btn {
  background: none;
  border: none;
  color: var(--paaet-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.toast-close-btn:hover {
  color: var(--paaet-text-strong);
}

.toast-title-text {
  font-size: 13.5px;
  display: block;
  margin-bottom: 3px;
  color: var(--paaet-text-strong);
}

.toast-desc-text {
  font-size: 12px;
  color: var(--paaet-text);
  margin-bottom: 6px;
  line-height: 1.35;
}

.toast-user-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--paaet-border);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--paaet-text-strong);
}

.paaet-toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--paaet-primary);
  width: 100%;
  animation: paaetToastProgress 6.5s linear forwards;
}

.toast-movimiento .paaet-toast-progress-bar {
  background: #10b981;
}

.toast-creacion .paaet-toast-progress-bar {
  background: var(--paaet-gold, #d4af37);
}

.toast-eliminacion .paaet-toast-progress-bar {
  background: #ef4444;
}

@keyframes paaetToastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* Panel / Drawer de la Campanita */
.panel-notificaciones-drawer {
  position: fixed;
  top: 54px;
  left: 16px;
  right: auto;
  width: 410px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 75px);
  background: var(--paaet-card) !important;
  border: 1px solid var(--paaet-border) !important;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 5px 15px rgba(0, 0, 0, 0.35);
  z-index: 999990;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: paaetPanelFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes paaetPanelFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.panel-notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--paaet-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-bell-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.btn-close-notif {
  background: none;
  border: none;
  color: var(--paaet-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}
.btn-close-notif:hover {
  color: var(--paaet-text-strong);
}

.panel-notif-filters {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--paaet-border);
  background: rgba(0, 0, 0, 0.08);
  overflow-x: auto;
}

.panel-notif-filters .filter-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--paaet-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s;
}

.panel-notif-filters .filter-btn:hover {
  background: var(--paaet-nav-hover);
  color: var(--paaet-text-strong);
}

.panel-notif-filters .filter-btn.active {
  background: var(--paaet-primary);
  color: #fff;
  border-color: var(--paaet-primary);
}

.filter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.panel-notif-body {
  padding: 10px 14px;
  overflow-y: auto;
  max-height: 480px;
  flex: 1;
}

.notif-card-item {
  background: var(--paaet-card);
  border-color: var(--paaet-border) !important;
  transition: transform 0.15s ease, background 0.15s ease;
}

.notif-card-item:hover {
  background: var(--paaet-nav-hover);
  transform: translateX(2px);
}

.notif-card-item.notif-item-nueva {
  border-left: 3px solid var(--paaet-primary) !important;
}

.notif-icon-circle {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.notif-user-pill {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--paaet-border);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--paaet-text);
  display: inline-flex;
  align-items: center;
}

.notif-dot-unread {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--paaet-primary);
  box-shadow: 0 0 6px var(--paaet-primary);
}

.panel-notif-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--paaet-border);
  background: rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   ESTILOS PAAET: GESTIÓN DE PATROCINADORES Y AFILIADOS
   ========================================================================== */
.patrocinador-config-box {
  background: rgba(245, 158, 11, 0.04) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease-in-out;
}

.patrocinador-config-box:hover {
  border-color: rgba(245, 158, 11, 0.4) !important;
}

#btnModoComisionGlobal.active,
#btnModoComisionPersonalizada.active,
#btnModoComisionGlobalDirecto.active,
#btnModoComisionPersDirecto.active {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #121212 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
  font-weight: 700 !important;
}

#btnModoComisionGlobal:not(.active),
#btnModoComisionPersonalizada:not(.active),
#btnModoComisionGlobalDirecto:not(.active),
#btnModoComisionPersDirecto:not(.active) {
  background: rgba(245, 158, 11, 0.06) !important;
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  font-weight: 600;
}

html:not(.dark) #btnModoComisionGlobal:not(.active),
html:not(.dark) #btnModoComisionPersonalizada:not(.active),
html:not(.dark) #btnModoComisionGlobalDirecto:not(.active),
html:not(.dark) #btnModoComisionPersDirecto:not(.active),
html.light #btnModoComisionGlobal:not(.active),
html.light #btnModoComisionPersonalizada:not(.active),
html.light #btnModoComisionGlobalDirecto:not(.active),
html.light #btnModoComisionPersDirecto:not(.active),
body.theme-light #btnModoComisionGlobal:not(.active),
body.theme-light #btnModoComisionPersonalizada:not(.active),
body.theme-light #btnModoComisionGlobalDirecto:not(.active),
body.theme-light #btnModoComisionPersDirecto:not(.active),
[data-bs-theme="light"] #btnModoComisionGlobal:not(.active),
[data-bs-theme="light"] #btnModoComisionPersonalizada:not(.active),
[data-bs-theme="light"] #btnModoComisionGlobalDirecto:not(.active),
[data-bs-theme="light"] #btnModoComisionPersDirecto:not(.active),
body:not(.theme-dark):not(.dark-mode) #btnModoComisionGlobal:not(.active),
body:not(.theme-dark):not(.dark-mode) #btnModoComisionPersonalizada:not(.active),
body:not(.theme-dark):not(.dark-mode) #btnModoComisionGlobalDirecto:not(.active),
body:not(.theme-dark):not(.dark-mode) #btnModoComisionPersDirecto:not(.active) {
  background: rgba(217, 119, 6, 0.08) !important;
  color: #92400e !important;
  border-color: rgba(217, 119, 6, 0.35) !important;
}

/* ==========================================================================
   TABLA DE AFILIADOS / PATROCINADORES EN MODALES (DÍA & NOCHE CONSISTENTE)
   ========================================================================== */

/* Contenedor exterior de la tabla */
.tabla-afiliados-container {
  background: #171310 !important;
  border: 1px solid #443527 !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25);
}

html:not(.dark) .tabla-afiliados-container,
html.light .tabla-afiliados-container,
body.theme-light .tabla-afiliados-container,
[data-bs-theme="light"] .tabla-afiliados-container,
body:not(.theme-dark):not(.dark-mode) .tabla-afiliados-container {
  background: #fdfcf9 !important;
  border: 1px solid #d8caa8 !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Tabla base */
.tabla-afiliados-modal {
  width: 100%;
  margin-bottom: 0 !important;
  border-collapse: collapse;
}

/* Encabezado */
.tabla-afiliados-modal thead th {
  background: #1f1914 !important;
  color: #d4af37 !important;
  border-bottom: 2px solid #5c4734 !important;
  border-top: none !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 9px 12px !important;
  white-space: nowrap;
}

html:not(.dark) .tabla-afiliados-modal thead th,
html.light .tabla-afiliados-modal thead th,
body.theme-light .tabla-afiliados-modal thead th,
[data-bs-theme="light"] .tabla-afiliados-modal thead th,
body:not(.theme-dark):not(.dark-mode) .tabla-afiliados-modal thead th {
  background: #ede8dc !important;
  color: #19140e !important;
  border-bottom: 2px solid #c5a059 !important;
  border-top: none !important;
}

/* Filas del cuerpo */
.tabla-afiliados-modal tbody tr,
#tbodyAfiliadosModalJugador tr,
#tbodyAfiliadosPatrocinador tr {
  background-color: #1c1714 !important;
  border-bottom: 1px solid rgba(68, 53, 39, 0.5) !important;
  transition: background 0.15s ease;
}

.tabla-afiliados-modal tbody tr:nth-child(even),
#tbodyAfiliadosModalJugador tr:nth-child(even),
#tbodyAfiliadosPatrocinador tr:nth-child(even) {
  background-color: #171310 !important;
}

.tabla-afiliados-modal tbody tr:hover,
#tbodyAfiliadosModalJugador tr:hover,
#tbodyAfiliadosPatrocinador tr:hover {
  background-color: rgba(212, 175, 55, 0.1) !important;
}

html:not(.dark) .tabla-afiliados-modal tbody tr,
html:not(.dark) #tbodyAfiliadosModalJugador tr,
html:not(.dark) #tbodyAfiliadosPatrocinador tr,
html.light .tabla-afiliados-modal tbody tr,
html.light #tbodyAfiliadosModalJugador tr,
html.light #tbodyAfiliadosPatrocinador tr,
body.theme-light .tabla-afiliados-modal tbody tr,
body.theme-light #tbodyAfiliadosModalJugador tr,
body.theme-light #tbodyAfiliadosPatrocinador tr,
[data-bs-theme="light"] .tabla-afiliados-modal tbody tr,
[data-bs-theme="light"] #tbodyAfiliadosModalJugador tr,
[data-bs-theme="light"] #tbodyAfiliadosPatrocinador tr,
body:not(.theme-dark):not(.dark-mode) .tabla-afiliados-modal tbody tr,
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosModalJugador tr,
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosPatrocinador tr {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e8dfcd !important;
}

html:not(.dark) .tabla-afiliados-modal tbody tr:nth-child(even),
html:not(.dark) #tbodyAfiliadosModalJugador tr:nth-child(even),
html:not(.dark) #tbodyAfiliadosPatrocinador tr:nth-child(even),
html.light .tabla-afiliados-modal tbody tr:nth-child(even),
html.light #tbodyAfiliadosModalJugador tr:nth-child(even),
html.light #tbodyAfiliadosPatrocinador tr:nth-child(even),
body.theme-light .tabla-afiliados-modal tbody tr:nth-child(even),
body.theme-light #tbodyAfiliadosModalJugador tr:nth-child(even),
body.theme-light #tbodyAfiliadosPatrocinador tr:nth-child(even),
[data-bs-theme="light"] .tabla-afiliados-modal tbody tr:nth-child(even),
[data-bs-theme="light"] #tbodyAfiliadosModalJugador tr:nth-child(even),
[data-bs-theme="light"] #tbodyAfiliadosPatrocinador tr:nth-child(even),
body:not(.theme-dark):not(.dark-mode) .tabla-afiliados-modal tbody tr:nth-child(even),
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosModalJugador tr:nth-child(even),
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosPatrocinador tr:nth-child(even) {
  background-color: #faf7f0 !important;
}

html:not(.dark) .tabla-afiliados-modal tbody tr:hover,
html:not(.dark) #tbodyAfiliadosModalJugador tr:hover,
html:not(.dark) #tbodyAfiliadosPatrocinador tr:hover,
html.light .tabla-afiliados-modal tbody tr:hover,
html.light #tbodyAfiliadosModalJugador tr:hover,
html.light #tbodyAfiliadosPatrocinador tr:hover,
body.theme-light .tabla-afiliados-modal tbody tr:hover,
body.theme-light #tbodyAfiliadosModalJugador tr:hover,
body.theme-light #tbodyAfiliadosPatrocinador tr:hover,
[data-bs-theme="light"] .tabla-afiliados-modal tbody tr:hover,
[data-bs-theme="light"] #tbodyAfiliadosModalJugador tr:hover,
[data-bs-theme="light"] #tbodyAfiliadosPatrocinador tr:hover,
body:not(.theme-dark):not(.dark-mode) .tabla-afiliados-modal tbody tr:hover,
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosModalJugador tr:hover,
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosPatrocinador tr:hover {
  background-color: rgba(197, 160, 89, 0.15) !important;
}

/* Celdas */
.tabla-afiliados-modal tbody td {
  padding: 7px 12px !important;
  vertical-align: middle !important;
  font-size: 12px;
}

/* Nombre / Alias del afiliado */
.afiliado-nombre-col {
  color: #ffffff !important;
  font-weight: 700;
  letter-spacing: 0.2px;
}

html:not(.dark) .afiliado-nombre-col,
html.light .afiliado-nombre-col,
body.theme-light .afiliado-nombre-col,
[data-bs-theme="light"] .afiliado-nombre-col,
body:not(.theme-dark):not(.dark-mode) .afiliado-nombre-col {
  color: #0f172a !important;
  font-weight: 700;
}

/* Teléfono del afiliado */
.afiliado-tel-col {
  color: #a89c8d !important;
  font-size: 11.5px;
}

html:not(.dark) .afiliado-tel-col,
html.light .afiliado-tel-col,
body.theme-light .afiliado-tel-col,
[data-bs-theme="light"] .afiliado-tel-col,
body:not(.theme-dark):not(.dark-mode) .afiliado-tel-col {
  color: #5c4f42 !important;
  font-size: 11.5px;
}

/* Mensaje vacío */
.afiliados-empty-msg {
  color: #a89c8d !important;
  font-style: italic;
  padding: 16px !important;
}

html:not(.dark) .afiliados-empty-msg,
html.light .afiliados-empty-msg,
body.theme-light .afiliados-empty-msg,
[data-bs-theme="light"] .afiliados-empty-msg,
body:not(.theme-dark):not(.dark-mode) .afiliados-empty-msg {
  color: #5c4f42 !important;
  font-style: italic;
}

/* Inputs de porcentaje en ambas tablas */
#tbodyAfiliadosModalJugador input[type="number"],
#tbodyAfiliadosPatrocinador input[type="number"],
.inp-pct-afiliado-modal,
.inp-pct-afiliado-directo {
  background: #120f0d !important;
  border: 1px solid #443527 !important;
  color: #fbbf24 !important;
  font-weight: 700;
  border-radius: 4px 0 0 4px !important;
}

#tbodyAfiliadosModalJugador input[type="number"]:focus,
#tbodyAfiliadosPatrocinador input[type="number"]:focus,
.inp-pct-afiliado-modal:focus,
.inp-pct-afiliado-directo:focus {
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3) !important;
}

#tbodyAfiliadosModalJugador .input-group-text,
#tbodyAfiliadosPatrocinador .input-group-text {
  background: #1f1914 !important;
  border: 1px solid #443527 !important;
  border-left: none !important;
  color: #d4af37 !important;
  font-weight: 700;
  border-radius: 0 4px 4px 0 !important;
}

/* Modo claro para inputs de porcentaje */
html:not(.dark) #tbodyAfiliadosModalJugador input[type="number"],
html:not(.dark) #tbodyAfiliadosPatrocinador input[type="number"],
html:not(.dark) .inp-pct-afiliado-modal,
html:not(.dark) .inp-pct-afiliado-directo,
html.light #tbodyAfiliadosModalJugador input[type="number"],
html.light #tbodyAfiliadosPatrocinador input[type="number"],
html.light .inp-pct-afiliado-modal,
html.light .inp-pct-afiliado-directo,
body.theme-light #tbodyAfiliadosModalJugador input[type="number"],
body.theme-light #tbodyAfiliadosPatrocinador input[type="number"],
body.theme-light .inp-pct-afiliado-modal,
body.theme-light .inp-pct-afiliado-directo,
[data-bs-theme="light"] #tbodyAfiliadosModalJugador input[type="number"],
[data-bs-theme="light"] #tbodyAfiliadosPatrocinador input[type="number"],
[data-bs-theme="light"] .inp-pct-afiliado-modal,
[data-bs-theme="light"] .inp-pct-afiliado-directo,
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosModalJugador input[type="number"],
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosPatrocinador input[type="number"],
body:not(.theme-dark):not(.dark-mode) .inp-pct-afiliado-modal,
body:not(.theme-dark):not(.dark-mode) .inp-pct-afiliado-directo {
  background: #ffffff !important;
  border: 1px solid #c5a059 !important;
  color: #0f172a !important;
  font-weight: 700;
}

html:not(.dark) #tbodyAfiliadosModalJugador input[type="number"]:focus,
html:not(.dark) #tbodyAfiliadosPatrocinador input[type="number"]:focus,
html:not(.dark) .inp-pct-afiliado-modal:focus,
html:not(.dark) .inp-pct-afiliado-directo:focus,
html.light #tbodyAfiliadosModalJugador input[type="number"]:focus,
html.light #tbodyAfiliadosPatrocinador input[type="number"]:focus,
html.light .inp-pct-afiliado-modal:focus,
html.light .inp-pct-afiliado-directo:focus,
body.theme-light #tbodyAfiliadosModalJugador input[type="number"]:focus,
body.theme-light #tbodyAfiliadosPatrocinador input[type="number"]:focus,
body.theme-light .inp-pct-afiliado-modal:focus,
body.theme-light .inp-pct-afiliado-directo:focus,
[data-bs-theme="light"] #tbodyAfiliadosModalJugador input[type="number"]:focus,
[data-bs-theme="light"] #tbodyAfiliadosPatrocinador input[type="number"]:focus,
[data-bs-theme="light"] .inp-pct-afiliado-modal:focus,
[data-bs-theme="light"] .inp-pct-afiliado-directo:focus,
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosModalJugador input[type="number"]:focus,
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosPatrocinador input[type="number"]:focus,
body:not(.theme-dark):not(.dark-mode) .inp-pct-afiliado-modal:focus,
body:not(.theme-dark):not(.dark-mode) .inp-pct-afiliado-directo:focus {
  border-color: #9a7218 !important;
  box-shadow: 0 0 0 2px rgba(154, 114, 24, 0.25) !important;
  color: #0f172a !important;
}

html:not(.dark) #tbodyAfiliadosModalJugador .input-group-text,
html:not(.dark) #tbodyAfiliadosPatrocinador .input-group-text,
html.light #tbodyAfiliadosModalJugador .input-group-text,
html.light #tbodyAfiliadosPatrocinador .input-group-text,
body.theme-light #tbodyAfiliadosModalJugador .input-group-text,
body.theme-light #tbodyAfiliadosPatrocinador .input-group-text,
[data-bs-theme="light"] #tbodyAfiliadosModalJugador .input-group-text,
[data-bs-theme="light"] #tbodyAfiliadosPatrocinador .input-group-text,
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosModalJugador .input-group-text,
body:not(.theme-dark):not(.dark-mode) #tbodyAfiliadosPatrocinador .input-group-text {
  background: #f8fafc !important;
  border: 1px solid #c5a059 !important;
  border-left: none !important;
  color: #334155 !important;
  font-weight: bold;
}

/* Badge comisión global */
.badge-pct-global {
  background: rgba(212, 175, 55, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
}

html:not(.dark) .badge-pct-global,
html.light .badge-pct-global,
body.theme-light .badge-pct-global,
[data-bs-theme="light"] .badge-pct-global,
body:not(.theme-dark):not(.dark-mode) .badge-pct-global {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #d97706 !important;
}

/* Botón de quitar / basurero */
.btn-quitar-afiliado {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #f87171 !important;
  border-radius: 6px;
  padding: 3px 8px !important;
  line-height: 1;
  transition: all 0.15s ease;
}

.btn-quitar-afiliado:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

html:not(.dark) .btn-quitar-afiliado,
html.light .btn-quitar-afiliado,
body.theme-light .btn-quitar-afiliado,
[data-bs-theme="light"] .btn-quitar-afiliado,
body:not(.theme-dark):not(.dark-mode) .btn-quitar-afiliado {
  background: #fee2e2 !important;
  border: 1px solid #f87171 !important;
  color: #dc2626 !important;
}

html:not(.dark) .btn-quitar-afiliado:hover,
html.light .btn-quitar-afiliado:hover,
body.theme-light .btn-quitar-afiliado:hover,
[data-bs-theme="light"] .btn-quitar-afiliado:hover,
body:not(.theme-dark):not(.dark-mode) .btn-quitar-afiliado:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}

/* Badge de país */
.badge-pais-afiliado {
  background: #171310 !important;
  color: #d4af37 !important;
  border: 1px solid #5c4734 !important;
  font-weight: 600;
}

html:not(.dark) .badge-pais-afiliado,
html.light .badge-pais-afiliado,
body.theme-light .badge-pais-afiliado,
[data-bs-theme="light"] .badge-pais-afiliado,
body:not(.theme-dark):not(.dark-mode) .badge-pais-afiliado {
  background: #ede8dc !important;
  color: #5c4f42 !important;
  border: 1px solid #c5a059 !important;
}

/* Selectores de candidatos para afiliar */
#selCandidatosAfiliadosModal,
#selAgregarAfiliadoDirecto {
  background-color: #120f0d !important;
  color: #eae2d5 !important;
  border: 1px solid #443527 !important;
}

#selCandidatosAfiliadosModal:focus,
#selAgregarAfiliadoDirecto:focus {
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3) !important;
}

html:not(.dark) #selCandidatosAfiliadosModal,
html:not(.dark) #selAgregarAfiliadoDirecto,
html.light #selCandidatosAfiliadosModal,
html.light #selAgregarAfiliadoDirecto,
body.theme-light #selCandidatosAfiliadosModal,
body.theme-light #selAgregarAfiliadoDirecto,
[data-bs-theme="light"] #selCandidatosAfiliadosModal,
[data-bs-theme="light"] #selAgregarAfiliadoDirecto,
body:not(.theme-dark):not(.dark-mode) #selCandidatosAfiliadosModal,
body:not(.theme-dark):not(.dark-mode) #selAgregarAfiliadoDirecto {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #c5a059 !important;
}

html:not(.dark) #selCandidatosAfiliadosModal:focus,
html:not(.dark) #selAgregarAfiliadoDirecto:focus,
html.light #selCandidatosAfiliadosModal:focus,
html.light #selAgregarAfiliadoDirecto:focus,
body.theme-light #selCandidatosAfiliadosModal:focus,
body.theme-light #selAgregarAfiliadoDirecto:focus,
[data-bs-theme="light"] #selCandidatosAfiliadosModal:focus,
[data-bs-theme="light"] #selAgregarAfiliadoDirecto:focus,
body:not(.theme-dark):not(.dark-mode) #selCandidatosAfiliadosModal:focus,
body:not(.theme-dark):not(.dark-mode) #selAgregarAfiliadoDirecto:focus {
  border-color: #9a7218 !important;
  box-shadow: 0 0 0 2px rgba(154, 114, 24, 0.25) !important;
}

/* ==========================================================================
   ALTO CONTRASTE UNIVERSAL PARA NÚMEROS Y LETRAS EN TODAS LAS TABLAS PAAET
   ========================================================================== */
.table-paaet,
.table-reporte-paaet {
  font-size: 14.5px;
}

.table-paaet thead th,
.table-reporte-paaet thead th {
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
}

.table-paaet-saldos {
  font-size: 13px !important;
}

.table-paaet-saldos thead th {
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px;
  padding: 5px 6px !important;
}

.table-paaet-saldos td.font-monospace,
.table-paaet-saldos td.text-end,
.table-paaet-saldos td.text-center {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, ui-monospace !important;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.15px;
}

.table-paaet td.font-monospace,
.table-paaet td.text-end,
.tercios-grid td.font-monospace,
.tercios-grid td.text-end,
.comision-grid td.font-monospace,
.comision-grid td.text-end,
.comision-metric-value,
.tabla-afiliados-modal td.font-monospace,
.tabla-afiliados-modal td.text-end,
.table-reporte-paaet td.font-monospace,
.table-reporte-paaet td.text-end,
table.table td.font-monospace,
table.table td.text-end {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, ui-monospace !important;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 700 !important;
  font-size: 15.5px !important;
  letter-spacing: 0.25px;
}

/* Modo Noche: números y letras brillantes y nítidos */
html.dark .table-paaet td.font-monospace,
html.dark .table-paaet td.text-end,
html.dark .table-paaet-saldos td.font-monospace,
html.dark .table-paaet-saldos td.text-end,
html.dark .table-paaet-saldos td.text-center,
html.dark .tercios-grid td.font-monospace,
html.dark .tercios-grid td.text-end,
html.dark .comision-grid td.font-monospace,
html.dark .comision-grid td.text-end,
html.dark .table-reporte-paaet td.font-monospace,
html.dark .table-reporte-paaet td.text-end,
body.theme-dark .table-paaet td.font-monospace,
body.theme-dark .table-paaet td.text-end,
body.theme-dark .table-paaet-saldos td.font-monospace,
body.theme-dark .table-paaet-saldos td.text-end,
body.theme-dark .table-paaet-saldos td.text-center,
body.theme-dark .tercios-grid td.font-monospace,
body.theme-dark .tercios-grid td.text-end,
body.theme-dark .comision-grid td.font-monospace,
body.theme-dark .comision-grid td.text-end,
body.theme-dark .table-reporte-paaet td.font-monospace,
body.theme-dark .table-reporte-paaet td.text-end {
  color: #ffffff !important;
}

/* Modo Día: números y letras negros, profundos y definidos como en la imagen 2 */
html:not(.dark) .table-paaet td.font-monospace,
html:not(.dark) .table-paaet td.text-end,
html:not(.dark) .table-paaet-saldos td.font-monospace,
html:not(.dark) .table-paaet-saldos td.text-end,
html:not(.dark) .table-paaet-saldos td.text-center,
html:not(.dark) .tercios-grid td.font-monospace,
html:not(.dark) .tercios-grid td.text-end,
html:not(.dark) .comision-grid td.font-monospace,
html:not(.dark) .comision-grid td.text-end,
html:not(.dark) .table-reporte-paaet td.font-monospace,
html:not(.dark) .table-reporte-paaet td.text-end,
html.light .table-paaet td.font-monospace,
html.light .table-paaet td.text-end,
html.light .table-paaet-saldos td.font-monospace,
html.light .table-paaet-saldos td.text-end,
html.light .table-paaet-saldos td.text-center,
html.light .tercios-grid td.font-monospace,
html.light .tercios-grid td.text-end,
html.light .comision-grid td.font-monospace,
html.light .comision-grid td.text-end,
html.light .table-reporte-paaet td.font-monospace,
html.light .table-reporte-paaet td.text-end,
body.theme-light .table-paaet td.font-monospace,
body.theme-light .table-paaet td.text-end,
body.theme-light .table-paaet-saldos td.font-monospace,
body.theme-light .table-paaet-saldos td.text-end,
body.theme-light .table-paaet-saldos td.text-center,
body.theme-light .tercios-grid td.font-monospace,
body.theme-light .tercios-grid td.text-end,
body.theme-light .comision-grid td.font-monospace,
body.theme-light .comision-grid td.text-end,
body.theme-light .table-reporte-paaet td.font-monospace,
body.theme-light .table-reporte-paaet td.text-end {
  color: #000000 !important;
}

/* Éxito / Ganancias / Positivos dentro de tablas */
html.dark table .text-success,
html.dark table .text-emerald,
body.theme-dark table .text-success,
body.theme-dark table .text-emerald {
  color: #34d399 !important;
  font-weight: 800 !important;
}
html:not(.dark) table .text-success,
html:not(.dark) table .text-emerald,
html.light table .text-success,
html.light table .text-emerald,
body.theme-light table .text-success,
body.theme-light table .text-emerald {
  color: #047857 !important;
  font-weight: 800 !important;
}

/* Pérdidas / Peligro / Negativos dentro de tablas */
html.dark table .text-danger,
body.theme-dark table .text-danger {
  color: #f87171 !important;
  font-weight: 800 !important;
}
html:not(.dark) table .text-danger,
html.light table .text-danger,
body.theme-light table .text-danger {
  color: #b91c1c !important;
  font-weight: 800 !important;
}

/* Inputs numéricos en grillas */
.grilla-jugadas-wrap .input-grilla,
.grilla-adelantadas-wrap .input-grilla,
#tablaAdelantadasPAAET .input-grilla {
  font-weight: 700 !important;
  font-size: 14.5px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, ui-monospace !important;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ============================================================
   ANIMACIÓN SUAVE EN TIEMPO REAL: ACTUALIZACIÓN DE SALDOS
   ============================================================ */
@keyframes saldosRowUpdatedGlow {
  0% {
    background-color: rgba(37, 99, 235, 0.45) !important;
    box-shadow: inset 0 0 14px rgba(37, 99, 235, 0.35) !important;
  }
  40% {
    background-color: rgba(37, 99, 235, 0.22) !important;
  }
  100% {
    background-color: transparent !important;
    box-shadow: none !important;
  }
}

.saldos-row-updated {
  animation: saldosRowUpdatedGlow 2.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.saldos-card.saldos-row-updated {
  border-color: #2563eb !important;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.45) !important;
}

/* ==========================================================================
   BARRAS DE DESPLAZAMIENTO MANUAL UNIVERSALES (SISTEMA PAAET PRO)
   Garantiza barras manuales siempre visibles, arrastrables y estéticas
   en todos los menús, tablas, menús contextuales, modales y paneles.
   ========================================================================== */

/* 1. Habilitar scroll manual fluido y seguro en contenedores de tablas */
.table-responsive,
.table-responsive-sm,
.table-responsive-md,
.table-responsive-lg,
.table-responsive-xl,
.table-responsive-xxl,
.table-responsive-mobile,
.saldos-table-wrapper,
.comision-table-wrapper,
.tabla-afiliados-container,
.reporte-table-card,
#contenedorGridSaldosEnVivoPAAET,
#contenedorTablaSaldosPAAET,
#contenedorTablaComisionPAAET,
.grilla-jugadas-wrap,
.grilla-adelantadas-wrap,
.comision-hipodromos-box,
.table-wrapper,
.paaet-table-responsive {
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-gutter: stable;
  scrollbar-width: thin !important;
  scrollbar-color: #c5a059 #14110f !important;
}

/* 2. Menús, Sidebars y Paneles de Navegación */
#sidebarPAAET,
.sidebar,
.sidebar-nav,
.sidebar-nav-list,
.sidebar-menu,
#sidebarPAAET .sidebar-nav-list,
.offcanvas,
.offcanvas-body,
.offcanvas-end,
#modalPozoContextual,
#listaPozoContextual {
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: #c5a059 #14110f !important;
  scrollbar-gutter: stable;
}

/* 3. Menús Contextuales, Dropdowns y Popovers */
.dropdown-menu,
.dropdown-menu-dark,
.dropdown-menu-end,
.notif-dropdown,
.context-menu,
.pizarra-context-menu,
.custom-context-menu,
[class*="context-menu"],
[class*="contextual"],
#menuContextual,
.paaet-player-autocomplete-dropdown,
.paaet-modal-autocomplete-dropdown,
.select2-results__options,
.optionListContainer {
  max-height: 75vh !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: #c5a059 #14110f !important;
}

/* 4. Modales y Popups interactivos */
.modal-body,
.modal-dialog-scrollable .modal-body,
#bodyAuditoriaFichaCarrera,
#bodyAuditoriaDetalleEvento,
#bodyAuditoriaDetalleMovimiento,
#modalJugador .modal-body,
.swal2-html-container {
  overflow-y: auto !important;
  overflow-x: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: #c5a059 #14110f !important;
}

/* 5. Contenedor Principal de Vistas */
#viewContainerPAAET,
.paaet-view-container {
  overflow-y: auto !important;
  overflow-x: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: #c5a059 #14110f !important;
}

/* ==========================================================================
   ESTILOS DE BARRA DE DESPLAZAMIENTO MANUAL (MODO OSCURO - DEFAULT)
   Barra gruesa (12px), contrastante y con cursor grab/grabbing para arrastre manual
   ========================================================================== */
*::-webkit-scrollbar,
html.dark *::-webkit-scrollbar,
body.theme-dark *::-webkit-scrollbar {
  width: 12px !important;
  height: 12px !important;
  display: block !important;
}

*::-webkit-scrollbar-track,
html.dark *::-webkit-scrollbar-track,
body.theme-dark *::-webkit-scrollbar-track {
  background: #14110f !important;
  border-left: 1px solid #3d2f23 !important;
  border-top: 1px solid #3d2f23 !important;
  border-radius: 6px !important;
}

*::-webkit-scrollbar-thumb,
html.dark *::-webkit-scrollbar-thumb,
body.theme-dark *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c5a059 0%, #9a7638 100%) !important;
  border-radius: 6px !important;
  border: 2px solid #14110f !important;
  min-height: 40px !important;
  min-width: 40px !important;
  cursor: grab !important;
}

*::-webkit-scrollbar-thumb:hover,
html.dark *::-webkit-scrollbar-thumb:hover,
body.theme-dark *::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e4bf6f 0%, #b38c43 100%) !important;
  box-shadow: 0 0 10px rgba(197, 160, 89, 0.6) !important;
}

*::-webkit-scrollbar-thumb:active,
html.dark *::-webkit-scrollbar-thumb:active,
body.theme-dark *::-webkit-scrollbar-thumb:active {
  background: #f1c97a !important;
  cursor: grabbing !important;
}

*::-webkit-scrollbar-corner,
html.dark *::-webkit-scrollbar-corner,
body.theme-dark *::-webkit-scrollbar-corner {
  background: #14110f !important;
}

/* ==========================================================================
   ESTILOS DE BARRA DE DESPLAZAMIENTO MANUAL (MODO CLARO)
   ========================================================================== */
html:not(.dark) *::-webkit-scrollbar,
html.light *::-webkit-scrollbar,
body.theme-light *::-webkit-scrollbar {
  width: 12px !important;
  height: 12px !important;
  display: block !important;
}

html:not(.dark) *::-webkit-scrollbar-track,
html.light *::-webkit-scrollbar-track,
body.theme-light *::-webkit-scrollbar-track {
  background: #ece2ce !important;
  border-left: 1px solid #d8caa8 !important;
  border-top: 1px solid #d8caa8 !important;
  border-radius: 6px !important;
}

html:not(.dark) *::-webkit-scrollbar-thumb,
html.light *::-webkit-scrollbar-thumb,
body.theme-light *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #bfa061 0%, #8e6d2b 100%) !important;
  border-radius: 6px !important;
  border: 2px solid #ece2ce !important;
  min-height: 40px !important;
  min-width: 40px !important;
  cursor: grab !important;
}

html:not(.dark) *::-webkit-scrollbar-thumb:hover,
html.light *::-webkit-scrollbar-thumb:hover,
body.theme-light *::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d4af37 0%, #a47f34 100%) !important;
}

html:not(.dark) *::-webkit-scrollbar-thumb:active,
html.light *::-webkit-scrollbar-thumb:active,
body.theme-light *::-webkit-scrollbar-thumb:active {
  background: #9a7638 !important;
  cursor: grabbing !important;
}

html:not(.dark) *::-webkit-scrollbar-corner,
html.light *::-webkit-scrollbar-corner,
body.theme-light *::-webkit-scrollbar-corner {
  background: #ece2ce !important;
}

html:not(.dark) *,
html.light *,
body.theme-light * {
  scrollbar-color: #bfa061 #ece2ce !important;
}










/* Footer para comision-grid (sin sombras intrusivas ni divisiones entre celdas) */
.comision-grid tfoot,
.comision-grid tfoot tr,
.comision-grid tfoot td {
  box-shadow: none !important;
}

/* ==========================================================================
   MÓDULO DE CONFIGURACIÓN Y COMISIÓN DE LOGROS BAJOS
   ========================================================================== */
.card-logro-bajo {
  position: relative;
  background: var(--paaet-card-gradient) !important;
  border: 1.5px solid var(--paaet-border-gold, #5c4734) !important;
  border-radius: 12px !important;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
}

.card-logro-bajo:hover {
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.15) !important;
  border-color: var(--paaet-gold, #d4af37) !important;
}

html.dark .card-logro-bajo,
body.theme-dark .card-logro-bajo {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, #1c1714 100%) !important;
  border-color: var(--paaet-border-gold, #5c4734) !important;
}

html:not(.dark) .card-logro-bajo,
html.light .card-logro-bajo,
body.theme-light .card-logro-bajo {
  background: #ffffff !important;
  border-color: var(--paaet-border-gold, #cbb994) !important;
  box-shadow: 0 4px 14px rgba(154, 114, 24, 0.12) !important;
}

.kbd-key {
  display: inline-block;
  padding: 3px 7px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  font-family: var(--bs-font-monospace, monospace);
  letter-spacing: 0.5px;
}

html:not(.dark) .kbd-key,
html.light .kbd-key,
body.theme-light .kbd-key {
  color: #0369a1;
  background-color: #e0f2fe;
  border-color: #7dd3fc;
}

.kbd-key-pulse {
  animation: kbdPulse 1.2s infinite ease-in-out;
}

@keyframes kbdPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(56, 189, 248, 0); }
}

.seccion-cfg-subview {
  animation: fadeInCfg 0.2s ease-in-out;
}

@keyframes fadeInCfg {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ==========================================================================
   ALTO CONTRASTE: ALERTAS Y BANNERS EN PLANOS EN VIVO (MODO DÍA Y NOCHE)
   ========================================================================== */

/* Banner de Avisos / Jugadores no registrados en Pizarra */
.paaet-pizarra-banner {
  font-size: 12px;
  line-height: 1.4;
  border-width: 1px;
  border-style: solid;
  transition: all 0.2s ease;
}

/* Modo Día: Estado Advertencia (ej: Jugadores no registrados) */
html:not(.dark) .paaet-pizarra-banner.banner-estado-warning,
html.light .paaet-pizarra-banner.banner-estado-warning,
body.theme-light .paaet-pizarra-banner.banner-estado-warning {
  background: #fffbeb !important;
  border-color: #f59e0b !important;
  color: #78350f !important; /* Ámbar oscuro con ratio de contraste > 10:1 */
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.12) !important;
}

html:not(.dark) .paaet-pizarra-banner.banner-estado-warning .paaet-banner-header,
html.light .paaet-pizarra-banner.banner-estado-warning .paaet-banner-header,
body.theme-light .paaet-pizarra-banner.banner-estado-warning .paaet-banner-header {
  color: #b45309 !important; /* Ámbar intenso y legible */
}

html:not(.dark) .paaet-pizarra-banner.banner-estado-warning .paaet-err-chip,
html.light .paaet-pizarra-banner.banner-estado-warning .paaet-err-chip,
body.theme-light .paaet-pizarra-banner.banner-estado-warning .paaet-err-chip {
  background: #fef3c7 !important;
  border: 1px solid #d97706 !important;
  color: #78350f !important;
}

html:not(.dark) .paaet-pizarra-banner.banner-estado-warning .paaet-err-chip:hover,
html.light .paaet-pizarra-banner.banner-estado-warning .paaet-err-chip:hover,
body.theme-light .paaet-pizarra-banner.banner-estado-warning .paaet-err-chip:hover {
  background: #fde68a !important;
  border-color: #b45309 !important;
}

html:not(.dark) .paaet-pizarra-banner.banner-estado-warning .chip-name,
html.light .paaet-pizarra-banner.banner-estado-warning .chip-name,
body.theme-light .paaet-pizarra-banner.banner-estado-warning .chip-name {
  color: #451a03 !important;
  font-weight: 800 !important;
}

html:not(.dark) .paaet-pizarra-banner.banner-estado-warning .btn-chip-alias,
html.light .paaet-pizarra-banner.banner-estado-warning .btn-chip-alias,
body.theme-light .paaet-pizarra-banner.banner-estado-warning .btn-chip-alias {
  background: #d97706 !important;
  color: #ffffff !important;
  border: none !important;
}

/* Modo Noche: Estado Advertencia */
html.dark .paaet-pizarra-banner.banner-estado-warning,
body.theme-dark .paaet-pizarra-banner.banner-estado-warning {
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fef3c7 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html.dark .paaet-pizarra-banner.banner-estado-warning .paaet-banner-header,
body.theme-dark .paaet-pizarra-banner.banner-estado-warning .paaet-banner-header {
  color: #fbbf24 !important;
}

html.dark .paaet-pizarra-banner.banner-estado-warning .paaet-err-chip,
body.theme-dark .paaet-pizarra-banner.banner-estado-warning .paaet-err-chip {
  background: rgba(245, 158, 11, 0.22) !important;
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  color: #fde68a !important;
}

html.dark .paaet-pizarra-banner.banner-estado-warning .btn-chip-alias,
body.theme-dark .paaet-pizarra-banner.banner-estado-warning .btn-chip-alias {
  background: #fbbf24 !important;
  color: #1a1614 !important;
  border: none !important;
}

/* Modo Día: Estado Error (ej: montos en 0, caballos faltantes) */
html:not(.dark) .paaet-pizarra-banner.banner-estado-error,
html.light .paaet-pizarra-banner.banner-estado-error,
body.theme-light .paaet-pizarra-banner.banner-estado-error {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #7f1d1d !important; /* Rojo carmesí con alto contraste */
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.12) !important;
}

html:not(.dark) .paaet-pizarra-banner.banner-estado-error .paaet-banner-header,
html.light .paaet-pizarra-banner.banner-estado-error .paaet-banner-header,
body.theme-light .paaet-pizarra-banner.banner-estado-error .paaet-banner-header {
  color: #b91c1c !important;
}

html:not(.dark) .paaet-pizarra-banner.banner-estado-error .paaet-err-chip,
html.light .paaet-pizarra-banner.banner-estado-error .paaet-err-chip,
body.theme-light .paaet-pizarra-banner.banner-estado-error .paaet-err-chip {
  background: #fee2e2 !important;
  border: 1px solid #dc2626 !important;
  color: #7f1d1d !important;
}

/* Modo Noche: Estado Error */
html.dark .paaet-pizarra-banner.banner-estado-error,
body.theme-dark .paaet-pizarra-banner.banner-estado-error {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: #fecaca !important;
}

html.dark .paaet-pizarra-banner.banner-estado-error .paaet-banner-header,
body.theme-dark .paaet-pizarra-banner.banner-estado-error .paaet-banner-header {
  color: #f87171 !important;
}

/* Alerta Simultáneo en Pizarra */
.alerta-simultaneo-pizarra {
  font-size: 13px;
  border-width: 1px;
  border-style: solid;
}

html:not(.dark) .alerta-simultaneo-pizarra,
html.light .alerta-simultaneo-pizarra,
body.theme-light .alerta-simultaneo-pizarra {
  background: linear-gradient(90deg, #fffbeb, #fef3c7) !important;
  border-color: #f59e0b !important;
  color: #78350f !important;
}

html:not(.dark) .alerta-simultaneo-pizarra .alerta-simultaneo-icon,
html.light .alerta-simultaneo-pizarra .alerta-simultaneo-icon,
body.theme-light .alerta-simultaneo-pizarra .alerta-simultaneo-icon {
  color: #b45309 !important;
}

html.dark .alerta-simultaneo-pizarra,
body.theme-dark .alerta-simultaneo-pizarra {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fef3c7 !important;
}

html.dark .alerta-simultaneo-pizarra .alerta-simultaneo-icon,
body.theme-dark .alerta-simultaneo-pizarra .alerta-simultaneo-icon {
  color: #fbbf24 !important;
}

/* Banner de Información en Adelantadas */
.alerta-adelantadas-info {
  border-width: 1px;
  border-style: solid;
}

html:not(.dark) .alerta-adelantadas-info,
html.light .alerta-adelantadas-info,
body.theme-light .alerta-adelantadas-info {
  background: #f0f9ff !important;
  border-color: #0284c7 !important;
  color: #075985 !important;
}

html.dark .alerta-adelantadas-info,
body.theme-dark .alerta-adelantadas-info {
  background: rgba(14, 165, 233, 0.15) !important;
  border-color: rgba(14, 165, 233, 0.45) !important;
  color: #bae6fd !important;
}

/* Soporte General de Alertas en Modo Día */
html:not(.dark) .alert-warning,
html.light .alert-warning,
body.theme-light .alert-warning {
  background: #fffbeb !important;
  border-color: #f59e0b !important;
  color: #78350f !important;
}

html:not(.dark) .alert-danger,
html.light .alert-danger,
body.theme-light .alert-danger {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #7f1d1d !important;
}

html:not(.dark) .alert-info,
html.light .alert-info,
body.theme-light .alert-info {
  background: #f0f9ff !important;
  border-color: #0284c7 !important;
  color: #075985 !important;
}

/* ==========================================================================
   ALTO CONTRASTE: NÚMEROS PEQUEÑOS Y DISPONIBLES EN PIZARRA / PLANOS
   ========================================================================== */
.paaet-pizarra-disp-sub {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  line-height: 1.25;
  margin-top: 2px;
  letter-spacing: -0.01em;
  color: #94a3b8;
}

.paaet-pizarra-disp-sub .disp-label {
  color: #64748b;
  font-weight: 600;
  margin-right: 2px;
}

.paaet-pizarra-disp-sub .disp-val {
  color: #cbd5e1;
  font-weight: 800;
}

/* Modo Claro: Alto contraste contra fondo marfil / mármol */
html:not(.dark) .paaet-pizarra-disp-sub,
html.light .paaet-pizarra-disp-sub,
body.theme-light .paaet-pizarra-disp-sub {
  color: #334155 !important;
}

html:not(.dark) .paaet-pizarra-disp-sub .disp-label,
html.light .paaet-pizarra-disp-sub .disp-label,
body.theme-light .paaet-pizarra-disp-sub .disp-label {
  color: #475569 !important;
  font-weight: 700 !important;
}

html:not(.dark) .paaet-pizarra-disp-sub .disp-val,
html.light .paaet-pizarra-disp-sub .disp-val,
body.theme-light .paaet-pizarra-disp-sub .disp-val {
  color: #0f172a !important; /* Negro grafito para lectura perfecta */
  font-weight: 800 !important;
}

/* Guion (-) en celdas de pizarra */
.paaet-pizarra-disp-dash {
  color: #94a3b8 !important;
  font-weight: 700;
  font-size: 13px;
}

html:not(.dark) .paaet-pizarra-disp-dash,
html.light .paaet-pizarra-disp-dash,
body.theme-light .paaet-pizarra-disp-dash {
  color: #475569 !important;
  font-weight: 800;
}

/* Número de fila (#) en tabla pizarra */
#tablaPizarraPAAET tbody td:first-child {
  font-weight: 700;
  color: #64748b;
}

html:not(.dark) #tablaPizarraPAAET tbody td:first-child,
html.light #tablaPizarraPAAET tbody td:first-child,
body.theme-light #tablaPizarraPAAET tbody td:first-child {
  color: #334155 !important;
}

/* ==========================================================================
   ELEMENTOS DE INTERFAZ MÓVIL (DEFAULT DESKTOP OCULTOS)
   ========================================================================== */
#sidebarBackdropPAAET {
  display: none;
}

.btn-topbar-mobile-menu {
  display: none !important;
}

.btn-sidebar-close-mobile {
  display: none !important;
}

/* ==========================================================================
   ADAPTABILIDAD UNIVERSAL: TABLETS Y CELULARES (PANTALLAS <= 992px)
   ========================================================================== */
@media (max-width: 992px) {
  /* 1. Layout general */
  #layoutPAAET {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    position: relative !important;
  }

  /* 2. Backdrop traslúcido para cerrar drawer */
  #sidebarBackdropPAAET {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 1055 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease !important;
  }

  body.sidebar-mobile-open #sidebarBackdropPAAET {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* 3. Menú Lateral como Drawer Deslizable Off-Canvas */
  #sidebarPAAET {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 82vw !important;
    z-index: 1060 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1), box-shadow 0.28s ease !important;
    box-shadow: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #sidebarPAAET.mobile-open,
  body.sidebar-mobile-open #sidebarPAAET {
    transform: translateX(0) !important;
    box-shadow: 6px 0 35px rgba(0, 0, 0, 0.65) !important;
  }

  .btn-sidebar-close-mobile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--paaet-muted);
    font-size: 19px;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s;
  }

  .btn-sidebar-close-mobile:hover,
  .btn-sidebar-close-mobile:active {
    color: #ef4444 !important;
  }

  /* 4. TopBar Móvil */
  #mainWrapperPAAET {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
  }

  #topBarPAAET {
    padding: 0 10px !important;
    height: 56px !important;
    min-height: 56px !important;
    gap: 8px !important;
  }

  .btn-topbar-mobile-menu {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--paaet-user-card-bg, rgba(255, 255, 255, 0.05));
    border: 1.5px solid var(--paaet-border-gold);
    color: var(--paaet-gold, #d4af37);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: transform 0.1s ease;
  }

  .btn-topbar-mobile-menu:active {
    transform: scale(0.92);
  }

  .topbar-brand-section {
    gap: 8px !important;
    flex-shrink: 1;
    overflow: hidden;
  }

  .topbar-horse-logo {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
  }

  .topbar-brand-text .brand-title {
    font-size: 14.5px !important;
    letter-spacing: 1px !important;
  }

  .topbar-brand-text .brand-subtitle {
    font-size: 8px !important;
    letter-spacing: 1.5px !important;
  }

  .paaet-group-pill {
    font-size: 10px !important;
    padding: 2px 7px !important;
    max-width: 95px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .topbar-right-actions {
    gap: 5px !important;
    flex-shrink: 0;
  }

  .luxury-date-input {
    width: 115px !important;
    font-size: 11px !important;
    padding: 2px 6px !important;
    height: 32px !important;
  }

  .btn-cerrar-semana-top {
    font-size: 10.5px !important;
    padding: 4px 8px !important;
    height: 32px !important;
    white-space: nowrap !important;
  }

  .btn-theme-toggle {
    font-size: 13px !important;
    padding: 4px 8px !important;
    height: 32px !important;
  }

  .topbar-user-badge {
    padding: 4px 8px !important;
    gap: 6px !important;
    height: 32px !important;
  }

  .topbar-user-details {
    display: none !important;
  }

  /* 5. Contenedor de Vistas */
  #viewContainerPAAET {
    padding: 10px 10px calc(25px + env(safe-area-inset-bottom, 0px)) 10px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .paaet-screen-title {
    font-size: 17px !important;
  }

  .paaet-screen-subtitle {
    font-size: 11px !important;
  }

  /* 6. Saldos Móvil */
  .saldos-header-block {
    margin-bottom: 8px !important;
  }

  .saldos-page-title {
    font-size: 17px !important;
  }

  .saldos-filters-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .saldos-select, .saldos-date-input {
    flex: 1 1 auto !important;
    min-width: 100px !important;
    font-size: 12px !important;
    height: 34px !important;
    padding: 4px 8px !important;
  }

  .saldos-toolbar-row {
    flex-wrap: wrap !important;
    gap: 5px !important;
    padding-top: 4px !important;
  }

  .btn-saldos-toolbar,
  .saldos-toolbar-row .btn {
    min-height: 34px !important;
    font-size: 11.5px !important;
    padding: 4px 8px !important;
  }

  .saldos-search-row {
    margin-top: 6px !important;
  }

  .saldos-search-input-wrapper {
    height: 36px !important;
  }

  .saldos-search-input {
    font-size: 13px !important;
    padding: 6px 12px !important;
  }

  .saldos-table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 8px !important;
    border: 1px solid var(--paaet-border) !important;
  }

  /* Columna de jugador fija al deslizar horizontalmente */
  .table-paaet-saldos th:nth-child(2),
  .table-paaet-saldos td:nth-child(2) {
    position: sticky !important;
    left: 0 !important;
    z-index: 2 !important;
    background: var(--paaet-card, #1c1714) !important;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.25) !important;
  }

  .table-paaet-saldos th {
    font-size: 10px !important;
    padding: 6px 6px !important;
    white-space: nowrap !important;
  }

  .table-paaet-saldos td {
    font-size: 12px !important;
    padding: 6px 6px !important;
    white-space: nowrap !important;
  }

  .saldos-footer {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    font-size: 11px !important;
  }

  /* 7. Planos Móvil */
  .pizarra-toolbar-container {
    padding: 6px 8px !important;
  }

  .pizarra-toolbar-container .d-flex {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  #selCarreraPizarraPAAET {
    min-width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 4px;
    height: 36px !important;
    font-size: 13px !important;
  }

  .pizarra-hero-group {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    justify-content: stretch !important;
    margin: 4px 0 !important;
  }

  .btn-pizarra-hero {
    flex: 1 1 calc(50% - 5px) !important;
    min-height: 36px !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .pizarra-resultados-strip {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 6px 8px !important;
  }

  .pizarra-resultados-strip > div {
    width: 100% !important;
    justify-content: space-between !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .grilla-jugadas-wrap,
  #tablaPizarraScrollContainer {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #tablaPizarraPAAET {
    min-width: 720px !important;
  }

  /* 8. Comisiones y Cuadre Móvil */
  .comisiones-header-row {
    margin-bottom: 6px !important;
  }

  .comisiones-pills {
    margin-top: 4px;
    width: 100% !important;
    display: flex !important;
  }

  .comisiones-pills button {
    flex: 1 !important;
    font-size: 11.5px !important;
    padding: 5px 4px !important;
  }

  .comisiones-summary-bar {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .summary-col {
    flex: 1 1 calc(50% - 6px) !important;
    padding: 8px 10px !important;
  }

  .summary-col.highlight-col {
    flex: 1 1 100% !important;
  }

  .summary-divider {
    display: none !important;
  }

  /* Colocar lista de jugadores y dona apilados verticalmente */
  .comisiones-split-wrap {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .comisiones-table-panel,
  .comisiones-chart-panel {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }

  #contenidoDetalleSocioPAAET {
    max-height: 60vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* 9. Reportes y Auditoría Móvil */
  .pizarra-toolbar {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  #selTipoReportePAAET {
    width: 100% !important;
    min-width: 100% !important;
  }

  .auditoria-top-tabs-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
    display: flex !important;
    gap: 4px !important;
  }

  .auditoria-nav-tab {
    flex-shrink: 0 !important;
    font-size: 11.5px !important;
    padding: 6px 12px !important;
  }
}

/* ==========================================================================
   SMARTPHONES ESTRECHOS (PANTALLAS <= 576px)
   ========================================================================== */
@media (max-width: 576px) {
  .paaet-group-pill {
    display: none !important;
  }

  .topbar-brand-text .brand-subtitle {
    display: none !important;
  }

  .luxury-shortcut-card {
    padding: 12px 8px !important;
    min-height: 105px !important;
  }

  .shortcut-icon-badge {
    width: 36px !important;
    height: 36px !important;
    font-size: 15px !important;
    margin-bottom: 6px !important;
  }

  .shortcut-title {
    font-size: 12.5px !important;
  }

  .shortcut-desc {
    font-size: 9.5px !important;
    line-height: 1.25 !important;
  }
}

/* ==========================================================================
   MODALES Y FORMULARIOS ADAPTATIVOS MÓVILES (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 8px !important;
    max-width: calc(100vw - 16px) !important;
  }

  .modal-content {
    border-radius: 14px !important;
  }

  .modal-header {
    padding: 12px 14px !important;
  }

  .modal-body {
    padding: 12px 14px !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-footer {
    padding: 10px 14px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .modal-footer .btn {
    flex: 1 1 calc(50% - 6px) !important;
  }

  /* Prevenir zoom automático invasivo en Safari iOS */
  input, select, textarea {
    font-size: 16px !important;
  }

  .swal2-popup:not(.swal2-toast) {
    width: 92% !important;
    max-width: 400px !important;
    padding: 1.25rem 1rem !important;
    border-radius: 16px !important;
  }
}

/* ==========================================================================
   PIZARRA DE CARRERAS - MODAL POLLAS (CUADRÍCULA Y RESPONSIVE)
   ========================================================================== */
.polla-pizarra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

@media (max-width: 576px) {
  .polla-pizarra-grid {
    grid-template-columns: 1fr !important;
  }
}

.polla-pizarra-card {
  background: rgba(22, 18, 15, 0.75);
  border: 1px solid var(--paaet-border-gold);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.polla-pizarra-card:hover {
  border-color: var(--paaet-gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

html.light .polla-pizarra-card,
body.theme-light .polla-pizarra-card {
  background: rgba(253, 252, 249, 0.95);
  border: 1px solid var(--paaet-border-gold);
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.12);
}

.polla-pizarra-input {
  background: var(--paaet-input-bg) !important;
  border: 1.5px solid var(--paaet-border-gold) !important;
  color: var(--paaet-gold) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  padding: 6px 8px !important;
  border-radius: 8px !important;
}

.polla-pizarra-input:focus {
  border-color: var(--paaet-gold) !important;
  box-shadow: var(--paaet-focus-glow) !important;
}

html.light .polla-pizarra-input,
body.theme-light .polla-pizarra-input {
  background: #ffffff !important;
  color: #1c1612 !important;
}

/* ==========================================================================
   ESTILOS CUADRO OFICIAL POLLA HÍPICA (FORMATO OFICIAL PAAET LUXURY)
   ========================================================================== */

/* Sub-Header Informativo Compacto */
.polla-banner-oficial {
  border-radius: 10px;
  transition: all 0.2s ease;
}

html.dark .polla-banner-oficial,
body.theme-dark .polla-banner-oficial,
.polla-banner-oficial {
  background: linear-gradient(135deg, #1c1714 0%, #15110e 100%) !important;
  color: #eae2d5 !important;
  border: 1px solid #443527 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

html:not(.dark) .polla-banner-oficial,
html.light .polla-banner-oficial,
body.theme-light .polla-banner-oficial {
  background: linear-gradient(135deg, #ffffff 0%, #f7f3ea 100%) !important;
  color: #1e293b !important;
  border: 1px solid #d8caa8 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

.polla-metric-chip {
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
}

html.dark .polla-metric-chip,
body.theme-dark .polla-metric-chip,
.polla-metric-chip {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eae2d5;
}

html:not(.dark) .polla-metric-chip,
html.light .polla-metric-chip,
body.theme-light .polla-metric-chip {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

/* ==========================================================================
   TABLA OFICIAL DE POSICIONES DE POLLA (MÁXIMA LEGIBILIDAD DÍA Y NOCHE)
   ========================================================================== */
.tabla-polla-oficial {
  border-collapse: collapse !important;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
  width: 100% !important;
}

.tabla-polla-oficial th, 
.tabla-polla-oficial td {
  padding: 6px 7px !important;
  vertical-align: middle !important;
}

/* Encabezados Globales */
.tabla-polla-oficial thead th {
  text-transform: uppercase !important;
  font-size: 11.5px !important;
  letter-spacing: 0.5px;
}

/* 1. MODO OSCURO (Obsidian Leather & Gold) */
html.dark .tabla-polla-oficial,
body.theme-dark .tabla-polla-oficial,
.tabla-polla-oficial {
  background-color: #171310 !important;
  color: #eae2d5 !important;
}

html.dark .tabla-polla-oficial th, 
html.dark .tabla-polla-oficial td,
body.theme-dark .tabla-polla-oficial th, 
body.theme-dark .tabla-polla-oficial td {
  border: 1px solid #443527 !important;
}

/* Headers en modo oscuro */
html.dark .th-polla-num, body.theme-dark .th-polla-num {
  background: #d4af37 !important;
  color: #000000 !important;
  font-weight: 900 !important;
  width: 42px !important;
}
html.dark .th-polla-participante, body.theme-dark .th-polla-participante {
  background: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  min-width: 140px !important;
  text-align: left !important;
  padding-left: 8px !important;
}
html.dark .th-polla-carrera, body.theme-dark .th-polla-carrera {
  background: #b45309 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  width: 44px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
}
html.dark .th-polla-pt, body.theme-dark .th-polla-pt {
  background: #064e3b !important;
  color: #6ee7b7 !important;
  font-weight: 800 !important;
  font-size: 10.5px !important;
  width: 38px !important;
  border-right: 1.5px solid rgba(255, 255, 255, 0.25) !important;
}
html.dark .th-polla-total, body.theme-dark .th-polla-total {
  background: #eab308 !important;
  color: #000000 !important;
  font-weight: 900 !important;
  width: 65px !important;
  font-size: 13px !important;
}
html.dark .th-polla-acciones, body.theme-dark .th-polla-acciones {
  background: #1e1915 !important;
  color: #a89c8d !important;
  width: 55px !important;
}

/* Celdas del cuerpo en modo oscuro - ALTO CONTRASTE Y MÁXIMA LEGIBILIDAD */
html.dark .td-polla-num, 
html.dark .td-polla-num *,
body.theme-dark .td-polla-num,
body.theme-dark .td-polla-num * {
  background: #231c17 !important;
  color: #facc15 !important; /* Dorado brillante */
  font-weight: 800 !important;
  font-size: 12px !important;
}

html.dark .td-polla-participante,
html.dark .td-polla-participante *,
body.theme-dark .td-polla-participante,
body.theme-dark .td-polla-participante * {
  background: #191e24 !important;
  color: #38bdf8 !important; /* Celeste vivo */
  font-weight: 800 !important;
  font-size: 12.5px !important;
  text-align: left !important;
  padding-left: 8px !important;
}
html.dark .td-polla-participante small,
body.theme-dark .td-polla-participante small {
  color: #94a3b8 !important;
}

html.dark .td-polla-caballo,
body.theme-dark .td-polla-caballo {
  background: #221a15 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
}
html.dark .td-polla-caballo *:not(.gualdrapa-badge),
body.theme-dark .td-polla-caballo *:not(.gualdrapa-badge) {
  color: #f59e0b !important; /* Ámbar / naranja visible */
  font-weight: 800 !important;
  font-size: 13px !important;
  font-family: monospace !important;
}

html.dark .td-polla-puntos,
body.theme-dark .td-polla-puntos {
  background: #091a13 !important;
  border-right: 1.5px solid rgba(255, 255, 255, 0.25) !important;
}
html.dark .td-polla-puntos *:not(.badge-pts-acierto):not(.badge-pts-zero),
body.theme-dark .td-polla-puntos *:not(.badge-pts-acierto):not(.badge-pts-zero) {
  color: #34d399 !important; /* Verde esmeralda vivo para puntos */
  font-weight: 800 !important;
  font-size: 13px !important;
  font-family: monospace !important;
}

html.dark .td-polla-puntos.pts-zero,
body.theme-dark .td-polla-puntos.pts-zero {
  background: #14110e !important;
}
html.dark .td-polla-puntos.pts-zero *:not(.badge-pts-acierto):not(.badge-pts-zero),
body.theme-dark .td-polla-puntos.pts-zero *:not(.badge-pts-acierto):not(.badge-pts-zero) {
  color: #64748b !important; /* Gris tenue para ceros */
  font-weight: 600 !important;
}

html.dark .td-polla-total,
html.dark .td-polla-total *,
body.theme-dark .td-polla-total,
body.theme-dark .td-polla-total * {
  background: #33230b !important;
  color: #fde047 !important; /* Dorado intenso */
  font-weight: 900 !important;
  font-size: 15px !important;
  font-family: monospace !important;
}

html.dark .td-polla-acciones,
body.theme-dark .td-polla-acciones {
  background: #171310 !important;
}

/* 2. MODO DÍA (Ivory Marble & Champagne) */
html:not(.dark) .tabla-polla-oficial,
html.light .tabla-polla-oficial,
body.theme-light .tabla-polla-oficial {
  background-color: #ffffff !important;
  color: #1e293b !important;
}

html:not(.dark) .tabla-polla-oficial th, 
html:not(.dark) .tabla-polla-oficial td,
html.light .tabla-polla-oficial th, 
html.light .tabla-polla-oficial td,
body.theme-light .tabla-polla-oficial th, 
body.theme-light .tabla-polla-oficial td {
  border: 1px solid #d8caa8 !important;
}

/* Headers en modo día */
html:not(.dark) .th-polla-num, html.light .th-polla-num, body.theme-light .th-polla-num {
  background: #facc15 !important;
  color: #1c1917 !important;
  font-weight: 800 !important;
  width: 42px !important;
}
html:not(.dark) .th-polla-participante, html.light .th-polla-participante, body.theme-light .th-polla-participante {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  font-weight: 800 !important;
  min-width: 140px !important;
  text-align: left !important;
  padding-left: 8px !important;
}
html:not(.dark) .th-polla-carrera, html.light .th-polla-carrera, body.theme-light .th-polla-carrera {
  background: #fed7aa !important;
  color: #431407 !important;
  font-weight: 800 !important;
  width: 44px !important;
  border-left: 1px solid #cbd5e1 !important;
}
html:not(.dark) .th-polla-pt, html.light .th-polla-pt, body.theme-light .th-polla-pt {
  background: #bbf7d0 !important;
  color: #064e3b !important;
  font-weight: 800 !important;
  font-size: 10.5px !important;
  width: 38px !important;
  border-right: 1.5px solid #94a3b8 !important;
}
html:not(.dark) .th-polla-total, html.light .th-polla-total, body.theme-light .th-polla-total {
  background: #fef08a !important;
  color: #713f12 !important;
  font-weight: 900 !important;
  width: 65px !important;
  font-size: 13px !important;
}
html:not(.dark) .th-polla-acciones, html.light .th-polla-acciones, body.theme-light .th-polla-acciones {
  background: #f1f5f9 !important;
  color: #475569 !important;
  width: 55px !important;
}

/* Celdas en modo día con contraste perfecto y texto oscuro asegurado */
html:not(.dark) .td-polla-num,
html:not(.dark) .td-polla-num *,
html.light .td-polla-num,
html.light .td-polla-num *,
body.theme-light .td-polla-num,
body.theme-light .td-polla-num * {
  background: #fef9c3 !important;
  color: #713f12 !important;
  font-weight: 800 !important;
  font-size: 12px !important;
}

html:not(.dark) .td-polla-participante,
html:not(.dark) .td-polla-participante *,
html.light .td-polla-participante,
html.light .td-polla-participante *,
body.theme-light .td-polla-participante,
body.theme-light .td-polla-participante * {
  background: #f0f9ff !important;
  color: #0c4a6e !important;
  font-weight: 800 !important;
  font-size: 12.5px !important;
  text-align: left !important;
  padding-left: 8px !important;
}
html:not(.dark) .td-polla-participante small,
body.theme-light .td-polla-participante small {
  color: #64748b !important;
}

html:not(.dark) .td-polla-caballo,
html.light .td-polla-caballo,
body.theme-light .td-polla-caballo {
  background: #fff7ed !important;
  border-left: 1px solid #cbd5e1 !important;
}
html:not(.dark) .td-polla-caballo *:not(.gualdrapa-badge),
html.light .td-polla-caballo *:not(.gualdrapa-badge),
body.theme-light .td-polla-caballo *:not(.gualdrapa-badge) {
  color: #9a3412 !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  font-family: monospace !important;
}

html:not(.dark) .td-polla-puntos,
html.light .td-polla-puntos,
body.theme-light .td-polla-puntos {
  background: #f0fdf4 !important;
  border-right: 1.5px solid #94a3b8 !important;
}
html:not(.dark) .td-polla-puntos *:not(.badge-pts-acierto):not(.badge-pts-zero),
html.light .td-polla-puntos *:not(.badge-pts-acierto):not(.badge-pts-zero),
body.theme-light .td-polla-puntos *:not(.badge-pts-acierto):not(.badge-pts-zero) {
  color: #065f46 !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  font-family: monospace !important;
}

html:not(.dark) .td-polla-puntos.pts-zero,
html.light .td-polla-puntos.pts-zero,
body.theme-light .td-polla-puntos.pts-zero {
  background: #f8fafc !important;
}
html:not(.dark) .td-polla-puntos.pts-zero *:not(.badge-pts-acierto):not(.badge-pts-zero),
html.light .td-polla-puntos.pts-zero *:not(.badge-pts-acierto):not(.badge-pts-zero),
body.theme-light .td-polla-puntos.pts-zero *:not(.badge-pts-acierto):not(.badge-pts-zero) {
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

html:not(.dark) .td-polla-total,
html:not(.dark) .td-polla-total *,
html.light .td-polla-total,
html.light .td-polla-total *,
body.theme-light .td-polla-total,
body.theme-light .td-polla-total * {
  background: #fef08a !important;
  color: #854d0e !important;
  font-weight: 900 !important;
  font-size: 15px !important;
  font-family: monospace !important;
}

html:not(.dark) .td-polla-acciones,
html.light .td-polla-acciones,
body.theme-light .td-polla-acciones {
  background: #f8fafc !important;
}

/* Insignias de puntos y gualdrapas en tablas de pollas (admin y público) */
.gualdrapa-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

.badge-pts-acierto {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 4px !important;
  border-radius: 4px !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  background: rgba(74, 222, 128, 0.22) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(74, 222, 128, 0.5) !important;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.25) !important;
}

.badge-pts-zero {
  display: inline-block !important;
  color: rgba(255, 255, 255, 0.28) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

html:not(.dark) .badge-pts-acierto,
html.light .badge-pts-acierto,
body.theme-light .badge-pts-acierto {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
  box-shadow: none !important;
}

html:not(.dark) .badge-pts-zero,
html.light .badge-pts-zero,
body.theme-light .badge-pts-zero {
  color: #94a3b8 !important;
}

/* ==========================================================================
   BADGES DE TIPO DE CAMBIO (AUDITORÍA DE BALANCES) - MODO CLARO Y OSCURO
   ========================================================================== */
.badge-tipo-cambio {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
}

/* Modo Claro (Light Mode) */
html:not(.dark) .badge-tipo-cambio.badge-tipo-neutral,
html.light .badge-tipo-cambio.badge-tipo-neutral,
body.theme-light .badge-tipo-cambio.badge-tipo-neutral {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}

html:not(.dark) .badge-tipo-cambio.badge-tipo-ingreso,
html.light .badge-tipo-cambio.badge-tipo-ingreso,
body.theme-light .badge-tipo-cambio.badge-tipo-ingreso {
  background-color: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

html:not(.dark) .badge-tipo-cambio.badge-tipo-retiro,
html.light .badge-tipo-cambio.badge-tipo-retiro,
body.theme-light .badge-tipo-cambio.badge-tipo-retiro {
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

html:not(.dark) .badge-tipo-cambio.badge-tipo-traslado,
html.light .badge-tipo-cambio.badge-tipo-traslado,
body.theme-light .badge-tipo-cambio.badge-tipo-traslado {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

html:not(.dark) .badge-tipo-cambio.badge-tipo-ajuste,
html.light .badge-tipo-cambio.badge-tipo-ajuste,
body.theme-light .badge-tipo-cambio.badge-tipo-ajuste {
  background-color: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

/* Modo Noche (Dark Mode) */
html.dark .badge-tipo-cambio.badge-tipo-neutral,
body.theme-dark .badge-tipo-cambio.badge-tipo-neutral {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

html.dark .badge-tipo-cambio.badge-tipo-ingreso,
body.theme-dark .badge-tipo-cambio.badge-tipo-ingreso {
  background-color: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

html.dark .badge-tipo-cambio.badge-tipo-retiro,
body.theme-dark .badge-tipo-cambio.badge-tipo-retiro {
  background-color: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

html.dark .badge-tipo-cambio.badge-tipo-traslado,
body.theme-dark .badge-tipo-cambio.badge-tipo-traslado {
  background-color: rgba(59, 130, 246, 0.18) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
}

html.dark .badge-tipo-cambio.badge-tipo-ajuste,
body.theme-dark .badge-tipo-cambio.badge-tipo-ajuste {
  background-color: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

/* Neutralizar cualquier badge bg-light en modo oscuro para evitar texto blanco sobre fondo blanco */
html.dark .badge.bg-light,
body.theme-dark .badge.bg-light {
  background-color: rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

html.dark .badge.bg-light.text-dark,
body.theme-dark .badge.bg-light.text-dark {
  color: #f1f5f9 !important;
}

/* Neutralizar badge bg-light en modo claro para máxima nitidez */
html:not(.dark) .badge.bg-light.text-dark,
html.light .badge.bg-light.text-dark,
body.theme-light .badge.bg-light.text-dark {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}


