/* =====================================================================
   SULICOR SAS · Premios Pa' Las Que Sea
   Sistema visual: tokens → base → layout → componentes → pantallas
   Identidad de GALA: fondos oscuros + dorado #D4AF37 / #EEDC82 + borgoña #B3001B
   + blanco hueso. El verde SULICOR #0A8644 queda como color institucional
   secundario (éxito, confirmaciones, detalles de marca).
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  color-scheme: dark;

  /* ---- Paleta oficial (referencias de diseño) ---- */
  --gold: #d4af37; /* DORADO PRINCIPAL · premiación */
  --gold-light: #eedc82; /* DORADO CLARO · highlights, hover, brillos */
  --gold-deep: #9c7a1f; /* sombra del dorado (profundidad en degradados) */
  --burgundy: #b3001b; /* BORGOÑA · gala, ceremonia, escenario */
  --burgundy-600: #8e0016;
  --burgundy-800: #4a0710;
  --burgundy-900: #22070b;
  --bone: #f4ede0; /* BLANCO HUESO · texto y claros principales */
  --sulicor: #0a8644; /* VERDE SULICOR · institucional secundario */
  --sulicor-text: #5cc48f; /* verde legible sobre fondo oscuro */
  --charcoal: #121010;

  /* Marca: el acento principal pasa a ser el DORADO (los nombres se conservan) */
  --brand: var(--gold);
  --brand-600: var(--gold-light); /* hover */
  --brand-700: var(--gold-light); /* texto de acento sobre superficies oscuras */
  --brand-800: var(--gold-light);
  --brand-900: #2a2108;
  --brand-400: #b8952f; /* dorado atenuado (barras secundarias) */
  --brand-200: rgba(212, 175, 55, 0.38);
  --brand-100: rgba(212, 175, 55, 0.22);
  --brand-50: rgba(212, 175, 55, 0.1);
  --brand-ring: rgba(212, 175, 55, 0.32);
  --on-brand: #1a1408; /* texto sobre dorado */
  --gold-gradient: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 55%, var(--gold-deep) 100%);
  --gala-gradient: radial-gradient(120% 140% at 100% 0%, #c0102a 0%, var(--burgundy-600) 34%, var(--burgundy-800) 70%, var(--burgundy-900) 100%);
  /* Contenedor de bienvenida de cada inicio: satín rojo (public/img/rojo satin.jpg) bajo un velo
     oscuro a la izquierda (donde va el texto) que deja ver el brillo de la tela a la derecha. */
  --satin-image: url('/admin/img/rojo%20satin.jpg');
  --satin-veil: linear-gradient(100deg, rgba(20, 6, 8, 0.82) 0%, rgba(40, 6, 12, 0.55) 48%, rgba(40, 6, 12, 0.18) 100%);

  /* Acento de premiación */
  --gold-600: var(--gold); /* texto dorado */
  --gold-50: rgba(212, 175, 55, 0.1);

  /* Neutros (fondo oscuro / carbón + blanco hueso) */
  --ink: var(--bone);
  --ink-2: #cfc6b5;
  --muted: #9c9384;
  --line: rgba(212, 175, 55, 0.16);
  --line-2: rgba(244, 237, 224, 0.07);
  --bg: #0d0b0b;
  --surface: #171413;
  --surface-2: #1f1b19;
  --field: #1b1715;
  --track: rgba(244, 237, 224, 0.08);

  /* Estados (integrados a la paleta: sin azules, amarillos ni rojos saturados) */
  --success: var(--sulicor);
  --success-text: var(--sulicor-text);
  --success-bg: rgba(10, 134, 68, 0.16);
  --warning: var(--gold-light);
  --warning-bg: rgba(238, 220, 130, 0.12);
  --danger: var(--burgundy);
  --danger-text: #f08a97; /* borgoña legible sobre fondo oscuro */
  --danger-bg: rgba(179, 0, 27, 0.18);
  --info: var(--ink-2);
  --info-bg: rgba(244, 237, 224, 0.08);
  --violet: #f3b6bf;
  --violet-bg: rgba(179, 0, 27, 0.14);

  /* Forma */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
  --sh-2: 0 10px 26px rgba(0, 0, 0, 0.45);
  --sh-3: 0 28px 70px rgba(0, 0, 0, 0.6);
  --glow-gold: 0 8px 24px rgba(212, 175, 55, 0.22);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Tipografía */
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', ui-monospace, Consolas, 'Courier New', monospace;

  /* Compatibilidad con nombres anteriores */
  --primary: var(--brand);
  --primary-dark: var(--brand-700);
  --text: var(--ink);
  --text-muted: var(--muted);
  --border: var(--line);
  --radius: var(--r);
  --shadow: var(--sh-1);

  /* Gráficos */
  --series-1: var(--gold);
  --series-neutral: rgba(244, 237, 224, 0.16);
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  /* Fondo carbón con iluminación ambiental (escenario): nunca negro plano. */
  background: radial-gradient(1100px 620px at 92% -12%, rgba(179, 0, 27, 0.12), transparent 62%),
    radial-gradient(900px 520px at 8% -8%, rgba(212, 175, 55, 0.06), transparent 60%),
    linear-gradient(180deg, #110e0e 0%, var(--bg) 60%);
  background-attachment: fixed;
  background-color: var(--bg);
  color: var(--ink);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
}
h1,
h2,
h3,
h4 {
  color: var(--ink);
  letter-spacing: -0.01em;
}
.muted {
  color: var(--muted);
}
.icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
::selection {
  background: rgba(212, 175, 55, 0.35);
  color: var(--bone);
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.4);
  background-clip: padding-box;
}

/* ---------- Logos oficiales ----------
   Marco con la proporción de la zona útil del logo (aspect-ratio en línea, ver auth.js).
   El tamaño se define SIEMPRE por ancho: el alto se deriva y la imagen escala uniforme. */
.logo-frame {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  flex-shrink: 0;
}
.logo-frame img {
  position: absolute;
  display: block;
  height: auto;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}
.premios-logo img {
  /* brillo dorado sobre fondos oscuros */
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.45));
}
.brand-logo-fallback {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--sulicor); /* identidad institucional SULICOR */
  font-size: 18px;
}
.brand-logo-fallback small {
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--muted);
}

/* =====================================================================
   SIDEBAR
   ===================================================================== */
