/* Compact and visibly distinct 3-column mobile business launcher.
   Read-only presentation. Legacy navigation, workspaces, and accounting routes stay in place. */
@media screen and (max-width:980px){
  html body .app-shell #topPrimaryMenu.top-primary-menu.grouped-top-menu.erp-top-menu{
    position:relative!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    align-items:stretch!important;
    justify-items:stretch!important;
    gap:8px!important;
    box-sizing:border-box!important;
    width:calc(100% - 24px)!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    margin:9px 12px 13px!important;
    padding:13px 11px!important;
    border:1px solid #e7ecf3!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 5px 17px rgba(15,23,42,.035)!important;
    overflow:visible!important;
    contain:none!important;
    touch-action:pan-y!important;
    z-index:115!important;
  }
  html body .app-shell #topPrimaryMenu > .nw-mobile-launcher-title{
    display:flex!important;
    grid-column:1/-1!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    margin:0 2px 4px!important;
    padding:0 0 10px!important;
    border:0!important;
    border-bottom:1px solid #edf1f6!important;
    color:#1b2b43!important;
    font-size:13px!important;
    font-weight:800!important;
    line-height:1.2!important;
    text-align:left!important;
    white-space:normal!important;
  }
  html body .app-shell #topPrimaryMenu > .nw-mobile-launcher-title small{
    font-size:10px!important;
    font-weight:500!important;
    color:#8996a8!important;
  }
  html body .app-shell #topPrimaryMenu > .top-primary-group{
    position:relative!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    flex:none!important;
  }
  html body .app-shell #topPrimaryMenu > .top-primary-group:last-of-type:nth-of-type(3n+1){
    grid-column:2!important;
  }
  html body .app-shell #topPrimaryMenu:has(>.top-primary-group:nth-of-type(2):last-of-type){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html body .app-shell #topPrimaryMenu:has(>.top-primary-group:nth-of-type(1):last-of-type){
    grid-template-columns:1fr!important;
  }
  html body .app-shell #topPrimaryMenu .top-primary-group>.top-primary-group-trigger{
    position:relative!important;
    box-sizing:border-box!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    min-height:78px!important;
    height:100%!important;
    gap:7px!important;
    margin:0!important;
    padding:10px 3px 9px!important;
    border:1px solid #e9eef5!important;
    border-radius:13px!important;
    background:#f8fafc!important;
    color:#46566c!important;
    text-align:center!important;
    white-space:normal!important;
    font-size:11px!important;
    box-shadow:none!important;
    touch-action:manipulation!important;
  }
  html body .app-shell #topPrimaryMenu .top-primary-group>.top-primary-group-trigger>b{
    display:block!important;
    flex:none!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    color:inherit!important;
    font-size:11px!important;
    font-weight:700!important;
    line-height:1.3!important;
    letter-spacing:-.025em!important;
    white-space:normal!important;
    word-break:keep-all!important;
    overflow-wrap:anywhere!important;
    text-align:center!important;
  }
  html body .app-shell #topPrimaryMenu .top-primary-group>.top-primary-group-trigger .top-menu-chevron{
    position:absolute!important;
    top:8px!important;
    right:8px!important;
    font-size:8px!important;
    color:#9eacbb!important;
    opacity:.8!important;
  }
  html body .app-shell #topPrimaryMenu .top-primary-group .nw-mobile-menu-icon{
    display:grid!important;
    flex:0 0 29px!important;
    place-items:center!important;
    width:29px!important;
    min-width:29px!important;
    height:29px!important;
    margin:0!important;
    border-radius:9px!important;
    background:#eaf1ff!important;
    color:#2873d1!important;
    pointer-events:none!important;
  }
  html body .app-shell #topPrimaryMenu .top-primary-group:nth-of-type(4n+2) .nw-mobile-menu-icon{background:#f8f1e5!important;color:#b18b38!important}
  html body .app-shell #topPrimaryMenu .top-primary-group:nth-of-type(4n+3) .nw-mobile-menu-icon{background:#e7f5ed!important;color:#19976a!important}
  html body .app-shell #topPrimaryMenu .top-primary-group:nth-of-type(4n) .nw-mobile-menu-icon{background:#f0ecfc!important;color:#8160c2!important}
  html body .app-shell #topPrimaryMenu .top-primary-group .nw-mobile-menu-icon svg{
    display:block!important;width:17px!important;height:17px!important;
    stroke:currentColor!important;fill:none!important;
  }
  html body .app-shell #topPrimaryMenu .top-primary-group.active>.top-primary-group-trigger,
  html body .app-shell #topPrimaryMenu .top-primary-group.open>.top-primary-group-trigger{
    background:#eef5ff!important;
    color:#155bb5!important;
    border-color:#cddff7!important;
    box-shadow:none!important;
  }
  /* Important: the existing dropdown positioning JS writes VIEWPORT coordinates.
     Therefore dropdown must be fixed, NOT absolute relative to its tile. */
  html body .app-shell #topPrimaryMenu .top-primary-group .top-primary-dropdown{
    position:fixed!important;
    box-sizing:border-box!important;
    max-height:65dvh!important;
    z-index:1900!important;
    border:1px solid #dbe5f1!important;
    border-radius:15px!important;
    background:#fff!important;
    box-shadow:0 16px 38px rgba(19,44,75,.18)!important;
  }
  html body.nw-finance-mode .app-shell #topPrimaryMenu.top-primary-menu.grouped-top-menu.erp-top-menu{
    display:none!important;visibility:hidden!important;pointer-events:none!important;
  }
}
@media screen and (max-width:350px){
  html body .app-shell #topPrimaryMenu .top-primary-group>.top-primary-group-trigger{min-height:74px!important;gap:5px!important;padding:8px 2px!important}
  html body .app-shell #topPrimaryMenu .top-primary-group>.top-primary-group-trigger>b{font-size:10px!important}
}
@media print{
  html body .app-shell #topPrimaryMenu.top-primary-menu.grouped-top-menu.erp-top-menu{display:none!important}
}
