/* Vista: inicio (bienvenida) */
/* Vista: inicio (bienvenida) */
.vista-inicio {
  display: flex;
  flex-direction: column;
  justify-content: center;   /* centrado vertical */
  align-items: center;       /* centrado horizontal */
  text-align: center;
  min-height: 100vh;         /* ocupa toda la altura */
  padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom);
  box-sizing: border-box;
}

.vista-inicio .contenido {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
}

.vista-inicio h2 {
  font-size: clamp(22px, 5vw, 28px);
  margin: 0;
}

.vista-inicio p {
  margin: 0 0 10px;
  opacity: 0.95;
}

.vista-inicio .btn {
  margin-top: 16px;
  width: 180px;
  height: 48px;
}


/* Vista: login */
/* ===== PARCHE LOGIN SANA SANA (override) ===== */

/* Layout general de la vista */
.vista-login{
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  justify-items: center;
  gap: 18px;
  padding: 8vh 20px 16px;
  text-align: center;
}

.vista-login .logo{
  width: 120px;              /* más pequeño, como el mock */
  margin: 1 0 8px;
}

.vista-login h2{
  font-size: clamp(20px, 4.8vw, 24px);
  margin: 0 0 12px;
  font-weight: 800;
}

.vista-login .links{
  display: grid !important;
  justify-items: center;
  gap: 4px !important;          /* separación entre líneas */
  margin-top: 12px !important;  /* aire respecto al botón */
  text-align: center;
}

