/* GoldFusion-style account statement: fixed, compact controls and running balances. */
.account-balance-report .module-content{padding:5px;background:#ededeb}
.balance-report-head{display:flex;align-items:stretch;gap:7px;border:1px solid #aaa;padding:7px;flex-wrap:wrap;background:#e6e6e3}
.balance-report-selection{width:340px;flex-shrink:0;display:grid;gap:4px}
.balance-report-head label{display:flex;align-items:center;gap:5px;font-weight:600;font-size:12px}
.balance-report-selection>label{display:grid;grid-template-columns:78px 1fr}
.balance-report-head input,.balance-report-head select,.balance-report-head button{min-height:25px;height:25px;padding:2px 5px;border:1px solid #999;border-radius:0;font-size:12px;min-width:0;width:auto}
.balance-report-selection input{width:100%;box-sizing:border-box}
.balance-report-selection .account-picker{width:100%;text-align:left}
.balance-date-row{display:flex;gap:7px}.balance-date-row label{display:block}.balance-date-row input{display:block;width:155px}
.balance-report-actions{display:flex;flex-direction:column;gap:9px;width:120px;padding:0 5px}
.balance-report-actions>button{height:45px;font-weight:bold}
.balance-report-actions a{font-size:11px}
.balance-valuation{display:flex;flex-direction:column;gap:7px;width:140px;margin-left:auto;border:1px solid #aaa;padding:5px}
.balance-valuation small{font-size:10px}.balance-valuation strong{font-size:13px}
.balance-products{min-width:210px;flex:1;max-width:360px;border:1px solid #aaa;background:#ffffe4;overflow:auto}
.balance-products>b{display:block;background:#ddd;padding:3px}
.balance-box{width:145px;border:1px solid #aaa;padding:3px;flex-shrink:0}
.balance-box>b{display:block;background:#08085a;color:white;text-align:center;font-size:12px;padding:3px}
.balance-box table,.balance-products table{width:100%;border-collapse:collapse;font-size:12px}
.balance-box td,.balance-box th,.balance-products td,.balance-products th{padding:3px;border:1px solid #bbb}
.balance-box td{text-align:right;background:#fff}.balance-box th{width:30px}
.balance-caption{margin:7px 0!important;font-size:12px;font-weight:bold}.balance-caption span{font-weight:normal;margin-left:12px}
.balance-ledger{overflow:auto;max-height:65vh;min-height:300px;border:1px solid #999;background:#ffffe5}
.balance-ledger table{border-collapse:collapse;width:max-content;min-width:100%;font-size:12px}
.balance-ledger th{background:#171717;color:#fff;position:sticky;top:0;z-index:1;padding:5px;border:1px solid #bbb;white-space:nowrap}
.balance-ledger td{border:1px solid #bdbdb1;padding:4px 6px;white-space:nowrap}
.balance-ledger td:nth-child(n+7):nth-child(-n+16){text-align:right;font-variant-numeric:tabular-nums}
.balance-ledger tbody tr:nth-child(even){background:#f3f3d9}.balance-ledger .opening{background:#b9cbea!important}
.balance-ledger tr:hover{background:#d5e4f7!important}.balance-ledger .running{font-weight:bold;background:#eef0d9}
.balance-report-footer{display:flex;gap:15px;padding:6px;font-size:12px;border:1px solid #bbb}
@media print{.balance-report-actions{display:none}.balance-ledger{max-height:none;overflow:visible}.balance-ledger table{font-size:8px;width:100%}.balance-ledger th,.balance-ledger td{padding:2px;white-space:normal}}

.classic-window.account-balance-report{max-width:none;margin:0;width:auto}
.account-balance-report .balance-box th{background:#e6e6e3;color:#222}
.account-balance-report .balance-products th{background:#171717;color:white}
.account-balance-report .balance-ledger th{background:#171717}
.account-balance-report .balance-report-head input[type=checkbox]{width:auto;height:auto;min-height:0}
.account-balance-report .balance-ledger td:last-child{max-width:320px;white-space:normal;min-width:160px}
.account-balance-report .balance-box th{white-space:nowrap;width:34px;padding:3px}
.account-balance-report .balance-box td{white-space:nowrap;padding:3px}

.classic-window.account-debt-report{max-width:none;margin:0}
.account-debt-report .module-content{padding:4px}
.debt-query{margin:0;background:#e8e8e6;border:1px solid #aaa}
.debt-query>summary{display:list-item;width:max-content;padding:5px 13px;cursor:pointer;font-weight:bold}
.debt-filters{display:flex;gap:12px;padding:8px;align-items:end;flex-wrap:wrap}
.debt-filters label{font-size:12px;margin:0}
.debt-filters input,.debt-filters select{width:170px!important;min-height:26px}
.debt-report-tab{background:#076fbe;color:white;display:inline-block;padding:6px 15px;font-weight:bold;margin-top:3px}
.debt-report-tab span{font-weight:normal;font-size:11px;margin-left:15px}
.debt-grid{overflow:auto;min-height:300px;max-height:62vh;border:1px solid #888;background:#e8eee8}
.debt-grid table{border-collapse:collapse;width:max-content;min-width:100%;font-size:12px}
.account-debt-report .debt-grid th{background:#171717;color:white;position:sticky;top:0;z-index:2;white-space:nowrap;padding:5px 7px;border:1px solid #999}
.account-debt-report .debt-grid td{border:1px solid #b2b8b1;padding:5px 7px;white-space:nowrap}
.account-debt-report .debt-grid tbody tr:nth-child(odd){background:#f8f7ee}
.account-debt-report .debt-grid tbody tr:nth-child(even){background:#c9ded5}
.account-debt-report .debt-grid tbody tr:hover{background:#acc8e7}
.debt-grid td:nth-child(2){min-width:190px}
.debt-grid .amount{text-align:right;font-variant-numeric:tabular-nums;min-width:100px}
.debt-grid a{color:inherit;text-decoration:none}.debt-grid a:hover{text-decoration:underline}
.debt-grid .product-balance{max-width:320px;white-space:normal!important;min-width:140px}
.debt-totals{border:1px solid #aaa;margin-top:7px;overflow:auto;background:#e8e8e6}
.debt-totals>div{display:flex;align-items:center;gap:5px;padding:4px;border-bottom:1px solid #aaa;min-width:max-content}
.debt-totals strong{background:#101060;color:#fff;font-size:11px;padding:4px;width:135px}
.debt-totals .total-unit{width:30px;font-size:12px}
.debt-totals output{width:145px;background:#f6f6f2;border:1px inset #bbb;padding:4px;text-align:right;font-weight:bold;font-variant-numeric:tabular-nums}
.debt-footer{display:flex;gap:15px;font-size:11px;padding:6px}
.debt-legend{font-size:11px;margin:5px 0!important}
@media print{.debt-query,.debt-footer{display:none}.debt-grid{max-height:none;overflow:visible}.debt-grid table{font-size:8px;width:100%;min-width:0}.debt-grid .amount{min-width:0}.debt-grid td:nth-child(2){min-width:0}.debt-totals output{width:100px}}

.balance-sides{display:flex;gap:7px;align-items:stretch;flex-wrap:wrap;margin-left:auto}
.account-balance-report .balance-sides .balance-box{width:auto;min-width:145px;max-width:320px}
.account-balance-report .balance-sides .balance-box th{width:auto;white-space:normal;text-align:left}
.account-balance-report .balance-sides .balance-box td{min-width:80px}
.balance-empty{align-self:center;font-size:12px;color:#555;padding:8px}
.stock-report-tabs{display:flex;gap:2px;border-bottom:1px solid #aaa}
.stock-report-tabs a{padding:8px 12px;color:#222;background:#ddd;text-decoration:none;font-weight:bold}
.stock-report-tabs a.active{background:#076fbe;color:white}
.daily-stock-report .debt-grid{max-height:70vh}

.account-combo{display:flex;align-items:center;gap:2px;min-width:0;width:100%}
.account-combo input{flex:1!important;width:0!important;min-width:50px!important;margin:0}
.account-combo .account-picker{flex:0 0 27px!important;width:27px!important;min-width:27px!important;padding:2px!important;text-align:center!important;margin:0}
