#finance-hub{width:min(1100px,96vw);max-height:90dvh;padding:0;border:1px solid #dce3ef;border-radius:18px;color:#17233c;background:#f8fafc}#finance-hub::backdrop{background:#111b37aa}#finance-hub header{display:flex;justify-content:space-between;align-items:center;gap:12px;background:linear-gradient(115deg,#152441,#383266);color:white;padding:20px 24px}#finance-hub h2{font-size:25px;font-weight:800;margin:0}#finance-hub header p{font-size:13px;margin:4px 0 0}#finance-hub button{padding:11px 15px;border:1px solid #c7d2fe;border-radius:10px;background:#ede9fe;color:#4326a2;font-weight:750;cursor:pointer}#finance-hub header button{background:#ffffff16;color:white;border-color:#ffffff55}#finance-hub button:focus-visible,#finance-hub input:focus-visible{outline:3px solid #a78bfa;outline-offset:2px}.finance-body{padding:20px 24px}.finance-actions{display:flex;flex-wrap:wrap;gap:9px;margin:16px 0}.finance-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.finance-card{padding:18px;border:1px solid #dce3ef;border-top:3px solid #7560ed;background:white;border-radius:12px;min-width:0}.finance-card:nth-child(2n){border-top-color:#0b9f92}.finance-card span{display:block;font-size:13px;font-weight:700}.finance-card strong{display:block;font-size:24px;margin:9px 0;overflow-wrap:anywhere}.finance-card small{color:#52627d;display:block;font-size:12px}#finance-filter{display:flex;align-items:end;gap:12px;flex-wrap:wrap}#finance-filter label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:700}#finance-filter input{padding:10px;border:1px solid #ccd6e7;border-radius:9px;background:white;color:#17233c}.finance-basis{font-size:12px;color:#52627d;margin:16px 0 0;line-height:1.6}@media(max-width:850px){.finance-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:450px){.finance-cards{grid-template-columns:1fr}.finance-body{padding:16px}#finance-hub header{padding:16px}#finance-hub h2{font-size:22px}}
#expense-form[hidden],#expense-table-body button[hidden]{display:none!important}
#supplier-finance{width:min(1100px,96vw);max-height:90dvh;padding:0;border:1px solid #dce3ef;border-radius:18px;color:#17233c;background:#f8fafc}#supplier-finance::backdrop{background:#111b37aa}#supplier-finance header{display:flex;justify-content:space-between;align-items:center;gap:12px;background:linear-gradient(115deg,#152441,#383266);color:white;padding:20px 24px}#supplier-finance h2{font-size:24px;font-weight:800}#supplier-finance h3{font-size:18px;font-weight:750;margin:18px 0 10px}#supplier-finance button{padding:10px 14px;border:1px solid #c7d2fe;border-radius:9px;background:#ede9fe;color:#4326a2;font-weight:750}#supplier-finance header button{color:white;background:#ffffff16;border-color:#ffffff55}#supplier-finance label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:700}#supplier-finance input,#supplier-finance select{padding:10px;border:1px solid #ccd6e7;border-radius:9px;min-width:0;background:white;color:#17233c}#supplier-finance button[hidden]{display:none!important}.sf-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:end}.sf-tools label{flex:1;min-width:160px}.sf-due{font-size:24px;font-weight:800;color:#be123c}.sf-scroll{overflow:auto;margin:15px 0}#supplier-finance table{width:100%;font-size:13px;border-collapse:collapse;background:white}#supplier-finance th,#supplier-finance td{padding:12px;text-align:left;border-bottom:1px solid #e1e7f2;white-space:nowrap}#supplier-finance th{background:#edf1fa}#supplier-finance small{display:block;color:#52627d;max-width:230px;white-space:normal;overflow-wrap:anywhere}#sf-pay{padding:16px;background:#eef7f6;border:1px solid #c8e8e3;border-radius:12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}#sf-pay h3,#sf-pay p{grid-column:1/-1}#sf-pay p{font-size:12px;color:#52627d}#sf-error{color:#b91c1c}#supplier-finance button:disabled{opacity:.5}#supplier-finance button:focus-visible{outline:3px solid #a78bfa;outline-offset:2px}@media(max-width:650px){#sf-pay{grid-template-columns:1fr}#supplier-finance header{padding:16px}#supplier-finance h2{font-size:20px}}
.finance-auto{display:flex;align-items:center;gap:8px;margin:12px 0;font-size:13px;color:#334155}#finance-review>h3,.finance-breakdown h3{font-size:18px;font-weight:750;margin:20px 0 10px}.finance-task{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px;background:#fff;border:1px solid #dce3ef;border-left:4px solid #f4b344;border-radius:12px;margin:10px 0}.finance-task p{font-size:12px;color:#52627d;margin:5px 0}.finance-task b{font-size:15px;color:#be123c}.finance-breakdown{padding:14px;background:white;border:1px solid #dce3ef;border-radius:12px;margin:12px 0}.finance-breakdown div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #edf1f8;font-size:13px}.finance-breakdown strong{white-space:nowrap}
/* Full finance workspace. Keep the overview in place while opening a child page. */
@media screen {
#finance-hub{width:calc(100vw - 24px);height:calc(100dvh - 24px);max-width:none;max-height:none;margin:12px auto;overflow:hidden;position:fixed;inset:0;z-index:35}
#finance-hub header{padding:12px 18px;min-height:66px}#finance-hub h2{font-size:23px}#finance-hub header p{font-size:12px}
#finance-hub>.finance-body{height:calc(100% - 76px);overflow:auto;padding:12px 16px;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);grid-template-rows:auto auto auto auto auto 1fr;gap:9px 16px;align-content:start}
#finance-hub #finance-filter,#finance-hub .finance-actions,#finance-hub .finance-auto,#finance-hub #finance-updated,#finance-hub #finance-cards,#finance-hub .finance-basis{grid-column:1;margin:0}
#finance-hub #finance-filter input{padding:7px}#finance-hub button{padding:8px 11px;font-size:12px}
#finance-hub .finance-actions{gap:6px}#finance-hub .finance-auto{font-size:11px}#finance-hub #finance-updated{font-size:10px}
#finance-hub .finance-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#finance-hub .finance-card{padding:11px;min-height:103px}#finance-hub .finance-card strong{font-size:20px;margin:6px 0}#finance-hub .finance-card span{font-size:12px}#finance-hub .finance-card small{font-size:10px;line-height:1.3}
#finance-hub #finance-review{grid-column:2;grid-row:1 / 9;min-height:0;overflow:auto;align-self:stretch;padding-right:4px}
#finance-hub #finance-review>h3{font-size:18px;margin:0 0 8px}#finance-hub .finance-task{padding:9px 10px;margin:6px 0;gap:8px}#finance-hub .finance-task strong{font-size:12px}#finance-hub .finance-task p{font-size:11px;margin:3px 0}#finance-hub .finance-task b{font-size:13px}
#finance-hub .finance-breakdown{padding:9px;margin:6px 0}#finance-hub .finance-breakdown summary{font-size:12px;font-weight:750;cursor:pointer}#finance-hub .finance-breakdown div{font-size:11px;padding:5px 0}
#finance-hub .finance-basis{font-size:10px;line-height:1.4}
#supplier-finance,#journal-page,#purchase-workspace,body.finance-child-active dialog:has(#oc-close){width:calc(100vw - 24px)!important;height:calc(100dvh - 24px);max-width:none!important;max-height:calc(100dvh - 24px)!important;margin:12px auto;overflow:auto}
#supplier-finance header{padding:12px 18px}#supplier-finance>.finance-body{padding:12px 18px}#supplier-finance h3{margin:10px 0 7px}#supplier-finance th,#supplier-finance td{padding:8px}#sf-pay{padding:10px;gap:8px}#supplier-finance .sf-scroll{margin:8px 0}
#expense-modal,#khata-modal,#summary-modal{padding:12px!important}#expense-modal>div,#khata-modal>div,#summary-modal>div{width:100%!important;max-width:none!important;height:calc(100dvh - 24px)!important;max-height:calc(100dvh - 24px)!important}
#journal-page .jv-head{padding:12px 18px}#journal-page .jv-body{padding:12px 18px}#journal-page .jv-panel{padding:12px}#journal-page .jv-summary{padding:10px;gap:10px}
}
@media screen and (max-width:1050px){#finance-hub>.finance-body{grid-template-columns:1fr;display:block;overflow:auto}#finance-hub #finance-review{margin-top:12px;overflow:visible}#finance-hub .finance-actions,#finance-hub .finance-auto,#finance-hub #finance-cards{margin:9px 0}#finance-hub .finance-cards{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media screen and (max-width:600px){#finance-hub .finance-cards{grid-template-columns:repeat(2,minmax(0,1fr))}#finance-hub>.finance-body{padding:10px}#finance-hub header{padding:10px}#finance-hub .finance-card strong{font-size:18px}}
#wallet-workspace{box-sizing:border-box;width:calc(100vw - 32px);max-width:1600px;height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);padding:0;border:1px solid #dbe3ee;border-radius:16px;background:#f5f7fb;color:#172554;overflow:auto;font-size:14px}#wallet-workspace::backdrop{background:#101b36b3}#wallet-workspace .wallet-header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:16px;background:#172554;color:white;padding:20px 24px}#wallet-workspace h2{font-size:26px;font-weight:800}#wallet-workspace h3{font-size:18px;font-weight:800;margin-bottom:10px}#wallet-workspace p{line-height:1.6}#wallet-workspace .wallet-help{margin:16px 24px;color:#52627d;font-size:13px}#wallet-workspace [role=alert]:not(:empty){margin:12px 24px;padding:12px;color:#991b1b;background:#fee2e2;border-radius:8px}#wallet-workspace [data-wallets]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:0 24px 20px}#wallet-workspace button{cursor:pointer;font-weight:700;border-radius:9px;padding:11px 16px;border:1px solid #c7d2fe;background:#eef2ff;color:#312e81}#wallet-workspace [data-wallet]{margin:0!important;padding:18px!important;text-align:left;background:white;line-height:1.8;min-height:100px;overflow-wrap:anywhere}#wallet-workspace [data-wallet][aria-pressed=true]{background:#e0e7ff;border:2px solid #6366f1!important}#wallet-workspace .wallet-header button{background:#ffffff20;color:white;border-color:#ffffff50}#wallet-workspace [data-statement]{margin:0 24px 18px;padding:20px;background:white;border:1px solid #dbe3ee;border-radius:12px;overflow:auto;min-height:200px}#wallet-workspace [data-statement] .wallet-help{margin:0 0 12px}#wallet-workspace table{border-collapse:collapse;min-width:650px}#wallet-workspace th,#wallet-workspace td{text-align:left;padding:12px;border-bottom:1px solid #e2e8f0;font-size:13px}#wallet-workspace th{background:#eef2ff}#wallet-workspace th:last-child,#wallet-workspace td:last-child{text-align:right;font-variant-numeric:tabular-nums}#wallet-workspace form{margin:0 24px 18px;padding:20px;background:white;border:1px solid #dbe3ee;border-radius:12px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:end}#wallet-workspace form h3,#wallet-workspace form p{grid-column:1/-1}#wallet-workspace form p{color:#52627d;font-size:13px}#wallet-workspace label{display:flex;flex-direction:column;gap:7px;font-weight:700;font-size:13px;min-width:0}#wallet-workspace input,#wallet-workspace select{width:100%;min-width:0;box-sizing:border-box;padding:12px;border:1px solid #cbd5e1;border-radius:8px;background:white;color:#172554;height:46px}#wallet-workspace form button{background:#4338ca;color:white;justify-self:start}#wallet-workspace [hidden]{display:none!important}#wallet-workspace button:disabled{opacity:.5}#wallet-workspace :focus-visible{outline:3px solid #818cf8;outline-offset:2px}.wallet-empty{padding:22px;color:#64748b;background:#f8fafc;border-radius:8px}.workspace-section-label{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#64748b;padding:14px 10px 7px}@media(max-width:900px){#wallet-workspace [data-wallets],#wallet-workspace form{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:550px){#wallet-workspace{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}#wallet-workspace .wallet-header{padding:16px}#wallet-workspace h2{font-size:20px}#wallet-workspace [data-wallets]{padding:0 12px 14px;gap:8px}#wallet-workspace [data-wallet]{padding:12px!important;font-size:12px}#wallet-workspace [data-statement],#wallet-workspace form{margin:0 12px 14px;padding:14px}#wallet-workspace form{grid-template-columns:1fr}#wallet-workspace .wallet-help{margin:12px}}

#wallet-workspace .wallet-name{display:block;font-size:13px}#wallet-workspace .wallet-balance{display:block;font-size:23px;line-height:1.5;font-variant-numeric:tabular-nums}#wallet-workspace .wallet-status{display:block;font-size:11px;color:#64748b;font-weight:500}@media(max-width:550px){#wallet-workspace .wallet-balance{font-size:19px}}
