/* v0.11.11-FN4R1.19 · Digital Hub exact collapsed-rail alignment.
   Finalizes the user's annotated geometry rather than centring against a
   self-referential nav margin: the seam control sits immediately below the
   top bar, the first navigation cell begins just beneath it, and four manager
   destinations share the available vertical band equally so the last card
   never disappears behind the pinned account footer at zoomed laptop sizes. */

@media (min-width:1051px){
  body.imb-institutional-aurora #appView.app-shell.sidebar-collapsed #hubSidebar{
    --hub-rail-nav-start:2.65rem;
    --hub-rail-nav-gap:.72rem;
  }

  /* Match the marked screenshot: the control belongs to the seam directly
     below the top bar, not halfway through a large artificial free band. */
  body.imb-institutional-aurora #appView.app-shell.sidebar-collapsed #hubSidebar .hub-sidebar-rail-toggle{
    top:calc(4.75rem + .45rem)!important;
  }

  /* The manager rail is a four-cell vertical system. Its height is capped at
     the intended tall-card composition, but on zoomed/short laptop viewports
     it contracts as one unit so Settings remains fully visible above GD. */
  body.hub-manager-mode.imb-institutional-aurora #appView.app-shell.sidebar-collapsed #hubSidebar .sidebar-nav{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:repeat(4,minmax(0,1fr))!important;
    flex:0 0 auto!important;
    width:100%!important;
    height:min(37.76rem,calc(100dvh - 13.75rem))!important;
    min-height:0!important;
    margin-top:var(--hub-rail-nav-start)!important;
    gap:var(--hub-rail-nav-gap)!important;
    overflow:visible!important;
    align-content:stretch!important;
  }

  body.hub-manager-mode.imb-institutional-aurora #appView.app-shell.sidebar-collapsed #hubSidebar .sidebar-nav>.nav-link{
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    height:100%!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
  }

  /* Keep the glyph centred in the complete tall cell, exactly as marked. */
  body.imb-institutional-aurora #appView.app-shell.sidebar-collapsed #hubSidebar .nav-icon{
    display:grid!important;
    place-items:center!important;
    align-self:center!important;
    justify-self:center!important;
    margin:0!important;
    transform:none!important;
  }

  /* Non-manager accounts only expose Home. Give that one destination the same
     visual scale without creating empty manager tracks. */
  body:not(.hub-manager-mode).imb-institutional-aurora #appView.app-shell.sidebar-collapsed #hubSidebar .sidebar-nav{
    margin-top:var(--hub-rail-nav-start)!important;
    gap:0!important;
    overflow:visible!important;
  }
  body:not(.hub-manager-mode).imb-institutional-aurora #appView.app-shell.sidebar-collapsed #hubSidebar .sidebar-nav>.nav-link{
    min-height:8.65rem!important;
    height:8.65rem!important;
    margin:0!important;
  }

  /* Preserve a small clean breathing band before the pinned account tile. */
  body.imb-institutional-aurora #appView.app-shell.sidebar-collapsed #hubSidebar .sidebar-spacer{
    min-height:.72rem!important;
  }
}

@supports not (height:100dvh){
  @media (min-width:1051px){
    body.hub-manager-mode.imb-institutional-aurora #appView.app-shell.sidebar-collapsed #hubSidebar .sidebar-nav{
      height:min(37.76rem,calc(100vh - 13.75rem))!important;
    }
  }
}
