/* Loan application (/loans). Paired with web/js/loan-apply.js.
   Builds on nova-page.css, which supplies the reading scale, the band rhythm and
   the shared .np-* pieces. Only what is specific to this page lives here. */

.la-hero { display: grid; gap: var(--sp-5); }
.la-hero h1 { max-width: 18ch; }
.la-hero-figs { margin-top: var(--sp-7); max-width: 640px; }

/* Loan application flow (/loans). Paired with web/js/loan-apply.js.
   Document previews use the same absolute-positioning pattern as the KYC capture
   cards: an aspect-ratio box whose image asks for height:100% is a cyclic size
   dependency, and the card grows to the photo's intrinsic height. */











.la-h3 { margin: var(--sp-4) 0 var(--sp-3); font-size: var(--fs-md); }
.la-muted { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); line-height: var(--lh-md); color: var(--text-3); }

/* ── form ─────────────────────────────────────────────────────────────── */
.la-form { display: grid; gap: var(--sp-5); }
.la-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--sp-5); }
.la-fld { display: grid; gap: var(--sp-2); min-width: 0; }
.la-fld > span { font-size: var(--fs-xs); color: var(--text-2); }
.la-fld input, .la-fld select {
  width: 100%; min-width: 0; height: 46px; padding: 0 var(--sp-4);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--bg-1); color: var(--text-1); font: inherit; font-size: var(--fs-md);
}
.la-fld input:focus-visible, .la-fld select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.la-unit { position: relative; display: block; }
.la-unit i { position: absolute; left: var(--sp-4); top: 50%; transform: translateY(-50%); font-style: normal; color: var(--text-3); pointer-events: none; }
.la-unit input { padding-left: calc(var(--sp-4) + 18px); font-variant-numeric: tabular-nums; }

/* ── quote ────────────────────────────────────────────────────────────── */
.la-quote-dl { display: grid; gap: var(--sp-2); margin: 0; padding: var(--sp-5); border-radius: var(--r-lg); background: var(--bg-3); }
.la-quote-dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-5); min-width: 0; }
.la-quote-dl dt { font-size: var(--fs-sm); color: var(--text-3); overflow-wrap: anywhere; }
.la-quote-dl dd { margin: 0; font-size: var(--fs-md); font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.la-quote-dl .is-fee dd { color: var(--warning-text, var(--text-1)); }
.la-quote-dl .is-total { margin-top: var(--sp-2); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.la-quote-dl .is-total dt { color: var(--text-1); font-weight: 600; }
.la-quote-dl .is-total dd { font-size: clamp(18px, 2vw, 22px); }

/* ── documents ────────────────────────────────────────────────────────── */
.la-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--sp-5); }
.la-docs--proof { grid-template-columns: minmax(0, 1fr); margin-top: var(--sp-5); }
.la-doc { display: grid; grid-template-rows: auto auto; border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--bg-1); }
.la-doc.is-done { border-color: color-mix(in srgb, var(--live) 55%, var(--border)); }
.la-doc-view { position: relative; aspect-ratio: 16 / 10; background: var(--bg-3); border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0; overflow: hidden; }
.la-doc-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.la-doc-ph { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56%; aspect-ratio: 1.4; border: 2px dashed var(--border-strong); border-radius: 8px; }
.la-doc-body { display: grid; gap: var(--sp-3); padding: var(--sp-5); min-width: 0; align-content: start; }
.la-doc-hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-3); min-width: 0; }
.la-doc-hd strong { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.la-doc-body p { margin: 0; font-size: var(--fs-xs); line-height: var(--lh-md); color: var(--text-3); overflow-wrap: anywhere; }
.la-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--live) 16%, transparent); font-size: var(--fs-2xs); font-weight: 700; color: var(--live); white-space: nowrap; }
.la-req { font-size: var(--fs-2xs); font-weight: 600; color: var(--text-3); white-space: nowrap; }

