:root {
  font-family: "DM Sans", sans-serif;
  color: #202b29;
  background: #f6f7f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #202b29;
  --muted: #7b8580;
  --green: #286d59;
  --green-dark: #132b2a;
  --line: #e9ece7;
  --paper: #fff;
  --amber: #c98935;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, .95fr) 1.05fr; background: #fff; }
.auth-story { min-height: 100vh; padding: 38px clamp(34px, 6.5vw, 104px); display: flex; flex-direction: column; justify-content: space-between; color: #f7f6ef; background: radial-gradient(ellipse at 14% 78%, rgba(43, 117, 91, .42), transparent 42%), #132b2a; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; font: 800 19px Manrope, sans-serif; letter-spacing: -.8px; text-decoration: none; }
.brand-light { color: #fff; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #bde5cd; color: #183a31; font: 800 19px Manrope, sans-serif; }
.story-content { max-width: 520px; margin: 70px 0; }
.eyebrow { color: #85908a; font: 700 10px "DM Sans", sans-serif; letter-spacing: 1.45px; }
.auth-story .eyebrow { color: #a1c6b0; }
.story-content h1 { margin: 21px 0 19px; font: 600 clamp(42px, 5vw, 65px)/1.1 Manrope, sans-serif; letter-spacing: -3.5px; }
.story-content h1 em { color: #bde5cd; font-style: normal; }
.story-content > p { max-width: 410px; color: #bdc8c1; font-size: 15px; line-height: 1.8; }
.story-note { display: flex; align-items: center; gap: 11px; margin-top: 18px; color: #d7dfd9; font-size: 13px; }
.note-check { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: #c8e7d1; background: rgba(189, 229, 205, .13); font-size: 12px; }
.story-footer { color: #8c9d96; font-size: 11px; }
.auth-panel { display: grid; place-items: center; padding: 48px 28px; }
.auth-card { width: min(100%, 400px); }
.auth-card h2 { margin: 15px 0 6px; font: 700 29px Manrope, sans-serif; letter-spacing: -1.25px; }
.muted, .auth-card > .muted { color: var(--muted); }
.auth-card > .muted { margin: 0 0 29px; font-size: 13px; }
.auth-card form { display: grid; gap: 9px; }
.auth-card label, .modal-form label { margin-top: 7px; font-size: 12px; font-weight: 600; }
.auth-card input, .modal-form input, .modal-form select { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #dfe4df; border-radius: 8px; outline: none; background: #fff; color: var(--ink); font-size: 13px; transition: border-color .15s, box-shadow .15s; }
.auth-card input:focus, .modal-form input:focus, .modal-form select:focus { border-color: #629782; box-shadow: 0 0 0 3px rgba(40, 109, 89, .1); }
.auth-card input::placeholder, .modal-form input::placeholder { color: #a6aea9; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 60px; }
.text-button { padding: 0; border: 0; background: none; color: var(--green); font-size: 12px; font-weight: 700; }
.password-wrap .text-button { position: absolute; top: 15px; right: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 43px; padding: 0 17px; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { margin-top: 13px; background: var(--green); color: white; }
.button-primary:hover { background: #205b49; }
.button-wide { width: 100%; }
.button-dark { background: var(--green-dark); color: #fff; }
.button-dark:hover { background: #24423c; }
.button .plus { font-size: 19px; font-weight: 400; }
.auth-switch { margin: 20px 0; color: #848d88; text-align: center; font-size: 12px; }
.auth-switch .text-button { margin-left: 3px; }
.demo-box { display: flex; gap: 12px; padding: 13px; border: 1px solid #e7ece6; border-radius: 9px; background: #f7f9f6; color: #718078; font-size: 11px; line-height: 1.7; }
.demo-box strong { color: #34443c; font-size: 11px; }
.demo-icon { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 7px; background: #e6f2e9; color: #398261; }
.demo-separator { margin: 0 3px; }
.prototype-note { margin: 16px 0 0; color: #9ca49f; text-align: center; font-size: 10px; }
.form-error { min-height: 14px; margin: 2px 0 0; color: #ae4545; font-size: 11px; }
.form-error.notice-success { color: #39765c; line-height: 1.5; }

.app-layout { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 4; display: flex; flex-direction: column; width: 246px; padding: 26px 17px 16px; background: #142d2b; color: #f5f7f4; }
.sidebar-brand { margin: 0 0 49px 7px; }
.nav-caption { margin: 0 0 13px 10px; color: #778e85; font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.main-nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 13px; min-height: 42px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: #a8b8b0; text-align: left; font-size: 12px; transition: .15s; }
.nav-link:hover, .nav-link.active { background: #24413a; color: #f7fff9; }
.nav-link.active { box-shadow: inset 2px 0 #a4d6b6; }
.nav-icon { width: 17px; color: #8db09b; font-size: 16px; text-align: center; }
.nav-count { display: grid; place-items: center; min-width: 18px; height: 18px; margin-left: auto; border-radius: 20px; background: #cb8e44; color: #fff; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.help-card { margin: 0 2px 15px; padding: 14px; border: 1px solid rgba(219, 236, 224, .1); border-radius: 9px; background: rgba(255,255,255,.035); }
.help-sparkle { color: #c3dfca; font-size: 16px; }
.help-card strong { display: block; margin: 8px 0 4px; font-size: 11px; }
.help-card p { margin: 0; color: #98aba1; font-size: 10px; line-height: 1.6; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 13px 6px 0; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 auto; border-radius: 50%; background: #d4e9d7; color: #27664f; font: 700 12px Manrope, sans-serif; }
.sidebar-user-info { display: grid; gap: 3px; min-width: 0; }
.sidebar-user-info strong { overflow: hidden; color: #f0f5f1; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-info span { color: #91a49a; font-size: 10px; }
.icon-button { display: grid; place-items: center; border: 0; background: transparent; }
.sign-out { width: 29px; height: 29px; margin-left: auto; color: #a7b6ae; font-size: 18px; }
.workspace { min-height: 100vh; margin-left: 246px; }
.topbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 0 39px; border-bottom: 1px solid #eceeea; background: rgba(255,255,255,.93); backdrop-filter: blur(12px); }
.breadcrumbs { display: flex; align-items: center; gap: 11px; color: #9aa19d; font-size: 11px; }
.breadcrumbs strong { color: #35423d; font-weight: 600; }
.crumb-divider { color: #c8ceca; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.prototype-pill { display: flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 20px; background: #edf5ee; color: #4c7a5e; font-size: 10px; font-weight: 600; }
.prototype-pill span { width: 6px; height: 6px; border-radius: 50%; background: #62a273; }
.avatar-small { width: 30px; height: 30px; font-size: 11px; }
.main-content { max-width: 1300px; margin: 0 auto; padding: 36px 40px 18px; }
.view { display: none; }
.view.active { display: block; animation: fade-in .18s ease-out; }
@keyframes fade-in { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-heading h1 { margin: 8px 0 5px; font: 700 27px Manrope, sans-serif; letter-spacing: -1.2px; }
.page-heading p { margin: 0; font-size: 12px; }
.page-heading .button { flex: 0 0 auto; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 18px; }
.overview-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-metrics.member-overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.overview-metrics.member-overview-metrics #metric-balance-card { order: -1; }
.overview-metrics.admin-overview-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { min-width: 0; padding: 16px 16px 14px; border: 1px solid #e9ece7; border-radius: 10px; background: #fff; }
.balance-card { background: #1d4940; border-color: #1d4940; color: white; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #77817c; font-size: 11px; font-weight: 500; }
.balance-card .metric-top, .balance-card .metric-foot { color: #c3d9ce; }
.metric-card > strong { display: block; overflow: hidden; margin: 15px 0 10px; font: 700 25px Manrope, sans-serif; letter-spacing: -1px; text-overflow: ellipsis; white-space: nowrap; }
.metric-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: #f0f4f0; color: #678072; font-size: 16px; }
.green-icon { background: #edf5ee; color: #4c8a63; }
.amber-icon { background: #fbf2e6; color: #bd8137; }
.balance-card .metric-icon { background: rgba(225,245,231,.13); color: #bfe3ca; }
.metric-foot { display: flex; align-items: center; gap: 6px; color: #8a938e; font-size: 10px; }
.metric-dot { width: 6px; height: 6px; border-radius: 50%; background: #a9d3b4; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(265px, .9fr); gap: 15px; margin-bottom: 15px; }
.surface { border: 1px solid #e9ece7; border-radius: 10px; background: #fff; }
.loan-overview, .upcoming-card, .activity-card, .loans-page-surface, .approvals-surface { padding: 18px 19px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.section-heading h2 { margin: 0 0 5px; font: 700 14px Manrope, sans-serif; letter-spacing: -.35px; }
.section-heading p { margin: 0; color: #909993; font-size: 10px; }
.link-button { padding: 4px 0; border: 0; background: none; color: #39765c; font-size: 10px; font-weight: 700; white-space: nowrap; }
.link-button span { margin-left: 5px; font-size: 13px; }
.loan-list { display: grid; gap: 18px; margin-top: 21px; }
.loan-row { display: grid; grid-template-columns: minmax(125px, 1.1fr) minmax(90px, 1fr) auto; align-items: center; gap: 15px; }
.loan-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lender-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; overflow: visible; border-radius: 10px; background: #edf4ee; color: #4b8663; font-size: 22px; line-height: 1; }
.lender-icon.amber { background: #faf1e5; color: #ba813a; }
.lender-icon.blue { background: #edf2f8; color: #6180aa; }
.loan-type-home { background: #edf4ee; color: #4b8663; }
.loan-type-vehicle { background: #edf2f8; color: #6180aa; }
.loan-type-education { background: #f2eef8; color: #8065a7; }
.loan-type-business { background: #faf1e5; color: #ba813a; }
.loan-type-gold { background: #fbf5df; color: #a58a36; }
.loan-type-farm { background: #edf5e9; color: #668b48; }
.loan-type-travel { background: #eaf4f7; color: #50869a; }
.loan-type-personal { background: #f2f0f6; color: #786a91; }
.loan-identity strong { display: block; overflow: hidden; max-width: 135px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.loan-identity span { display: block; margin-top: 3px; color: #989f9a; font-size: 9px; }
.progress-wrap { display: grid; gap: 6px; }
.progress-label { display: flex; justify-content: space-between; gap: 6px; color: #8d9690; font-size: 9px; }
.progress-label strong { color: #54635b; font-weight: 600; }
.progress-track { height: 5px; overflow: hidden; border-radius: 5px; background: #edf0ec; }
.progress-bar { height: 100%; border-radius: inherit; background: #75b78b; }
.loan-balance { text-align: right; white-space: nowrap; }
.loan-balance strong { display: block; font: 700 12px Manrope, sans-serif; }
.loan-balance span { display: block; margin-top: 3px; color: #98a09b; font-size: 9px; }
.empty-state { padding: 26px 15px; color: #87928b; text-align: center; font-size: 11px; line-height: 1.7; }
.empty-state .empty-symbol { display: block; margin-bottom: 8px; color: #6ca27b; font-size: 24px; }
.calendar-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; background: #f6f3eb; color: #bc904f; }
.upcoming-list { display: grid; gap: 3px; margin-top: 15px; }
.upcoming-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid #f0f1ef; }
.upcoming-item:last-child { border: 0; }
.date-block { display: grid; place-items: center; width: 38px; height: 42px; flex: 0 0 38px; border-radius: 8px; background: #f4f6f2; }
.date-block span { color: #8d9690; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.date-block strong { margin-top: -5px; font: 700 16px Manrope, sans-serif; }
.upcoming-info { min-width: 0; flex: 1; }
.upcoming-info strong { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 10px; }
.upcoming-info strong > span { display: block; min-width: 0; margin: 0; overflow: hidden; color: inherit; font-size: inherit; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-info .lender-icon { width: 30px; height: 30px; flex-basis: 30px; border-radius: 7px; font-size: 17px; }
.upcoming-info span { display: block; margin-top: 4px; color: #949d97; font-size: 9px; }
.upcoming-amount { font: 700 11px Manrope, sans-serif; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 20px; background: #eff6ef; color: #56815f; font-size: 9px; font-weight: 600; }
.status-pill.due-soon { background: #fbf3e8; color: #ad7832; }
.status-pill.overdue { background: #faeded; color: #b55454; }
.activity-card { margin-top: 0; }
.activity-card > .section-heading { margin-bottom: 14px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 9px 10px; border-bottom: 1px solid #edf0ec; color: #939c96; font-size: 9px; font-weight: 600; }
.data-table td { padding: 12px 10px; border-bottom: 1px solid #f1f2f0; color: #47534c; font-size: 10px; }
.data-table tr:last-child td { border-bottom: 0; }
.table-loan { display: flex; align-items: center; gap: 8px; min-width: 130px; color: #34443b; font-weight: 600; }
.table-mini-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; background: #eef5ef; color: #58876a; }
.interest-paid { color: #45805b; font-weight: 600; }
.interest-due { color: #ad7832; font-weight: 600; }
.payment-amount { color: #3e805b !important; font-weight: 700; white-space: nowrap; }
.page-footer { padding: 23px 3px 5px; color: #9aa29d; font-size: 9px; text-align: center; }
.reminder-banner { display: flex; align-items: center; gap: 10px; margin: -7px 0 16px; padding: 12px 14px; border: 1px solid #f1dfbf; border-radius: 8px; background: #fff8eb; color: #845f2f; font-size: 11px; line-height: 1.5; }
.reminder-banner.overdue-banner { border-color: #efd1d1; background: #fff4f4; color: #9d4b4b; }
.reminder-banner strong { color: inherit; }
.loans-page-surface { padding-bottom: 5px; }
.loan-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 17px; }
.loan-card { padding: 16px; border: 1px solid #edf0ec; border-radius: 9px; }
.loan-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.loan-card .loan-identity strong { max-width: 230px; font-size: 12px; }
.loan-card-balance { margin: 20px 0 3px; font: 700 23px Manrope, sans-serif; letter-spacing: -.6px; }
.loan-card-sub { color: #8d9790; font-size: 10px; }
.loan-card-progress { margin-top: 16px; }
.loan-card-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; color: #7e8982; font-size: 10px; }
.loan-card-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #eff1ee; }
.member-loan-list { display: grid; gap: 13px; margin-top: 17px; }
.member-loan-group { padding: 15px; border: 1px solid #edf0ec; border-radius: 9px; }
.member-group-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #eff1ee; }
.member-group-heading > div:nth-child(2) { display: grid; min-width: 0; gap: 4px; }
.member-group-heading strong { overflow: hidden; color: #34443b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-group-heading span { overflow: hidden; color: #929b95; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-group-heading .member-loan-total { margin-left: auto; color: #5b8063; font-weight: 700; }
.member-delete-button { padding: 6px 9px; border: 1px solid #efd1d1; border-radius: 6px; background: #fff8f8; color: #a44747; font-size: 9px; font-weight: 600; white-space: nowrap; }
.member-delete-button:disabled { opacity: .5; cursor: not-allowed; }
.member-loan-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 12px; }
.member-loan-card { min-width: 0; padding: 12px; border: 1px solid #f0f2ef; border-radius: 8px; background: #fcfdfb; }
.member-loan-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.member-loan-heading > div { display: grid; min-width: 0; gap: 4px; }
.member-loan-heading strong { overflow: hidden; color: #34443b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.member-loan-heading > div span { overflow: hidden; color: #929b95; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-loan-balance { margin-top: 13px; color: #263b32; font: 700 19px Manrope, sans-serif; letter-spacing: -.5px; }
.member-loan-balance > span { color: #929b95; font: 400 9px "DM Sans", sans-serif; letter-spacing: 0; }
.member-loan-details { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 10px; color: #758078; font-size: 9px; }
.member-loan-payment { display: grid; gap: 5px; margin-top: 11px; padding-top: 9px; border-top: 1px solid #edf0ec; color: #7b8780; font-size: 9px; }
.member-loan-payment strong { color: #3e805b; }
.small-action { padding: 5px 8px; border: 1px solid #e6ebe6; border-radius: 6px; background: #fff; color: #44775b; font-size: 9px; font-weight: 600; }
.payment-summary { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 500px; }
.payment-summary .metric-card > strong { font-size: 23px; }
.approvals-surface { max-width: 900px; }
.approval-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 0; border-bottom: 1px solid #eff1ee; }
.approval-row:last-child { border-bottom: 0; }
.application-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid #eff1ee; }
.application-row:last-child { border-bottom: 0; }
.application-main { min-width: 0; flex: 1; }
.application-title { display: flex; align-items: center; gap: 9px; }
.application-title > strong { overflow: hidden; color: #34443b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.application-applicant { margin-top: 6px; color: #59675f; font-size: 10px; font-weight: 600; }
.application-lender { margin-top: 5px; color: #929b95; font-size: 9px; }
.application-terms { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 10px; color: #6e7d73; font-size: 9px; }
.application-row .approval-actions { flex: 0 0 auto; }
.approval-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.approval-person .avatar { background: #f1eadc; color: #987b4b; }
.approval-person strong { display: block; font-size: 11px; }
.approval-person span { display: block; overflow: hidden; max-width: 240px; margin-top: 4px; color: #929b95; font-size: 9px; text-overflow: ellipsis; }
.approval-actions { display: flex; align-items: center; gap: 8px; }
.approve-button { padding: 8px 12px; border: 0; border-radius: 6px; background: #eaf4ec; color: #34714d; font-size: 10px; font-weight: 700; }
.reject-button { padding: 7px 10px; border: 1px solid #ebeded; border-radius: 6px; background: #fff; color: #89928c; font-size: 10px; }
.approval-info { display: flex; align-items: flex-start; gap: 11px; max-width: 900px; margin-top: 15px; padding: 13px; border: 1px solid #e6ece7; border-radius: 8px; background: #f4f8f4; color: #76847b; font-size: 10px; line-height: 1.6; }
.approval-info p { margin: 0; }
.approval-info strong { color: #45604d; }
.approval-info-icon { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; background: #e0ebe1; color: #5a8062; font-weight: 700; }
.toast { position: fixed; right: 24px; bottom: 23px; z-index: 10; padding: 12px 16px; border-radius: 8px; background: #1d4940; box-shadow: 0 5px 18px #142d2b33; color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; }
.toast.visible { opacity: 1; transform: none; }
.modal-layer { position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; padding: 15px; background: rgba(12, 30, 27, .46); }
.modal { width: min(100%, 460px); max-height: calc(100vh - 30px); overflow-y: auto; padding: 22px; border-radius: 13px; background: #fff; box-shadow: 0 20px 60px #0e29233b; animation: fade-in .15s ease-out; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 17px; }
.modal-head h2 { margin: 0 0 5px; font: 700 19px Manrope, sans-serif; letter-spacing: -.5px; }
.modal-head p { margin: 0; color: #8c9690; font-size: 10px; }
.modal-close { width: 29px; height: 29px; border-radius: 7px; background: #f3f5f2; color: #77827b; font-size: 17px; }
.modal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.modal-form label { grid-column: span 2; }
.modal-form input, .modal-form select { height: 41px; font-size: 11px; }
.payment-principal-fields { display: grid; grid-column: span 2; gap: 8px; }
.modal-form .field-half { grid-column: span 1; }
.modal-form .field-full { grid-column: span 2; }
.modal-form .field-hint { grid-column: span 2; margin: -1px 0 4px; color: #929b95; font-size: 9px; line-height: 1.5; }
.modal-form .form-error { grid-column: span 2; }
.modal-form .button { grid-column: span 2; margin-top: 7px; }
.menu-toggle { display: none; color: #526057; font-size: 16px; }

@media (max-width: 1000px) {
  .sidebar { width: 210px; }
  .workspace { margin-left: 210px; }
  .topbar { padding: 0 26px; }
  .main-content { padding: 29px 25px 15px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; padding: 36px 22px; }
  .auth-panel:before { content: "L"; display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 27px; border-radius: 10px; background: #d8eedc; color: #27664f; font: 800 21px Manrope,sans-serif; }
  .sidebar { width: 246px; transform: translateX(-100%); transition: transform .2s; box-shadow: 8px 0 20px transparent; }
  .sidebar.open { transform: none; box-shadow: 8px 0 25px #12252230; }
  .workspace { margin-left: 0; }
  .topbar { height: 57px; padding: 0 16px; }
  .menu-toggle { display: grid; }
  .breadcrumbs { margin-right: auto; margin-left: 12px; }
  .prototype-pill { padding: 6px; font-size: 0; }
  .prototype-pill span { width: 7px; height: 7px; }
  .topbar-right { gap: 9px; }
  .main-content { padding: 25px 16px 13px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 24px; }
  .page-heading .button { min-height: 38px; gap: 7px; padding: 0 10px; font-size: 10px; }
  .page-heading .button .plus { font-size: 16px; }
  .metric-grid { gap: 9px; }
  .overview-metrics.admin-overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { padding: 12px 11px; }
  .metric-card > strong { margin: 12px 0 7px; font-size: 20px; }
  .metric-top { font-size: 10px; }
  .metric-icon { width: 24px; height: 24px; }
  .metric-foot { font-size: 9px; }
  .loan-overview, .upcoming-card, .activity-card, .loans-page-surface, .approvals-surface { padding: 15px 13px; }
  .loan-row { grid-template-columns: minmax(110px,1.1fr) minmax(70px,.85fr) auto; gap: 8px; }
  .loan-identity { gap: 7px; }
  .lender-icon { width: 38px; height: 38px; flex-basis: 38px; font-size: 20px; }
  .upcoming-info .lender-icon { width: 30px; height: 30px; flex-basis: 30px; font-size: 17px; }
  .loan-identity strong { max-width: 90px; font-size: 10px; }
  .loan-identity span { font-size: 8px; }
  .loan-balance strong { font-size: 10px; }
  .loan-balance span, .progress-label { font-size: 8px; }
  .loan-cards { grid-template-columns: 1fr; }
  .data-table th, .data-table td { padding-right: 8px; padding-left: 5px; }
  .approval-person span { max-width: 140px; }
  .application-row { align-items: flex-start; flex-direction: column; gap: 11px; }
  .application-row .approval-actions { align-self: flex-end; }
  .application-terms { gap: 6px 12px; }
  .member-loan-cards { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .page-heading { gap: 9px; }
  .page-heading h1 { font-size: 21px; }
  .page-heading p { max-width: 220px; font-size: 10px; }
  .metric-card > strong { font-size: 18px; }
  .metric-top { font-size: 9px; }
  .loan-row { grid-template-columns: 1fr auto; }
  .loan-row .progress-wrap { grid-column: 1 / -1; grid-row: 2; }
  .loan-identity strong { max-width: 180px; }
}
