/* Shared navigation shell, loaded globally after legacy style sheets. */
html body:has(#appSidebar){--m50-sidebar:268px;--m50-top:70px;background:#041326!important}
html body:has(#appSidebar) .topbar{position:sticky!important;top:0!important;z-index:1100!important;display:grid!important;grid-template-columns:var(--m50-sidebar) minmax(0,1fr) auto!important;align-items:center!important;gap:20px!important;height:var(--m50-top)!important;min-height:var(--m50-top)!important;padding:0 18px 0 0!important;background:linear-gradient(90deg,#061a30,#06182d)!important;border-bottom:1px solid #183a5c!important}
html body:has(#appSidebar) .brand-area{height:var(--m50-top)!important;min-height:0!important;width:var(--m50-sidebar)!important;display:flex!important;align-items:center!important;gap:12px!important;padding:10px 17px!important;border-right:1px solid #193a58!important;background:#061a30!important;position:relative!important;min-width:0!important}
html body:has(#appSidebar) .top-brand-copy{flex:1;min-width:0!important;padding:0!important}
html body:has(#appSidebar) .top-brand-copy strong{display:block!important;font-size:18px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;color:#f4faff!important}
html body:has(#appSidebar) .top-brand-copy small{display:block!important;color:#9cbdd9!important;font-size:11px!important;white-space:nowrap!important}
html body:has(#appSidebar) .brand-logo,html body:has(#appSidebar) .brand-logo-text{width:45px!important;height:45px!important;flex:none!important;border-radius:14px!important}
html body:has(#appSidebar) .menu-toggle{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important;position:absolute!important;right:-17px!important;top:50%!important;transform:translateY(-50%)!important;width:36px!important;height:36px!important;min-width:36px!important;border:1px solid #2c5477!important;border-radius:12px!important;background:#102b46!important;z-index:3!important;cursor:pointer!important;padding:0!important;transition:background .15s,box-shadow .15s!important}
html body:has(#appSidebar) .menu-toggle:hover{background:#174c70!important;box-shadow:0 0 0 3px #0ebaff22!important}
html body:has(#appSidebar) .menu-toggle span{display:block!important;width:16px!important;height:2px!important;min-height:2px!important;background:#bde7ff!important;border-radius:2px!important;transform:none!important;position:static!important;margin:0!important}
html body:has(#appSidebar) .wrap{display:grid!important;grid-template-columns:var(--m50-sidebar) minmax(0,1fr)!important;min-height:calc(100vh - var(--m50-top))!important;align-items:stretch!important}
html body:has(#appSidebar) #appSidebar{position:relative!important;top:auto!important;left:auto!important;bottom:auto!important;transform:none!important;display:flex!important;flex-direction:column!important;width:var(--m50-sidebar)!important;min-width:0!important;max-width:none!important;height:calc(100vh - var(--m50-top))!important;overflow-y:auto!important;overflow-x:hidden!important;padding:0 0 15px!important;background:#061629!important;border-right:1px solid #1b3b57!important;border-radius:0!important;box-shadow:none!important;transition:width .2s ease!important}
html body:has(#appSidebar) #appSidebar .sidebar-title{display:flex!important;align-items:center!important;min-height:42px!important;flex:none!important;padding:10px 18px!important;margin:0 0 9px!important;background:#081d32!important;border-bottom:1px solid #183b58!important;color:#9bbbd9!important}
html body:has(#appSidebar) #appSidebar > a,html body:has(#appSidebar) #appSidebar > details > summary{display:flex!important;align-items:center!important;gap:12px!important;min-height:46px!important;height:auto!important;margin:3px 10px!important;padding:8px 13px!important;color:#deecfb!important;background:transparent!important;border:1px solid transparent!important;border-radius:11px!important;font-size:13px!important;line-height:1.3!important;font-weight:650!important;box-shadow:none!important;white-space:normal!important}
html body:has(#appSidebar) #appSidebar > a:hover,html body:has(#appSidebar) #appSidebar > details > summary:hover{background:#112d47!important}
html body:has(#appSidebar) #appSidebar > a.active{background:linear-gradient(90deg,#145374,#103550)!important;border-color:#237ea5!important;box-shadow:inset 4px 0 #19d0ff!important;color:white!important}
html body:has(#appSidebar) #appSidebar .nav-icon,html body:has(#appSidebar) #appSidebar .sidebar-section-icon{flex:none!important;width:26px!important;height:26px!important;display:grid!important;place-items:center!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#8cc9ee!important}
html body:has(#appSidebar) #appSidebar .app-icon{width:21px!important;height:21px!important}
html body:has(#appSidebar) #appSidebar .nav-text,html body:has(#appSidebar) #appSidebar .sidebar-section-title{min-width:0!important;flex:1!important;overflow:visible!important;white-space:normal!important;color:inherit!important}
html body:has(#appSidebar) #appSidebar .sidebar-footer{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;width:auto!important;height:auto!important;min-height:68px!important;margin-top:auto!important;background:#071a2e!important;border-top:1px solid #1b3b57!important;color:#e6f3ff!important;padding:16px 20px!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important}
html body:has(#appSidebar) #appSidebar .sidebar-footer strong{font-size:12px!important;color:#eef7ff!important}html body:has(#appSidebar) #appSidebar .sidebar-footer small{font-size:11px!important;color:#8eabc5!important}
html body:has(#appSidebar) .content{min-width:0!important;max-width:none!important}
html body:has(#appSidebar) .top-search{position:relative!important;justify-self:start!important;width:min(100%,700px)!important;max-width:700px!important;min-width:0!important;height:44px!important;min-height:44px!important;padding:0 12px!important;display:flex!important;align-items:center!important;gap:11px!important;background:linear-gradient(180deg,#102a44,#0b2139)!important;border:1px solid #285071!important;border-radius:13px!important;box-shadow:0 8px 24px #0002,inset 0 1px #ffffff0c!important}
html body:has(#appSidebar) .top-search:focus-within{border-color:#28c8ff!important;box-shadow:0 0 0 3px #18bffb20!important}
html body:has(#appSidebar) .top-search input{flex:1!important;width:100%!important;min-width:0!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;color:#effaff!important;font-size:13px!important}
html body:has(#appSidebar) .top-search input::placeholder{color:#9cbcd5!important}
html body:has(#appSidebar) .top-search .top-search-icon{display:grid!important;place-items:center!important;color:#66d9ff!important;flex:none!important}
html body:has(#appSidebar) .top-search kbd{flex:none!important;color:#b4d6ed!important;background:#163451!important;border:1px solid #355b78!important;border-radius:7px!important;font-size:11px!important;padding:4px 7px!important}
html body:has(#appSidebar) .top-actions{display:flex!important;gap:10px!important;align-items:center!important;justify-self:end!important;width:auto!important;padding:0!important}
html body:has(#appSidebar) .density-toggle,html body:has(#appSidebar) [data-density-toggle]{display:none!important}
html body:has(#appSidebar) [data-user-menu-toggle]{display:flex!important;align-items:center!important;gap:11px!important;min-height:49px!important;height:auto!important;padding:7px 13px 7px 8px!important;background:linear-gradient(135deg,#173957,#102a46)!important;border:1px solid #305777!important;border-radius:14px!important;box-shadow:0 5px 18px #0002!important;color:white!important;cursor:pointer!important}
html body:has(#appSidebar) [data-user-menu-toggle]:hover{border-color:#20c7f5!important;background:#194464!important}
html body:has(#appSidebar) [data-user-menu-toggle] .user-avatar{height:35px!important;width:35px!important;border-radius:11px!important;background:linear-gradient(135deg,#18aaff,#5465f5)!important;box-shadow:0 0 0 2px #9cd9ff33!important}
html body:has(#appSidebar) [data-user-menu-toggle] strong{font-size:12px!important;line-height:1.3!important;color:#fff!important}html body:has(#appSidebar) [data-user-menu-toggle] small{font-size:10px!important;color:#b3d1e8!important}
html body:has(#appSidebar) .user-menu-dropdown{z-index:1201!important;background:#0d263f!important;border:1px solid #285578!important;border-radius:13px!important;box-shadow:0 18px 38px #0007!important;color:white!important}
/* True desktop collapse, no separate themes per page. */
@media(min-width:901px){html body.m50-sidebar-collapsed{--m50-sidebar:78px}html body.m50-sidebar-collapsed #appSidebar .nav-text,html body.m50-sidebar-collapsed #appSidebar .sidebar-section-title,html body.m50-sidebar-collapsed #appSidebar .sidebar-chevron,html body.m50-sidebar-collapsed #appSidebar .sidebar-title,html body.m50-sidebar-collapsed #appSidebar .sidebar-footer,html body.m50-sidebar-collapsed #appSidebar .sidebar-group-links,html body.m50-sidebar-collapsed #appSidebar .sidebar-subgroup-links,html body.m50-sidebar-collapsed .top-brand-copy{display:none!important}html body.m50-sidebar-collapsed #appSidebar > a,html body.m50-sidebar-collapsed #appSidebar > details > summary{justify-content:center!important;padding:10px!important}html body.m50-sidebar-collapsed .brand-area{justify-content:center!important}html body.m50-sidebar-collapsed .brand-logo,html body.m50-sidebar-collapsed .brand-logo-text{width:35px!important;height:35px!important}}
@media(max-width:900px){html body:has(#appSidebar) .topbar{grid-template-columns:auto minmax(0,1fr) auto!important;height:64px!important;min-height:64px!important;gap:10px!important;padding:0 10px!important}html body:has(#appSidebar) .brand-area{width:48px!important;min-height:0!important;height:64px!important;padding:0!important;border:0!important}html body:has(#appSidebar) .brand-logo,html body:has(#appSidebar) .brand-logo-text,html body:has(#appSidebar) .top-brand-copy{display:none!important}html body:has(#appSidebar) .menu-toggle{position:static!important;transform:none!important;right:auto!important;top:auto!important}html body:has(#appSidebar) .top-search{display:flex!important;max-width:none!important}html body:has(#appSidebar) .top-search kbd{display:none!important}html body:has(#appSidebar) .wrap{display:block!important}html body:has(#appSidebar) #appSidebar{position:fixed!important;top:64px!important;left:0!important;bottom:0!important;z-index:1150!important;width:min(280px,86vw)!important;height:calc(100dvh - 64px)!important;transform:translateX(-105%)!important;transition:transform .2s ease!important;box-shadow:15px 0 45px #0008!important}html body.menu-open #appSidebar{transform:translateX(0)!important}html body:has(#appSidebar) .mobile-overlay{position:fixed!important;inset:64px 0 0!important;z-index:1140!important;display:block!important;opacity:0!important;pointer-events:none!important;background:#0009!important}html body.menu-open .mobile-overlay{opacity:1!important;pointer-events:auto!important}html body:has(#appSidebar) [data-user-menu-toggle]{padding:7px!important}html body:has(#appSidebar) [data-user-menu-toggle] > span:not(.user-avatar){display:none!important}}
@media(max-width:560px){html body:has(#appSidebar) .top-search{height:40px!important}html body:has(#appSidebar) [data-user-menu-toggle] b{display:none!important}}
@media print{html body:has(#appSidebar) .topbar,html body:has(#appSidebar) #appSidebar{display:none!important}html body:has(#appSidebar) .wrap{display:block!important}}
