/* Persistent appearance controls; application views and their state are unchanged. */
#mainContent > .view-header { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:24px; }
#mainContent > .view-header::before { grid-column:1; grid-row:1; }
#mainContent > .view-header > #viewTitle { grid-column:1; grid-row:2; min-width:0; }
#mainContent > .view-header > #viewSubtitle { grid-column:1; grid-row:3; min-width:0; }
#adminThemeHeader { grid-column:2; grid-row:1 / 4; align-self:center; margin:0; flex-wrap:nowrap; gap:6px; padding:6px; border:1px solid #d5e1e9; border-radius:12px; background:#fff; color:#30475d; }
#adminThemeHeader > span { margin:0 9px 0 5px; font:600 12px system-ui,sans-serif; }
#adminThemeHeader button { min-height:40px; padding:8px 12px; background:transparent; border:1px solid transparent; color:#435973; white-space:nowrap; }
#adminThemeHeader button:hover { background:#eff6f3; color:#145a4f; }
#adminThemeHeader button[aria-pressed="true"] { background:#d9f2e8; border-color:#b7ddcc; color:#125445; }
html[data-admin-theme="dark"] #adminThemeHeader { background:#122338; border-color:#385069; color:#dbe9f5; }
html[data-admin-theme="dark"] #adminThemeHeader button { color:#ccdcee; }
html[data-admin-theme="dark"] #adminThemeHeader button:hover { background:#203b50; }
html[data-admin-theme="dark"] #adminThemeHeader button[aria-pressed="true"] { color:#103c32; background:#a6edda; border-color:#a6edda; }
#adminThemeMobile { flex:0 0 auto; flex-wrap:nowrap; gap:4px; margin:0; padding:3px; border:1px solid #40556d; border-radius:10px; color:#e5eff9; background:#162b40; }
#adminThemeMobile > span { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#adminThemeMobile button { min-height:40px; padding:7px 9px; font-size:12px; line-height:1.2; border:1px solid transparent; background:transparent; color:#e5eff9; white-space:nowrap; }
#adminThemeMobile button[aria-pressed="true"] { background:#a6edda; color:#123c39; border-color:#a6edda; }
#adminThemeMobile button:hover:not([aria-pressed="true"]) { background:#29445c; }
#adminThemeHeader button:focus-visible, #adminThemeMobile button:focus-visible { outline:3px solid #52bda7; outline-offset:2px; }
@media (max-width:1024px) {
  #mainContent > .view-header { display:block; top:64px!important; }
  #adminThemeHeader { display:none!important; }
  #appShell > .mobile-header-bar { gap:10px; padding:9px 12px!important; min-height:64px!important; }
  #appShell > .mobile-header-bar > .mobile-brand { min-width:0; flex:1 1 auto; }
  #appShell > .mobile-header-bar > #mobileMenuToggle { flex:0 0 auto; white-space:nowrap; margin:0; min-height:40px; }
}
@media (max-width:540px) {
  #appShell > .mobile-header-bar { gap:8px; }
  #appShell > .mobile-header-bar > .mobile-brand { flex:0 0 auto; }
  #appShell > .mobile-header-bar .mobile-brand > span:last-child:not(.brand-mark) { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  #adminThemeMobile { margin-left:auto; }
  #appShell > .mobile-header-bar > #mobileMenuToggle { padding:8px 9px; }
}
/* Keep authenticated navigation hidden when the application shows the login shell. */
#appShell.hidden, #loginShell.hidden { display:none!important; }
