*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:        #16A34A;
  --green-dark:   #15803D;
  --green-deeper: #14532D;
  --green-light:  #DCFCE7;
  --green-xlight: #F0FDF4;
  --gold:         #F59E0B;
  --black:        #111827;
  --gray-dark:    #374151;
  --gray:         #6B7280;
  --gray-light:   #F9FAFB;
  --border:       #E5E7EB;
  --white:        #FFFFFF;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 6px rgba(0,0,0,.05), 0 10px 28px rgba(0,0,0,.07);
  --shadow-lg:    0 10px 40px rgba(0,0,0,.12);
  --radius-sm:    10px;
  --radius:       16px;
  --t:            .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--green-xlight);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ══ LOADER ═══════════════════════════════════════════════ */
.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(20,83,45,.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .25s ease;
}

.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid rgba(255,255,255,.2);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

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

.loader-text {
  color: rgba(255,255,255,.85);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
}

/* ══ SPA VISTAS ═══════════════════════════════════════════ */
.view {
  min-height: 100vh;
  display: none;
  flex-direction: column;
}

.view.active { display: flex; }

/* ══ HEADER — global ══════════════════════════════════════ */
header,
.rp-header {
  background: var(--green-deeper);
  border-bottom: 1px solid rgba(255,255,255,.09);
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 28px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; text-decoration: none; }

.logo-img {
  height: 46px;
  width: auto;
  display: block;
  filter: brightness(1.3) drop-shadow(0 1px 4px rgba(0,0,0,.25));
}

.header-tagline {
  color: rgba(255,255,255,.55);
  font-size: 12.5px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: .2px;
}

/* ══ HERO ═════════════════════════════════════════════════ */
.hero {
  background: var(--green-deeper);
  padding: 60px 28px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 10% 90%, rgba(22,163,74,.25) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(22,163,74,.18) 0%, transparent 50%);
  pointer-events: none;
}

/* Ola inferior que conecta con el body */
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--green-xlight);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-inner { max-width: 680px; margin: 0 auto; position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.95);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 20px;
  letter-spacing: .6px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.hero h1 {
  font-size: clamp(26px, 4.5vw, 42px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -.6px;
}

.hero p {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  margin: 0 auto 36px;
  max-width: 460px;
  line-height: 1.65;
}

/* Buscador */
.search-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(20,83,45,.25), 0 4px 16px rgba(0,0,0,.08);
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
  border-top: 4px solid var(--green);
}

.search-toggle {
  display: flex;
  background: var(--green-xlight);
  border-radius: 10px;
  padding: 4px;
  gap: 3px;
  margin-bottom: 18px;
}

.stg-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t);
}

.stg-btn.active {
  background: var(--white);
  color: var(--green-deeper);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

.search-box label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.search-row { display: flex; gap: 10px; }

.search-input {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--black);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  font-weight: 500;
}

.search-input::placeholder { color: #C8D0D8; }

.search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(22,163,74,.12);
}

.search-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t), box-shadow var(--t);
  white-space: nowrap;
}

.search-btn:hover { background: var(--green-dark); box-shadow: 0 4px 14px rgba(21,128,61,.35); }
.search-btn:active { opacity: .9; }

.search-note { margin-top: 10px; font-size: 12px; color: #A8B2BB; }

/* ══ MAIN BUSQUEDA ════════════════════════════════════════ */
.search-main {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 36px 28px 64px;
}

/* Banner sorteo */
.sorteo-banner {
  background: linear-gradient(135deg, var(--green-deeper) 0%, #1B6E3A 100%);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 4px 20px rgba(20,83,45,.2);
  position: relative;
  overflow: hidden;
}

.sorteo-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 95% 50%, rgba(245,158,11,.14) 0%, transparent 60%);
  pointer-events: none;
}

.sorteo-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}

.sorteo-content { flex: 1; position: relative; z-index: 1; }

.sorteo-content h3 { font-size: 16px; font-weight: 800; color: var(--white); margin-bottom: 6px; }

.sorteo-content p { font-size: 13.5px; color: rgba(255,255,255,.75); line-height: 1.6; max-width: 680px; }

.sorteo-badge {
  background: var(--gold);
  color: #1a0a00;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: .4px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

/* Estados */
.state-msg {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 52px 24px;
  text-align: center;
  display: none;
  margin-bottom: 24px;
}

.state-msg.visible { display: block; }

.state-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: var(--green-dark);
}

