:root {
  --chp-navy: #0b1f3a;
  --chp-navy-dark: #071527;
  --chp-navy-soft: #12294b;
  --chp-gold: #f5c518;
  --chp-gold-dark: #d9ad00;
  --chp-cream: #f4f2ee;
  --chp-taupe: #8d8779;

  /* --- Tema claro/oscuro del contenido (el sidebar siempre es navy) --- */
  --chp-page-bg: #f1f5f9;
  --chp-surface: #ffffff;
  --chp-surface-soft: #f8fafc;
  --chp-surface-strong: #eef2f7;
  --chp-text-strong: #1e293b;
  --chp-text: #334155;
  --chp-text-soft: #64748b;
  --chp-text-faint: #94a3b8;
  --chp-border: #e2e8f0;
  --chp-border-soft: #f1f5f9;
}

[data-theme="dark"] {
  --chp-page-bg: #0b1729;
  --chp-surface: #16233d;
  --chp-surface-soft: #101c33;
  --chp-surface-strong: #1c2f4d;
  --chp-text-strong: #f1f5f9;
  --chp-text: #cbd5e1;
  --chp-text-soft: #94a3b8;
  --chp-text-faint: #7987a1;
  --chp-border: rgba(255, 255, 255, 0.08);
  --chp-border-soft: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] body.bg-slate-100 {
  background: var(--chp-page-bg);
}

/* --- Tema oscuro: overrides sobre clases de Tailwind usadas directo en las plantillas --- */

[data-theme="dark"] .bg-white {
  background-color: var(--chp-surface);
}

[data-theme="dark"] .bg-slate-50 {
  background-color: var(--chp-surface-soft);
}

[data-theme="dark"] .bg-slate-100 {
  background-color: var(--chp-surface-strong);
}

[data-theme="dark"] .chp-checkin-side {
  background-color: var(--chp-surface-soft);
}

[data-theme="dark"] .chp-stat-box {
  background: var(--chp-surface-strong);
  border-color: var(--chp-border);
}

[data-theme="dark"] .chp-stat-avatar {
  background: var(--chp-surface-strong);
}

[data-theme="dark"] .text-slate-900,
[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-slate-700 {
  color: var(--chp-text-strong);
}

[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-500 {
  color: var(--chp-text-soft);
}

[data-theme="dark"] .text-slate-400 {
  color: var(--chp-text-faint);
}

[data-theme="dark"] .border-slate-100,
[data-theme="dark"] .border-slate-200 {
  border-color: var(--chp-border);
}

[data-theme="dark"] .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--chp-border);
}

[data-theme="dark"] .bg-emerald-50 {
  background-color: rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .text-emerald-700,
[data-theme="dark"] .text-emerald-600 {
  color: #34d399;
}

[data-theme="dark"] .text-red-500 {
  color: #f87171;
}

/* --- Tema oscuro: componentes propios (chp-*) --- */

[data-theme="dark"] .chp-card {
  background: var(--chp-surface);
  border-color: var(--chp-border);
}

[data-theme="dark"] .chp-label {
  color: var(--chp-text-strong);
}

[data-theme="dark"] .chp-input {
  background: var(--chp-surface-soft);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--chp-text-strong);
}

[data-theme="dark"] .chp-input::placeholder {
  color: var(--chp-text-faint);
}

[data-theme="dark"] .chp-input:disabled {
  background: var(--chp-surface-strong);
  color: var(--chp-text-faint);
}

[data-theme="dark"] .chp-btn-ghost {
  background: var(--chp-surface-strong);
  color: var(--chp-text-strong);
}

[data-theme="dark"] .chp-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .chp-badge {
  color: var(--chp-gold);
}

/* --- Botón de modo claro/oscuro en el sidebar (siempre navy, igual que dashboard) --- */

.chp-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid transparent;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.chp-theme-toggle:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.chp-theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.chp-theme-toggle .icon-light {
  display: none;
}

[data-theme="dark"] .chp-theme-toggle .icon-light {
  display: block;
}