.sidebar {
  width: 264px;
  flex-shrink: 0;
  /* Negro carbón → borgoña muy oscuro: telón de escenario. */
  background: linear-gradient(180deg, #1c0a0d 0%, #140d0e 38%, #0c0a0a 100%);
  color: var(--bone);
  display: flex;
  flex-direction: column;
  padding: 20px 16px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 60;
  border-right: 1px solid rgba(212, 175, 55, 0.18);
  box-shadow: 10px 0 34px rgba(0, 0, 0, 0.45);
}
.sidebar::before {
  /* brillo sutil tipo "luz de escenario" (dorado) */
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 280px;
  background: radial-gradient(ellipse at 30% -10%, rgba(238, 220, 130, 0.14), transparent 65%);
  pointer-events: none;
}
.sidebar .logo-plate {
  position: relative;
  background: var(--bone);
  border-radius: var(--r);
  padding: 14px 16px;
  margin: 2px 4px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  /* filete verde SULICOR: identidad institucional junto al logo */
  border-bottom: 3px solid var(--sulicor);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.sidebar .logo-plate .brand-logo {
  width: 150px;
}
/* Identidad de la plataforma: logo oficial de Premios. */
.sidebar .app-name {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 2px 10px 10px;
}
.sidebar .app-name .premios-logo {
  width: 112px;
}
.sidebar .nav-label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.72);
  font-weight: 600;
  padding: 8px 12px 6px;
}
.sidebar nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(244, 237, 224, 0.82);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}
.sidebar nav a .icon {
  opacity: 0.9;
  color: rgba(212, 175, 55, 0.85);
}
.sidebar nav a:hover {
  background: rgba(212, 175, 55, 0.09);
  color: var(--bone);
}
/* Navegación activa: borgoña de gala con filete dorado. */
.sidebar nav a.active {
  background: linear-gradient(90deg, var(--burgundy) 0%, var(--burgundy-600) 100%);
  color: var(--bone);
  font-weight: 650;
  box-shadow: inset 3px 0 0 var(--gold), 0 8px 20px rgba(179, 0, 27, 0.28);
}
.sidebar nav a.active .icon {
  opacity: 1;
  color: var(--gold-light);
}
.sidebar .footer-note {
  position: relative;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
}
.sidebar .user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 12px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
}
.sidebar .user-chip .avatar {
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold-light);
  border-color: rgba(212, 175, 55, 0.45);
}
.sidebar .user-chip .n {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}
.sidebar .user-chip .r {
  font-size: 11px;
  color: rgba(212, 175, 55, 0.8);
  letter-spacing: 0.06em;
}
.sidebar .logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(0, 0, 0, 0.2);
  color: var(--bone);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}
.sidebar .logout-btn:hover {
  background: rgba(179, 0, 27, 0.22);
  border-color: rgba(179, 0, 27, 0.6);
}
.nav-toggle,
.sidebar-backdrop {
  display: none;
}