.vista-login .links p{
  margin: 0 !important;
  color: rgba(255,255,255,.9);
  font-size: 15px;
  line-height: 1.35;
}
.vista-login .links a{
  display: inline-block;
  margin: 0 !important;         /* anula márgenes heredados */
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.vista-login .links a + a{
  margin-top: 4px !important;   /* la separación exacta */
  text-decoration: underline;
  font-size: 15px;
}

.vista-login .links a:hover {
  text-decoration: underline;
}

/* Formulario centrado y angosto */
.form-login{
  width: min(420px, 86vw);
  display: grid;
  gap: 18px;
  text-align: left;
}

/* Campo estilo “línea inferior” */
.campo{
  position: relative;
}

.input{
  width: 100%;
  height: 44px;
  padding: 0;                 /* sin padding para alinear con la línea */
  border: 0;
  border-bottom: 2px solid rgba(255,255,255,.75);
  background: transparent;    /* quita cajas blancas */
  color: #fff;
  font-size: 16px;
  outline: none;
}
.input::placeholder{ color: rgba(255,255,255,.92); }

/* Icono “ojo” (mostrar/ocultar) */
.toggle-eye{
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: .9;
}

/* Botón azul como el mock */
.btn-azul{
  background: #006bb2;
  border-radius: 10px;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.form-login .btn-azul{
  justify-self: center;
  width: 210px;               /* ancho visual del mock */
}


/* Footer pequeño y centrado */
.footer{
  position: static;           /* que no pise el safe-area */
  font-size: 12px;
  opacity: .9;
  margin-top: auto;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

/* === Espaciado exacto entre "Regístrate aquí" y "Olvidé mi contraseña" === */

/* reduce el aire que deja el form debajo del botón */
.form-login { margin-bottom: 8px !important; }

/* bloque de links sin márgenes heredados y con gap fijo */
.vista-login .links{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  row-gap: 4px !important;           /* separación entre líneas */
  margin-top: 12px !important;       /* aire respecto al botón */
  text-align: center;
}

/* anula cualquier margen interno de hijos (p, a, etc.) */
.vista-login .links > *{
  margin: 0 !important;
  line-height: 1.35;
  font-size: 15px;
}

/* primera línea (el párrafo con "¿No tienes cuenta?...") */
.vista-login .links p{
  color: rgba(255,255,255,.9) !important;
}

/* segunda línea */
.vista-login .links > a{
  text-decoration: underline;
  font-weight: 800;
}

.hdr-registro{
  margin-bottom: 16px;
  margin-top: 4px;
}

/* Header + stepper */
.hdr-registro h2{
  text-align: center;
  color: #0a5c73; /* azulado legible sobre el gradiente */
  margin: 8px 0 14px;
  font-weight: 800;
}
/* Botón de retroceso */
.btn-back{
  position: absolute;
  top: calc(env(safe-area-inset-top) + 8px);
  left: 12px;
  background: none;
  border: none;
  color: #0a5c73;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 6px 8px;
  z-index: 2;
  border-radius: 8px;
  transition: background .2s ease;
}
.btn-back:hover{ background: rgba(0,0,0,.05); }

.pasos{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}
.paso{
  width: 34px; height: 34px; border-radius: 999px;
  border: 2px solid #0a5c73; color:#0a5c73;
  display: grid; place-items: center; font-weight: 800; background: transparent;
}
.paso.activo{ background:#0a5c73; color:#fff; }
.conector{ height: 2px; width: 42px; background: rgba(10,92,115,.35); border-radius: 2px; }

/* Tarjeta */
.tarjeta h3{ text-align:center; margin: 4px 0 4px; color:#0f172a; }

/* Formulario */
.form-registro{ display: grid; gap: 14px; }
.btn-block{
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  margin-top: 8px;
}

/* Campos “tinta” (línea inferior oscura) sobre tarjeta blanca */
.input-ink{
  color:#0f172a !important;
  border-bottom: 2px solid #606c7a !important;
  background: transparent !important;
}
.input-ink::placeholder{ color:#64748b !important; }

/* Select “tinta” */
.campo.select select{
  -webkit-appearance:none; appearance:none; background: transparent;
}

/* Checkbox compacto */
.chk{ display:flex; align-items:center; gap:8px; color:#0f172a; font-size:14px; }
.chk input{ width:18px; height:18px; }

/* Estados de paso oculto/visible */
.form-registro.hidden{ display:none; }

/* == Registro: layout + tarjeta == */
.vista-registro{
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(8vh + env(safe-area-inset-top)) 16px calc(10vh + env(safe-area-inset-bottom));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #069ec0, #51b2bb, #83c2b9);
}

.vista-registro .tarjeta{
  width: min(520px, 85vw);
  margin: 10px auto 14px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  overflow: visible; /* no recorta sombras internas */
}

/* == Paso 2: lista y cards dentro de la tarjeta == */
.vista-registro .lista-planes{
  display: grid;
  gap: 14px;
  width: 100%;      /* << ANCHO AL 100% DEL CONTENEDOR */
  margin: 0;        /* << SIN MÁRGENES EXTERNOS */
}

.vista-registro .plan{
  box-sizing: border-box;     /* << EVITA DESBORDES POR PADDING */
  width: 100%;                /* << OCUPA EL ANCHO DE LA TARJETA */
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #0a8fb0, #60b7be, #83c2b9);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
  position: relative;
}

.vista-registro .plan-head{
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.vista-registro .plan-titulo{ margin: 0; font-weight: 800; font-size: 20px; }
.vista-registro .plan-precio{ font-weight: 900; font-size: 18px; }
.vista-registro .plan-desc{ margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.vista-registro .plan-ico{ font-size: 28px; text-align: right; margin-bottom: 8px; }

.vista-registro .plan-select{
  background: rgba(255,255,255,.2);
  border: 0; border-radius: 8px;
  color: #fff; font-weight: 600;
  padding: 8px 16px; cursor: pointer;
}

/* == Botonera del paso 2 (ahora dentro de la tarjeta) == */
.vista-registro .acciones-wizard{
  width: 100%;
  margin: 12px 0 0;      /* separación del listado */
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Utilidad */
.hidden{ display: none !important; }

/* La tarjeta recorta cualquier desborde (bordes redondeados perfectos) */
.vista-registro .tarjeta{
  overflow: hidden;      /* antes estaba visible */
}

/* Asegura que la lista y cards no generen desbordes horizontales */
.vista-registro .lista-planes{
  width: 100%;
  margin: 0;
  padding: 0;            /* por si algún reset añadió padding */
}

.vista-registro .plan{
  box-sizing: border-box;
  width: 100%;
  margin: 0;             /* evita márgenes laterales ajenos */
}

/* === Habilitar scroll vertical en las vistas (todas) === */
html, body { height: 100%; }

#app, main {
  min-height: 100dvh;       /* viewport móvil real */
  overflow-y: visible;      /* que no bloquee el scroll de las vistas */
  overflow-x: hidden;       /* pero sin desbordes horizontales */
}

/* cada vista desplaza su propio contenido */
.vista {
  min-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* scroll suave en iOS */
  touch-action: pan-y;
}

/* asegura que registro también pueda desplazar (por si otra regla lo pisa) */
.vista-registro {
  overflow-y: auto !important;
}

/* ==== FIX SCROLL GLOBAL PARA VISTAS SPA ==== */

/* 1) Nada de layouts raros en body/#app que bloqueen el scroll */
html, body {
  height: auto !important;
  min-height: 100dvh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#app, main {
  display: block !important;              /* anula flex si lo tuviera */
  height: auto !important;
  min-height: 100dvh !important;
  overflow: visible !important;           /* que no capture el scroll */
}

/* 2) La vista es la que desplaza */
.vista {
  position: relative;
  height: auto !important;
  min-height: 100dvh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
}

/* 3) Vista registro: asegurar scroll y que nada lo tape */
.vista-registro {
  overflow-y: auto !important;
  contain: layout paint style;            /* aísla layout para que el padre no lo recorte */
}

/* 4) La tarjeta NO debe capturar el scroll (solo redondear bordes) */
.vista-registro .tarjeta {
  overflow: hidden !important;            /* bordes redondeados */
}

/* 5) Nada de desbordes horizontales en la lista/planes */
.vista-registro .lista-planes { width: 100% !important; margin: 0 !important; padding: 0 !important; }
.vista-registro .plan { width: 100% !important; box-sizing: border-box !important; margin: 0 !important; }

/* 6) Evita que algún reset meta 'overflow:hidden' en body o html */
:root, body { overscroll-behavior-y: contain; }

/* Radio cards */
.plan { padding: 0; background: none; box-shadow: none; }
.plan-label{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg,#0a8fb0,#60b7be,#83c2b9);
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
  cursor: pointer;
}
.plan-radio{ position: absolute; inset: 0; opacity: 0; pointer-events: none; }

.plan-body{
  padding: 16px;
  color: #fff;
}
.plan-check{
  align-self: start;
  margin: 12px 12px 0 0;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  color:#fff; display:grid; place-items:center;
  font-weight: 900;
  opacity: .0; transform: scale(.8);
  transition: opacity .15s ease, transform .15s ease, background .2s ease;
}

/* Seleccionado (via :has) — soportado por navegadores modernos */
.plan-label:has(.plan-radio:checked){
  outline: 3px solid #00b37d;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.plan-label:has(.plan-radio:checked) .plan-check{
  opacity: 1;
  transform: scale(1);
  background: #00b37d;
}

/* Hover/touch feedback opcional */
.plan-label:active { transform: translateY(1px); }

/* Quitamos el botón antiguo si queda alguno por cache */
.plan-select{ display: none !important; }

/* ===== Paso 3: Pago ===== */
.vista-pago { padding: calc(6vh + env(safe-area-inset-top)) 16px calc(10vh + env(safe-area-inset-bottom)); }

.vista-pago .resumen-monto{
  margin: 0 auto 18px;
  background:#fff; color:#111;
  border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  display:flex; flex-direction:column;
}
.vista-pago .resumen-monto .monto{ font-size: 22px; }

.tarjeta-pago{ margin: 0 auto 14px; padding: 16px; background:#fff; border-radius:16px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.tarjeta-pago h3{ text-align:center; margin:0 0 12px; color:#0f172a; }

/* Tabs de método */
.tabs-pago{
  display:grid; grid-template-columns: repeat(3,1fr); gap:12px;
  margin: 8px 0 14px;
}
.tab-metodo{
  display:grid; place-items:center; gap:6px;
  padding: 12px 8px; border-radius:12px; border:2px solid #0a5c73;
  background:#fff; color:#0a5c73; font-weight:700; cursor:pointer;
}
.tab-metodo small{ font-weight:800; }
.tab-metodo.activo{ outline: 3px solid #0a5c73; box-shadow: 0 8px 18px rgba(0,0,0,.12); }

/* Paneles */
.panel-metodo{ display:grid; gap:14px; }
.panel-metodo.hidden{ display:none; }

.panel-metodo h4{ margin: 0 0 4px; color:#0f172a; }
.panel-metodo .ayuda{ margin:0 0 6px; color:#334155; font-size:14px; line-height:1.3; }

.grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px){ .grid-2{ grid-template-columns: 1fr; } }

.logo-banco{ text-align:center; margin-top: 6px; opacity:.9; }

/* Botón Guardar dentro de la tarjeta */
.btn-guardar{ width: 140px; justify-self:center; }

/* Botonera inferior */
.vista-pago .acciones-wizard{ width: min(520px, 75vw); margin: 12px auto 0; display:flex; justify-content:space-between; gap:12px; }

/* ===== HOTFIX: evitar corte derecho por doble padding ===== */

/* Quita padding lateral del shell; solo deja el vertical (safe areas) */
#app{
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Las vistas gestionan el padding lateral */
.vista{
  padding-left: 16px !important;
  padding-right: 16px !important;

  /* No recortes horizontalmente: algunos hijos calculan ancho en vw */
  overflow-x: visible !important;
  box-sizing: border-box;
  width: 100%;
}

/* Si tienes este “centro” global en estilios.css, anúlalo: */
body{
  display: block !important;
  height: auto !important;
}