[data-theme="dark"] .chp-theme-toggle .icon-dark {
  display: none;
}

.chp-brick-bg {
  background-color: var(--chp-cream);
  background-image: url("data:image/svg+xml,%3Csvg width='42' height='44' viewBox='0 0 42 44' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23facc15' fill-opacity='0.5'%3E%3Cpath d='M0 0h42v44H0V0zm1 1h40v20H1V1zM0 23h20v20H0V23zm22 0h20v20H22V23z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* --- Layout: shell con sidebar --- */

.chp-shell {
  display: flex;
  min-height: 100vh;
}

.chp-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 240px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--chp-navy) 0%, var(--chp-navy-dark) 100%);
  color: #fff;
  padding: 1.25rem 1rem;
  box-shadow: 4px 0 24px rgba(11, 31, 58, 0.15);
  transition: transform 0.25s ease;
}

.chp-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.chp-sidebar-collapse-btn {
  position: absolute;
  top: 1.5rem;
  right: -0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--chp-navy);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 51;
  transition: transform 0.2s ease;
}

.chp-sidebar-collapse-btn svg {
  width: 0.85rem;
  height: 0.85rem;
}

.chp-sidebar-collapse-btn:hover {
  background: var(--chp-navy-soft);
}

@media (max-width: 900px) {
  .chp-sidebar-collapse-btn {
    display: none;
  }
}

/* --- Sidebar colapsado (escritorio, vía html[data-sidebar="collapsed"]) --- */

html[data-sidebar="collapsed"] .chp-sidebar {
  width: 76px;
}

html[data-sidebar="collapsed"] .chp-content {
  margin-left: 76px;
}

/* Sin sesión no hay menú lateral (ver base.html): el contenido va de borde a borde. */
.chp-shell.chp-shell--publico .chp-content {
  margin-left: 0;
}

html[data-sidebar="collapsed"] .chp-sidebar__brand {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

html[data-sidebar="collapsed"] .chp-sidebar__kicker,
html[data-sidebar="collapsed"] .chp-sidebar__titulo,
html[data-sidebar="collapsed"] .chp-sidebar__group,
html[data-sidebar="collapsed"] .chp-nav-label,
html[data-sidebar="collapsed"] .chp-user-info {
  display: none;
}

html[data-sidebar="collapsed"] .chp-nav-link {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

html[data-sidebar="collapsed"] .chp-user-trigger,
html[data-sidebar="collapsed"] .chp-theme-toggle {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

html[data-sidebar="collapsed"] .chp-sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

html[data-sidebar="collapsed"] .chp-user-menu {
  left: calc(100% + 0.75rem);
  right: auto;
  bottom: 0;
  width: 220px;
}

/* --- Menú de usuario (hover) --- */

.chp-user-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background-color 0.15s ease;
}

.chp-user-trigger:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.chp-user-avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--chp-gold);
  color: var(--chp-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  text-transform: uppercase;
}

.chp-user-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.chp-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chp-user-role {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: capitalize;
}

.chp-user-chevron {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.15s ease;
}

[data-dropdown].is-open .chp-user-chevron {
  transform: rotate(180deg);
}

.chp-user-menu {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px -20px rgba(11, 31, 58, 0.45);
  border: 1px solid rgba(11, 31, 58, 0.06);
  padding: 0.5rem;
  z-index: 60;
}

.chp-user-menu__label {
  margin: 0.25rem 0.5rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.chp-user-menu__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 0.5rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: #b42318;
  cursor: pointer;
  text-align: left;
}

.chp-user-menu__item svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.chp-user-menu__item:hover {
  background-color: #fef3f2;
}

.chp-user-avatar--lg {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.25rem;
}

.chp-user-menu__item--link {
  color: #334155;
  text-decoration: none;
}

.chp-user-menu__item--link:hover {
  background-color: #f1f5f9;
}

.chp-sidebar__brand img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  flex-shrink: 0;
}

.chp-sidebar__kicker {
  margin: 0 0 0.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--chp-gold);
}

