:root{--bg:#f4f6fa;--navy:#101c34;--blue:#245de3;--line:#e6ebf1;--text:#202d43;--muted:#788497;--green:#168568;--gold:#e4a73b}*{box-sizing:border-box}body{margin:0;background:var(--bg);font:14px/1.45 Inter,system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}header{display:flex;align-items:center;justify-content:space-between;gap:26px;background:var(--navy);color:white;padding:0 38px;min-height:78px;box-shadow:0 8px 30px #18274615}.brand{flex-shrink:0}.logo{font-size:24px;font-weight:900;letter-spacing:-1px}.logo span{color:#eeb64f}.logo small{font-size:10px;letter-spacing:2px;margin-left:6px;color:#aabbd7}.brand-sub{font-size:11px;color:#a2b1c9;margin-top:-4px}nav{display:flex;gap:6px;align-self:stretch;align-items:center;flex-wrap:wrap}nav button{background:none;border:0;color:#acb9d0;padding:12px 16px;border-radius:9px;font-weight:650}nav button.active{background:#2b3c58;color:white}nav button:hover{color:white}.header-actions{display:flex;align-items:center;gap:9px;color:#b1bed1;font-size:12px;white-space:nowrap}.dot{width:8px;height:8px;border-radius:50%;background:#27c88b}.logout{border:1px solid #65728a;background:none;color:#fff;border-radius:7px;padding:7px 10px;margin-left:10px}main{max-width:1460px;margin:0 auto;padding:34px 32px}.topline{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}.eyebrow{font-size:10px;letter-spacing:1.9px;font-weight:800;color:#8592a5}h1{margin:6px 0;font-size:30px;letter-spacing:-1px}h2{margin:7px 0 0;font-size:21px}.sub{color:var(--muted);margin:0}.primary{border:0;border-radius:9px;background:var(--blue);color:white;padding:11px 18px;font-weight:700}.primary:hover{background:#1649c1}.ghost{background:white;border:1px solid #dce3ec;color:#46546b;padding:9px 13px;border-radius:8px}.ghost:hover{background:#f4f7fd}.danger{color:#bf3443!important}.small{font-size:12px;padding:6px 10px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:20px}.stat{background:#fff;border:1px solid var(--line);border-radius:13px;padding:20px}.stat span{display:block;color:var(--muted);font-size:12px}.stat strong{display:block;font-size:24px;margin-top:7px;letter-spacing:-.6px}.stat em{display:block;font-style:normal;color:#8b96a6;font-size:11px;margin-top:5px}.panel{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 4px 18px #26385407;overflow:hidden}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 19px;border-bottom:1px solid var(--line)}.subnav{display:flex;gap:6px;flex-wrap:wrap}.subnav button{border:0;background:#f2f5f9;color:#66758a;border-radius:7px;padding:8px 12px;font-weight:600}.subnav button.active{background:#e9efff;color:#2356d6}.tools{display:flex;gap:8px}.tools input,.filter-row input,.filter-row select{border:1px solid #dce3ed;background:#fff;border-radius:8px;padding:9px 12px;min-width:180px}.filter-row{display:flex;flex-wrap:wrap;gap:12px;padding:15px 20px;border-bottom:1px solid var(--line);align-items:end}.filter-row label{font-size:11px;font-weight:700;color:#768397;display:flex;flex-direction:column;gap:5px}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap}th{background:#f8fafd;color:#7a8798;font-size:11px;text-align:left;text-transform:uppercase;letter-spacing:.5px;font-weight:800;padding:15px 18px;border-bottom:1px solid var(--line)}td{padding:15px 18px;border-bottom:1px solid #eff2f6}tr:hover td{background:#fafcff}tbody tr:last-child td{border-bottom:none}.name{font-weight:700;color:#24344e}.muted{color:#8b97a8}.num{text-align:right;font-variant-numeric:tabular-nums;font-weight:650}.actions{display:flex;gap:6px;justify-content:flex-end}.pill{border-radius:99px;font-size:11px;padding:5px 9px;font-weight:750;display:inline-block;background:#edf1f6;color:#546378}.pill.paid,.pill.posted,.pill.approved{color:#128267;background:#e6f8f1}.pill.cancelled{color:#bd4754;background:#fff0f0}.table-foot{padding:12px 18px;color:#8d9aab;font-size:12px;background:#fcfdff;border-top:1px solid #eef1f5}.empty{text-align:center;padding:70px 20px;color:#8996a8}footer{color:#a0aab9;text-align:center;font-size:11px;margin-top:24px}.overlay{position:fixed;inset:0;background:#0c1b31aa;z-index:10;display:flex;align-items:center;justify-content:center;padding:20px}.overlay[hidden],.auth-wrap[hidden],[hidden]{display:none!important}.dialog{background:white;width:min(820px,100%);max-height:94vh;overflow-y:auto;border-radius:16px;box-shadow:0 24px 70px #07142845}.dialog-head{display:flex;justify-content:space-between;align-items:start;padding:24px 28px;border-bottom:1px solid var(--line)}.close{background:#f3f5f8;border:0;border-radius:8px;font-size:23px;width:36px;height:36px;color:#758296}#editor{padding:26px 28px}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field.full{grid-column:1/-1}.field label{font-size:12px;font-weight:750;color:#58677b}.field input,.field select,.field textarea,.line-row input,.line-row select{width:100%;border:1px solid #dbe2eb;background:#fff;border-radius:8px;padding:11px 12px;min-width:0;color:#24344e}.field textarea{min-height:78px;resize:vertical}.section-title{font-size:14px;font-weight:800;margin:24px 0 12px;padding-top:17px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.line-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(100px,1fr) 38px;gap:10px;margin-bottom:9px}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:26px;padding-top:20px;border-top:1px solid var(--line)}.toast{position:fixed;bottom:24px;right:24px;background:#172b44;color:#fff;padding:13px 18px;border-radius:9px;z-index:30;box-shadow:0 8px 28px #101c3433}.toast.bad{background:#a53b44}.auth-wrap{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 30% 30%,#243a61,#101b33 70%);padding:20px}.auth-box{background:#fff;border-radius:18px;padding:36px;width:min(430px,100%);box-shadow:0 15px 50px #0003}.auth-box h2{margin-top:25px}.auth-box p{color:#77869a}.auth-box label{display:block;font-size:12px;font-weight:800;margin:18px 0}.auth-box input{display:block;width:100%;border:1px solid #dce2e9;border-radius:8px;padding:12px;margin-top:7px}.full{width:100%}.error{color:#c3364d!important}.report-hint{padding:12px 20px;font-size:12px;color:#687991;background:#f7faff}.money-neg{color:#b64050}@media(max-width:940px){header{padding:14px 20px;flex-wrap:wrap}nav{order:3;width:100%;overflow-x:auto}main{padding:24px 15px}.stats{grid-template-columns:repeat(2,1fr)}.toolbar{flex-wrap:wrap}.tools{width:100%}.tools input{flex:1}.topline{align-items:start}}@media(max-width:540px){.stats{grid-template-columns:1fr}.field-grid{grid-template-columns:1fr}.field.full{grid-column:1}.dialog-head,#editor{padding:18px}.topline{flex-direction:column}.line-row{grid-template-columns:1fr 100px 32px}}

.form-note{grid-column:1/-1;color:#6b5e2d;background:#fff8dc;padding:12px;border-radius:8px}.header-actions #currentUser{font-weight:700;color:#fff;max-width:250px;overflow:hidden;text-overflow:ellipsis}


.brand-logo{display:flex;align-items:center;gap:12px}.brand-logo img{display:block;width:52px;height:52px;object-fit:contain;border-radius:12px;background:#fff;padding:4px;box-shadow:0 2px 12px rgba(0,0,0,.12)}.logo-text{display:flex;flex-direction:column;line-height:1.05}.logo-text small{margin-left:0;margin-top:4px}.auth-box .brand-logo{justify-content:center}.auth-box .brand-logo img{width:74px;height:74px}.table-scroll{-webkit-overflow-scrolling:touch}.actions button{white-space:nowrap}.dialog{width:min(920px,100%)}#fields .field select,#fields .field input,#fields .field textarea{max-width:100%}.header-actions{flex-wrap:wrap;justify-content:flex-end}@media(max-width:1100px){header{padding:14px 18px;align-items:flex-start}.brand{width:100%}.header-actions{width:100%;justify-content:space-between}.topline{flex-direction:column;align-items:flex-start}.toolbar{align-items:flex-start}.tools{flex-wrap:wrap}.tools input{min-width:0;width:100%}}@media(max-width:760px){body{font-size:13px}header{gap:14px}nav{gap:8px;padding-bottom:4px}nav button{padding:10px 12px;white-space:nowrap}.brand-logo img{width:44px;height:44px}.logo-text{font-size:18px}.logo-text small{font-size:9px;letter-spacing:1.5px}main{padding:18px 12px}.panel{border-radius:12px}.toolbar,.filter-row,.table-foot{padding:12px}.tools{width:100%}.tools button,.tools input,#primaryActions button,.filter-row button,.modal-actions button{width:100%}.subnav{width:100%;overflow:auto;flex-wrap:nowrap;padding-bottom:2px}.subnav button{white-space:nowrap}.table-scroll table{min-width:720px}.actions{flex-direction:column;align-items:stretch}.actions button{width:100%}.modal-actions{flex-direction:column-reverse}.modal-actions button{width:100%}.line-row{grid-template-columns:1fr}.line-row button{width:100%}.auth-box{padding:24px 18px}}@media(max-width:480px){.stats{grid-template-columns:1fr}.dialog{border-radius:12px;max-height:100vh}.overlay{padding:10px}.dialog-head,#editor{padding:14px}.auth-box .brand-logo img{width:64px;height:64px}.header-actions #currentUser{max-width:100%}}

/* v1.3 UI refinements */
header{padding:12px 28px;min-height:64px;gap:18px;position:sticky;top:0;z-index:5}.brand{display:flex;align-items:center;gap:12px;min-width:0}.header-logo-wrap{display:flex;align-items:center;justify-content:center;flex:0 0 auto}.header-logo{display:block;width:148px;max-width:100%;height:auto;object-fit:contain}.header-brand-title{font-size:18px;font-weight:800;line-height:1.05;color:#fff;letter-spacing:-.2px}.brand-sub{margin-top:2px}.auth-wrap{background:radial-gradient(circle at 25% 20%,#2c4677,#0e1b34 72%)}.auth-box{width:min(420px,100%);padding:28px 26px;border:1px solid rgba(255,255,255,.25)}.auth-logo-wrap{display:flex;justify-content:center;align-items:center;margin-bottom:8px}.auth-logo{display:block;width:min(100%,220px);height:auto;object-fit:contain}.auth-brand{text-align:center;font-size:26px;font-weight:800;letter-spacing:-.4px;color:#14294c}.auth-brand span{display:block;font-size:12px;letter-spacing:3px;text-transform:uppercase;color:#9e7b67;margin-top:4px}.auth-box h2{margin-top:18px;font-size:30px;letter-spacing:-.8px}.auth-box p{margin-top:8px}.auth-box label{margin:16px 0 0}.auth-box input{margin-top:6px;padding:13px 14px}.auth-box .primary{margin-top:18px}.logo,.brand-logo,.logo-text{all:unset}.header-actions #currentUser{max-width:180px}.form-note{font-size:12px;line-height:1.45}#authError{margin-top:12px;text-align:center}.subnav button,.ghost,.primary,.logout{transition:.18s ease}@media(max-width:1100px){header{padding:12px 16px}.header-logo{width:120px}.header-brand-title{font-size:16px}}@media(max-width:760px){header{min-height:auto;gap:12px}.brand{gap:10px;width:auto}.header-logo{width:108px}.header-brand-title{font-size:15px}.brand-sub{font-size:10px}.header-actions{font-size:11px}.nav button{padding:10px 12px}.auth-box{padding:22px 16px}.auth-logo{width:min(100%,180px)}.auth-brand{font-size:22px}.auth-box h2{font-size:24px}}@media(max-width:480px){header{padding:10px 12px}.header-logo{width:92px}.header-brand-title{font-size:14px}.header-actions{width:100%;justify-content:space-between}.auth-brand{font-size:20px}.auth-box h2{font-size:21px}}
/* v1.4 — all directory tabs visible on desktop and mobile */
.subnav{overflow:visible;flex-wrap:wrap;min-width:0}.subnav button{white-space:nowrap;flex-shrink:0}nav{min-width:0}#subnav{overflow:visible!important;flex-wrap:wrap!important}@media(max-width:760px){.subnav{overflow:visible!important;flex-wrap:wrap!important;padding-bottom:0}.subnav button{font-size:12px;padding:9px 10px}#topNav{flex-wrap:wrap;overflow:visible}#topNav button{flex-shrink:0}}

/* v1.6: multi-organization balances modal table */
.dialog{width:min(1100px,calc(100vw - 24px))}.balance-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.balance-help{font-size:12px;color:#66768b;margin:5px 0 14px;line-height:1.5}.balance-scroll{overflow-x:auto;max-width:100%;border:1px solid #e3e9f0;border-radius:10px;-webkit-overflow-scrolling:touch}.balance-entry{width:100%;min-width:860px;white-space:normal}.balance-entry th{padding:10px 9px}.balance-entry td{padding:8px 9px;vertical-align:middle}.balance-entry td select,.balance-entry td input{width:100%;min-width:0;border:1px solid #dbe2eb;border-radius:7px;padding:9px 7px;background:white}.balance-entry td:nth-child(2){min-width:240px}.balance-entry td:nth-child(6){min-width:125px}.balance-entry td:nth-child(7){width:45px}.balance-org-label{display:block;font-size:11px;color:#607189;margin-top:3px}.balance-iban{font-size:12px;word-break:break-word}.balance-count{margin-top:9px;text-align:right;font-size:12px;color:#69778a}.empty-lines{text-align:center;color:#7d899a;padding:22px!important}.line-index{color:#718198;width:34px}.balance-entry input{text-align:right;font-variant-numeric:tabular-nums}@media(max-width:680px){.balance-toolbar{width:100%}.balance-toolbar button{flex:1}.section-title:has(.balance-toolbar){flex-wrap:wrap;gap:10px}.balance-scroll{margin:0 -3px}.balance-help{font-size:12px}.dialog{width:calc(100vw - 12px)}.overlay{padding:6px}}

/* v1.7: two-page balance document */
.balance-tabs{display:flex;gap:8px;border-bottom:1px solid #e5eaf2;margin:0 0 20px;padding-bottom:10px}.balance-tab{border:1px solid #dfe6ef;background:#f5f7fa;color:#617084;border-radius:9px;padding:11px 20px;font-weight:750}.balance-tab.active{background:#eaf0ff;border-color:#b8cdfc;color:#214fbb}.balance-tab:focus-visible{outline:3px solid #91b0ff;outline-offset:2px}#balanceGeneral[hidden],#lineEditor[hidden]{display:none!important}@media(max-width:600px){.balance-tabs{display:grid;grid-template-columns:1fr 1fr}.balance-tab{padding:11px 9px;font-size:13px}}

/* v1.8 Excel-style bank-balance matrix */
.matrix-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:12px;white-space:nowrap}
.matrix-table th,.matrix-table td{border-right:1px solid #333;border-bottom:1px solid #333;padding:7px 10px}
.matrix-table tr>*:first-child{border-left:1px solid #333}
.matrix-table thead tr:first-child th{border-top:1px solid #333}
.matrix-table .matrix-gold{background:#ffc000;color:#171717;text-align:center;min-width:110px;font-weight:800}
.matrix-table .matrix-gold small{display:block;color:#171717;font-size:11px;margin-top:3px}
.matrix-table .matrix-index{width:40px;min-width:40px;text-align:center}
.matrix-table .matrix-org{position:sticky;left:40px;z-index:1;background:white;min-width:220px;text-align:left}
.matrix-table thead .matrix-org{z-index:3;background:#ffc000}
.matrix-table .matrix-value,.matrix-table .matrix-sum{text-align:right;font-variant-numeric:tabular-nums}
.matrix-table .matrix-sum{background:#fce4d6;font-weight:700}
.matrix-table .matrix-total td{background:#ffff00!important;color:#ad1010;font-weight:800;text-align:right}
.matrix-table .matrix-total td:first-child{text-align:center;color:#111;position:sticky;left:0;z-index:2}
@media(max-width:760px){.matrix-table .matrix-org{min-width:160px}.matrix-table th,.matrix-table td{padding:8px}.matrix-table .matrix-gold{min-width:94px}}
@media print{header,.toolbar,.filter-row,#primaryActions,.stats,footer{display:none!important}.matrix-table{font-size:9px}.matrix-table .matrix-org{position:static}.matrix-table .matrix-total td:first-child{position:static}.table-scroll{overflow:visible!important}}

/* v1.9 bank group headings + limit columns */
.matrix-group-head th{text-align:center;background:#cfa657!important;color:#172b42!important;font-size:12px!important}.matrix-table thead th{vertical-align:middle;white-space:nowrap}.matrix-table thead th small{display:block;font-size:10px;font-weight:600;letter-spacing:0}.matrix-table .money-neg{color:#b22230;font-weight:800}

/* v2.0: Separate vertical group tables matching the reference sheet */
.matrix-sections{display:flex;flex-direction:column;gap:32px;padding:18px 16px 24px}.matrix-sections[hidden]{display:none!important}.matrix-group-section{max-width:100%;min-width:0}.matrix-section-title{font-weight:800;font-size:15px;color:#23354f;margin-bottom:10px}.matrix-section-scroll{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}.matrix-group-section .matrix-table{width:max-content;min-width:100%}.matrix-group-section .matrix-table thead th{border-top:1px solid #333}.matrix-group-section .matrix-table .matrix-org{position:static;background:white}.matrix-group-section .matrix-table thead .matrix-org{background:#ffc000}.matrix-group-section .matrix-table .matrix-total td:first-child{position:static}.matrix-group-section .matrix-table th small{white-space:nowrap}@media(max-width:760px){.matrix-sections{gap:25px;padding:12px 8px 16px}}@media print{.matrix-sections{display:block;padding:0}.matrix-group-section{break-inside:avoid;margin:0 0 14mm}.matrix-section-scroll{overflow:visible}}

/* v2.1 plan form and grouped obligation report */
.plan-line-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.plan-lines-table{min-width:710px;width:100%}.plan-lines-table th,.plan-lines-table td{padding:10px;vertical-align:middle}.plan-lines-table select,.plan-lines-table input[type=number]{width:100%;min-width:120px;padding:10px;border:1px solid #dbe2eb;border-radius:7px}.plan-lines-table .plan-check{text-align:center}.plan-lines-table input[type=checkbox]{width:20px;height:20px;accent-color:#245de3;cursor:pointer}.plan-report-heading td{background:#e9efff!important;color:#1e427c;font-weight:700;border-top:2px solid #b9cbee}.plan-report-heading .num{white-space:nowrap}@media(max-width:600px){.plan-lines-table{min-width:650px}.plan-lines-table th,.plan-lines-table td{padding:7px}}

/* v2.2 plan notes */
.plan-lines-table input[data-key="notes"]{min-width:180px;width:100%;box-sizing:border-box}.plan-lines-table th:nth-child(5),.plan-lines-table td:nth-child(5){min-width:190px}.plan-report-note{max-width:320px;white-space:normal;overflow-wrap:anywhere}.matrix-table .matrix-amount{min-width:105px}

/* v2.3: Excel-style grouped expense report, without group captions */
.plan-lines-table input[data-key="line_name"]{width:100%;min-width:145px;padding:10px;border:1px solid #dbe2eb;border-radius:7px}
.plan-lines-table{min-width:1050px}
.expense-group-section{margin:0 0 25px;break-inside:avoid}
.expense-report-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.expense-report-table{width:100%;min-width:720px;border-collapse:collapse;color:#171717;font-size:14px;table-layout:fixed;white-space:normal}
.expense-report-table th,.expense-report-table td{border:1px solid #555;padding:8px 10px;vertical-align:middle}
.expense-report-table th{background:#c9aa98;color:#151515;font-size:14px;text-transform:none;letter-spacing:0;text-align:center;font-weight:800}
.expense-report-table th:first-child{background:#f8cfaa;width:22%}
.expense-report-table th:nth-child(2){width:27%}
.expense-report-table th:nth-child(3){width:21%}
.expense-report-table th:nth-child(4),.expense-report-table th:nth-child(5){width:15%}
.expense-report-table tbody td{background:#d2d2d2;color:#151515}
.expense-report-table tbody tr:hover td{background:#c5c5c5}
.expense-report-table .expense-group-total td{background:#d5dc00!important;color:#c00000;font-weight:800;font-size:15px}
.expense-report-table .expense-group-total td:first-child{text-align:center}
.expense-category{display:block;color:#555;font-size:11px;font-weight:400;margin-top:3px}
.expense-line-name{font-weight:700;overflow-wrap:anywhere}
.expense-note{overflow-wrap:anywhere}
.expense-done{color:#158568;font-weight:900}
@media print{.expense-report-scroll{overflow:visible}.expense-report-table{font-size:11px;min-width:0}.expense-report-table th,.expense-report-table td{padding:5px;print-color-adjust:exact;-webkit-print-color-adjust:exact}.expense-group-section{page-break-inside:avoid}}

/* v2.4: balance document matrix — organizations as rows, banks/currencies as columns */
.balance-matrix-sections{display:flex;flex-direction:column;gap:25px;margin-top:14px}
.balance-matrix-group{min-width:0}
.balance-matrix-scroller{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #b7bec8;border-radius:6px}
.balance-matrix-table{border-collapse:collapse;width:max-content;min-width:100%;white-space:nowrap;font-size:12px}
.balance-matrix-table th,.balance-matrix-table td{border:1px solid #62656c;padding:8px 9px}
.balance-matrix-table thead th{background:#ffc000;color:#111;text-align:center;font-weight:800;min-width:130px}
.balance-matrix-table thead th:first-child{min-width:44px;width:44px}
.balance-matrix-table thead th:nth-child(2){min-width:220px;text-align:left}
.balance-matrix-table th small{display:block;margin-top:3px;font-weight:600;color:#141414}
.balance-matrix-table tbody td{background:#fff}
.balance-matrix-index{text-align:center;min-width:44px}
.balance-matrix-organization{min-width:220px;font-weight:700}
.balance-matrix-money{min-width:130px;padding:4px!important}
.balance-matrix-money input{width:100%;min-width:110px;max-width:170px;border:1px solid transparent;border-radius:4px;padding:10px 7px;text-align:right;color:#172b42;background:transparent;font-weight:650;font-variant-numeric:tabular-nums}
.balance-matrix-money input:focus{background:#eff5ff;border-color:#2563eb;outline:2px solid #98bafd}
.balance-matrix-empty{text-align:center;color:#a0a9b5!important;background:#f3f5f9!important}
.balance-matrix-table tfoot td{background:#ffff00!important;color:#b20d23;font-weight:850;text-align:right}
.balance-matrix-table tfoot td:first-child{text-align:center;color:#222}
@media(max-width:720px){.balance-matrix-table thead th:nth-child(2),.balance-matrix-organization{min-width:170px}.balance-matrix-table td,.balance-matrix-table th{padding:7px}.balance-matrix-money input{min-width:96px}}
@media print{.balance-matrix-scroller{overflow:visible}.balance-matrix-table{font-size:10px}.balance-matrix-table thead th,.balance-matrix-table tfoot td{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* v2.6: Nağd hərəkətlər modalı və bank hesabatının aşağı hissəsi */
.cash-form-heading{grid-column:1/-1;font-weight:800;color:#344760;font-size:14px;margin-top:13px;padding:10px 12px;background:#eff3fa;border-left:4px solid #b18a75;border-radius:5px}.cash-report-section{margin:18px 0 0;max-width:850px}.cash-report-title{font-size:16px;font-weight:800;margin:0 0 10px;color:#22334c}.cash-report-scroll{max-width:100%;overflow-x:auto}.cash-report-table{border-collapse:collapse;min-width:500px;width:100%;white-space:normal}.cash-report-table th,.cash-report-table td{border:1px solid #52575c;padding:9px 12px}.cash-report-table th{background:#c9aa98;color:#1a1a1a}.cash-report-table td:first-child{font-weight:750}.cash-report-total td{background:#ffff00!important;font-weight:800;color:#b0232d}@media(max-width:650px){.cash-report-table{font-size:12px}.cash-report-table th,.cash-report-table td{padding:8px}}

/* v2.7: Bank qalıqları hesabatında nağd hərəkətlər – nümunə matrisi */
.cash-report-section{width:min(100%,550px);max-width:550px;margin:24px 0 12px;}
.cash-report-scroll{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.cash-report-table{width:100%;min-width:390px;table-layout:fixed;border-collapse:collapse;white-space:normal;font-family:Calibri,Arial,sans-serif;font-size:15px;font-weight:700;color:#050505}
.cash-report-table th,.cash-report-table td{border:2px solid #050505;padding:3px 8px;text-transform:none;letter-spacing:0;font-size:15px;height:23px;line-height:1.15;background:#fff;color:#050505}
.cash-report-table th:first-child{width:40%}.cash-report-table td:last-child{width:25%}
.cash-report-table .cash-sun th,.cash-report-table .cash-sun td{background:#ffff00!important}
.cash-report-table .cash-sun th{font-style:italic;text-align:center;font-weight:800}
.cash-report-table .cash-left{text-align:left!important;font-style:italic;font-weight:800}
.cash-report-table .cash-vat th{background:#fff!important;font-style:italic;font-weight:800}
.cash-report-table .cash-vat th:first-child{text-align:center}
.cash-report-table .cash-amount{text-align:right!important;white-space:nowrap;color:#ed0000!important;font-weight:900;font-style:normal;font-variant-numeric:tabular-nums}
.cash-report-table .cash-space td{height:14px;padding:0;border:0;background:transparent!important}
@media(max-width:550px){.cash-report-table{font-size:12px}.cash-report-table th,.cash-report-table td{font-size:12px;padding:3px 5px}.cash-report-section{max-width:100%}}
@media print{.cash-report-table .cash-sun th,.cash-report-table .cash-sun td{background:#ffff00!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* v2.9: source disclosure without changing the reference table design. */
.cash-report-source{font:12px/1.4 Inter,system-ui,sans-serif;color:#52627b;margin:0 0 7px}
.cash-report-missing{padding:11px 12px;border:1px solid #e4e8ef;border-radius:8px;background:#f8fafc}
@media print{.cash-report-source{font-size:10px;color:#444}}

/* v3.0: Ödəniş planı cədvəli; mövcud sistem dizaynı saxlanır. */
.payment-plan-lines{min-width:1040px}
.payment-plan-lines input[data-key="payment_name"]{min-width:165px}
.payment-plan-lines input[data-key="notes"]{min-width:155px}
.payment-plan-report-section{max-width:100%;margin:22px 0 12px}
.payment-plan-report-section .section-title{margin:0 0 12px;border:0;padding:0;color:#24344e}
.payment-plan-report-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.payment-plan-report-table{width:100%;min-width:750px;border-collapse:collapse;white-space:normal;font-size:13px;color:#111}
.payment-plan-report-table th,.payment-plan-report-table td{border:1px solid #444;padding:8px 10px}
.payment-plan-report-table th{background:#ffc000;color:#111;text-transform:none;font-size:13px;letter-spacing:0}
.payment-plan-report-table tfoot td{background:#ffff00!important;font-weight:800;color:#aa1122}
.payment-plan-report-table td:nth-child(4){max-width:240px;overflow-wrap:anywhere}
@media print{.payment-plan-report-scroll{overflow:visible}.payment-plan-report-table{font-size:10px;min-width:0}.payment-plan-report-table th,.payment-plan-report-table tfoot td{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* v3.3 — Bank qalıqları only: remove top cards and use the available viewport */
#app.bank-report-wide main{max-width:none;width:100%;padding:10px 12px 24px}
#app.bank-report-wide .topline,#app.bank-report-wide #summary{display:none!important}
#app.bank-report-wide .panel{width:100%;max-width:none;overflow:hidden}
#app.bank-report-wide .matrix-sections{width:100%;max-width:none;padding:12px 10px 24px;min-width:0}
#app.bank-report-wide .matrix-group-section{width:100%;min-width:0;max-width:100%}
#app.bank-report-wide .matrix-section-scroll{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden}
#app.bank-report-wide .matrix-section-scroll.fitted-report{overflow:hidden}
#app.bank-report-wide .matrix-group-section .matrix-table{width:max-content;min-width:0;margin:0}
#app.bank-report-wide #filters .filter-row{gap:8px}
#app.bank-report-wide .matrix-table th,#app.bank-report-wide .matrix-table td{padding:6px 7px}
#app.bank-report-wide .matrix-table .matrix-org{min-width:160px}
#app.bank-report-wide .matrix-table .matrix-gold{min-width:84px}
#app.bank-report-wide .matrix-table .matrix-index{min-width:34px;width:34px}
@media(max-width:720px){#app.bank-report-wide main{padding:6px 4px 16px}#app.bank-report-wide .matrix-sections{padding:8px 3px 16px}#app.bank-report-wide .matrix-table .matrix-org{min-width:150px}#app.bank-report-wide .matrix-table th,#app.bank-report-wide .matrix-table td{padding:6px 5px}}
@media print{#app.bank-report-wide .matrix-section-scroll{overflow:visible!important}#app.bank-report-wide main{padding:0}#app.bank-report-wide .matrix-group-section .matrix-table{zoom:1!important}}


/* v3.4: Bütün Bank qalıqları hesabat blokları eyni enə malikdir.
   Məlumatlar kəsilmir: dar ekranlarda cədvəllərin daxilində üfüqi sürüşdürmə olur. */
#app.bank-report-wide #matrixSections{
  display:flex;flex-direction:column;align-items:stretch;gap:22px;
  width:100%;max-width:100%;min-width:0;
}
#app.bank-report-wide #matrixSections > .matrix-group-section,
#app.bank-report-wide #matrixSections > .cash-report-section,
#app.bank-report-wide #matrixSections > .payment-plan-report-section{
  display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;
  margin-left:0;margin-right:0;
}
#app.bank-report-wide #matrixSections .matrix-section-scroll,
#app.bank-report-wide #matrixSections .cash-report-scroll,
#app.bank-report-wide #matrixSections .payment-plan-report-scroll{
  width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}
#app.bank-report-wide #matrixSections .matrix-section-scroll.fitted-report{overflow-x:auto}
#app.bank-report-wide #matrixSections .matrix-group-section .matrix-table{
  width:100%;min-width:max-content;margin:0;zoom:1!important;
  white-space:nowrap;
}
#app.bank-report-wide #matrixSections .matrix-table .matrix-org{min-width:180px}
#app.bank-report-wide #matrixSections .matrix-table .matrix-amount{min-width:95px}
#app.bank-report-wide #matrixSections .cash-report-table{
  width:100%;min-width:550px;max-width:none;table-layout:fixed;
}
#app.bank-report-wide #matrixSections .cash-report-table .cash-sun th,
#app.bank-report-wide #matrixSections .cash-report-table .cash-vat th{
  overflow-wrap:anywhere;
}
#app.bank-report-wide #matrixSections .cash-report-table td.cash-amount{
  white-space:nowrap;
}
#app.bank-report-wide #matrixSections .payment-plan-report-table{
  width:100%;min-width:650px;table-layout:auto;
}
#app.bank-report-wide #matrixSections .payment-plan-report-table th:nth-child(1){width:55px}
#app.bank-report-wide #matrixSections .payment-plan-report-table th:nth-child(2){width:auto}
#app.bank-report-wide #matrixSections .payment-plan-report-table th:nth-child(3){width:170px}
#app.bank-report-wide #matrixSections .payment-plan-report-table th:nth-child(4){width:100px}
@media (max-width:720px){
 #app.bank-report-wide #matrixSections .cash-report-table{min-width:480px}
 #app.bank-report-wide #matrixSections .payment-plan-report-table{min-width:620px}
}
@media print{
 #app.bank-report-wide #matrixSections .matrix-group-section .matrix-table{zoom:1!important}
 #app.bank-report-wide #matrixSections .matrix-section-scroll,
 #app.bank-report-wide #matrixSections .cash-report-scroll,
 #app.bank-report-wide #matrixSections .payment-plan-report-scroll{overflow:visible}
}


/* v3.5 — single screen bank report; original tables, colors and source data preserved. */
body:has(#app.bank-report-wide:not([hidden])){overflow:hidden}
#app.bank-report-wide{height:100dvh;overflow:hidden;--bank-header-height:72px}
#app.bank-report-wide header{min-height:0;padding-top:5px;padding-bottom:5px}
#app.bank-report-wide .brand .header-logo{width:68px}
#app.bank-report-wide .brand .header-brand-title{font-size:14px}
#app.bank-report-wide .brand .brand-sub{display:none}
#app.bank-report-wide nav button{padding:7px 10px}
#app.bank-report-wide main{height:calc(100dvh - var(--bank-header-height));min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:4px 9px 5px!important}
#app.bank-report-wide .panel{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;overflow:hidden}
#app.bank-report-wide .toolbar{padding:5px 8px;gap:6px;flex-shrink:0}
#app.bank-report-wide .subnav button{padding:5px 8px}
#app.bank-report-wide .tools input{padding:5px 8px;min-width:130px}
#app.bank-report-wide .tools button{padding:5px 8px}
#app.bank-report-wide .filter-row{padding:4px 8px;gap:8px;flex-shrink:0}
#app.bank-report-wide .filter-row input,#app.bank-report-wide .filter-row select{padding:4px 7px}
#app.bank-report-wide .filter-row button{padding:5px 8px}
#app.bank-report-wide #tableFooter,#app.bank-report-wide main>footer{display:none!important}
#app.bank-report-wide #matrixSections{display:block!important;position:relative;flex:1 1 auto;height:auto;min-height:0;width:100%;padding:0!important;margin:0;overflow:hidden!important}
#app.bank-report-wide #matrixSections[hidden]{display:none!important}
#app.bank-report-wide .report-fit-canvas{position:absolute;top:0;left:0;transform-origin:top left;display:flex;flex-direction:column;gap:6px;margin:0;padding:3px;box-sizing:border-box}
#app.bank-report-wide .report-fit-canvas>.matrix-group-section,#app.bank-report-wide .report-fit-canvas>.cash-report-section{width:100%!important;max-width:none!important;margin:0!important}
#app.bank-report-wide .report-fit-canvas .matrix-section-title{margin:0 0 2px;padding:1px 4px;font-size:12px}
#app.bank-report-wide .report-fit-canvas .matrix-section-scroll,#app.bank-report-wide .report-fit-canvas .cash-report-scroll,#app.bank-report-wide .report-fit-canvas .payment-plan-report-scroll{width:100%;overflow:visible!important;max-width:none}
#app.bank-report-wide .report-fit-canvas .matrix-table{width:100%!important;min-width:max-content;zoom:1!important;margin:0}
#app.bank-report-wide .report-fit-canvas .matrix-table th,#app.bank-report-wide .report-fit-canvas .matrix-table td{padding:3px 5px;font-size:12px;height:auto}
#app.bank-report-wide .report-fit-canvas .matrix-table .matrix-org{min-width:140px}
#app.bank-report-wide .report-fit-canvas .matrix-table .matrix-amount{min-width:82px}
#app.bank-report-wide .report-fit-canvas .cash-report-source{margin:0 0 2px;font-size:10px}
#app.bank-report-wide .report-fit-canvas .cash-report-table{width:100%;max-width:none;min-width:0;table-layout:fixed}
#app.bank-report-wide .report-fit-canvas .cash-report-table td,#app.bank-report-wide .report-fit-canvas .cash-report-table th{padding:2px 5px;height:auto;font-size:12px}
#app.bank-report-wide .report-fit-canvas .cash-report-table .cash-space td{height:5px}
#app.bank-report-wide .payment-report-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;width:100%;min-width:0;align-items:start}
#app.bank-report-wide .payment-report-pair>.payment-plan-report-section{margin:0!important;width:100%;min-width:0;max-width:none}
#app.bank-report-wide .payment-report-pair .section-title{margin:0 0 3px!important;padding:0;font-size:12px;line-height:1.3}
#app.bank-report-wide .payment-report-pair .payment-plan-report-table{width:100%;min-width:0!important;table-layout:fixed;font-size:11px}
#app.bank-report-wide .payment-report-pair .payment-plan-report-table th,#app.bank-report-wide .payment-report-pair .payment-plan-report-table td{padding:3px 5px;font-size:11px;overflow-wrap:anywhere}
#app.bank-report-wide .payment-report-pair .payment-plan-report-table th:nth-child(1){width:30px}
#app.bank-report-wide .payment-report-pair .payment-plan-report-table th:nth-child(3){width:100px}
#app.bank-report-wide .payment-report-pair .payment-plan-report-table th:nth-child(4){width:55px}
@media(max-width:720px){#app.bank-report-wide header{padding:3px 7px}#app.bank-report-wide .brand .header-logo{width:45px}#app.bank-report-wide nav{padding:0;margin:0}#app.bank-report-wide .toolbar{padding:3px}#app.bank-report-wide .payment-report-pair{gap:5px}}
@media print{
 body:has(#app.bank-report-wide:not([hidden])){overflow:visible!important}
 #app.bank-report-wide,#app.bank-report-wide main,#app.bank-report-wide .panel,#app.bank-report-wide #matrixSections{height:auto!important;overflow:visible!important;display:block!important}
 #app.bank-report-wide .report-fit-canvas{position:static!important;transform:none!important;width:100%!important}
 #app.bank-report-wide #matrixSections .payment-report-pair{display:grid;grid-template-columns:1fr 1fr}
}
