/* The Hub - Loan Application (global, namespaced under .loan-app)
   Transformed from the Claude Design bundle styles.css. */

/* ============================================================
   The Hub — Loan Application
   Warm-neutral canvas, single orange accent, 8px grid
   ============================================================ */

.loan-app {
  /* canvas / surface */
  --bg:            oklch(0.985 0.004 75);
  --surface:       oklch(1 0 0);
  --surface-2:     oklch(0.975 0.005 75);
  --surface-sunk:  oklch(0.965 0.006 75);

  /* ink */
  --ink:           oklch(0.22 0.015 60);
  --ink-2:         oklch(0.36 0.012 60);
  --ink-3:         oklch(0.52 0.010 60);
  --ink-4:         oklch(0.68 0.008 60);

  /* lines */
  --line:          oklch(0.92 0.006 75);
  --line-2:        oklch(0.88 0.008 75);
  --line-strong:   oklch(0.80 0.010 75);

  /* accent (warm orange) — reserved for primary CTAs + active state */
  --accent:        oklch(0.62 0.18 35);
  --accent-ink:    oklch(0.98 0.01 75);
  --accent-soft:   oklch(0.96 0.03 35);
  --accent-ring:   oklch(0.62 0.18 35 / 0.18);

  /* semantic */
  --ok:            oklch(0.62 0.15 150);
  --ok-soft:       oklch(0.96 0.04 150);
  --warn:          oklch(0.70 0.15 80);
  --warn-soft:     oklch(0.97 0.06 80);
  --err:           oklch(0.58 0.19 25);
  --err-soft:      oklch(0.96 0.04 25);
  --info:          oklch(0.58 0.14 250);
  --info-soft:     oklch(0.96 0.03 250);

  /* type */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* radii */
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;

  /* shadow */
  --sh-1: 0 1px 2px oklch(0.2 0.02 60 / 0.04), 0 1px 1px oklch(0.2 0.02 60 / 0.03);
  --sh-2: 0 4px 12px oklch(0.2 0.02 60 / 0.06), 0 1px 2px oklch(0.2 0.02 60 / 0.04);
  --sh-pop: 0 24px 48px oklch(0.2 0.02 60 / 0.18), 0 2px 8px oklch(0.2 0.02 60 / 0.08);
}






/* ============================================================
   App shell
   ============================================================ */
























.loan-app .page {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  padding: 24px 28px 120px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ============================================================
   Page header + stepper
   ============================================================ */
.loan-app .page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 20px;
}
.loan-app .page-title {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.loan-app .page-sub { color: var(--ink-3); font-size: 13px; margin-top: 4px; }
.loan-app .app-id {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3);
  padding: 4px 8px; background: var(--surface-sunk);
  border: 1px solid var(--line); border-radius: 6px;
}