.chp-sidebar__titulo {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.chp-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  overflow-y: auto;
}

.chp-sidebar__group {
  margin: 0.85rem 0.75rem 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.chp-sidebar__group:first-child {
  margin-top: 0;
}

.chp-sidebar__footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.chp-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid transparent;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.chp-nav-link svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.chp-nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.chp-nav-link.is-active {
  color: var(--chp-gold);
  background-color: rgba(245, 197, 24, 0.15);
  border-color: rgba(245, 197, 24, 0.25);
}

.chp-nav-link.is-active svg {
  opacity: 1;
}

.chp-content {
  flex: 1;
  min-width: 0;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.chp-topbar {
  display: none;
}

.chp-sidebar-overlay {
  display: none;
}

@media (max-width: 900px) {
  .chp-sidebar {
    transform: translateX(-100%);
  }

  .chp-sidebar.is-open {
    transform: translateX(0);
  }

  .chp-content {
    margin-left: 0;
  }

  .chp-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--chp-navy) 0%, var(--chp-navy-dark) 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 40;
  }

  .chp-topbar img {
    height: 2rem;
    width: 2rem;
    object-fit: contain;
  }

  .chp-topbar-toggle {
    background: none;
    border: none;
    color: #fff;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
  }

  .chp-sidebar-overlay.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(7, 21, 39, 0.55);
  }
}

/* --- Cards --- */

.chp-card {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px -20px rgba(11, 31, 58, 0.35);
  border: 1px solid rgba(11, 31, 58, 0.06);
  padding: 2.25rem;
  width: 100%;
}

@media (max-width: 420px) {
  .chp-card {
    padding: 1.5rem;
    border-radius: 1rem;
  }
}

/* --- Check-in: panel lateral y cajas de métricas --- */

.chp-checkin-side {
  background-color: rgba(248, 250, 252, 0.6);
}

.chp-stat-box {
  background: var(--chp-cream);
  border-color: rgba(11, 31, 58, 0.08);
}

.chp-stat-avatar {
  background: var(--chp-cream);
}

/* --- Forms --- */

.chp-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--chp-navy);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

.chp-input {
  width: 100%;
  border: 1.5px solid #dbe2ea;
  border-radius: 0.75rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chp-input:focus {
  outline: none;
  border-color: var(--chp-navy);
  box-shadow: 0 0 0 3px rgba(11, 31, 58, 0.12);
}

.chp-input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
}

/* --- Buttons --- */

.chp-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--chp-gold);
  color: var(--chp-navy);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0.75rem;
  padding: 0.7rem 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.chp-btn-primary:hover {
  background: var(--chp-gold-dark);
}

.chp-btn-primary:active {
  transform: scale(0.98);
}

.chp-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--chp-navy);
  background: #eef2f7;
  border-radius: 0.6rem;
  padding: 0.45rem 0.8rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.chp-btn-ghost:hover {
  background: #e2e8f0;
}

.chp-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 0.6rem;
  padding: 0.45rem 0.8rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.chp-btn-danger:hover {
  background: #fecaca;
}

/* --- Flash messages --- */

.chp-flash {
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chp-flash-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.chp-flash-info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

/* --- Hero (páginas de entrada de cada flujo) --- */

.chp-hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.chp-hero-visual {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 20rem;
  border-radius: 1.25rem;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--chp-navy) 0%, var(--chp-navy-dark) 65%, #04101f 100%);
  box-shadow: 0 20px 40px -20px rgba(11, 31, 58, 0.5);
}

.chp-hero-visual::before {
  content: "";
  position: absolute;
  inset: -25%;
  background: radial-gradient(circle at 28% 22%, rgba(245, 197, 24, 0.16), transparent 60%);
  z-index: 0;
}

/* --- Hero del panel de inicio (admin): banner navy con resplandor dorado --- */

