/* ═══════════════════════════════════════════════════════════════════
   liquid-glass.css — Piel Liquid Glass para Fiestas Patronales
   ───────────────────────────────────────────────────────────────────
   SOLO tema oscuro: todo va acotado bajo html[data-theme="dark"].
   El tema claro queda EXACTAMENTE como el original de Hueva (cero
   reglas aquí que lo toquen). Capa exclusivamente visual: nunca toca
   anchos, flex, display, position ni nada estructural o funcional.
   Rollback: comentar el <link> de este archivo en layout.php.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Tokens (solo oscuro) ─────────────────────────────────────── */
html[data-theme="dark"] {
  --violet: #7c5cf0;
  --violet-soft: #a48bff;
  --lg-rgb: 139, 104, 255;
  --lg-cian-rgb: 76, 201, 255;
  --radius: 16px;
  --radius-sm: 11px;

  --lg-edge:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
  --lg-sombra-panel:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 22px 55px -24px rgba(0, 0, 0, 0.9),
    0 10px 25px -16px rgba(0, 0, 0, 0.8);
  --lg-glow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(var(--lg-rgb), 0.30),
    0 0 34px -8px rgba(var(--lg-rgb), 0.55);

  --bg: #070811;
  /* Focos BAJO la zona de contenido (centro-derecha), no en esquinas
     vacías: el cristal necesita luz detrás que atravesar. */
  --bg-grad:
    radial-gradient(1100px 720px at 30% 12%, rgba(var(--lg-rgb), 0.28), transparent 60%),
    radial-gradient(950px 680px at 88% 78%, rgba(var(--lg-cian-rgb), 0.13), transparent 58%),
    radial-gradient(720px 560px at 60% 45%, rgba(88, 66, 210, 0.10), transparent 70%),
    linear-gradient(145deg, #070811 0%, #090b16 48%, #060711 100%);
  --panel: rgba(19, 21, 39, 0.60);
  --panel-border: rgba(199, 191, 255, 0.15);
  --panel-hover: rgba(27, 29, 53, 0.72);
  --text: #f7f5ff;
  --text-dim: #b9b7ce;
  --text-faint: #7a788f;
  --input-bg: rgba(8, 10, 22, 0.55);
}

/* ── 2. Atmósfera ────────────────────────────────────────────────── */
html[data-theme="dark"] body { background-attachment: fixed; }
html[data-theme="dark"] ::selection { background: var(--violet); color: #fff; }

html[data-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: transparent; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(var(--lg-rgb), 0.28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--lg-rgb), 0.45); }

/* ── 3. Superficies de cristal (receta del editor) ──────────────── */
html[data-theme="dark"] .glass,
html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .card-persona {
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.075),
      rgba(255, 255, 255, 0.018) 42%,
      rgba(119, 87, 255, 0.035)),
    rgba(13, 15, 31, 0.60);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  border: 1px solid rgba(199, 191, 255, 0.15);
  border-radius: 20px;
  box-shadow: var(--lg-sombra-panel);
}
html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .stat-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(var(--lg-rgb), 0.30),
    0 0 34px -8px rgba(var(--lg-rgb), 0.45),
    0 26px 65px -28px rgba(0, 0, 0, 0.95);
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar {
  background:
    linear-gradient(160deg,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0.015) 45%,
      rgba(119, 87, 255, 0.05)),
    rgba(13, 15, 31, 0.60);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  border-color: rgba(199, 191, 255, 0.15);
}
html[data-theme="dark"] .sidebar { box-shadow: inset -1px 0 0 rgba(var(--lg-rgb), 0.10), 8px 0 40px -24px rgba(var(--lg-rgb), 0.35); }
html[data-theme="dark"] .topbar { box-shadow: inset 0 -1px 0 rgba(var(--lg-rgb), 0.10), 0 8px 30px -18px rgba(0, 0, 0, 0.7); }

