.irv-workspace{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:6px;background:#d4d4d4;padding:6px;direction:rtl}.irv-main{min-width:0;background:#efefef;border:1px solid #888}.irv-heading{display:flex;justify-content:space-between;padding:8px;background:#eee}.irv-sidebar{display:flex;flex-direction:column;gap:9px;background:#eee;border:1px solid #999;padding:10px}.irv-sidebar label{font-size:12px;display:block}.irv-sidebar label input:not([type=checkbox]),.irv-sidebar select{display:block;width:100%;margin-top:4px}.irv-sidebar .btn{text-align:center;min-height:30px}.irv-grid{font:12px Tahoma,Arial,sans-serif;border-collapse:collapse;width:max-content;min-width:100%;background:#fff}.irv-grid th,.irv-grid td{border:1px solid #bbb;padding:4px 7px;white-space:nowrap}.irv-grid thead th{background:#d1d1d1;color:#151515}.irv-grid tbody tr:hover{background:#e6f2ff}.irv-grid .irv-group th{background:#fff299;color:#000;text-align:right}.irv-grid .irv-subtotal{background:#d8edf8;font-weight:bold}.irv-totals{background:#e1e1e1;font-weight:bold;padding:8px}.irv-note{font-size:11px;margin:8px}.irv-main .table-wrap{max-height:calc(100vh - 290px);overflow:auto}@media(max-width:800px){.irv-workspace{grid-template-columns:minmax(0,1fr)}.irv-sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Keep the material identity visible while moving through warehouse columns. */
#irvGrid{max-height:calc(100vh - 260px);overflow:auto;scrollbar-gutter:stable}.irv-grid thead th{position:sticky;top:0;z-index:4}.irv-grid tr[data-inventory-item] td:nth-child(2),.irv-grid thead th:nth-child(2){position:sticky;right:0;background:#f4f7fa;z-index:3;min-width:220px;max-width:320px}.irv-grid thead th:nth-child(2){z-index:5;color:#111}.irv-grid tr[data-inventory-item]:hover td:nth-child(2){background:#e6f2ff}
/* The summary remains below the scroll area, even for a long result set. */
.irv-totals{display:flex;flex-direction:column;gap:7px;border-top:2px solid #61758a;color:#182b3b;background:#e7f0f6;font-size:13px}.irv-unit-totals{display:flex;flex-wrap:wrap;gap:8px 20px}.irv-grid tfoot{position:sticky;bottom:0;z-index:4;background:#e7f0f6;font-weight:bold}.irv-grid tfoot td{background:#e7f0f6;border-top:1px solid #61758a}
@media print{.irv-grid :is(thead,thead th,tfoot),.irv-grid tr[data-inventory-item] td:nth-child(2){position:static!important}.irv-main .table-wrap,#irvGrid{max-height:none;overflow:visible}}

/* One bounded scroll area keeps its horizontal scrollbar in the viewport. */
@layer modernApproved {
@media screen {
 /* In the classic shell the outer content used to scroll independently of
    #irvGrid, carrying the sticky header behind the fixed report caption. */
 body.zace-desktop:not(.zace-modern) #content#content:has(>.irv-workspace){height:calc(100dvh - var(--vp-worktop,110px) - 28px)!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
 body.zace-desktop:not(.zace-modern) #content#content>.irv-workspace{flex:1 1 0!important;min-height:0!important;overflow:hidden!important}
 body.zace-desktop:not(.zace-modern) #content#content .irv-main{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
 body.zace-desktop:not(.zace-modern) #content#content #irvGrid{flex:1 1 0!important;min-height:100px!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable;position:relative}
 body.zace-desktop:not(.zace-modern) #content#content :is(.irv-heading,.irv-totals,.irv-note){flex:0 0 auto!important}
 body.zace-desktop:not(.zace-modern) #content#content .irv-sidebar{min-height:0!important;overflow:auto!important}
 body.zace-desktop:not(.zace-modern) #content#content .irv-grid thead th{position:sticky!important;top:0!important;z-index:7!important}
 body.zace-desktop:not(.zace-modern) #content#content .irv-grid thead th:nth-child(2){right:0!important;z-index:9!important}
 body.zace-desktop:not(.zace-modern) #content#content .irv-totals{max-height:110px;overflow:auto}
 body.zace-desktop:not(.zace-modern) #content#content .irv-grid tfoot{position:static!important}
 body.zace-modern #content#content.vx-scroll-page>.irv-workspace{flex:1 1 0!important;min-height:0!important;overflow:hidden!important}
 body.zace-modern #content#content .irv-main{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
 body.zace-modern #content#content #irvGrid{flex:1 1 0!important;min-height:100px!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable;position:relative}
 body.zace-modern #content#content .irv-heading,body.zace-modern #content#content .irv-totals,body.zace-modern #content#content .irv-note{flex:0 0 auto!important}
 body.zace-modern #content#content .irv-sidebar{min-height:0!important;overflow:auto!important}
 body.zace-modern #content#content .irv-grid thead th{position:sticky!important;top:0!important;z-index:7!important}
 body.zace-modern #content#content .irv-grid tr[data-inventory-item] td:nth-child(2){white-space:normal!important;overflow-wrap:anywhere;min-width:220px;max-width:320px;position:sticky!important;right:0!important;z-index:4!important;background:#f4f7fa!important}
 body.zace-modern #content#content .irv-grid thead th:nth-child(2){right:0!important;z-index:9!important}
 body.zace-modern #content#content .irv-totals{max-height:110px;overflow:auto}
 body.zace-modern #content#content .irv-grid tfoot{position:static!important}
 /* Warehouse/unit summaries can contain hundreds of measures. They are
    separate scroll regions, never part of the table's sticky-header owner. */
 body.zace-desktop #content#content .irv-main>.report-top-totals{flex:0 0 auto!important;position:relative!important;top:auto!important;max-height:120px!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable;z-index:1!important}
 /* Raise the entire header group, not only its cells: the shared sticky
    thead creates a stacking context otherwise covered by sticky item cells. */
 body.zace-desktop #content#content .irv-grid thead{position:sticky!important;top:0!important;z-index:6!important}
 body.zace-desktop #content#content:has(>.irv-workspace){overflow:hidden!important}
 @media(max-width:800px){
  /* Keep controls beside the grid: a stacked controls row used to consume
     half the remaining height and clip the grid on a narrow desktop. */
  body.zace-desktop #content#content>.irv-workspace{grid-template-columns:minmax(0,1fr) 150px!important}
  body.zace-desktop #content#content .irv-sidebar{display:flex!important;flex-direction:column!important;padding:6px;gap:6px}
  body.zace-desktop #content#content .irv-main>.report-top-totals{max-height:64px!important}
  body.zace-desktop #content#content .irv-main>.report-amount-search{flex:0 0 auto!important;max-height:56px;overflow:auto;overscroll-behavior:contain}
  /* The top summary already contains every unit total and the grand value;
     retain the lower fallback when that summary is absent. Print is unchanged. */
  body.zace-desktop #content#content .irv-main:has(>.report-top-totals)>.irv-totals{display:none!important}
  body.zace-desktop #content#content .irv-note{margin:4px;max-height:28px;overflow:auto}
 }
}
 /* Keep totals and full warnings accessible without taking the grid's height.
    The report provider retains every unit/warehouse total in print/export. */
 body.zace-desktop #content#content .irv-main>.report-top-totals{max-height:44px!important}
 body.zace-desktop #content#content .irv-heading{padding:3px 6px!important;min-height:24px!important;line-height:18px!important}
 body.zace-desktop #content#content .irv-main:has(>.report-top-totals)>#irvTotals{display:none!important}
 body.zace-desktop #content#content .irv-note-panel{flex:0 0 auto;max-height:112px;overflow:auto;margin:3px 5px;border:1px solid #b9c9db;background:#fff8de;font-size:12px}
 body.zace-desktop #content#content .irv-note-panel summary{cursor:pointer;padding:5px;font-weight:600;color:#674900}
 body.zace-desktop #content#content .irv-note-panel .irv-note{margin:5px;max-height:none}
 body.zace-desktop #content#content .irv-main>.report-amount-search{flex:0 0 auto!important;max-height:56px;overflow:auto}
}
@media print{.irv-note-panel>summary{display:none}.irv-note-panel:not([open])>*{display:block!important}}

.irv-views{display:flex;flex-wrap:wrap;gap:6px;padding:5px;flex:0 0 auto}.irv-view{display:inline-flex;gap:2px}.irv-view button[aria-pressed="true"]{background:#dceafa;color:#163c6e;border-color:#6389b9}.irv-view .irv-view-close{background:#fce4e4;color:#9f2020;min-width:28px}.irv-views button{min-height:30px}@media print{.irv-views{display:none}}

.irv-pages{flex:0 0 auto!important;display:flex;flex-wrap:wrap;gap:5px;align-items:center;padding:4px 6px;font-size:12px}.irv-pages button{min-height:27px;padding:3px 8px}.irv-pages span{flex:1;text-align:center}
@media print{.irv-pages{display:none!important}}