.chp-panel-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 1.25rem;
  padding: 2.25rem 2rem;
  background: linear-gradient(135deg, var(--chp-navy) 0%, var(--chp-navy-dark) 65%, #04101f 100%);
  box-shadow: 0 20px 40px -20px rgba(11, 31, 58, 0.5);
}

.chp-panel-hero::before {
  content: "";
  position: absolute;
  inset: -25%;
  background: radial-gradient(circle at 82% 18%, rgba(245, 197, 24, 0.18), transparent 58%);
  z-index: 0;
}

.chp-panel-hero > * {
  position: relative;
  z-index: 1;
}

.chp-hero-shape {
  position: absolute;
  color: rgba(255, 255, 255, 0.16);
  animation: chp-float 6s ease-in-out infinite;
  z-index: 0;
}

.chp-hero-shape.is-gold {
  color: rgba(245, 197, 24, 0.4);
}

/* Posiciones fijas de las 6 formas decorativas de _hero_visual.html —
   antes en línea, cada una con su tamaño/posición/demora propios. */
.chp-hero-shape--1 { top: 10%; left: 12%; width: 26px; height: 26px; animation-delay: 0s; }
.chp-hero-shape--2 { top: 16%; right: 14%; width: 20px; height: 20px; animation-delay: 1.1s; }
.chp-hero-shape--3 { bottom: 20%; left: 9%; width: 12px; height: 12px; animation-delay: 2s; }
.chp-hero-shape--4 { bottom: 12%; right: 10%; width: 30px; height: 30px; animation-delay: .6s; }
.chp-hero-shape--5 { top: 48%; left: 5%; width: 9px; height: 9px; animation-delay: 1.6s; }
.chp-hero-shape--6 { top: 42%; right: 7%; width: 18px; height: 18px; animation-delay: 2.4s; }

@keyframes chp-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(8deg); }
}

.chp-hero-mascot {
  position: relative;
  z-index: 1;
  width: 14rem;
  max-width: 70%;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.55)) drop-shadow(0 18px 25px rgba(0, 0, 0, 0.35));
}

@media (max-width: 420px) {
  .chp-hero-visual {
    min-height: 16rem;
    padding: 2rem 1rem;
  }

  .chp-hero-mascot {
    width: 11rem;
  }
}

@media (min-width: 768px) {
  .chp-hero {
    grid-template-columns: 1fr 1fr;
  }

  .chp-hero-mascot {
    width: 16rem;
    max-width: 80%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chp-hero-shape {
    animation: none;
  }
}

/* --- Escáner de QR (check-in) --- */

.chp-qr-video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.9rem;
  background: var(--chp-navy-dark);
  transition: box-shadow 0.2s ease;
}

.chp-qr-detectado .chp-qr-video {
  box-shadow: 0 0 0 4px #22c55e;
}

.chp-qr-detectado #chp-qr-status {
  color: #16a34a;
  font-weight: 600;
}

/* --- Cámara del check-in (recuadro grande, siempre activo) --- */

.chp-checkin-cam {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--chp-navy-dark);
  min-width: 0;
}

.chp-checkin-cam__video {
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

/* En celular: recuadro cuadrado (más cómodo para encuadrar un QR). */
@media (max-width: 640px) {
  .chp-checkin-cam__video {
    aspect-ratio: 1 / 1;
  }

  .chp-checkin-cam__badge {
    left: 12px;
    top: 12px;
  }

  .chp-checkin-cam__caption {
    bottom: 12px;
    padding: 0 12px;
  }
}

.chp-checkin-cam__badge {
  position: absolute;
  left: 20px;
  top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(4, 16, 29, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.chp-checkin-cam__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.chp-checkin-cam__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.chp-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.25rem 0;
}

.chp-divider::before,
.chp-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* --- Misc --- */

.chp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 197, 24, 0.15);
  color: var(--chp-navy);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.chp-qr-wrapper svg {
  width: 12rem;
  height: 12rem;
}

/* --- Card con franja de acento (login) --- */

.chp-card-accent {
  position: relative;
  overflow: hidden;
}

.chp-card-accent::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 0.35rem;
  background: linear-gradient(90deg, var(--chp-gold) 0%, var(--chp-navy) 100%);
}

