/* V1.9.1: Fix nested scrolling and page position at 100% zoom.
   One scrollable viewport per table, regardless of table length. */
html, body {width:100%; min-width:0!important; overflow-x:hidden!important}
#application, .main {min-width:0!important; max-width:100%!important}
.main {overflow-x:visible!important}
.page {display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-content:start!important;align-items:start!important;min-width:0!important;max-width:100%!important}
.page[hidden]{display:none!important}
.page > *, .page > .panel, .page .panel, .page .heading,
#minimumAlertContent, #indentAlertContent, .stock-filter-grid, .pursal-filter-grid {min-width:0!important;max-width:100%!important}
#stockTable,#pursalTable,#indentTable {
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:auto!important;max-height:none!important;
  overflow:visible!important;overflow-x:visible!important;overflow-y:visible!important;
  position:relative!important;contain:none!important;
}
/* Exactly the inner viewport scrolls; outer roots NEVER scroll. */
#stockTable>.hierarchy-viewport,#pursalTable>.hierarchy-viewport,#indentTable>.table-scroll {
  display:block!important;position:relative!important;box-sizing:border-box!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:clamp(240px,48dvh,510px)!important;
  max-height:clamp(240px,48dvh,510px)!important;
  overflow:auto!important;overflow-x:scroll!important;overflow-y:scroll!important;
  scrollbar-gutter:stable both-edges!important;overscroll-behavior:contain;
  border:1px solid #c6ded3;border-radius:8px;
}
#stockTable>.hierarchy-viewport>table,#pursalTable>.hierarchy-viewport>table,
#indentTable>.table-scroll>table {
  display:table!important;width:max-content!important;min-width:100%!important;
  max-width:none!important;table-layout:auto!important;overflow:visible!important;
}
#stockTable>.purchase-table-controls,#pursalTable>.purchase-table-controls,
#indentTable>.purchase-table-controls {position:relative!important;top:auto!important;left:auto!important;z-index:5!important;display:flex!important;max-width:100%!important;}
#stockTable>.pagination,#pursalTable>.pagination,#indentPagination {position:relative!important;display:flex;flex-wrap:wrap;gap:8px;align-items:center;max-width:100%!important;}
#indentAlertContent>.panel {display:block!important;min-width:0!important;max-width:100%!important;}
.indent-selection-toolbar {position:sticky!important;top:0!important;z-index:14!important;background:#fff!important;
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;
  padding:10px!important;border:1px solid #cee4d8;border-radius:9px;box-shadow:0 2px 8px #1232;}
#indentToPursal,#stockToPursal {display:inline-flex!important;visibility:visible!important;opacity:1!important;white-space:normal!important;}
#stockHeroActions {display:flex;flex-wrap:wrap;gap:8px}
#stockHeroActions[hidden] {display:none!important}
#page-reports,#page-targets,#page-departments,#page-users {align-content:start!important;grid-auto-rows:max-content!important;}
#page-reports>.panel,#page-targets>.panel,#page-departments>.panel,#page-users>.panel {align-self:start!important;}
@media(max-width:800px){.main{padding-left:12px!important;padding-right:12px!important}.indent-selection-toolbar{position:relative!important}}

.purchase-floating-xscroll{display:none!important}