/* ── payment panel ────────────────────────────────────────────────────── */
.la-pay { display: grid; gap: var(--sp-3); padding: var(--sp-5); border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--bg-3); }
.la-pay-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); min-width: 0; }
.la-pay-row > span:first-child { font-size: var(--fs-sm); color: var(--text-3); }
.la-pay-amt { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; font-variant-numeric: tabular-nums; }
.la-id { display: inline-flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; min-width: 0; }
.la-id code { padding: 4px 10px; border-radius: var(--r-md); background: var(--bg-1); border: 1px solid var(--border-strong);
  font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--fs-md); font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; }
.la-clock { font-variant-numeric: tabular-nums; font-size: var(--fs-lg); font-weight: 700; color: var(--live); }
.la-clock.is-low { color: var(--warning-text, var(--danger-text)); }
.la-refnote { margin: var(--sp-2) 0 0; font-size: var(--fs-xs); }
.la-refnote code { padding: 1px 6px; border-radius: 4px; background: var(--bg-1); font-family: var(--font-mono, ui-monospace, monospace); }

/* ── status ───────────────────────────────────────────────────────────── */
.la-status { display: grid; gap: var(--sp-4); }
.la-ref { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-3); }
.la-ref span { font-size: var(--fs-xs); color: var(--text-3); }
.la-ref strong { font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--fs-md); }
.la-done { padding: var(--sp-6); border-radius: var(--r-lg); border: 1px solid var(--border-strong); background: var(--bg-3); }
.la-done h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-lg); }
.la-done p { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.la-done--ok { border-color: color-mix(in srgb, var(--live) 55%, var(--border)); }
.la-done--ok h3 { color: var(--live); }
.la-done--no { border-color: color-mix(in srgb, var(--danger, #e5484d) 45%, var(--border)); }

.la-gate { display: grid; justify-items: start; gap: var(--sp-4); padding: var(--sp-6); border-radius: var(--r-lg); background: var(--bg-3); }
.la-gate p { margin: 0; font-size: var(--fs-md); color: var(--text-2); }

.la-err { margin: 0; min-height: 1em; font-size: var(--fs-sm); color: var(--danger-text, #e5484d); overflow-wrap: anywhere; }
.la-ok { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); color: var(--live); }
.la-notice { margin: 0; padding-top: var(--sp-5); border-top: 1px solid var(--border); font-size: var(--fs-xs); line-height: var(--lh-md); color: var(--text-3); }

/* ── buttons ──────────────────────────────────────────────────────────── */
.la-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: 44px; padding: 0 var(--sp-6);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--bg-3); color: var(--text-1);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 1;
  white-space: nowrap;           /* fixed height: a wrapped label would overflow */
  cursor: pointer; text-decoration: none;
}
.la-btn:hover:not(:disabled) { border-color: var(--text-3); }
.la-btn:disabled { opacity: .55; cursor: default; }
.la-btn--primary { border-color: transparent; background: var(--accent); color: #04121f; }
.la-btn--primary:hover:not(:disabled) { filter: brightness(1.08); }
.la-btn--lg { height: 50px; font-size: var(--fs-md); justify-self: start; }
.la-btn--sm { height: 32px; padding: 0 var(--sp-4); font-size: var(--fs-xs); }
.la-btn--file { position: relative; overflow: hidden; justify-self: start; }
.la-btn--file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.la-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (max-width: 720px) {
  
  .la-btn--lg { width: 100%; justify-self: stretch; }
}

/* Inside the account panel: no bands, just the content stacked on the panel surface. */
.la-compact { display: grid; gap: var(--sp-7); }
.la-compact .la-hero-figs { margin-top: 0; max-width: 520px; }
.la-compact .la-notice { margin: 0; padding-top: var(--sp-5); border-top: 1px solid var(--border); }

/* A short note under a field, for the thing the applicant wants to know before they
   answer it - such as that nobody will ring their employer. */
.la-hint { display: block; margin-top: 6px; font-size: var(--fs-xs); line-height: 1.5; color: var(--text-3); }