/* =====================================================================
   LAYOUT PRINCIPAL
   ===================================================================== */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  animation: pageIn 0.35s var(--ease) both;
}
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.topbar {
  background: linear-gradient(180deg, rgba(20, 16, 15, 0.92), rgba(13, 11, 11, 0.86));
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(212, 175, 55, 0.06), 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar h1 {
  font-size: 22px;
  font-weight: 750;
  margin: 0;
  color: var(--bone);
}
.topbar .subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.topbar > div:last-child:not(:first-child) {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.content {
  padding: 28px 32px 40px;
  flex: 1;
}
.breadcrumb {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 4px;
}
.breadcrumb a {
  color: var(--brand);
  font-weight: 600;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 30px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

/* =====================================================================
   COMPONENTES
   ===================================================================== */

/* ---------- Cards ---------- */
.card {
  /* superficie carbón con un brillo superior muy suave (no negro plano) */
  background: linear-gradient(180deg, rgba(244, 237, 224, 0.025), transparent 120px), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 22px;
}
.card h3 {
  margin-top: 0;
}

/* ---------- KPI / stat cards ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  position: relative;
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.06), transparent 55%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.stat-card::before {
  /* filete dorado superior: indicador "premium" */
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.7), transparent);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
  border-color: rgba(212, 175, 55, 0.3);
}
.stat-card .label {
  padding-right: 46px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-card .value {
  font-size: 30px;
  font-weight: 750;
  margin-top: 6px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-card .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.stat-card .kpi-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-50);
  color: var(--gold);
  border: 1px solid var(--brand-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-card.accent-blue .value,
.stat-card.accent-green .value {
  color: var(--gold-light);
}
.stat-card.accent-amber .value {
  color: var(--gold);
}
.stat-card.accent-slate .value {
  color: var(--ink);
}

/* ---------- Botones ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  /* Botón principal: dorado de premiación (degradado moderado dorado → dorado claro) */
  background: linear-gradient(180deg, #e2c35a 0%, var(--gold) 100%);
  color: var(--on-brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: background 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.12s var(--ease),
    border-color 0.18s var(--ease), color 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  background: linear-gradient(180deg, #f6e9a8 0%, var(--gold-light) 100%);
  box-shadow: var(--glow-gold);
  transform: translateY(-1px);
}
.btn:active {
  background: var(--gold);
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.btn:focus-visible,
.link-btn:focus-visible,
.sidebar nav a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(26, 20, 8, 0.3);
  border-top-color: var(--on-brand);
  animation: spin 0.7s linear infinite;
}
.btn.btn-secondary.is-loading::after {
  border-color: var(--line);
  border-top-color: var(--brand);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.btn.btn-sm {
  padding: 6px 11px;
  font-size: 12.5px;
  border-radius: 8px;
}
.btn.btn-lg {
  padding: 14px 26px;
  font-size: 14.5px;
  border-radius: 12px;
  letter-spacing: 0.03em;
}
.btn.btn-block {
  width: 100%;
}
.btn.btn-secondary {
  background: var(--surface-2);
  color: var(--ink);
  border-color: rgba(212, 175, 55, 0.24);
  box-shadow: var(--sh-1);
}
.btn.btn-secondary:hover {
  background: #26211e;
  color: var(--gold-light);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: var(--sh-1);
}
.btn.btn-secondary:active {
  background: #2c2622;
}
.btn.btn-ghost {
  background: transparent;
  color: var(--gold-light);
  box-shadow: none;
}
.btn.btn-ghost:hover {
  background: var(--brand-50);
}
.btn.btn-light {
  background: var(--bone);
  color: var(--on-brand);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.btn.btn-light:hover {
  background: #fffaf0;
}
/* Éxito / confirmación: verde institucional SULICOR */
.btn.btn-success {
  background: var(--sulicor);
  color: var(--bone);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn.btn-success:hover {
  background: #0b9a4e;
  box-shadow: 0 8px 22px rgba(10, 134, 68, 0.28);
}
.btn.btn-warning {
  background: var(--gold-light);
  color: var(--on-brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.btn.btn-warning:hover {
  background: #f6e9a8;
  box-shadow: var(--glow-gold);
}
/* Error / acciones destructivas: borgoña */
.btn.btn-danger {
  background: var(--burgundy);
  color: var(--bone);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn.btn-danger:hover {
  background: #c8102e;
  box-shadow: 0 8px 22px rgba(179, 0, 27, 0.32);
}
.btn.btn-outline-danger {
  background: transparent;
  color: var(--danger-text);
  border-color: rgba(179, 0, 27, 0.55);
  box-shadow: none;
}
.btn.btn-outline-danger:hover {
  background: var(--danger-bg);
}
.actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.link-btn {
  background: none;
  border: none;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  border-radius: 4px;
}
.link-btn:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* ---------- Tablas ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r);
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(212, 175, 55, 0.85);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  white-space: nowrap;
}
thead th:first-child {
  border-top-left-radius: 10px;
}
thead th:last-child {
  border-top-right-radius: 10px;
}
tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
tbody tr {
  transition: background 0.15s;
}
tbody tr:hover {
  background: rgba(212, 175, 55, 0.05);
}
tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}
/* Pendiente / advertencia: dorado claro */
.badge-pending {
  background: var(--warning-bg);
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px rgba(238, 220, 130, 0.22);
}
/* Activo: dorado (estado activo de premiación) */
.badge-active {
  background: var(--brand-50);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--brand-200);
}
.badge-finished {
  background: rgba(244, 237, 224, 0.06);
  color: #b3aa9a;
  box-shadow: inset 0 0 0 1px rgba(244, 237, 224, 0.1);
}
.badge-scheduled {
  background: var(--info-bg);
  color: var(--bone);
  box-shadow: inset 0 0 0 1px rgba(244, 237, 224, 0.14);
}
/* En progreso: borgoña de ceremonia */
.badge-progress {
  background: var(--violet-bg);
  color: var(--violet);
  box-shadow: inset 0 0 0 1px rgba(179, 0, 27, 0.35);
}
.badge-error {
  background: var(--danger-bg);
  color: var(--danger-text);
  box-shadow: inset 0 0 0 1px rgba(179, 0, 27, 0.4);
}
/* Éxito institucional: verde SULICOR */
.badge-success {
  background: var(--success-bg);
  color: var(--success-text);
  box-shadow: inset 0 0 0 1px rgba(10, 134, 68, 0.4);
}
.badge-lg {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  padding: 5px 12px;
}

/* ---------- Formularios ---------- */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  margin-bottom: 6px;
  color: var(--ink-2);
}
.form-group .hint,
.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
input[type='text'],
input[type='password'],
input[type='email'],
input[type='number'],
input[type='date'],
input[type='datetime-local'],
input[type='url'],
textarea,
select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--field);
  border-color: rgba(244, 237, 224, 0.12);
  color: var(--ink);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
select option {
  background: var(--field);
  color: var(--ink);
}
input::placeholder,
textarea::placeholder {
  color: #7d7466;
}
input:hover,
textarea:hover,
select:hover {
  border-color: rgba(212, 175, 55, 0.4);
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--field) inset;
  caret-color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 80px;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
input[type='checkbox'] {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.input-icon {
  position: relative;
}
.input-icon > .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(212, 175, 55, 0.75);
  pointer-events: none;
}
.input-icon input {
  padding-left: 40px;
}
.input-icon .input-action {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.input-icon .input-action:hover {
  background: var(--line-2);
  color: var(--ink);
}
.field-error {
  color: var(--danger-text);
  font-size: 12px;
  margin-top: 5px;
  font-weight: 600;
}
.field-ok {
  color: var(--success-text);
  font-size: 12px;
  margin-top: 5px;
  font-weight: 600;
}
input.invalid {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(179, 0, 27, 0.22);
}
.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
.check-option input {
  width: auto;
}
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  align-items: flex-end;
  background: linear-gradient(90deg, rgba(179, 0, 27, 0.06), transparent 40%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--sh-1);
}
.filters-bar .form-group {
  margin-bottom: 0;
  min-width: 170px;
  flex: 1;
}
.filters-bar .form-group label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(212, 175, 55, 0.85);
}

/* ---------- Alertas ---------- */
.auth-error {
  background: var(--danger-bg);
  color: #f7c3ca;
  border: 1px solid rgba(179, 0, 27, 0.55);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.auth-error.show {
  display: block;
  animation: shake 0.35s var(--ease);
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-3px);
  }
  40%,
  80% {
    transform: translateX(3px);
  }
}
.auth-hint {
  background: var(--brand-50);
  color: var(--gold-light);
  border: 1px solid var(--brand-200);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 12.5px;
  margin-bottom: 16px;
}

/* ---------- Toast (notificaciones) ---------- */
.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  --toast-accent: var(--sulicor);
  --toast-soft: var(--success-bg);
  --toast-ink: var(--success-text);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  background: linear-gradient(90deg, var(--toast-soft), transparent 55%), #1a1615;
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 4px solid var(--toast-accent);
  border-radius: 14px;
  padding: 13px 12px 15px 14px;
  font-family: var(--font);
  box-shadow: var(--sh-2), 0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  pointer-events: auto;
}
.toast.show {
  opacity: 1;
  transform: translateX(0);
}
/* Éxito: verde SULICOR · Error: borgoña · Advertencia: dorado claro · Información: dorado */
.toast-success { --toast-accent: var(--sulicor); --toast-soft: var(--success-bg); --toast-ink: var(--success-text); }
.toast-error { --toast-accent: var(--burgundy); --toast-soft: var(--danger-bg); --toast-ink: var(--danger-text); }
.toast-warning { --toast-accent: var(--gold-light); --toast-soft: var(--warning-bg); --toast-ink: var(--gold-light); }
.toast-info { --toast-accent: var(--gold); --toast-soft: var(--brand-50); --toast-ink: var(--gold); }
.toast-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--toast-soft);
  color: var(--toast-ink);
}
.toast-body {
  min-width: 0;
  padding-top: 1px;
}
.toast-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}
.toast-msg {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.toast-msg:empty {
  display: none;
}
.toast-close {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.toast-close:hover {
  background: var(--line-2);
  color: var(--ink);
}
.toast-close:focus-visible {
  outline: 2px solid var(--brand-ring);
  outline-offset: 1px;
}
.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--toast-accent);
  opacity: 0.55;
  transform-origin: left;
  animation: toastProgress var(--toast-duration, 4000ms) linear forwards;
}
.toast:hover .toast-progress {
  animation-play-state: paused;
}
@keyframes toastProgress {
  to {
    transform: scaleX(0);
  }
}
@media (max-width: 600px) {
  .toast-stack {
    top: 12px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}

/* ---------- Diálogo de confirmación ---------- */
.confirm-dialog {
  z-index: 1000;
}
.confirm-dialog .modal {
  --confirm-accent: var(--gold);
  --confirm-soft: var(--brand-50);
  max-width: 420px;
  text-align: center;
  padding: 28px 26px 24px;
}
.confirm-dialog .modal[data-tone='danger'] {
  --confirm-accent: var(--danger-text);
  --confirm-soft: var(--danger-bg);
  border-top: 3px solid var(--burgundy);
}
.confirm-dialog .modal[data-tone='warning'] {
  --confirm-accent: var(--gold-light);
  --confirm-soft: var(--warning-bg);
}
.confirm-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--confirm-soft);
  color: var(--confirm-accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--confirm-soft) 55%, transparent);
}
.confirm-dialog h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.confirm-dialog p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.confirm-dialog .modal .modal-actions {
  justify-content: center;
  margin-top: 22px;
}
.confirm-dialog .modal .modal-actions .btn {
  min-width: 130px;
}

