/*
 * Datei: assets/styles/app-header.css
 * Zweck: Gemeinsame Header-Komposition.
 * Domäne: Header, Brand-Zeile, Header-Höhen und Safe-Area.
 * Status: führend für Header
 * Darf definieren: globale Headerrollen und Headerzustände.
 * Darf nicht definieren: Rail, Seitenfachlogik oder neue Komponentenfamilien.
 */

/* AP-29D-REV10 | 2026-05-03 | Zweck: zentrale Markenintegration; Header führt kantiges ZM-Monogramm plus Tektur-Wortmarke, UI-Texte bleiben neutrale Schrift. | Owner: assets/styles/app-header.css */
html{
  --app-header-safe: env(safe-area-inset-top);
  --app-header-h: 64px;
}

/* AP-29D-REV10 | 2026-05-03 | Zweck: eine kompakte Header-Wahrheit für Mitarbeiter- und Adminbereich ohne zweite Brand-Variante. | Owner: assets/styles/app-header.css */
.header,
.app-header{
  position:fixed !important;
  top:0 !important;
  left:0 !important;
  right:0 !important;
  width:100% !important;
  z-index:240 !important;
  background:linear-gradient(180deg,rgba(13,16,21,.98),rgba(13,16,21,.94)) !important;
  backdrop-filter:blur(14px) !important;
  border-bottom:1px solid rgba(255,255,255,.05) !important;
  padding-top:var(--app-header-safe) !important;
}

/* AP-29D-REV10 | 2026-05-03 | Zweck: Header-Innenabstände kompakt halten, damit Suche und Admin-Arbeit nicht verdrängt werden. | Owner: assets/styles/app-header.css */
.header-inner,
.app-header-inner{
  min-height:var(--app-header-h) !important;
  padding:8px 14px !important;
  display:flex !important;
  align-items:center !important;
}

/* AP-29D-REV10 | 2026-05-03 | Zweck: Brand-Lockup und Header-Aktion als einzige globale Header-Zeile führen. | Owner: assets/styles/app-header.css */
.brand-row{
  width:100% !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:12px !important;
  min-height:48px !important;
  align-items:center !important;
}
.brand-wrap{
  min-width:0 !important;
  display:flex !important;
  align-items:center !important;
}
.brand,
.brand-lockup{
  display:inline-flex !important;
  align-items:center !important;
  gap:var(--brand-lockup-gap-desktop,12px) !important;
  min-width:0 !important;
  color:var(--text) !important;
}
.brand img,
.brand-mark{
  width:var(--brand-mark-size-desktop,34px) !important;
  height:var(--brand-mark-size-desktop,34px) !important;
  flex:0 0 auto !important;
  object-fit:contain !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
.brand-text{
  min-width:0 !important;
  min-height:0 !important;
  position:static !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  gap:3px !important;
}
.brand-name,
.brand-wordmark{
  font-family:var(--font-brand) !important;
  font-weight:500 !important;
  font-size:var(--brand-wordmark-size-desktop,30px) !important;
  line-height:1 !important;
  letter-spacing:-.025em !important;
  margin:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.brand-subtitle{
  font-family:var(--font-ui) !important;
  margin:0 !important;
  font-size:10px !important;
  line-height:1.15 !important;
  font-weight:520 !important;
  color:var(--muted) !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

/* AP-29D-REV10 | 2026-05-03 | Zweck: Header-Aktionen bleiben kompakt und nutzen die bestehende zentrale Iconbutton-Familie. | Owner: assets/styles/app-header.css */
.header-actions{
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:8px !important;
}
.header-actions .menu-btn,
.header-action,
.header-actions .icon-btn{
  justify-self:end !important;
  align-self:center !important;
  position:relative !important;
  top:0 !important;
}

/* AP-29D-REV10 | 2026-05-03 | Zweck: Shell-Padding folgt der kompakten Headerhöhe ohne bereichsspezifische Sonderhöhe. | Owner: assets/styles/app-header.css */
.app,
.admin-shell,
.admin-login-shell{
  padding-top:calc(var(--app-header-safe) + var(--app-header-h)) !important;
}

/* AP-29D-REV10 | 2026-05-03 | Zweck: mobile Header-Metrik für 26–30px Monogramm und 22–26px Tektur-Wortmarke. | Owner: assets/styles/app-header.css */
@media (max-width:640px){
  html{
    --app-header-h:58px;
  }
  .header-inner,
  .app-header-inner{
    padding:7px 12px !important;
  }
  .brand-row{
    min-height:42px !important;
    gap:10px !important;
  }
  .brand,
  .brand-lockup{
    gap:var(--brand-lockup-gap-mobile,10px) !important;
  }
  .brand img,
  .brand-mark{
    width:var(--brand-mark-size-mobile,28px) !important;
    height:var(--brand-mark-size-mobile,28px) !important;
  }
  .brand-name,
  .brand-wordmark{
    font-size:var(--brand-wordmark-size-mobile,24px) !important;
    letter-spacing:-.02em !important;
  }
  .brand-subtitle{
    font-size:9px !important;
  }
}

/* AP-29D-REV9 | 2026-05-03 | Zweck: geöffnete mobile Rail darf den zentralen Menü-/X-Button nicht überdecken; Header-Stapelkontext wird nur in diesem Zustand angehoben. | Owner: assets/styles/app-header.css */
@media (max-width: 960px) {
  body[data-rail-state="open"] .header,
  body[data-rail-state="open"] .app-header {
    z-index: calc(var(--rail-z, 260) + 32) !important;
  }
}
