/* R32.30: keep one document scrollport and leave inner panels independent. */
html {
  min-height: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

html body,
html[class] body {
  min-height: 100vh !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  overscroll-behavior-y: auto !important;
  touch-action: auto !important;
}

/* R32.32 — portal-wide scroll/accessibility guardrails. */
html { scroll-padding-top: 84px !important; }
body { min-width: 0 !important; }
:where(main,section,article,form,.panel,.card,.page,.wrap,.content,.app-shell,.parent-shell,.student-plan,.executive-main,.counselor-main) {
  min-width: 0;
}
:where(input,select,textarea,button,a,[tabindex]):focus {
  scroll-margin-top: 96px;
  scroll-margin-bottom: 120px;
}
.sidebar {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.table-wrap,
.table-responsive,
[role="region"][aria-label*="جدول"] {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 860px) {
  html { scroll-padding-top: 72px !important; }
  html body, html[class] body { min-height: 100dvh !important; }
  :where(.sidebar,.drawer,.mobile-menu)[aria-hidden="true"] { pointer-events: none; }
}