.state-icon-wrap svg { width: 28px; height: 28px; }

.state-icon-wrap.error { background: #FEF2F2; color: #C62828; }
.state-msg.error .state-icon-wrap { background: #FEF2F2; color: #C62828; }

.state-msg h3 { font-size: 17px; font-weight: 800; color: var(--black); margin-bottom: 7px; }

.state-msg p { font-size: 14px; color: var(--gray); max-width: 380px; margin: 0 auto; line-height: 1.65; }

/* ══ FOOTER ═══════════════════════════════════════════════ */
footer {
  background: var(--green-deeper);
  padding: 22px 28px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

footer span   { font-size: 13px; color: rgba(255,255,255,.45); }
footer strong { color: rgba(255,255,255,.8); font-weight: 700; }
footer a      { color: rgba(255,255,255,.6); text-decoration: none; font-size: 13px; }
footer a:hover { color: var(--white); }

/* ══ VISTA RESULTADO ══════════════════════════════════════ */

/* ── Header sticky ── */
.rp-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.rp-header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 16px;
  border-radius: 7px;
  cursor: pointer;
  transition: background var(--t);
}

.back-btn:hover { background: rgba(255,255,255,.18); }

.icon-back { width: 18px; height: 18px; }

.rp-guide-tag { font-size: 13px; color: rgba(255,255,255,.55); }
.rp-guide-tag strong { color: var(--white); font-weight: 800; }

/* ── Intro sorteo en main (step 1) ── */
.sorteo-intro { margin-bottom: 20px; }

.sorteo-titulo {
  font-size: 22px;
  font-weight: 900;
  color: var(--black);
  margin-bottom: 7px;
}

.sorteo-intro-text {
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.65;
  max-width: 640px;
}

/* ── Cuerpo: columna central estrecha ── */
.rp-body {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Perfil del remitente ── */
.profile-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green-dark);
  margin-bottom: 3px;
}

.profile-participa {
  font-size: 11px;
  color: var(--green-dark);
  margin-top: 5px;
  font-weight: 500;
}

.profile-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.profile-avatar {
  width: 52px;
  height: 52px;
  background: var(--gray-light);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  flex-shrink: 0;
}

.profile-avatar svg { width: 26px; height: 26px; }

.profile-info { flex: 1; min-width: 0; }

.profile-info h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-meta-badge {
  font-size: 13px;
  color: var(--gray);
}

.profile-meta-badge strong { color: var(--black); font-weight: 700; }

.profile-meta-sep { color: var(--border); }

.profile-meta span:last-child { font-size: 13px; color: var(--gray); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-recibido { background: var(--green-light); color: var(--green-dark); border: 1px solid rgba(21,128,61,.2); }

/* ── Banner oportunidades ── */
.oportunidades-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--green-light);
  border: 1px solid rgba(21,128,61,.18);
  border-left: 4px solid var(--green-dark);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.op-icon {
  width: 36px;
  height: 36px;
  background: var(--green-dark);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.op-icon svg { width: 18px; height: 18px; }

.op-body { flex: 1; }

.op-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green-deeper);
  margin-bottom: 4px;
}

.op-text {
  font-size: 13px;
  color: #166534;
  line-height: 1.55;
}

.op-text strong { color: var(--green-deeper); }

/* ── Tarjeta de detalle de guia ── */
.guide-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.guide-card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border);
}

.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.fc {
  padding: 14px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc:nth-child(even) { border-right: none; }

.fc.fc-full {
  grid-column: 1 / -1;
  border-right: none;
}

.fc-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #9CA3AF;
  letter-spacing: .9px;
  text-transform: uppercase;
}

.fc-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.4;
}

/* ── Seccion formulario (sin cajas por campo) ── */
.form-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.form-section-head {
  background: linear-gradient(135deg, var(--green-deeper) 0%, #1B6E3A 100%);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.form-section-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: rgba(255,255,255,.9);
}

.form-section-icon svg { width: 36px; height: 36px; }

.form-section-head h3 { font-size: 15px; font-weight: 800; color: var(--white); margin-bottom: 4px; }

.form-section-head p { font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.5; }

.form-body { padding: 24px 24px 28px; }

#sorteoForm { display: flex; flex-direction: column; gap: 22px; }

/* Cada campo: label + input sin caja individual */
.ff { display: flex; flex-direction: column; gap: 7px; }

.ff label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  display: block;
  margin-bottom: 6px;
}

