/* One compact application header; feature workspaces keep their own toolbars. */
body .app-header.app-header-unified {
  display:grid;grid-template-columns:minmax(9rem,12rem) minmax(0,1fr) auto;
  align-items:center;gap:.75rem;padding:.45rem .75rem;
}
body .app-header-unified .header-title-block{min-width:0;gap:.45rem}
body .app-header-unified .app-brand-logo{width:3rem;height:3rem;flex:0 0 auto}
body .app-header-unified h1{font-size:1.15rem;line-height:1.1}
body .app-header-unified .subtitle{font-size:.65rem;line-height:1.2;overflow-wrap:anywhere}
body .app-header-unified .header-version-row{display:block;text-align:center;margin-top:.15rem}
body .app-header-unified .header-tools{display:flex;flex-direction:column;align-items:stretch;gap:.2rem;min-width:0;width:10.625rem;grid-column:auto;grid-row:auto}
body .app-header-unified .theme-picker{margin:0;padding:.15rem .3rem;gap:.3rem;font-size:.72rem;width:100%}
body .app-header-unified .theme-picker select{width:auto;flex:1 1 0;min-width:0;min-height:1.5rem;font-size:.75rem;padding-inline:4px 12px;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 5px) 50%,calc(100% - 2px) 50%;background-size:3px 3px,3px 3px;background-repeat:no-repeat}
body .app-header-unified .user-chip{width:100%;font-size:.73rem;padding:.2rem .4rem;line-height:1.2;white-space:normal;text-align:right}
.header-navigation{position:relative;min-width:0}
@media screen{
 body.surface-modern:has(>.app-header-unified){min-height:100vh;min-height:100dvh;background-repeat:no-repeat;background-color:var(--access-bg)}
 body.surface-modern .app-header-unified+main.page{padding-top:12px}
 body.surface-modern .app-header-unified+main.page>:is(.access-window,.panel):first-of-type{margin-top:0}
}
body .app-header-unified .top-nav{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:.3rem;margin:0;padding:0;border:0;background:transparent;box-shadow:none;width:auto}
body .app-header.app-header-unified .top-nav>a,body .app-header.app-header-unified .top-nav .nav-logout{display:inline-flex;align-items:center;justify-content:center;gap:.3rem;width:auto;min-width:0;min-height:2.65rem;padding:.5rem .55rem;font-family:inherit;font-size:1rem;font-weight:700;line-height:1.15;white-space:nowrap;color:var(--text);box-sizing:border-box;flex:0 0 auto}
/* Grow with the destination label, then wrap before reaching adjacent controls. */
body .app-header.app-header-unified .top-nav .nav-back{white-space:normal;overflow-wrap:anywhere;max-width:100%;text-align:center}
body .app-header.app-header-unified .top-nav .nav-recipes{padding-inline:1.5rem}
body .app-header-unified .top-nav .nav-logout-form{width:auto;margin:0;flex:0 0 auto}
.header-navigation-toggle[hidden]{display:none!important}
body.theme-dark .app-header-unified .top-nav>a,body.theme-dark .app-header-unified .top-nav .nav-logout{color:#e5edf5}
body.theme-dark .app-header-unified .header-nav-collapsible .top-nav{background:#172b3a;border-color:#547082}
@media(max-width:1150px){
 body .app-header.app-header-unified{grid-template-columns:minmax(0,1fr) auto auto;gap:.5rem}
 body .app-header-unified .header-title-block{max-width:22rem}
 body .app-header-unified .header-navigation-toggle{width:auto;min-height:2.25rem;padding:.4rem .65rem;font-size:.85rem}
 body .app-header-unified .header-nav-collapsible:not(.header-nav-open) .top-nav{display:none}
 body .app-header-unified .header-nav-collapsible .top-nav{
   position:absolute;right:0;top:calc(100% + .55rem);z-index:80;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
   width:min(25rem,calc(100vw - 1rem));max-height:70dvh;overflow:auto;padding:.5rem;gap:.4rem;
   border:1px solid var(--border);border-radius:.65rem;background:var(--form-bg);box-shadow:0 .4rem 1.2rem #0003;
 }
 body .app-header-unified .header-nav-collapsible .top-nav>a,body .app-header-unified .header-nav-collapsible .top-nav .nav-logout{width:100%;max-width:none;min-height:2.6rem;white-space:normal;text-align:center;font-size:.85rem;box-sizing:border-box}
 body .app-header-unified .header-nav-collapsible .nav-surface-label{grid-column:1/-1}
}
@media(max-width:600px){
 body .app-header.app-header-unified{gap:.35rem;padding:.35rem .5rem;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto}
 body .app-header-unified .header-title-block{grid-column:1;grid-row:1;width:auto;align-self:end}
 body .app-header-unified .header-navigation{grid-column:1;grid-row:2;justify-self:start;align-self:start}
 body .app-header-unified .header-tools{grid-column:2;grid-row:1/3;align-self:center;width:7rem}
 body .app-header-unified .app-brand-logo{width:2.1rem;height:2.1rem}
 body .app-header-unified h1{font-size:1rem}
 body .app-header-unified .subtitle{font-size:.59rem}
 body .app-header-unified .theme-picker{font-size:0;padding:.1rem .2rem;align-self:stretch;justify-self:end;width:100%;margin-left:0}
 body .app-header-unified .theme-picker label{display:none}
 body.surface-modern .app-header-unified .theme-picker select{width:6.3rem;font-size:.68rem;min-height:32px!important;height:32px;padding-block:1px;padding-inline:4px}
 body .app-header-unified .user-chip{max-width:none;font-size:.65rem;padding:.15rem .2rem;text-align:right;align-self:stretch;justify-self:end}
 body .app-header-unified .header-nav-collapsible .top-nav{position:fixed;top:var(--app-header-menu-top,4rem);right:.5rem}
}
@media print{.app-header.app-header-unified{display:none!important}}
