/* One navigation accent, sourced from the user's existing Appearance setting.
   The legacy --amber-500 name is the actual dynamic accent, not a fixed amber. */
#mythdModernApp{--mythd-nav-accent:var(--amber-500)}
/* The original inline mark duplicates the bounded brand and search-refresh mark. */
html body #mythdModernApp .m-topbar .compact-mythd-mark{display:none!important}
html body #mythdModernApp .m-topbar.mythd-compact-header #compactCompanyName{display:none!important}
/* The global svg width:100% rule is meant for diagrams, not interface glyphs. */
html body #mythdModernApp #businessDirectoryHost .bd-search-field>svg{
 display:block!important;width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;min-height:18px!important;max-height:18px!important;flex:0 0 18px!important;
}
html body #mythdModernApp #businessDirectoryHost .bd-search-field{box-sizing:border-box;min-height:42px;min-width:0}
html body #mythdModernApp #businessDirectoryHost .bd-search-field:focus-within{outline-color:var(--mythd-nav-accent)}
html body #mythdModernApp #businessDirectoryHost .bd-tabs button.active{border-color:var(--mythd-nav-accent)!important;background:color-mix(in srgb,var(--mythd-nav-accent) 16%,var(--graphite-900))!important;color:var(--paper)!important}
html body #mythdModernApp #businessDirectoryHost .bd-row:focus-visible{outline-color:var(--mythd-nav-accent)}
html body #mythdModernApp #businessDirectoryHost .bd-list-head .bd-add{background:var(--mythd-nav-accent)!important;border-color:var(--mythd-nav-accent)!important;color:var(--graphite-950)!important}
html body #mythdModernApp .m-nav button[data-m-screen]>svg{width:18px;height:18px;min-width:18px;max-width:18px;min-height:18px;max-height:18px;flex:0 0 18px}
/* Desktop/tablet layout only; short touch landscape retains the mobile shell. */
@media screen and (min-width:681px) and (hover:hover), screen and (min-width:681px) and (min-height:601px), screen and (min-width:1101px){
 html body #mythdModernApp .m-main>header.m-topbar.mythd-compact-header:not(#mythdCompactUnused){min-height:64px!important;height:auto!important;padding:8px 18px!important;gap:12px!important}
 html body #mythdModernApp :is(#mInventory .inv-nav,#mFreight .fy-nav,#mPurchasing .purchasing-leftnav)>:is(button,a):not([hidden]){
  display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;min-height:38px;padding:8px 10px!important;margin:0!important;border:1px solid var(--graphite-700)!important;border-radius:9px!important;background:var(--graphite-800)!important;color:var(--paper)!important;box-shadow:none!important;font-size:13px!important;font-weight:650!important;text-align:left;text-decoration:none
 }
 html body #mythdModernApp :is(#mInventory .inv-nav,#mFreight .fy-nav,#mPurchasing .purchasing-leftnav)>:is(button,a):not([hidden]):is(.active,[aria-current=page],[aria-selected=true],.m-primary):not(.mx-inventory-locked),
 html body #mythdModernApp .mr-stage-tabs>button:is(.active,[aria-current=page],[aria-selected=true]){
  background:color-mix(in srgb,var(--mythd-nav-accent) 22%,var(--graphite-900))!important;border-color:var(--mythd-nav-accent)!important;color:var(--paper)!important;box-shadow:none!important;font-weight:750!important
 }
 html body #mythdModernApp :is(#mInventory .inv-nav,#mFreight .fy-nav,#mPurchasing .purchasing-leftnav)>:is(button,a):not([hidden]):not(.mx-inventory-locked):hover{border-color:var(--mythd-nav-accent)!important}
 html body #mythdModernApp #mPurchasing .purchasing-leftnav button.mx-inventory-locked{opacity:.72!important;color:var(--steel-400)!important}
 html body #mythdModernApp :is(#mInventory .inv-nav,#mFreight .fy-nav,#mPurchasing .purchasing-leftnav){gap:6px!important;padding:10px!important;border-radius:12px!important}
}
@media screen and (min-width:851px) and (hover:hover), screen and (min-width:851px) and (min-height:601px), screen and (min-width:1101px){
 html body #mythdModernApp :is(#mInventory .inv-nav,#mFreight .fy-nav,#mPurchasing .purchasing-leftnav){display:flex;flex-direction:column;align-items:stretch}
}