/* --- Inputs con ícono --- */

.chp-input-group {
  position: relative;
}

.chp-input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.chp-input-group .chp-input {
  padding-left: 2.6rem;
}

.chp-input-group.has-toggle .chp-input {
  padding-right: 2.6rem;
}

.chp-input-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
}

.chp-input-toggle:hover {
  color: var(--chp-navy);
}

/* --- QR imprimible de stand --- */

.chp-print-volver {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--chp-text-soft, #64748b);
  text-decoration: none;
}

.chp-print-volver:hover { color: var(--chp-navy); }

.chp-print-card {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px -20px rgba(11, 31, 58, 0.35);
  border: 1px solid rgba(11, 31, 58, 0.06);
  overflow: hidden;
}

.chp-print-header {
  position: relative;
  overflow: hidden;
  background: var(--chp-navy);
  color: #fff;
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chp-print-header::before {
  content: "";
  position: absolute;
  inset: -60% -20% auto auto;
  width: 14rem;
  height: 14rem;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.22), transparent 62%);
}

.chp-print-header__brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.chp-print-header__logo {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  background: var(--chp-gold);
  color: var(--chp-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
}

.chp-print-header__kicker {
  margin: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 197, 24, 0.9);
  white-space: nowrap;
}

.chp-print-header__nombre {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.chp-print-header__etiqueta {
  position: relative;
  margin: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.chp-print-stripe {
  height: 0.35rem;
  background: linear-gradient(90deg, var(--chp-gold) 0%, var(--chp-navy) 100%);
}

.chp-print-body {
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(11, 31, 58, 0.08);
}

.chp-print-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chp-taupe);
}

.chp-print-titulo {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--chp-navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.chp-print-descripcion {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #64748b;
}

.chp-print-qr-row {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.chp-print-qr-box {
  flex: 0 0 auto;
  border: 2px solid var(--chp-navy);
  padding: 0.7rem;
}

.chp-qr-wrapper-lg svg {
  display: block;
  width: 9.5rem;
  height: 9.5rem;
}

/* QR del stand en pantalla: solo el código, grande y centrado. El afiche
   completo (.chp-print-card) queda únicamente para la impresión. */
.chp-solo-impresion {
  display: none;
}

.chp-qr-pantalla {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.chp-qr-pantalla__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chp-taupe);
}

.chp-qr-pantalla__titulo {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--chp-text-strong);
  word-break: break-word;
}

.chp-qr-pantalla__qr {
  width: min(100%, 22rem);
  aspect-ratio: 1 / 1;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 30px -18px rgba(11, 31, 58, 0.45);
}

.chp-qr-pantalla__qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chp-print-pasos {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.chp-print-pasos__titulo {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--chp-navy);
}

.chp-print-paso {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.chp-print-paso__num {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--chp-gold);
  color: var(--chp-navy);
  font-weight: 700;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chp-print-paso p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #5c6270;
}

.chp-print-nota {
  margin: 0 1.5rem 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--chp-cream);
  border-left: 3px solid var(--chp-gold);
  font-size: 0.8rem;
  line-height: 1.5;
  color: #5c6270;
}

.chp-print-footer {
  background: var(--chp-navy);
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chp-print-footer__marca {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 197, 24, 0.9);
}

.chp-print-footer__sede {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 420px) {
  .chp-print-qr-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .chp-qr-wrapper-lg svg {
    width: 8rem;
    height: 8rem;
  }
}

@page {
  size: letter;
  margin: 0.4in;
}

