/* Viewport layout: module canvas, navigation drawer and large child dialogs. */
html:has(.native-desktop),body:has(.native-desktop){overflow:hidden}
.native-desktop{--control-height:30px;grid-template-rows:26px minmax(0,1fr) 20px;min-width:0}
.native-desktop .body-shell{padding:5px;gap:6px;min-width:0;min-height:0}
.native-desktop .workarea{min-width:0;min-height:0;gap:4px}
.native-desktop.module-open .topbar,.native-desktop.module-open .shared-strip{display:none}
.native-desktop .sidebar{width:202px;min-width:202px;padding:6px;position:static}
.native-desktop .sidebar button[data-module]{font-size:17px;height:36px;min-height:36px;line-height:1.2;margin-bottom:5px}
.native-desktop.module-focused{grid-template-rows:minmax(0,1fr) 20px}
.native-desktop.module-focused .menubar,.native-desktop.module-focused .sidebar{display:none}
.native-desktop.module-focused .body-shell{padding:4px}
.navigation-backdrop{display:none}
.native-desktop.navigation-open .navigation-backdrop{display:block;position:fixed;inset:0;z-index:65;background:#10284459;border:0;border-radius:0}
.native-desktop.navigation-open.navigation-docked .workarea{margin-inline-start:208px}
.native-desktop .sidebar.visible{display:block;position:fixed;inset:5px 5px 25px auto;width:230px;min-width:230px;z-index:70;border-radius:7px;box-shadow:0 6px 35px #10284450;padding:9px;overflow:auto}
.native-desktop .sidebar.visible button{font-size:17px;min-height:38px;height:38px}
.native-module-window{min-width:0;min-height:0;border-radius:6px;box-shadow:0 2px 6px #10284412}
.native-module-window.maximized{inset:0 0 28px;z-index:50}
.native-desktop.window-maximized .window-tabs{position:fixed;inset:auto 0 0;z-index:55;height:28px}
.native-titlebar{height:34px;min-height:34px;gap:8px;padding-inline-start:5px;background:#f0f4f9}
.native-titlebar .native-window-title{font-size:13px;font-weight:700;white-space:nowrap}
.native-window-context{font-size:10px;color:#64748b;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.native-titlebar .window-navigation-button,.native-titlebar .window-home-button,.native-titlebar .window-focus-button{flex:none;height:26px;min-height:26px;padding:2px 8px;font-size:11px;font-weight:600;border:1px solid #bccde0;background:#fff;white-space:nowrap}
.native-titlebar .window-focus-button{font-size:17px;width:30px;padding:0}
.native-window-controls{flex:none}
.native-window-controls button{height:33px;min-height:33px;width:36px}
.native-desktop .window-tabs{min-height:28px;height:28px;padding:2px;flex-shrink:0;align-items:center}
.native-desktop .window-tab{height:23px;min-height:23px;padding:1px 12px;font-size:11px;flex-shrink:0}
.native-desktop .statusbar{padding:2px 10px;font-size:9px;min-height:20px}
.native-desktop .workspace{padding:6px;min-width:0;min-height:0}
.native-desktop .workspace:has(>.invoice-native-editor),.native-desktop .workspace:has(>.native-transactions),.native-desktop .workspace:has(>.native-inventory),.native-desktop .workspace:has(>.native-records){overflow:hidden}
.native-desktop .native-button,.native-desktop .toolbar button,.native-desktop .header-actions button{min-height:var(--control-height);height:var(--control-height);min-width:0;flex-shrink:0;font-size:12px;line-height:1.25;padding:4px 9px;white-space:nowrap}
.native-desktop .native-button .desktop-icon,.native-desktop .toolbar button .desktop-icon{width:15px;height:15px}
.native-desktop input,.native-desktop select,.native-desktop textarea{min-height:var(--control-height);font-size:12px;padding:4px 7px;border-radius:5px;min-width:0}
.native-desktop input[type=checkbox],.native-desktop input[type=radio]{min-height:18px;width:18px}
.native-desktop .native-toolbar{flex-wrap:wrap;gap:5px;min-height:0;padding:6px 8px;overflow:visible;border-radius:7px;align-items:center}
.native-desktop .native-toolbar>.native-button{flex:0 0 auto;min-width:0;max-width:none;font-size:12px;height:32px;min-height:32px;padding:4px 9px}
.native-toolbar>.native-spacer{min-width:0}
.native-document-number{padding:5px 8px;font-size:11px;min-height:29px;display:flex;align-items:center;flex-shrink:0}
.invoice-native-editor{height:100%;min-height:0;display:grid;grid-template-rows:auto auto minmax(90px,1fr) auto;gap:5px;min-width:0}
.native-desktop .invoice-native-editor .native-toolbar{min-height:0;padding:6px 8px;gap:5px}
.native-desktop .invoice-native-editor .native-toolbar .native-button{font-size:12px;font-weight:700;min-width:0;max-width:none;height:32px;min-height:32px;padding:4px 9px;flex-shrink:0;white-space:nowrap;line-height:1.25}
.native-invoice-fields{padding:6px;border-radius:7px;min-width:0;overflow:visible}
.invoice-party-row{display:grid;grid-template-columns:minmax(240px,2fr) minmax(130px,1fr) minmax(110px,1fr) minmax(110px,1fr) 65px;gap:7px;padding:0;border:0;background:transparent;min-height:0;overflow:visible;direction:rtl;white-space:normal}
.invoice-party-field{display:flex;flex-direction:column;gap:3px;min-width:0;font-size:11px;font-weight:600}
.invoice-party-field>span{display:block;color:#526b85;line-height:15px}
.invoice-party-field select,.invoice-party-row select[data-inv-meta=party_id],.invoice-party-row #native-party-id{width:100%;min-width:0;font-size:12px;font-weight:600;height:30px;min-height:30px}
.invoice-customer-control{display:flex;gap:4px;min-width:0}
.invoice-customer-control select{flex:1;min-width:0}
.invoice-party-row .invoice-customer-control .native-button{min-width:30px;width:30px;height:30px;min-height:30px;padding:5px;flex:none}
.invoice-operational-row{min-height:0;gap:8px;padding:5px 0;overflow:visible;flex-wrap:wrap}
.invoice-operational-row label{font-size:11px;gap:5px;font-weight:600}
.invoice-operational-row input{width:128px}
.invoice-operational-row select{width:85px}
.invoice-operational-row .native-button{font-size:11px;min-height:28px;height:28px;padding:3px 8px}
.invoice-entry-row{min-height:0;padding:5px 6px;gap:6px;flex-wrap:wrap;overflow:visible}
.invoice-entry-row .invoice-search-control{max-width:none;min-width:200px;flex:1 1 260px}
.invoice-search-control input{width:100%;min-width:0;height:30px;min-height:30px;font-size:12px}
.invoice-search-control>.native-button{width:30px;min-width:30px;height:30px;min-height:30px;padding:5px}
.invoice-entry-row>label{font-size:11px;gap:4px}
.invoice-entry-row>label input{width:68px;min-height:30px;height:30px}
.invoice-entry-row>.native-button{height:30px;min-height:30px;font-size:11px;padding:4px 8px}
.native-toggle-label{font-size:11px}
.native-toggle{padding:4px 7px}
.invoice-entry-details{display:flex;align-items:center;flex-wrap:wrap;gap:5px;padding:3px 6px;border-top:1px solid #e1e8f1}
.invoice-entry-details>label,.invoice-summary-details>label{display:flex;align-items:center;gap:4px;white-space:nowrap;font-size:10px}
.invoice-entry-details input,.invoice-entry-details select{width:72px;height:28px;min-height:28px;padding:3px 5px}
.invoice-entry-details select{width:86px}.invoice-entry-details output{min-width:58px;font-weight:700;color:#244875;font-size:12px;text-align:center}
.invoice-entry-details>.native-button{height:28px;min-height:28px;font-size:10px;padding:3px 7px}
.invoice-entry-details small{font-size:10px;color:#60758e;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.invoice-summary-details{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:2px 6px;font-size:10px;min-height:28px}
.invoice-summary-details input{width:62px;height:25px;min-height:25px;font-size:12px}.invoice-summary-details>.native-button{min-height:24px;height:24px;font-size:10px;padding:2px 6px}
.invoice-native-editor .cart-row select{width:100%;min-height:27px;height:27px;font-size:11px;padding:2px}
@media(min-width:601px) and (max-width:900px){.invoice-native-editor .invoice-party-row{grid-template-columns:minmax(160px,2fr) minmax(100px,1fr) minmax(85px,1fr) minmax(95px,1fr) 50px}.invoice-native-editor .invoice-party-field:first-child{grid-column:auto}}
@media(min-width:601px) and (max-height:620px){.invoice-native-editor .native-invoice-fields{max-height:144px;overflow:auto;overscroll-behavior:contain}.invoice-native-editor .native-summary-card{min-height:48px}.invoice-native-editor .native-summary-grid{gap:3px}.invoice-summary-details{min-height:25px;padding:1px 4px;gap:8px}}
.invoice-product-results{top:33px;max-height:min(280px,45dvh);min-width:240px}
.native-invoice-table{padding:5px;min-height:0;min-width:0;border-radius:7px;overflow:hidden}
.native-invoice-table h3{font-size:12px;padding:0;line-height:18px}
.native-invoice-table #inv-lines,.native-invoice-table #inv-lines>.table-wrap{min-height:0;min-width:0}
.native-invoice-table #inv-lines>.table-wrap{overflow:auto;overscroll-behavior:contain}
.native-invoice-ledger{min-width:960px;table-layout:fixed;width:100%;font-size:11px}
.native-invoice-ledger th{height:32px;font-size:11px;padding:6px 4px;position:sticky;top:0;z-index:2;min-width:0!important}
.native-invoice-ledger th:nth-child(1){width:32px}.native-invoice-ledger th:nth-child(2){width:82px}.native-invoice-ledger th:nth-child(3){width:auto}.native-invoice-ledger th:nth-child(4){width:64px}.native-invoice-ledger th:nth-child(5){width:80px}.native-invoice-ledger th:nth-child(6){width:90px}.native-invoice-ledger th:nth-child(7),.native-invoice-ledger th:nth-child(8){width:68px}.native-invoice-ledger th:nth-child(9){width:82px}.native-invoice-ledger th:nth-child(10){width:130px}.native-invoice-ledger th:nth-child(11){width:66px}
.invoice-native-editor .cart-row td{height:35px;padding:3px 4px;font-size:11px;overflow:hidden;text-overflow:ellipsis}
.invoice-native-editor .cart-row input{width:100%;min-width:0;min-height:27px;height:27px;font-size:12px;padding:3px 5px}
.invoice-native-editor .cart-row strong{font-size:12px;white-space:normal}
.invoice-native-editor .cart-row button{min-height:26px;height:26px;font-size:11px;padding:2px 6px}
.native-invoice-summary{padding:0;gap:5px;min-width:0}
.invoice-notes-row{min-height:28px;padding:1px 5px;font-size:11px}
.invoice-notes-row input{height:25px;min-height:25px;font-size:11px}
.native-summary-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;overflow:visible;padding:0}
.native-summary-card{min-height:61px;padding:5px;gap:3px;font-size:10px;border-radius:6px;min-width:0}
.native-summary-card input{min-height:28px;height:28px;font-size:16px;padding:2px 4px;min-width:0}
.native-summary-card strong{font-size:19px;max-width:100%;overflow:auto}
.native-transactions{height:100%;min-height:0;gap:5px;min-width:0}
.native-scope,.native-filters{padding:6px 8px;gap:6px;min-height:0;overflow:visible;flex-wrap:wrap;border-radius:7px}
.native-scope-status{min-width:120px;min-height:26px;padding:4px;font-size:9px}
.native-scope label,.native-filters label{gap:5px;font-size:11px}
.native-scope select{width:100px}
.native-scope label input{width:122px}
.native-scope .native-button,.native-filters .native-button{min-height:30px;height:30px;padding:4px 8px;font-size:11px}
.native-tabs{min-height:32px}.native-tabs button{height:32px;min-height:32px;min-width:96px;padding:4px 12px;font-size:12px}
.native-filters label:first-child{min-width:220px}
.native-filters label:first-child input{min-width:150px}
.native-filters select{width:115px}
#txn-data-panel{min-height:0;gap:5px;overflow:hidden}
.native-table-fill{min-height:0;overflow:auto;overscroll-behavior:contain}
.native-ledger{min-width:1060px}.native-ledger th{position:sticky;top:0;z-index:2;height:34px}.native-ledger td{height:35px}
.native-metrics{min-height:64px;padding:5px;gap:6px;border-radius:7px}.native-metric{min-width:0;min-height:52px;padding:5px;gap:2px;font-size:10px}.native-metric strong{font-size:19px}
.native-inventory{height:100%;min-height:0;min-width:0;gap:6px}
.inventory-filter-card,.inventory-actions,.inventory-selection{padding:7px;gap:6px;border-radius:7px;flex-shrink:0;min-width:0}
.inventory-section-title{min-width:105px;gap:2px}.inventory-section-title strong{font-size:13px}.inventory-section-title small{font-size:10px}
.inventory-filter-card>#record-search{min-width:160px;flex:1 1 200px}
.inventory-filter-card label{font-size:11px}.inventory-filter-card label input[type=number]{width:55px}.inventory-filter-card input[type=date]{width:120px}.inventory-filter-card select{max-width:110px}
.inventory-filter-card label{flex-shrink:0}.inventory-filter-card label input,.inventory-filter-card label select{flex-shrink:0}.inventory-filter-card label input[type=number]{width:65px}.inventory-filter-card label select{width:72px}
.native-desktop .inventory-actions button{min-width:76px!important;height:32px;min-height:32px;font-size:12px;padding:4px 8px;flex-shrink:0}
.native-desktop .inventory-actions button.success{min-width:112px!important}.inventory-separator{height:24px}
.inventory-summary{gap:6px;flex-shrink:0;grid-template-columns:repeat(4,minmax(0,1fr))}
.inventory-summary-card{padding:7px 10px;gap:8px;border-radius:7px;min-height:58px}.inventory-summary-card span{font-size:11px}.inventory-summary-card strong{font-size:22px}.inventory-summary-card>.desktop-icon{width:24px;height:24px}
.inventory-selection{min-height:34px}.inventory-selection strong{font-size:12px}.inventory-selection small{font-size:10px}.inventory-selection button{height:26px;min-height:26px;font-size:10px;padding:3px 7px}
.native-inventory>.table-wrap{min-height:0;min-width:0;margin-top:-6px;overflow:auto;overscroll-behavior:contain}
.native-inventory table{min-width:1120px}.native-inventory table th{position:sticky;top:0;z-index:2;height:34px;font-size:11px}.native-inventory table td{height:35px;font-size:11px}
.native-inventory .pagination,.native-records .pagination{margin:0;min-height:29px;flex-shrink:0;font-size:11px}.native-desktop .pagination button{min-height:27px;padding:3px 9px;font-size:11px}
.native-records{display:flex;flex-direction:column;gap:6px;height:100%;min-height:0;min-width:0}
.native-records-top{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;min-width:0}
.native-records-top .page-header{display:contents}.native-records-top .page-header>div:first-child{display:none}.native-records-top .header-actions{order:2;flex-shrink:0;gap:5px}
.native-records-top .subtabs{order:1;margin:0;flex:1;min-width:0;flex-wrap:wrap;gap:3px}
.native-records-top .subtabs button{min-height:30px;height:30px;padding:4px 9px;font-size:11px;white-space:nowrap}
.native-records>.toolbar{margin:0;padding:6px 8px;gap:5px;border-radius:7px;flex-shrink:0}
.native-records>.toolbar input{flex:1;min-width:160px;max-width:400px}
.native-records>.table-wrap{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.native-records>.table-wrap th{position:sticky;top:0;z-index:2;height:34px}
.native-records>.panel.empty-state{flex:1;min-height:0;margin:0;display:flex;flex-direction:column;justify-content:center;padding:20px}
.native-records .row-actions{flex-wrap:wrap;justify-content:center}
.native-records .row-actions button{white-space:nowrap;min-height:26px;height:26px;font-size:10px}
.native-desktop .workspace:has(>.pos-layout){display:flex;flex-direction:column;overflow:hidden;gap:6px}
.native-desktop .workspace:has(>.pos-layout)>.page-header{flex-shrink:0;margin:0}.native-desktop .workspace:has(>.pos-layout)>.subtabs{flex-shrink:0;margin:0}
.native-desktop .pos-layout{flex:1;min-height:0;align-items:stretch;gap:8px;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr)}
.native-desktop .pos-layout>.panel{min-height:0;min-width:0;padding:8px;margin:0;display:flex;flex-direction:column;overflow:auto}
.native-desktop .pos-layout .product-grid{min-height:0;overflow:auto;gap:7px}.native-desktop .pos-layout .product-card{min-height:140px}
.native-desktop .pos-layout .product-initial{height:60px;margin-bottom:5px}
.native-desktop .cart-panel .form-actions{position:sticky;bottom:-8px;background:#fff;padding:7px 0;margin-top:8px;flex-shrink:0;z-index:3}
dialog#modal{width:min(1120px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0;border-radius:8px;overflow:hidden;color:#244875}
dialog#modal[open]{display:flex;flex-direction:column}
dialog#modal[data-layout=form]{height:min(780px,calc(100dvh - 24px))}
dialog#modal[data-layout=receipt]{width:min(900px,calc(100vw - 24px))}
dialog#modal.dialog-expanded{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}
#modal .modal-head{height:36px;min-height:36px;padding:5px 10px;gap:8px;flex-shrink:0}
#modal .modal-head h2{font-size:13px;font-weight:700}
.modal-window-controls{display:flex;direction:ltr;gap:2px;flex-shrink:0}
#modal .modal-window-controls button{width:32px;height:27px;min-height:27px;padding:0;border:0;font:18px 'Segoe UI',Arial,sans-serif}
#modal .modal-body{padding:10px;overflow:auto;min-height:0;max-height:none;flex:1;overscroll-behavior:contain}
#modal[data-layout=form] .modal-body{display:flex;flex-direction:column;overflow:hidden}
#modal .modal-body>form{display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden}
.dialog-form-content{flex:1;min-height:0;overflow:auto;padding:2px 3px 8px;overscroll-behavior:contain}
#modal .modal-body>form>.form-actions{flex-shrink:0;margin:0;padding:9px 2px 0;min-height:45px;background:#f4f7fb;gap:7px}
#modal .form-actions button{min-height:32px;padding:4px 13px;white-space:nowrap;font-size:12px}
#modal .field{gap:4px;font-size:12px}#modal .field input,#modal .field select{min-height:32px;padding:5px 8px;font-size:12px}
#modal .field textarea{min-height:72px;font-size:12px}.native-entity-tabs{position:sticky;top:-2px;z-index:3;background:#f4f7fb;margin-bottom:8px;flex-wrap:wrap}
.native-entity-tabs button{padding:7px 11px;min-height:32px;font-size:12px}
.native-entity-tabs button{transition:none}
.native-entity-panel{min-height:0;padding:12px}.native-entity-panel[hidden]{display:none}
@media(max-width:1100px){.invoice-party-row{grid-template-columns:minmax(220px,2fr) minmax(120px,1fr) minmax(105px,1fr) minmax(105px,1fr) 60px}.native-summary-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.inventory-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.inventory-summary-card{padding:6px;gap:5px}.inventory-summary-card span{font-size:10px}}
@media(max-width:800px){.native-window-context{display:none}.native-titlebar .window-home-button{padding:2px 5px}.invoice-party-row{grid-template-columns:repeat(4,minmax(0,1fr))}.invoice-party-field:first-child{grid-column:span 2}.invoice-party-field:last-child{grid-column:span 1}.native-toolbar>.native-spacer{display:none}.native-transactions{min-height:0}.native-metrics{overflow:visible}.native-metric{min-width:0;font-size:9px;padding:4px}.native-records-top{align-items:flex-start;flex-direction:column;gap:5px}.native-records-top .header-actions{order:0}.native-records-top .subtabs{order:1}.inventory-section-title{min-width:90px}.inventory-section-title small{display:none}.native-desktop .pos-layout{grid-template-columns:minmax(0,1fr) minmax(270px,1fr)}}
@media(max-width:600px){.native-desktop .sidebar{display:none}.native-desktop .sidebar.visible{display:block}.native-titlebar{gap:4px}.native-titlebar>img,.native-titlebar .window-navigation-button span{display:none}.native-titlebar .native-window-title{font-size:12px}.native-window-controls button{width:30px}.native-desktop .workspace:has(>.invoice-native-editor),.native-desktop .workspace:has(>.native-inventory),.native-desktop .workspace:has(>.native-transactions){overflow:auto}.invoice-native-editor{height:auto;min-height:100%;grid-template-rows:auto auto minmax(220px,1fr) auto}.invoice-party-row{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-party-field:first-child{grid-column:span 2}.native-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.native-summary-card{min-height:58px}.native-toggle-label{display:none}.invoice-operational-row .native-spacer{display:none}.invoice-entry-row{gap:5px}.invoice-entry-row .invoice-search-control{flex-basis:100%;min-width:0}.native-transactions{height:auto;min-height:100%}#txn-data-panel{min-height:260px}.native-table-fill{min-height:180px}.native-inventory{height:auto;min-height:100%}.native-inventory>.table-wrap{min-height:220px;max-height:55dvh;flex:1 0 220px}.inventory-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.inventory-filter-card>label{flex:1;min-width:110px}.inventory-selection small{display:none}.native-desktop .workspace:has(>.pos-layout){overflow:auto}.native-desktop .pos-layout{display:flex;flex-direction:column;flex:none;min-height:auto}.native-desktop .pos-layout .cart-panel{order:0;max-height:none;overflow:visible}.native-desktop .pos-layout .product-grid{max-height:400px}.native-desktop .pos-layout .form-actions{position:static}.native-desktop .header-actions button{white-space:nowrap}.native-records-top .header-actions{flex-wrap:wrap}dialog#modal{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}dialog#modal[data-layout=form]{height:calc(100dvh - 12px)}#modal .modal-body{padding:7px}.native-entity-tabs button{font-size:11px;padding:6px}.native-entity-panel{padding:8px}#modal .form-grid{grid-template-columns:1fr}}
@media(max-height:620px) and (min-width:601px){.native-titlebar{height:30px;min-height:30px}.native-window-controls button{height:29px;min-height:29px}.native-desktop .workspace{padding:4px}.invoice-native-editor{gap:4px}.native-invoice-fields{padding:4px}.invoice-party-field>span{line-height:12px;font-size:10px}.invoice-operational-row{padding:3px 0}.invoice-entry-row{padding:3px 5px}.native-summary-card{min-height:52px;padding:3px}.native-summary-card strong{font-size:17px}.native-summary-card input{height:25px;min-height:25px;font-size:14px}.native-metrics{min-height:55px}.native-metric{min-height:43px}.native-desktop .native-toolbar{padding:4px 6px}}
@media print{dialog#modal[open]{display:block!important;height:auto!important;max-height:none!important;max-width:none!important;overflow:visible!important}#modal .modal-body{display:block!important;max-height:none!important;overflow:visible!important}#modal .modal-head,#modal .form-actions,.navigation-backdrop{display:none!important}}
