/* V188 — Smart Member Portal navigation hardening.
   The shell itself never scroll-clips the final items. The links area owns any
   vertical scrolling and always keeps bottom breathing room above support links. */
.portal-sidebar-v160{
  display:flex;
  flex-direction:column;
  position:sticky;
  top:92px;
  height:auto;
  max-height:calc(100dvh - 112px);
  min-height:0;
  overflow:hidden!important;
}
.portal-sidebar-head{flex:0 0 auto}
.portal-sidebar-links{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding-bottom:18px!important;
}
.portal-sidebar-links::-webkit-scrollbar{width:6px}
.portal-sidebar-links::-webkit-scrollbar-track{background:transparent}
.portal-sidebar-links::-webkit-scrollbar-thumb{background:rgba(150,180,195,.24);border-radius:999px}
.portal-sidebar-support{flex:0 0 auto;position:relative;z-index:2;background:linear-gradient(180deg,rgba(5,16,23,.97),rgba(5,16,23,1));padding-bottom:14px}
.portal-sidebar-v160::after{display:none!important}

@media(max-width:820px){
  .portal-sidebar-v160{position:relative;top:auto;max-height:none;overflow:visible!important;margin-bottom:16px}
  .portal-sidebar-links{overflow:visible;display:grid;grid-template-columns:1fr 1fr;padding-bottom:10px!important}
}

@media(max-width:520px){
  .portal-layout-v160{padding-top:8px}
  .portal-sidebar-head{padding:13px 14px 11px}
  .portal-sidebar-head small{font-size:.6rem;letter-spacing:.085em}
  .portal-sidebar-head strong{font-size:1.03rem;margin-top:3px}
  .portal-sidebar-head p{margin-top:4px;font-size:.7rem;line-height:1.32}
  .portal-sidebar-links{padding:5px!important;grid-template-columns:1fr}
  .portal-nav-link{grid-template-columns:29px minmax(0,1fr);gap:8px;min-height:44px;padding:6px 9px;margin:1px 0;border-radius:12px}
  .portal-nav-link>span{width:26px;height:26px;border-radius:8px;font-size:.64rem}
  .portal-nav-link strong{font-size:.8rem;line-height:1.1}
  .portal-nav-link small{font-size:.6rem;line-height:1.16;margin-top:2px}
}

@media(max-width:820px) and (max-height:520px){
  .portal-sidebar-v160{max-height:calc(100dvh - 72px);overflow:hidden!important}
  .portal-sidebar-links{overflow-y:auto}
}


/* V189 — Advanced Control Center sidebar must stay above content bands */
body.portal-advanced-v160 .portal-layout-grid-v160{isolation:isolate}
body.portal-advanced-v160 .portal-sidebar-v160{
  z-index:20;
  align-self:start;
}
body.portal-advanced-v160 .portal-content-v160{
  position:relative;
  z-index:1;
}
body.portal-advanced-v160 #advanced-controls.member-controls-band{
  box-shadow:none!important;
  clip-path:none!important;
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  border-radius:22px;
  overflow:hidden;
}
body.portal-advanced-v160 #advanced-controls.member-controls-band>.container{
  width:100%;
  max-width:none;
  padding-left:22px!important;
  padding-right:22px!important;
}
@media(max-width:820px){
  body.portal-advanced-v160 #advanced-controls.member-controls-band{border-radius:18px}
}