.loan-app .stepper {
  display: flex; align-items: center; gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 6px;
  margin-bottom: 20px;
}
.loan-app .stepper .step {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.15s;
}
.loan-app .stepper .step:hover:not(.disabled) { background: var(--surface-2); }
.loan-app .stepper .step.disabled { opacity: 0.5; cursor: not-allowed; }
.loan-app .stepper .step.active { background: oklch(0.97 0.012 60); }
.loan-app .stepper .step .num {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  background: var(--surface-sunk); color: var(--ink-3);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.loan-app .stepper .step.active .num { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.loan-app .stepper .step.done .num { background: var(--ok); color: white; border-color: var(--ok); }
.loan-app .stepper .step .label { font-size: 12px; color: var(--ink-3); line-height: 1; }
.loan-app .stepper .step .title { font-size: 13px; font-weight: 600; color: var(--ink); }
.loan-app .stepper .step.active .title { color: var(--ink); }
.loan-app .stepper .step .info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.loan-app .stepper .connector {
  width: 16px; height: 1px; background: var(--line-2);
  flex-shrink: 0;
}

/* ============================================================
   Cards
   ============================================================ */
.loan-app .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-1);
}
.loan-app .card + .card { margin-top: 16px; }
.loan-app .card-header {
  padding: 20px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.loan-app .card-title-wrap { display: flex; align-items: center; gap: 12px; }
.loan-app .card-title-num {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
}
.loan-app .card-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.loan-app .card-sub { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.loan-app .card-body { padding: 20px 24px 24px; }
.loan-app .card-divider { height: 1px; background: var(--line); margin: 0 24px; }

/* ============================================================
   Form grid + inputs
   ============================================================ */
.loan-app .form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.loan-app .col-12 { grid-column: span 12; }
.loan-app .col-9 { grid-column: span 9; }
.loan-app .col-8 { grid-column: span 8; }
.loan-app .col-6 { grid-column: span 6; }
.loan-app .col-5 { grid-column: span 5; }
.loan-app .col-4 { grid-column: span 4; }
.loan-app .col-3 { grid-column: span 3; }
.loan-app .col-2 { grid-column: span 2; }

.loan-app .field { display: flex; flex-direction: column; gap: 6px; }
.loan-app .field label {
  font-size: 12px; font-weight: 500; color: var(--ink-2);
  display: flex; align-items: center; gap: 4px;
}
.loan-app .field label .req { color: var(--accent); }
.loan-app .field label .opt {
  font-weight: 400; color: var(--ink-4);
  font-size: 11px;
}

.loan-app .field .hint { font-size: 11px; color: var(--ink-3); }
.loan-app .field .error {
  font-size: 11px; color: var(--err);
  display: flex; align-items: center; gap: 4px;
}

.loan-app .input, .loan-app .select, .loan-app .textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
  color: var(--ink);
}
.loan-app .input::placeholder { color: var(--ink-4); }
.loan-app .input:hover, .loan-app .select:hover, .loan-app .textarea:hover { border-color: var(--line-strong); }
.loan-app .input:focus, .loan-app .select:focus, .loan-app .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
  background: var(--surface);
}
.loan-app .input.has-error, .loan-app .select.has-error {
  border-color: var(--err);
  background: var(--err-soft);
}
.loan-app .input.has-error:focus {
  box-shadow: 0 0 0 3px oklch(0.58 0.19 25 / 0.15);
}
.loan-app .input.valid {
  background-image: linear-gradient(var(--surface), var(--surface));
}

.loan-app .input-group {
  position: relative;
  display: flex; align-items: stretch;
}
.loan-app .input-group .prefix, .loan-app .input-group .suffix {
  display: grid; place-items: center;
  padding: 0 10px;
  background: var(--surface-sunk);
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  font-size: 13px;
  font-family: var(--font-mono);
}
.loan-app .input-group .prefix {
  border-right: 0;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.loan-app .input-group .suffix {
  border-left: 0;
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.loan-app .input-group .input:not(:first-child) { border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.loan-app .input-group .input:not(:last-child) { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.loan-app .input-group:has(.prefix) .input { border-left: 0; }
.loan-app .input-group:has(.suffix) .input { border-right: 0; }
.loan-app .input-group:focus-within .prefix,
.loan-app .input-group:focus-within .suffix {
  border-color: var(--accent);
  color: var(--accent);
}

/* inline valid check */
.loan-app .input-wrap { position: relative; }
.loan-app .input-wrap .valid-mark {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--ok); pointer-events: none;
}

/* ============================================================
   Toggle switch
   ============================================================ */
.loan-app .switch-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  gap: 14px;
}
.loan-app .switch-row .info-block { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.loan-app .switch-row .t { font-size: 13px; font-weight: 500; color: var(--ink); }
.loan-app .switch-row .d { font-size: 11px; color: var(--ink-3); }
.loan-app .switch {
  position: relative;
  width: 40px; height: 24px;
  background: var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.loan-app .switch::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px oklch(0.2 0.02 60 / 0.2);
}
.loan-app .switch.on { background: var(--accent); }
.loan-app .switch.on::after { transform: translateX(16px); }

/* ============================================================
   Card-radio picker
   ============================================================ */
.loan-app .card-radio-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), 1fr);
  gap: 10px;
}
.loan-app .card-radio {
  position: relative;
  padding: 16px 14px;
  background: var(--surface);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
  display: flex; flex-direction: column; gap: 8px;
  text-align: left;
  min-height: 92px;
}
.loan-app .card-radio:hover { border-color: var(--line-strong); background: var(--surface-2); }
.loan-app .card-radio.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.loan-app .card-radio.selected::after {
  content: ''; position: absolute; inset: -2px;
  border: 2px solid var(--accent-ring);
  border-radius: calc(var(--r-lg) + 2px);
  pointer-events: none;
}
.loan-app .card-radio .cr-icon {
  width: 32px; height: 32px;
  color: var(--ink-3);
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--surface-sunk);
}
.loan-app .card-radio.selected .cr-icon {
  color: var(--accent);
  background: oklch(1 0 0);
}
.loan-app .card-radio .cr-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.loan-app .card-radio .cr-desc { font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.loan-app .card-radio .cr-check {
  position: absolute; top: 10px; right: 10px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  display: grid; place-items: center;
}
.loan-app .card-radio.selected .cr-check {
  background: var(--accent); border-color: var(--accent);
}
.loan-app .card-radio.selected .cr-check::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: white;
}

