/* ==========================================================================
   Credirenta · Solicitud en línea por pasos (se carga después de portal.css)
   ========================================================================== */
.wz { min-height: 100dvh; display: flex; flex-direction: column; }
.wz__top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem clamp(1rem, 3vw, 1.8rem); background: rgba(247, 245, 239, .88); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); border-bottom: 1px solid var(--line); }
.wz__top-mid { display: flex; align-items: center; gap: .8rem; min-width: 0; font-size: .82rem; color: var(--muted); }
.wz__folio { font-weight: 600; color: var(--green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wz__saved { white-space: nowrap; }
.wz__saved.is-ok::before { content: "✓ "; color: var(--ok); }
.wz__saved.is-busy { color: var(--sage); }
.wz__saved.is-bad { color: var(--danger); }
.wz__bar { height: 3px; background: var(--cream-3); position: sticky; top: 61px; z-index: 29; }
.wz__bar i { display: block; height: 100%; width: 4%; background: linear-gradient(90deg, var(--green-3), var(--green)); transition: width .6s var(--ease); }
.wz__grid { flex: 1; display: grid; grid-template-columns: 270px minmax(0, 760px); gap: clamp(1.5rem, 3vw, 3rem); justify-content: center; padding: clamp(1.2rem, 3vw, 2.4rem) clamp(1rem, 3vw, 2rem) 3rem; width: 100%; }

/* pasos (escritorio) */
.wz__steps { position: sticky; top: 90px; align-self: start; display: grid; gap: 1rem; }
.wz__steps-title { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sage); font-weight: 500; }
.wz__steps ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .15rem; counter-reset: s; }
.wz__step { width: 100%; display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: 12px; text-align: left; color: var(--ink-2); font-size: .9rem; font-weight: 500; transition: background .2s, color .2s; }
.wz__step:hover { background: rgba(15, 61, 46, .06); color: var(--green); }
.wz__step.is-on { background: var(--white); color: var(--green); box-shadow: var(--shadow); }
.wz__dot { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-strong); font-size: .75rem; font-weight: 600; color: var(--sage); background: var(--white); font-variant-numeric: tabular-nums; }
.wz__dot svg { width: 14px; height: 14px; }
.wz__step.is-on .wz__dot { border-color: var(--green); color: var(--green); }
.wz__step.is-done .wz__dot { background: var(--green); border-color: var(--green); color: var(--cream); }
.wz__quote { display: grid; gap: .15rem; padding: 1rem 1.1rem; border-radius: 16px; background: var(--green); color: var(--cream); }
.wz__quote-label { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.wz__quote strong { font-size: 1.6rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wz__quote-sub { font-size: .82rem; color: rgba(247, 245, 239, .75); }
.wz__help { display: flex; gap: .5rem; align-items: flex-start; font-size: .8rem; color: var(--muted); }
.wz__help svg { width: 16px; height: 16px; flex: none; margin-top: .1rem; }

/* tarjeta del paso */
.wz__main { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.wz__count { font-size: .8rem; color: var(--sage); font-weight: 500; letter-spacing: .02em; }
.wz__card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.3rem, 3vw, 2.2rem); box-shadow: var(--shadow); display: grid; gap: 1.3rem; animation: viewIn .45s var(--ease); }
.wz__head { display: grid; gap: .45rem; }
.wz__head h1 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
.wz__actions { display: flex; justify-content: space-between; gap: .8rem; }
.wz__actions .btn--primary { margin-left: auto; min-width: 180px; }
.wz__legal { font-size: .78rem; color: var(--muted); }

/* campos */
.wf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1rem; }
.wf { display: grid; gap: .4rem; align-content: start; min-width: 0; }
.wf--wide, .wf-sub, .wf-grid > .wz-note { grid-column: 1 / -1; }
.wf__label { font-size: .88rem; font-weight: 500; color: var(--ink); }
.wf__hint { font-size: .8rem; color: var(--muted); }
.wf__hint:empty, .wf__err:empty { display: none; }
.wf__err { font-size: .82rem; font-weight: 500; color: var(--danger); }
.wf.has-err .input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(179, 38, 30, .08); }
.wf.has-err .wf-choice label, .wf.has-err .wf-cards label { border-color: rgba(179, 38, 30, .5); }
.wf .input { min-height: 50px; }
.wf input[type="date"].input { min-height: 50px; }
.wf-sub { font-size: 1rem; margin-top: .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.wf-grid > .wf-sub:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.wf-money { position: relative; }
.wf-money span { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--sage); font-weight: 500; pointer-events: none; }
.wf-money .input { padding-left: 2rem; font-variant-numeric: tabular-nums; }
.wf-bank { font-size: .84rem; font-weight: 500; color: var(--sage); min-height: 1.1em; }
.wf-bank.is-ok { color: var(--ok); }
.wf-bank.is-bad { color: var(--danger); }