/* ---------- Modales ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(80% 60% at 50% 0%, rgba(179, 0, 27, 0.16), transparent 70%), rgba(5, 3, 3, 0.74);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.2s var(--ease);
}
.modal-overlay.show .modal {
  animation: modalIn 0.28s var(--ease);
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
.modal {
  background: linear-gradient(180deg, #1f1a18 0%, #161312 100%);
  border: 1px solid rgba(212, 175, 55, 0.24);
  color: var(--ink);
  border-radius: var(--r-xl);
  padding: 26px;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: var(--sh-3);
}
.modal h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.modal.modal-wide {
  max-width: 760px;
}
.credentials-box {
  background: var(--brand-50);
  border: 1px dashed rgba(212, 175, 55, 0.55);
  color: var(--gold-light);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  margin-top: 12px;
}
.credentials-box .cred-line {
  font-family: var(--font-mono);
  font-size: 14px;
  margin: 4px 0;
}

/* ---------- Varios ---------- */
.empty-state {
  text-align: center;
  padding: 54px 20px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed rgba(212, 175, 55, 0.28);
  border-radius: var(--r-lg);
}
.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 6px;
}
.kv .k {
  color: var(--muted);
  font-weight: 600;
}
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  background: none;
  border: none;
  padding: 10px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tabs button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.summary-list li:last-child {
  border-bottom: none;
}
.summary-list .label {
  color: var(--muted);
}
.summary-list .value {
  font-weight: 600;
  text-align: right;
}

/* ---------- Opciones / valores ---------- */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 6px;
}
.option-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  background: var(--surface-2);
  border-top: 3px solid var(--gold);
}
.option-card .name {
  font-weight: 700;
  font-size: 14px;
}
.option-card .desc {
  font-size: 12.5px;
  color: var(--muted);
  margin: 4px 0 0;
}

/* ---------- Barras de resultados ---------- */
.bar-row {
  margin-bottom: 14px;
}
.bar-row .bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 6px;
}
.bar-row .bar-label .name {
  font-weight: 600;
}
.bar-row .bar-label .meta {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bar-track {
  background: var(--track);
  border-radius: 0 6px 6px 0;
  height: 12px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 0 6px 6px 0;
  background: var(--brand-400);
  transition: width 0.5s var(--ease);
}
.bar-row.is-winner .bar-fill {
  background: var(--gold-gradient);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}
.bar-row.clickable {
  cursor: pointer;
  border-radius: 10px;
  padding: 8px 10px;
  margin-left: -10px;
  margin-right: -10px;
  transition: background 0.15s;
}
.bar-row.clickable:hover {
  background: var(--brand-50);
}
.bar-row .expand-hint {
  font-size: 11px;
  color: var(--brand);
  font-weight: 650;
  margin-left: 8px;
}

/* ---------- Participación (barras) ---------- */
.progress-row {
  margin-bottom: 14px;
}
.progress-row .progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 5px;
}
.progress-row .progress-label .name {
  font-weight: 600;
}
.progress-row .progress-label .meta {
  color: var(--muted);
}
.progress-track {
  background: var(--track);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.5s var(--ease);
}

/* ---------- Carga de archivos ---------- */
.file-drop {
  display: block;
  border: 2px dashed rgba(212, 175, 55, 0.35);
  border-radius: var(--r-lg);
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  background: linear-gradient(180deg, var(--surface-2), var(--brand-50));
  transition: border-color 0.18s, background 0.18s;
}
.file-drop:hover {
  border-color: var(--brand);
}
.file-drop input[type='file'] {
  display: none;
}
.file-drop .file-name {
  margin-top: 10px;
  font-weight: 650;
  color: var(--brand-700);
}

/* ---------- Pills / validación ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  margin-right: 8px;
}
.pill-total {
  background: rgba(244, 237, 224, 0.08);
  color: var(--ink-2);
}
.pill-valid {
  background: var(--success-bg);
  color: var(--success-text);
}
.pill-error {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.row-valid {
  color: var(--success-text);
  font-weight: 700;
}
.row-invalid {
  color: var(--danger-text);
  font-weight: 700;
}
.error-list {
  font-size: 12px;
  color: var(--danger-text);
  margin: 0;
  padding-left: 16px;
}

/* ---------- Asistente de procesos ---------- */
.wizard-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.wizard-step .num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(244, 237, 224, 0.1);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
}
.wizard-step.active {
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.wizard-step.active .num {
  background: var(--gold-gradient);
  color: var(--on-brand);
}
.wizard-step.done {
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--gold-light);
}
.wizard-step.done .num {
  background: var(--brand-400);
  color: var(--on-brand);
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--line-2);
}
.checklist li:last-child {
  border-bottom: none;
}
.checklist .icon {
  font-weight: 700;
}
.checklist li.ok .icon {
  color: var(--success-text);
}
.checklist li.fail .icon {
  color: var(--danger-text);
}
.value-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.value-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.value-checkbox-card:hover {
  border-color: var(--brand);
  background: var(--brand-50);
}
.value-checkbox-card input {
  margin-top: 3px;
}
.value-checkbox-card .name {
  font-weight: 650;
  font-size: 14px;
}
.value-checkbox-card .desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* =====================================================================
   AUTENTICACIÓN (login, recuperar, restablecer, cambiar contraseña)
   ===================================================================== */
