/* ============================================================
   Pasarela de pagos Credere — capa visual 2026
   Se carga DESPUÉS de styles.css y pasarela.css.
   Solo presentación: no cambia ids, clases que usa el JS ni flujo.
   Sistema: el mismo de crederebank.com y del portal
   (Manrope, petróleo / menta, panel de marca, campos de 52 px).
   ============================================================ */

:root {
  /* tokens nuevos */
  --petroleo: #0B3035;
  --petroleo-oscuro: #07252A;
  --petroleo-fin: #075E55;
  --menta: #8BE3BE;
  --menta-suave: #E7F8F0;
  --accion: #027D6E;
  --accion-vivo: #1F9E83;
  --borde: #DCE8E4;
  --borde-control: #8A9B9D;
  --fondo: #F3FAF6;
  --sombra-alta: 0 24px 60px -20px rgba(7, 37, 42, .35);
  --anillo: 0 0 0 4px rgba(2, 125, 110, .18);

  /* tokens heredados de styles.css / pasarela.css, reasignados */
  --navy: #0B3035;
  --navy-2: #0F3F45;
  --navy-deep: #07252A;
  --mint: #027D6E;
  --mint-dark: #036A5E;
  --sky: #027D6E;
  --sky-text: #027D6E;
  --purple: #027D6E;
  --amber: #027D6E;
  --teal-bright: #8BE3BE;
  --ink: #102D31;
  --body: #3E585C;
  --muted: #5E7174;
  --bg: #FFFFFF;
  --bg-soft: #F3FAF6;
  --bg-mint: #E7F8F0;
  --line: #DCE8E4;
  --line-strong: #8A9B9D;
  --r-card: 16px;
  --r-input: 14px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  background: var(--fondo);
  color: var(--body);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); font-weight: 800; letter-spacing: -.02em; }

:focus-visible { outline: 2px solid var(--accion); outline-offset: 3px; }

/* ---------- Header ---------- */
.nav {
  position: relative;
  height: auto;
  background: #fff;
  border-bottom: 1px solid var(--borde);
}
.nav .nav__inner,
.nav.is-scrolled .nav__inner {
  max-width: 1208px !important;
  margin-inline: auto;
  padding: 0 24px !important;
  height: 72px !important;
  background: transparent;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.nav__brand { gap: 12px; min-width: 0; }
.nav__logo { width: 132px; height: auto; flex: none; }
.nav .brand-word { min-width: 0; }
.nav .brand-word small {
  margin: 0;
  padding-left: 12px;
  border-left: 1px solid var(--borde);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--muted);
}
.nav__user b { color: var(--ink); }

