/* ============================================================
   GreenBox Loans — Broker Portal
   Shared stylesheet. Design tokens + reusable component classes.
   Loaded by every page. Page-specific markup lives in the HTML;
   dynamic content is rendered by script.js using these classes.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ---------- Design tokens ---------- */
:root {
  --green-900: #1a3a0a;
  --green-800: #2d5016;
  --green-700: #3b6b1e;
  --green-600: #5b8c3e;
  --green-100: #e8f5e9;
  --cream-50: #f5f0e8;
  --gray-900: #2b2b2b;
  --gray-700: #3c3c3c;
  --gray-500: #6b6b6b;
  --gray-300: #c4c4c4;
  --gray-200: #e8e4dc;
  --gray-100: #f9f7f4;
  --red-700: #b83230;
  --red-600: #c0392b;
  --red-100: #fdecea;
  --gold-600: #d4a843;
  --gold-300: #e6d599;
  --gold-100: #fff8e1;
  --orange-600: #e67e22;
  --teal-100: #e0f2f1;
  --display: "Georgia", "Times New Roman", serif;
  --body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", Menlo, Consolas, monospace;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(45, 80, 22, 0.12);
  --radius: 8px;
}

/* ---------- Reset & base ---------- */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--body);
  color: var(--gray-700);
  background: var(--cream-50);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
input,
select,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
}
button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}
::placeholder {
  color: #9a978f;
}
a {
  color: var(--green-700);
  text-decoration: none;
  cursor: pointer;
}
a:hover {
  color: var(--green-900);
  text-decoration: underline;
}
h1,
h2,
h3 {
  margin: 0;
}
table {
  border-collapse: collapse;
  width: 100%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Typography helpers ---------- */
.display {
  font-family: var(--display);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.1;
}
.h1 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--gray-900);
  font-size: 32px;
  line-height: 1.1;
}
.h2 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--gray-900);
  font-size: 25px;
}
.mono {
  font-family: var(--mono);
}
.muted {
  color: var(--gray-500);
}
.tnum {
  font-variant-numeric: tabular-nums;
}
.page-sub {
  margin: 6px 0 0;
  color: var(--gray-500);
  font-size: 15px;
}

/* ---------- Layout ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- Top bar / nav ---------- */
.topbar {
  height: 64px;
  background: var(--green-800);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.topbar__logo {
  height: 34px;
  width: auto;
  display: block;
  cursor: pointer;
}
.topbar__nav {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: 6px;
  flex: 1;
}
.navlink {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 15px;
  font-weight: 500;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  border-bottom: 3px solid transparent;
}
.navlink:hover {
  color: #fff;
  text-decoration: none;
}
.navlink--active {
  color: #fff;
  border-bottom-color: var(--gold-600);
}
.topbar__bell {
  position: relative;
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.9);
}
.topbar__bell span {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--gold-600);
  border-radius: 9999px;
  border: 1.5px solid var(--green-800);
}
.topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
}
.topbar__user .avatar {
  background: var(--green-600);
}
.topbar__user-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.topbar__user-co {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  line-height: 1.2;
}

/* ---------- Avatar ---------- */
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: var(--green-800);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}
.avatar--sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.avatar--lg {
  width: 52px;
  height: 52px;
  font-size: 17px;
}

/* ---------- Buttons ---------- */
.btn {
  height: 44px;
  padding: 0 22px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition:
    background 120ms,
    border-color 120ms;
}
.btn svg {
  flex: none;
}
.btn--primary {
  background: var(--green-800);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--green-900);
}
.btn--outline {
  background: transparent;
  color: var(--green-800);
  border: 1px solid var(--green-800);
}
.btn--outline:hover {
  background: var(--green-100);
}
.btn--ghost {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}
.btn--ghost:hover {
  background: var(--gray-100);
}
.btn--sm {
  height: 36px;
  padding: 0 15px;
  font-size: 13.5px;
}
.btn--block {
  width: 100%;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--gray-300);
  color: #fff;
  cursor: not-allowed;
  opacity: 0.75;
  box-shadow: none;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card--pad {
  padding: 22px 24px;
}
.card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 16px;
}
.select-card {
  cursor: pointer;
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 150ms;
  position: relative;
}
.select-card:hover {
  border-color: var(--green-800);
  box-shadow: var(--shadow-md);
}
.select-card--on {
  border-color: var(--green-800);
  box-shadow: var(--shadow-md);
}

