/* ERP Comercial Chile v10.23.2
   Recupera el desplazamiento vertical usando el documento como superficie de
   scroll. El layout anterior dependía de un workspace flex con scroll interno
   que podía quedar bloqueado en Chrome. Las reglas del logo siguen en el
   hotfix v10.23.1 y no se modifican aquí. */

html {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
  scroll-behavior: auto !important;
  scrollbar-gutter: stable;
}

body {
  height: auto !important;
  min-height: 100dvh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}

#root {
  height: auto !important;
  min-height: 100dvh !important;
  overflow: visible !important;
}

#root > div.flex {
  height: auto !important;
  min-height: 100dvh !important;
  overflow: visible !important;
  align-items: stretch;
}

#root main.flex {
  height: auto !important;
  max-height: none !important;
  min-height: 100dvh !important;
  overflow: visible !important;
}

#root main > .responsive-workspace {
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-y !important;
  scrollbar-gutter: auto !important;
}

/* El menú conserva su propio scroll; en escritorio acompaña al viewport. */
@media (min-width: 1024px) {
  #root aside.no-print {
    position: sticky !important;
    top: 0 !important;
    align-self: flex-start !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
}

@media (max-width: 1023px) {
  html {
    scrollbar-gutter: auto;
  }
}
