/* ============================================================
   Pasarela de pagos Credere — estilos propios.
   Hereda el sistema de diseño de css/styles.css (Landing).
   ============================================================ */

/* La página es una sola tarea: fondo suave de borde a borde,
   la tarjeta blanca resalta y el footer siempre queda en el piso. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
}
body > main {
  flex: 1 0 auto;
  display: flex;
  width: 100%;
}
.footer { flex-shrink: 0; }

/* En la pasarela el header NO se vuelve pastilla al hacer scroll:
   barra completa siempre (anula el morph heredado del landing). */
.nav.is-scrolled .nav__inner,
.nav .nav__inner {
  width: 100% !important;
  max-width: none !important;
  border-radius: 0 !important;
  border-color: transparent !important;
  border-bottom-color: #C3CFDD !important;
  padding: 0 32px !important;
  height: 72px !important;
}
@media (max-width: 700px) {
  .nav.is-scrolled .nav__inner,
  .nav .nav__inner { padding: 0 18px !important; }
}

.pas {
  max-width: 560px;
  width: 100%;
  margin: auto;              /* centrada vertical y horizontal en el espacio libre */
  padding-top: 40px;
  padding-bottom: 48px;
}

.pas__card { background: #fff; }

/* bienvenida dentro de la tarjeta: una sola voz, sin textos regados */
.pas__bienvenida { text-align: center; padding: 4px 0 2px; }
.pas__bienvenida h1 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.pas__bienvenida p { margin-top: 4px; color: var(--body); font-size: .95rem; }

/* formas de marca en las esquinas (referencia Finesa, paleta Credere) */
.pas__deco { position: fixed; pointer-events: none; z-index: 0; }
main { position: relative; z-index: 1; }
.pas__deco--disco {
  left: -110px;
  bottom: -190px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--navy));
}
.pas__deco--lineas {
  left: 150px;
  bottom: -40px;
  width: 240px;
  height: 240px;
  background: repeating-linear-gradient(135deg, var(--sky) 0 10px, transparent 10px 30px);
  border-radius: 20px;
  opacity: .28;
  clip-path: polygon(0 100%, 0 35%, 65% 100%);
}
.pas__deco--arco {
  top: -130px;
  right: -130px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--navy);
}
.pas__deco--arco::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: translate(-16%, 16%);
  background: var(--bg-soft);
}
@media (max-width: 900px) {
  .pas__deco { display: none; }
}

/* con sesión: el saludo reemplaza la etiqueta bajo "Credere"
   y el botón pasa de "Volver al sitio" a "Cerrar sesión" */
.nav__user { display: none !important; }
body.is-sesion .brand-tag { display: none !important; }
body.is-sesion .nav__user {
  display: block !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 46vw;
}
.nav__user b { color: var(--ink); font-weight: 700; }

.nav__salir { display: none; }
body.is-sesion .nav__salir { display: inline-flex; }
body.is-sesion .nav__volver { display: none; }

.pas__card { padding: 30px; }

/* el atributo hidden siempre gana (el display de .field lo pisaba) */
[hidden] { display: none !important; }

/* progreso: identifícate → verifica → tu pago → PSE */
.pas__dots {
  display: flex;
  gap: 6px;
  list-style: none;
  margin-bottom: 22px;
}
.pas__dots li {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  transition: background-color 200ms ease;
}
.pas__dots li.is-active { background: var(--amber); }
.pas__dots li.is-done { background: var(--mint); }

/* pantallas del flujo */
.pas__step { display: none; flex-direction: column; gap: 20px; }
.pas__step.is-active { display: flex; animation: stepIn 360ms var(--ease-out); }

.pas__intro h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.pas__intro p { margin-top: 4px; color: var(--body); font-size: .95rem; }
.pas__intro b { color: var(--ink); }

/* select con la misma voz que los inputs del sistema */
.field select {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-input);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232B333A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  font: inherit;
  font-size: .98rem;
  color: var(--ink);
  appearance: none;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field select:focus-visible {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(13, 82, 87, .18);
}
.field select:invalid { color: var(--muted); }