/* Activity selection states share the workspace accent; status colors are unaffected. */
html body #mythdModernApp #mActivity :is([data-activity-filter],[data-activity-scope],[data-board-view]){border:1px solid var(--graphite-700)!important;background:var(--graphite-800)!important;color:var(--paper)!important;box-shadow:none!important}
html body #mythdModernApp #mActivity :is([data-activity-filter].active,[data-activity-filter][aria-pressed=true],[data-activity-scope].m-primary,[data-board-view][aria-pressed=true]){background:color-mix(in srgb,var(--mythd-nav-accent) 22%,var(--graphite-900))!important;border-color:var(--mythd-nav-accent)!important;color:var(--paper)!important}
html body #mythdModernApp #mActivity .m-activity-filters button.active::before{background:var(--mythd-nav-accent)!important;border-color:var(--mythd-nav-accent)!important;box-shadow:none!important}
/* Center relative to the whole desktop header, not the remaining flex space.
   Reserve room on both sides; retain original search height and handlers. */
@media screen and (min-width:1101px){
 html body #mythdModernApp .m-main>header.m-topbar.mythd-compact-header:not(#mythdCompactUnused){--desktop-search-width:min(42%,520px)}
 html body #mythdModernApp .m-main>header.m-topbar.mythd-compact-header:not(#mythdCompactUnused) .m-head-identity{flex:0 1 calc((100% - var(--desktop-search-width))/2 - 16px)!important;margin-right:auto!important;max-width:calc((100% - var(--desktop-search-width))/2 - 16px)!important}
 html body #mythdModernApp .m-main>header.m-topbar.mythd-compact-header:not(#mythdCompactUnused) #workspaceSearchShell{position:absolute!important;inset:50% auto auto 50%!important;transform:translate(-50%,-50%)!important;width:var(--desktop-search-width)!important;max-width:520px!important;min-width:0!important;margin:0!important}
}
/* Search results must escape the header/search stacking context, not just the result box. */
html body #mythdModernApp .m-main>header.m-topbar.mythd-compact-header:has(#invDocumentResults:not([hidden])),
html body #mythdModernApp.m2-ready .m2-toolbar:has(#invDocumentResults:not([hidden])),
html body #mythdModernApp #workspaceSearchShell:has(#invDocumentResults:not([hidden])){z-index:90!important;overflow:visible!important}
html body #mythdModernApp #workspaceSearchShell .inv-doc-search{overflow:visible!important}
html body #mythdModernApp #invDocumentResults:not([hidden]){z-index:91!important;box-sizing:border-box}
@media screen and (min-width:1101px){
 html body #mythdModernApp .mythd-compact-header #workspaceSearchShell .inv-doc-search{width:calc(100% - 44px)!important;margin:0 auto 0 0!important}
 html body #mythdModernApp .mythd-compact-header #workspaceSearchShell .workspace-notification-slot{left:auto!important;right:0!important;top:50%!important;transform:translateY(-50%)!important}
 html body #mythdModernApp .mythd-compact-header #workspaceSearchShell #invDocumentSearch,
 html body #mythdModernApp .mythd-compact-header #workspaceSearchShell .inv-doc-controls button{height:36px!important;min-height:36px!important}
}
@media (max-width:680px), (max-width:1100px) and (max-height:600px) and (orientation:landscape) and (hover:none) and (pointer:coarse){
 html body #mythdModernApp.m2-ready .m2-toolbar{gap:6px!important;padding-inline:max(8px,env(safe-area-inset-left)) max(8px,env(safe-area-inset-right))!important}
}
@media (min-width:900px) and (max-width:1100px) and (max-height:600px) and (orientation:landscape) and (hover:none) and (pointer:coarse){
 html body #mythdModernApp.m2-ready .m2-toolbar #workspaceSearchShell .inv-doc-search{width:calc(100% - 38px)!important;margin:0 auto 0 0!important}
 html body #mythdModernApp.m2-ready .m2-toolbar #workspaceSearchShell .workspace-notification-slot{left:auto!important;right:0!important;top:50%!important;transform:translateY(-50%)!important}
}