/* AIOTOR ERP V12.7.26 — one scroll owner + non-blocking loading surfaces.
   Final cascade layer for normal ERP register/workspace screens. */

/* Runtime screens */
html:has(body.aiotor-runtime-shell:not(.rt-order-entry-active):not(.page-cat-printstudio)),
html:has(body.admin-tw:not(.page-cat-printstudio)){
  height:auto!important;
  min-height:100%!important;
  max-height:none!important;
  overflow-x:clip!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  scroll-behavior:auto!important;
}
body.aiotor-runtime-shell:not(.rt-order-entry-active):not(.page-cat-printstudio),
body.admin-tw:not(.page-cat-printstudio){
  height:auto!important;
  min-height:100vh!important;
  max-height:none!important;
  overflow-x:clip!important;
  overflow-y:visible!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-y!important;
}
body.aiotor-runtime-shell:not(.rt-order-entry-active):not(.page-cat-printstudio)
:is(.rt-app,.rt-platinum-shell,.rt-dashboard,.rt-content,.rt-main,.rt-table-card,.rt-screen,.rt-screen-body,.rt-workspace,.rt-page,.page-shell,.content-shell,.app-shell),
body.admin-tw:not(.page-cat-printstudio)
:is(.app-shell,.main,.main-full,.shared-shell-main,.shared-shell-content,.shared-shell-body,.tabs.active,.page-shell,.content-shell){
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:visible!important;
  overscroll-behavior-y:auto!important;
}
body.aiotor-runtime-shell:not(.rt-order-entry-active):not(.page-cat-printstudio)
:is(.rt-table-wrap,.table-wrap,.table-responsive,.data-table-wrap),
body.admin-tw:not(.page-cat-printstudio)
:is(.rt-table-wrap,.table-wrap,.table-responsive,.data-table-wrap,.ops-table-wrap){
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:visible!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-y!important;
}

/* Loading visuals must never become an interaction/scroll surface. */
.rt-loading .rt-table-card:after,
.rt-loading .rt-table-wrap:after,
.rt-runtime-progress,
.rt-backend-load-progress,
#globalBusyBar{
  pointer-events:none!important;
}
.rt-loading .rt-table-card{overflow:visible!important}

/* Route is master-data work, not a failed PO transaction. */
[data-screen="orders.pending"] tr[data-po-state="failed"] td[data-col-key="status"] .tone-warning{
  background:#fff4d8!important;
  color:#825b00!important;
}
