/* Two explicit rows keep navigation independent of the brand, search and account. */
.app-header__inner { display:grid; grid-template-columns:minmax(250px,1fr) minmax(260px,380px) auto; grid-template-areas:"brand search user" "nav nav nav"; align-items:center; gap:10px 24px; padding:12px 0 8px; }
.app-header .brand-mark { grid-area:brand; min-width:0; gap:10px; }
.app-header .brand-mark__logo { flex:0 0 42px; width:42px; height:42px; border-radius:12px; }
.app-header .brand-mark strong { font-size:1rem; line-height:1.25; }
.app-header .brand-mark small { font-size:.8rem; line-height:1.4; margin-top:2px; }
.app-header .header-search { grid-area:search; min-width:0; width:100%; box-shadow:none; }
.app-header .header-user { grid-area:user; min-width:0; width:auto; max-width:260px; padding:6px 10px; flex-wrap:nowrap; justify-content:flex-end; }
.app-header .header-user span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.app-header .header-user form { flex-shrink:0; }
.app-header .top-nav { grid-area:nav; display:flex; flex-wrap:wrap; gap:4px; width:100%; padding-top:7px; border-top:1px solid var(--line); }
.app-header .top-nav a { display:block; padding:7px 12px; border-radius:9px; white-space:nowrap; line-height:1.3; background:transparent; }
.app-header .top-nav a:hover { background:#e0eef3; color:var(--deep); }
.app-header .top-nav a[aria-current="page"] { color:#fff; background:var(--deep); }
.header-menu-toggle { display:none; grid-area:toggle; border:1px solid var(--line); border-radius:9px; padding:9px 12px; color:var(--deep); background:white; font-weight:600; }
.app-header a:focus-visible, .app-header button:focus-visible, .app-header input:focus-visible { outline:3px solid var(--accent-2); outline-offset:2px; }
@media (max-width:900px) {
  .app-header { position:static; }
  .app-header__inner { grid-template-columns:auto minmax(0,1fr); grid-template-areas:"brand user" "toggle search" "nav nav"; gap:10px; }
  .app-header .header-user { justify-self:end; }
  .header-menu-toggle { display:block; }
  .app-header .top-nav.collapse:not(.show) { display:none; }
  .app-header .top-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .app-header .top-nav a { text-align:left; }
}
@media (max-width:580px) {
  .app-header__inner { grid-template-columns:92px minmax(0,1fr); }
  .app-header .brand-mark { grid-column:1 / -1; padding-right:76px; }
  .app-header .brand-mark strong { font-size:.9rem; }
  .app-header .brand-mark small { font-size:.72rem; }
  .app-header .header-user { max-width:76px; padding:0; background:none; }
  .app-header .header-user span { display:none; }
  .app-header .header-search__icon { display:none; }
  .app-header .header-search input { padding-left:10px; font-size:.85rem; }
  .app-header .header-search button { padding-inline:10px; }
  .app-header .top-nav a { font-size:.9rem; white-space:normal; }
}