@media print {
  header, footer, .chp-no-print, .chp-sidebar, .chp-sidebar-overlay {
    display: none !important;
  }

  .chp-solo-impresion {
    display: block;
  }

  /* Sin esto, la barra lateral (position:fixed, 240px) sigue reservando
     ese margen en .chp-content aunque ya esté oculta — el contenido
     quedaba empujado a la derecha con un espacio en blanco a la
     izquierda al imprimir. */
  .chp-content {
    margin-left: 0 !important;
  }

  body, main {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .chp-print-card,
  .chp-print-header,
  .chp-print-stripe,
  .chp-print-footer,
  .chp-print-qr-box,
  .chp-print-paso__num,
  .chp-print-nota {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* La tarjeta vivía dentro de un contenedor "max-w-lg" (32rem) pensado
     para pantalla — al imprimir eso la dejaba chica en medio de una hoja
     completa. Se quita el tope y se agranda la tarjeta para que ocupe
     prácticamente toda la hoja carta (8.5x11in, ver @page arriba), en
     vez de quedar como una tarjetita perdida en medio de la hoja. */
  .chp-print-page {
    max-width: none !important;
  }

  .chp-print-card {
    box-shadow: none;
    border: 3px solid var(--chp-navy);
    width: 100%;
    margin: 0;
    page-break-inside: avoid;
  }

  .chp-print-header { padding: 1.75rem 2.25rem; }
  .chp-print-header__logo { width: 3.25rem; height: 3.25rem; font-size: 1rem; border-radius: 0.75rem; }
  .chp-print-header__kicker { font-size: 0.75rem; }
  .chp-print-header__nombre { font-size: 1.15rem; }
  .chp-print-header__etiqueta { font-size: 0.8rem; }
  .chp-print-body { padding: 1.75rem 2.25rem 1.5rem; }
  .chp-print-eyebrow { font-size: 0.85rem; }
  .chp-print-titulo { font-size: 3.2rem; }
  .chp-print-descripcion { font-size: 1.1rem; margin-top: 0.75rem; }
  .chp-print-qr-row { padding: 2rem 2.25rem; gap: 2.25rem; }
  .chp-print-qr-box { padding: 1.25rem; border-width: 3px; }
  .chp-qr-wrapper-lg svg { width: 16rem; height: 16rem; }
  .chp-print-pasos__titulo { font-size: 1.6rem; }
  .chp-print-paso { gap: 0.85rem; }
  .chp-print-paso p { font-size: 1.15rem; }
  .chp-print-paso__num { width: 1.9rem; height: 1.9rem; font-size: 0.95rem; }
  .chp-print-nota { font-size: 1rem; padding: 1rem 1.25rem; margin: 0 2.25rem 1.75rem; }
  .chp-print-footer { padding: 1.25rem 2.25rem; }
  .chp-print-footer__marca { font-size: 0.8rem; }
  .chp-print-footer__sede { font-size: 0.9rem; }
}

/* --- Vista editorial partida (pre-registro y similares) --- */

.chp-split {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  grid-template-rows: minmax(0, 1fr);
}

.chp-split-left {
  position: relative;
  /* Fijo a la altura de la pantalla, sin scroll — igual que el panel
     izquierdo del login. El contenido de cada vista tiene que entrar en
     esa altura (ver los tamaños compactos en en_sitio.css); si algo no
     cabe, se recorta en vez de generar scroll de página. */
  overflow: hidden;
  padding: 36px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.75rem;
}

.chp-split-left::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--chp-gold) 0%, var(--chp-navy) 100%);
}

.chp-split-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245, 197, 24, 0.4);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chp-cream);
  font-weight: 600;
  background: rgba(245, 197, 24, 0.06);
}

.chp-split-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chp-gold);
}

.chp-split-title {
  margin: 0 0 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 3vw + 1rem, 3.5rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--chp-cream);
}

.chp-split-title-accent {
  color: var(--chp-gold);
}

.chp-split-desc {
  margin: 0;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(244, 242, 238, 0.65);
}

.chp-split-right {
  position: relative;
  overflow: hidden;
  background: var(--chp-navy);
  color: #fff;
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chp-split-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 12%, rgba(245, 197, 24, 0.14), transparent 58%);
}

.chp-split-right::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--chp-gold), #ffe897, var(--chp-gold));
  background-size: 200% 100%;
  animation: chp-split-accent-slide 5s linear infinite;
}