/* porcentaje con barra y monto en pesos (anticipo, depósito y valor residual) */
.wf-pct { gap: .5rem; padding: 1rem 1.1rem; border-radius: 16px; border: 1px solid var(--line); background: var(--cream); }
.wf-pct__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .8rem; }
.wf-pct__out { font-size: 1.05rem; font-weight: 600; color: var(--green); font-variant-numeric: tabular-nums; }
.wf-pct__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 190px); gap: .4rem 1.1rem; align-items: start; }
.wf-pct__row > :only-child { grid-column: 1 / -1; }
.wf-pct__slider { display: grid; min-width: 0; }
.wf-pct__scale { display: flex; justify-content: space-between; margin-top: -.3rem; font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wf-pct__money .input { background: var(--white); }
.wf.has-err.wf-pct { border-color: rgba(179, 38, 30, .5); }
.wf-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; padding: 0; background: transparent; cursor: pointer; }
.wf-range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--green) 0 var(--fill, 0%), var(--cream-3) var(--fill, 0%) 100%); }
.wf-range::-moz-range-track { height: 6px; border-radius: 6px; background: var(--cream-3); }
.wf-range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--green); }
.wf-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--white); border: 2px solid var(--green); box-shadow: 0 2px 8px rgba(15, 61, 46, .22); }
.wf-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--white); border: 2px solid var(--green); box-shadow: 0 2px 8px rgba(15, 61, 46, .22); }
.wf-range:focus-visible { outline: none; }
.wf-range:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--focus); outline-offset: 3px; }
.wf-range:focus-visible::-moz-range-thumb { outline: 3px solid var(--focus); outline-offset: 3px; }