/* ── 4. Marca y navegación ──────────────────────────────────────── */
html[data-theme="dark"] .sidebar-brand .brand-icon {
  background: linear-gradient(135deg, var(--violet), #4cc9ff);
  box-shadow: var(--lg-edge), 0 6px 18px -6px rgba(var(--lg-rgb), 0.65);
}
html[data-theme="dark"] .sidebar-nav a { border-radius: var(--radius-sm); }
html[data-theme="dark"] .sidebar-nav a:hover { box-shadow: inset 0 0 0 1px rgba(var(--lg-rgb), 0.18); }
html[data-theme="dark"] .sidebar-nav a.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.06) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(140, 110, 250, 0.72) 0%, rgba(106, 77, 224, 0.72) 100%);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.35),
    inset 0 -3px 7px rgba(30, 12, 90, 0.40),
    0 8px 22px -8px rgba(var(--lg-rgb), 0.8);
  text-shadow: 0 1px 2px rgba(30, 12, 90, 0.5);
}

/* ── 5. Controles ───────────────────────────────────────────────── */
html[data-theme="dark"] .btn { box-shadow: var(--lg-edge); }
/* Cápsulas de cristal líquido: violeta TRASLÚCIDO (el fondo pasa
   desenfocado a través), brillo superior curvo tipo lente, hundido
   inferior interior y halo — el volumen 3D del Liquid Glass real. */
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-back {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.07) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(164, 139, 255, 0.78) 0%, rgba(124, 92, 240, 0.70) 55%, rgba(96, 66, 214, 0.78) 100%);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.38),
    inset 0 -3px 7px rgba(30, 12, 90, 0.45),
    0 10px 26px -10px rgba(var(--lg-rgb), 0.80),
    0 2px 6px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(30, 12, 90, 0.5);
}
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-back:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.10) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(180, 157, 255, 0.85) 0%, rgba(140, 110, 250, 0.78) 55%, rgba(110, 80, 230, 0.85) 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 7px rgba(30, 12, 90, 0.40),
    0 0 0 1px rgba(var(--lg-rgb), 0.35),
    0 0 30px -6px rgba(var(--lg-rgb), 0.65),
    0 12px 30px -10px rgba(var(--lg-rgb), 0.85);
}
html[data-theme="dark"] .btn-primary:active,
html[data-theme="dark"] .btn-back:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 8px rgba(20, 8, 60, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    0 4px 14px -8px rgba(var(--lg-rgb), 0.6);
}
html[data-theme="dark"] .btn-danger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(255, 107, 120, 0.82) 0%, rgba(255, 71, 87, 0.74) 60%, rgba(214, 42, 60, 0.82) 100%);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.35),
    inset 0 -3px 7px rgba(96, 10, 22, 0.45),
    0 10px 26px -10px rgba(255, 71, 87, 0.65),
    0 2px 6px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(96, 10, 22, 0.5);
}
html[data-theme="dark"] .btn-disabled { box-shadow: none; }

html[data-theme="dark"] .topbar-search,
html[data-theme="dark"] .selector-anio select,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  border-color: rgba(199, 191, 255, 0.16);
  background-color: rgba(8, 10, 22, 0.55);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}
html[data-theme="dark"] .topbar-search input { background: transparent; box-shadow: none; border: none; }
html[data-theme="dark"] .topbar-search:focus-within,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  outline: none;
  border-color: rgba(var(--lg-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--lg-rgb), 0.18);
}

html[data-theme="dark"] .tab { border-radius: 999px; }
html[data-theme="dark"] .tab.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.06) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(140, 110, 250, 0.75), rgba(106, 77, 224, 0.75));
  color: #fff;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.35),
    inset 0 -3px 7px rgba(30, 12, 90, 0.40),
    0 8px 20px -8px rgba(var(--lg-rgb), 0.8);
  text-shadow: 0 1px 2px rgba(30, 12, 90, 0.5);
}

