.empty-state{min-height:260px;display:grid;place-items:center;align-content:center;gap:8px;padding:34px 20px;text-align:center;color:#777}.empty-state>span{width:44px;height:44px;display:grid;place-items:center;border-radius:50%;background:#f4f0e7;color:#9b7a31}.empty-state svg{width:21px;height:21px}.empty-state h3{margin:5px 0 0;color:#171717;font-size:16px}.empty-state p{max-width:430px;margin:0 0 10px}a.gold-btn,a.filter-btn{text-decoration:none}.module-toolbar>div{display:flex;flex-wrap:wrap;gap:7px}.panel>.table-panel{box-shadow:none;border:0}.data-table td small{display:block;margin-top:3px;color:#888}.risk-score{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;font-weight:800}.risk-score.low{background:#e4f4ee;color:#087a5b}.risk-score.medium{background:#f8efd9;color:#956c0d}.risk-score.high{background:#fde7e7;color:#b42318}
@media(max-width:520px){.empty-state{min-height:220px;padding-inline:14px}.crm-welcome-actions a,.crm-welcome-actions button{width:100%;justify-content:center}.module-toolbar>div:last-child{width:100%}.module-toolbar>div:last-child>*{flex:1;justify-content:center}.data-table{min-width:720px}}
.modal-intro{margin:-4px 0 20px;color:#777;font-size:11px}.loan-calculation{display:grid;grid-template-columns:1fr auto;gap:3px;margin-top:18px;border:1px solid #e4dcc8;border-radius:8px;background:#fbf8ef;padding:14px}.loan-calculation span,.loan-calculation small{color:#777;font-size:10px}.loan-calculation b{grid-row:1/3;grid-column:2;align-self:center;font-size:20px}.payment-confirm{display:flex;gap:9px;align-items:flex-start;margin:18px 0;color:#555;font-size:11px}.payment-confirm input{margin-top:2px;accent-color:#a98634}.modal-actions{display:flex;justify-content:flex-end;margin-top:18px;padding-top:14px;border-top:1px solid #eee}.repayment-row{display:grid;grid-template-columns:30px 1fr auto;gap:10px;align-items:center;padding:12px 0;border-top:1px solid #eee}.repayment-row>span:first-child{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#f5f1e8;color:#9d7c31}.repayment-row svg{width:14px}.repayment-row p{margin:0}.repayment-row small{display:block;margin-top:3px;color:#888;font-size:9px}
@media(max-width:520px){.loan-toolbar>div:last-child{display:grid;grid-template-columns:1fr 1fr}.loan-toolbar>div:last-child .gold-btn{grid-column:1/-1}.loan-calculation{grid-template-columns:1fr}.loan-calculation b{grid-row:auto;grid-column:auto}.modal-actions>*{width:100%;justify-content:center}}
.table-panel{overflow-x:auto}.client-view-btn{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.client-view-btn svg{width:13px;height:13px}.status.received{background:#eef0ed;color:#626762}.status.under-review{background:#f8f0d9;color:#956c0d}.status.blacklisted{background:#222;color:#fff}.client-profile-identity{min-width:0}.client-profile-identity h2{margin:0;overflow-wrap:anywhere}.client-profile-identity p{margin:4px 0;color:#888;font-size:10px}.client-profile-identity>div{display:flex;flex-wrap:wrap;gap:6px}.client-decision-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:22px;padding:15px;border:1px solid #e5dfd0;background:#faf8f1}.client-decision-panel p{margin:5px 0 0;color:#777;font-size:9px}.client-decision-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.client-decision-actions button{display:inline-flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap}.client-decision-actions svg{width:13px;height:13px}.filter-btn.danger{border-color:#dfb8b5;color:#a73530;background:#fff8f7}.filter-btn.blacklist{border-color:#222;color:#fff;background:#222}.client-tab-content{padding-top:22px}.client-overview-grid h3{margin:8px 0 0;overflow-wrap:anywhere}.client-risk-review{margin-top:14px}.client-risk-review p,.client-document-notice p{font-size:10px;color:#777;margin:0;line-height:1.55}.client-application-card .panel-head>div span{display:block;margin-top:4px}.client-application-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.client-application-summary span{display:flex;flex-direction:column;gap:5px}.client-application-summary small{font-size:8px;color:#888}.client-application-summary b{font-size:12px}.decision-history{margin-top:16px}.decision-history>h3{font-size:11px}.decision-history>div{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #eee}.decision-history p{display:flex;flex-direction:column;gap:3px;margin:0}.decision-history b{font-size:9px}.decision-history small{font-size:8px;color:#888}.client-tab-empty{min-height:190px;display:grid;place-items:center;align-content:center;text-align:center;color:#888}.client-tab-empty svg{width:25px;height:25px;color:#9a7c29}.client-tab-empty h3{font-size:13px;color:#222;margin:10px 0 2px}.client-tab-empty p{font-size:9px;margin:0}.client-tab-empty.compact{min-height:130px}.client-document-list{display:grid;gap:9px}.client-document-list article{display:grid;grid-template-columns:34px 1fr auto;gap:11px;align-items:center;border:1px solid #e5e6e2;padding:12px}.client-document-list article>span{width:34px;height:34px;background:#f4f1e8;color:#9a7c29;display:grid;place-items:center}.client-document-list article>span svg{width:17px;height:17px}.client-document-list article>div{min-width:0;display:flex;flex-direction:column;gap:4px}.client-document-list b{font-size:10px;overflow-wrap:anywhere}.client-document-list small{font-size:8px;color:#888}.client-note-form{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}.client-note-form .field{margin:0}.client-note-form textarea{width:100%;resize:vertical}.client-note-list{margin-top:18px}.client-note-list article{display:grid;grid-template-columns:28px 1fr;gap:10px;padding:12px 0;border-top:1px solid #eee}.client-note-list article>span{color:#9a7c29}.client-note-list p{margin:0;font-size:10px;line-height:1.5}.client-note-list small{display:block;margin-top:5px;color:#888;font-size:8px}.client-modal-back{display:inline-flex;align-items:center;gap:6px;margin-bottom:20px}.client-modal-back svg{width:13px;height:13px;transform:rotate(90deg)}.client-document-detail{margin:20px 0}.client-document-detail h3{overflow-wrap:anywhere}.client-document-notice{display:flex;align-items:flex-start;gap:10px}.client-document-notice>svg{width:18px;height:18px;flex:0 0 18px;color:#9a7c29}
@media(max-width:700px){.client-decision-panel{align-items:stretch;flex-direction:column}.client-decision-actions{display:grid;grid-template-columns:1fr 1fr}.client-decision-actions button{width:100%}.client-tab-content{padding-top:16px}.client-application-summary{grid-template-columns:1fr 1fr}.client-note-form{grid-template-columns:1fr}.client-note-form button{width:100%}.client-document-list article{grid-template-columns:30px 1fr}.client-document-list article>button{grid-column:1/-1;width:100%}}
@media(max-width:390px){.client-decision-actions,.client-application-summary{grid-template-columns:1fr}.profile-tabs button{min-width:max-content}.client-overview-grid{grid-template-columns:1fr}.client-document-detail{grid-template-columns:1fr}}
.decision-confirm-client{display:flex;align-items:center;gap:12px;padding:15px;border:1px solid #e5e6e2;background:#fafaf8}.decision-confirm-client>.avatar{width:40px;height:40px;flex:0 0 40px}.decision-confirm-client>div{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.decision-confirm-client b{font-size:11px;overflow-wrap:anywhere}.decision-confirm-client small{font-size:8px;color:#888}.decision-confirm-actions{gap:8px}.decision-confirm-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px}.decision-confirm-actions svg{width:14px;height:14px}@media(max-width:520px){.decision-confirm-client{align-items:flex-start;flex-wrap:wrap}.decision-confirm-client>.status{margin-left:52px}.decision-confirm-actions{display:grid;grid-template-columns:1fr}.decision-confirm-actions button{width:100%}}
.loan-calculation.fixed-interest{grid-template-columns:1fr auto;gap:9px 20px}.loan-calculation.fixed-interest b{grid-row:auto;grid-column:auto;text-align:right;font-size:14px}.loan-calculation.fixed-interest span:last-of-type,.loan-calculation.fixed-interest b:last-child{padding-top:9px;border-top:1px solid #dfd5bb;font-weight:700;color:#171717}.days-cell.neutral{color:#777}.due-date-link{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.due-date-link svg{width:13px;height:13px}.loan-profile-actions{display:flex;gap:7px;margin-left:auto}.loan-profile-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px}.loan-profile-actions svg{width:14px;height:14px}.loan-date-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:14px}.loan-date-summary>div{display:flex;flex-direction:column;gap:5px}.loan-date-summary small{color:#888;font-size:8px}.loan-date-summary b{font-size:11px}.danger-text{color:var(--red)}
@media(max-width:700px){.loan-profile-actions{width:100%;margin-left:0}.loan-profile-actions>*{flex:1}.loan-date-summary{grid-template-columns:1fr 1fr}.loan-calculation.fixed-interest{grid-template-columns:1fr auto}}
@media(max-width:390px){.loan-profile-actions,.loan-date-summary{display:grid;grid-template-columns:1fr}.loan-profile-actions>*{width:100%}}

/* Premium operational dialogs */
.modal{padding:24px;place-items:center;overscroll-behavior:contain}.modal-backdrop{background:rgba(7,8,8,.72);backdrop-filter:blur(7px);animation:modal-fade .18s ease-out}.modal-card{width:min(620px,calc(100vw - 48px));max-height:min(88svh,820px);padding:28px;border:1px solid rgba(181,145,54,.22);border-radius:14px;background:linear-gradient(180deg,#fff 0,#fff 72%,#fcfbf8 100%);box-shadow:0 32px 100px rgba(0,0,0,.32),0 0 0 1px rgba(255,255,255,.55) inset;outline:0;animation:modal-rise .22s cubic-bezier(.2,.8,.2,1);scrollbar-width:thin;scrollbar-color:#cabd98 transparent}.modal-card:before{content:"";position:absolute;inset:0 0 auto;height:3px;border-radius:14px 14px 0 0;background:linear-gradient(90deg,#8b691b,#d6b750 56%,#f2e2a4)}.modal-card--compact{width:min(480px,calc(100vw - 48px))}.modal-card--form{width:min(590px,calc(100vw - 48px))}.modal-card--wide{width:min(820px,calc(100vw - 48px))}.modal-close{position:sticky;z-index:3;float:right;right:0;top:0;margin:-10px -10px 0 14px;width:34px;height:34px;border:1px solid #e5e1d8;border-radius:50%;background:rgba(255,255,255,.94);color:#343432;transition:.18s}.modal-close:hover{background:#171717;color:#fff;border-color:#171717;transform:rotate(4deg)}.modal-close:focus-visible{outline:2px solid var(--gold);outline-offset:2px}.modal-heading{display:grid;grid-template-columns:42px 1fr;gap:14px;align-items:start;margin:0 38px 22px 0}.modal-heading-icon{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;color:#8d6c19;background:linear-gradient(145deg,#fbf6e8,#f0e4bf);box-shadow:0 7px 18px rgba(160,123,32,.12)}.modal-heading-icon svg{width:19px;height:19px}.modal-heading .eyebrow,.client-profile-head .eyebrow{font-size:8px;letter-spacing:1.8px;margin:1px 0 6px}.modal-heading .eyebrow:before,.client-profile-head .eyebrow:before{width:20px}.modal-heading h2{font-family:"Playfair Display",serif;font-size:25px;line-height:1.1;margin:0;color:#151515}.modal-heading p{margin:7px 0 0;color:#777;font-size:10px;line-height:1.5;max-width:470px}.modal-card form .field{gap:6px}.modal-card form .field>span{font-size:9px;font-weight:700;color:#484844}.modal-card form .field input,.modal-card form .field select,.modal-card form .field textarea{min-height:44px;padding:10px 12px;border-color:#dfddd6;border-radius:6px;font:inherit;font-size:11px;transition:.18s}.modal-card form .field input:focus,.modal-card form .field select:focus,.modal-card form .field textarea:focus{border-color:#b08b31;box-shadow:0 0 0 3px rgba(185,147,52,.11)}.modal-card .form-grid{gap:13px}.modal-actions{gap:8px;margin-top:18px;padding-top:16px;border-color:#ebe7df}.modal-actions.subtle{margin-top:12px;padding-top:10px}.modal-actions .gold-btn,.modal-actions .filter-btn{min-height:40px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;gap:7px}.modal-actions .gold-btn svg,.modal-actions .filter-btn svg{width:14px;height:14px}.payment-confirm{margin:14px 0 0;padding:12px;border:1px solid #e5dcc3;border-radius:7px;background:#fbf8ef;align-items:center}.payment-confirm input{width:16px;height:16px;flex:0 0 16px}.payment-confirm span{display:flex;flex-direction:column;gap:2px}.payment-confirm b{font-size:9px;color:#302d25}.payment-confirm small{font-size:8px;color:#7c7567}.modal-stat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:4px 0 16px}.modal-stat-grid>div{display:flex;flex-direction:column;gap:5px;padding:12px;border:1px solid #e7e3da;border-radius:7px;background:#fbfaf7}.modal-stat-grid small{font-size:8px;color:#888}.modal-stat-grid b{font-size:12px}.modal-date-field{margin-top:3px}.decision-confirm-client{border-radius:9px;background:linear-gradient(135deg,#fbfaf6,#f6f1e4);border-color:#e5dcc4}.decision-confirm-client>.avatar{background:#1c1c1b;color:#e0bd58}.client-profile-head{padding-right:42px}.client-profile-head .avatar{width:48px;height:48px;flex:0 0 48px;background:linear-gradient(145deg,#1b1c1b,#050606);color:#d9b950;box-shadow:0 8px 20px rgba(0,0,0,.14)}.client-profile-head h2,.loan-profile-head h2{font-family:"Playfair Display",serif;font-size:25px;line-height:1.1;margin:0}.client-decision-panel{margin-top:18px;padding:12px 13px;border-radius:8px;background:linear-gradient(135deg,#fbf9f2,#f7f2e4)}.client-decision-actions button{min-height:35px;border-radius:5px;padding:8px 10px}.profile-tabs{margin-top:18px;gap:22px}.profile-tabs button{padding:10px 0}.client-tab-content{padding-top:14px}.client-overview-grid{grid-template-columns:repeat(3,1fr);gap:8px}.client-overview-grid .panel{padding:12px;border-radius:7px;background:#fdfdfc}.client-overview-grid h3{font-size:12px;line-height:1.25}.client-risk-review{padding:13px;border-radius:7px}.client-risk-review .panel-head{margin-bottom:8px}.loan-profile-head>div:nth-child(2)>p{margin:3px 0 6px;color:#888;font-size:9px}.loan-detail-grid{margin:17px 0 9px;gap:8px}.loan-detail-grid .panel{padding:12px;border-radius:7px;background:#fdfdfc}.loan-detail-grid .panel.emphasis{border-color:#d8c483;background:#fbf7ea}.loan-detail-grid h3{font-size:14px}.loan-date-summary{padding:11px 13px;margin-bottom:9px;border:1px solid #e7e3da;border-radius:7px;background:#f8f7f3}.loan-date-summary>div+div{border-left:1px solid #e4e0d7;padding-left:13px}.loan-progress-panel,.loan-history-panel{padding:13px;border:1px solid #e7e3da;border-radius:7px;background:#fff}.loan-progress-panel .panel-head,.loan-history-panel .panel-head{margin-bottom:11px}.loan-history-panel{margin-top:9px}.loan-history-list{max-height:178px;overflow:auto}.modal-empty{min-height:94px;display:flex;align-items:center;justify-content:center;gap:11px;color:#987726;text-align:left}.modal-empty>svg{width:18px;height:18px;padding:9px;box-sizing:content-box;border-radius:50%;background:#f4efe2}.modal-empty>div{display:flex;flex-direction:column;gap:3px}.modal-empty b{font-size:10px;color:#252525}.modal-empty small{font-size:8px;color:#8a8a86}.repayment-row{padding:9px 0}.repayment-row:first-child{border-top:0}.modal-card--loan-detail .modal-actions.subtle .filter-btn{min-height:32px;font-size:8px;padding:7px 10px}.modal-card--loan-form .loan-calculation{margin-top:14px;border-radius:7px}.modal-card--decision .modal-heading{margin-bottom:16px}
@keyframes modal-fade{from{opacity:0}to{opacity:1}}@keyframes modal-rise{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:none}}
@media(max-width:700px){.modal{padding:10px 10px 0;place-items:end center}.modal-card,.modal-card--compact,.modal-card--form,.modal-card--wide{width:100%;max-height:calc(100svh - 10px);padding:23px 17px calc(18px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0}.modal-card:before{border-radius:18px 18px 0 0}.modal-close{margin:-7px -4px 0 9px}.modal-heading{grid-template-columns:38px 1fr;gap:11px;margin:0 35px 18px 0}.modal-heading-icon{width:38px;height:38px;border-radius:10px}.modal-heading h2{font-size:22px}.client-profile-head{padding-right:30px}.client-profile-head .avatar{width:42px;height:42px;flex-basis:42px}.client-profile-head h2,.loan-profile-head h2{font-size:22px}.client-decision-panel{gap:11px}.client-overview-grid{grid-template-columns:1fr 1fr}.loan-detail-grid{margin-top:14px}.loan-profile-actions{margin-top:4px}.loan-date-summary{grid-template-columns:repeat(3,1fr)}.loan-date-summary>div+div{padding-left:8px}.loan-history-list{max-height:145px}}
@media(max-width:430px){.modal{padding-left:0;padding-right:0}.modal-card,.modal-card--compact,.modal-card--form,.modal-card--wide{padding-left:15px;padding-right:15px}.modal-card .form-grid{gap:11px}.modal-heading p{font-size:9px}.modal-stat-grid{gap:6px}.modal-stat-grid>div{padding:10px}.client-decision-actions{grid-template-columns:1fr 1fr}.client-decision-actions button{font-size:8px}.client-overview-grid{grid-template-columns:1fr 1fr}.client-overview-grid .panel{padding:10px}.client-overview-grid h3{font-size:11px}.loan-detail-grid{grid-template-columns:1fr 1fr}.loan-date-summary{grid-template-columns:1fr 1fr}.loan-date-summary>div+div{border-left:0;padding-left:0}.loan-date-summary>div:last-child{grid-column:1/-1;padding-top:7px;border-top:1px solid #e4e0d7}.modal-actions{display:grid;grid-template-columns:1fr}.modal-actions>*{width:100%}}
@media(max-width:350px){.client-overview-grid,.loan-detail-grid,.modal-stat-grid{grid-template-columns:1fr}.modal-heading{grid-template-columns:1fr}.modal-heading-icon{display:none}.client-profile-head{gap:10px}.client-profile-head .avatar{width:36px;height:36px;flex-basis:36px}.client-decision-actions{grid-template-columns:1fr}}

/* Loan detail theme parity: own every surface and text colour so inherited
   workspace colours cannot make financial values disappear during conversion. */
html[data-roc-theme="dark"] .modal-card--loan-detail{color:#f4f3ef;background:#171817;border-color:#4a3b16;box-shadow:0 32px 100px rgba(0,0,0,.58),0 0 0 1px rgba(255,255,255,.03) inset}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-profile-head h2{color:#f5f3ec}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-profile-head>div:nth-child(2)>p{color:#a7aaa5}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-profile-actions .filter-btn{background:#20211f;border-color:#3d3f39;color:#f1f0ea}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-profile-actions .filter-btn svg{color:#d6b34d}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-detail-grid .panel{background:#0f1110;border-color:#30332f;color:#f3f2ed}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-detail-grid .panel small,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-date-summary small{color:#aeb1aa}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-detail-grid .panel.emphasis{background:#282314;border-color:#80651e}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-date-summary{background:#1d1f1d;border-color:#353833;color:#f0efe9}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-date-summary>div+div{border-color:#3a3d38}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-progress-panel,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel{background:#f8f7f3;border-color:#d7d2c6;color:#171817}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-progress-panel .panel-head h3,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .panel-head h3,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-progress-panel .panel-head b{color:#171817}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-progress-meta,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .panel-head>span{color:#6b6c67}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .repayment-row{border-color:#e4e0d7;color:#171817}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .repayment-row small{color:#72736d}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .repayment-row>span:first-child{background:#f0ead9;color:#8d6c19}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .modal-empty b{color:#252525}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .modal-empty small{color:#777872}
html[data-roc-theme="dark"] .modal-card--loan-detail .modal-actions.subtle{border-color:#363833}
html[data-roc-theme="dark"] .modal-card--loan-detail .modal-actions.subtle .filter-btn.danger{background:#241817;border-color:#70403a;color:#f2b2aa}
html[data-roc-theme="dark"] .modal-card--loan-detail .status{border:1px solid rgba(255,255,255,.08)}
html[data-roc-theme="light"] .modal-card--loan-detail .loan-progress-panel,html[data-roc-theme="light"] .modal-card--loan-detail .loan-history-panel{color:#171817}
html[data-roc-theme="light"] .modal-card--loan-detail .loan-progress-panel .panel-head h3,html[data-roc-theme="light"] .modal-card--loan-detail .loan-history-panel .panel-head h3{color:#171817}

.modal-card--loan-detail{width:min(1060px,calc(100vw - 64px));max-height:88vh;padding:28px;}
.loan-detail-header{position:sticky;top:-28px;z-index:2;padding:6px 0 18px;background:inherit;border-bottom:1px solid rgba(127,127,127,.18)}
.loan-detail-badges{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.loan-detail-section-title{display:flex;align-items:center;gap:10px;margin:22px 0 10px;font-size:16px}.loan-detail-section-title:before{content:"";width:3px;height:21px;border-radius:3px;background:var(--gold)}
.loan-financial-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:22px 0 4px}.loan-financial-card{position:relative;min-height:112px;padding:16px 17px 14px!important;border-radius:12px!important}.loan-financial-card:nth-child(5),.loan-financial-card:nth-child(6){grid-column:span 2}.loan-financial-card small{display:block;margin-top:12px}.loan-financial-card h3{margin:8px 0 0;font-size:21px;letter-spacing:.01em}.loan-financial-icon{position:absolute;right:15px;top:15px;color:#c99f2f}.loan-financial-icon svg{width:20px;height:20px}.loan-financial-helper{display:block;margin-top:5px;font-size:9px;color:#7b7c77}.loan-timeline{grid-template-columns:repeat(5,1fr);align-items:center}.loan-timeline>div{position:relative;padding-left:31px}.loan-timeline-icon{position:absolute;left:0;top:0;color:#9d7a25}.loan-timeline-icon svg{width:18px;height:18px}.loan-payout-summary{grid-template-columns:repeat(4,1fr)}.loan-progress-panel .panel-head h3,.loan-history-panel .panel-head h3{display:flex;align-items:center;gap:7px}.loan-progress-panel .panel-head h3 svg,.loan-history-panel .panel-head h3 svg{width:16px;height:16px;color:#bd9226}
html[data-roc-theme="dark"] .modal-card--loan-detail{background:linear-gradient(145deg,#0b0f12,#11171d 72%,#0b0f12)}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-financial-card{background:linear-gradient(145deg,#141a1f,#11161a);border-color:#354049}html[data-roc-theme="dark"] .modal-card--loan-detail .loan-financial-icon{color:#e0b43f}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-financial-helper{color:#9da6aa}.modal-card--loan-detail .legacy-evidence-panel{margin-top:0}
@media(max-width:900px){.loan-financial-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.loan-financial-card:nth-child(5),.loan-financial-card:nth-child(6){grid-column:span 1}.loan-timeline{grid-template-columns:repeat(3,1fr);row-gap:14px}.loan-payout-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.modal-card--loan-detail{width:100%;padding:23px 17px calc(18px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0}.loan-detail-header{top:-23px;padding-top:3px}.loan-financial-grid{grid-template-columns:1fr;gap:9px}.loan-financial-card:nth-child(5),.loan-financial-card:nth-child(6){grid-column:auto}.loan-timeline,.loan-payout-summary{grid-template-columns:1fr 1fr}.loan-profile-actions{display:grid;grid-template-columns:1fr}.loan-profile-actions>*{width:100%}}

/* Ordinary-loan decision and servicing polish — scoped to Applications and Loan Management. */
.application-register .application-amount-label{display:block;margin-top:4px;color:#8a8d87;font-size:8px;font-weight:500}
.modal-card--decision{width:min(640px,calc(100vw - 48px))}
.modal-card--decision .decision-confirm-client{margin-bottom:14px}
.decision-amount-control{display:grid;gap:13px;margin:0 0 15px;padding:15px;border:1px solid #dfd8c6;border-radius:10px;background:#fbf8ef}
.decision-amount-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.decision-amount-summary span{display:flex;flex-direction:column;gap:5px;padding:10px 12px;border:1px solid #e5e0d4;border-radius:8px;background:#fff}
.decision-amount-summary small{color:#797a75;font-size:8px;text-transform:uppercase;letter-spacing:.06em}
.decision-amount-summary b{font-size:15px;color:#1b1c1b}
.decision-amount-control .field{margin:0}
.decision-amount-control .field>small,.decision-notes>small{color:#777a74;font-size:9px;line-height:1.5}
.decision-notes{margin-top:0}
.decision-approved-amount{color:#8b691b!important;font-weight:700}
.client-decision-panel>div:first-child{min-width:220px}
.client-decision-panel .eyebrow{display:block}
.client-application-card,.client-risk-review{border-radius:10px!important}
.profile-tabs{scrollbar-width:thin}

.modal-card--loan-detail{width:min(1160px,calc(100vw - 56px));max-height:92dvh;padding:30px}
.loan-detail-header{top:-30px;align-items:center;padding:8px 0 18px}
.loan-profile-actions{align-items:center;flex-wrap:wrap;justify-content:flex-end}
.loan-profile-actions>*{min-height:42px}
.loan-financial-card{display:flex;flex-direction:column;justify-content:flex-start;min-height:124px;border-width:1px!important}
.loan-financial-card>small:first-of-type{padding-right:34px;margin-top:0;font-size:10px;line-height:1.35}
.loan-financial-card h3{font-size:23px;line-height:1.15}
.loan-financial-helper{line-height:1.45}
.loan-timeline{align-items:stretch}
.loan-timeline>div{display:grid;grid-template-columns:22px minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;row-gap:4px;align-content:center;min-height:52px;padding-left:0}
.loan-timeline-icon{position:static;grid-column:1;grid-row:1/3;align-self:center;display:grid;place-items:center}
.loan-timeline small,.loan-timeline b{grid-column:2;min-width:0;overflow-wrap:anywhere}
.loan-timeline small{font-size:9px;line-height:1.25}
.loan-timeline b{font-size:11px;line-height:1.35}
.loan-progress-panel,.loan-history-panel{padding:16px}
.loan-history-panel .modal-empty{min-height:100px}
.loan-progress-meta{display:flex;justify-content:space-between;gap:18px}
.loan-progress-meta span:last-child{text-align:right}
.modal-card--loan-form{width:min(680px,calc(100vw - 48px))}
.modal-card--loan-form .payment-confirm,.modal-card--loan-form .task-link-note{display:flex;align-items:flex-start;gap:10px}
.modal-card--loan-form .payment-confirm input,.modal-card--loan-form .task-link-note input{margin:1px 0 0;flex:0 0 16px;width:16px;height:16px}
.modal-card--loan-form input[type="file"]{padding:8px}
.modal-card--loan-form input[type="file"]::file-selector-button{margin-right:10px;padding:7px 10px;border:1px solid #d8d3c7;border-radius:6px;background:#f6f3eb;color:#252622;font:600 9px "DM Sans",sans-serif}

html[data-roc-theme="light"] .loan-detail-header{background:#fff}
html[data-roc-theme="light"] .modal-card--loan-detail .loan-financial-card{background:#fff;border-color:#ddd9cf;box-shadow:0 8px 22px rgba(46,39,23,.04)}
html[data-roc-theme="light"] .modal-card--loan-detail .loan-date-summary{background:#faf8f2}

html[data-roc-theme="dark"] .application-register .application-amount-label{color:#89969b}
html[data-roc-theme="dark"] .modal-card--decision,html[data-roc-theme="dark"] .modal-card--client-profile,html[data-roc-theme="dark"] .modal-card--loan-form{background:linear-gradient(145deg,#0d1114,#151a1e);border-color:#394249;color:#f4f3ef}
html[data-roc-theme="dark"] .modal-card--decision .modal-heading h2,html[data-roc-theme="dark"] .modal-card--client-profile h2,html[data-roc-theme="dark"] .modal-card--loan-form .modal-heading h2{color:#f7f5ef}
html[data-roc-theme="dark"] .decision-confirm-client,html[data-roc-theme="dark"] .decision-amount-control,html[data-roc-theme="dark"] .client-decision-panel{background:#171d21;border-color:#394249;color:#f2f1ec}
html[data-roc-theme="dark"] .decision-confirm-client small,html[data-roc-theme="dark"] .decision-amount-control .field>small,html[data-roc-theme="dark"] .decision-notes>small,html[data-roc-theme="dark"] .client-decision-panel p{color:#aeb7bb}
html[data-roc-theme="dark"] .decision-amount-summary span{background:#101518;border-color:#354048}
html[data-roc-theme="dark"] .decision-amount-summary small{color:#9ca7ac}
html[data-roc-theme="dark"] .decision-amount-summary b{color:#f6f4ee}
html[data-roc-theme="dark"] .decision-approved-amount{color:#e2b841!important}
html[data-roc-theme="dark"] .modal-card--client-profile .client-overview-grid .panel,html[data-roc-theme="dark"] .modal-card--client-profile .client-application-card,html[data-roc-theme="dark"] .modal-card--client-profile .client-risk-review{background:#12171a;border-color:#333d43;color:#f1f0eb}
html[data-roc-theme="dark"] .modal-card--client-profile .client-overview-grid small,html[data-roc-theme="dark"] .modal-card--client-profile .client-application-summary small,html[data-roc-theme="dark"] .modal-card--client-profile .decision-history small,html[data-roc-theme="dark"] .modal-card--client-profile .client-risk-review p{color:#a7b0b4}
html[data-roc-theme="dark"] .modal-card--client-profile .profile-tabs{border-color:#394249}
html[data-roc-theme="dark"] .modal-card--client-profile .profile-tabs button{color:#aeb7bb}
html[data-roc-theme="dark"] .modal-card--client-profile .profile-tabs button.active{color:#f0c84f}
html[data-roc-theme="dark"] .modal-card--client-profile .decision-history>div{border-color:#323c42}
html[data-roc-theme="dark"] .loan-detail-header{background:linear-gradient(180deg,#0c1114 0,#0e1418 88%,rgba(14,20,24,.96) 100%)}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-progress-panel,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel{background:#12181c;border-color:#354048;color:#f3f2ed}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-progress-panel .panel-head h3,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .panel-head h3,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-progress-panel .panel-head b,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .modal-empty b{color:#f3f2ed}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-progress-meta,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .panel-head>span,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .repayment-row small,html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .modal-empty small{color:#a5afb3}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .repayment-row{border-color:#303a40;color:#f1f0eb}
html[data-roc-theme="dark"] .modal-card--loan-detail .loan-history-panel .repayment-row>span:first-child{background:#252316;color:#e0b43f}
html[data-roc-theme="dark"] .modal-card--loan-form .payment-confirm,html[data-roc-theme="dark"] .modal-card--loan-form .task-link-note{background:#171d21;border-color:#4a4129;color:#e9e6dc}
html[data-roc-theme="dark"] .modal-card--loan-form .payment-confirm b{color:#f4f1e8}
html[data-roc-theme="dark"] .modal-card--loan-form .payment-confirm small,html[data-roc-theme="dark"] .modal-card--loan-form .task-link-note{color:#aeb7bb}
html[data-roc-theme="dark"] .modal-card--loan-form input[type="file"]::file-selector-button{background:#252c30;border-color:#465158;color:#f4f2ec}

@media(max-width:900px){
  .modal-card--loan-detail{width:min(100%,calc(100vw - 28px));padding:24px}
  .loan-detail-header{top:-24px}
  .client-decision-panel{align-items:flex-start;flex-direction:column}
  .client-decision-actions{justify-content:flex-start}
}
@media(max-width:600px){
  .modal-card--decision{width:100%}
  .decision-amount-summary{grid-template-columns:1fr}
  .loan-financial-card{min-height:105px}
  .loan-timeline{grid-template-columns:1fr}
  .loan-timeline>div{min-height:46px;padding:8px 0}
  .loan-date-summary>div+div{border-left:0;border-top:1px solid #e4e0d7;padding-left:0}
  html[data-roc-theme="dark"] .loan-date-summary>div+div{border-color:#394249}
  .loan-progress-meta{align-items:flex-start;flex-direction:column;gap:5px}
  .loan-progress-meta span:last-child{text-align:left}
  .client-decision-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
}
@media(max-width:390px){.client-decision-actions{grid-template-columns:1fr}}
.modal-card .profile-tabs button{min-width:52px;min-height:36px;padding-inline:5px}

/* Secure document register */
.document-toolbar{align-items:center}.document-toolbar>div{align-items:center}.document-toolbar>div>span{font-size:9px;color:#7a7a76}.document-toolbar .filter-btn b{margin-left:4px}.document-register{overflow:hidden}.document-register>.panel-head{align-items:flex-start}.document-register>.panel-head>svg{width:18px;height:18px;color:#9b7a25}.document-table-scroll{overflow-x:auto}.document-table{min-width:920px}.document-name{display:flex;align-items:center;gap:10px;max-width:300px;border:0;background:none;padding:0;text-align:left}.document-name>span:first-child{width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;border-radius:7px;background:#f5f1e7;color:#9b7a25}.document-name svg{width:17px;height:17px}.document-name>span:last-child{min-width:0}.document-name b{display:block;overflow-wrap:anywhere;font-size:10px;color:#171717}.document-table td>small,.document-name small{display:block;margin-top:4px;color:#888;font-size:8px}.document-open{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.document-open svg{width:13px;height:13px}.document-mobile-list{display:none}.document-mobile-card{border:1px solid #e4e4df;background:#fff;padding:14px}.document-mobile-card>div{display:grid;grid-template-columns:36px 1fr auto;gap:10px;align-items:center}.document-mobile-card>div>span:first-child{width:36px;height:36px;display:grid;place-items:center;border-radius:7px;background:#f5f1e7;color:#9b7a25}.document-mobile-card>div>span:first-child svg{width:17px}.document-mobile-card p{min-width:0;margin:0}.document-mobile-card b{display:block;overflow-wrap:anywhere;font-size:10px}.document-mobile-card small{display:block;margin-top:4px;color:#888;font-size:8px}.document-mobile-card dl{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:14px 0;padding:11px 0;border-block:1px solid #eee}.document-mobile-card dl>div:last-child{grid-column:1/-1}.document-mobile-card dt{font-size:7px;color:#888;text-transform:uppercase;letter-spacing:.5px}.document-mobile-card dd{margin:3px 0 0;font-size:9px;overflow-wrap:anywhere}.document-mobile-card>button{display:flex;width:100%;align-items:center;justify-content:center;gap:6px}.document-mobile-card>button svg{width:13px}.client-document-summary{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;padding:10px 12px;border:1px solid #e7e2d7;background:#faf8f2}.client-document-summary span{font-size:9px}.client-document-summary b{font-size:13px;color:#8e6d1e}.client-document-summary small{font-size:8px;color:#888}.client-document-list article{grid-template-columns:34px minmax(0,1fr) auto auto}.client-document-list article>.status{white-space:nowrap}.modal-card--document .client-modal-back{margin-bottom:12px}.modal-card--document .modal-heading{margin-bottom:18px}.modal-card--document .client-document-notice{border-color:#e3dac0;background:#fbf8ef}.modal-card--document .client-document-detail{grid-template-columns:repeat(3,1fr);gap:8px}.modal-card--document .client-document-detail .panel{padding:11px;border-radius:7px}.modal-card--document .client-document-detail h3{margin:6px 0 0;font-size:10px;line-height:1.35}
@media(max-width:760px){.document-table-scroll{display:none}.document-mobile-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 14px 14px}.client-document-list article{grid-template-columns:30px minmax(0,1fr) auto}.client-document-list article>button{grid-column:1/-1}.modal-card--document .client-document-detail{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.document-toolbar{align-items:stretch;gap:10px}.document-toolbar>div{align-items:flex-start;flex-direction:column}.document-toolbar>.gold-btn{width:100%;justify-content:center}.document-register>.panel-head{padding-inline:14px}.document-mobile-list{grid-template-columns:1fr}.document-mobile-card>div{grid-template-columns:34px minmax(0,1fr)}.document-mobile-card>div>.status{grid-column:2;justify-self:start}.client-document-summary{align-items:flex-start;flex-direction:column;gap:4px}.client-document-list article{grid-template-columns:30px minmax(0,1fr)}.client-document-list article>.status{grid-column:2;justify-self:start}.modal-card--document .client-document-detail{grid-template-columns:1fr 1fr}}
@media(max-width:350px){.modal-card--document .client-document-detail{grid-template-columns:1fr}.document-mobile-card dl{grid-template-columns:1fr}.document-mobile-card dl>div:last-child{grid-column:auto}}

/* Repeat applications for established client relationships */
.repeat-application-guidance{display:flex;align-items:flex-start;gap:10px;margin-top:14px;padding:12px;border:1px solid #e6dfcc;border-radius:7px;background:#fbf8ef;color:#68645b}.repeat-application-guidance>svg{width:17px;height:17px;flex:0 0 17px;color:#987623}.repeat-application-guidance p{margin:0;font-size:9px;line-height:1.55}.repeat-client-card{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;margin-bottom:16px;padding:13px;border:1px solid #e4ddca;border-radius:8px;background:linear-gradient(135deg,#fbfaf6,#f5efdf)}.repeat-client-card>.avatar{width:44px;height:44px;background:#171817;color:#dbba53}.repeat-client-card>div{display:flex;min-width:0;flex-direction:column;gap:4px}.repeat-client-card>div b{font-size:11px;overflow-wrap:anywhere}.repeat-client-card>div small{font-size:8px;color:#7c786f;overflow-wrap:anywhere}.repeat-client-card>span:last-child{display:flex;min-width:76px;flex-direction:column;align-items:flex-end;gap:3px;padding-left:12px;border-left:1px solid #ddd3b9}.repeat-client-card>span:last-child small{font-size:7px;color:#858078;text-transform:uppercase;letter-spacing:.5px}.repeat-client-card>span:last-child b{font-size:17px}
@media(max-width:430px){.repeat-client-card{grid-template-columns:40px minmax(0,1fr)}.repeat-client-card>.avatar{width:40px;height:40px}.repeat-client-card>span:last-child{grid-column:1/-1;align-items:center;flex-direction:row;justify-content:space-between;padding:9px 0 0;border-left:0;border-top:1px solid #ddd3b9}.repeat-application-guidance{padding:10px}}

/* Persistent loan servicing controls */
.days-control{display:flex;align-items:center;gap:7px;white-space:nowrap}.calendar-action{width:28px;height:28px;display:grid;place-items:center;border:1px solid #dedbd2;border-radius:5px;background:#fff;color:#987623;transition:.18s}.calendar-action:hover,.calendar-action:focus-visible{border-color:#b28b2b;background:#f8f2e2}.calendar-action svg{width:14px;height:14px}.due-date-link{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.due-date-link svg{width:14px;height:14px}.loan-mobile-due{width:100%;display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;margin-top:12px;padding:10px 11px;border:1px solid #e4dfd2;border-radius:6px;background:#faf8f1;color:#242421;text-align:left}.loan-mobile-due svg{width:15px;height:15px;color:#987623}.loan-mobile-due span{font-size:10px;font-weight:700}.loan-mobile-due small{font-size:8px;color:#777}
@media(max-width:390px){.loan-mobile-due{grid-template-columns:auto 1fr}.loan-mobile-due small{grid-column:2}}

/* Repayment health thresholds: 0-30 red, 31-89 yellow, 90-100 green */
.progress-track i.repayment-red{background:var(--red)}.progress-track i.repayment-yellow{background:#d39a20}.progress-track i.repayment-green{background:var(--green)}

/* Private document viewer: signed files stay inside the authenticated ROC workspace. */
.modal-card--document{display:flex;flex-direction:column;max-height:min(92vh,920px);padding:24px}.modal-card--document #modalContent{display:flex;min-height:0;flex:1;flex-direction:column}.modal-card--document .client-modal-back{align-self:flex-start}.modal-card--document .modal-heading{flex:0 0 auto}.modal-card--document .secure-document-viewer{display:grid;min-height:0;flex:1;overflow:hidden;border:1px solid #d9d7ce;border-radius:10px;background:#f5f3ed}.modal-card--document .secure-document-frame{width:100%;height:100%;min-height:58vh;border:0;background:#fff}.modal-card--document .secure-document-image{display:block;max-width:100%;max-height:68vh;margin:auto;object-fit:contain;background:#fff}.client-document-list article{min-height:72px;border-radius:9px}.client-document-list article>span:first-child{border-radius:8px}.client-document-list article>.status{max-width:160px;line-height:1.25;text-align:center}.client-document-list article>.filter-btn{min-width:126px;justify-content:center}html[data-roc-theme="dark"] .modal-card--document .secure-document-viewer{border-color:#3c403d;background:#0d1011}html[data-roc-theme="dark"] .modal-card--document .secure-document-frame,html[data-roc-theme="dark"] .modal-card--document .secure-document-image{background:#0d1011}@media(max-width:760px){.modal-card--document{width:calc(100vw - 20px);height:calc(100svh - 20px);max-height:none;padding:18px}.client-document-list article>.status{max-width:none}.client-document-list article>.filter-btn{min-width:0}}@media(max-width:600px){.modal-card--document .secure-document-viewer,.modal-card--document .secure-document-frame{min-height:52vh;height:52vh}}
.secure-document-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 10px;padding:8px;border:1px solid #d9d7ce;border-radius:9px;background:#faf9f5;color:#4b4a45}.secure-document-page-controls,.secure-document-zoom-controls{display:flex;align-items:center;gap:7px}.secure-document-toolbar .filter-btn{min-height:32px;padding:7px 10px}.secure-document-toolbar .filter-btn svg{width:14px;height:14px}.secure-document-toolbar button:disabled{cursor:not-allowed;opacity:.45}.secure-document-pdf-stage{display:grid;min-height:0;flex:1;place-items:start center;overflow:auto;padding:16px;border:1px solid #d9d7ce;border-radius:10px;background:#e9e7e1}.secure-document-pdf-stage canvas{display:block;max-width:none;background:#fff;box-shadow:0 8px 24px rgba(22,22,20,.16)}.secure-document-error{display:flex;align-items:center;justify-content:center;gap:12px;min-height:240px;padding:28px;border:1px solid #d9d7ce;border-radius:10px;background:#faf9f5;color:#5d5b55;text-align:left}.secure-document-error svg{width:28px;color:#a77b16}.secure-document-error div{display:grid;gap:5px}.secure-document-error b{color:#24231f;font-size:13px}.secure-document-error small{font-size:10px}html[data-roc-theme="dark"] .secure-document-toolbar,html[data-roc-theme="dark"] .secure-document-error{border-color:#303a3e;background:#12191d;color:#aeb9bd}html[data-roc-theme="dark"] .secure-document-pdf-stage{border-color:#303a3e;background:#0b1013}html[data-roc-theme="dark"] .secure-document-error b{color:#edf2f3}html[data-roc-theme="dark"] .secure-document-pdf-stage canvas{box-shadow:0 8px 28px rgba(0,0,0,.45)}@media(max-width:600px){.secure-document-toolbar{align-items:stretch;flex-direction:column}.secure-document-page-controls,.secure-document-zoom-controls{justify-content:space-between}.secure-document-pdf-stage{padding:10px}.secure-document-pdf-stage canvas{max-width:100%;height:auto!important}}