/* doc-type pills (denser row) */
.loan-app .doc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* ============================================================
   Buttons
   ============================================================ */
.loan-app .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px;
  font-size: 13px; font-weight: 500;
  border-radius: var(--r-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.05s;
  white-space: nowrap;
}
.loan-app .btn:active { transform: translateY(1px); }
.loan-app .btn:disabled { opacity: 0.5; cursor: not-allowed; }

.loan-app .btn-primary {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 1px 2px oklch(0.4 0.1 35 / 0.2), inset 0 1px 0 oklch(1 0 0 / 0.15);
}
.loan-app .btn-primary:hover:not(:disabled) { background: oklch(0.58 0.19 35); }

.loan-app .btn-ghost {
  background: transparent; color: var(--ink-2);
  border-color: transparent;
}
.loan-app .btn-ghost:hover { background: var(--surface-sunk); color: var(--ink); }

.loan-app .btn-secondary {
  background: var(--surface); color: var(--ink);
  border-color: var(--line-strong);
}
.loan-app .btn-secondary:hover { background: var(--surface-2); }

.loan-app .btn-sm { padding: 6px 10px; font-size: 12px; border-radius: var(--r-md); }

/* ============================================================
   Sticky footer
   ============================================================ */
.loan-app .sticky-footer {
  position: fixed; bottom: 0; left: 240px; right: 0;
  background: oklch(1 0 0 / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 15;
}
.loan-app .sticky-footer .progress-block {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--ink-3);
}
.loan-app .sticky-footer .progress-bar {
  width: 180px; height: 6px;
  background: var(--surface-sunk);
  border-radius: 999px;
  overflow: hidden;
}
.loan-app .sticky-footer .progress-bar > div {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.loan-app .sticky-footer .footer-actions { display: flex; gap: 8px; }

/* ============================================================
   Right rail: summary
   ============================================================ */
.loan-app .rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; align-self: start; }

.loan-app .summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.loan-app .summary-head {
  padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--line);
}
.loan-app .summary-head .h-title { font-weight: 600; font-size: 13px; }
.loan-app .summary-head .h-sub { font-size: 11px; color: var(--ink-3); }

.loan-app .ring {
  --size: 56px;
  width: var(--size); height: var(--size);
  position: relative;
}
.loan-app .ring svg { transform: rotate(-90deg); display: block; }
.loan-app .ring .track { stroke: var(--line); }
.loan-app .ring .fill { stroke: var(--accent); transition: stroke-dashoffset 0.4s ease; }
.loan-app .ring .pct {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  letter-spacing: -0.01em;
}