/* ── 6. Datos ───────────────────────────────────────────────────── */
html[data-theme="dark"] .data-table tbody tr:hover { background: rgba(var(--lg-rgb), 0.07); }
html[data-theme="dark"] .row-cobrado { background: rgba(0, 201, 167, 0.07); }
html[data-theme="dark"] .badge-primary { background: rgba(var(--lg-rgb), 0.16); color: var(--violet-soft); }
html[data-theme="dark"] .stat-icon { box-shadow: var(--lg-edge); }
html[data-theme="dark"] .avatar-chip .av {
  background: linear-gradient(135deg, var(--violet), #4cc9ff);
  box-shadow: var(--lg-edge);
}

/* ── 7. Modales y alertas ───────────────────────────────────────── */
html[data-theme="dark"] .modal-overlay {
  background: rgba(5, 6, 14, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
html[data-theme="dark"] .alert { box-shadow: var(--lg-edge); border: 1px solid var(--panel-border); }

/* ── 8. Firmas del editor ───────────────────────────────────────── */
html[data-theme="dark"] .page-header h1,
html[data-theme="dark"] .sidebar-brand .brand-text b {
  text-shadow: 0 0 24px rgba(var(--lg-rgb), 0.35);
}
html[data-theme="dark"] .stat-value { text-shadow: 0 0 18px rgba(var(--lg-rgb), 0.22); }

/* ── 9. Accesibilidad ───────────────────────────────────────────── */
html[data-theme="dark"] :focus-visible { outline: 2px solid rgba(var(--lg-rgb), 0.7); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ── Pastillas de iniciales (A–Z y TODOS): cápsulas de cristal ──── */
html[data-theme="dark"] .inicial-tag {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(140, 110, 250, 0.72), rgba(106, 77, 224, 0.72));
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2.5px 6px rgba(30, 12, 90, 0.42),
    0 6px 16px -7px rgba(var(--lg-rgb), 0.7);
  text-shadow: 0 1px 2px rgba(30, 12, 90, 0.5);
}
html[data-theme="dark"] .inicial-tag:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.09) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(164, 139, 255, 0.82), rgba(124, 92, 240, 0.80));
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2.5px 6px rgba(30, 12, 90, 0.36),
    0 0 22px -5px rgba(var(--lg-rgb), 0.6),
    0 8px 18px -7px rgba(var(--lg-rgb), 0.8);
}
html[data-theme="dark"] .inicial-tag.activa,
html[data-theme="dark"] .inicial-tag.all {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.07) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(46, 224, 190, 0.80), rgba(0, 176, 145, 0.80));
  border: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.40),
    inset 0 -2.5px 6px rgba(4, 74, 60, 0.50),
    0 6px 18px -7px rgba(0, 201, 167, 0.75);
  text-shadow: 0 1px 2px rgba(4, 74, 60, 0.55);
}

/* ═══════════════════════════════════════════════════════════════════
   LIQUID GLASS WHITE — tema claro "escarcha"
   Mismo lenguaje que el oscuro: atmósfera con auroras, cristal
   translúcido con blur, cápsulas-lente. Sobre blanco el volumen lo
   dan las sombras violeta coloreadas y los bordes de luz fría.
   ═══════════════════════════════════════════════════════════════════ */
html[data-theme="light"] {
  --violet: #6a4de8;
  --violet-soft: #8f76ff;
  --lg-rgb: 122, 92, 240;
  --lg-cian-rgb: 46, 168, 235;
  --radius: 16px;
  --radius-sm: 11px;

  --bg: #eef0fb;
  --bg-grad:
    radial-gradient(1100px 720px at 30% 10%, rgba(var(--lg-rgb), 0.17), transparent 60%),
    radial-gradient(950px 680px at 88% 80%, rgba(var(--lg-cian-rgb), 0.13), transparent 58%),
    radial-gradient(720px 560px at 62% 42%, rgba(150, 120, 255, 0.09), transparent 70%),
    linear-gradient(150deg, #f8f7ff 0%, #eef0fb 52%, #e6e6f9 100%);
  --panel: rgba(255, 255, 255, 0.55);
  --panel-border: rgba(120, 96, 230, 0.20);
  --panel-hover: rgba(255, 255, 255, 0.78);
  --text: #17122e;
  --text-dim: rgba(23, 18, 46, 0.62);
  --text-faint: rgba(23, 18, 46, 0.36);
  --input-bg: rgba(255, 255, 255, 0.55);
}

html[data-theme="light"] body { background-attachment: fixed; }
html[data-theme="light"] ::selection { background: var(--violet); color: #fff; }

html[data-theme="light"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: transparent; }
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(var(--lg-rgb), 0.32);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--lg-rgb), 0.5); }