.field__label {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

/* ---- selects propios (dsel): lindos y con buscador ---- */
.dsel { position: relative; }
.dsel__nativo { display: none !important; }
.dsel__btn {
  width: 100%;
  text-align: left;
  padding: 12px 40px 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-input);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232B333A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  font: inherit;
  font-size: .98rem;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.dsel__btn.is-placeholder { color: var(--muted); }
.dsel__btn:disabled { background-color: var(--bg-soft); cursor: default; }
.dsel__btn:focus-visible,
.dsel.is-abierto .dsel__btn {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(13, 82, 87, .18);
}
.dsel__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 55;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(33, 51, 49, .16);
  overflow: hidden;
  animation: modalIn 160ms var(--ease-out);
}
.dsel__buscar { padding: 10px; border-bottom: 1px solid var(--line); }
.dsel__buscar input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
}
.dsel__buscar input:focus-visible { outline: none; border-color: var(--sky); }
.dsel__lista { max-height: 240px; overflow-y: auto; padding: 6px; }
.dsel__op {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  font: inherit;
  font-size: .94rem;
  color: var(--ink);
  cursor: pointer;
}
.dsel__op:hover { background: var(--bg-soft); }
.dsel__op.is-activa {
  background: rgba(13, 82, 87, .08);
  color: var(--sky-text);
  font-weight: 600;
}
.dsel__vacio { padding: 14px; text-align: center; color: var(--muted); font-size: .9rem; }