@keyframes chp-split-accent-slide {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

.chp-split-watermark {
  position: absolute;
  right: -40px;
  top: -56px;
  width: 340px;
  opacity: 0.16;
  pointer-events: none;
}

.chp-split-form {
  position: relative;
  z-index: 1;
}

.chp-split-step-label {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(245, 197, 24, 0.9);
  font-weight: 600;
}

.chp-split-form-title {
  margin: 0 0 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.chp-split-form-desc {
  margin: 0 0 36px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}

.chp-split-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  margin-bottom: 12px;
}

.chp-split-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  padding: 16px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 20px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chp-split-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.chp-split-input:focus {
  outline: none;
  border-color: var(--chp-gold);
  background: rgba(245, 197, 24, 0.06);
}

.chp-split-submit {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--chp-gold);
  color: var(--chp-navy);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  padding: 17px 22px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.chp-split-submit:hover {
  background: #fff;
}

.chp-split-submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: chp-split-sheen 3.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes chp-split-sheen {
  0% { transform: translateX(-160%) skewX(-18deg); }
  55%, 100% { transform: translateX(320%) skewX(-18deg); }
}

.chp-split-submit svg {
  width: 18px;
  height: 18px;
}

.chp-split-submit--stepper {
  margin-top: 28px;
}

.chp-split-divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.chp-split-divider-text::before,
.chp-split-divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}


@media (max-width: 900px) {
  .chp-split {
    grid-template-columns: 1fr;
  }

  .chp-split-left {
    padding: 32px 28px;
  }

  .chp-split-right {
    padding: 40px 28px;
  }
}

@media (max-width: 480px) {
  .chp-split-left {
    padding: 24px 20px;
  }

  .chp-split-right {
    padding: 32px 20px;
  }
}

/* --- Popups de confirmación (SweetAlert2) --- */

.chp-swal-popup {
  border-radius: 1.25rem !important;
  padding-bottom: 1.75rem !important;
  box-shadow: 0 20px 45px rgba(11, 31, 58, 0.25) !important;
}

.chp-swal-icon {
  border: none !important;
  width: 5rem !important;
  height: 5rem !important;
  background: linear-gradient(135deg, var(--chp-gold) 0%, var(--chp-gold-dark) 100%);
  font-size: 2.25rem !important;
  line-height: 1 !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Un emoji centrado en el círculo: sin salto de línea ni line-height
   heredado que lo empuje fuera. */
.chp-swal-icon .swal2-icon-content {
  font-size: 2.25rem !important;
  line-height: 1 !important;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .chp-swal-popup {
    width: calc(100% - 32px) !important;
    padding: 1.25rem 1rem 1.5rem !important;
  }

  .chp-swal-icon {
    width: 4.25rem !important;
    height: 4.25rem !important;
    margin-top: 0.75rem !important;
  }

  .chp-swal-icon .swal2-icon-content {
    font-size: 1.9rem !important;
  }

  .chp-swal-titulo {
    font-size: 1.45rem !important;
    padding-top: 0.5rem !important;
  }

  .chp-swal-texto {
    font-size: 0.95rem;
  }

  .chp-swal-popup .swal2-actions {
    width: 100%;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .chp-swal-btn-confirmar,
  .chp-swal-btn-cancelar {
    flex: 1 1 0;
    margin: 0 !important;
    padding: 0.7rem 0.75rem !important;
  }
}

.chp-swal-titulo {
  color: var(--chp-navy) !important;
  font-weight: 700 !important;
}

.chp-swal-texto {
  margin: 0;
  font-size: 1rem;
  color: #475569;
}

.chp-swal-btn-confirmar {
  border-radius: 0.65rem !important;
  font-weight: 600 !important;
  padding: 0.65rem 1.5rem !important;
}

.chp-swal-btn-cancelar {
  border-radius: 0.65rem !important;
  font-weight: 600 !important;
  padding: 0.65rem 1.5rem !important;
}

