/* MAX-Cloud scroll fix 2026-10-03: authenticated shell only; keep landing pages and other apps unchanged. */
.shell[data-app="max-cloud"] > .main > .content {
  min-width:0!important; min-height:0!important;
  overflow-x:hidden!important; overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-y:contain!important; touch-action:pan-x pan-y pinch-zoom!important;
}
@media (min-width:901px) {
  html:has(.shell[data-app="max-cloud"]), body:has(.shell[data-app="max-cloud"]) {
    width:100%!important; height:100%!important; min-height:0!important; max-height:100%!important;
    overflow:hidden!important;
  }
  body:has(.shell[data-app="max-cloud"]) #app {
    height:100vh!important; height:100dvh!important; min-height:0!important;
    max-height:100dvh!important; padding:0!important; overflow:hidden!important;
  }
  .shell[data-app="max-cloud"] {
    height:100vh!important; height:100dvh!important; min-height:0!important; max-height:100dvh!important;
    grid-template-rows:minmax(0,1fr)!important; overflow:hidden!important;
  }
  .shell[data-app="max-cloud"] > .main {
    grid-column:2!important; grid-row:1!important; min-width:0!important; min-height:0!important;
    height:100%!important; max-height:100%!important;
    display:grid!important; grid-template-rows:auto minmax(0,1fr)!important; overflow:hidden!important;
  }
  .shell[data-app="max-cloud"] > .main > .topbar { position:relative!important; top:auto!important; grid-row:1!important; }
  .shell[data-app="max-cloud"] > .main > .content { grid-row:2!important; height:auto!important; max-height:100%!important; }
  .shell[data-app="max-cloud"] > .sidebar { height:100vh!important; height:100dvh!important; }
}
/* Auto margins shrink grid items; the scroll surface must fill the complete work area. */
.shell[data-app="max-cloud"] > .main > .content {
  width:100%!important; max-width:none!important; margin:0!important;
}
@media (min-width:901px) {
  .shell[data-app="max-cloud"] > .main { grid-template-columns:minmax(0,1fr)!important; }
  .shell[data-app="max-cloud"] > .main > :is(.topbar,.content) { grid-column:1!important; }
}
