@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--canvas);
  color-scheme: light;
  font-size: 15px;
  line-height: 1.5;
  font-synthesis: none;
  --purple: #7c3aed;
  --muted: #6a6473;
  --line: #e3e0e7;
  --soft: #f0edf4;
  --amber: #9a661c;
  --shadow: 0 4px 20px #29213505;
  --text: #17131f;
  --canvas: #f2f0f5;
  --surface: #fff;
  --surface-raised: #fbf9fd;
  --control-hover: #efecf3;
  --heading: #30263e;
  --accent-text: #624b83;
  --focus: #735799;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
html {
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}
img,
svg {
  max-width: 100%;
}
button,
input,
select,
textarea {
  min-width: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 15px;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #735799;
  outline-offset: 3px;
}
a {
  color: var(--purple);
}
button:hover:not(:disabled) {
  background: #efecf3;
}
.primary {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}
.primary:hover:not(:disabled) {
  background: #282034;
}
.quiet {
  background: transparent;
  border: 0;
}
.small {
  padding: 7px 10px;
  font-size: 12px;
}
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.initial-loading {
  padding: 40px;
}
.shell {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}
.sidebar {
  background: #271f33;
  color: #e7e3ed;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  padding: 34px 22px 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 40px;
}
.brand-mark {
  background: #c3aae6;
  color: #332942;
  border-radius: 11px;
  width: 39px;
  height: 42px;
  display: grid;
  place-items: center;
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: 23px;
}
.brand strong {
  font-family: Manrope, sans-serif;
  font-size: 16px;
  letter-spacing: -0.4px;
  display: block;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2.1px;
  color: #b0a6be;
  margin-top: 4px;
}
.nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.9px;
  color: #9c92ab;
  margin: 0 12px 12px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav button {
  display: flex;
  gap: 13px;
  align-items: center;
  text-align: left;
  background: transparent;
  border: 0;
  color: #b7adc4;
  border-radius: 8px;
  padding: 13px 14px;
  font-size: 13px;
  font-weight: 500;
}
.nav button:hover {
  background: #342944;
  color: #fff;
}
.nav button.active {
  background: #413158;
  color: #e7dcf6;
}
.nav .divider {
  height: 20px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 24px;
}
.draft-card {
  border: 1px solid #514660;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 20px;
}
.draft-card strong {
  font-size: 12px;
  color: #e0d8eb;
}
.draft-card p {
  color: #b1a8be;
  font-size: 11px;
  line-height: 1.65;
  margin-bottom: 0;
}
.profile {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 4px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d8cee6;
  color: #413650;
  font-size: 11px;
  font-weight: 700;
}
.profile strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.profile small {
  font-size: 10px;
  color: #9e93ae;
}
.content {
  min-width: 0;
}
.topbar {
  min-height: 77px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  background: #fbf9fd;
  gap: 16px;
}
.menu-toggle,
.drawer-close,
.mobile-brand,
.mobile-nav,
.nav-backdrop {
  display: none;
}
body.drawer-open {
  overflow: hidden;
}
.demo-control {
  display: flex;
  align-items: center;
  gap: 9px;
}
.demo-label {
  font-size: 11px;
  font-weight: 600;
  color: #665f70;
  white-space: nowrap;
}
.breadcrumb {
  color: #96929c;
  font-size: 12px;
}
.breadcrumb strong {
  color: #544c60;
  font-weight: 500;
  margin-left: 10px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
}
.role-switch {
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  border-radius: 10px;
  padding: 3px;
}
.role-switch button {
  border: 0;
  padding: 6px 12px;
  font-size: 12px;
  background: transparent;
}
.role-switch button.selected {
  background: #ece7f2;
  color: #403156;
}
.date {
  color: #7b7683;
  font-size: 11px;
}
.main {
  max-width: 1600px;
  margin: auto;
  padding: 35px 42px 45px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-heading > div {
  min-width: 0;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: #776f81;
  margin: 0 0 10px;
  font-weight: 700;
}
h1,
h2,
h3 {
  font-family: Manrope, sans-serif;
  color: #30263e;
}
h1 {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -1.1px;
  margin: 0 0 8px;
  line-height: 1.2;
}
h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
p.subheading {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.7;
}
.preview-banner {
  background: #e9e4f1;
  border: 1px solid #d9d1e5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  font-size: 12px;
  color: #584770;
  margin-bottom: 25px;
  line-height: 1.6;
}
.preview-banner .tag {
  font-size: 10px;
  letter-spacing: 0.9px;
  background: #d9cee8;
  white-space: nowrap;
  color: #4d3b66;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 700;
}
.preview-banner button {
  margin-left: auto;
  white-space: nowrap;
  background: transparent;
  border: 0;
  padding: 6px;
  color: #584670;
  font-size: 11px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 27px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  padding: 20px 21px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
  color: #6c6478;
  font-size: 12px;
}
.stat-icon {
  padding: 7px;
  background: #f0edf5;
  border-radius: 8px;
  color: #716384;
}
.stat-value {
  font-family: Manrope, sans-serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1px;
}
.stat-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
}
.stat-note.positive {
  color: #6d5b86;
}
.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(265px, 1fr);
  gap: 22px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 22px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.panel-header {
  padding: 21px 23px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.panel-header p {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}
.panel-body {
  padding: 0 23px 22px;
}
.panel-header .text-link {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 12px;
  color: #503d6a;
  white-space: nowrap;
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
th {
  text-align: left;
  font-weight: 500;
  font-size: 10px;
  color: #686074;
  background: #faf9fc;
  padding: 12px 23px;
  border-block: 1px solid #ece9f0;
}
td {
  padding: 18px 23px;
  border-bottom: 1px solid #ece9f0;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
}
td small {
  font-size: 10px;
  color: #6e6976;
  display: block;
  margin-top: 5px;
}
.borrower-cell {
  display: flex;
  gap: 12px;
  align-items: center;
}
.borrower-cell .avatar {
  background: #eae5f0;
  color: #615178;
  font-size: 10px;
  flex-shrink: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  padding: 4px 7px;
  font-size: 11px;
  line-height: 1.3;
  border-radius: 5px;
  font-weight: 500;
  background: #ebe6f3;
  color: #4b326e;
}
.badge::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.badge.amber {
  background: #faf1df;
  color: #896020;
}
.badge.gray {
  background: #f0eff2;
  color: #66606e;
}
.badge.red {
  background: #f9e9e6;
  color: #95493e;
}
.open-loan {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}
.progress {
  height: 5px;
  background: #ebe7f1;
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0;
}
.progress i {
  height: 100%;
  display: block;
  background: #8b78a6;
}
.due-item {
  padding: 0 23px 19px;
  margin-top: 1px;
}
.due-item + .due-item {
  padding-top: 18px;
  border-top: 1px solid #ece9f0;
}
.line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.line strong {
  font-size: 12px;
  font-weight: 600;
}
.line small {
  font-size: 10px;
  color: #8e8995;
}
.vehicle-mini {
  font-size: 10px;
  color: #908b97;
  margin: 5px 0 12px;
}
.amount {
  font-family: Manrope, sans-serif;
  font-size: 16px;
  font-weight: 600;
}
.due-date {
  font-size: 10px;
  color: #878090;
}
.health-item {
  display: flex;
  align-items: center;
  gap: 11px;
  border-top: 1px solid #ece9f0;
  padding: 14px 0;
}
.health-item:first-child {
  border-top: 0;
}
.health-icon {
  background: #f0ecf5;
  border-radius: 7px;
  padding: 8px;
  color: #786593;
}
.health-item .detail {
  flex: 1;
  min-width: 0;
}
.health-item strong {
  font-size: 13px;
  font-weight: 600;
  display: block;
}
.health-item small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.bottom-note {
  font-size: 10px;
  color: #898096;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stripe-sandbox-card {
  margin-bottom: 24px;
}
.stripe-sandbox-card .panel-header {
  gap: 16px;
  flex-wrap: wrap;
}
.stripe-sandbox-intro,
.stripe-sandbox-status p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.stripe-sandbox-intro {
  margin: 0 0 20px;
  max-width: 780px;
}
.stripe-sandbox-customer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}
.stripe-sandbox-customer dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.stripe-sandbox-customer dd {
  margin: 0;
  color: var(--heading);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.stripe-sandbox-status > strong {
  display: block;
  color: var(--heading);
  font-size: 17px;
}
.stripe-sandbox-status p {
  margin: 8px 0;
}
.stripe-sandbox-status small {
  color: var(--muted);
}
.stripe-sandbox-actions {
  margin-top: 22px;
}
.stripe-payment-notification {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
}
.stripe-payment-notification strong {
  color: var(--heading);
  font-size: 13px;
}
.stripe-payment-notification p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 8px 0 0;
}
.borrower-test-banner {
  flex-wrap: wrap;
  gap: 10px;
}
.borrower-test-bank .actions,
.borrower-test-payment .stripe-sandbox-status {
  margin-top: 20px;
}
.borrower-test-payment .stripe-sandbox-status {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
}
.borrower-test-payment .payment-form {
  margin-top: 20px;
}
@media (max-width: 600px) {
  .borrower-test-bank .actions > *,
  .borrower-test-banner > button {
    width: 100%;
    min-height: 44px;
  }
}
.stripe-checkout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--heading);
  background: var(--surface-raised);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
}
.stripe-checkout-link:hover {
  border-color: var(--purple);
}
.stripe-checkout-link span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
@media (max-width: 600px) {
  .stripe-sandbox-customer {
    grid-template-columns: minmax(0, 1fr);
    padding: 15px;
  }
  .stripe-sandbox-actions > :is(button, a) {
    width: 100%;
    min-height: 44px;
  }
}
.integration-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 22px;
}
.integration-card .service-symbol {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  background: #eee9f4;
  border-radius: 9px;
  color: #624b83;
  margin-bottom: 19px;
}
.integration-card p {
  font-size: 12px;
  color: #7d7589;
  line-height: 1.65;
  min-height: 40px;
}
.integration-card .provider {
  font-size: 11px;
  color: #605175;
  border-top: 1px solid #ece9f0;
  padding-top: 14px;
  margin-top: 17px;
}
.integration-card code {
  font-size: 10px;
  overflow-wrap: anywhere;
  display: block;
  color: #7c7389;
  margin-top: 7px;
}
.integration-card .badge {
  margin-top: 8px;
}
.notice {
  padding: 17px 20px;
  background: #f6f2e9;
  border: 1px solid #eae2d1;
  border-radius: 8px;
  font-size: 12px;
  color: #8d754e;
  line-height: 1.7;
  margin: 20px 0;
}
.two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.vehicle-catalog-note {
  grid-column: 1 / -1;
  margin: 0;
}
#custom-make-field[hidden],
#custom-model-field[hidden] {
  display: none;
}
.borrower-picker {
  grid-column: 1 / -1;
  min-width: 0;
}
.borrower-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 4px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border, #dedbe3);
  border-radius: 12px;
  background: white;
}
.borrower-results[hidden] {
  display: none;
}
.borrower-results button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
  width: 100%;
  min-height: 56px;
  padding: 12px;
  border: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}