/* ---------- Botones ---------- */
.btn {
  min-height: 48px;
  border-radius: 16px;
  font-family: var(--font);
  font-weight: 700;
  transition: filter 160ms ease, transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.btn:active { transform: scale(.98); }
.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--accion-vivo) 0%, var(--accion) 45%, #037565 100%);
  box-shadow: 0 10px 24px -12px rgba(2, 125, 110, .7);
}
.btn--primary:hover { background: linear-gradient(180deg, var(--accion-vivo) 0%, var(--accion) 45%, #037565 100%); filter: brightness(1.06); box-shadow: 0 10px 24px -12px rgba(2, 125, 110, .7); }
.btn--ghost { color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1.5px var(--borde-control); }
.btn--ghost:hover { background: var(--fondo); box-shadow: inset 0 0 0 1.5px var(--muted); }
.btn--sm { min-height: 44px; border-radius: 12px; padding: 10px 16px; }
.btn--block { min-height: 56px; border-radius: 18px; font-size: 1.04rem; }

/* botón de pago (PSE / Bancolombia / Nequi) */
.btn--pay {
  min-height: 52px;
  padding: 8px 20px 8px 8px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(180deg, var(--accion-vivo) 0%, var(--accion) 45%, #037565 100%);
  box-shadow: 0 10px 24px -12px rgba(2, 125, 110, .7);
  font-weight: 800;
}
.btn--pay:hover { background: linear-gradient(180deg, var(--accion-vivo) 0%, var(--accion) 45%, #037565 100%); filter: brightness(1.06); }
.btn--pay-icon { background: #fff; border-radius: 50%; padding: 4px; }
.pas__pagar.btn--block { padding-left: 10px; }

/* sobre superficies oscuras: menta con texto petróleo */
.pas__totalbar .btn--pay,
.pas__pago-bar .btn--pay {
  background: var(--menta);
  color: var(--petroleo);
  box-shadow: none;
}
.pas__totalbar .btn--pay:hover,
.pas__pago-bar .btn--pay:hover { background: #A3EBCD; filter: none; }

.wiz__redo { color: var(--muted); font-weight: 600; text-underline-offset: 3px; }
.wiz__redo:hover { color: var(--ink); }
.link { color: var(--accion); font-weight: 700; }

/* ---------- Panel de marca detrás de la tarjeta ---------- */
.pas__deco { display: none !important; }
body > main { isolation: isolate; }
body > main::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 320px;
  z-index: -1;
  background: linear-gradient(155deg, var(--petroleo) 0%, var(--petroleo-oscuro) 55%, var(--petroleo-fin) 130%);
}
body > main::after {
  content: "";
  position: absolute;
  top: -40px;
  right: max(-60px, calc(50% - 760px));
  width: 360px;
  height: 380px;
  z-index: -1;
  background: url("../assets/isotipo.svg") center / contain no-repeat;
  filter: brightness(0) invert(1);
  opacity: .06;
  pointer-events: none;
}

.pas { margin: 0 auto auto; padding-top: 48px; padding-left: 24px; padding-right: 24px; }
.pas__card,
.wiz__card.pas__card {
  padding: 32px;
  background: #fff;
  border: 0;
  border-radius: 20px;
  box-shadow: var(--sombra-alta);
}

.pas__bienvenida h1 { font-size: 1.6rem; font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.pas__bienvenida p { color: var(--muted); font-size: 1rem; }

.pas__dots li { width: 36px; background: var(--borde); }
.pas__dots li.is-active { background: var(--accion); }
.pas__dots li.is-done { background: var(--menta); }

/* ---------- Campos (52 px, borde 1.5, como el portal) ---------- */
.field { gap: 6px; }
.field label,
.field__label { font-size: .92rem; font-weight: 700; color: var(--ink); }
.field input,
.field select,
.dsel__btn,
.pcred__abono input {
  min-height: 52px;
  border: 1.5px solid var(--borde-control);
  border-radius: 14px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background-color: #fff;
}
.field input { padding: 12px 16px; }
.field select, .dsel__btn { padding: 12px 40px 12px 16px; }
.field input::placeholder { color: #6E8183; }
.field input:hover, .field select:hover, .dsel__btn:hover { border-color: var(--muted); }
.field input:focus,
.field input:focus-visible,
.field select:focus-visible,
.dsel__btn:focus-visible,
.dsel.is-abierto .dsel__btn,
.pcred__abono input:focus {
  outline: none;
  border-color: var(--accion);
  box-shadow: var(--anillo);
}
.field__error { color: #A3182B; font-weight: 600; }
.dsel__panel { border-radius: 16px; border-color: var(--borde); box-shadow: var(--sombra-alta); }
.dsel__buscar input { min-height: 44px; border: 1.5px solid var(--borde-control); border-radius: 12px; }
.dsel__op { border-radius: 10px; }
.dsel__op.is-activa { background: var(--menta-suave); color: var(--petroleo); }

.pas__otp input {
  width: 60px;
  height: 64px;
  border: 1.5px solid var(--borde-control);
  border-radius: 14px;
  font-family: var(--font);
  font-weight: 800;
}
.pas__otp input:focus-visible { border-color: var(--accion); box-shadow: var(--anillo); }

/* pastillas (tipo de persona y método) */
.pas__pill span {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--borde-control);
  border-radius: 14px;
  font-weight: 700;
  color: var(--body);
}
.pas__pill--metodo span { min-height: 68px; flex-direction: column; }
.pas__pill input:checked + span {
  border-color: var(--accion);
  background: var(--menta-suave);
  color: var(--petroleo);
  box-shadow: 0 0 0 1px var(--accion);
}
.pas__pill input:focus-visible + span { outline: 2px solid var(--accion); outline-offset: 3px; box-shadow: none; }

/* ---------- Créditos y resumen ---------- */
.pcred { border-radius: 16px; border-color: var(--borde); }
.pcred__head { background: var(--fondo); border-bottom-color: var(--borde); }
.pcred__check { accent-color: var(--accion); }
.pcred__chip { border-radius: 10px; }
.pcred__datos > div { border-radius: 12px; background: var(--fondo); border-color: var(--borde); }
.pcred__aldia { border-radius: 14px; }
.pas__opciones .tcard__body { border-radius: 14px; border: 1.5px solid var(--borde-control); }
.pas__opciones .tcard input:checked + .tcard__body { border-color: var(--accion); background: var(--menta-suave); box-shadow: 0 0 0 1px var(--accion); }

.pas__totalbar,
.pas__pago-bar {
  background: linear-gradient(155deg, var(--petroleo) 0%, var(--petroleo-oscuro) 60%, var(--petroleo-fin) 140%);
}
.pas__totalbar { border-radius: 18px; }
.pas__totalbar-txt span,
.pas__pago-bar-txt span { color: var(--menta); letter-spacing: 0; font-size: .82rem; }
.pas__totalbar-txt b, .pas__pago-bar-txt b { font-family: var(--font); font-weight: 800; }

/* ---------- Paso de pago ---------- */
.pas__pago-ico { color: var(--accion); }
.pas__pago-info h2 { font-size: 1.3rem; font-weight: 800; }
.pas__pago-total { border-radius: 12px; background: var(--menta-suave); color: var(--petroleo); border-color: #C9EBDB; }
.pas__pago-form { background: var(--fondo); border-color: var(--borde); border-radius: 18px; padding: 24px; }
.pas__pago-form h2 { font-size: 1.15rem; font-weight: 800; }
.pas__pago-form-sub { color: var(--muted); }
.pas__info-toggle { border-radius: 14px; min-height: 48px; }

/* ---------- Modal de verificación ---------- */
.pas__overlay { background: rgba(7, 37, 42, .6); }
.pas__modal { border-radius: 20px; box-shadow: var(--sombra-alta); }
.pas__modal-head { background: linear-gradient(155deg, var(--petroleo) 0%, var(--petroleo-oscuro) 100%); padding: 16px 18px; }
.pas__modal-x { width: 44px; height: 44px; border-radius: 12px; }
.pas__modal-body { padding: 22px; }
.pas__factura { background: var(--petroleo); border-radius: 16px; }

/* ---------- Resultado / comprobante ---------- */
.pas__recibo-chip { border-radius: 12px; background: var(--menta-suave); border-color: #C9EBDB; color: var(--petroleo); }
.pas__aprobada { color: var(--accion); font-weight: 800; }

/* ---------- Footer ---------- */
.cr-footer { background: var(--petroleo-oscuro); color: rgba(255, 255, 255, .75); border-top: 0; }
.cr-footer__inner {
  max-width: 1208px;
  margin-inline: auto;
  padding: 32px 24px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}
.cr-footer__logo { width: 124px; height: auto; filter: brightness(0) invert(1); }
.cr-footer__contacto { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-size: .92rem; }
.cr-footer__contacto span { color: #fff; font-weight: 700; }
.cr-footer__contacto a { color: var(--menta); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; overflow-wrap: anywhere; }
.cr-footer__contacto a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cr-footer .footer__legal {
  max-width: 1208px;
  margin-inline: auto;
  padding: 16px 24px 26px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .65);
  align-items: center;
}
.cr-footer .footer__legal-links a { color: rgba(255, 255, 255, .85); min-height: 44px; display: inline-flex; align-items: center; }
.cr-footer .footer__legal-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cr-footer a:focus-visible { outline-color: var(--menta); }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .nav .nav__inner,
  .nav.is-scrolled .nav__inner { padding: 0 16px !important; height: 64px !important; }
  .nav__logo { width: 112px; }
  body > main::before { height: 220px; }
  body > main::after { width: 220px; height: 240px; right: -50px; top: -30px; }
  .pas { padding: 24px 16px 40px; }
  .cr-footer__inner { padding: 28px 16px 16px; flex-direction: column; align-items: flex-start; }
  .cr-footer__contacto { flex-direction: column; align-items: flex-start; gap: 0; }
  .cr-footer .footer__legal { padding: 14px 16px 24px; }
}
@media (max-width: 560px) {
  .pas__card, .wiz__card.pas__card { padding: 24px 18px; border-radius: 18px; }
  .pas__otp input { width: 56px; height: 60px; }
  .pas__totalbar { border-radius: 18px 18px 0 0; }
}
@media (max-width: 420px) {
  .nav .brand-word { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .result__circle, .result__tick { animation: none !important; stroke-dashoffset: 0; }
}

@media print {
  body > main::before, body > main::after { display: none !important; }
  .pas__card, .wiz__card.pas__card { box-shadow: none; }
}