.fi-hint { font-size: 11.5px; font-weight: 500; color: #9CA3AF; }

/* Grid 2 columnas para el formulario */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-bottom: 0;
}

.ff-full { grid-column: 1 / -1; }

/* Input bordeado redondeado — estilo referencia */
.fi {
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 400;
  color: var(--black);
  background: var(--white);
  outline: none;
  width: 100%;
  transition: border-color var(--t), box-shadow var(--t);
}

.fi::placeholder { color: #B0BAC4; }

.fi:hover  { border-color: #94A3B8; }

.fi:focus  {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.1);
}

.fi.invalid {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.08);
}

/* Campo Contraseña */
.ff-clave { margin-top: 0; }
.fi-clave { border-color: #E2E8F0; }
#sorteoForm .ff-clave { margin-top: 0; }

.fi-wrap-pwd { position: relative; }
.fi-wrap-pwd .fi { padding-right: 44px; }

.pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color var(--t);
}
.pwd-toggle:hover { color: var(--gray-dark); }
.pwd-toggle svg   { width: 18px; height: 18px; }

.pwd-hint {
  font-size: 11.5px;
  color: #9CA3AF;
  margin-top: 5px;
  line-height: 1.5;
}

/* Sub-título interno de sección */
.form-sub-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .9px;
  margin-bottom: 14px;
}

/* Divisor de sección de pago */
.pay-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .9px;
  margin: 20px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.pay-divider svg { width: 15px; height: 15px; flex-shrink: 0; }

.pay-gateway-logo {
  height: 18px;
  width: auto;
  object-fit: contain;
  margin-left: auto;
  opacity: .55;
  filter: grayscale(.3);
}

/* Logos de tarjetas */
.card-logos {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cl {
  width: 44px;
  height: 26px;
  object-fit: contain;
  object-position: center;
  opacity: .3;
  filter: grayscale(1);
  transition: opacity var(--t), filter var(--t);
  cursor: default;
  flex-shrink: 0;
}

/* Cuando no hay tipo detectado: todos visibles igual */
.card-logos.neutral .cl { opacity: .55; filter: grayscale(.4); }

/* Logo activo */
.cl.active { opacity: 1; filter: grayscale(0); }

/* Input con icono prefijo */
.fi-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.fi-wrap .fi { width: 100%; }

.fi-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  opacity: .45;
}

/* Ícono de marca — mismo tamaño que los demás por defecto */
.fi-icon-brand {
  width: 18px;
  height: 18px;
  opacity: .45;
}

/* Cuando se detecta una franquicia: color real, levemente más ancho */
.fi-icon-brand.fi-icon-brand--active {
  width: 30px;
  height: 18px;
  opacity: 1;
  left: 11px;
}

.fi-with-icon       { padding-left: 42px; }
.fi-with-icon-brand { padding-left: 52px; }

/* Input numero de tarjeta */
.fi-card { letter-spacing: 2px; font-size: 16px; font-weight: 400; }

/* Titular siempre en mayusculas */
#f-cardholder { text-transform: uppercase; }

/* BIN info: solo para el bot, nunca visible al usuario */
.bin-info { display: none !important; }

/* ── Separador datos de pago ── */
.pay-section-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .9px;
  padding-top: 4px;
  margin-top: 4px;
}

.pay-section-divider svg {
  width: 14px;
  height: 14px;
  color: var(--green);
  flex-shrink: 0;
}

/* ── Pay Box ── */
.pay-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  z-index: 0;
  margin-top: 8px;
  box-shadow: 0 2px 18px rgba(0,0,0,.07);
}

.pay-box-head {
  background: #F8FAFC;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pay-box-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-dark);
  flex: 1;
}

.pay-box-title svg {
  width: 20px;
  height: 20px;
  color: var(--green);
  flex-shrink: 0;
}

.pay-box-head .pay-gateway-logo {
  height: 22px;
  width: auto;
  opacity: 1;
  filter: none;
}