.loan-app .summary-body { padding: 8px 0 12px; }
.loan-app .sum-step {
  padding: 10px 18px;
  border-left: 2px solid transparent;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.loan-app .sum-step.active { border-left-color: var(--accent); background: var(--accent-soft); }
.loan-app .sum-step .sum-step-title { font-size: 12px; font-weight: 500; }
.loan-app .sum-step .sum-step-meta { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }

.loan-app .sum-group {
  padding: 10px 18px;
  border-top: 1px solid var(--line);
}
.loan-app .sum-group:first-of-type { border-top: 0; }
.loan-app .sum-group-title {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.loan-app .sum-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 3px 0;
  font-size: 12px;
  min-width: 0;
}
.loan-app .sum-row .k { color: var(--ink-3); flex-shrink: 0; }
.loan-app .sum-row .v {
  color: var(--ink); font-weight: 500;
  text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.loan-app .sum-row .v.empty { color: var(--ink-4); font-weight: 400; font-style: italic; }
.loan-app .sum-row .v .mono { font-family: var(--font-mono); font-size: 11px; }

/* Dev notes (Radzen ignore) */
.loan-app .dev-card {
  background: oklch(0.22 0.012 60);
  color: oklch(0.92 0.005 60);
  border-radius: var(--r-2xl);
  padding: 16px 18px;
  font-family: var(--font-mono); font-size: 11px;
  box-shadow: var(--sh-1);
}
.loan-app .dev-card .dh {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
  cursor: pointer;
}
.loan-app .dev-card .dh-title {
  font-family: var(--font-sans); font-weight: 600; font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: oklch(0.9 0.01 75);
  display: flex; align-items: center; gap: 8px;
}
.loan-app .dev-card .dh-title .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.loan-app .dev-card .dh-chev { color: oklch(0.7 0.008 60); }
.loan-app .dev-card pre {
  margin: 0;
  background: oklch(0.15 0.008 60);
  padding: 10px 12px;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.55;
  color: oklch(0.88 0.006 60);
  font-size: 10.5px;
}
.loan-app .dev-card pre .c { color: oklch(0.6 0.02 60); }
.loan-app .dev-card pre .k { color: oklch(0.75 0.12 35); }
.loan-app .dev-card pre .s { color: oklch(0.75 0.08 150); }
.loan-app .dev-card .dev-note {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 2px solid var(--accent);
  background: oklch(1 0 0 / 0.03);
  color: oklch(0.85 0.006 60);
  font-family: var(--font-sans); font-size: 11px;
  border-radius: 0 6px 6px 0;
}
.loan-app .dev-card .dev-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.loan-app .dev-card .dev-opt {
  display: flex; gap: 10px; align-items: flex-start;
  font-family: var(--font-sans); font-size: 11px;
  color: oklch(0.85 0.006 60);
}
.loan-app .dev-card .dev-opt .n {
  width: 18px; height: 18px; border-radius: 4px;
  background: oklch(1 0 0 / 0.08); color: oklch(0.9 0.01 75);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  flex-shrink: 0;
}
.loan-app .dev-card .dev-opt b { color: oklch(0.95 0.01 75); }
.loan-app .dev-card .dev-opt code {
  font-family: var(--font-mono); font-size: 10.5px;
  background: oklch(0.15 0.008 60);
  padding: 1px 5px; border-radius: 4px;
  color: oklch(0.8 0.08 35);
}

/* ============================================================
   Modal (submit flow)
   ============================================================ */
.loan-app .modal-scrim {
  position: fixed; inset: 0;
  background: oklch(0.18 0.012 60 / 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: grid; place-items: center;
  padding: 40px 20px;
  animation: scrimIn 0.2s ease-out;
}
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }

.loan-app .modal {
  width: 100%; max-width: 680px;
  background: oklch(0.16 0.010 60);
  color: oklch(0.92 0.005 60);
  border-radius: 20px;
  box-shadow: var(--sh-pop), 0 0 0 1px oklch(1 0 0 / 0.06);
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.loan-app .modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid oklch(1 0 0 / 0.06);
  display: flex; align-items: center; justify-content: space-between;
}
.loan-app .modal-head .mh-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
}
.loan-app .modal-head .mh-sub {
  font-size: 11px; color: oklch(0.7 0.008 60);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.loan-app .modal-head .mh-close {
  color: oklch(0.7 0.008 60);
  background: transparent; border: 0;
  padding: 6px; border-radius: 8px;
  cursor: pointer;
}
.loan-app .modal-head .mh-close:hover { background: oklch(1 0 0 / 0.06); color: white; }

.loan-app .modal-body { padding: 22px; }

.loan-app .fi-list { display: flex; flex-direction: column; gap: 10px; }

.loan-app .fi-row {
  display: grid;
  grid-template-columns: 48px 1fr 260px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: oklch(0.19 0.008 60);
  border: 1px solid oklch(1 0 0 / 0.06);
  border-radius: 14px;
  transition: border-color 0.2s;
}
.loan-app .fi-row.ok { border-color: oklch(0.62 0.15 150 / 0.4); }
.loan-app .fi-row.err { border-color: oklch(0.58 0.19 25 / 0.4); }
.loan-app .fi-row.pending { border-color: oklch(1 0 0 / 0.08); }

.loan-app .fi-logo {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.02em;
  color: white;
}
.loan-app .fi-logo.plaid { background: linear-gradient(135deg, oklch(0.55 0.14 250), oklch(0.42 0.15 260)); }
.loan-app .fi-logo.stripe { background: linear-gradient(135deg, oklch(0.55 0.18 290), oklch(0.42 0.18 280)); }
.loan-app .fi-logo.brex { background: linear-gradient(135deg, oklch(0.30 0.02 60), oklch(0.18 0.015 60)); }
.loan-app .fi-logo.mercury { background: linear-gradient(135deg, oklch(0.50 0.10 180), oklch(0.36 0.08 200)); }
.loan-app .fi-logo.dwolla { background: linear-gradient(135deg, oklch(0.55 0.16 30), oklch(0.42 0.17 25)); }

.loan-app .fi-meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.loan-app .fi-name-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.loan-app .fi-name { font-weight: 600; font-size: 14px; color: oklch(0.96 0.005 60); }
.loan-app .fi-endpoint {
  font-family: var(--font-mono); font-size: 10.5px;
  color: oklch(0.65 0.008 60);
}
.loan-app .fi-bar {
  height: 8px;
  background: oklch(0.24 0.008 60);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.loan-app .fi-bar > .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), oklch(0.7 0.16 45));
  border-radius: 999px;
  transition: width 0.2s linear;
  position: relative;
}
.loan-app .fi-bar > .fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.2), transparent);
  animation: shimmer 1.2s infinite;
}
.loan-app .fi-row.ok .fi-bar > .fill::after,
.loan-app .fi-row.err .fi-bar > .fill::after { animation: none; display: none; }
.loan-app .fi-row.ok  .fi-bar > .fill { background: var(--ok); }
.loan-app .fi-row.err .fi-bar > .fill { background: var(--err); }

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loan-app .fi-status {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid oklch(1 0 0 / 0.08);
  background: oklch(0.15 0.008 60);
  font-family: var(--font-mono); font-size: 11px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-width: 0;
  min-height: 40px;
}
.loan-app .fi-status .code {
  font-weight: 600;
  flex-shrink: 0;
}
.loan-app .fi-status .msg {
  color: oklch(0.78 0.005 60);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.loan-app .fi-status .status-dot {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.loan-app .fi-status.pending .code { color: oklch(0.7 0.008 60); }
.loan-app .fi-status.pending .status-dot {
  background: oklch(1 0 0 / 0.06);
  color: oklch(0.7 0.008 60);
}
.loan-app .fi-status.ok .code { color: oklch(0.75 0.14 150); }
.loan-app .fi-status.ok .status-dot { background: var(--ok); color: white; }
.loan-app .fi-status.err .code { color: oklch(0.72 0.17 25); }
.loan-app .fi-status.err .status-dot { background: var(--err); color: white; }

.loan-app .fi-row.pending .fi-status {
  border-color: oklch(0.5 0.14 280 / 0.4);
  box-shadow: 0 0 0 1px oklch(0.5 0.14 280 / 0.3), 0 0 20px oklch(0.5 0.14 280 / 0.15);
}

.loan-app .modal-foot {
  padding: 14px 22px;
  border-top: 1px solid oklch(1 0 0 / 0.06);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.loan-app .modal-summary {
  font-family: var(--font-mono); font-size: 11px;
  color: oklch(0.75 0.008 60);
}
.loan-app .modal-summary b.ok { color: oklch(0.75 0.14 150); }
.loan-app .modal-summary b.err { color: oklch(0.72 0.17 25); }
.loan-app .modal-foot-actions { display: flex; gap: 8px; }
.loan-app .modal-foot .btn-primary {
  background: var(--accent);
}
.loan-app .modal-foot .btn-dark-ghost {
  color: oklch(0.8 0.008 60);
  background: transparent;
  border: 1px solid oklch(1 0 0 / 0.08);
}
.loan-app .modal-foot .btn-dark-ghost:hover { background: oklch(1 0 0 / 0.04); }

/* final result banner inside modal */
.loan-app .modal-result {
  margin: 0 22px 16px;
  padding: 14px 16px;
  border-radius: 12px;
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13px;
  animation: modalIn 0.3s;
}
.loan-app .modal-result.approved {
  background: oklch(0.62 0.15 150 / 0.1);
  border: 1px solid oklch(0.62 0.15 150 / 0.3);
  color: oklch(0.85 0.14 150);
}
.loan-app .modal-result.partial {
  background: oklch(0.70 0.15 80 / 0.1);
  border: 1px solid oklch(0.70 0.15 80 / 0.3);
  color: oklch(0.88 0.13 80);
}
.loan-app .modal-result .r-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.loan-app .modal-result.approved .r-icon { background: var(--ok); color: white; }
.loan-app .modal-result.partial .r-icon { background: var(--warn); color: white; }
.loan-app .modal-result .r-body { display: flex; flex-direction: column; gap: 2px; }
.loan-app .modal-result .r-title { font-weight: 600; font-size: 13px; }
.loan-app .modal-result .r-sub {
  font-family: var(--font-mono); font-size: 11px;
  color: oklch(0.78 0.005 60);
}

/* ============================================================
   Fieldset
   ============================================================ */
.loan-app .sub-fieldset {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.loan-app .sub-fieldset-title {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3);
  margin: -26px 0 12px 0;
  background: var(--bg);
  padding: 0 8px;
  display: inline-block;
  margin-left: -8px;
}

/* misc */
.loan-app .pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  font-size: 10.5px; font-weight: 500;
  border-radius: 999px;
  background: var(--surface-sunk);
  color: var(--ink-3);
  border: 1px solid var(--line);
}
.loan-app .pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.loan-app .pill.warn { background: var(--warn-soft); color: oklch(0.5 0.15 80); border-color: transparent; }
.loan-app .pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.loan-app .row { display: flex; align-items: center; gap: 8px; }

.loan-app .divider {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 12px;
  color: var(--ink-3);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 500;
}
.loan-app .divider::before, .loan-app .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.loan-app .fine {
  font-size: 11px; color: var(--ink-3); line-height: 1.5;
}

/* ============================================================
   Local additions (responsive + defensive + app-specific wiring)
   ============================================================ */

.loan-app {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.loan-app * { box-sizing: border-box; }
.loan-app input, .loan-app select, .loan-app textarea {
  font-family: inherit; font-size: inherit; color: inherit;
}
.loan-app button { font-family: inherit; }

/* Page override: we don't have the mock's 240px dark sidebar,
   MainLayout provides its own. So .page stretches full main area. */
.loan-app .page {
  grid-template-columns: minmax(0, 1fr) 320px;
  padding: 24px 24px 40px;
  max-width: 1920px;
}
@media (max-width: 1480px) {
  .loan-app .page { grid-template-columns: minmax(0, 1fr); }
  .loan-app .rail { position: static; top: auto; }
}

/* Explicit min-widths so grid cells stay readable in cramped space */
.loan-app .col-1  { grid-column: span 1;  min-width: 55px;  }
.loan-app .col-2  { grid-column: span 2;  min-width: 80px;  }
.loan-app .col-3  { grid-column: span 3;  min-width: 160px; }
.loan-app .col-4  { grid-column: span 4;  min-width: 180px; }
.loan-app .col-5  { grid-column: span 5;  min-width: 200px; }
.loan-app .col-6  { grid-column: span 6;  min-width: 240px; }
.loan-app .col-7  { grid-column: span 7;  min-width: 280px; }
.loan-app .col-8  { grid-column: span 8;  min-width: 320px; }
.loan-app .col-9  { grid-column: span 9;  min-width: 360px; }
.loan-app .col-10 { grid-column: span 10; min-width: 400px; }
.loan-app .col-11 { grid-column: span 11; min-width: 440px; }
.loan-app .col-12 { grid-column: span 12; }

.loan-app .field { width: 100%; }
.loan-app .field > * { min-width: 0; max-width: 100%; }

.loan-app .input, .loan-app .select, .loan-app .textarea {
  min-width: 0;
  min-height: 42px;
  padding: 12px 14px;
  box-sizing: border-box;
}
.loan-app .input::placeholder { color: oklch(0.78 0.008 60); font-weight: 400; }

.loan-app .select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.loan-app .btn { flex-shrink: 0; }
.loan-app .btn:focus-visible,
.loan-app .step:focus-visible,
.loan-app .card-radio:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 2px;
}

.loan-app .card { width: 100%; box-sizing: border-box; }
.loan-app .card-body { width: 100%; box-sizing: border-box; }
/* Uniform header padding so collapsed cards (no body) don't feel chopped.
   Body loses its top padding; spacing now comes from the header's bottom padding. */
.loan-app .card-header {
  padding: 20px 24px;
  flex-wrap: wrap;
}
.loan-app .card-body { padding: 0 24px 24px; }
.loan-app .card-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
}

/* <button> reset for interactive items rendered as buttons (a11y/keyboard)
   where the mockup used plain <div>s — strip browser-default border/background. */
.loan-app .stepper .step,
.loan-app .sum-step {
  background: transparent;
  border: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  font-family: inherit;
  color: inherit;
  box-shadow: none;
}
.loan-app .stepper .step {
  flex: 1 1 0;
  min-width: 0;
}
.loan-app .sum-step:hover:not(.active) { background: var(--surface-2); }
.loan-app .stepper .step:hover:not(.disabled):not(.active) { background: var(--surface-2); }
.loan-app .stepper .step.active { background: oklch(0.97 0.012 60); }
.loan-app .stepper .step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Stepper ellipsis for cramped viewports */
.loan-app .stepper .step .info { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.loan-app .stepper .step .label,
.loan-app .stepper .step .title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.loan-app .form-grid {
  grid-template-columns: repeat(12, minmax(55px, 1fr));
  gap: 14px 10px;
  width: 100%;
}
@media (max-width: 900px) {
  .loan-app .form-grid { grid-template-columns: repeat(12, minmax(40px, 1fr)); }
}

/* Sticky footer inside the loan-app area (not fixed to viewport,
   so it never overlaps MainLayout's sidebar) */
.loan-app .sticky-footer {
  position: sticky;
  bottom: 0;
  left: auto;
  right: auto;
  margin-top: 24px;
  background: oklch(1 0 0 / 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 15;
}

/* Live-updating auto-save pill dot */
.loan-app .pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  animation: pill-pulse 2s ease-in-out infinite;
  display: inline-block;
}
@keyframes pill-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Visually-hidden "required" text for screen readers */
.loan-app .sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Certification checkbox row (Step 4) */
.loan-app .cert-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px;
  margin-top: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
  cursor: pointer;
}
.loan-app .cert-row input[type="checkbox"] {
  width: 18px; height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.loan-app .cert-row b { color: var(--ink); }
.loan-app .cert-row .req { color: var(--accent); margin-left: 2px; }

/* Strengthen active step indicator (overrides any Radzen/Bootstrap) */
.loan-app .stepper .step.active .num {
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
  border-color: var(--accent) !important;
}
.loan-app .stepper .step.done .num {
  background: var(--ok) !important;
  color: white !important;
  border-color: var(--ok) !important;
}

/* ============================================================
   Financial-partner disclosures (Step 4 — above certification)
   Inline disclosure/accordion: each enabled partner's text can be
   expanded in place and must be individually accepted before submit.
   ============================================================ */
.loan-app .disclosure-intro {
  font-size: 12px; color: var(--ink-3); line-height: 1.5;
  margin-bottom: 12px;
}
.loan-app .disclosure-list { display: flex; flex-direction: column; gap: 10px; }

.loan-app .disclosure {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.loan-app .disclosure.accepted {
  border-color: oklch(0.62 0.15 150 / 0.45);
  background: var(--ok-soft);
}

.loan-app .disclosure-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
}
.loan-app .disclosure-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.loan-app .disclosure-logo {
  width: 28px; height: 28px; border-radius: 6px; object-fit: contain;
  background: var(--surface); border: 1px solid var(--line);
  flex-shrink: 0; padding: 2px;
}
.loan-app .disclosure-name {
  font-size: 13px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.loan-app .disclosure-badge {
  font-size: 10.5px; font-weight: 600; color: var(--ok);
  background: oklch(1 0 0 / 0.6); border: 1px solid oklch(0.62 0.15 150 / 0.35);
  padding: 2px 7px; border-radius: 999px; flex-shrink: 0;
}

.loan-app .disclosure-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--accent); cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 500;
  padding: 7px 12px; border-radius: var(--r-md);
  flex-shrink: 0; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.loan-app .disclosure-toggle:hover { background: var(--surface-2); border-color: var(--accent); }
.loan-app .disclosure-toggle:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.loan-app .disclosure-toggle .chev { font-size: 10px; line-height: 1; }

.loan-app .disclosure-preview {
  display: block; width: 100%; text-align: left;
  background: transparent; border: 0;
  padding: 0 14px 10px;
  color: var(--ink-3); font-size: 12px; line-height: 1.5;
  cursor: pointer;
}
.loan-app .disclosure-preview-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.loan-app .disclosure-more {
  display: inline-block; margin-top: 4px;
  color: var(--accent); font-weight: 500;
}
.loan-app .disclosure-preview:hover .disclosure-preview-text { color: var(--ink-2); }
.loan-app .disclosure-preview:hover .disclosure-more { text-decoration: underline; }
.loan-app .disclosure-preview:focus-visible {
  outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 6px;
}

.loan-app .disclosure-text {
  padding: 4px 14px 12px;
  color: var(--ink-2); font-size: 12px; line-height: 1.6;
  max-height: 260px; overflow-y: auto;
}
.loan-app .disclosure-text p { margin: 0 0 10px; }
.loan-app .disclosure-text p:last-child { margin-bottom: 0; }

.loan-app .disclosure-agree {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: oklch(1 0 0 / 0.4);
  font-size: 12px; color: var(--ink-2); line-height: 1.5; cursor: pointer;
}
.loan-app .disclosure.accepted .disclosure-agree { background: transparent; }
.loan-app .disclosure-agree input[type="checkbox"] {
  width: 18px; height: 18px; margin: 1px 0 0;
  accent-color: var(--accent); flex-shrink: 0; cursor: pointer;
}
.loan-app .disclosure-agree b { color: var(--ink); }
.loan-app .disclosure-agree .req { color: var(--accent); margin-left: 2px; }