.auth-split {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  background: var(--bg);
}
/* Escenario de gala: borgoña → negro, con luces doradas */
.auth-visual {
  position: relative;
  overflow: hidden;
  color: var(--bone);
  background: radial-gradient(120% 90% at 50% 0%, #c0102a 0%, var(--burgundy-600) 30%, var(--burgundy-800) 62%, #0e0708 100%);
  border-right: 1px solid rgba(212, 175, 55, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 52px;
  isolation: isolate;
}
.auth-visual .scene {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.auth-visual .scene svg {
  width: 100%;
  height: 100%;
  display: block;
}
.auth-visual .visual-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(244, 237, 224, 0.85);
}
.auth-visual .visual-top .line {
  width: 34px;
  height: 1px;
  background: var(--gold);
}
.auth-visual .visual-copy {
  max-width: 520px;
  animation: riseIn 0.8s var(--ease) both 0.15s;
}
.auth-visual .visual-copy .kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 12px;
}
.auth-visual .visual-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.04;
  margin: 0 0 14px;
  color: var(--bone);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.auth-visual .visual-copy p {
  margin: 0;
  font-size: 15.5px;
  color: rgba(244, 237, 224, 0.82);
  max-width: 420px;
}
.auth-visual .visual-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.auth-visual .visual-tags span {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(0, 0, 0, 0.22);
  color: var(--gold-light);
  backdrop-filter: blur(4px);
}
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.twinkle {
  animation: twinkle 3.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.twinkle.d2 {
  animation-delay: 1.2s;
}
.twinkle.d3 {
  animation-delay: 2.1s;
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}
/* Logo de Premios protagonista en la zona visual de acceso. */
.auth-visual .auth-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 0;
  min-height: 0;
}
.auth-visual .auth-hero .premios-logo {
  width: clamp(200px, 26vw, 330px);
  animation: float 6s ease-in-out infinite;
}
.auth-visual .auth-hero .premios-logo img {
  filter: drop-shadow(0 10px 34px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 26px rgba(238, 220, 130, 0.18));
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: radial-gradient(80% 50% at 100% 0%, rgba(212, 175, 55, 0.09), transparent 70%),
    radial-gradient(70% 40% at 0% 100%, rgba(179, 0, 27, 0.08), transparent 70%), var(--surface);
}
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
  animation: riseIn 0.6s var(--ease) both;
}
/* Placa blanco hueso con filete dorado: el verde corporativo se lee bien sobre el fondo oscuro. */
.auth-form-wrap .auth-logo {
  display: inline-flex;
  margin-bottom: 26px;
  padding: 10px 16px;
  background: var(--bone);
  border-radius: var(--r);
  border: 1px solid rgba(212, 175, 55, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
.auth-form-wrap .auth-logo .brand-logo {
  width: 160px;
}
.auth-form-wrap h1 {
  font-family: var(--font-display);
  font-size: 30px;
  margin: 0 0 6px;
  line-height: 1.15;
  color: var(--gold-light);
}
.auth-form-wrap .auth-sub {
  color: var(--muted);
  margin: 0 0 26px;
  font-size: 14.5px;
}
.auth-form-wrap .form-group label {
  font-size: 12.5px;
}
.auth-form-wrap .btn[type='submit'] {
  width: 100%;
  padding: 13px 18px;
  font-size: 14.5px;
  margin-top: 4px;
}
.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -4px 0 18px;
  font-size: 12.5px;
}
.alt-action {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
}
.auth-secure {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 26px;
  font-size: 12px;
  color: var(--muted);
}
.auth-footer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
/* Compatibilidad con la estructura anterior (.auth-page/.auth-card) */
.auth-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 90% at 50% 0%, #c0102a 0%, var(--burgundy-600) 35%, #0e0708 100%);
  padding: 20px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  padding: 36px 34px;
  width: 100%;
  max-width: 420px;
}

/* =====================================================================
   VOTANTE · ambiente de premiación
   ===================================================================== */
body.role-VOTANTE .main {
  background: radial-gradient(70% 40% at 80% -5%, rgba(179, 0, 27, 0.14), transparent 70%),
    radial-gradient(50% 30% at 0% 0%, rgba(212, 175, 55, 0.08), transparent 70%);
}