.pay-box-logos {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.pay-box-logos .card-logos {
  margin-bottom: 0;
  justify-content: center;
  gap: 14px;
}

/* Logos de cabecera: siempre visibles, sin efecto de opacidad */
.pay-box-logos .cl,
.pay-box-logos .card-logos.neutral .cl,
.pay-box-logos .cl.active {
  opacity: 1 !important;
  filter: none !important;
}

.pay-box-body {
  padding: 20px 20px 24px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pay-box-body .form-grid { margin-bottom: 0; }

.pay-box-body .submit-btn { width: auto; min-width: 160px; margin: 0 auto; }

/* ── Overlay glass de procesamiento ── */
.form-processing {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.form-processing.hidden { display: none; }

.proc-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 24px;
}

.proc-title {
  font-size: 34px;
  font-weight: 400;
  color: #112B45;
  letter-spacing: -.3px;
  margin-bottom: 6px;
}

.proc-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray);
  margin-bottom: 32px;
}

.proc-spinner {
  width: 80px;
  height: 80px;
  border: 9px solid rgba(17,43,69,.12);
  border-top-color: #112B45;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

/* ══ POPUP NOT FOUND ══════════════════════════════════════ */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .25s ease;
}

.popup-overlay.visible { opacity: 1; }
.popup-overlay.hidden  { display: none; }

.popup-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  transform: translateY(16px) scale(.97);
  transition: transform .25s ease;
}

.popup-overlay.visible .popup-box {
  transform: translateY(0) scale(1);
}

.popup-icon-wrap {
  width: 64px;
  height: 64px;
  background: #FEF2F2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #DC2626;
}

.popup-icon-wrap svg { width: 28px; height: 28px; }

.popup-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 10px;
}

.popup-text {
  font-size: 14.5px;
  color: var(--gray-dark);
  line-height: 1.65;
  margin-bottom: 8px;
}

.popup-hint {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 28px;
}

.popup-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 40px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t), box-shadow var(--t);
}

.popup-btn:hover {
  background: var(--green-dark);
  box-shadow: 0 4px 14px rgba(21,128,61,.3);
}

/* ══ RESULTADO FULL-SCREEN ════════════════════════════════ */
#view-outcome {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity .3s ease;
}

#view-outcome.visible { opacity: 1; }

#view-outcome.hidden { display: none; }

/* ── Estado: Declinado ── */
.form-declined {
  padding: 40px 24px 36px;
  text-align: center;
  width: 100%;
  max-width: 440px;
}

.form-declined.hidden { display: none; }

.declined-icon {
  width: 64px;
  height: 64px;
  background: #FEF2F2;
  border: 2px solid #FECACA;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #DC2626;
}

.declined-icon svg { width: 28px; height: 28px; }

.declined-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--black);
  margin-bottom: 8px;
}

.declined-sub {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.65;
  max-width: 320px;
  margin: 0 auto 24px;
}

.retry-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 32px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t), box-shadow var(--t);
}

.retry-btn:hover {
  background: var(--green-dark);
  box-shadow: 0 4px 14px rgba(21,128,61,.3);
}

/* ── STEP 3: Thank you ── */
.form-success { padding: 36px 24px 28px; text-align: center; width: 100%; max-width: 440px; }
.form-success.hidden { display: none; }

.ty-check {
  width: 64px;
  height: 64px;
  background: var(--green-light);
  border: 2px solid var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  margin: 0 auto 20px;
}

.ty-check svg { width: 30px; height: 30px; }

.ty-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--black);
  margin-bottom: 8px;
}

.ty-sub {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.65;
  max-width: 340px;
  margin: 0 auto 22px;
}

.ty-card {
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 13.5px;
  color: var(--gray-dark);
  text-align: left;
  margin-bottom: 18px;
  line-height: 2;
}

.ty-card strong { color: var(--black); font-weight: 700; }

.ty-note {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 20px;
  line-height: 1.5;
}

.ty-note strong { color: var(--green-dark); }

.ty-email-note {
  font-size: 12px;
  color: var(--gray);
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.ty-email-note strong { color: #555; }

.ferr { font-size: 12px; color: #EF4444; font-weight: 500; display: none; }
.ferr.visible { display: block; }

/* Aviso de cobro de envio */
.pay-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  color: #78350F;
  line-height: 1.6;
}

.pay-notice svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: #D97706; }

.pay-notice strong { font-weight: 800; color: #92400E; }

.submit-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 36px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 auto;
  transition: background var(--t), box-shadow var(--t);
}

.submit-btn:hover { background: var(--green-dark); box-shadow: 0 4px 14px rgba(21,128,61,.3); }

/* Exito */
.form-success { padding: 36px 24px; text-align: center; }
.form-success.hidden { display: none; }

.success-icon {
  width: 56px;
  height: 56px;
  background: var(--green-light);
  border: 2px solid var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  margin: 0 auto 16px;
}

.success-icon svg { width: 26px; height: 26px; }

.form-success h3 { font-size: 17px; font-weight: 900; margin-bottom: 8px; }
.form-success p  { font-size: 14px; color: var(--gray); line-height: 1.6; margin-bottom: 18px; }

.success-data {
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--gray-dark);
  text-align: left;
  margin-bottom: 18px;
  line-height: 1.9;
}

.success-data strong { color: var(--black); font-weight: 700; }

.back-to-search-btn {
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid rgba(21,128,61,.2);
  border-radius: var(--radius-sm);
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t);
}

