/* IBOToolbox Member Area V2.5.4 - Fixed Static Sidebar Scroll Behavior Update
   Desktop: sidebar stays fixed/static while main content scrolls. Sidebar content scrolls internally.
   Mobile/tablet: original drawer/mobile behavior is preserved. */
@media (min-width: 901px){
  html body.app-body.stage37-body .app-shell.stage37-shell{
    display:block!important;
    grid-template-columns:none!important;
    min-height:100vh!important;
    padding-left:286px!important;
    overflow:visible!important;
  }
  html body .app-sidebar.stage37-member-sidebar,
  html body .stage37-member-sidebar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    bottom:0!important;
    width:286px!important;
    min-width:286px!important;
    height:100vh!important;
    height:100dvh!important;
    max-height:100vh!important;
    max-height:100dvh!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    z-index:80!important;
    scrollbar-width:thin!important;
    scrollbar-color:rgba(147,197,253,.45) rgba(255,255,255,.08)!important;
    padding-bottom:24px!important;
  }
  html body .stage37-member-sidebar::-webkit-scrollbar{width:7px!important;}
  html body .stage37-member-sidebar::-webkit-scrollbar-track{background:rgba(255,255,255,.06)!important;border-radius:999px!important;}
  html body .stage37-member-sidebar::-webkit-scrollbar-thumb{background:rgba(147,197,253,.45)!important;border-radius:999px!important;}
  html body .stage37-member-sidebar::-webkit-scrollbar-thumb:hover{background:rgba(147,197,253,.72)!important;}
  html body .app-main.stage37-main,
  html body .stage37-main{
    margin-left:0!important;
    width:auto!important;
    min-width:0!important;
    min-height:100vh!important;
    position:relative!important;
    z-index:1!important;
  }
  /* Strictly keep profile and credits dropdowns inside the fixed sidebar, never over dashboard cards. */
  html body .stage37-member-sidebar .mv2-profile-menu,
  html body .stage37-member-sidebar .mv2-credit-menu,
  html body .mv2-profile-menu,
  html body .mv2-credit-menu{
    position:relative!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    width:100%!important;
    max-width:100%!important;
    margin:8px 0 12px!important;
    max-height:42vh!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    transform:none!important;
    z-index:90!important;
  }
  html body .stage37-member-sidebar .mv2-profile-menu.open,
  html body .stage37-member-sidebar .mv2-credit-menu.open,
  html body .mv2-profile-menu.open,
  html body .mv2-credit-menu.open{
    display:grid!important;
  }
  /* More tools remains the only right overlay drawer. */
  html body .mv2-more-drawer{
    position:fixed!important;
    top:0!important;
    right:0!important;
    left:auto!important;
    height:100dvh!important;
    z-index:10090!important;
  }
  html body .mv2-more-backdrop{z-index:10080!important;}
}

@media (max-width: 900px){
  html body.app-body.stage37-body .app-shell.stage37-shell{
    display:block!important;
    padding-left:0!important;
  }
  html body .app-sidebar.stage37-member-sidebar,
  html body .stage37-member-sidebar{
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  html body .stage37-member-sidebar.mobile-open{
    position:fixed!important;
    top:0!important;
    left:0!important;
    bottom:0!important;
    width:min(295px,86vw)!important;
    height:100dvh!important;
    max-height:100dvh!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    z-index:10020!important;
  }
}
