/* Full-width office pages with a consistent second navigation column. */
body .layout .main>#content.content{width:100%;max-width:none;margin:0;align-self:stretch;box-sizing:border-box}
body .layout .main>#content.orders-with-rail,
body .layout .main>#content:has(>.work-page-layout),
body .layout .main>#content:has(>.inventory-page-layout){padding:0}
#content.orders-with-rail,.work-page-layout,.inventory-page-layout{display:grid;grid-template-columns:68px minmax(0,1fr);gap:16px;align-items:start;position:relative;width:100%;min-width:0}
#content.orders-with-rail>.order-page-main,.work-page-layout>#workBody,.inventory-page-main{min-width:0;width:100%;box-sizing:border-box;padding:16px 16px 16px 0}
.orders-with-rail>.order-page-tabs.section-menu,
.work-page-layout>.work-tabs.section-menu,
.inventory-page-layout>.inventory-tabs.section-menu{position:sticky;top:58px;left:auto;display:flex;flex-direction:column;align-items:stretch;flex-wrap:nowrap;width:68px;min-width:0;height:calc(100dvh - 58px);max-height:calc(100dvh - 58px);overflow-y:auto;overscroll-behavior:contain;gap:4px;margin:0;padding:8px 6px;background:#fff;border-right:1px solid var(--line,#dce3eb);box-sizing:border-box;scrollbar-width:thin}
.section-menu>button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;flex-shrink:0;width:100%;min-height:65px;padding:8px 5px;border:0;border-radius:7px;background:transparent;color:#68778b;font-size:11px;line-height:1.35;text-align:center;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
.section-menu>button>span{display:block;max-width:100%}
.section-menu>button>.shell-icon{display:block;width:21px;height:21px;flex:0 0 21px;margin:0}
.section-menu>button:hover,.section-menu>button:focus-visible{background:#f0f5fc;color:#326bb5}
.section-menu>button:is(.primary,.active){background:#e8f1ff;color:#326bb5}
.section-menu>button:is(.primary,.active)::before{content:'';position:absolute;left:-6px;top:18px;bottom:18px;width:3px;border-radius:2px;background:#326bb5}
.section-menu>button:disabled{opacity:.5}
/* Override earlier tab rules without changing other button groups. */
.order-page-tabs.section-menu>button,.work-page-layout>.work-tabs.section-menu>button,.inventory-tabs.section-menu>button{font-size:11px;text-align:center;padding:8px 5px;min-height:65px}
.inventory-page-main{display:flex;flex-direction:column;min-height:0}
.inventory-page-main>:not(.inventory-stock-table){flex-shrink:0}
.inventory-page-main>#inventoryStatus{margin:0 0 10px;color:var(--muted);font-size:12px}
.inventory-page-main>.inventory-pagination{margin:10px 0 0}
.inventory-page-main>.inventory-stock-table{flex:1;min-height:160px;margin-bottom:0;overflow:auto}
@media(min-width:901px){
 body .main>#content:has(>.inventory-page-layout){height:calc(100dvh - 58px);min-height:620px;display:flex;flex-direction:column}
 .inventory-page-layout{flex:1;min-height:0;align-items:stretch}
 .inventory-page-layout>.section-menu{align-self:start}
}
@media(max-width:900px){.inventory-page-main>.inventory-stock-table{min-height:45dvh}}
@media(max-width:750px){
 #content.orders-with-rail,.work-page-layout,.inventory-page-layout{display:grid;grid-template-columns:68px minmax(0,1fr);gap:8px}
 .orders-with-rail>.order-page-tabs.section-menu,.work-page-layout>.work-tabs.section-menu,.inventory-page-layout>.inventory-tabs.section-menu{width:68px;top:54px;height:calc(100dvh - 130px);max-height:calc(100dvh - 130px);padding:6px 4px}
 #content.orders-with-rail>.order-page-main,.work-page-layout>#workBody,.inventory-page-main{padding:10px 8px 10px 0}
 .section-menu>button>.shell-icon{width:20px;height:20px;flex-basis:20px}
 .order-page-tabs.section-menu>button,.work-page-layout>.work-tabs.section-menu>button,.inventory-tabs.section-menu>button{font-size:10px;min-height:62px;padding:7px 3px}
 .section-menu>button:is(.primary,.active)::before{left:-4px}
 .work-page-layout .work-filters{padding:12px}
 .inventory-page-main .inventory-filters{padding:12px}
}

.order-page-tabs.section-menu>button,.work-page-layout>.work-tabs.section-menu>button,.inventory-tabs.section-menu>button{font-size:10px;min-height:62px;padding:7px 3px}
@media(max-width:750px){.order-page-tabs.section-menu>button,.work-page-layout>.work-tabs.section-menu>button,.inventory-tabs.section-menu>button{font-size:9px;padding:7px 2px}}

.orders-with-rail>.order-page-tabs.section-menu,.work-page-layout>.work-tabs.section-menu,.inventory-page-layout>.inventory-tabs.section-menu{padding-left:4px;padding-right:4px}
.order-page-tabs.section-menu>button,.work-page-layout>.work-tabs.section-menu>button,.inventory-tabs.section-menu>button{font-size:9px;padding-left:1px;padding-right:1px}
.section-menu>button:is(.primary,.active)::before{left:-4px}

.section-menu>button[data-work-mode="history"]>span{font-size:8.5px;letter-spacing:-.2px;white-space:nowrap}

/* Keep the secondary menu below the header even when its page is very short. */
body .section-menu.viewport-section-menu{position:fixed!important;left:var(--rail-left)!important;top:var(--rail-top)!important;width:var(--rail-width)!important;height:var(--rail-height)!important;max-height:var(--rail-height)!important;z-index:20}
#content.orders-with-rail>.order-page-main,.work-page-layout>#workBody,.inventory-page-layout>.inventory-page-main{grid-column:2;grid-row:1}