/* Cristal escarchado: blanco lechoso translúcido, luz superior nítida,
   sombra violeta suave en vez de negra (el volumen en claro es color) */
html[data-theme="light"] .glass,
html[data-theme="light"] .card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .modal-card,
html[data-theme="light"] .login-card,
html[data-theme="light"] .card-persona {
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.85),
      rgba(255, 255, 255, 0.45) 42%,
      rgba(190, 172, 255, 0.22)),
    rgba(255, 255, 255, 0.40);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(120, 96, 230, 0.20);
  border-radius: 20px;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(120, 96, 230, 0.10),
    0 18px 45px -20px rgba(74, 52, 168, 0.30),
    0 6px 18px -10px rgba(74, 52, 168, 0.18);
}
html[data-theme="light"] .card:hover,
html[data-theme="light"] .stat-card:hover {
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 1),
    0 0 0 1px rgba(var(--lg-rgb), 0.28),
    0 0 34px -8px rgba(var(--lg-rgb), 0.35),
    0 22px 55px -22px rgba(74, 52, 168, 0.38);
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .topbar {
  background:
    linear-gradient(160deg,
      rgba(255, 255, 255, 0.88),
      rgba(255, 255, 255, 0.55) 45%,
      rgba(198, 182, 255, 0.25)),
    rgba(255, 255, 255, 0.40);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-color: rgba(120, 96, 230, 0.18);
}
html[data-theme="light"] .sidebar { box-shadow: inset -1px 0 0 rgba(var(--lg-rgb), 0.12), 8px 0 40px -26px rgba(74, 52, 168, 0.35); }
html[data-theme="light"] .topbar { box-shadow: inset 0 -1px 0 rgba(var(--lg-rgb), 0.12), 0 8px 30px -20px rgba(74, 52, 168, 0.30); }

html[data-theme="light"] .sidebar-brand .brand-icon {
  background: linear-gradient(135deg, var(--violet), #35b6ff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 6px 18px -6px rgba(var(--lg-rgb), 0.55);
}
html[data-theme="light"] .sidebar-nav a { border-radius: var(--radius-sm); }
html[data-theme="light"] .sidebar-nav a:hover { box-shadow: inset 0 0 0 1px rgba(var(--lg-rgb), 0.22); }
html[data-theme="light"] .sidebar-nav a.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(122, 92, 240, 0.88), rgba(96, 66, 220, 0.88));
  color: #fff;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.50),
    inset 0 -3px 7px rgba(40, 20, 110, 0.35),
    0 8px 22px -8px rgba(var(--lg-rgb), 0.55);
  text-shadow: 0 1px 2px rgba(40, 20, 110, 0.45);
}

/* Cápsulas: mismas lentes que en oscuro, violeta algo más profundo
   para contrastar sobre fondo claro */
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .btn-back {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.10) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(143, 118, 255, 0.90) 0%, rgba(106, 77, 232, 0.85) 55%, rgba(84, 56, 205, 0.90) 100%);
  color: #fff;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 7px rgba(40, 20, 110, 0.38),
    0 10px 26px -10px rgba(var(--lg-rgb), 0.55),
    0 2px 6px rgba(74, 52, 168, 0.20);
  text-shadow: 0 1px 2px rgba(40, 20, 110, 0.45);
}
html[data-theme="light"] .btn-primary:hover,
html[data-theme="light"] .btn-back:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.13) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(160, 138, 255, 0.94), rgba(122, 92, 245, 0.90) 55%, rgba(98, 68, 222, 0.94));
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.65),
    inset 0 -3px 7px rgba(40, 20, 110, 0.32),
    0 0 0 1px rgba(var(--lg-rgb), 0.30),
    0 0 30px -6px rgba(var(--lg-rgb), 0.45),
    0 12px 30px -10px rgba(var(--lg-rgb), 0.60);
}
html[data-theme="light"] .btn-primary:active,
html[data-theme="light"] .btn-back:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 8px rgba(30, 14, 90, 0.40),
    inset 0 -1px 0 rgba(255, 255, 255, 0.25),
    0 4px 14px -8px rgba(var(--lg-rgb), 0.45);
}
html[data-theme="light"] .btn-danger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.09) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(255, 99, 113, 0.90), rgba(240, 55, 74, 0.86) 60%, rgba(205, 36, 55, 0.90));
  color: #fff;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 7px rgba(110, 12, 26, 0.4),
    0 10px 26px -10px rgba(240, 55, 74, 0.45),
    0 2px 6px rgba(110, 12, 26, 0.18);
  text-shadow: 0 1px 2px rgba(110, 12, 26, 0.45);
}
html[data-theme="light"] .btn-secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55)),
    rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(120, 96, 230, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 16px -9px rgba(74, 52, 168, 0.30);
}