/* opciones (radios con aspecto de botón) */
.wf-choice { display: flex; flex-wrap: wrap; gap: .5rem; }
.wf-choice input, .wf-cards input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.wf-choice label { flex: 1 1 auto; min-height: 48px; display: grid; place-items: center; text-align: center; padding: .55rem 1rem; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--white); font-size: .92rem; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: border-color .2s, background .2s, color .2s, box-shadow .2s; }
.wf-choice label:hover { border-color: var(--green); color: var(--green); }
.wf-choice input:checked + label { border-color: var(--green); background: rgba(15, 61, 46, .06); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.wf-choice input:focus-visible + label, .wf-cards input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.wf-choice input:disabled + label { opacity: .45; cursor: not-allowed; }
.wf-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.wf-cards label { display: grid; gap: .3rem; padding: 1rem 1.1rem; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--white); cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.wf-cards label:hover { border-color: var(--green); }
.wf-cards input:checked + label { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: rgba(15, 61, 46, .04); }
.wf-choice__t { font-weight: 600; color: var(--green); }
.wf-choice label .wf-choice__t { font-weight: 500; color: inherit; }
.wf-choice__d { font-size: .82rem; color: var(--muted); }

/* avisos */
.wz-note { display: flex; gap: .65rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 14px; background: var(--cream); border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
.wz-note svg { width: 18px; height: 18px; flex: none; color: var(--green-3); margin-top: .1rem; }
.wz-alert { display: flex; gap: .7rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 14px; background: #FBF3DD; border: 1px solid #ECD79A; color: #5a4300; font-size: .9rem; }
.wz-alert svg { width: 20px; height: 20px; flex: none; margin-top: .1rem; }
.wz-alert strong { display: block; margin-bottom: .3rem; }
.wz-alert__links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.wz-alert .link { color: #5a4300; border-bottom-color: currentColor; }

/* renta estimada */
.wz-quote { border-radius: 18px; background: var(--green); color: var(--cream); padding: 1.2rem 1.3rem; display: grid; gap: .9rem; position: relative; overflow: hidden; isolation: isolate; }
.wz-quote::after { content: ""; position: absolute; right: -20%; bottom: -70%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(200, 162, 74, .3), transparent 65%); z-index: -1; }
.wz-quote .muted { color: rgba(247, 245, 239, .75); }
.wz-quote__main { display: grid; gap: .1rem; }
.wz-quote__main span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.wz-quote__main strong { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.wz-quote__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; }
.wz-quote__grid dt { font-size: .74rem; color: rgba(247, 245, 239, .65); }
.wz-quote__grid dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.wz-quote__legal { font-size: .75rem; color: rgba(247, 245, 239, .62); }
.wz-quote--compact { padding: 1rem 1.2rem; gap: .4rem; }

/* documentos */
.wd-list { display: grid; gap: .6rem; }
.wd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem 1rem; align-items: center; padding: .9rem 1rem; border-radius: 16px; border: 1px solid var(--line); background: var(--white); transition: border-color .2s, opacity .2s; }
.wd.is-busy { opacity: .6; pointer-events: none; }
.wd__icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--cream-2); color: var(--green); }
.wd__icon svg { width: 20px; height: 20px; }
.wd--pendiente .wd__icon, .wd--aprobado .wd__icon { background: rgba(31, 122, 90, .12); color: var(--ok); }
.wd--rechazado { border-color: rgba(179, 38, 30, .35); background: #FFF8F7; }
.wd--rechazado .wd__icon { background: rgba(179, 38, 30, .1); color: var(--danger); }
.wd__main { display: grid; gap: .2rem; min-width: 0; }
.wd__title { font-weight: 600; color: var(--green); font-size: .93rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.wd__opt { font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sage); background: var(--cream-2); padding: .12rem .45rem; border-radius: 999px; }
.wd__hint { font-size: .8rem; color: var(--muted); }
.wd__motivo { font-size: .82rem; color: var(--danger); font-weight: 500; }
.wd__files { display: grid; gap: .25rem; }
.wd__file { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--ink-2); min-width: 0; }
.wd__file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd__file > svg { width: 15px; height: 15px; color: var(--ok); flex: none; }
.wd__rm { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); flex: none; }
.wd__rm:hover { background: var(--cream-2); color: var(--danger); }
.wd__rm svg { width: 14px; height: 14px; }
.wd__side { display: grid; justify-items: end; gap: .45rem; }
.wd__st { font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: .22rem .55rem; border-radius: 999px; background: var(--cream-2); color: var(--sage); white-space: nowrap; }
.wd--pendiente .wd__st { background: #DCE9F7; color: #1c4570; }
.wd--aprobado .wd__st { background: #D6EEDF; color: #135c36; }
.wd--rechazado .wd__st { background: #F6DAD7; color: #8a1d16; }
.wd .btn--sm { cursor: pointer; }

/* revisión */
.wr { border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; display: grid; gap: .7rem; }
.wr__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.wr__head h2 { font-size: 1rem; }
.wr__kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 1rem; }
.wr__kv dt { font-size: .74rem; color: var(--muted); }
.wr__kv dd { font-size: .9rem; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.wr-consent { display: grid; gap: .8rem; padding: 1.1rem; border-radius: 18px; background: var(--cream); border: 1px solid var(--line); }
.wr-check { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; font-size: .88rem; color: var(--ink-2); }
.wr-check input { width: 22px; height: 22px; margin: .05rem 0 0; accent-color: var(--green); }
.wz-secure { display: flex; gap: .5rem; align-items: center; font-size: .8rem; color: var(--ok); justify-content: center; }
.wz-secure svg { width: 16px; height: 16px; }

/* enviada */
.wz-done { display: grid; gap: 1.2rem; justify-items: start; }
.wz-done__badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--cream); box-shadow: 0 12px 30px rgba(15, 61, 46, .25); animation: pop .6s var(--ease); }
.wz-done__badge svg { width: 30px; height: 30px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- celular y tableta ---------- */
@media (max-width: 960px) {
  .wz__grid { grid-template-columns: minmax(0, 1fr); padding-bottom: 7rem; }
  .wz__steps { display: none; }
  .wz__actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: rgba(247, 245, 239, .95); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .wz__actions .btn { flex: 1; }
  .wz__actions .btn--primary { min-width: 0; flex: 2; }
}
@media (max-width: 620px) {
  .wz__top .brand span { display: none; }
  .wz__top-mid { font-size: .76rem; gap: .5rem; }
  .wz__folio { display: none; }
  .wz__card { border-radius: 20px; padding: 1.2rem 1rem 1.4rem; }
  .wf-grid { grid-template-columns: minmax(0, 1fr); }
  .wf-cards { grid-template-columns: minmax(0, 1fr); }
  .wf-choice label { flex: 1 1 calc(50% - .5rem); }
  .wf-pct { padding: .9rem .9rem 1rem; }
  .wf-pct__row { grid-template-columns: minmax(0, 1fr); }
  .wz-quote__grid, .wr__kv { grid-template-columns: minmax(0, 1fr); }
  .wd { grid-template-columns: auto minmax(0, 1fr); }
  .wd__side { grid-column: 1 / -1; grid-template-columns: auto 1fr; justify-items: start; align-items: center; }
  .wd__side .btn { justify-self: end; }
  .wz__bar { top: 57px; }
}
#w-body { display: grid; gap: 1.2rem; }
@media (max-width: 960px) { .wz-body .toast { bottom: calc(5.6rem + env(safe-area-inset-bottom)); } }