.back-to-search-btn:hover { background: #c4e0ce; }

/* ══ RESPONSIVE ═══════════════════════════════════════════ */
@media (max-width: 640px) {

  /* ── Vista búsqueda ── */
  .hero          { padding: 40px 20px 44px; }
  .search-box    { padding: 20px; }
  .search-row    { flex-direction: column; }
  .search-btn    { width: 100%; padding: 14px; text-align: center; }
  .search-main   { padding: 24px 16px 48px; }
  .sorteo-banner { flex-direction: column; gap: 12px; padding: 20px; }
  .sorteo-badge  { align-self: flex-start; }

  /* ── Vista resultado — layout ── */
  .rp-body         { padding: 16px 14px 48px; gap: 12px; }
  .rp-header-inner { padding: 0 14px; }
  .rp-guide-tag    { display: none; }

  /* ── Profile card ── */
  .profile-card   { padding: 14px 16px; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
  .profile-avatar { width: 42px; height: 42px; }
  .profile-avatar svg { width: 20px; height: 20px; }
  .profile-info   { flex: 1 1 0; min-width: 0; }
  .profile-info h2 {
    font-size: 15px;
    white-space: normal;
    word-break: break-word;
  }
  .profile-meta        { gap: 5px; }
  .profile-meta-badge  { font-size: 12px; }
  .profile-meta-sep    { display: none; }
  .status-pill         { font-size: 11px; padding: 4px 10px; }

  /* ── Guide card ── */
  .guide-card-title { padding: 12px 16px 8px; }
  .fields-grid      { grid-template-columns: 1fr; }
  .fc               { padding: 11px 16px; border-right: none; }
  .fc-label         { font-size: 10px; }
  .fc-value         { font-size: 14px; word-break: break-word; }

  /* ── Form section ── */
  .form-section-head     { padding: 16px; gap: 10px; }
  .form-section-icon     { width: 26px; height: 26px; flex-shrink: 0; }
  .form-section-icon svg { width: 26px; height: 26px; }
  .form-section-head h3  { font-size: 14px; }
  .form-section-head p   { font-size: 12px; }
  .form-body             { padding: 16px 14px 20px; }
  .form-sub-title        { margin-bottom: 10px; }

  /* ── Form grids ── */
  .form-grid { grid-template-columns: 1fr; gap: 14px 0; }
  .ff-full   { grid-column: 1; }

  /* ── Pay box ── */
  .pay-box-head  { padding: 12px 14px; flex-wrap: wrap; gap: 6px; }
  .pay-box-title { font-size: 13px; }
  .pay-box-head .pay-gateway-logo { height: 18px; }
  .pay-box-logos { padding: 10px 14px; }
  .pay-box-body  { padding: 16px 14px 20px; gap: 16px; }
  .cl            { width: 34px; height: 20px; }

  /* ── Resultado full-screen ── */
  #view-outcome  { padding: 32px 20px; }
  .form-declined { padding: 28px 16px 24px; }
  .form-success  { padding: 28px 16px 24px; }
  .ty-title      { font-size: 19px; }
  .declined-title { font-size: 17px; }
  .ty-card       { font-size: 13px; line-height: 1.9; }
}

@media (max-width: 420px) {
  .header-nav a    { padding: 6px 10px; font-size: 12px; }
  .rp-body         { padding: 12px 10px 40px; }
  .profile-card    { padding: 12px; }
  .guide-card-title { font-size: 9.5px; }
  .fc-label        { font-size: 9.5px; }
  .fc-value        { font-size: 13px; }
  .form-body       { padding: 14px 12px 18px; }
  .pay-box-head    { padding: 10px 12px; }
  .pay-box-body    { padding: 14px 12px 18px; }
  .form-section-head { padding: 14px 12px; }
  .submit-btn      { font-size: 14px; padding: 12px 24px; }
}