html[data-theme="light"] .topbar-search,
html[data-theme="light"] .selector-anio select,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  border-color: rgba(120, 96, 230, 0.22);
  background-color: rgba(255, 255, 255, 0.60);
  box-shadow: inset 0 2px 5px rgba(74, 52, 168, 0.10), inset 0 -1px 0 rgba(255, 255, 255, 0.9);
}
html[data-theme="light"] .topbar-search input { background: transparent; box-shadow: none; border: none; }
html[data-theme="light"] .topbar-search:focus-within,
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  outline: none;
  border-color: rgba(var(--lg-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--lg-rgb), 0.16);
}

html[data-theme="light"] .tab { border-radius: 999px; }
html[data-theme="light"] .tab.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(122, 92, 240, 0.90), rgba(96, 66, 220, 0.90));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.50),
    inset 0 -3px 7px rgba(40, 20, 110, 0.35),
    0 8px 20px -8px rgba(var(--lg-rgb), 0.5);
  text-shadow: 0 1px 2px rgba(40, 20, 110, 0.4);
}

html[data-theme="light"] .data-table tbody tr:hover { background: rgba(var(--lg-rgb), 0.06); }
html[data-theme="light"] .row-cobrado { background: rgba(0, 176, 145, 0.08); }
html[data-theme="light"] .badge-primary { background: rgba(var(--lg-rgb), 0.14); color: #5a3fd6; }
html[data-theme="light"] .avatar-chip .av {
  background: linear-gradient(135deg, var(--violet), #35b6ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

html[data-theme="light"] .modal-overlay {
  background: rgba(60, 50, 120, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
html[data-theme="light"] .alert { border: 1px solid rgba(120, 96, 230, 0.20); box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 8px 20px -12px rgba(74, 52, 168, 0.25); }

/* Pastillas de iniciales en claro: lente violeta y activa teal */
html[data-theme="light"] .inicial-tag {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.09) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(133, 106, 250, 0.88), rgba(102, 72, 228, 0.88));
  color: #fff;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2.5px 6px rgba(40, 20, 110, 0.35),
    0 6px 16px -8px rgba(var(--lg-rgb), 0.5);
  text-shadow: 0 1px 2px rgba(40, 20, 110, 0.4);
}
html[data-theme="light"] .inicial-tag:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.12) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(155, 132, 255, 0.92), rgba(120, 90, 244, 0.92));
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2.5px 6px rgba(40, 20, 110, 0.3),
    0 0 20px -5px rgba(var(--lg-rgb), 0.45),
    0 8px 18px -8px rgba(var(--lg-rgb), 0.6);
}
html[data-theme="light"] .inicial-tag.activa,
html[data-theme="light"] .inicial-tag.all {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.10) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(20, 200, 168, 0.90), rgba(0, 158, 130, 0.90));
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2.5px 6px rgba(3, 66, 54, 0.45),
    0 6px 18px -8px rgba(0, 176, 145, 0.55);
  text-shadow: 0 1px 2px rgba(3, 66, 54, 0.5);
}

html[data-theme="light"] .page-header h1,
html[data-theme="light"] .sidebar-brand .brand-text b {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 22px rgba(var(--lg-rgb), 0.20);
}
html[data-theme="light"] :focus-visible { outline: 2px solid rgba(var(--lg-rgb), 0.6); outline-offset: 2px; }

