/* Presentation-only full viewport spreadsheet workspaces. */
@media screen{body .sheet-overlay{padding:0!important;backdrop-filter:none!important;background:#fff!important}body .sheet-overlay>.sheet-frame{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}body dialog.sheet-dialog{position:fixed!important;inset:0!important;width:100vw!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important;padding:0!important;background:#fff!important;color:#20364b;overflow:auto!important}body dialog.sheet-dialog::backdrop{background:#fff}.sheet-frame>div:first-child,.sheet-dialog>header,.sheet-dialog>.jv-head{padding:12px 16px!important;flex-shrink:0;border-radius:0!important;position:sticky;top:0;z-index:5;background:#0f172a;color:white}.sheet-frame>div:last-child:not(.sheet-customer-records),.sheet-dialog .jv-actions{flex-shrink:0}.sheet-frame table,.sheet-dialog table{border-collapse:collapse!important;width:100%!important;min-width:620px;background:white!important;font-size:12px!important}.sheet-table th,.sheet-table td{border:1px solid #d9e2eb!important;padding:5px 9px!important;line-height:1.35!important;height:29px!important;border-radius:0!important;vertical-align:middle}.sheet-table th{position:sticky;top:0;background:#e9eff5!important;color:#233c50!important;z-index:2;text-align:left;font-size:12px!important;white-space:nowrap}.sheet-table th[data-sheet-column]:before{content:attr(data-sheet-column);display:block;font:10px Arial;color:#657d91;border-bottom:1px solid #d4dfe8;margin:-5px -9px 4px;padding:4px 9px;background:#f4f6f9}.sheet-table tbody{counter-reset:sheet-row}.sheet-table tbody>tr{counter-increment:sheet-row}.sheet-table tbody>tr>td:first-child{position:relative;padding-left:38px!important}.sheet-table tbody>tr>td:first-child:before{content:counter(sheet-row);position:absolute;left:0;top:0;bottom:0;width:29px;background:#f0f4f7;border-right:1px solid #d9e2eb;color:#718499;text-align:right;padding:6px 4px;font:11px Arial}.sheet-table tbody>tr:nth-child(even)>td{background:#f7f9fb}.sheet-table tbody>tr:hover>td{background:#edf5f4}.sheet-table td.text-right,.sheet-table td.font-mono{font-variant-numeric:tabular-nums}.sheet-table td button{font-size:11px!important;padding:3px 7px!important;border-radius:4px!important;min-height:24px}.sheet-table input{border-radius:3px!important;padding:5px!important}.sheet-tabs{display:flex;gap:4px;flex-wrap:wrap;flex-shrink:0;padding:7px 12px;background:#edf2f7;border-bottom:1px solid #d6e0e8}.sheet-tabs button{padding:8px 13px;border:1px solid #cdd9e3;border-radius:4px;background:#fff;font-size:12px;font-weight:700;color:#254258}.sheet-tabs button.active{background:#e6f3f1;border-bottom:3px solid #0f8c8f;color:#087579}.sheet-filter{padding:9px 12px!important;gap:8px;background:#fff;border-bottom:1px solid #d6e0e8;display:flex;flex-wrap:wrap;align-items:center;flex-shrink:0}.sheet-filter input,.sheet-filter select{padding:7px 10px;border:1px solid #c6d3df;border-radius:4px;min-width:0;font-size:13px}.sheet-status{padding:8px 14px;background:#edf2f7;border-top:1px solid #d6e0e8;font-size:12px;flex-shrink:0}.sheet-report-body{padding:0!important;display:grid!important;grid-template-rows:auto auto auto minmax(0,1fr);gap:0!important;min-height:0;overflow:hidden!important}.sheet-report-body>*{margin:0!important}.sheet-metrics{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:0!important;flex-shrink:0;border-bottom:1px solid #d6e0e8;background:#fff}.sheet-metrics>div{padding:8px 12px!important;border:0!important;border-right:1px solid #d6e0e8!important;border-radius:0!important;box-shadow:none!important;background:white!important}.sheet-metrics>div>span:last-child{display:none}.sheet-metrics [id]{font-size:17px!important;white-space:nowrap}.sheet-report-stage{min-height:0;overflow:auto;padding:0}.sheet-report-panel{padding:0!important;border:0!important;border-radius:0!important;min-height:100%;background:white!important}.sheet-report-panel[hidden],.sheet-customer-records[hidden],#khata-modal .sheet-frame>[hidden]{display:none!important}.sheet-report-panel>h4,.sheet-report-panel>div:first-child:has(h4){padding:9px 12px!important;margin:0!important;border-bottom:1px solid #d6e0e8}.sheet-report-panel>div:has(>table){overflow:visible!important;border-radius:0!important;border:0!important}.sheet-customer-records{display:flex;flex-direction:column;min-height:0;flex:1;background:#fff}.sheet-record-scroll{flex:1;min-height:0;overflow:auto}.sheet-customer-records td:nth-child(4),.sheet-customer-records td:nth-child(5){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}#khata-modal .sheet-frame>div.grid{min-height:0;flex:1}#khata-modal #khata-customers-list{padding:0!important}#khata-customers-list>div{border-radius:0!important;margin:0!important;padding:7px 10px!important;box-shadow:none!important;border-bottom:1px solid #d9e2eb!important}#supplier-manager .sm-body{padding:12px!important}#supplier-manager article,#replacement-stock article,#return-requests-panel article{padding:8px 12px!important;border-radius:0!important;margin:0!important;border-bottom:1px solid #d9e2eb!important;box-shadow:none!important;font-size:12px}#warehouse-dashboard>div{height:100%!important}#warehouse-dashboard section[data-cards]{padding:8px!important}#warehouse-dashboard section:has(table){padding:0!important}#purchase-workspace{padding:12px!important}#grn-form{padding:10px!important;border-radius:0!important;gap:10px!important}#grn-form #grn-save,#grn-close{position:sticky;bottom:0}#journal-page .jv-body{max-height:none!important;min-height:0;padding:12px!important}#journal-page .jv-panel{border-radius:0!important}#journal-page .jv-actions{position:sticky;bottom:0;background:#fff;padding:10px;border-top:1px solid #d6e0e8}#buying-list-page.sheet-dialog{max-width:none!important}#expense-modal .sheet-frame{overflow:auto!important}#expense-modal .sheet-frame>div:first-child{position:sticky;top:0}#inventory-modal .sheet-frame .overflow-y-auto{min-height:0;flex:1}#summary-modal .sheet-frame>div:last-child{padding:8px 14px!important}#summary-modal #return-report-details{max-height:none!important}.sheet-frame button,.sheet-dialog button{border-radius:5px!important}.sheet-frame h3,.sheet-dialog h2{font-size:19px!important}}
@media screen and (max-width:700px){body .sheet-overlay>.sheet-frame,body dialog.sheet-dialog{padding-top:env(safe-area-inset-top)!important;padding-bottom:env(safe-area-inset-bottom)!important}.sheet-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important}.sheet-metrics [id]{font-size:14px!important}.sheet-tabs{overflow:auto;flex-wrap:nowrap}.sheet-tabs button{white-space:nowrap;min-height:40px}.sheet-table{min-width:700px!important}.sheet-filter input,.sheet-filter select{font-size:16px!important}.sheet-table td button{min-height:36px!important}.sheet-frame>div:first-child{padding:9px!important;flex-wrap:wrap}.sheet-dialog input,.sheet-dialog select{font-size:16px!important}}
@media print{.sheet-tabs,.sheet-table th:before,.sheet-table td:before{display:none!important}.sheet-table td:first-child{padding-left:9px!important}}

@media screen{.sheet-table th,.sheet-table td{box-sizing:border-box}.sheet-table tbody>tr{height:29px}#khata-modal .sheet-customer-records .sheet-filter input{width:320px;max-width:100%}#khata-modal .sheet-frame>div:last-child{padding:8px 14px!important}}

@media screen{#inventory-modal .sheet-frame>div:nth-child(2){padding:0!important}#inventory-modal .sheet-frame>div:nth-child(2)>.grid{gap:0!important}#inventory-modal .sheet-frame>div:nth-child(2)>.grid>div{border-radius:0!important;box-shadow:none!important;border:0!important;border-right:1px solid #d6e0e8!important;padding:7px 12px!important;background:white!important}#inventory-modal .sheet-frame>div:nth-child(2) [id]{font-size:17px!important;white-space:nowrap}#inventory-modal .sheet-frame>div:nth-child(3){padding:8px 12px!important}#inventory-modal .sheet-frame>div:nth-child(4){padding:0!important}#inventory-modal table{border-radius:0!important}#inventory-modal input:not([type=checkbox]){height:26px!important;min-height:0!important;padding:3px 5px!important}.sheet-frame .sheet-table td>div{margin:0!important}.sheet-dialog #ic-list,.sheet-dialog #oc-list{overflow:auto!important}#add-product-modal .sheet-frame,#add-customer-modal .sheet-frame,#manage-customer-modal .sheet-frame,#receive-payment-modal .sheet-frame,#bulk-price-modal .sheet-frame,#return-modal .sheet-frame{overflow:auto!important}.sheet-frame input:focus,.sheet-table input:focus{outline:2px solid #138b89;outline-offset:-1px}}
@media screen and (max-width:700px){#inventory-modal input:not([type=checkbox]){min-height:36px!important}#inventory-modal .sheet-frame>div:nth-child(2) [id]{font-size:14px!important}}

@media screen{body .sheet-overlay.sheet-overlay{padding:0!important;inset:0!important}body .sheet-overlay>.sheet-frame.sheet-frame{max-height:100dvh!important;width:100vw!important;height:100dvh!important}.sheet-report-body{grid-template-columns:minmax(0,1fr);min-width:0}.sheet-report-stage,.sheet-report-panel{min-width:0;max-width:100%}.sheet-filter,.sheet-metrics,.sheet-tabs{min-width:0;max-width:100%}body :is(#journal-page,#supplier-manager,#purchase-workspace,#warehouse-dashboard,#replacement-stock,#return-requests-panel,#buying-list-page,#category-manager).sheet-dialog{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;margin:0!important}#summary-modal #report-period-tabs{flex-wrap:wrap;max-width:100%}#summary-modal .sheet-report-panel table{min-width:620px}}
@media screen and (max-width:700px){#summary-modal .sheet-report-panel>div:first-child:has(h4){flex-wrap:wrap}#summary-modal .sheet-metrics>div{padding:7px 5px!important}#summary-modal #report-period-tabs button{padding:7px!important;white-space:nowrap}}

/* Supply Hub: last child is the scroll body, not a fixed footer. */
@media screen{body #supply-hub-modal.sheet-overlay{padding:0!important;inset:0!important;align-items:stretch!important}body #supply-hub-modal>.sheet-frame{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}#supply-hub-modal>.sheet-frame>div:first-child{flex:0 0 auto!important;padding:12px 16px!important;background:#0f172a!important}#supply-hub-modal>.sheet-frame>.overflow-y-auto{flex:1 1 0%!important;min-height:0!important;height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px 16px!important;scrollbar-gutter:stable}#supply-hub-modal .overflow-y-auto>div{margin-top:10px!important;border-radius:0!important;box-shadow:none!important}#supply-hub-modal #transfer-panel,#supply-hub-modal #barcode-receive-panel{padding:10px 12px!important;background:#f6f9fb!important;border:1px solid #d6e0e8!important}#supply-hub-modal h4{font-size:14px!important;margin-bottom:7px!important}#supply-hub-modal input,#supply-hub-modal select{min-width:0;padding:7px 9px!important;border-radius:4px!important}#supply-hub-modal #suppliers-list,#supply-hub-modal #warehouses-list,#supply-hub-modal #warehouse-stock-list,#supply-hub-modal #movement-history-list{display:block!important;overflow:auto;max-width:100%;border:1px solid #d6e0e8}#supply-hub-modal #suppliers-list>table,#supply-hub-modal #warehouses-list>table{min-width:420px!important}#supply-hub-modal #warehouse-stock-list>table{min-width:650px!important}#supply-hub-modal #movement-history-list>table{min-width:1000px!important}#supply-hub-modal .sheet-table td:last-child{text-align:right;white-space:nowrap}#supply-hub-modal .sheet-table th,#supply-hub-modal .sheet-table td{padding:5px 9px!important;font-size:12px!important}}
@media screen and (max-width:700px){#supply-hub-modal>.sheet-frame>.overflow-y-auto{padding:8px!important}#supply-hub-modal>.sheet-frame>div:first-child{padding-top:max(10px,env(safe-area-inset-top))!important}#supply-hub-modal input,#supply-hub-modal select{font-size:16px!important}#supply-hub-modal>.sheet-frame>.overflow-y-auto{padding-bottom:max(12px,env(safe-area-inset-bottom))!important}}

@media screen{#supply-hub-modal .sheet-table tbody>tr>td:first-child{padding-left:38px!important}#supply-hub-modal #suppliers-list .sheet-table td:last-child,#supply-hub-modal #warehouses-list .sheet-table td:last-child{text-align:left;white-space:normal}#supply-hub-modal .overflow-y-auto>.grid>div{border-radius:0!important;box-shadow:none!important;background:#fff!important;border:1px solid #d6e0e8!important;padding:10px 12px!important}}
