:root{--app-header-bg:#1a1d27;--app-border:#2d3148;--app-text:#cbd5e1;--app-muted:#94a3b8;--app-accent:#a5b4fc;--app-active:#252840}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.app-header{position:relative;z-index:50;background:var(--app-header-bg);border-bottom:1px solid var(--app-border);color:var(--app-text);font:14px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.app-header__main{min-height:64px;padding:8px 20px;display:flex;align-items:center;gap:18px;max-width:100%;margin:0 auto}
.app-brand{display:flex;flex-direction:column;min-width:max-content;color:#fff;text-decoration:none;line-height:1.1}.app-brand__name{font-size:16px;font-weight:800}.app-brand__site{font-size:11px;color:var(--app-accent);margin-top:4px;font-weight:700}
.app-nav{display:flex;align-items:center;gap:4px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:thin;padding:3px 0}.app-nav__link{display:inline-flex;align-items:center;white-space:nowrap;color:var(--app-muted);text-decoration:none;padding:8px 10px;border-radius:7px}.app-nav__link:hover,.app-nav__link.active{background:var(--app-active);color:#fff}.app-nav__badge{font-size:10px;color:var(--app-accent);font-weight:800}
.app-header__actions{display:flex;align-items:center;gap:8px;min-width:max-content}.app-site-switcher select{max-width:180px;background:#151823;border:1px solid var(--app-border);color:#e2e8f0;border-radius:7px;padding:7px 9px}.app-user{color:var(--app-muted);font-size:12px}.app-logout{margin:0}.app-logout button{background:transparent;color:var(--app-muted);border:1px solid var(--app-border);border-radius:7px;padding:7px 10px;cursor:pointer}.app-logout button:hover{color:#fff;background:var(--app-active)}
.app-subheader{min-height:38px;padding:7px 22px;border-top:1px solid rgba(45,49,72,.7);display:flex;align-items:center;gap:16px;background:#161923}.app-subheader a{color:var(--app-accent);text-decoration:none}.app-subheader strong{color:#e2e8f0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Override older per-page header rules so every authenticated page stays consistent. */
body>.top{display:none!important}
@media(max-width:1050px){.app-header__main{align-items:flex-start;flex-wrap:wrap}.app-nav{order:3;flex-basis:100%;width:100%}.app-header__actions{margin-left:auto}}
@media(max-width:620px){.app-header__main{padding:10px 12px;gap:10px}.app-header__actions{width:100%;margin-left:0}.app-site-switcher{flex:1}.app-site-switcher select{width:100%;max-width:none}.app-user{display:none}.app-nav__link{padding:8px}.app-subheader{padding:7px 12px}}

/* v15: authoritative shared header rules. These intentionally win over old page-local CSS. */
.app-header,.app-header *{box-sizing:border-box}
.app-header{display:block!important;width:100%!important;position:relative!important;z-index:1000!important;background:#1a1d27!important;border-bottom:1px solid #2d3148!important;color:#cbd5e1!important;font:14px system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important}
.app-header__main{min-height:64px!important;height:auto!important;padding:8px 20px!important;display:flex!important;align-items:center!important;gap:18px!important;width:100%!important;max-width:none!important;margin:0!important;background:#1a1d27!important}
.app-brand{display:flex!important;flex-direction:column!important;min-width:max-content!important;color:#fff!important;text-decoration:none!important;line-height:1.1!important}
.app-nav{display:flex!important;align-items:center!important;gap:4px!important;flex:1!important;min-width:0!important;overflow-x:auto!important;padding:3px 0!important;background:transparent!important}
.app-nav__link{display:inline-flex!important;align-items:center!important;white-space:nowrap!important;color:#94a3b8!important;text-decoration:none!important;padding:8px 10px!important;border-radius:7px!important;background:transparent!important}
.app-nav__link:hover,.app-nav__link.active{background:#252840!important;color:#fff!important}
.app-header__actions{display:flex!important;align-items:center!important;gap:8px!important;min-width:max-content!important;margin:0!important;padding:0!important}
.app-provider-usage{display:flex;align-items:center;gap:6px;min-width:max-content}.app-usage-badge{display:inline-flex;align-items:center;min-height:28px;padding:5px 8px;border:1px solid #3d4168;border-radius:999px;background:#171a25;color:#c7d2fe;text-decoration:none;font-size:11px;font-weight:800;white-space:nowrap}.app-usage-badge.ok{border-color:#166534;color:#86efac;background:#123c28}.app-usage-badge.warning{border-color:#a16207;color:#fde68a;background:#422f12}.app-usage-badge.danger{border-color:#b91c1c;color:#fecaca;background:#4b1d1d}.app-usage-badge.loading,.app-usage-badge.unavailable{color:#94a3b8;background:#171a25;border-color:#34384d}
.app-header form{margin:0!important}
.app-header button,.app-header select{font:inherit!important}
.app-menu-toggle{display:none;background:#252840;color:#fff;border:1px solid #3d4168;border-radius:7px;padding:7px 10px;cursor:pointer}
body>.top,.top.app-legacy-header{display:none!important}
.scene-search-status{display:block;color:#64748b;font-size:12px;margin:8px 2px}
.scene-list-empty{color:#94a3b8;padding:10px 8px;font-size:13px}
@media(max-width:1050px){
 .app-header__main{align-items:center!important;flex-wrap:wrap!important}
 .app-menu-toggle{display:inline-flex!important;margin-left:auto}
 .app-nav{display:none!important;order:4!important;flex-basis:100%!important;width:100%!important;flex-direction:column!important;align-items:stretch!important;overflow:visible!important}
 .app-nav.is-open{display:flex!important}
 .app-nav__link{width:100%!important}
 .app-header__actions{margin-left:0!important}
 .app-provider-usage{order:3;margin-left:auto}
}
@media(max-width:620px){
 .app-header__main{padding:10px 12px!important;gap:10px!important}
 .app-header__actions{width:100%!important;flex-wrap:wrap!important}
 .app-provider-usage{order:3;width:100%;margin-left:0;overflow-x:auto}
 .app-site-switcher{flex:1!important}.app-site-switcher select{width:100%!important;max-width:none!important}
}