/* ── Botones de cuota: cápsulas por categoría ────────────────────
   El markup lleva "btn-cuota glass": la regla genérica de .glass
   pisaba el hover violeta original (especificidad). Se reafirman
   aquí los tres estados por categoría, como cápsulas de cristal:
   16-65 violeta, 14-15 ámbar, +65 teal. ── */
html[data-theme="dark"] .btn-cuota.glass:hover,
html[data-theme="dark"] .btn-cuota.glass.selected,
html[data-theme="dark"] .btn-cuota.glass:has(input:checked),
html[data-theme="light"] .btn-cuota.glass:hover,
html[data-theme="light"] .btn-cuota.glass.selected,
html[data-theme="light"] .btn-cuota.glass:has(input:checked) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(140, 110, 250, 0.85), rgba(102, 72, 228, 0.85));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.40);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 7px rgba(40, 20, 110, 0.40),
    0 10px 24px -9px rgba(var(--lg-rgb), 0.65);
  text-shadow: 0 1px 2px rgba(40, 20, 110, 0.45);
}
html[data-theme="dark"] .btn-cuota.glass.cat-amber:hover,
html[data-theme="dark"] .btn-cuota.glass.cat-amber.selected,
html[data-theme="dark"] .btn-cuota.glass.cat-amber:has(input:checked),
html[data-theme="light"] .btn-cuota.glass.cat-amber:hover,
html[data-theme="light"] .btn-cuota.glass.cat-amber.selected,
html[data-theme="light"] .btn-cuota.glass.cat-amber:has(input:checked) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.10) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(255, 205, 66, 0.92), rgba(232, 168, 12, 0.92));
  color: #1a1200;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 7px rgba(120, 82, 0, 0.40),
    0 10px 24px -9px rgba(255, 193, 7, 0.55);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}
html[data-theme="dark"] .btn-cuota.glass.cat-teal:hover,
html[data-theme="dark"] .btn-cuota.glass.cat-teal.selected,
html[data-theme="dark"] .btn-cuota.glass.cat-teal:has(input:checked),
html[data-theme="light"] .btn-cuota.glass.cat-teal:hover,
html[data-theme="light"] .btn-cuota.glass.cat-teal.selected,
html[data-theme="light"] .btn-cuota.glass.cat-teal:has(input:checked) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(24, 206, 172, 0.88), rgba(0, 162, 133, 0.88));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.50),
    inset 0 -3px 7px rgba(3, 66, 54, 0.45),
    0 10px 24px -9px rgba(0, 201, 167, 0.6);
  text-shadow: 0 1px 2px rgba(3, 66, 54, 0.5);
}

/* ── Impresión: papel blanco limpio ──────────────────────────────
   La piel entera se apaga al imprimir: fondo blanco, sin cristales,
   sin sombras, sin brillos — el ticket sale como documento, no como
   captura de pantalla oscura. ── */
@media print {
  html, body,
  html[data-theme="dark"], html[data-theme="dark"] body,
  html[data-theme="light"], html[data-theme="light"] body {
    background: #ffffff !important;
    color: #111 !important;
  }
  * {
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .glass, .card, .stat-card, .modal-card, .login-card, .card-persona,
  .sidebar, .topbar {
    background: #ffffff !important;
    border-color: #d8d8e2 !important;
  }
}

/* ── Panel de búsqueda en vivo ──────────────────────────────────── */
.livesearch-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 500;
  border-radius: 14px;
  overflow: hidden;
  max-height: 340px;
  overflow-y: auto;
}
.livesearch-item {
  display: block;
  padding: .65rem .95rem;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
}
html[data-theme="dark"] .livesearch-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018) 42%, rgba(119, 87, 255, 0.035)),
    rgba(13, 15, 31, 0.88);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  border: 1px solid rgba(199, 191, 255, 0.18);
  box-shadow: var(--lg-sombra-panel);
}
html[data-theme="dark"] .livesearch-item { color: var(--text); }
html[data-theme="dark"] .livesearch-item:hover { background: rgba(var(--lg-rgb), 0.18); }
html[data-theme="light"] .livesearch-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.75) 42%, rgba(198, 182, 255, 0.35)),
    rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(120, 96, 230, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 18px 45px -18px rgba(74, 52, 168, 0.35);
}
html[data-theme="light"] .livesearch-item { color: var(--text); }
html[data-theme="light"] .livesearch-item:hover { background: rgba(var(--lg-rgb), 0.10); }
@media print { .livesearch-panel { display: none !important; } }

