/* Final portal shell. Kept separate so legacy sidebar rules cannot reclaim page width. */
html,body{width:100%;max-width:none}
html{overflow-x:hidden}
/* The portal header is the only application navigation. Retire the legacy sidebar everywhere. */
body>.enterprise-sidebar{display:none!important}
body>header,
body>main,
body.employee-workspace-mode>header,
body.employee-workspace-mode>main,
body.employee-create-mode>header,
body.employee-create-mode>main,
body.profile-workspace-mode>header,
body.profile-workspace-mode>main,
body.leave-workspace-mode>header,
body.leave-workspace-mode>main{box-sizing:border-box!important;left:0!important;width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
body>main>.panel,
body>main>.panel.active,
body.employee-workspace-mode>main>#employeePanel,
body.employee-create-mode>main>#employeeCreatePanel,
body.profile-workspace-mode>main>#employeeViewPanel,
body.leave-workspace-mode>main>#modulePanel{box-sizing:border-box!important;width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
body>main #modulePanelContent,
body>main #modulePanelContent>*{box-sizing:border-box;width:100%;max-width:none!important}
body.home-portal-layout{box-sizing:border-box;width:100%!important;inline-size:100vw!important;max-width:none!important;padding:0!important;overflow-x:clip!important}
body.home-portal-layout>.enterprise-sidebar{display:none!important}
body.home-portal-layout>header,
body.home-portal-layout>main{box-sizing:border-box!important;left:0!important;right:auto!important;width:100%!important;inline-size:100vw!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
body.home-portal-layout>header .head{box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(280px,340px) minmax(620px,1fr) minmax(220px,300px) minmax(190px,215px);width:100%!important;max-width:none!important;gap:clamp(10px,1vw,20px)!important;padding:14px clamp(18px,2vw,38px)!important}
body.home-portal-layout>header .header-brand,
body.home-portal-layout>header .portal-navigation,
body.home-portal-layout>header .global-search,
body.home-portal-layout>header .top-actions{box-sizing:border-box;min-width:0!important;max-width:none}
body.home-portal-layout>header .header-brand{width:100%;overflow:hidden}
body.home-portal-layout>header .header-brand span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.home-portal-layout>header .portal-navigation{width:100%;justify-content:space-between;gap:0}
body.home-portal-layout>header .portal-nav-link{padding-inline:clamp(5px,.55vw,10px)}
body.home-portal-layout>header .global-search{width:100%}
body.home-portal-layout>header .top-actions{width:100%;margin:0!important}
body.home-portal-layout>header .top-actions{display:flex!important;align-items:center!important;gap:8px!important;overflow:visible}
body.home-portal-layout>header .user-summary-card{box-sizing:border-box;flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:none!important;height:42px!important;min-height:42px!important;padding:0 10px!important;justify-content:center}
body.home-portal-layout>header .user-greeting{max-width:100%!important;font-size:12px!important;line-height:1.2!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.home-portal-layout>main{padding:32px clamp(18px,1.6vw,32px) 46px!important}
body.home-portal-layout>main>#homePanel{box-sizing:border-box;width:100%!important;max-width:none!important;margin:0!important}
body.home-portal-layout #homePanel>.home-overview,
body.home-portal-layout #homePanel>.home-quick-actions,
body.home-portal-layout #homePanel>.home-calendar-layout,
body.home-portal-layout #homePanel>.audit{box-sizing:border-box;width:100%!important;max-width:none!important}
body.home-portal-layout #homePanel>.home-overview,
body.home-portal-layout #homePanel>.home-quick-actions{padding-inline:clamp(18px,2vw,38px)!important}

/* Standalone modules always own the full viewport; the legacy application sidebar stays off. */
html[data-module-page] body{box-sizing:border-box;width:100%!important;max-width:none!important;padding-left:0!important}
html[data-module-page] body>.enterprise-sidebar{display:none!important}
html[data-module-page] body>header,
html[data-module-page] body>main,
html[data-module-page] body.employee-workspace-mode>header,
html[data-module-page] body.employee-workspace-mode>main,
html[data-module-page] body.employee-create-mode>header,
html[data-module-page] body.employee-create-mode>main,
html[data-module-page] body.profile-workspace-mode>header,
html[data-module-page] body.profile-workspace-mode>main{box-sizing:border-box!important;left:0!important;width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
html[data-module-page] body>main>.panel{width:100%!important;max-width:none!important;margin-inline:0!important}

@media(max-width:1800px){
 body.home-portal-layout>header .head{grid-template-columns:72px minmax(600px,1fr) minmax(190px,300px) minmax(185px,215px)}
 body.home-portal-layout>header .header-brand{justify-content:center}
 body.home-portal-layout>header .header-brand span{display:none}
 body.home-portal-layout>header .header-brand img{width:58px;height:58px}
 body.home-portal-layout>header .portal-nav-link{padding-inline:clamp(5px,.48vw,9px);font-size:13px}
}
@media(max-width:1180px){
 body.home-portal-layout>header .head{display:flex!important;flex-wrap:wrap!important}
 body.home-portal-layout>header .header-brand{flex:1 1 auto!important;width:auto}
 body.home-portal-layout>header .portal-menu-toggle{display:grid!important}
 body.home-portal-layout>header .portal-navigation{order:5;display:none!important;flex:1 0 100%!important}
 body.home-portal-layout>header .portal-navigation.open{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))}
 body.home-portal-layout>header .global-search{flex:0 1 360px!important;width:auto}
 body.home-portal-layout>header .top-actions{flex:0 0 210px!important;width:210px}
}
@media(max-width:760px){
 body.home-portal-layout>header .global-search{order:4;flex:1 0 100%!important;width:100%}
 body.home-portal-layout>header .top-actions{width:auto;flex-basis:auto!important}
 body.home-portal-layout>header .portal-navigation.open{grid-template-columns:1fr 1fr}
 body.home-portal-layout>main{padding:18px 12px 32px!important}
}