.borrower-results button[aria-selected='true'],
.borrower-results button:hover,
.borrower-results button:focus-visible {
  background: #ebe5f3;
  outline: 2px solid #392457;
  outline-offset: -2px;
}
.borrower-results span {
  font-size: 13px;
  color: #5c5565;
}
.field {
  margin-bottom: 15px;
}
.field label {
  font-size: 13px;
  color: #5d536a;
  display: block;
  margin-bottom: 7px;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dcd7e3;
  background: #fff;
  border-radius: 7px;
  color: #3b3347;
  font-size: 16px;
  min-height: 48px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #bdb0d0;
  outline-offset: 1px;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
.error {
  color: #a04438;
  background: #f9eae6;
  font-size: 12px;
  line-height: 1.6;
  padding: 12px;
  border-radius: 8px;
  margin: 12px 0;
}
.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: min(480px, calc(100vw - 40px));
  z-index: 10;
  padding: 15px 20px;
  border-radius: 9px;
  background: #322841;
  color: #fff;
  box-shadow: 0 8px 35px #1c162425;
  font-size: 12px;
  line-height: 1.6;
}
.empty {
  padding: 32px 24px;
  text-align: center;
  font-size: 12px;
  color: #867e92;
}
.data-list {
  margin: 0;
}
.data-list div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid #ece9f0;
  font-size: 14px;
}
.data-list dt {
  color: var(--muted);
}
.data-list dd {
  margin: 0;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}
