/* Layout only: permission attributes and the original page buttons remain authoritative. */
body.grouped-navigation .shell-nav-group[hidden],body.grouped-navigation .shell-page-wrap[hidden],body.grouped-navigation .shell-group-pages[hidden],body.grouped-navigation .shell-badge[hidden]{display:none!important}
body.grouped-navigation .shell-nav-group{margin:5px 0;border:0;background:none;padding:0;min-width:0}
body.grouped-navigation .shell-group-toggle{display:flex!important;align-items:center;width:100%;min-height:44px;padding:10px 12px!important;background:transparent!important;color:#aabbd2!important;border:0!important;border-radius:8px!important;font:600 11px/1.4 inherit!important;text-transform:uppercase;letter-spacing:.08em;text-align:left;box-shadow:none!important}
body.grouped-navigation .shell-chevron{margin-left:auto;transform:rotate(-90deg)}
body.grouped-navigation .shell-group-toggle[aria-expanded=true] .shell-chevron{transform:none}
body.grouped-navigation .shell-page-wrap{min-width:0}
body.grouped-navigation .shell-page-wrap>button,body.grouped-navigation .shell-page-wrap>a{width:100%;min-height:44px;margin:2px 0!important;text-align:left!important;border-radius:8px!important;position:relative;box-sizing:border-box;white-space:normal!important;overflow-wrap:normal!important}
body.grouped-navigation .shell-page-wrap>button:not([hidden]):not(.nav-permission-hidden){align-items:center;gap:8px;padding:10px 12px!important;background:transparent!important;color:#e6edf7!important;border:0!important;box-shadow:none!important}
body.grouped-navigation .shell-page-wrap>button.active,body.grouped-navigation .shell-page-wrap>button:hover{background:#263d5d!important}
body.grouped-navigation .shell-page-wrap>button::after{content:none!important;display:none!important}
body.grouped-navigation .shell-page-wrap [data-job-order-nav-badge],body.grouped-navigation .shell-page-wrap [data-production-qc-badge]{display:none!important}
body.grouped-navigation .shell-badge{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:21px;padding:0 5px;border-radius:20px;background:#ba3246;color:#fff;font-size:11px;font-weight:700;line-height:1;letter-spacing:0;margin-left:auto;flex-shrink:0;vertical-align:middle}
body.grouped-navigation .shell-badge[data-tone=warning]{background:#f0b647;color:#302107}
body.grouped-navigation .shell-search{display:block;color:inherit;font-size:11px;letter-spacing:.03em;padding:8px 12px;min-width:0}
body.grouped-navigation .shell-search input{display:block;width:100%;min-width:0;min-height:44px;box-sizing:border-box;border:1px solid #52627b;border-radius:9px;background:#fff;color:#13233b;margin-top:5px;padding:10px;font-size:14px}
body.grouped-navigation .shell-footer{display:flex;flex-wrap:wrap;align-items:center;gap:7px;padding:12px;border-top:1px solid #34455f;flex-shrink:0;color:#d6e0ef;font-size:12px}
body.grouped-navigation .shell-footer #current-user{width:100%;max-width:100%;white-space:normal}
body.grouped-navigation .shell-footer #sync-status{width:100%;font-size:11px}
body.grouped-navigation .shell-footer button{min-height:36px;margin:0!important;padding:6px 10px!important;font-size:12px!important}
body.grouped-navigation .shell-user-role{order:-1;width:100%;text-transform:capitalize}
body.grouped-navigation #navigation-home{display:block!important;grid-column:1/-1;width:100%;min-width:0;margin:0 0 22px;padding:0;box-sizing:border-box}
body.grouped-navigation #navigation-home[hidden]{display:none!important}
.shell-home-heading h1{font-size:clamp(22px,3vw,30px);margin:0 0 5px;color:#10233d}.shell-home-heading p{color:#64748b;margin:0 0 20px}
.shell-home-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
body.grouped-navigation .shell-home-cards>button{display:flex;flex-direction:column;align-items:flex-start;gap:9px;min-width:0;background:#fff!important;color:#14243c!important;border:1px solid #dce3ec!important;border-radius:14px!important;padding:18px!important;text-align:left;box-shadow:none!important;white-space:normal}
.shell-home-cards strong{font-size:clamp(21px,2.1vw,30px);overflow-wrap:anywhere}.shell-home-cards small{font-size:12px;color:#52637b}.shell-home-cards span{font-size:11px;color:#576a87}
.shell-home-lower{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:16px;margin-top:16px}.shell-home-lower>section{background:#fff;border:1px solid #dce3ec;border-radius:14px;padding:18px;min-width:0}.shell-home-lower h2{font-size:17px;margin:0 0 12px}.shell-home-lower p{font-size:13px;color:#64748b}
.shell-action-row{display:flex;align-items:center;gap:12px;justify-content:space-between;border-top:1px solid #edf0f5;padding:12px 0}.shell-action-row>div{min-width:0}.shell-action-row strong,.shell-action-row small{display:block;overflow-wrap:anywhere}.shell-action-row small{font-size:12px;color:#64748b;margin-top:4px}
body.grouped-navigation .shell-home button{min-height:44px;border-radius:8px;font-size:13px}.shell-pins>div{display:flex;gap:6px;margin:6px 0}.shell-pins>div>button:first-child{flex:1;text-align:left}.shell-pin-option{display:flex!important;gap:9px;align-items:center;min-height:44px;font-size:13px}.shell-pin-option input{width:18px!important;height:18px!important;margin:0!important}.shell-home details summary{cursor:pointer;min-height:44px;padding-top:12px;box-sizing:border-box}
.shell-sheet-heading{grid-column:1/-1;margin:12px 0 0;font-size:12px;color:#64748b;text-transform:uppercase;letter-spacing:.08em}.shell-sheet-tools{grid-column:1/-1;border-top:1px solid #e0e5ec;padding-top:12px}.shell-sheet-tools small{display:block}.shell-sheet-tools button{margin:8px 8px 0 0}
@media(min-width:768px){
body.grouped-navigation>header{position:fixed!important;inset:0 auto 0 0!important;width:250px!important;height:100dvh!important;max-height:100dvh!important;padding:0!important;background:#102039!important;overflow:hidden!important;z-index:100}
body.grouped-navigation>header .topbar{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;padding:0!important;width:100%!important;height:100%!important;min-height:0!important}
body.grouped-navigation>header .brand-lockup{flex-shrink:0;padding:16px 14px!important;margin:0!important;max-width:100%!important;box-sizing:border-box}
body.grouped-navigation>header .userbar{display:flex!important;flex:1;flex-direction:column!important;align-items:stretch!important;gap:0!important;min-height:0!important;width:100%!important;overflow:hidden}
body.grouped-navigation>header nav{display:block!important;flex:1;overflow-y:auto!important;overflow-x:hidden!important;min-height:0!important;width:100%!important;padding:0 8px 10px!important;margin:0!important;box-sizing:border-box;scrollbar-width:thin}
body.grouped-navigation>main{margin-left:250px!important;width:calc(100% - 250px)!important;max-width:none!important;padding:24px!important;box-sizing:border-box;min-width:0}
body.grouped-navigation #mobile-bottom-nav,body.grouped-navigation #mobile-more-sheet,body.grouped-navigation #mobile-more-backdrop{display:none!important}
}
@media(max-width:767px){
body.grouped-navigation>header{position:relative!important;width:100%!important;height:auto!important;min-height:0!important;padding:8px 12px!important;box-sizing:border-box;background:#102039!important}
body.grouped-navigation>header .topbar{display:block!important;padding:0!important;min-height:0!important}.grouped-navigation>header .brand-lockup{margin:0!important;padding:0!important}
body.grouped-navigation>header .userbar,body.grouped-navigation>header nav,body.grouped-navigation>header .shell-search,body.grouped-navigation .shell-footer{display:none!important}
body.grouped-navigation>main{margin:0!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:14px 12px 90px!important;box-sizing:border-box}
body.grouped-navigation #mobile-bottom-nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed!important;bottom:0!important;left:0!important;right:0!important;width:100%!important;gap:0;padding:5px 4px max(5px,env(safe-area-inset-bottom))!important;box-sizing:border-box;background:#fff!important;z-index:950}
body.grouped-navigation #mobile-bottom-nav>button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:52px;padding:5px 1px!important;font-size:11px!important;background:transparent!important;color:#52637b!important;border:0!important;border-radius:8px!important;box-shadow:none!important}
body.grouped-navigation #mobile-bottom-nav>button.active{background:#e9eef6!important;color:#102039!important}body.grouped-navigation #mobile-bottom-nav .shell-badge{position:absolute;right:3px;top:0;font-size:10px;min-width:17px;height:17px}
body.grouped-navigation #mobile-more-sheet{display:none!important;position:fixed!important;inset:auto 0 0!important;width:100%!important;max-width:100%!important;max-height:85dvh!important;overflow-y:auto!important;box-sizing:border-box;padding:16px 12px max(20px,env(safe-area-inset-bottom))!important;border-radius:20px 20px 0 0!important;background:#fff!important;z-index:1101!important;transform:none!important}
body.grouped-navigation.mobile-more-open #mobile-more-sheet{display:block!important}body.grouped-navigation #mobile-more-backdrop{display:none!important;z-index:1100!important;position:fixed!important;inset:0!important;background:#08152699!important}body.grouped-navigation.mobile-more-open #mobile-more-backdrop{display:block!important}
body.grouped-navigation #mobile-more-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;min-width:0}
body.grouped-navigation .shell-page-tile{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:8px;position:relative;min-height:86px;min-width:0;padding:10px 5px!important;background:#f2f5fa!important;color:#17283f!important;border:1px solid #dfe6ee!important;border-radius:12px!important;font-size:12px!important;line-height:1.3!important;white-space:normal!important;overflow-wrap:normal!important;box-shadow:none!important}
.shell-tile-icon{font-size:23px}.shell-page-tile .shell-badge{position:absolute;right:3px;top:3px}.mobile-more-head button{min-width:44px;min-height:44px}
.shell-home-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.shell-home-lower{grid-template-columns:minmax(0,1fr)}body.grouped-navigation .shell-home-cards>button{padding:13px!important}.shell-home-cards strong{font-size:23px}.shell-home-lower>section{padding:14px}
}
/* Override the old shell's global button theme without touching page buttons. */
body.grouped-navigation:not(.locked){padding-left:0!important;padding-top:0!important}
body.grouped-navigation.grouped-navigation.grouped-navigation header .shell-group-toggle{background:transparent!important;background-image:none!important;color:#9eb0ca!important;border:0!important;box-shadow:none!important;border-radius:8px!important;font-size:11px!important;font-weight:600!important;min-height:44px!important}
body.grouped-navigation.grouped-navigation.grouped-navigation header .shell-group-toggle::before{display:none!important}
body.grouped-navigation #navigation-home .shell-home-cards>button{background:#fff!important;background-image:none!important;color:#14243c!important;border:1px solid #dce3ec!important;border-radius:14px!important;padding:18px!important;min-height:116px!important;height:auto!important;box-shadow:none!important}
body.grouped-navigation #mobile-more-grid .shell-page-tile{background:#f2f5fa!important;background-image:none!important;color:#17283f!important;border:1px solid #dfe6ee!important;border-radius:12px!important;padding:10px 5px!important;min-height:86px!important}
body.grouped-navigation .shell-footer #current-user{order:0!important;padding:0!important;margin:0!important;border:0!important;display:block!important;text-align:left!important}
body.grouped-navigation .shell-footer #sync-status{order:2!important;margin:0!important;max-width:100%;box-sizing:border-box}
body.grouped-navigation .shell-footer #refresh-button,body.grouped-navigation .shell-footer #logout-button{order:3!important;flex:1!important;min-width:0!important}
body.grouped-navigation .shell-user-role{order:1!important}
body.locked.grouped-navigation #mobile-bottom-nav,body.locked.grouped-navigation #mobile-more-sheet,body.locked.grouped-navigation #mobile-more-backdrop{display:none!important}
/* Read-only navigation filters: the original page DOM and permissions are restored intact. */
body.grouped-navigation .shell-focused>:not(.shell-filtered-list){display:none!important}
body.grouped-navigation .shell-filtered-list{display:block!important;background:#fff;border:1px solid #dce3ec;border-radius:14px;padding:20px;min-width:0}
.shell-filtered-list article{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0;border-top:1px solid #e5eaf0}.shell-filtered-list article>div{min-width:0}.shell-filtered-list strong,.shell-filtered-list small{display:block;overflow-wrap:anywhere}.shell-filtered-list small{color:#52637b;margin-top:5px}.shell-filtered-list button{min-height:44px!important;flex-shrink:0}
body.grouped-navigation .shell-receiving-card{background:#fff;border:1px solid #dce3ec;border-radius:14px;padding:16px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));min-width:0;gap:8px}.shell-receiving-card h2{grid-column:1/-1;font-size:13px;margin:0;color:#52637b}
body.grouped-navigation #navigation-home .shell-receiving-card button{background:#fff!important;color:#14243c!important;display:flex;flex-direction:column;text-align:left;align-items:flex-start;border:0!important;padding:5px!important;min-height:60px!important}.shell-receiving-card.overdue{border-color:#be364a!important}.shell-receiving-card.overdue button:last-child strong{color:#b32b41}
.shell-badge[role=button]{cursor:pointer}.shell-badge[role=button]:focus-visible{outline:3px solid #e8b446;outline-offset:3px}.shell-action-row strong,.shell-action-row small{word-break:normal}
@media(min-width:1100px){.shell-home-cards{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:767px){.shell-filtered-list{padding:12px!important}.shell-filtered-list article{align-items:flex-start}.shell-filtered-list article button{max-width:75px}.shell-receiving-card{padding:12px!important}}
body.grouped-navigation #dashboard #navigation-home{order:-1!important}
/* One sidebar item style, independent of data-view/data-stock-nav/data-shell-page.
   Specificity deliberately exceeds the legacy white global button theme. */
body.grouped-navigation:not(.locked) header .userbar nav .shell-page-wrap > :is(button,a):not([hidden]):not(.nav-permission-hidden):not([aria-hidden="true"]){
  background:transparent!important;background-image:none!important;color:#B9C2D1!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;
  padding:8px 6px 8px 10px!important;font-size:12px!important;font-weight:400!important;
}
body.grouped-navigation:not(.locked) header .userbar nav .shell-page-wrap > :is(button,a):not([hidden]):not(.nav-permission-hidden):not([aria-hidden="true"]):hover{
  background:rgba(255,255,255,.04)!important;color:#EAF0FA!important;transform:none!important;
}
body.grouped-navigation:not(.locked) header .userbar nav .shell-page-wrap > :is(button,a):not([hidden]):not(.nav-permission-hidden):not([aria-hidden="true"]).active{
  background:rgba(43,127,255,.14)!important;color:#EAF0FA!important;border-left:2px solid #4D93FF!important;font-weight:500!important;
}