/* ---------- Stat cards ---------- */
.stat {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.stat__label {
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 500;
}
.stat__value {
  font-size: 36px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--green-800);
  margin: 8px 0 4px;
  font-variant-numeric: tabular-nums;
}
.stat__sub {
  font-size: 13px;
  color: var(--gray-500);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-700);
  white-space: nowrap;
}
.badge--success {
  background: var(--green-100);
  color: var(--green-700);
}
.badge--warning {
  background: var(--gold-100);
  color: var(--orange-600);
}
.badge--danger {
  background: var(--red-100);
  color: var(--red-600);
}
.badge--info {
  background: var(--teal-100);
  color: var(--green-600);
}
.badge--brand {
  background: var(--green-100);
  color: var(--green-800);
}
.badge--neutral {
  background: var(--gray-100);
  color: var(--gray-700);
}
.pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 9999px;
}
.pill--green {
  color: var(--green-700);
  background: var(--green-100);
}
.pill--muted {
  color: var(--gray-500);
  background: var(--gray-100);
}
.pill--teal {
  color: var(--green-600);
  background: var(--teal-100);
}

/* ---------- Tables ---------- */
.table thead tr {
  background: var(--green-800);
}
.table th {
  text-align: left;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 16px;
}
.table th.right {
  text-align: right;
}
.table td {
  padding: 13px 16px;
  font-size: 14px;
  color: var(--gray-700);
  border-top: 1px solid var(--gray-200);
}
.table td.right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table tbody tr {
  cursor: pointer;
}
.table tbody tr:hover {
  background: var(--green-100);
}
.table .cell-strong {
  color: var(--gray-900);
  font-weight: 500;
}
.table-wrap {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ---------- Form fields ---------- */
.field {
  display: flex;
  flex-direction: column;
}
.field__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 6px;
}
.req {
  color: var(--red-600);
}
.control {
  position: relative;
}
.input,
.select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--gray-900);
  background: #fff;
  outline: none;
  transition:
    border-color 120ms,
    box-shadow 120ms;
}
.select {
  cursor: pointer;
}
.input:focus,
.select:focus {
  border-color: var(--green-800);
  box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.22);
}
.input--err,
.select--err {
  border-color: var(--red-600);
}
.input--money {
  padding-left: 26px;
}
.money-prefix {
  position: absolute;
  left: 11px;
  top: 0;
  height: 40px;
  display: flex;
  align-items: center;
  color: var(--gray-500);
  font-size: 15px;
  pointer-events: none;
}
.field__error {
  font-size: 12px;
  color: var(--red-600);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

/* ---------- Progress bar ---------- */
.progress {
  height: 6px;
  background: var(--gray-200);
  border-radius: 9999px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  background: var(--green-700);
  border-radius: 9999px;
  transition: width 200ms;
}

/* ---------- Notices ---------- */
.notice {
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.55;
}
.notice svg {
  flex: none;
  margin-top: 1px;
}
.notice strong {
  color: var(--gray-900);
}
.notice--info {
  background: var(--teal-100);
}
.notice--success {
  background: var(--green-100);
  border-left: 4px solid var(--green-700);
}
.notice--warning {
  background: var(--gold-100);
  border-left: 4px solid var(--orange-600);
}
.notice--danger {
  background: var(--red-100);
  border-left: 4px solid var(--red-600);
}
.notice--flat {
  background: var(--gray-100);
}

/* ---------- Toast ---------- */
#toast-root {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  width: 340px;
  background: #fff;
  border-radius: 6px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.06);
  border-left: 4px solid var(--green-700);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slide 200ms ease-out;
}
.toast--info {
  border-left-color: var(--gold-600);
}
.toast__msg {
  flex: 1;
  font-size: 14px;
  color: var(--gray-700);
}
.toast__x {
  flex: none;
  cursor: pointer;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ---------- Icon tile ---------- */
.tile {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--green-100);
  color: var(--green-800);
  display: grid;
  place-items: center;
  flex: none;
}
.tile--sm {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}
.tile--green {
  background: var(--green-800);
  color: #fff;
}
.tile--pdf {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: var(--red-100);
  color: var(--red-600);
  font-size: 10px;
  font-weight: 700;
}

