:root .qty-picker{display:flex;align-items:stretch;gap:8px;min-width:0}
.accountability-notice{position:sticky;top:0;z-index:3;display:grid;gap:3px;padding:12px clamp(14px,3vw,40px);border-bottom:1px solid #e5c36a;background:#fff7df;color:#654509;box-shadow:0 3px 12px #17263f14;overflow-wrap:anywhere}
.accountability-notice strong{font-size:13px;line-height:1.4}
.accountability-notice p{margin:0;font-size:13px;line-height:1.5}
@media(max-width:720px){.accountability-notice{padding:10px 14px}.accountability-notice p{font-size:12px}}
:root .qty-picker input{flex:1;min-width:0;text-align:center}
:root .qty-picker button{flex:none;width:44px;min-height:44px;border:1px solid #cbd7e8;border-radius:9px;background:#f1f6ff;color:#174eb5;font-size:22px;font-weight:700}
:root .qty-picker button:hover{background:#e2edff}
:root .qty-picker button:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
:root .metric-link{font:inherit;color:inherit;text-align:left;cursor:pointer}
:root .metric-link:hover{border-color:#93b4ee;box-shadow:0 8px 28px #2563eb18}
:root .metric-link:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
/* Mobile navigation can be dismissed without reaching the covered menu toggle. */
.sync-status{padding:10px 16px;font-size:12px;background:#eff6ff;color:#28547d;border-bottom:1px solid #dceaff;overflow-wrap:anywhere}
.sync-status[data-status="live"]{background:#ecfdf3;color:#166534}
.sync-status[data-status="paused"],.sync-status[data-status="demo"]{background:#fffbeb;color:#92400e}
.sync-status[data-status="error"],.sync-status[data-status="offline"]{background:#fef2f2;color:#b91c1c}
.menu-backdrop{display:none}
.menu-close{position:absolute;top:8px;right:8px;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:8px;background:#1d3a5d;color:#fff;font-size:28px}
@media(max-width:720px){
 .menu-backdrop{display:block;position:fixed;inset:0;z-index:4;border:0;background:#06152c80}
 #sidebar{height:100dvh;overflow-y:auto;padding-top:58px}
 body.menu-open{overflow:hidden}
}
:root{--bg:#f3f6fb;--card:#fff;--ink:#13243b;--muted:#697993;--line:#e2e8f0;--nav:#10243f;--primary:#2563eb;--shadow:0 10px 35px #1528460d;--radius:16px}*{box-sizing:border-box}body{margin:0;font:14px/1.45 Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.6;cursor:default}h1,h2,h3,h4,p{margin:0}h1{letter-spacing:-.04em}h2{font-size:20px;letter-spacing:-.03em}h3{font-size:16px}small,.muted{color:var(--muted)}.hidden{display:none!important}.shell{min-height:100vh;display:flex}.sidebar{width:258px;flex:none;background:var(--nav);color:#e5edf8;padding:28px 15px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:12px;padding:5px 10px 40px}.brand-icon,.logo-block{background:#2563eb;color:#fff;display:grid;place-items:center;font-weight:850;border-radius:12px;width:43px;height:43px;letter-spacing:-.05em}.brand strong{font-size:16px;letter-spacing:.07em}.brand small{display:block;font-size:9px;letter-spacing:.15em;color:#90a7c2}.nav-header{color:#7791b1;font-size:10px;letter-spacing:.15em;font-weight:800;padding:0 13px 13px}.navitem{width:100%;display:flex;align-items:center;gap:12px;background:transparent;border:0;color:#aebdd3;text-align:left;border-radius:9px;margin:4px 0;padding:13px 14px;font-weight:600}.navitem:hover{background:#1d3a5d;color:white}.navitem.active{color:#fff;background:#27558a}.navemoji{font-size:21px;width:25px;text-align:center;line-height:1}.sidebar-bottom{margin-top:auto;border-top:1px solid #2d435e;padding:20px 9px 0;color:#b9c9dd;font-size:12px;display:flex;align-items:center;gap:10px;overflow-wrap:anywhere}.dot{width:9px;height:9px;flex:none;border-radius:50%;background:#e8b75a}.dot.green{background:#4ade80}.main-wrap{width:calc(100% - 258px);min-width:0}.topbar{min-height:94px;background:#fff;border-bottom:1px solid var(--line);padding:22px clamp(20px,3vw,45px);display:flex;justify-content:space-between;gap:12px;align-items:center}.top-left,.top-actions{display:flex;gap:12px;align-items:center}.topbar h1{font-size:25px;font-weight:780}.topbar p{color:var(--muted);font-size:12px;margin-top:4px}.top-actions{flex-wrap:wrap;justify-content:flex-end}.sync-time{color:var(--muted);font-size:11px}.content{max-width:1550px;margin:auto;padding:30px clamp(20px,3vw,46px) 65px}.content>div,.page-body{display:grid;gap:24px}.ghost,.primary,.secondary,.icon-button{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:9px;padding:10px 16px;font-weight:680}.ghost:hover,.secondary:hover{background:#f2f6fb}.primary{background:var(--primary);color:#fff;border-color:var(--primary)}.primary:hover{background:#1d4ed8}.primary.full{width:100%;display:flex;justify-content:space-between}.icon-button{padding:4px 10px;font-size:23px;line-height:1.3}.section-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:15px}.section-title p{font-size:12px;color:var(--muted);margin-top:2px}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px}.metric{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);padding:22px;border-radius:var(--radius)}.metric .metric-icon{height:36px;width:36px;display:grid;place-items:center;background:#eff6ff;border-radius:10px;color:var(--primary);font-size:22px;margin-bottom:17px}.metric span{display:block;color:var(--muted);font-size:12px;font-weight:650}.metric strong{display:block;font-size:32px;letter-spacing:-.04em;line-height:1.1;margin-top:8px}.metric small{display:block;font-size:11px;margin-top:8px}.card{border:1px solid var(--line);background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:24px}.card.tight{padding:0;overflow:hidden}.card-header{display:flex;justify-content:space-between;align-items:center;padding:22px 23px;gap:12px;border-bottom:1px solid var(--line)}.card-header p{color:var(--muted);font-size:12px;margin-top:4px}.two-col{display:grid;grid-template-columns:1.3fr 1fr;gap:20px}.table-scroll{overflow-x:auto}.data-table{width:100%;border-collapse:collapse;text-align:left;min-width:750px}.data-table th{font-size:11px;font-weight:750;letter-spacing:.055em;text-transform:uppercase;white-space:nowrap;color:#738199;background:#f8fafc;padding:13px 18px;border-bottom:1px solid var(--line)}.data-table td{padding:14px 18px;border-bottom:1px solid #edf0f5;vertical-align:middle}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:#f7faff}.data-table strong{font-size:13px}.subcell{display:block;color:var(--muted);font-size:11px;margin-top:3px}.pill{display:inline-flex;align-items:center;border-radius:100px;padding:5px 10px;font-size:10px;letter-spacing:.04em;font-weight:800;white-space:nowrap;background:#e5eef9;color:#28547d}.pill.AVAILABLE,.pill.RETURNED{background:#dcfce7;color:#166534}.pill.OVERDUE,.pill.DATA-ISSUE,.pill.CHECK-RECORD,.pill.RETURNED-LATE{background:#fee2e2;color:#b91c1c}.pill.BORROWED{background:#dbeafe;color:#1d4ed8}.pill.DUE-SOON{background:#fef3c7;color:#92400e}.link-btn{border:0;background:none;color:#2563eb;font-weight:700;padding:4px 0;white-space:nowrap}.link-btn:hover{text-decoration:underline}.toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.search-input{width:100%;max-width:450px;border:1px solid var(--line);background:#fff;border-radius:10px;padding:13px 16px;outline:0}.search-input:focus,.field input:focus,.field select:focus,.field textarea:focus{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb1a}.search-large{max-width:none;font-size:17px;padding:17px 20px;border-radius:13px;box-shadow:var(--shadow)}.toolbar-actions{display:flex;gap:10px;align-items:center}.caption,.info-strip{color:var(--muted);font-size:12px}.info-strip{background:#eff6ff;padding:12px 15px;border:1px solid #dceaff;border-radius:10px}.split-search{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,1fr);gap:20px;align-items:start}.search-result{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:14px 16px;border:1px solid var(--line);background:#fff;border-radius:10px;text-align:left;margin:9px 0}.search-result.active{border-color:#2563eb;box-shadow:inset 3px 0 #2563eb;background:#f7faff}.search-result:hover{border-color:#9dc3ff}.search-result strong{display:block}.search-result small{display:block;margin-top:3px;color:var(--muted)}.detail-head{border-bottom:1px solid var(--line);padding-bottom:15px;margin-bottom:15px}.detail-head h2{margin-bottom:5px}.details-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-bottom:20px}.detail-item{background:#f8fafc;padding:12px 13px;border-radius:9px}.detail-item small{display:block;font-size:11px}.detail-item b{display:block;margin-top:5px;overflow-wrap:anywhere}.section-sub{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;margin:15px 0 10px}.borrower-item{padding:12px 0;border-top:1px solid #eef2f7;display:flex;justify-content:space-between;gap:12px}.borrower-item strong{display:block}.borrower-item small{display:block}.empty{color:var(--muted);padding:28px;text-align:center;background:#f8fafc;border-radius:9px}.warn{color:#b91c1c}.soft-link{color:#2563eb;text-decoration:none;font-weight:680}.soft-link:hover{text-decoration:underline}.info-list{padding-left:20px;color:#4b5c74;line-height:1.9}.info-list li{margin:8px 0}.line-break{white-space:pre-wrap}.login-view{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 22% 20%,#254875 0,#122947 43%,#0c1d32 100%);padding:20px}.login-card{background:#fff;border-radius:20px;padding:40px;box-shadow:0 35px 80px #020c1d55;width:min(100%,425px)}.login-card .logo-block{width:56px;height:56px;font-size:20px;margin-bottom:22px}.login-card .eyebrow{font-size:10px;color:#2563eb;font-weight:850;letter-spacing:.13em}.login-card h1{font-size:36px;margin:5px 0 10px}.login-card p{color:#6b7790;margin-bottom:28px}.login-card label{display:block;font-weight:700;margin-bottom:8px}.login-card input{width:100%;padding:12px 14px;border-radius:9px;border:1px solid var(--line);margin-bottom:13px}.login-card small{display:block;text-align:center;margin-top:24px}.form-error{color:#b91c1c;margin-top:10px;font-size:13px}.dialog-backdrop{position:fixed;inset:0;background:#06152c9c;z-index:40;display:grid;place-items:center;padding:16px}.dialog-card{background:#fff;border-radius:16px;width:min(680px,100%);max-height:92vh;display:flex;flex-direction:column;box-shadow:0 30px 90px #0004}.dialog-header{display:flex;justify-content:space-between;align-items:center;padding:23px 26px;border-bottom:1px solid var(--line)}.dialog-fields{padding:24px 26px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;overflow-y:auto}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field.wide{grid-column:1/-1}.field label{font-weight:730;font-size:12px}.field input,.field select,.field textarea{border:1px solid #d6deea;border-radius:9px;background:#fff;padding:11px 12px;width:100%;outline:0;min-width:0}.field textarea{resize:vertical;min-height:85px}.dialog-footer{display:flex;gap:10px;justify-content:flex-end;padding:18px 26px;border-top:1px solid var(--line)}.toast{position:fixed;bottom:25px;right:25px;z-index:60;background:#132740;color:#fff;padding:14px 20px;border-radius:12px;box-shadow:0 9px 30px #0002;max-width:min(420px,92vw)}.toast.error{background:#b42318}.loading{padding:40px;text-align:center;color:var(--muted)}.mobile-only{display:none}@media(max-width:1130px){.cards{grid-template-columns:repeat(2,1fr)}.split-search,.two-col{grid-template-columns:1fr}.sidebar{width:235px}.main-wrap{width:calc(100% - 235px)}}@media(max-width:720px){.sidebar{position:fixed;transform:translateX(-105%);transition:transform .2s;width:265px}.sidebar.open{transform:none}.main-wrap{width:100%}.topbar{padding:16px}.topbar h1{font-size:20px}.mobile-only{display:inline-flex}.sync-time{display:none}.content{padding:18px 14px 45px}.metric{padding:16px}.metric strong{font-size:26px}.card{padding:17px}.card-header{padding:16px}.cards{gap:10px}.dialog-fields{grid-template-columns:1fr;padding:18px}.dialog-header,.dialog-footer{padding:16px}.hide-phone{display:none}.details-grid{gap:9px}.login-card{padding:28px}}

/* ---- Borrower accounts + borrow requests ---- */
.nav-badge{margin-left:auto;background:#f59e0b;color:#1c1405;border-radius:100px;font-size:11px;font-weight:800;padding:1px 8px;min-width:22px;text-align:center}
.portal-link{display:block;text-align:center;margin-top:14px;color:#2563eb;font-weight:700;text-decoration:none;font-size:13px}.portal-link:hover{text-decoration:underline}
.br-error{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.br-small{padding:6px 12px;font-size:12px}
.br-tabs{display:flex;gap:6px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);padding:5px;border-radius:11px}
.br-tab{border:0;background:transparent;border-radius:8px;padding:8px 13px;font-weight:700;color:var(--muted)}
.br-tab span{display:inline-block;margin-left:4px;background:#eef2f7;border-radius:100px;padding:0 7px;font-size:11px;color:var(--ink)}
.br-tab.active{background:var(--nav);color:#fff}.br-tab.active span{background:#27558a;color:#fff}
.br-list{display:grid;gap:16px}
.br-req{border-left:4px solid #93c5fd}.br-req.APPROVED{border-left-color:#4ade80}.br-req.DECLINED{border-left-color:#fca5a5;opacity:.88}
.br-req-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:15px}.br-req-head p{font-size:12px;margin-top:3px}
.br-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:12px}
.br-remarks{background:#fffbeb;border:1px solid #fde68a;border-radius:9px;padding:10px 13px;color:#4b3b10;font-size:13px}.br-remarks span{display:block;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#92400e;margin-bottom:3px}
.br-req-foot{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:12px}.br-req-foot:empty{display:none}
.br-empty{text-align:center;padding:40px}.br-empty p{margin-top:6px}
.br-skeleton{height:120px;border-radius:var(--radius);background:linear-gradient(90deg,#e8eef6 25%,#f4f7fb 50%,#e8eef6 75%);background-size:200% 100%;animation:brShimmer 1.3s infinite linear}.br-skeleton.short{height:70px;width:60%}
@keyframes brShimmer{to{background-position:-200% 0}}
.br-acct-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:14px;align-items:end;padding:18px 23px;background:#f8fafc;border-bottom:1px solid var(--line)}
.br-acct-form h4{grid-column:1/-1;font-size:13px;letter-spacing:.04em}.br-acct-form .form-error{grid-column:1/-1;margin:0}.br-acct-form .form-error:empty{display:none}
.br-acct-form .primary{height:44px}
.br-pad{padding:14px 23px 0}
.br-temp{width:min(480px,100%)}.br-temp-body{padding:22px 26px;display:grid;gap:14px}
.br-temp-row{background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:12px 14px}.br-temp-row small{display:block;font-size:10px;font-weight:800;letter-spacing:.12em}
.br-temp-row code{display:block;margin-top:5px;font:600 17px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow-wrap:anywhere;user-select:all}
.br-secret{font-size:22px!important;letter-spacing:.06em;color:var(--nav)}
.loan-toolbar .toolbar-actions{flex-wrap:wrap}
.loan-filters{justify-content:flex-start;align-items:flex-end}
.loan-filters .field{flex:1 1 180px;max-width:270px}
@media(max-width:720px){.loan-filters .field{max-width:none}.loan-toolbar .toolbar-actions{gap:14px}}
@media(max-width:1130px){.br-grid{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.br-acct-form{grid-template-columns:1fr;padding:16px}.br-grid{grid-template-columns:1fr 1fr}.br-req-foot>*{flex:1}.br-tabs{width:100%}.br-tab{flex:1}}

/* ---- Responsive usability pass (phones, tablets, desktop) ---- */
html{-webkit-text-size-adjust:100%}
.shell,.login-view{min-height:100dvh}
.sidebar{height:100dvh;overflow-y:auto;overscroll-behavior:contain}
.login-view{padding:max(20px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));overflow-y:auto}
.topbar{flex-wrap:wrap}.top-left{min-width:0;flex:1 1 240px}.top-left>div{min-width:0}
.topbar h1,.topbar p,.card-header>*,.section-title>*{overflow-wrap:anywhere;min-width:0}
.card-header,.section-title,.br-req-head{flex-wrap:wrap}
.toolbar>*{min-width:0}.toolbar-actions{flex-wrap:wrap}
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;max-width:100%}
.data-table td{overflow-wrap:anywhere}
.search-result>*{min-width:0;overflow-wrap:anywhere}
.borrower-item>*{min-width:0;overflow-wrap:anywhere}
.dialog-card{max-height:92dvh;overflow:hidden}
.dialog-card form{display:flex;flex-direction:column;min-height:0;flex:1}
.dialog-header,.dialog-footer{flex:none}.dialog-fields,.ph-body{flex:1 1 auto;min-height:0;overscroll-behavior:contain}
.dialog-footer{flex-wrap:wrap}
.toast{bottom:max(25px,env(safe-area-inset-bottom))}
@media(min-width:1366px){.cards{gap:20px}}
@media(max-width:1130px) and (min-width:721px){.topbar{min-height:auto;padding:16px 24px}}
@media(max-width:720px){
 .accountability-notice{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
 .topbar{min-height:auto;padding:12px 14px;gap:10px}
 .top-actions{width:100%;justify-content:flex-start;gap:8px}
 .top-actions .ghost{flex:1 1 auto;min-height:44px;padding:10px 12px}
 .icon-button,.navitem,.link-btn,.br-tab{min-height:44px}
 .menu-close{display:inline-flex}
 .sidebar{padding-bottom:max(20px,env(safe-area-inset-bottom))}
 .ghost,.primary,.secondary{min-height:44px}
 .br-small{min-height:40px}
 .search-input,.field input,.field select,.field textarea,.login-card input,.login-card select{font-size:16px;min-height:46px}
 .search-input{max-width:none}
 .toolbar{align-items:stretch}.toolbar-actions{width:100%}.toolbar-actions>*{flex:1 1 auto}
 .toolbar-actions .link-btn{white-space:normal;text-align:left;overflow-wrap:anywhere;max-width:100%}
 .section-title,.card-header{align-items:flex-start}
 .details-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .dialog-backdrop{padding:0;place-items:end center}
 .dialog-card{width:100%;max-height:94dvh;border-radius:16px 16px 0 0}
 .dialog-footer{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
 .dialog-footer>button{flex:1 1 140px}
 .toast{left:14px;right:14px;max-width:none}
 .login-card h1{font-size:30px}
 .data-table{min-width:640px}
 .data-table th,.data-table td{padding:12px 14px}
}
@media(max-width:400px){
 .cards{grid-template-columns:1fr}
 .details-grid,.br-grid{grid-template-columns:1fr}
 .login-card{padding:22px 18px;border-radius:16px}
 .content{padding:14px 12px 40px}
}
@media(max-height:520px) and (orientation:landscape){
 .accountability-notice{position:static}
 .login-view{place-items:start center}
 .login-card{padding:22px}
 .login-card .logo-block{display:none}
 .dialog-card{max-height:98dvh}
 .sidebar{padding-top:16px}.brand{padding-bottom:16px}.navitem{padding:9px 14px;min-height:40px}
}
