/* Home keeps its large illustrated tiles. Other work pages use one compact row. */
@media screen {
  /* Remove the entire shared company/month/actions/period card, including stale UI. */
  html body #nwGlobalBusinessToolbar { display: none !important; }

  html body.nw-page-navigation .app-shell main > #nwWorkSlideNav,
  html body.nw-page-navigation .app-shell main > #nwEmployeeWorkNav {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 20 !important;
  }
  html body.nw-page-detail #nwWorkSlideNav,
  html body.nw-page-detail #nwEmployeeWorkNav {
    box-sizing: border-box !important;
    padding: 8px !important;
    margin-top: 8px !important;
    margin-bottom: 10px !important;
    border-radius: 16px !important;
    touch-action: pan-x pan-y !important;
  }
  html body.nw-page-detail #nwEmployeeWorkNav .nw-employee-work-head { display: none !important; }
  html body.nw-page-detail #nwWorkSlideNav .nw-slide-track,
  html body.nw-page-detail #nwEmployeeWorkNav .nw-employee-work-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 0 5px !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
    touch-action: pan-x pan-y !important;
  }
  html body.nw-page-detail #nwWorkSlideNav .nw-slide-tab,
  html body.nw-page-detail #nwEmployeeWorkNav .nw-employee-work-link {
    flex: 1 0 88px !important;
    width: 88px !important;
    min-width: 88px !important;
    max-width: 132px !important;
    height: 82px !important;
    min-height: 82px !important;
    padding: 8px 5px !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
    scroll-snap-align: center;
    text-decoration: none !important;
  }
  html body.nw-page-detail #nwWorkSlideNav .nw-slide-icon,
  html body.nw-page-detail #nwEmployeeWorkNav .nw-employee-work-link > span {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    border-radius: 10px !important;
  }
  html body.nw-page-detail #nwWorkSlideNav .nw-slide-icon svg,
  html body.nw-page-detail #nwEmployeeWorkNav .nw-employee-work-link > span svg {
    width: 24px !important;
    height: 24px !important;
  }
  html body.nw-page-detail #nwWorkSlideNav .nw-slide-label,
  html body.nw-page-detail #nwEmployeeWorkNav .nw-employee-work-link > b {
    font-size: 11px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
  }
  /* An open category occupies its own row above the content, never over it. */
  html body.nw-page-navigation #nwWorkSlideNav .nw-slide-panel:not([hidden]) {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-height: none !important;
    margin: 9px 0 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    animation: none !important;
  }
  html body.nw-page-navigation .app-shell main > #content {
    position: relative;
    min-width: 0;
    margin-top: 0 !important;
    scroll-margin-top: 12px;
  }
  html body.nw-page-detail #nwEmployeeWorkNav .nw-employee-work-link:focus-visible {
    outline: 3px solid #418ee9;
    outline-offset: -3px;
  }
}

/* PC uses the same compact navigation on home and every detail page. */
.nw-desktop-shortcuts{display:none}
@media screen and (min-width:981px){
 html body.nw-page-navigation:not(.nw-finance-mode) .app-shell main>#nwWorkSlideNav{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:0 16px!important;
  padding:8px!important;margin-top:8px!important;margin-bottom:10px!important;border-radius:16px!important;
 }
 html body.nw-page-navigation #nwWorkSlideNav .nw-slide-track{
  display:flex!important;flex-wrap:nowrap!important;align-items:stretch!important;justify-content:flex-start!important;
  gap:7px!important;width:100%!important;min-width:0!important;max-width:100%!important;
  overflow-x:auto!important;overflow-y:hidden!important;padding:2px 0 5px!important;box-sizing:border-box!important;
 }
 html body.nw-page-navigation #nwWorkSlideNav .nw-slide-tab{
  flex:0 0 100px!important;width:100px!important;min-width:100px!important;max-width:100px!important;
  height:82px!important;min-height:82px!important;padding:8px 5px!important;gap:6px!important;border-radius:12px!important;box-sizing:border-box!important;
 }
 html body.nw-page-navigation #nwWorkSlideNav .nw-slide-icon{width:34px!important;height:34px!important;flex:0 0 34px!important;border-radius:10px!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-slide-icon svg{width:24px!important;height:24px!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-slide-label{font-size:11px!important;line-height:1.3!important;white-space:nowrap!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(88px,1fr));gap:7px;width:310px;box-sizing:border-box;padding-left:14px;border-left:1px solid #dfe9f4}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut{
  display:flex;align-items:center;justify-content:center;min-height:36px;padding:8px 9px;
  border:1px solid #dae6f2;border-radius:9px;background:#fff;color:#42617f;font-size:11px;font-weight:750;white-space:nowrap;text-decoration:none;
 }
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut:hover,
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut[aria-current=page]{background:#eaf4ff;color:#176ac2;border-color:#9fc7ef}
 html body.nw-page-navigation #nwWorkSlideNav .nw-slide-panel{grid-column:1/-1}
}
@media screen and (min-width:981px) and (max-width:1279px){
 html body.nw-page-navigation:not(.nw-finance-mode) .app-shell main>#nwWorkSlideNav{grid-template-columns:minmax(0,1fr)!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcuts{width:100%;grid-template-columns:repeat(6,minmax(0,1fr));padding:8px 0 0;border-left:0;border-top:1px solid #e5edf5}
}
@media print{.nw-desktop-shortcuts{display:none!important}}

/* PC shortcuts continue immediately after Document Center as matching icon tiles. */
@media screen and (min-width:981px){
 html body.nw-page-navigation:not(.nw-finance-mode) .app-shell main>#nwWorkSlideNav{display:block!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcuts{display:contents!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut{
  position:relative;flex:0 0 100px!important;display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;width:100px!important;min-width:100px!important;max-width:100px!important;
  height:82px!important;min-height:82px!important;padding:8px 5px!important;margin:0!important;gap:6px!important;
  border:1px solid #e1e9f2!important;border-radius:12px!important;background:linear-gradient(150deg,#fff,#eef5ff)!important;
  box-shadow:0 3px 10px rgba(44,70,104,.04);box-sizing:border-box!important;color:#314766!important;
 }
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut .nw-slide-icon{
  display:flex!important;align-items:center;justify-content:center;background:linear-gradient(140deg,#4195ff,#4266df)!important;
  box-shadow:0 5px 11px rgba(42,75,116,.16),inset 0 1px 0 rgba(255,255,255,.3);pointer-events:none;
 }
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut [data-app-icon=schedule]{background:linear-gradient(140deg,#35b5ef,#2385d7)!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut [data-app-icon=attendance]{background:linear-gradient(140deg,#40d3b8,#16a687)!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut [data-app-icon=payroll]{background:linear-gradient(140deg,#ab8df2,#7750d3)!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut [data-app-icon=receipts]{background:linear-gradient(140deg,#ffc268,#ed9232)!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut [data-app-icon=notices]{background:linear-gradient(140deg,#738eea,#5362c5)!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut:hover,
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut[aria-current=page]{background:#e9f2ff!important;border-color:#9dbfe9!important}
 html body.nw-page-navigation #nwWorkSlideNav .nw-desktop-shortcut[aria-current=page]:after{
  content:"";position:absolute;bottom:2px;left:23%;right:23%;height:3px;border-radius:3px;background:#1e79dc;
 }
}