/* ── Fila separadora de inicial en el listado de personas ───────── */
.fila-inicial td { padding: .8rem .4rem .35rem !important; border-bottom: none !important; }
.fila-inicial .avatar-mini { display: inline-flex; }
.fila-inicial:hover { background: transparent !important; }

/* ── Registro de actividad: resumen en negrita, detalle de cambios en
   lista pequeña debajo — dentro de la misma celda "Registro" ──────── */
.registro-evento { font-weight: 600; }
.registro-detalle { margin: .35rem 0 0; padding-left: 1.1rem; font-size: .8rem; color: var(--text-dim); }
.registro-detalle li { margin-bottom: .15rem; }


/* ── Cancelar con el mismo rojo que Eliminar (petición de Chas) ──── */
html[data-theme="dark"] .btn-ghost {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(255, 107, 120, 0.82) 0%, rgba(255, 71, 87, 0.74) 60%, rgba(214, 42, 60, 0.82) 100%);
  color: #fff;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.35),
    inset 0 -3px 7px rgba(96, 10, 22, 0.45),
    0 10px 26px -10px rgba(255, 71, 87, 0.65),
    0 2px 6px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(96, 10, 22, 0.5);
}
html[data-theme="dark"] .btn-ghost:hover {
  filter: brightness(1.08);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 7px rgba(96, 10, 22, 0.40),
    0 0 22px -6px rgba(255, 71, 87, 0.55),
    0 12px 28px -10px rgba(255, 71, 87, 0.7);
}
html[data-theme="light"] .btn-ghost {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.09) 46%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(135deg, rgba(255, 99, 113, 0.90), rgba(240, 55, 74, 0.86) 60%, rgba(205, 36, 55, 0.90));
  color: #fff;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 7px rgba(110, 12, 26, 0.4),
    0 10px 26px -10px rgba(240, 55, 74, 0.45),
    0 2px 6px rgba(110, 12, 26, 0.18);
  text-shadow: 0 1px 2px rgba(110, 12, 26, 0.45);
}
html[data-theme="light"] .btn-ghost:hover { filter: brightness(1.06); }

/* ── Icono de lápiz junto al nombre (editar datos de la persona) ─── */
.row-edit-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  color: var(--text-faint); text-decoration: none; margin-left: .3rem;
}
.row-edit-icon svg { width: 14px; height: 14px; }
html[data-theme="dark"] .row-edit-icon:hover { background: rgba(var(--lg-rgb), 0.16); color: var(--text); }
html[data-theme="light"] .row-edit-icon:hover { background: rgba(var(--lg-rgb), 0.10); color: var(--text); }

/* ── Persona eliminada (borrado lógico): gris + tachado, solo el admin
   la ve — para poder revivirla marcándola de nuevo como Activo. ────── */
.row-eliminado .row-name-link { text-decoration: line-through; }

/* ── Botón de copiar la clave del 2FA: icono neutro, sin el color de
   peligro que ahora lleva btn-ghost — copiar no es "cancelar". ──────── */
.btn-icono-copiar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--panel-border);
  background: transparent; color: var(--text-dim); cursor: pointer; padding: 0; flex-shrink: 0;
}
html[data-theme="dark"] .btn-icono-copiar:hover { background: rgba(var(--lg-rgb), 0.14); color: var(--text); border-color: rgba(var(--lg-rgb), 0.35); }
html[data-theme="light"] .btn-icono-copiar:hover { background: rgba(var(--lg-rgb), 0.08); color: var(--text); border-color: rgba(var(--lg-rgb), 0.30); }
