/* Loans workspace only. The locked month/plan layouts are intentionally untouched. */
#loans .loan-workspace-buttons{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px;max-width:100%}
#loans .loan-workspace-button{max-width:100%;min-width:130px;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
#loans .loan-workspace-button small{display:block;font-size:var(--ops-fs-meta);color:var(--muted)}
#loans .loan-workspace-button.active{background:var(--navy);border-color:var(--navy);color:#fff}
#loans .loan-workspace-button.active small{color:#fff;opacity:.8}
#loans .loan-account-details{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 11px;margin-bottom:10px;border-radius:11px}
#loans .loan-account-name{font-size:14px;font-weight:800;overflow-wrap:anywhere}
#loans .loan-readonly{font-size:11px;color:var(--muted);font-weight:700}
#loans .loan-account-details button{margin-right:auto;min-height:34px;padding:6px 10px}
#loans .loan-workspace-stats{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
#loans .loan-workspace-stats .stat{padding:10px 11px;border-radius:11px}
#loans .loan-workspace-stats .stat b{font-size:16px}
#loans .loan-ledger-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:14px 0 8px}
#loans .loan-ledger-head h2{font-size:17px;margin:0 0 2px}
#loans .loan-ledger-head p{margin:0;color:var(--muted);font-size:12px}
#loans .loan-forecast-note{font-size:11px;color:var(--muted);margin:0 0 8px}
#loans .loan-ledger-wrap{overflow:auto;border:1px solid var(--border);border-radius:12px;background:var(--card)}
#loans .loan-ledger{width:100%;border-collapse:collapse;min-width:1050px}
#loans .loan-ledger th,#loans .loan-ledger td{padding:8px 9px;border-bottom:1px solid var(--border);vertical-align:middle;text-align:right;font-size:12px}
#loans .loan-ledger th{font-size:11px;background:var(--card);position:sticky;top:0;z-index:1}
#loans .loan-ledger td:nth-child(3),#loans .loan-ledger td:nth-child(4),#loans .loan-ledger td:nth-child(5),#loans .loan-ledger td:nth-child(6),#loans .loan-ledger td:nth-child(7){white-space:nowrap;font-variant-numeric:tabular-nums}
#loans .loan-ledger td small{display:block;font-size:10px;color:var(--muted);margin-top:2px}
#loans .loan-month-settled{background:var(--greenbg)}
#loans .loan-month-current{background:var(--amberbg)}
#loans .loan-month-future{background:var(--bluebg);color:var(--muted)}
#loans .loan-month-open{background:var(--card)}
#loans .loan-month-diff{color:var(--red)!important;font-weight:700}
#loans .loan-month-actions{margin:0;flex-wrap:nowrap}
#loans .loan-month-actions button{min-height:32px;padding:5px 8px}
@media(max-width:900px){#loans .loan-workspace-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){#loans .loan-workspace-button{flex:1 1 140px;min-width:0}#loans .loan-account-details button{margin-right:0;width:100%}#loans .loan-workspace-stats{grid-template-columns:repeat(2,minmax(0,1fr))}#loans .loan-ledger-head{align-items:flex-start;flex-direction:column}}
