/* Mobile dashboard arrangement polish. Scoped to phone/tablet only; desktop geometry remains untouched. */
@media (max-width:980px){
  body.nw-modern-erp .app-shell #content{padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))!important}
  body.nw-modern-erp .app-shell .grid.grid-4:has(>.stat),
  body.nw-modern-erp .app-shell .grid.grid-3:has(>.stat){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }
  body.nw-modern-erp .app-shell .stat,
  body.nw-modern-erp .app-shell [class*="kpi-card"]{
    min-width:0!important;
    min-height:118px!important;
    padding:14px 12px 13px!important;
    border-radius:17px!important;
    overflow:hidden!important;
  }
  body.nw-modern-erp .app-shell .stat .nw-stat-icon,
  body.nw-modern-erp .app-shell [class*="kpi-card"] .nw-stat-icon{
    position:static!important;
    float:none!important;
    display:flex!important;
    width:32px!important;height:32px!important;
    margin:0 0 8px!important;
  }
  body.nw-modern-erp .app-shell .stat b,
  body.nw-modern-erp .app-shell [class*="kpi-card"] b{
    display:block!important;
    max-width:100%!important;
    font-size:17px!important;
    line-height:1.25!important;
    letter-spacing:-.5px!important;
    overflow-wrap:anywhere!important;
  }
  body.nw-modern-erp .app-shell .stat small,
  body.nw-modern-erp .app-shell .stat span:not(.nw-stat-icon),
  body.nw-modern-erp .app-shell [class*="kpi-card"] small{
    font-size:11px!important;
    line-height:1.45!important;
  }
  body.nw-modern-erp .nw-drawer-nav,
  body.nw-modern-erp #sidebar #nav{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    align-content:start!important;
  }
  body.nw-modern-erp .nw-drawer-nav .nav-group,
  body.nw-modern-erp #sidebar #nav .nav-group{
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  body.nw-modern-erp .nw-drawer-nav .nav-group-title,
  body.nw-modern-erp #sidebar #nav .nav-group-title{
    min-height:58px!important;
    padding:10px 9px!important;
  }
  body.nw-modern-erp .nw-drawer-nav .nav-group-copy b,
  body.nw-modern-erp #sidebar #nav .nav-group-copy b{
    font-size:12px!important;
    white-space:nowrap!important;
  }
  body.nw-modern-erp .nw-drawer-nav .nav-group:last-child:nth-child(odd),
  body.nw-modern-erp #sidebar #nav .nav-group:last-child:nth-child(odd){
    grid-column:1 / -1!important;
    width:calc(50% - 4px)!important;
    justify-self:center!important;
  }
}
@media (max-width:420px){
  body.nw-modern-erp .app-shell .stat,
  body.nw-modern-erp .app-shell [class*="kpi-card"]{min-height:114px!important;padding:13px 11px!important}
  body.nw-modern-erp .app-shell .stat b,
  body.nw-modern-erp .app-shell [class*="kpi-card"] b{font-size:16px!important}
}