.telemetry-scene {
  height: 180px;
  border: 1px solid #e3deea;
  background:
    repeating-linear-gradient(0deg, transparent 0 37px, #e4dfeb 38px 40px),
    repeating-linear-gradient(90deg, #ede9f3 0 47px, #e0dae9 48px 51px);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.telemetry-scene:after {
  content: '';
  position: absolute;
  width: 150%;
  height: 32px;
  background: #fffdf6;
  border: 1px solid #d7d0e1;
  transform: rotate(-23deg);
}
.telemetry-pin {
  position: relative;
  z-index: 1;
  background: #403056;
  color: white;
  border-radius: 50%;
  padding: 13px;
  box-shadow: 0 0 0 10px #d5cae499;
}
.telemetry-caption {
  position: absolute;
  bottom: 9px;
  left: 10px;
  font-size: 9px;
  background: #ffffffdd;
  color: #827890;
  padding: 4px 7px;
  z-index: 2;
}
.upload-area {
  padding: 30px;
  border: 1px dashed #c8c0d4;
  border-radius: 8px;
  background: #faf8fc;
  text-align: center;
  margin-bottom: 20px;
}
.upload-area p {
  font-size: 12px;
  color: #7c718b;
  line-height: 1.7;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}
.toolbar select {
  max-width: 370px;
}
.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 25px;
  background: radial-gradient(ellipse at top, #dbd3e7 0, #ede9f3 58%, #f6f4f9 100%);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  padding: 35px;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 65px #271f3310;
}
.auth-card .brand {
  color: #322840;
  padding: 0 0 25px;
}
.auth-card h1 {
  font-size: 24px;
  margin-bottom: 10px;
}
.auth-card .subheading {
  margin-bottom: 25px;
}
.auth-card button {
  width: 100%;
  margin-top: 9px;
}
.auth-card form {
  margin-top: 22px;
}
/* Live account access shares the portal's calm, readable visual language. */
.auth-shell.auth-branded {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: stretch;
  padding: 0;
  background: #f9f7fb;
}
.auth-brand-panel {
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  padding: clamp(36px, 4.8vw, 76px);
  color: #f2eef7;
  background: linear-gradient(155deg, #382453 0%, #261e32 65%, #221b2b 100%);
}
.auth-brand-panel::before,
.auth-brand-panel::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: 650px;
  height: 650px;
  border: 1px solid #b297d818;
  border-radius: 50%;
  right: -390px;
  bottom: -310px;
}
.auth-brand-panel::after {
  width: 900px;
  height: 900px;
  right: -515px;
  bottom: -435px;
}
.auth-brand-panel .brand {
  padding: 0;
  gap: 14px;
}
.auth-brand-panel .brand-mark {
  width: 44px;
  height: 48px;
  background: #cbb8e5;
  font-size: 28px;
}
.auth-brand-panel .brand strong {
  font-size: 21px;
  color: #f1ecf8;
}
.auth-brand-panel .brand small {
  font-size: 10px;
  color: #c6bbd5;
}
.auth-brand-copy {
  max-width: 470px;
  margin-block: auto;
  padding-block: 72px;
}
.auth-brand-panel .eyebrow {
  font-size: 11px;
  color: #c1b0d9;
  letter-spacing: 2px;
  margin-bottom: 22px;
}
.auth-brand-panel h2 {
  max-width: 490px;
  font-size: clamp(35px, 4vw, 58px);
  color: #f2edf9;
  line-height: 1.15;
  letter-spacing: -2.2px;
  font-weight: 500;
  white-space: pre-line;
  margin: 0 0 25px;
}
.auth-brand-panel p:not(.eyebrow) {
  max-width: 380px;
  font-size: 16px;
  line-height: 1.8;
  color: #c5bcd2;
  margin: 0;
}
.auth-brand-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #c3b9d2;
  line-height: 1.7;
}
.auth-brand-bottom .icon {
  width: 17px;
  height: 17px;
}
.auth-form-panel {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 54px clamp(36px, 5.2vw, 84px) 30px;
}
.auth-form-panel .auth-card {
  padding: 0;
  max-width: 420px;
  margin-block: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.auth-mobile-brand {
  display: none;
}
.auth-intro .eyebrow {
  color: #624c80;
  font-size: 10px;
  letter-spacing: 1.8px;
  margin-bottom: 12px;
}
.auth-intro h1 {
  font-size: clamp(27px, 2.4vw, 33px);
  line-height: 1.25;
  letter-spacing: -1.1px;
  font-weight: 600;
  margin-bottom: 12px;
}
.auth-intro .subheading {
  font-size: 14px;
  line-height: 1.75;
  color: #696174;
  margin-bottom: 27px;
}
.auth-card .google-signin {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  margin-top: 0;
  border: 1px solid #dbd5e3;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #392f48;
}
.auth-card .google-signin:hover:not(:disabled) {
  background: #eee9f5;
  border-color: #c1b5d1;
}
.google-signin > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #746b80;
  font-size: 12px;
  line-height: 1.5;
  margin: 25px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: #ded9e5;
}
.auth-form-panel .auth-card form {
  margin-top: 0;
}
.auth-card .field {
  margin-bottom: 19px;
}
.auth-card .field label {
  font-size: 13px;
  font-weight: 500;
  color: #453956;
  margin-bottom: 8px;
}
.auth-card input {
  min-height: 50px;
  padding-inline: 14px;
  border-radius: 9px;
  border-color: #dbd5e3;
  background: #fff;
  box-shadow: 0 2px 3px #271f3302;
  font-size: 16px;
}
.auth-card input::placeholder {
  color: #8a8393;
}
.auth-card input:focus {
  outline-color: #a793c2;
  border-color: #775f99;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 67px;
}
.auth-card .password-toggle {
  position: absolute;
  top: 3px;
  right: 4px;
  min-width: 48px;
  width: auto;
  min-height: 44px;
  padding: 8px;
  margin: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
  color: #594574;
}
.auth-card .password-toggle:hover:not(:disabled) {
  background: #ede8f4;
}
.auth-card .auth-submit {
  min-height: 51px;
  margin-top: 7px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 3px 8px #32284012;
}
.auth-switch {
  text-align: center;
  color: #6d6578;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 21px;
}
.auth-card .auth-switch button,
.auth-card button.auth-switch {
  width: auto;
  min-height: 44px;
  padding: 7px 6px;
  margin: 0;
  color: #413059;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
}
.auth-card button.auth-switch {
  display: block;
  margin: 16px auto 0;
}
.auth-card .auth-switch button:hover:not(:disabled),
.auth-card button.auth-switch:hover:not(:disabled) {
  background: #eae4f2;
}
.auth-security-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 0;
  padding-top: 21px;
  border-top: 1px solid #dfd9e7;
  color: #706480;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}
.auth-security-note .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.auth-footer {
  max-width: 420px;
  padding-top: 35px;
  color: #766c83;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
}
.auth-status {
  margin: 17px 0;
  border: 1px solid #eddace;
  border-radius: 10px;
  background: #fbf0e9;
  color: #934b35;
  font-size: 13px;
  line-height: 1.7;
  padding: 12px 14px;
  overflow-wrap: anywhere;
}
.auth-status.success {
  border-color: #d5cae5;
  background: #ede8f5;
  color: #473166;
}
.payment-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
  letter-spacing: 0.2px;
  color: #877d95;
  margin-top: 25px;
}
.count {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: #90879d;
  margin-left: 8px;
  font-weight: 400;
}
.loading {
  padding: 60px;
  text-align: center;
  color: #8c8299;
}
.status-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.document-row {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.document-row strong {
  font-size: 12px;
}
.document-row small {
  display: block;
  font-size: 10px;
  color: #9186a0;
  margin-top: 5px;
}
/* A quieter payment-first space for the borrower. */
.borrower-shell .main {
  max-width: 1220px;
}
.borrower-heading {
  margin-bottom: 28px;
}
.borrower-heading h1 {
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -1.2px;
}
.borrower-heading .subheading {
  max-width: 540px;
}
.borrower-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  align-items: start;
  gap: 24px;
  margin-bottom: 24px;
}
.borrower-layout > *,
.borrower-loan-grid > * {
  min-width: 0;
}
.borrower-summary {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border-radius: 20px;
  border: 1px solid #382553;
  background: radial-gradient(ellipse at right top, #4a326c 0, transparent 65%), #292035;
  color: #fff;
  box-shadow: 0 12px 30px #29203510;
  height: 100%;
}
.borrower-summary h2,
.borrower-summary h3,
.borrower-summary strong {
  color: inherit;
}
.summary-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #d7cee3;
  letter-spacing: 0.2px;
  margin: 0 0 8px;
}
.summary-amount {
  font-family: Manrope, sans-serif;
  font-size: clamp(32px, 3.8vw, 49px);
  letter-spacing: -1.7px;
  line-height: 1.2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.summary-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #d5cedf;
  font-size: 12px;
  line-height: 1.7;
}
.summary-progress {
  height: 7px;
  margin: 23px 0 10px;
  border-radius: 20px;
  background: #ffffff24;
  overflow: hidden;
}
.summary-progress > i,
.summary-progress > span {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: #c4aae8;
}
.summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 25px;
  padding-top: 21px;
  border-top: 1px solid #ffffff2b;
}
.summary-stats > div + div {
  border-left: 1px solid #ffffff2b;
  padding-left: 20px;
}
.summary-stats strong {
  display: block;
  font-family: Manrope, sans-serif;
  font-size: 21px;
  font-weight: 600;
  margin-top: 5px;
}
.summary-stats span,
.summary-stats small {
  display: block;
  font-size: 12px;
  color: #d5cedf;
}
.borrower-next {
  height: 100%;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.borrower-next h2 {
  font-size: 16px;
  margin-bottom: 16px;
}
.borrower-next p {
  margin: 9px 0;
}
.next-payment-amount {
  font-family: Manrope, sans-serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.3;
  color: #312740;
  font-variant-numeric: tabular-nums;
}
.next-payment-date {
  font-size: 14px;
  color: #645c6f;
}
.borrower-next > button,
.borrower-next > .primary,
.borrower-next .actions button {
  width: 100%;
  min-height: 48px;
  margin-top: 17px;
  font-size: 14px;
}
.borrower-next .status-note {
  font-size: 12px;
  margin-top: 12px;
}
.borrower-loan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 24px;
}
.borrower-loan-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
}
.loan-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
}
.loan-card-top > .icon,
.loan-card-icon,
.loan-card-top > .health-icon {
  width: 45px;
  height: 45px;
  padding: 11px;
  color: #564074;
  background: #ece6f4;
  border-radius: 13px;
  flex-shrink: 0;
}
.loan-card-vehicle {
  font-family: Manrope, sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.4;
  margin: 0 0 5px;
}
.loan-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 18px 0 20px;
  overflow-wrap: anywhere;
}
.loan-card-meta span {
  display: block;
  font-size: 12px;
}
.loan-card-meta strong {
  display: block;
  color: #362948;
  font-family: Manrope, sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-top: 5px;
}
.loan-card-footer {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.loan-card-footer > div {
  min-width: 0;
}
.loan-card-footer strong {
  display: block;
  font-family: Manrope, sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #38294d;
  letter-spacing: -0.5px;
}
.loan-card-footer small,
.loan-card-footer span:not(.icon) {
  font-size: 12px;
  color: var(--muted);
}
.loan-card-footer button {
  font-size: 13px;
  padding-inline: 16px;
  flex-shrink: 0;
}
.payment-history {
  margin: 0;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.history-row:first-child {
  border-top: 0;
}
.history-row > .icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  color: #614a81;
  background: #eee9f5;
  border-radius: 50%;
}
.history-row > .health-icon {
  flex-shrink: 0;
}
.history-meta {
  flex: 1;
  min-width: 0;
}
.history-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.history-meta small,
.history-meta span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.history-row > strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.borrower-home > .panel-header {
  padding-inline: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 14px;
}
.section-heading h2 {
  font-size: 18px;
}
.section-heading button {
  flex-shrink: 0;
  padding-right: 0;
  color: #4e396b;
}
.borrower-shell .panel-header h2 {
  font-size: 17px;
}
.borrower-shell .payment-form button {
  width: 100%;
  min-height: 48px;
  font-size: 14px;
}
.borrower-shell .footer {
  font-size: 11px;
}
@media (min-width: 1500px) {
  .main {
    padding-top: 45px;
  }
  .stats {
    gap: 22px;
  }
  .stat {
    padding: 24px;
  }
  .grid-main {
    gap: 26px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    padding-inline: 14px;
  }
  .shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .main {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .grid-main {
    grid-template-columns: 1fr;
  }
  .integration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 17px;
  }
  .stat-value {
    font-size: 23px;
  }
  .date {
    display: none;
  }
}
@media (max-width: 1100px) {
  .borrower-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .borrower-next {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.75fr);
    column-gap: 28px;
    align-items: center;
  }
  .borrower-next h2,
  .borrower-next .next-payment-amount,
  .borrower-next .next-payment-date {
    grid-column: 1;
  }
  .borrower-next > .line {
    grid-column: 1 / -1;
  }
  .borrower-next > button,
  .borrower-next > .primary {
    grid-column: 2;
    grid-row: 2 / span 2;
    margin: 0;
  }
  .borrower-next > .status-note {
    grid-column: 1 / -1;
  }
}
@media (max-width: 900px) {
  .auth-shell.auth-branded {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-brand-panel {
    display: none;
  }
  .auth-form-panel {
    padding: max(46px, env(safe-area-inset-top)) 32px max(25px, env(safe-area-inset-bottom));
  }
  .auth-mobile-brand {
    display: block;
    margin-bottom: 41px;
  }
  .auth-mobile-brand .brand {
    padding: 0;
  }
  .auth-mobile-brand .brand-mark {
    width: 39px;
    height: 43px;
    font-size: 26px;
  }
  .auth-mobile-brand .brand small {
    color: #6a5b80;
  }
  .auth-intro h1 {
    font-size: 30px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, calc(100vw - 56px));
    height: 100dvh;
    padding: max(28px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
    z-index: 40;
    box-shadow: 14px 0 50px #1b152330;
  }
  .nav-open .sidebar {
    display: flex;
  }
  .drawer-close {
    display: grid;
    place-items: center;
    position: absolute;
    top: max(25px, env(safe-area-inset-top));
    right: 16px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-color: #534666;
    background: #352a45;
    color: #ece7f4;
  }
  .drawer-close:hover:not(:disabled) {
    background: #45335d;
  }
  .nav-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    background: #1a152278;
    z-index: 39;
    padding: 0;
    backdrop-filter: blur(3px);
  }
  .nav-backdrop:hover:not(:disabled) {
    background: #1a152278;
  }
  .brand {
    padding: 0 0 32px;
  }
  .sidebar .brand {
    padding-left: 7px;
    padding-right: 44px;
  }
  .brand-mark {
    width: 36px;
    height: 39px;
    font-size: 22px;
    flex-shrink: 0;
  }
  .brand strong {
    font-size: 16px;
  }
  .brand small {
    font-size: 9px;
  }
  .nav {
    display: grid;
    gap: 6px;
  }
  .nav button {
    min-height: 48px;
    font-size: 14px;
    padding: 12px 14px;
    gap: 13px;
  }
  .nav-label {
    font-size: 10px;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 76px;
    padding: calc(10px + env(safe-area-inset-top)) 24px 10px;
    gap: 12px;
    background: #fbf9fdf5;
    backdrop-filter: blur(14px);
  }
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    padding: 0;
    border-color: #ddd7e5;
    background: #f2eff7;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    margin-right: auto;
  }
  .mobile-brand .brand {
    padding: 0;
    gap: 9px;
  }
  .mobile-brand .brand strong {
    color: #332942;
  }
  .mobile-brand .brand small {
    color: #6a5b7e;
    letter-spacing: 1.4px;
    font-size: 8px;
  }
  .breadcrumb {
    display: none;
  }
  .top-actions {
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
  }
  .demo-control {
    gap: 4px;
    flex-direction: column;
    align-items: flex-end;
  }
  .demo-label {
    font-size: 10px;
    line-height: 1.1;
  }
  .role-switch {
    padding: 2px;
    border-radius: 9px;
  }
  .role-switch button {
    min-height: 44px;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 7px;
  }
  .main {
    padding: 28px 24px 32px;
  }
  .borrower-shell .main {
    padding-bottom: calc(106px + env(safe-area-inset-bottom));
  }
  .borrower-shell .mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    border-top: 1px solid #dbd4e4;
    background: #fffffff5;
    padding: 7px max(12px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom));
    gap: 4px;
    box-shadow: 0 -6px 24px #2d243a07;
    backdrop-filter: blur(14px);
  }
  .mobile-nav button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-height: 58px;
    border: 0;
    padding: 6px 4px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 600;
    color: #696174;
    background: transparent;
  }
  .mobile-nav button .icon {
    width: 22px;
    height: 22px;
  }
  .mobile-nav button.active,
  .mobile-nav button[aria-current='page'] {
    background: #ebe5f3;
    color: #36244f;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
  }
  h1 {
    font-size: 28px;
  }
  .page-heading > .primary {
    font-size: 13px;
    padding: 10px 15px;
    white-space: nowrap;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .stat {
    padding: 20px;
  }
  .stat-top {
    margin-bottom: 12px;
  }
  .stat-value {
    font-size: 28px;
  }
  .two-cols {
    gap: 0;
  }
  .two-cols,
  .integration-grid {
    grid-template-columns: 1fr;
  }
  .preview-banner {
    flex-wrap: wrap;
    padding: 13px 15px;
    font-size: 12px;
    gap: 8px 10px;
  }
  .preview-banner button {
    margin-left: 0;
    padding: 8px 0;
    font-size: 12px;
  }
  .preview-banner > span:not(.tag) {
    flex-basis: 100%;
  }
  .field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .panel-header,
  .panel-body {
    padding-left: 22px;
    padding-right: 22px;
  }
  .panel-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .panel-header .text-link {
    text-align: left;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .toolbar select {
    max-width: none;
  }
  .footer {
    flex-wrap: wrap;
    line-height: 1.6;
    font-size: 10px;
    color: #685e75;
  }
  .grid-main {
    gap: 0;
  }
  .toast {
    right: 20px;
    left: 20px;
    max-width: none;
    bottom: calc(95px + env(safe-area-inset-bottom));
    z-index: 50;
    font-size: 14px;
  }
  .portfolio-table,
  .portfolio-table tbody,
  .portfolio-table tr,
  .portfolio-table td {
    display: block;
    white-space: normal;
  }
  .portfolio-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .portfolio-table tbody {
    padding: 0 20px 20px;
  }
  .portfolio-table tr {
    padding: 16px;
    border: 1px solid #e1dce8;
    border-radius: 12px;
    background: #fbf9fd;
  }
  .portfolio-table tr + tr {
    margin-top: 14px;
  }
  .portfolio-table td,
  .portfolio-table tr:last-child td {
    padding: 10px 0;
    border: 0;
    font-size: 14px;
  }
  .portfolio-table td:first-child {
    padding: 0 0 13px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 3px;
  }
  .portfolio-table td:not(:first-child) {
    display: grid;
    grid-template-columns: minmax(88px, 1fr) minmax(0, 1.25fr);
    gap: 3px 12px;
    text-align: right;
    align-items: center;
  }
  .portfolio-table td:not(:first-child)::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    text-align: left;
    color: #6b6277;
    font-size: 12px;
    padding-top: 2px;
  }
  .portfolio-table td:not(:first-child) > * {
    grid-column: 2;
    justify-self: end;
  }
  .portfolio-table td strong,
  .portfolio-table .open-loan strong {
    font-size: 14px;
    overflow-wrap: anywhere;
  }
  .portfolio-table td small {
    font-size: 12px;
    margin-top: 1px;
  }
  .portfolio-table .open-loan {
    flex: 1;
    padding: 3px 0;
  }
  .portfolio-table .borrower-cell .avatar {
    width: 40px;
    height: 40px;
    font-size: 12px;
  }
}
@media (max-width: 600px) {
  .auth-form-panel {
    padding: max(30px, env(safe-area-inset-top)) 25px max(24px, env(safe-area-inset-bottom));
  }
  .auth-form-panel .auth-card {
    padding: 0;
  }
  .auth-mobile-brand {
    margin-bottom: 36px;
  }
  .auth-intro h1 {
    font-size: 29px;
    letter-spacing: -1px;
  }
  .auth-intro .subheading {
    margin-bottom: 24px;
  }
  .auth-footer {
    padding-top: 28px;
  }
  .topbar {
    padding-inline: 18px;
    gap: 9px;
  }
  .mobile-brand .brand > div:not(.brand-mark) {
    display: none;
  }
  .main {
    padding: 25px 18px 30px;
  }
  .borrower-heading h1 {
    font-size: 29px;
  }
  .borrower-heading {
    margin-bottom: 22px;
  }
  .borrower-summary {
    padding: 25px;
    border-radius: 18px;
  }
  .summary-amount {
    font-size: clamp(32px, 9vw, 42px);
  }
  .summary-foot {
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
  }
  .summary-stats {
    gap: 14px;
  }
  .summary-stats > div + div {
    padding-left: 14px;
  }
  .summary-stats strong {
    font-size: 19px;
    overflow-wrap: anywhere;
  }
  .borrower-layout,
  .borrower-loan-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .borrower-next {
    display: block;
    padding: 23px;
    border-radius: 17px;
  }
  .borrower-next > button,
  .borrower-next > .primary {
    margin-top: 20px;
  }
  .borrower-next h2 {
    margin-bottom: 13px;
  }
  .borrower-loan-card {
    padding: 22px;
  }
  .borrower-loan-card .loan-card-footer {
    flex-wrap: wrap;
  }
  .history-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .history-row > .badge {
    margin-left: 48px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 17px 14px;
  }
  .stat-top {
    font-size: 11px;
    gap: 8px;
    align-items: flex-start;
  }
  .stat-icon {
    padding: 5px;
  }
  .stat-icon .icon {
    width: 16px;
    height: 16px;
  }
  .stat-value {
    font-size: clamp(21px, 5.7vw, 29px);
    letter-spacing: -0.8px;
    overflow-wrap: anywhere;
  }
  .stat-note {
    font-size: 11px;
    line-height: 1.6;
  }
  .panel-header {
    padding: 20px;
  }
  .panel-body {
    padding: 0 20px 21px;
  }
  .due-item {
    padding-inline: 20px;
  }
  .line {
    flex-wrap: wrap;
  }
  .health-item {
    gap: 10px;
    flex-wrap: wrap;
  }
  .health-item > .badge {
    margin-left: 46px;
  }
  .health-item .detail {
    min-width: calc(100% - 50px);
  }
  .data-list div {
    gap: 12px;
    font-size: 13px;
  }
  .data-list dt {
    flex-basis: 42%;
    flex-shrink: 0;
  }
  .data-list dd {
    max-width: 56%;
  }
  .document-row .line {
    align-items: flex-start;
  }
  .document-row strong,
  .history-meta strong,
  .history-meta small {
    overflow-wrap: anywhere;
  }
  .document-row small {
    font-size: 12px;
    color: var(--muted);
  }
  .integration-card {
    padding: 22px;
  }
  .integration-card p {
    font-size: 14px;
    min-height: 0;
  }
  .integration-card .provider {
    font-size: 13px;
  }
  .integration-card code {
    font-size: 12px;
  }
  .actions > button {
    flex: 1;
  }
  .auth-shell {
    padding: 20px;
  }
  .auth-card {
    padding: 29px 23px;
  }
  .auth-card button {
    min-height: 48px;
    font-size: 14px;
  }
}
@media (max-width: 360px) {
  .auth-form-panel {
    padding-inline: 21px;
  }
  .auth-intro h1 {
    font-size: 27px;
  }
  .auth-mobile-brand {
    margin-bottom: 29px;
  }
  .auth-divider {
    gap: 10px;
  }
  .topbar {
    padding-inline: 12px;
    gap: 7px;
  }
  .role-switch button {
    padding-inline: 8px;
  }
  .mobile-brand .brand-mark {
    width: 32px;
    height: 36px;
  }
  .main {
    padding-inline: 14px;
  }
  .borrower-summary,
  .borrower-next,
  .borrower-loan-card {
    padding: 21px;
  }
  .stat-icon {
    display: none;
  }
  .portfolio-table tbody {
    padding-inline: 14px;
  }
  .portfolio-table tr {
    padding-inline: 13px;
  }
  .summary-stats strong {
    font-size: 18px;
  }
  .panel-header,
  .panel-body {
    padding-inline: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.contact-name-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 14px;
}
.contact-name-grid .field:last-child {
  grid-column: 1 / -1;
}
.contact-help {
  margin: -6px 0 20px;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 380px) {
  .contact-name-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Purple identity with black accents and a readable full logo on every screen. */
.sidebar {
  background: #17131f;
}
.nav button.selected {
  background: #7c3aed;
  color: #fff;
}
.primary:hover:not(:disabled) {
  background: #5b21b6;
}
.auth-brand-panel {
  background: linear-gradient(155deg, #321452 0%, #17131f 70%, #0e0c12 100%);
}
.borrower-summary {
  background: linear-gradient(125deg, #17131f, #39205b);
  border-color: #4c2877;
}
.brand {
  display: block;
  padding: 0 0 30px;
}
.brand-art {
  /* Show the original wordmark; the tiny raster captions are replaced by readable text. */
  display: block;
  position: relative;
  aspect-ratio: 1774 / 410;
  overflow: hidden;
}
.brand-logo {
  display: block;
  position: absolute;
  top: -42.6829268%; /* Crop starts at y=175 in the original 1774x887 artwork. */
  left: 0;
  width: 100%;
  height: auto;
  background: transparent;
  filter: none;
}
.brand-caption {
  display: grid;
  gap: 1px;
  margin-top: 7px;
  color: #686170;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0;
  text-align: center;
}
.brand-motto,
.brand-website {
  display: block;
  white-space: nowrap;
}
html[data-theme='dark'] .brand-logo,
.sidebar .brand-logo,
.auth-brand-panel .brand-logo {
  filter: invert(1) hue-rotate(180deg);
}
html[data-theme='dark'] .brand-caption,
.sidebar .brand-caption,
.auth-brand-panel .brand-caption {
  color: #c9bfd8;
}
.sidebar .brand {
  width: 100%;
  padding: 0 0 30px;
}
.auth-brand-panel .brand {
  width: min(100%, 360px);
  padding: 0;
}
.auth-card .brand {
  max-width: 280px;
  margin-bottom: 24px;
}
.auth-mobile-brand .brand {
  max-width: 300px;
  margin: 0 auto;
}
.auth-brand-panel .brand-caption,
.auth-card .brand-caption {
  margin-top: 10px;
  font-size: 12px;
}
@media (max-width: 900px) {
  .sidebar .brand {
    margin-top: 46px;
  }
  .mobile-brand .brand {
    padding: 0;
    width: clamp(115px, 33vw, 170px);
  }
  .mobile-brand .brand-caption {
    margin-top: 4px;
    font-size: 10px;
  }
}

/* Theme controls remain available before and after sign-in. */
.theme-toggle,
.auth-card .theme-toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  flex-shrink: 0;
  white-space: nowrap;
  background: var(--surface);
  color: var(--heading);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.4;
}
.theme-toggle .icon {
  width: 18px;
  height: 18px;
}
.theme-toggle:hover:not(:disabled) {
  background: var(--control-hover);
}
.auth-theme-controls {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 420px;
  margin: 0 0 24px;
}

/* Semantic dark surfaces preserve the purple identity and readable status colors. */
html[data-theme='dark'] {
  color-scheme: dark;
  --text: #eee9f5;
  --canvas: #100d16;
  --surface: #1b1624;
  --surface-raised: #231c2e;
  --control-hover: #30263e;
  --heading: #f5f0fb;
  --muted: #b5aabd;
  --line: #3b3048;
  --soft: #2b203a;
  --accent-text: #ccb0fa;
  --focus: #ba92f4;
  --amber: #efc280;
  --shadow: 0 6px 22px #00000026;
}
html[data-theme='dark'] a {
  color: var(--accent-text);
}
html[data-theme='dark'] :is(h1, h2, h3) {
  color: var(--heading);
}
html[data-theme='dark'] :is(button, input, select, textarea) {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
html[data-theme='dark'] button:hover:not(:disabled) {
  background-color: var(--control-hover);
}
html[data-theme='dark'] :is(button, a, input, select, textarea):focus-visible {
  outline-color: var(--focus);
}
html[data-theme='dark'] :is(input, select, textarea):focus {
  outline-color: var(--focus);
  border-color: var(--focus);
}
html[data-theme='dark'] :is(input, textarea)::placeholder {
  color: #a99db5;
  opacity: 1;
}
html[data-theme='dark'] input:autofill {
  box-shadow: 0 0 0 1000px var(--surface-raised) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}
html[data-theme='dark'] .primary,
html[data-theme='dark'] .nav button.selected {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
html[data-theme='dark'] .primary:hover:not(:disabled),
html[data-theme='dark'] .nav button.selected:hover:not(:disabled) {
  background: #6d28d9;
}
html[data-theme='dark'] :is(.quiet, .open-loan, .role-switch button, .nav button) {
  background: transparent;
}
html[data-theme='dark'] .sidebar {
  background: #130f1b;
  border-right: 1px solid var(--line);
}
html[data-theme='dark'] .nav button {
  color: #c4b8d3;
}
html[data-theme='dark'] .nav button.active {
  background: #352447;
  color: #eadbff;
}
html[data-theme='dark'] .nav button.selected {
  background: var(--purple);
  color: #fff;
}
html[data-theme='dark'] :is(.nav-label, .profile small, .draft-card p) {
  color: var(--muted);
}
html[data-theme='dark'] .topbar {
  background: #17121ff5;
}
html[data-theme='dark']
  :is(
    .stat,
    .panel,
    .integration-card,
    .borrower-next,
    .borrower-loan-card,
    .role-switch,
    .borrower-results,
    .auth-card
  ) {
  background: var(--surface);
  border-color: var(--line);
}
html[data-theme='dark']
  :is(
    .breadcrumb,
    .demo-label,
    .date,
    .eyebrow,
    .stat-top,
    th,
    td small,
    .line small,
    .vehicle-mini,
    .due-date,
    .bottom-note,
    .integration-card p,
    .integration-card .provider,
    .integration-card code,
    .borrower-results span,
    .field label,
    .empty,
    .upload-area p,
    .auth-intro .subheading,
    .auth-divider,
    .auth-switch,
    .auth-security-note,
    .auth-footer,
    .footer,
    .count,
    .loading,
    .document-row small,
    .next-payment-date
  ) {
  color: var(--muted);
}
html[data-theme='dark']
  :is(
    .breadcrumb strong,
    .next-payment-amount,
    .loan-card-meta strong,
    .loan-card-footer strong,
    .auth-card .brand,
    .mobile-brand .brand strong,
    .auth-card .field label
  ) {
  color: var(--heading);
}
html[data-theme='dark']
  :is(
    .stat-note.positive,
    .panel-header .text-link,
    .section-heading button,
    .auth-intro .eyebrow,
    .auth-mobile-brand .brand small,
    .mobile-brand .brand small
  ) {
  color: var(--accent-text);
}
html[data-theme='dark']
  :is(
    .stat-icon,
    .health-icon,
    .integration-card .service-symbol,
    .loan-card-top > .icon,
    .loan-card-icon,
    .loan-card-top > .health-icon,
    .history-row > .icon,
    .avatar,
    .borrower-cell .avatar
  ) {
  background: var(--soft);
  color: var(--accent-text);
}
html[data-theme='dark']
  :is(
    th,
    td,
    .due-item + .due-item,
    .health-item,
    .integration-card .provider,
    .data-list div,
    .auth-security-note
  ) {
  border-color: var(--line);
}
html[data-theme='dark'] th {
  background: var(--surface-raised);
}
html[data-theme='dark'] :is(.preview-banner, .auth-status.success) {
  background: #2b213b;
  border-color: #514064;
  color: #dfc9ff;
}
html[data-theme='dark'] .preview-banner .tag {
  background: #423055;
  color: #eadbff;
}
html[data-theme='dark'] .preview-banner button {
  background: transparent;
  color: #dfc9ff;
}
html[data-theme='dark'] .badge {
  background: #352447;
  color: #e0c6ff;
}
html[data-theme='dark'] .badge.amber,
html[data-theme='dark'] .notice {
  background: #35291b;
  border-color: #604c2e;
  color: #f0c68d;
}
html[data-theme='dark'] .badge.gray {
  background: #322b3b;
  color: #d0c6db;
}
html[data-theme='dark'] :is(.badge.red, .error, .auth-status:not(.success)) {
  background: #3b232a;
  border-color: #6b3d46;
  color: #ffb4af;
}
html[data-theme='dark'] .progress {
  background: #3a2d4a;
}
html[data-theme='dark'] .progress i {
  background: #ac82e6;
}
html[data-theme='dark'] .borrower-results button[aria-selected='true'],
html[data-theme='dark'] .borrower-results button:hover,
html[data-theme='dark'] .borrower-results button:focus-visible {
  background: #352447;
  outline-color: var(--focus);
}
html[data-theme='dark'] .role-switch button.selected {
  background: #352447;
  color: #eadbff;
}
html[data-theme='dark'] .toast {
  background: #352447;
  color: #f5edff;
  border: 1px solid #6c4b8b;
  box-shadow: 0 8px 35px #00000055;
}
html[data-theme='dark'] .telemetry-scene {
  border-color: var(--line);
  background:
    repeating-linear-gradient(0deg, transparent 0 37px, #3b3048 38px 40px),
    repeating-linear-gradient(90deg, #261e31 0 47px, #3b3048 48px 51px);
}
html[data-theme='dark'] .telemetry-scene::after {
  background: #483956;
  border-color: #665277;
}
html[data-theme='dark'] .telemetry-pin {
  background: #6d28d9;
  box-shadow: 0 0 0 10px #9a6cce33;
}
html[data-theme='dark'] .telemetry-caption {
  background: #1b1624ed;
  color: #d7c9e5;
}
html[data-theme='dark'] .upload-area {
  background: var(--surface-raised);
  border-color: #6d5a81;
}
html[data-theme='dark'] .auth-shell {
  background: radial-gradient(ellipse at top, #271b38 0, #100d16 75%);
}
html[data-theme='dark'] .auth-shell.auth-branded {
  background: var(--canvas);
}
html[data-theme='dark'] .auth-form-panel .auth-card {
  background: transparent;
}
html[data-theme='dark'] .auth-card .google-signin {
  background: var(--surface-raised);
  color: var(--heading);
  border-color: #51405f;
}
html[data-theme='dark'] .auth-card .google-signin:hover:not(:disabled) {
  background: var(--control-hover);
  border-color: #856a9f;
}
html[data-theme='dark'] .auth-divider::before,
html[data-theme='dark'] .auth-divider::after {
  background: var(--line);
}
html[data-theme='dark'] .auth-card .password-toggle,
html[data-theme='dark'] .auth-card .auth-switch button,
html[data-theme='dark'] .auth-card button.auth-switch {
  color: var(--accent-text);
  background: transparent;
}
html[data-theme='dark'] .auth-card .password-toggle:hover:not(:disabled),
html[data-theme='dark'] .auth-card .auth-switch button:hover:not(:disabled),
html[data-theme='dark'] .auth-card button.auth-switch:hover:not(:disabled) {
  background: var(--control-hover);
}
html[data-theme='dark'] .theme-toggle {
  color: var(--accent-text);
}
html[data-theme='dark'] ::selection {
  background: #7345a2;
  color: #fff;
}
@media (max-width: 900px) {
  html[data-theme='dark'] .borrower-shell .mobile-nav {
    background: #1b1624f5;
    border-color: var(--line);
    box-shadow: 0 -6px 24px #00000033;
  }
  html[data-theme='dark'] .mobile-nav button {
    background: transparent;
    color: var(--muted);
  }
  html[data-theme='dark'] .mobile-nav button.active,
  html[data-theme='dark'] .mobile-nav button[aria-current='page'] {
    background: #352447;
    color: #e0c6ff;
  }
  html[data-theme='dark'] .menu-toggle,
  html[data-theme='dark'] .drawer-close {
    background: var(--surface-raised);
    color: var(--heading);
    border-color: var(--line);
  }
  html[data-theme='dark'] .nav-backdrop,
  html[data-theme='dark'] .nav-backdrop:hover:not(:disabled) {
    background: #00000099;
  }
  html[data-theme='dark'] .portfolio-table tr {
    background: var(--surface-raised);
    border-color: var(--line);
  }
  html[data-theme='dark'] .portfolio-table td:not(:first-child)::before {
    color: var(--muted);
  }
}
@media (max-width: 600px) {
  .top-actions,
  .topbar-actions {
    gap: 8px;
  }
  .top-actions .theme-toggle,
  .topbar-actions .theme-toggle {
    padding-inline: 10px;
  }
  .top-actions .theme-toggle span,
  .topbar-actions .theme-toggle span {
    display: none;
  }
}

/* Administrator repayment reporting. */
.paperwork-shell {
  padding: 36px 20px;
  align-items: flex-start;
}
.paperwork-shell .paperwork-card {
  width: min(100%, 780px);
  max-width: 780px;
  padding: 36px;
}
.paperwork-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.paperwork-top .brand {
  max-width: 250px;
  margin: 0;
}
.paperwork-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.paperwork-tools .theme-toggle span {
  display: none;
}
.paperwork-notice {
  margin-bottom: 24px;
}
.paperwork-fields {
  min-width: 0;
  padding: 0;
  border: 0;
  margin: 0;
}
.paperwork-fields legend {
  padding: 0;
  font-weight: 700;
  font-size: 18px;
  color: var(--heading);
}
.paperwork-fields + .paperwork-fields {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.paperwork-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
}
.paperwork-option input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  margin-top: 2px;
  accent-color: var(--purple);
}
.paperwork-conditional {
  padding: 20px 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  margin-bottom: 20px;
}
.paperwork-draft-card {
  margin: 20px 0 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}
.paperwork-draft-link {
  display: inline-block;
  color: var(--purple);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  text-underline-offset: 3px;
}
.paperwork-draft-link span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.paperwork-draft-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.paperwork-address-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 16px;
}
.paperwork-certification {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin: 24px 0;
  cursor: pointer;
}
.paperwork-certification input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  padding: 0;
  margin-top: 2px;
  accent-color: var(--purple);
}

button.danger-outline,
html[data-theme='dark'] button.danger-outline {
  color: #b53648;
  border-color: #d6a2aa;
  background: var(--surface);
}
html[data-theme='dark'] button.danger-outline {
  color: #ffafbb;
  border-color: #a85161;
}
button.danger,
html[data-theme='dark'] button.danger {
  background: #a72b40;
  border-color: #a72b40;
  color: #fff;
}
button.danger:hover:not(:disabled),
html[data-theme='dark'] button.danger:hover:not(:disabled) {
  background: #872034;
  border-color: #872034;
}
.delete-loan-panel {
  border-color: #d6a2aa;
  margin-bottom: 24px;
}
html[data-theme='dark'] .delete-loan-panel {
  border-color: #a85161;
}
.delete-loan-panel h2 {
  margin-top: 0;
}
.delete-loan-panel p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.delete-loan-target strong,
.delete-loan-target span {
  display: block;
  overflow-wrap: anywhere;
}
.delete-loan-target strong {
  color: var(--heading);
}
#delete-loan-form {
  max-width: 420px;
  margin-top: 20px;
}
#delete-loan-error {
  color: #a04438;
}
html[data-theme='dark'] #delete-loan-error {
  color: #ffbcc6;
}
.paperwork-submissions {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}
.paperwork-submission {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  text-align: left;
  padding: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
}
.paperwork-submission > span {
  min-width: 0;
}
.paperwork-submission strong,
.paperwork-submission small {
  display: block;
  overflow-wrap: anywhere;
}
.paperwork-submission small {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.paperwork-overview {
  max-width: 840px;
  margin: 24px auto 0;
}
.paperwork-overview h2 {
  line-height: 1.4;
  font-size: 24px;
}
.paperwork-overview h3 {
  margin-top: 28px;
  color: var(--heading);
}
.paperwork-details {
  margin: 12px 0 24px;
}
.paperwork-details > div {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.paperwork-details dt {
  color: var(--muted);
  font-size: 13px;
}
.paperwork-details dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.footer > button {
  font-size: 12px;
}
@media (max-width: 600px) {
  .paperwork-shell {
    padding: 12px;
  }
  .paperwork-shell .paperwork-card {
    padding: 24px 18px;
    border-radius: 16px;
  }
  .paperwork-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
  }
  .paperwork-top .brand {
    max-width: 230px;
  }
  .paperwork-tools {
    width: 100%;
    justify-content: space-between;
  }
  .paperwork-address-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 12px;
  }
  .paperwork-address-grid .field:first-child {
    grid-column: 1 / -1;
  }
  .paperwork-conditional {
    padding: 16px 12px 0;
  }
  .paperwork-submission {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .paperwork-details > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .paperwork-overview h2 {
    font-size: 20px;
  }
}
.income-filter {
  display: grid;
  gap: 6px;
  min-width: 190px;
}
.income-filter label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.income-filter input {
  min-height: 44px;
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
.income-stats .stat-value {
  font-size: clamp(22px, 2.2vw, 32px);
  overflow-wrap: anywhere;
}
.income-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
}
.income-grid > .panel {
  min-width: 0;
}
.income-trend {
  display: grid;
  gap: 19px;
}
.income-trend-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}
.income-trend-label span {
  color: var(--muted);
}
.income-trend-label strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.income-track {
  margin-top: 8px;
  height: 7px;
  border-radius: 10px;
  background: var(--soft);
  overflow: hidden;
}
.income-track span {
  display: block;
  height: 100%;
  background: var(--purple);
  border-radius: inherit;
}
.income-total-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.income-lifetime {
  display: block;
  margin-top: 8px;
  font-family: Manrope, sans-serif;
  font-size: 32px;
  letter-spacing: -1px;
  overflow-wrap: anywhere;
}
.income-explanation p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.income-explanation .status-note {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 20px;
}
.income-payments {
  width: 100%;
}
.income-payments .open-loan {
  text-align: left;
  max-width: 100%;
}
.income-payments .open-loan small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.income-payments td {
  overflow-wrap: anywhere;
}
.income-payments .income-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .income-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
@media (max-width: 600px) {
  .income-page .page-heading {
    display: grid;
    gap: 18px;
  }
  .income-filter {
    width: 100%;
  }
  .income-stats {
    gap: 10px;
  }
  .income-stats .stat {
    padding: 14px;
  }
  .income-stats .stat-value {
    font-size: 22px;
  }
  .income-stats .stat-icon {
    display: none;
  }
  .income-payments thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .income-payments tbody {
    display: block;
    padding: 0 16px 16px;
  }
  .income-payments tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-top: 12px;
    padding: 6px 14px;
    background: var(--surface-raised);
  }
  .income-payments td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border: 0;
    white-space: normal;
  }
  .income-payments td:first-child {
    border-bottom: 1px solid var(--line);
    margin-bottom: 5px;
  }
  .income-payments td:not(:first-child)::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
  }
  .income-payments td:last-child {
    flex-wrap: wrap;
  }
}
