/* Proxus V136 · responsive shell + renderizado ligero
   Capa final no destructiva: corrige el menú lateral sin modificar el layout funcional previo. */

/* Escritorio: el menú se adapta a la altura disponible y no genera scroll propio. */
@media (min-width:1101px){
  .sidebar{
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
    padding:clamp(9px,1.7dvh,15px) 12px!important;
  }
  .sidebar .brand{
    flex:0 0 auto!important;
    min-height:clamp(48px,8.2dvh,66px)!important;
    padding:2px 6px clamp(7px,1.4dvh,12px)!important;
    margin-bottom:clamp(4px,.9dvh,8px)!important;
  }
  .sidebar .brand-logo{
    width:clamp(40px,6.4dvh,52px)!important;
    height:clamp(40px,6.4dvh,52px)!important;
  }
  .sidebar>a{
    flex:0 1 auto!important;
    min-height:clamp(32px,5.15dvh,42px)!important;
    padding:clamp(4px,.72dvh,7px) 10px!important;
    margin:clamp(0px,.12dvh,2px) 0!important;
    border-radius:9px!important;
    font-size:clamp(.76rem,1.55dvh,.91rem)!important;
    line-height:1.08!important;
  }
  .sidebar>a i{font-size:clamp(.92rem,1.8dvh,1.05rem)!important;flex:0 0 19px!important;text-align:center!important}
  .sidebar .user-mini{
    flex:0 0 auto!important;
    margin-top:auto!important;
    padding:clamp(7px,1.1dvh,10px)!important;
    border-radius:10px!important;
    font-size:clamp(.68rem,1.32dvh,.78rem)!important;
    line-height:1.15!important;
  }
  .sidebar-collapsed .sidebar>a{justify-content:center!important;padding-left:6px!important;padding-right:6px!important}
}

@media (min-width:1101px) and (max-height:720px){
  .sidebar .brand-sub{display:none!important}
  .sidebar .brand{min-height:44px!important}
  .sidebar .brand-logo{width:40px!important;height:40px!important}
  .sidebar>a{min-height:31px!important;padding:4px 9px!important;font-size:.76rem!important}
  .sidebar .user-mini{padding:6px 8px!important;font-size:.67rem!important}
}

/* Menú móvil/tablet: contenido compacto, sin barra de desplazamiento. */
@media (max-width:1100px){
  .offcanvas-fv{overflow:hidden!important;overscroll-behavior:none!important;background:var(--proxus-surface)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  .offcanvas-fv .offcanvas-header{flex:0 0 auto!important;padding:12px 14px!important}
  .offcanvas-fv .offcanvas-body{display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:10px 12px 12px!important}
  .offcanvas-fv .mobile-user-card{flex:0 0 auto!important;margin-bottom:8px!important;padding:9px 10px!important;border-radius:10px!important}
  .offcanvas-fv .mobile-menu-links{display:grid!important;grid-template-columns:1fr!important;gap:3px!important;min-height:0!important}
  .offcanvas-fv .mobile-menu-links a{min-height:38px!important;padding:7px 9px!important;margin:0!important;border-radius:9px!important;font-size:.84rem!important;line-height:1.05!important}
  .offcanvas-fv .mobile-menu-links a i{font-size:1rem!important}
  .premium-topbar{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:rgba(255,255,255,.985)!important}
  body.dark-mode .premium-topbar{background:rgba(16,34,57,.99)!important}
}

/* En móviles apaisados o pantallas de poca altura, el menú usa dos columnas para evitar scroll. */
@media (max-width:1100px) and (max-height:620px){
  .offcanvas-fv{width:min(92vw,520px)!important;max-width:min(92vw,520px)!important}
  .offcanvas-fv .offcanvas-header{padding:8px 11px!important}
  .offcanvas-fv .offcanvas-logo{width:36px!important;height:36px!important}
  .offcanvas-fv .mobile-user-card{padding:6px 9px!important;margin-bottom:5px!important;font-size:.7rem!important}
  .offcanvas-fv .mobile-menu-links{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:3px 5px!important}
  .offcanvas-fv .mobile-menu-links a{min-height:33px!important;padding:5px 7px!important;font-size:.72rem!important;gap:6px!important}
  .offcanvas-fv .mobile-menu-links a i{font-size:.9rem!important}
}

@media (max-width:430px) and (min-height:621px){
  .offcanvas-fv{width:min(88vw,300px)!important;max-width:min(88vw,300px)!important}
  .offcanvas-fv .mobile-menu-links a{min-height:37px!important;font-size:.8rem!important}
}

/* V136 rendimiento de renderizado: las matrices fuera de pantalla se pintan bajo demanda. */
.ip-matrix-card{content-visibility:auto;contain-intrinsic-size:360px 820px}
.ip-report-shell{contain:layout style}

@media (prefers-reduced-motion:reduce){
  .sidebar,.content,.premium-topbar,.offcanvas-fv{transition:none!important}
}
