/* One compact shared header; signed-out pages retain their original layout. */
body:not(.app-signed-in)>header>.heading,body:not(.app-signed-in)>header #logout,body:not(.app-signed-in) .header-modules{display:none}
body[data-access="platform"] .header-modules{display:none}
body.app-signed-in>header{padding:8px 22px!important;min-height:60px;gap:18px;flex-wrap:nowrap;align-items:center}
body.app-signed-in>header .brand{flex-shrink:0;padding:3px 6px}
body.app-signed-in>header .brand img{height:34px;max-width:145px}
body.app-signed-in>header>.heading{margin:0!important;padding:0!important;flex:1;min-width:0}
body.app-signed-in>header #dashboard-title{font-size:15px!important;line-height:1.25;margin:0!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.app-signed-in>header #scope-label,body.app-signed-in>header #greeting{margin:0;font-size:10px}
body.app-signed-in>header .company-clock{font-size:11px;margin:3px 0 0;gap:5px}
body.app-signed-in>header .header-tools{gap:6px;flex-wrap:nowrap;flex-shrink:0}
body.app-signed-in>header button{min-height:36px;height:36px;padding:7px 10px}
body.app-signed-in>header .community-bell,body.app-signed-in>header .header-modules{width:36px;padding:8px;position:relative}
.header-modules svg{width:18px;height:18px;display:block}
.community-bell span{display:none}
.community-bell[data-unread="true"]::after{content:'';position:absolute;right:5px;top:5px;width:7px;height:7px;border-radius:50%;background:var(--accent);border:1px solid var(--surface)}
.header-modules-dialog{width:min(1000px,calc(100% - 24px));max-height:90dvh;overflow:auto}
.header-modules-dialog>button{display:block;margin-left:auto}
@media(max-width:600px){body.app-signed-in>header{padding:6px 10px!important;gap:8px}body.app-signed-in>header .brand img{max-width:68px;height:30px}body.app-signed-in>header #dashboard-title{font-size:12px!important;max-width:110px}body.app-signed-in>header .company-clock{display:none}body.app-signed-in>header .header-tools{gap:4px}body.app-signed-in>header button{min-height:40px;height:40px}body.app-signed-in>header .community-bell,body.app-signed-in>header .header-modules{width:40px}}
/* Keep the connected user's name visible below the greeting on small screens. */
@media(max-width:600px){
 body.app-signed-in>header #dashboard-title{max-width:none;white-space:normal}
 body.app-signed-in>header .header-welcome{display:block;font-size:10px;font-weight:400;white-space:nowrap}
 body.app-signed-in>header .header-user-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4}
}
@media(max-width:360px){
 body.app-signed-in>header{padding:6px 8px!important;gap:6px}
 body.app-signed-in>header .brand{padding:2px}
 body.app-signed-in>header .brand img{max-width:46px}
 body.app-signed-in>header button{padding:6px;min-height:36px;height:36px}
 body.app-signed-in>header .community-bell,body.app-signed-in>header .header-modules{width:36px}
 body.app-signed-in>header .header-tools{gap:3px}
}
@media(max-width:360px){
 body.app-signed-in>header{flex-wrap:wrap;row-gap:2px}
 body.app-signed-in>header .header-tools{margin-left:auto}
 body.app-signed-in>header>.heading{order:3;flex-basis:100%}
 body.app-signed-in>header .header-welcome,body.app-signed-in>header .header-user-name{display:inline;font-size:12px}
 body.app-signed-in>header #dashboard-title{white-space:nowrap}
}
/* Administrative controls get their own row before they squeeze page and user names. */
@media(max-width:600px){
 body[data-access="platform"].app-signed-in>header{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 12px}
 body[data-access="platform"].app-signed-in>header>.heading{order:initial;min-width:0}
 body[data-access="platform"].app-signed-in>header #scope-label{display:none}
 body[data-access="platform"].app-signed-in>header #dashboard-title{font-size:14px!important;white-space:nowrap;max-width:none}
 body[data-access="platform"].app-signed-in>header #greeting{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.5}
 body[data-access="platform"].app-signed-in>header .header-tools{grid-column:1/-1;justify-content:flex-end;margin:0;min-width:0;gap:6px}
 body[data-access="platform"].app-signed-in>header .support-sound-control{max-width:none;white-space:nowrap;flex:0 1 auto;font-size:11px}
}