/* verificación: casillas de los últimos 4 dígitos */
.pas__otp {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.pas__otp input {
  width: 56px;
  height: 62px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-input);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.pas__otp input:focus-visible {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(13, 82, 87, .18);
}
.pas__otp-err { text-align: center; margin-top: -8px; }

/* ---- modal de verificación (referencia Finesa) ---- */
.pas__overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(33, 51, 49, .55);
}
.pas__modal {
  width: min(430px, 100%);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(33, 51, 49, .35);
  animation: modalIn 240ms var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.pas__modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: #fff;
  padding: 14px 16px;
}
.pas__modal-head svg { width: 20px; height: 20px; flex: none; }
.pas__modal-head b { font-size: 1rem; font-weight: 700; }
.pas__modal-x {
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.pas__modal-x:hover { background: rgba(255, 255, 255, .14); }
.pas__modal-x svg { width: 16px; height: 16px; }
.pas__modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pas__modal-txt { text-align: center; font-size: .95rem; color: var(--body); }
.pas__modal-txt b { color: var(--ink); }
.pas__modal-ayuda { text-align: center; font-size: .84rem; color: var(--muted); }

/* la imagencita: mini estado de cuenta con el número resaltado */
.pas__factura {
  background: var(--navy);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pas__factura > p {
  text-align: center;
  font-size: .88rem;
  color: rgba(255, 255, 255, .85);
}
.pas__factura > p b { color: #fff; }
.pas__factura-doc {
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pas__factura-brand {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pas__factura-brand .brand-mark { width: 16px; height: 18px; }
.pas__factura-brand > span:first-of-type {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  color: var(--ink);
}
.pas__factura-nro {
  margin-left: auto;
  font-size: .74rem;
  color: var(--body);
  border: 2px solid var(--sky);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  transform: rotate(-2deg);
}
.pas__factura-nro b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pas__factura-lineas { display: flex; flex-direction: column; gap: 6px; }
.pas__factura-lineas i { height: 7px; border-radius: 4px; background: var(--line); }
.pas__factura-lineas i:nth-child(2) { width: 78%; }
.pas__factura-lineas i:nth-child(3) { width: 55%; }

@media (prefers-reduced-motion: reduce) {
  .pas__modal { animation: none; }
  body.info-abierta .pas__info-caja { animation: none; }
}

/* cargando */
.pas__step[data-pas="cargando"] { align-items: center; padding: 28px 0; }
.pas__loader {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--sky);
  animation: pasSpin 900ms linear infinite;
}
@keyframes pasSpin { to { transform: rotate(360deg); } }
.pas__loading-txt { color: var(--muted); font-size: .95rem; }

.pas__sub { font-size: .95rem; color: var(--body); }

/* saludo dentro de la tarjeta: solo en celular (en PC vive en el header) */
.pas__hola-m {
  display: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}
@media (max-width: 700px) {
  .pas__hola-m { display: block; margin-bottom: -8px; }
  body.is-sesion .nav__user { display: none !important; }
}

/* tarjeta por crédito */
.pas__creditos { display: flex; flex-direction: column; gap: 14px; }

.pcred {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #fff;
  overflow: hidden;
  transition: opacity 200ms ease;
}
.pcred__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.pcred__check {
  width: 20px;
  height: 20px;
  flex: none;
  accent-color: var(--sky);
  cursor: pointer;
}
.pcred__id { min-width: 0; }
.pcred__id b { display: block; font-size: .98rem; color: var(--ink); }
.pcred__id span { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pcred__chip {
  margin-left: auto;
  flex: none;
  font-size: .76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-mint);
  color: var(--mint-dark);
  border: 1px solid rgba(13, 82, 87, .3);
}
.pcred.is-mora .pcred__chip {
  background: #FBEDE7;
  color: #B84A34;
  border-color: rgba(184, 74, 52, .3);
}
.pcred.is-off .pcred__body { display: none; }
.pcred.is-off { opacity: .55; }

.pcred__body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.pcred__datos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcred__datos > div {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 10px 12px;
}
.pcred__datos span { display: block; font-size: .72rem; color: var(--muted); }
.pcred__datos b {
  font-size: .94rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* el abono se ofrece con un botón discreto, no como tarjeta fija */
.pcred__abonar {
  align-self: center;
  background: none;
  border: none;
  padding: 2px 4px;
  font: inherit;
  font-size: .88rem;
  font-weight: 500;
  color: var(--sky-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.pcred__abonar:hover { color: var(--ink); }

/* al día: se le dice al asociado POR QUÉ no hay nada que pagar */
.pcred__aldia {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-mint);
  border: 1px solid rgba(13, 82, 87, .3);
  border-radius: var(--r-input);
  padding: 12px 14px;
  font-size: .92rem;
  color: var(--body);
  line-height: 1.5;
}
.pcred__aldia svg { width: 20px; height: 20px; flex: none; color: var(--mint-dark); margin-top: 1px; }
.pcred__aldia b { color: var(--mint-dark); }

/* opciones de pago: se leen como elección, no como datos */
.pas__opciones { display: flex; flex-direction: column; gap: 10px; }

.pas__opciones .tcard__body {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
}
/* círculo de radio: comunica "elige una" */
.pas__opciones .tcard__body::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: #fff;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.pas__opciones .tcard input:checked + .tcard__body::before {
  border-color: var(--sky);
  background: var(--sky);
  box-shadow: inset 0 0 0 3px #fff;
}

.pas__op-txt { display: flex; flex-direction: column; min-width: 0; }
.pas__op-txt b {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pas__op-txt small { font-size: .8rem; color: var(--muted); }

/* opción de ponerse al día resaltada cuando hay mora */
.pcred__mora .tcard__body { border-color: rgba(184, 74, 52, .35); background: #FBEDE7; }
.pcred__mora input:checked + .tcard__body { border-color: #B84A34; box-shadow: 0 0 0 1px #B84A34; background: #FBEDE7; }
.pcred__mora input:checked + .tcard__body::before { border-color: #B84A34; }
.pcred__mora .pas__op-txt small { color: #B84A34; font-weight: 600; }

/* resumen del pago: barra pegajosa abajo en móvil, panel lateral en PC */
.pas__totalbar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  background:
    radial-gradient(58% 90% at 100% 0%, rgba(79, 192, 182, .16), transparent 70%),
    radial-gradient(40% 70% at 0% 100%, rgba(13, 82, 87, .18), transparent 70%),
    var(--navy);
  border-radius: var(--r-card);
  padding: 14px 16px;
  box-shadow: 0 10px 26px rgba(33, 51, 49, .20);
}
.pas__totalbar-check { display: none; }
.pas__totalbar-txt { min-width: 0; }
.pas__totalbar-txt span { display: block; font-size: .76rem; font-weight: 600; letter-spacing: .04em; color: var(--teal-bright); }
.pas__totalbar-txt b {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pas__totalbar-txt small { display: none; font-size: .82rem; color: rgba(255, 255, 255, .72); }
.pas__totalbar .btn { margin-left: auto; flex: none; }
.pas__totalbar .btn:disabled { opacity: .5; cursor: not-allowed; }

/* botón sobre el panel oscuro: teal brillante con texto oscuro (pop premium) */
.pas__totalbar .btn--pay,
.pas__pago-bar .btn--pay {
  background: var(--teal-bright);
  color: var(--navy);
}
.pas__totalbar .btn--pay:hover,
.pas__pago-bar .btn--pay:hover { background: #6FCFC6; }

/* ---- escritorio: panel de créditos ancho tipo portal (referencia Finesa) ---- */
@media (min-width: 960px) {
  .pas.pas--wide { max-width: 1020px; }

  .pas--wide .pas__step.is-active[data-pas="creditos"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas:
      "sub    aside"
      "lista  aside"
      "salir  aside";
    align-items: start;
    column-gap: 30px;
  }
  .pas--wide [data-pas="creditos"] .pas__sub { grid-area: sub; }
  .pas--wide [data-pas="creditos"] .pas__creditos { grid-area: lista; }
  .pas--wide [data-pas="creditos"] .wiz__redo { grid-area: salir; justify-self: start; }

  .pas--wide [data-pas="creditos"] .pas__totalbar {
    grid-area: aside;
    position: static;
    align-self: stretch;          /* ocupa toda la altura de la columna */
    flex-direction: column;
    align-items: stretch;
    justify-content: center;      /* contenido centrado en el panel */
    text-align: center;
    gap: 6px;
    padding: 26px 22px;
  }
  .pas--wide .pas__totalbar-check {
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 6px;
    color: var(--teal-bright);
  }
  .pas--wide .pas__totalbar-txt b { font-size: 1.75rem; white-space: normal; }
  .pas--wide .pas__totalbar-txt small { display: block; margin-top: 2px; }
  .pas--wide .pas__totalbar .btn { margin: 16px 0 0; width: 100%; }

  /* datos PSE: info a la izquierda, formulario en panel a la derecha */
  .pas--wide .pas__step.is-active[data-pas="pse"] {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    column-gap: 34px;
    align-items: start;
  }
}

/* paso PSE: info del pago + formulario (dos columnas en escritorio) */
.pas__pago-info { display: flex; flex-direction: column; gap: 14px; }
.pas__pago-ico { width: 42px; height: 42px; color: var(--navy); }
.pas__pago-info h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.pas__pago-datos { display: flex; flex-direction: column; gap: 10px; }
.pas__pago-datos h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.pas__pago-datos span { display: block; font-size: .78rem; color: var(--muted); }
.pas__pago-datos b { font-size: .95rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pas__pago-total {
  align-self: flex-start;
  background: var(--bg-mint);
  border: 1px solid rgba(13, 82, 87, .16);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: .95rem;
  color: var(--mint-dark);
}
.pas__pago-total b {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pas__pago-nota { font-size: .78rem; color: var(--muted); font-style: italic; }

.pas__pago-form {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pas__pago-form h2 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.pas__pago-form-sub { font-size: .84rem; color: var(--muted); margin-top: -10px; }

/* pares en escritorio, una columna cómoda en celular */
.pas__pago-campos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pas__pago-campos .field { min-width: 0; }
@media (max-width: 620px) {
  .pas__pago-campos { grid-template-columns: 1fr; gap: 14px; }
}
.pas__pago-form .field select,
.pas__pago-form .field input,
.pas__pago-form .pas__pill span { background: #fff; }

/* barra inferior del paso PSE y toggle de info: existen solo en celular */
.pas__pago-bar { display: none; }
.pas__info-toggle { display: none; }
.pas__info-caja { display: contents; } /* en escritorio no es caja: sus hijos fluyen normal */

/* en móvil la info se minimiza: barrita "Información del pago" que
   despliega un modalcito y se cierra tocando afuera */
@media (max-width: 959px) {
  .pas__pago-ico,
  .pas__pago-info > h2,
  .pas__pago-total { display: none; }
  .pas__pago-info { position: relative; gap: 0; }

  .pas__info-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--r-input);
    padding: 12px 14px;
    font: inherit;
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
  }
  .pas__info-chev { width: 16px; height: 16px; flex: none; transition: transform 200ms ease; }
  .pas__info-toggle[aria-expanded="true"] .pas__info-chev { transform: rotate(180deg); }

  .pas__info-caja { display: none; }
  body.info-abierta .pas__info-caja {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 45;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(33, 51, 49, .18);
    padding: 14px;
    animation: modalIn 200ms var(--ease-out);
  }

  .pas__pago-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .pas__pago-datos h3 { display: none; }
  .pas__pago-datos span { font-size: .72rem; }
  .pas__pago-datos b { font-size: .88rem; }
  .pas__pago-nota { font-size: .72rem; }
}

/* tipo de persona: dos pastillas, una elección */
.pas__pills { display: flex; gap: 10px; }
.pas__pill { flex: 1; cursor: pointer; }
.pas__pill input { position: absolute; opacity: 0; pointer-events: none; }
.pas__pill span {
  display: block;
  text-align: center;
  padding: 11px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-input);
  font-size: .92rem;
  font-weight: 600;
  color: var(--body);
  background: #fff;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}
.pas__pill input:checked + span {
  border-color: var(--sky);
  background: rgba(13, 82, 87, .08);
  color: var(--sky-text);
  box-shadow: 0 0 0 1px var(--sky);
}
.pas__pill input:focus-visible + span {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 82, 87, .25);
}

/* selector de método de pago: fila propia a lo ancho, con logos */
.pas__pago-campos .field--full { grid-column: 1 / -1; }
.pas__pill--metodo span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 62px;
  padding: 10px 6px;
  font-size: .84rem;
}
.pas__pill--metodo img {
  height: 26px;
  width: auto;
  display: block;
}

/* pantalla de espera de Nequi (aprobación en la app) */
.pas__nequi { text-align: center; }
.pas__nequi-logo { height: 48px; width: auto; margin: 0 auto 6px; display: block; }
.pas__nequi-timer { margin-top: 4px; color: var(--body); }
.pas__nequi-timer b { color: #0D5257; font-variant-numeric: tabular-nums; }
.pas__nequi-spin {
  width: 34px; height: 34px; margin: 18px auto;
  border: 3px solid rgba(218, 0, 129, .18);
  border-top-color: #0D5257;
  border-radius: 50%;
  animation: pas-spin 900ms linear infinite;
}
@keyframes pas-spin { to { transform: rotate(360deg); } }

/* botón de pago con total (puede partir línea, nunca desbordar);
   gap 10px SIEMPRE (el landing lo pone en 0 en móvil para su nav) */
.pas__pagar { white-space: normal; line-height: 1.3; gap: 10px !important; }
.pas__pagar span { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: center; }
.pas__pagar b { font-weight: 800; font-variant-numeric: tabular-nums; }

/* resultado: comprobante compacto tipo recibo */
.pas__result { padding: 8px 0 0; }
.pas__aprobada { color: var(--mint-dark); }

.pas__recibo {
  display: flex;
  flex-direction: column;
  text-align: left;
  margin: 20px auto 0;
  max-width: 420px;
}
.pas__recibo > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.pas__recibo > div:last-child { border-bottom: none; }
.pas__recibo dt { font-size: .85rem; color: var(--muted); flex: none; }
.pas__recibo dd {
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.pas__recibo-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
}
.pas__recibo-chip svg { width: 18px; height: 18px; color: var(--mint-dark); flex: none; }
.pas__recibo-linea {
  border: none;
  border-top: 1px solid var(--line);
  margin: 24px auto 0;
  width: 100%;
  max-width: 420px;
}
.pas__recibo-nota {
  margin-top: 18px;
  font-size: .86rem;
  color: var(--body);
  line-height: 1.6;
}
.pas__recibo-nota b { display: block; margin-bottom: 6px; }
.pas__recibo-nota b { color: var(--ink); }
.pas__result-acciones {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* la pasarela no tiene barra tipo app: sin colchón inferior heredado */
@media (max-width: 700px) {
  body { padding-bottom: 0; }
}

@media (max-width: 560px) {
  .pas { padding-top: 36px; }
  .pas__card { padding: 22px 18px; }
  .pas__otp input { width: 52px; height: 58px; }
  .pcred__datos { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* barra del total tipo menú de app: FIJA al piso de la pantalla */
  .pas__totalbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    margin: 0;
    border-radius: 16px 16px 0 0;
    padding: 14px 18px calc(28px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 28px rgba(33, 51, 49, .25);
    flex-wrap: wrap;
  }
  .pas__totalbar .btn { flex: 1 1 100%; margin-left: 0; }
  /* la animación de entrada usa transform y desancla el fixed: fuera en estas pantallas */
  .pas__step.is-active[data-pas="creditos"],
  .pas__step.is-active[data-pas="pse"] { animation: none; }
  /* colchón para que la barra no tape el final de la página */
  body.has-barra { padding-bottom: 132px; }

  /* barra fija del paso PSE: el botón del formulario se esconde y manda la barra */
  .pas__pago-form > .pas__pagar { display: none; }
  .pas__pago-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background:
      radial-gradient(50% 90% at 100% 0%, rgba(79, 192, 182, .16), transparent 70%),
      var(--navy);
    border-radius: 16px 16px 0 0;
    padding: 14px 18px calc(28px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 28px rgba(33, 51, 49, .28);
  }
  .pas__pago-bar-txt span { display: block; font-size: .76rem; font-weight: 600; color: var(--teal-bright); }
  .pas__pago-bar-txt b {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .pas__pago-bar .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pas__loader { animation-duration: 2s; }
  .pas__step.is-active { animation: none; }
}

/* iOS Safari hace zoom al enfocar un campo con fuente < 16px.
   En móvil forzamos 16px en todos los inputs/selects para evitarlo. */
@media (max-width: 959px) {
  .field input, .field select,
  .pcred__abono input,
  .pas__pago-form input, .pas__pago-form select,
  input, select, textarea { font-size: 16px; }
}

/* ============ Comprobante imprimible ============ */
.pas__print-brand { display: none; }

@media print {
  .nav, .footer, .pas__dots, .pas__deco, .pas__overlay,
  .pas__result-acciones, #rOtroPago, .result__check,
  .pas__totalbar, .pas__pago-bar { display: none !important; }
  body { background: #fff; display: block; min-height: 0; }
  main { display: block; }
  .pas { min-height: 0; margin: 0 auto; padding-top: 24px; }
  .pas__card {
    box-shadow: none;
    border: 1px solid #D8DFE8;
    border-radius: 12px;
    padding: 32px 28px;
    max-width: 560px;
    margin: 0 auto;
  }
  /* logo arriba, como todo buen recibo */
  .pas__print-brand {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
  }
  .pas__print-brand .brand-mark { width: 30px; height: 34px; }
  .pas__print-brand > span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--ink);
    letter-spacing: -0.015em;
    line-height: 1.05;
  }
  .pas__print-brand small {
    display: block;
    font-family: var(--font);
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .05em;
    color: var(--muted);
  }
}