/* ---------- Bienvenida ---------- */
.welcome-shell {
  max-width: 1040px;
  margin: 0 auto;
}
.welcome-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  color: var(--bone);
  padding: 52px 52px 48px;
  background: var(--satin-veil), var(--satin-image), var(--burgundy-800);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(212, 175, 55, 0.32);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 60px rgba(179, 0, 27, 0.18);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  align-items: center;
  gap: 28px;
  animation: riseIn 0.6s var(--ease) both;
  isolation: isolate;
}
.welcome-hero .hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.welcome-hero .hero-bg svg {
  width: 100%;
  height: 100%;
}
.welcome-hero .kicker {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
}
.welcome-hero h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.08;
  margin: 12px 0 12px;
  color: var(--bone);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.welcome-hero p {
  font-size: 16px;
  color: rgba(244, 237, 224, 0.85);
  margin: 0 0 28px;
  max-width: 470px;
}
.welcome-hero .hero-art {
  display: flex;
  justify-content: center;
}
.welcome-hero .hero-art .premios-logo {
  width: 100%;
  max-width: 240px;
}
.welcome-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.welcome-counts .badge {
  background: rgba(0, 0, 0, 0.22);
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.4);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--sh-1);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  animation: riseIn 0.6s var(--ease) both;
}
.step-card:nth-child(2) {
  animation-delay: 0.08s;
}
.step-card:nth-child(3) {
  animation-delay: 0.16s;
}
.step-card .step-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--gold);
  border: 1px solid var(--brand-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-card .step-n {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-600);
  text-transform: uppercase;
}
.step-card h4 {
  margin: 2px 0 4px;
  font-size: 15px;
}
.step-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Lista de procesos del votante ---------- */
.process-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 880px;
}
.process-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
  animation: riseIn 0.45s var(--ease) both;
}
.process-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}
.process-card .pc-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--line-2);
  color: var(--muted);
}
/* Votación disponible: trofeo dorado sobre tarjeta con luz borgoña de escenario */
.process-card.state-PENDING .pc-icon,
.process-card.state-IN_PROGRESS .pc-icon {
  background: var(--gold-gradient);
  color: var(--on-brand);
  box-shadow: var(--glow-gold);
}
.process-card.state-PENDING,
.process-card.state-IN_PROGRESS {
  border-color: var(--brand-200);
  background: linear-gradient(100deg, rgba(179, 0, 27, 0.16), transparent 45%), var(--surface);
}
.process-card.state-UPCOMING .pc-icon {
  background: var(--info-bg);
  color: var(--bone);
}
/* Completada: confirmación con verde institucional */
.process-card.state-COMPLETED .pc-icon {
  background: var(--success-bg);
  color: var(--success-text);
}
.process-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.process-card .date-line {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.process-card .date-line strong {
  color: var(--ink);
}
.process-card .card-action {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Mi participación ---------- */
.participation-card {
  margin-bottom: 16px;
}

/* ---------- Estado bloqueado (próximamente / finalizada) ---------- */
.state-panel {
  text-align: center;
  padding: 42px 26px;
}
.state-panel .state-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 6px;
  border-radius: 20px;
  background: var(--brand-50);
  color: var(--gold);
  border: 1px solid var(--brand-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.state-panel.locked .state-icon {
  background: rgba(244, 237, 224, 0.06);
  color: var(--muted);
  border-color: rgba(244, 237, 224, 0.1);
}
.state-panel h2 {
  margin: 12px 0 6px;
  letter-spacing: 0.06em;
  font-size: 20px;
}
.state-panel .big-date {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0 18px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

/* =====================================================================
   PANTALLA DE VOTACIÓN
   ===================================================================== */
.ballot-shell {
  max-width: 860px;
}
.ballot-progress {
  background: linear-gradient(90deg, rgba(179, 0, 27, 0.12), transparent 50%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  box-shadow: var(--sh-1);
  margin-bottom: 18px;
}
.ballot-progress .bp-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13.5px;
}
.ballot-progress .bp-top strong {
  font-size: 15px;
}
.ballot-progress .bp-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}
.ballot-progress .bp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
  transition: width 0.45s var(--ease);
}
.ballot-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ballot-row {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  background: var(--surface);
  /* filete borgoña: detalle de ceremonia en la pantalla de votación */
  box-shadow: var(--sh-1), inset 3px 0 0 var(--burgundy);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  animation: riseIn 0.45s var(--ease) both;
}
.ballot-row.is-done {
  border-color: var(--brand-200);
  box-shadow: var(--sh-1), inset 3px 0 0 var(--gold);
}
.ballot-row .value-medal {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(179, 0, 27, 0.18);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(179, 0, 27, 0.45);
}
.ballot-row.is-done .value-medal {
  background: var(--gold-gradient);
  color: var(--on-brand);
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
}
.ballot-row .value-info .value-n {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-600);
  text-transform: uppercase;
}
.ballot-row .value-info .value-name {
  font-size: 17px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}
.ballot-row .value-info .value-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.ballot-row .value-prompt {
  font-size: 13px;
  color: var(--ink-2);
  margin: 12px 0 8px;
  font-weight: 500;
}
.ballot-row .selector-btn {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.ballot-row .selector-btn:hover {
  border-color: var(--gold);
  background: #221d1a;
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.ballot-row .selector-btn .placeholder {
  color: #8c8374;
  flex: 1;
}
.ballot-row .selector-btn .sel-main {
  flex: 1;
  min-width: 0;
}
.ballot-row .selector-btn .sel-name {
  font-weight: 650;
}
.ballot-row .selector-btn .sel-meta {
  font-size: 12px;
  color: var(--muted);
}
.ballot-row .selector-btn .sel-change {
  font-size: 12px;
  font-weight: 650;
  color: var(--brand);
}
.ballot-row .selector-btn.selected {
  background: var(--brand-50);
  border-color: var(--brand-200);
  animation: pickPop 0.35s var(--ease);
}
@keyframes pickPop {
  40% {
    transform: scale(1.012);
  }
}
.ballot-footer {
  position: sticky;
  bottom: 14px;
  margin-top: 20px;
  background: rgba(20, 16, 15, 0.94);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  z-index: 20;
}
.ballot-footer .hint {
  margin: 0;
  font-size: 13px;
}
.progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--line-2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}
.progress-pill.complete {
  background: var(--brand-50);
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px var(--brand-200);
}
/* Votación ya enviada: confirmación con verde institucional */
.progress-pill.submitted {
  background: var(--success-bg);
  color: var(--success-text);
  box-shadow: inset 0 0 0 1px rgba(10, 134, 68, 0.45);
}

/* ---------- Selector de candidato ---------- */
.candidate-modal .modal {
  max-width: 600px;
}
.candidate-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 12px;
}
.candidate-filters .search-group {
  grid-column: 1 / -1;
}
.candidate-results {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.candidate-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background 0.15s;
}
.candidate-row:last-child {
  border-bottom: none;
}
.candidate-row:hover {
  background: var(--brand-50);
}
.candidate-row.is-current {
  background: var(--brand-50);
  box-shadow: inset 3px 0 0 var(--gold);
}
.candidate-row .c-main {
  flex: 1;
  min-width: 0;
}
.candidate-row .name {
  font-weight: 650;
  font-size: 14px;
}
.candidate-row .meta {
  font-size: 12px;
  color: var(--muted);
}
.candidate-row .btn {
  flex-shrink: 0;
}

/* =====================================================================
   CONFIRMACIÓN TIPO RECIBO
   ===================================================================== */
.receipt-overlay .receipt-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 10px 4px 4px;
  width: 100%;
}
.receipt {
  width: 100%;
  max-width: 400px;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 22px rgba(212, 175, 55, 0.12));
}
.receipt-overlay.show .receipt {
  animation: receiptPrint 0.75s var(--ease) both;
}
@keyframes receiptPrint {
  from {
    opacity: 0;
    transform: translateY(-26px);
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}
.receipt-paper {
  position: relative;
  /* papel en blanco hueso (más cálido que el blanco puro) */
  background: linear-gradient(180deg, #fbf6ea 0%, var(--bone) 100%);
  color: #221c16;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  padding: 24px 24px 24px;
  /* perforaciones superior e inferior */
  -webkit-mask: radial-gradient(circle at 7px 0, transparent 5px, #000 5.5px) 0 0 / 14px 51% repeat-x,
    radial-gradient(circle at 7px 100%, transparent 5px, #000 5.5px) 0 100% / 14px 51% repeat-x;
  mask: radial-gradient(circle at 7px 0, transparent 5px, #000 5.5px) 0 0 / 14px 51% repeat-x,
    radial-gradient(circle at 7px 100%, transparent 5px, #000 5.5px) 0 100% / 14px 51% repeat-x;
}
.receipt-paper::before {
  /* textura muy sutil de papel térmico */
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.012) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.receipt .r-head {
  text-align: center;
}
.receipt .r-head .r-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.receipt .r-head .r-logo .brand-logo {
  width: 150px;
}
.receipt .r-head .r-company {
  font-weight: 700;
  letter-spacing: 0.24em;
  font-size: 13px;
}
.receipt .r-head .r-program {
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 12px;
  color: var(--burgundy);
}
.receipt .r-sep {
  height: 1px;
  margin: 11px 0;
  background: repeating-linear-gradient(90deg, #a08a5a 0 6px, transparent 6px 10px);
  opacity: 0.7;
}
.receipt .r-title {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 12.5px;
}
.receipt .r-meta {
  margin: 12px 0 0;
}
.receipt .r-meta div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
}
.receipt .r-meta dt {
  color: #756c5e;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding-top: 1px;
}
.receipt .r-meta dd {
  margin: 0;
  font-weight: 500;
  word-break: break-word;
}
.receipt .r-cols {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #756c5e;
  font-weight: 700;
  margin-bottom: 6px;
}
.receipt .r-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.12);
}
.receipt .r-item:last-child {
  border-bottom: none;
}
.receipt .r-item .r-value {
  color: #3f362b;
}
.receipt .r-item .r-pick {
  text-align: right;
  font-weight: 700;
}
.receipt .r-item .r-pick small {
  display: block;
  font-weight: 400;
  color: #756c5e;
  font-size: 10.5px;
}
.receipt .r-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13px;
}
.receipt .r-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  font-size: 11.5px;
}
.receipt .r-status .s-pending {
  color: #7a5c12;
  font-weight: 700;
  text-align: right;
}
.receipt .r-status .s-done {
  color: var(--sulicor);
  font-weight: 700;
}
.receipt .r-warning {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #f8edc6;
  border: 1px dashed var(--gold);
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 11.5px;
  color: #5e4510;
  font-weight: 500;
}
.receipt .r-final {
  text-align: center;
  margin-top: 4px;
}
.receipt .r-final .r-thanks {
  font-weight: 700;
  letter-spacing: 0.08em;
}
.receipt .r-final .r-small {
  font-size: 10.5px;
  color: #756c5e;
}
.receipt .r-barcode {
  height: 28px;
  margin: 12px auto 4px;
  width: 78%;
  background: repeating-linear-gradient(
    90deg,
    #2a221a 0 2px,
    transparent 2px 4px,
    #2a221a 4px 5px,
    transparent 5px 8px,
    #2a221a 8px 11px,
    transparent 11px 12px
  );
  opacity: 0.8;
}
.receipt .r-stamp {
  margin: 6px auto 2px;
  width: fit-content;
  /* sello de confirmación: verde institucional SULICOR */
  border: 2px solid var(--sulicor);
  color: var(--sulicor);
  border-radius: 8px;
  padding: 6px 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 13px;
  transform: rotate(-4deg);
  animation: stampIn 0.45s var(--ease) both 0.2s;
}
@keyframes stampIn {
  from {
    opacity: 0;
    transform: rotate(-4deg) scale(1.4);
  }
}
.receipt-actions {
  width: 100%;
  max-width: 400px;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
}
.receipt-actions .btn {
  padding: 13px 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12.5px;
}
.receipt-actions.single {
  grid-template-columns: 1fr;
}
.receipt-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 10px 0 20px;
}
.receipt.receipt-animate {
  animation: receiptPrint 0.75s var(--ease) both;
}
/* Sin logo real, el texto provisional ya dice SULICOR SAS: no repetirlo. */
.receipt .r-logo:has(.brand-logo-fallback) + .r-company {
  display: none;
}
/* Acciones siempre visibles bajo el recibo */
.receipt-overlay .receipt-actions {
  position: sticky;
  bottom: 0;
  padding: 12px;
  margin-top: -6px;
  border-radius: 16px;
  background: rgba(20, 16, 15, 0.94);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
}
@media (max-width: 640px) {
  .ballot-progress .bp-top .muted {
    display: none;
  }
}
.receipt .r-warning .icon {
  margin-top: 1px;
}

/* =====================================================================
   DASHBOARDS (administrador · gerencia) y estadísticas
   ===================================================================== */
.viz-root {
  --grid: rgba(244, 237, 224, 0.08);
  --ink-2: #cfc6b5;
  --ink-muted: #8c8374;
}
/* Hero de gala (inicio de ADMIN / GERENCIA / BIENESTAR): satín rojo con velo oscuro, borde y luz dorada */
.spotlight {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 26px 28px;
  color: var(--bone);
  background: var(--satin-veil), var(--satin-image), var(--burgundy-800);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.5), 0 0 50px rgba(179, 0, 27, 0.14);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
  isolation: isolate;
}
.spotlight::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 220, 130, 0.16), transparent 65%);
  z-index: -1;
}
.spotlight .kicker {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
}
.spotlight h2 {
  margin: 8px 0 6px;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 26px;
}
.spotlight .meta {
  color: rgba(244, 237, 224, 0.82);
  font-size: 13px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.spotlight .meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.spotlight .spot-stats {
  display: flex;
  gap: 26px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.spotlight .spot-stats .n {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--gold-light);
}
.spotlight .spot-stats .l {
  font-size: 11.5px;
  color: rgba(244, 237, 224, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.spotlight .spot-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.spotlight .badge {
  background: rgba(0, 0, 0, 0.25);
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45);
}
.ring {
  position: relative;
  width: 150px;
  height: 150px;
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring .ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ring .ring-label .n {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ring .ring-label .l {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}
/* Las tablas anchas hacen scroll dentro de su tarjeta en vez de ensanchar la página. */
.dash-grid > * {
  min-width: 0;
}
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.card-head h3 {
  margin: 0;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-head h3 .icon {
  color: var(--gold);
}
.card-head .chart-sub {
  margin: 2px 0 0;
}
.stats-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}
.chart-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.chart-card .chart-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.donut-wrap svg {
  flex-shrink: 0;
}
.donut-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  min-width: 170px;
}
.donut-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.donut-legend .sw {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}
.donut-legend .v {
  font-weight: 700;
  margin-left: auto;
  padding-left: 12px;
  font-variant-numeric: tabular-nums;
}
.hbar {
  display: grid;
  grid-template-columns: minmax(110px, 32%) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 6px;
  border-radius: 8px;
  font-size: 13px;
  transition: background 0.15s;
}
.hbar:hover {
  background: rgba(212, 175, 55, 0.06);
}
.hbar .lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--ink-2);
}
.hbar .track {
  height: 12px;
  background: var(--track);
  border-radius: 0 4px 4px 0;
  position: relative;
}
.hbar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 70%, var(--gold-light));
  border-radius: 0 4px 4px 0;
  min-width: 2px;
  transition: width 0.5s var(--ease);
}
.hbar .num {
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  font-weight: 650;
  min-width: 64px;
  text-align: right;
}
.colchart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 170px;
  padding: 6px 2px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.colchart .col {
  flex: 1;
  min-width: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}