/* ---------- Spinner ---------- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--green-800);
  border-radius: 9999px;
  animation: spin 0.8s linear infinite;
}
.spinner--sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* ---------- Dashboard draft banner ---------- */
.draft {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--gold-600);
  border-radius: 6px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

/* ---------- Feature list (loan-type cards) ---------- */
.feat {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid var(--gray-200);
  padding-top: 14px;
}
.feat__row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  color: var(--gray-700);
}
.feat__row svg {
  flex: none;
  margin-top: 1px;
  color: var(--green-700);
}
.card-check {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: var(--green-800);
  color: #fff;
  display: grid;
  place-items: center;
}

/* ---------- Wizard ---------- */
.wiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.crumb {
  font-size: 14px;
  color: var(--gray-500);
}
.crumb span.here {
  color: var(--gray-700);
}
.saved {
  font-size: 13px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
}
.saved__dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--green-600);
  display: inline-block;
}
.wiz-title {
  font-family: var(--display);
  font-size: 30px;
  color: var(--gray-900);
  margin: 0 0 20px;
  font-weight: 700;
}
.stepper {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.stepper__track {
  display: flex;
  align-items: flex-start;
  min-width: 820px;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.step--done,
.step--reachable {
  cursor: pointer;
}
.step__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  height: 34px;
}
.step__line {
  position: absolute;
  top: 50%;
  height: 2px;
  background: var(--gray-200);
}
.step__line--left {
  left: 0;
  right: 50%;
}
.step__line--right {
  left: 50%;
  right: 0;
}
.step__line--on {
  background: var(--green-800);
}
.step__circle {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  color: var(--gray-500);
  border: 2px solid var(--gray-300);
  transition: all 150ms;
}
.step__circle--active {
  background: var(--green-800);
  color: #fff;
  border-color: var(--green-800);
  box-shadow: 0 0 0 4px rgba(45, 80, 22, 0.18);
}
.step__circle--done {
  background: var(--green-800);
  color: #fff;
  border-color: var(--green-800);
}
.step__label {
  margin-top: 8px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--gray-500);
  font-weight: 500;
  padding: 0 4px;
}
.step__label--active {
  color: var(--gray-900);
  font-weight: 600;
}
.step__label--done {
  color: var(--gray-700);
}
.wiz-panel {
  animation: fade 240ms ease-out;
}
.wiz-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
}
.wiz-foot__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* section cards inside the 1003 form */
.sec {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.sec__head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}
.sec__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-900);
}

/* choice / method rows */
.choice {
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: all 150ms;
}
.choice:hover {
  border-color: var(--green-800);
  box-shadow: var(--shadow-md);
}
.choice__tile {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
}

/* dropzone */
.dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  background: #fff;
}
.dropzone--click {
  cursor: pointer;
}
.dropzone--click:hover {
  border-color: var(--green-800);
  background: var(--green-100);
}

/* product cards */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.prod {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.prod--on {
  border: 2px solid var(--green-800);
}
.prod__rate {
  font-size: 28px;
  font-weight: 700;
  color: var(--green-800);
  font-variant-numeric: tabular-nums;
}
.prod__spec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  font-size: 12.5px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}
.prod__spec b {
  color: var(--gray-900);
  font-weight: 600;
}

