.qgrid{height:100%;min-height:0;display:flex;flex-direction:column;font-size:calc(11px * var(--quantum-font-scale,1.05))}.qgridToolbar,.qgridPager,.qgridSummary{display:flex;align-items:center;gap:8px;padding:5px;background:#f0f0f0;flex:none}.qgridToolbar button,.qgridPager button,.qgridChooser button{border:1px solid #bfc3c8;background:#fafafa;padding:4px 9px;border-radius:3px}.qgridToolbar input{width:260px}.qgridScroll{overflow:auto;flex:1;min-height:0}.qgridTable{table-layout:fixed;border-spacing:0;border-collapse:separate}.qgridTable thead{position:sticky;top:0;z-index:2;background:#f5f5f5}.qgridTable th,.qgridTable td{height:23px;border-right:1px solid #d2d2d2;border-bottom:1px solid #d2d2d2;padding:2px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400;text-align:left}.qgridTable th{position:relative}.qgridTable th button{width:100%;text-align:left;padding:0}.qgridTable tr:hover{background:#edf6ff}.qgridTable tr.qgridSelected{background:#d3eaff}.qgridFilter{display:flex;gap:1px}.qgridFilter select{width:35px;padding:0;font-size:calc(10px * var(--quantum-font-scale,1.05));flex:none}.qgridFilter input{width:100%;min-width:0;border:0;height:20px}.qgridResize{position:absolute;right:0;top:0;bottom:0;width:6px;cursor:col-resize;touch-action:none}.qgridTable td.qgridCurrency{text-align:right;color:#39301c}.qgridTable td.qgridMoney{text-align:right}.qgridDebit{color:#e22c42}.qgridSummary{justify-content:flex-end;white-space:pre-wrap;min-height:35px}.qgridPager{font-size:calc(10px * var(--quantum-font-scale,1.05))}.qgridMenu{position:fixed;z-index:100;background:white;border:1px solid #aab5c2;box-shadow:0 4px 16px #0003;min-width:185px;padding:4px}.qgridMenu button{display:block;text-align:left;width:100%;padding:7px 12px}.qgridMenu button:hover{background:#d3eaff}.qgridChooser{border:1px solid #abb8c8;border-radius:5px;padding:20px;max-height:80vh;overflow:auto;min-width:310px}.qgridChooser label{display:block;margin:6px 0}.qgridChooser h2{margin-bottom:10px}.qgridChooser::backdrop{background:#0004}
/* ERP desktop contrast and density. Disabled actions remain non-interactive. */
.qgrid{font-family:Tahoma,'Segoe UI',sans-serif;color:#172f4b;font-size:calc(11px * var(--quantum-font-scale,1.05));background:#fff}.qgridTable th,.qgridTable td{height:22px;border-color:#cacaca;color:#172f4b}.qgridTable th{background:#f5f5f5}.qgridTable th button:disabled{opacity:1}.qgridTable td.qgridDebit{color:#f00000}.qgridTable td.qgridCredit{color:#0036ad}.qgridTable td.qgridCurrency{color:#242424}.qgridTable tr.qgridSelected td{background:#d5e9fc}.qgridTable tr.qgridSelected td.qgridCurrency{background:#d5e9fc}.qgridTable tr.qgridPassive td{background:#ffa07a}.qgridFilter input{color:#173b53}.qgridFilter select{color:#253e51;border-color:#bac2c9}.qgridToolbar{padding:3px 5px;background:#eee;gap:6px}.qgridToolbar button{padding:3px 8px}.qgridSummary,.qgridPager{color:#253e51}.customerActions{color:#172f4b}.customerActions .actionGroup button:disabled{opacity:1;color:#263a52;cursor:not-allowed}.customerActions .actionGroup button:disabled:hover{background:transparent}.customerActions select:disabled{opacity:1;color:#263a52}.customerDemoNote{color:#4e6072}
.qgridChooser{width:650px;max-width:92vw}.qgridChooser>input{width:100%;margin:8px 0}.qgridColumnList{display:grid;grid-template-columns:1fr 1fr;gap:1px 12px;max-height:55vh;overflow:auto;margin-bottom:12px}.qgridColumnList label{padding:4px;min-width:0}.qgridColumnList label[hidden]{display:none}.qgridFilter select{width:48px}
.qgridTable thead th>button[draggable=true]{cursor:grab}.qgridTable thead th>button[draggable=true]:active{cursor:grabbing}.qgridTable th.qgridDragging{opacity:.5}.qgridTable th.qgridDropBefore{box-shadow:inset 3px 0 #1689ef}.qgridTable th.qgridDropAfter{box-shadow:inset -3px 0 #1689ef}
.qgridExportDialog{width:460px;max-width:90vw;border:1px solid #aab8c8;border-radius:6px;padding:22px;color:#17334f}.qgridExportDialog::backdrop{background:#14273d55}.qgridExportDialog h2{font-size:calc(17px * var(--quantum-font-scale,1.05));margin:0 0 15px}.qgridExportDialog p{font-size:calc(12px * var(--quantum-font-scale,1.05));line-height:19px}.qgridExportDialog select{width:100%;padding:8px}.qgridExportDialog button{padding:8px 20px;border:1px solid #b4c1d0;background:#edf4fb;margin-right:8px}.qgridToolbar{flex-wrap:wrap}
/* Focused row must remain visible over passive-record styling, including modal backdrop. */
.qgridTable tr.qgridPassive.qgridSelected td{background:#b8dcff;box-shadow:inset 0 2px #2478bd,inset 0 -2px #2478bd}.qgridTable tr.qgridPassive.qgridSelected td:first-child{box-shadow:inset 4px 0 #1266ac,inset 0 2px #2478bd,inset 0 -2px #2478bd}.qgridTable tr.qgridPassive.qgridSelected td:last-child{box-shadow:inset -2px 0 #2478bd,inset 0 2px #2478bd,inset 0 -2px #2478bd}.qgridTable tr.qgridPassive.qgridSelected td.qgridCurrency{background:#b8dcff}
.qgridLayoutStatus{margin-left:auto;font-size:calc(10px * var(--quantum-font-scale,1.05));color:#317044;max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qgridLayoutStatus.qgridLayoutWarning{color:#9b590e}
/* ERP-style typed column filter popup shared by every QuantumGrid. */
.qgridTypedHeader{position:relative;padding-right:23px!important}.qgridTable th .qgridHeaderFilter{position:absolute;right:4px;top:2px;width:20px;padding:0;color:#65717d;background:transparent;border:0;font-size:calc(16px * var(--quantum-font-scale,1.05))}.qgridTable th .qgridHeaderFilter.active{color:#087ac1;background:#d4eaff}.qgridCheckFilter{width:100%;height:22px;border:1px solid #bdc2c7;background:white;color:#18374e}
.qgridTypedFilter{position:fixed;z-index:12000;width:280px;box-sizing:border-box;background:#e9e9e9;color:#163047;border:1px solid #bfc1c4;border-radius:4px;box-shadow:0 4px 12px #0003;font:calc(12px * var(--quantum-font-scale,1.05)) 'Segoe UI',sans-serif}.qgridFilterTabs{display:flex;border-bottom:1px solid #aaa;padding:5px 10px 0;gap:8px}.qgridFilterTabs button{border:0;border-bottom:3px solid transparent;background:transparent;padding:7px 3px;color:inherit}.qgridFilterTabs button.active{border-bottom-color:#606060}.qgridFilterBody{padding:10px;height:242px;box-sizing:border-box}.qgridFilterBody>input{box-sizing:border-box;width:100%;margin-bottom:5px;padding:4px;border:1px solid #bfc1c4}.qgridFilterValueList{overflow:auto;height:184px;background:white;border:1px solid #bfc1c4;border-radius:3px;padding:4px;box-sizing:border-box}.qgridFilterChoice{display:flex;align-items:center;gap:5px;min-height:25px;padding:0 5px;cursor:pointer}.qgridFilterChoice:hover{background:#d7ecff}.qgridFilterChoice input{margin:0;width:15px;height:15px;accent-color:#078bd3}.qgridFilterValueList details{margin-left:12px}.qgridFilterValueList summary{cursor:pointer;min-height:25px}.qgridFilterValueList summary .qgridFilterChoice{display:inline-flex}.qgridFilterFoot{display:flex;justify-content:space-between;border-top:1px solid #bfc1c4;padding:9px;gap:5px}.qgridTypedFilter button{cursor:pointer;font:inherit}.qgridFilterFoot button,.qgridFilterCustom button{padding:4px 9px;border:1px solid #bfc1c4;background:#fff;border-radius:3px;color:inherit}.qgridFilterPeriodTitle{background:white;border:1px solid #bfc1c4;padding:4px;margin-bottom:4px}.qgridFilterPeriodTitle+.qgridFilterValueList{height:145px}.qgridFilterCustom{display:flex;gap:3px;flex-wrap:wrap;margin-top:5px}.qgridFilterCustom input{width:110px;font:inherit}.qgridFilterNote{color:#ae251c}
.qgridTable td.qgridNumeric{text-align:right;font-variant-numeric:tabular-nums}.qgridTable tr.qgridSelected td.qgridConditional{background-color:#d5e9fc!important;box-shadow:inset 0 2px #2478bd,inset 0 -2px #2478bd}.qgridFormatting{width:min(900px,90vw)}.qgridFormatting>p{max-width:750px;white-space:normal;margin:8px 0}.qgridFormatRule{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:12px 0;padding:10px;border:1px solid #bdc6d0}.qgridFormatRule label{display:flex;flex-direction:column;gap:4px;margin:0}.qgridFormatRule select{max-width:190px}.qgridFormatRule input:not([type=color]){width:115px}.qgridFormatRule input[type=color]{width:55px;height:29px}.qgridFormatError{color:#aa251c}

/* Shared state remains visible in compact grids. */
.qgridViewport{position:relative;display:flex;flex:1;min-height:0;min-width:0;isolation:isolate}.qgridScroll{position:relative;min-width:0}.qgridLoadingNotice{position:absolute;inset:0;z-index:3;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:12px;text-align:center;font-size:calc(13px * var(--quantum-font-scale,1.05));font-weight:600;letter-spacing:.2px;color:#174b78;background:rgba(244,249,255,.9);cursor:progress}.qgridLoadingNotice::before{content:"";flex:none;box-sizing:border-box;width:32px;height:32px;border:3px solid #d1e3f3;border-top-color:#247fbe;border-right-color:#247fbe;border-radius:50%;animation:qgridLoadingSpin .85s linear infinite}@keyframes qgridLoadingSpin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.qgridLoadingNotice::before{animation:none}}.qgridLoadingNotice[hidden],.qgridFilterStatus[hidden]{display:none}.qgridFilterStatus{display:flex;align-items:baseline;gap:10px;flex:none;padding:7px 10px;background:#fff3cd;color:#684d00;border-bottom:1px solid #dfbf62;overflow-wrap:anywhere}.qgridFilterStatus strong{flex:none}.qgridFilterStatus span{white-space:normal;min-width:0}

.qgridTable tfoot{position:sticky;bottom:0;z-index:2;background:var(--panel,#eef3f8);font-weight:700}.qgridTable tfoot td{border-top:2px solid var(--line,#aebed0)}
.qgridAggregateScroll{flex:none;overflow-x:hidden;overflow-y:hidden;min-width:0;border-top:2px solid #b3bfcc;background:#edf1f6}.qgridAggregateTable td{background:#edf1f6;padding:0 5px;height:22px}.qgridAggregateButton{display:block;width:100%;border:0;background:transparent;color:inherit;font:inherit;font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:2px 0;cursor:pointer}.qgridAggregateButton:hover,.qgridAggregateButton:focus-visible{background:#d5e9fc;outline:1px solid #2478bd}.qgridMenu button[aria-checked=true]::before{content:'✓ ';}.qgridMenu button:disabled{opacity:.45;cursor:default}

.qgridGroupZone{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:7px;border-bottom:1px solid var(--line,#d0d9e3);background:var(--panel,#f7f9fc);font-size:11px}.qgridGroupChips{display:flex;gap:5px}.qgridGroupChip{padding:3px 6px;background:var(--bg,#e5edf7);border:1px solid var(--line,#c0cddd);border-radius:4px}.qgridGroupChip button{padding:1px 4px}.qgridGroupRow td{background:var(--bg,#e8eff7);font-weight:600}.qgridGroupRow button{border:0;background:none;color:inherit}.qgridTable td.qgridPinned,.qgridTable th.qgridPinned{position:sticky;z-index:2;background:var(--panel,#fff);box-shadow:1px 0 var(--line,#d0d9e3)}.qgridTable thead .qgridPinned{z-index:5;background:var(--head,#e9eff6)}.qgridTable .qgridSelected .qgridPinned{background:var(--selected,#d4e7fb)}
.qgridNoSelection .qgridSelectionCell{width:0;max-width:0;padding-left:0!important;padding-right:0!important;border-right:0!important;overflow:hidden}.qgridAggregateScroll[hidden],.qgridSummary[hidden]{display:none}

/* Share one footer row; give the recovered height to records, including embedded grids.
   Keep direct children intact for existing compact/readonly visibility rules. */
.qgrid{display:grid;grid-template-columns:minmax(0,1fr) fit-content(40%);grid-template-rows:auto auto auto minmax(0,1fr) auto auto;container-type:inline-size}
.qgrid>.qgridGroupZone{grid-area:1 / 1 / 2 / -1}
.qgrid>.qgridToolbar{grid-area:2 / 1 / 3 / -1;min-width:0}
.qgridToolbar>input{max-width:100%;min-width:0;box-sizing:border-box}
.qgrid>.qgridFilterStatus{grid-area:3 / 1 / 4 / -1}
.qgrid>.qgridViewport{grid-area:4 / 1 / 5 / -1}
.qgrid>.qgridAggregateScroll{grid-area:5 / 1 / 6 / -1}
.qgrid>.qgridPager{grid-area:6 / 1 / 7 / 2;min-width:0;flex-wrap:wrap;gap:4px 6px;padding:3px 5px}
.qgrid>.qgridSummary{grid-area:6 / 2 / 7 / 3;min-width:0;min-height:0;padding:3px 6px;font-size:calc(10px * var(--quantum-font-scale,1.05));overflow-wrap:anywhere}
.qgridPager>span{min-width:0;overflow-wrap:anywhere}
.qgridPager>button,.qgridPager>select{flex:none}
.qgrid:not(:has(>.qgridSummary:not([hidden])))>.qgridPager{grid-column:1 / -1}
@container(max-width:360px){
 .qgrid>.qgridPager{grid-column:1 / -1}
 .qgrid>.qgridSummary{grid-area:7 / 1 / 8 / -1;padding-top:0}
}