.colchart .col .bar {
  width: 100%;
  max-width: 38px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 45%, var(--gold-deep));
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height 0.5s var(--ease), background 0.15s;
}
.colchart .col:hover .bar {
  background: var(--gold-light);
  box-shadow: 0 0 12px rgba(238, 220, 130, 0.4);
}
.colchart .col .v {
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.colchart-axis {
  display: flex;
  gap: 8px;
  padding: 6px 2px 0;
}
.colchart-axis span {
  flex: 1;
  min-width: 26px;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
}
.value-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.value-tabs button,
.row-filters button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-2);
  transition: all 0.15s var(--ease);
}
.value-tabs button:hover,
.row-filters button:hover {
  border-color: var(--brand-200);
  color: var(--brand-700);
}
.value-tabs button.active,
.row-filters button.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-brand);
}
.top5-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rank-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}
.rank-item:last-child {
  border-bottom: none;
}
.rank-item.clickable {
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}
.rank-item.clickable:hover {
  background: var(--brand-50);
}
.rank-item .pos {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--track);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.rank-item.first .pos {
  background: var(--gold-gradient);
  color: var(--on-brand);
  box-shadow: var(--glow-gold);
}
.rank-item .who .n {
  font-weight: 650;
}
.rank-item .who .m {
  font-size: 11.5px;
  color: var(--muted);
}
.rank-item .who .mini {
  height: 4px;
  background: var(--track);
  border-radius: 0 2px 2px 0;
  margin-top: 5px;
}
.rank-item .who .mini span {
  display: block;
  height: 100%;
  background: var(--series-1);
  border-radius: 0 2px 2px 0;
}
.rank-item .votes {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.leader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.leader-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  overflow: hidden;
}
.leader-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--burgundy), var(--gold) 60%, var(--gold-light));
}
.leader-card .lv {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.leader-card .lv .icon {
  color: var(--gold-600);
}
.leader-card .ln {
  font-size: 16px;
  font-weight: 750;
  margin-top: 10px;
}
.leader-card .lm {
  font-size: 12px;
  color: var(--muted);
}
.leader-card .lc {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-2);
}
.leader-card .lc strong {
  color: var(--gold-light);
}
.chart-tooltip {
  position: fixed;
  pointer-events: none;
  background: #0a0808;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--bone);
  font-size: 12px;
  padding: 8px 11px;
  border-radius: 8px;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.12s;
  max-width: 260px;
  line-height: 1.45;
  box-shadow: var(--sh-2);
}
.chart-tooltip.show {
  opacity: 1;
}
.export-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.export-bar .form-group {
  margin-bottom: 0;
  min-width: 220px;
}
.voters-panel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 6px 0 14px;
}
.voters-panel h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
}
.voters-panel table {
  font-size: 13px;
}
.voters-panel tbody td {
  padding: 8px 12px;
}
/* Detalle del candidato: encabezado + distribución de votos por área del votante */
.voters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.voters-kicker {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.voters-candidate {
  font-size: 16px;
  font-weight: 750;
  color: var(--ink);
}
.voters-total {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--brand-700);
}
.voters-total .n {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.voters-total .l {
  font-size: 12px;
  color: var(--muted);
}
.area-breakdown {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.top-area-callout {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--gold-light);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 10px;
}
.top-area-callout .icon {
  flex-shrink: 0;
  color: var(--brand);
}
.area-bars .hbar .fill {
  background: var(--brand-200);
}
.area-bars .hbar.is-top .fill {
  background: var(--series-1);
}
.area-bars .hbar.is-top .lbl {
  color: var(--ink);
}

/* =====================================================================
   IMPORTACIONES (reporte por fila)
   ===================================================================== */
.import-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.import-summary .tile {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  background: var(--surface-2);
}
.import-summary .tile .n {
  font-size: 24px;
  font-weight: 750;
}
.import-summary .tile .l {
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.import-summary .tile.ok .n { color: var(--success-text); }
.import-summary .tile.err .n { color: var(--danger-text); }
.import-summary .tile.dup .n { color: var(--gold-light); }
.import-summary .tile.exists .n { color: var(--ink-2); }
.import-banner {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.import-banner.ok {
  background: var(--success-bg);
  border: 1px solid rgba(10, 134, 68, 0.45);
  color: #a9e3c4;
}
.import-banner.warn {
  background: var(--warning-bg);
  border: 1px solid rgba(238, 220, 130, 0.35);
  color: var(--gold-light);
}
.import-banner.err {
  background: var(--danger-bg);
  border: 1px solid rgba(179, 0, 27, 0.55);
  color: #f7c3ca;
}
.row-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.issue-card {
  border: 1px solid rgba(179, 0, 27, 0.4);
  background: var(--surface-2);
  border-left: 4px solid var(--burgundy);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 10px;
}
.issue-card.dup {
  border-color: rgba(238, 220, 130, 0.3);
  border-left-color: var(--gold-light);
}
.issue-card.exists {
  border-color: rgba(244, 237, 224, 0.14);
  border-left-color: var(--ink-2);
}
.issue-card .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.issue-card .head .who {
  font-weight: 700;
}
.issue-card .head .row-no {
  color: var(--muted);
  font-weight: 600;
  margin-right: 8px;
}
.issue-card .data {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.issue-card .reason {
  font-size: 13px;
  margin: 4px 0;
}
.issue-card .reason .k,
.issue-card .solution .k {
  font-weight: 700;
}
.issue-card .solution {
  font-size: 13px;
  color: var(--gold-light);
  margin: 2px 0 8px;
}
.warning-list {
  font-size: 12px;
  color: var(--gold-light);
  margin: 4px 0 0;
  padding-left: 16px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1180px) {
  .span-8,
  .span-7,
  .span-6,
  .span-5,
  .span-4 {
    grid-column: span 12;
  }
}
@media (max-width: 1024px) {
  .auth-split {
    grid-template-columns: 1fr 1fr;
  }
  .auth-visual {
    padding: 36px;
  }
}
@media (max-width: 960px) {
  body {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
  }
  body.nav-open .sidebar {
    transform: none;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 3, 0.65);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
  }
  body.nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle {
    display: flex;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 50;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    background: var(--surface);
    color: var(--gold-light);
    align-items: center;
    justify-content: center;
    box-shadow: var(--sh-2);
    cursor: pointer;
  }
  .topbar {
    padding: 14px 18px 14px 70px;
    min-height: 70px;
  }
  .topbar h1 {
    font-size: 19px;
  }
  .content {
    padding: 20px 16px 32px;
  }
  /* Páginas sin topbar: dejar espacio al botón de menú */
  .main > .content:first-child {
    padding-top: 72px;
  }
  .main {
    min-height: 100vh;
  }
  .welcome-hero {
    grid-template-columns: 1fr;
    padding: 34px 26px;
  }
  .welcome-hero .hero-art {
    order: -1;
  }
  .welcome-hero .hero-art .premios-logo {
    max-width: 150px;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .spotlight {
    grid-template-columns: 1fr;
  }
  .auth-split {
    grid-template-columns: 1fr;
  }
  /* En pantallas pequeñas la zona visual se vuelve una franja superior con el logo de Premios;
     el nombre del programa ya aparece en el formulario. */
  .auth-visual {
    min-height: 230px;
    padding: 22px 24px;
    justify-content: flex-end;
  }
  .auth-visual .auth-hero {
    padding: 10px 0 0;
  }
  .auth-visual .auth-hero .premios-logo {
    width: 150px;
  }
  .auth-visual .visual-copy {
    display: none;
  }
  .auth-panel {
    padding: 34px 22px 40px;
    align-items: flex-start;
  }
}
@media (max-width: 640px) {
  .form-row,
  .candidate-filters {
    grid-template-columns: 1fr;
  }
  .process-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .process-card .card-action {
    grid-column: 1 / -1;
  }
  .process-card .card-action .btn {
    width: 100%;
  }
  .ballot-row {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .ballot-footer .btn {
    width: 100%;
  }
  .receipt-paper {
    padding: 26px 18px;
    font-size: 12px;
  }
  .receipt-actions {
    grid-template-columns: 1fr;
  }
  .hbar {
    grid-template-columns: minmax(90px, 36%) 1fr auto;
  }
  .stats-two-col {
    grid-template-columns: 1fr;
  }
  .stat-card .value {
    font-size: 26px;
  }
  .auth-visual {
    min-height: 210px;
  }
  .auth-visual .visual-top {
    display: none;
  }
  /* Sin desbordamiento horizontal en móvil: filtros y acciones a ancho completo. */
  .filters-bar .form-group {
    min-width: 100% !important;
  }
  .filters-bar > .btn {
    width: 100%;
  }
  .topbar > div:last-child:not(:first-child) {
    width: 100%;
  }
  .topbar > div:last-child:not(:first-child) .btn {
    flex: 1 1 auto;
    white-space: normal;
  }
  .spotlight {
    padding: 22px 20px;
  }
  .spotlight h2 {
    font-size: 22px;
    overflow-wrap: anywhere;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