/* selectable person rows (team) */
.person {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--gray-200);
  background: #fff;
  border-radius: 6px;
  padding: 13px 16px;
  transition: all 120ms;
}
.person--on {
  border: 2px solid var(--green-800);
  background: var(--green-100);
}
.radio {
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  border: 2px solid var(--gray-300);
  display: grid;
  place-items: center;
  flex: none;
}
.radio--on {
  border-color: var(--green-800);
}
.radio--on::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: var(--green-800);
}
.check {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--gray-300);
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
}
.check--on {
  border-color: var(--green-800);
  background: var(--green-800);
}

/* toggle */
.toggle {
  width: 44px;
  height: 24px;
  border-radius: 9999px;
  background: var(--gray-300);
  position: relative;
  flex: none;
  cursor: pointer;
  transition: background 150ms;
}
.toggle--on {
  background: var(--red-600);
}
.toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: left 150ms;
}
.toggle--on .toggle__knob {
  left: 22px;
}

/* create-loan stages */
.stage {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stage__dot {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  border: 2px solid var(--gray-300);
  background: #fff;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
}
.stage__dot--done {
  background: var(--green-800);
  border-color: var(--green-800);
}
.stage__dot--active {
  border-color: var(--green-800);
}
.stage__label {
  font-size: 14.5px;
  color: var(--gray-500);
  font-weight: 500;
}
.stage__label--on {
  color: var(--gray-900);
}

/* review summary cards */
.review {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.review__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13.5px;
}
.kv__k {
  color: var(--gray-500);
  flex: none;
}
.kv__v {
  color: var(--gray-900);
  font-weight: 500;
  text-align: right;
}

/* success panel */
.success {
  background: #fff;
  border: 1px solid var(--green-700);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.success__ring {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: var(--green-100);
  color: var(--green-700);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

/* filter chips */
.chip {
  height: 34px;
  padding: 0 15px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  cursor: pointer;
}
.chip--on {
  background: var(--green-800);
  color: #fff;
  border-color: var(--green-800);
}

/* search box */
.search {
  position: relative;
}
.search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
}
.search input {
  height: 36px;
  width: 220px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 0 12px 0 34px;
  font-size: 14px;
  background: #fff;
  outline: none;
}
.search input:focus {
  border-color: var(--green-800);
  box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.22);
}

/* pager */
.pager {
  display: flex;
  gap: 6px;
}
.pager button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  background: #fff;
  color: var(--gray-300);
}
.pager button.on {
  border-color: var(--green-800);
  background: var(--green-800);
  color: #fff;
  font-size: 13px;
}

/* loan detail */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 22px;
  overflow-x: auto;
}
.tab {
  padding: 0 16px;
  height: 46px;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab--on {
  color: var(--green-800);
  font-weight: 600;
  border-bottom-color: var(--green-800);
}
.timeline__row {
  display: flex;
  gap: 12px;
}
.timeline__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timeline__dot {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  border: 2px solid var(--gray-300);
  background: #fff;
  flex: none;
}
.timeline__dot--on {
  border-color: var(--green-800);
  background: var(--green-800);
}
.timeline__line {
  width: 2px;
  flex: 1;
  min-height: 22px;
  background: var(--gray-200);
}
.timeline__line--on {
  background: var(--green-800);
}

/* doc rows */
.doc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-200);
}
.doc-row:last-child {
  border-bottom: none;
}

/* resources */
.res-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  background: #fff;
  color: var(--green-800);
  display: grid;
  place-items: center;
  flex: none;
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--green-100);
  border-color: var(--green-800);
}

/* modal */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  animation: fade 180ms ease-out;
}

/* misc utilities used by JS */
.hidden {
  display: none !important;
}
.mt-14 {
  margin-top: 14px;
}
.mt-18 {
  margin-top: 18px;
}
.mb-16 {
  margin-bottom: 16px;
}
.center {
  text-align: center;
}
.flex-col {
  display: flex;
  flex-direction: column;
}
.gap-8 {
  gap: 8px;
}
.gap-10 {
  gap: 10px;
}
.gap-12 {
  gap: 12px;
}
.gap-14 {
  gap: 14px;
}
.gap-16 {
  gap: 16px;
}
