/*
 * Datei: assets/styles/app-header.css
 * Zweck: Globale Header- und Markenlogik.
 * Status: führend, Phase-4-A-gehärtet
 * Verantwortet: einzige aktive Header-Geometrie; Bereichsdateien komponieren nur.
 */

html{
  --app-header-safe: env(safe-area-inset-top);
  --app-header-h: var(--shell-header-height, 76px);
}
.header,.app-header{
  position:fixed;
  top:0;
  left:0;
  right:0;
  width:100%;
  z-index:var(--shell-z-header, 240);
  background:var(--shell-header-bg, var(--bg));
  backdrop-filter:blur(var(--shell-blur, 18px));
  border-bottom:1px solid var(--shell-line-subtle, rgba(255,255,255,.04));
  box-shadow:var(--shell-header-shadow, 0 10px 26px rgba(0,0,0,.18));
  padding-top:0;
}
.header-inner,.app-header-inner{
  padding:8px 14px 8px 14px;
}
.brand-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 56px;
  gap:10px;
  min-height:60px;
  align-items:start;
}
.brand-wrap{
  min-width:0;
}
.brand{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:12px;
  align-items:start;
  min-width:0;
}
.brand img{
  width:48px;
  height:48px;
  object-fit:contain;
  border-radius:16px;
  background:var(--dg-surface-solid, #121316);
  box-shadow:var(--shadow);
}
.brand-text{
  min-width:0;
  min-height:48px;
  position:relative;
  top:10px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}
.brand-name{
  font-size:18px;
  font-weight:620;
  line-height:1;
  letter-spacing:-.02em;
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.brand-subtitle{
  margin-top:3px;
  font-size:9px;
  line-height:1.05;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.header-actions{
  display:flex;
  justify-content:flex-end;
  align-items:flex-start;
}
.menu-btn,.header-action,.header-actions .icon-btn{
  width:56px;
  height:56px;
  min-width:56px;
  min-height:56px;
  border-radius:20px;
  justify-self:end;
  align-self:start;
  position:relative;
  top:2px;
}
.menu-btn .material-symbols-rounded{
  font-size:28px;
}
.app{
  padding-top:calc(var(--app-header-safe) + var(--app-header-h));
}
.admin-shell,.admin-login-shell{
  padding-top:calc(var(--app-header-safe) + var(--app-header-h));
}
@media (max-width:520px){
  html{
    --app-header-h: 74px;
  }
  .brand-row{
    grid-template-columns:minmax(0,1fr) 54px;
    min-height:58px;
  }
  .brand{
    grid-template-columns:46px minmax(0,1fr);
  }
  .brand img{
    width:46px;
    height:46px;
  }
  .brand-text{
    min-height:46px;
    top:9px;
  }
  .brand-name{
    font-size:18px;
  }
  .brand-subtitle{
    font-size:9px;
  }
  .menu-btn,.header-action,.header-actions .icon-btn{
    width:54px;
    height:54px;
    min-width:54px;
    min-height:54px;
  }
}

/* AP-29D-REV14-PHASE3 | 2026-05-18 | Override-Last aus Headerbasis entfernt; app-header.css bleibt einzige Header-Geometrie. */


/* AP-29D-REV14-PHASE4-A | Header bleibt fixe Shell-Wahrheit; Brand verlinkt Home; Menübutton morpht zum X. */
.brand-home-link{
  color:inherit;
  text-decoration:none;
  -webkit-tap-highlight-color:transparent;
}
.brand-home-link:focus-visible{
  outline:2px solid var(--shell-accent-border, rgba(215,181,109,.42));
  outline-offset:4px;
  border-radius:18px;
}
.menu-btn{
  overflow:hidden;
}
.menu-btn .material-symbols-rounded{
  display:block;
  transform-origin:center;
  transition:transform .18s ease, opacity .18s ease;
}
body.menu-open .menu-btn .material-symbols-rounded,
body[data-utility-overlay] .menu-btn .material-symbols-rounded{
  transform:rotate(90deg) scale(.96);
  opacity:0;
}
.menu-btn::before,
.menu-btn::after{
  content:'';
  position:absolute;
  left:50%;
  top:50%;
  width:24px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  opacity:0;
  transform:translate(-50%,-50%) rotate(0deg) scaleX(.72);
  transition:transform .18s ease, opacity .18s ease;
}
body.menu-open .menu-btn::before,
body[data-utility-overlay] .menu-btn::before{
  opacity:1;
  transform:translate(-50%,-50%) rotate(45deg) scaleX(1);
}
body.menu-open .menu-btn::after,
body[data-utility-overlay] .menu-btn::after{
  opacity:1;
  transform:translate(-50%,-50%) rotate(-45deg) scaleX(1);
}
body.menu-open .menu-btn,
body[data-utility-overlay] .menu-btn{
  border-color:var(--shell-accent-border-soft, rgba(215,181,109,.34));
  box-shadow:0 0 0 1px var(--shell-accent-ring-soft, rgba(215,181,109,.12)), var(--shell-header-shadow, 0 10px 26px rgba(0,0,0,.18));
}

/* AP-29D-REV14-PHASE4-B | Header fügt sich in die DG-Fläche ein; keine Fremdtopbar. */
.header,
.app-header{
  background:color-mix(in srgb, var(--dg-bg, var(--bg)) 94%, transparent);
  border-bottom:1px solid var(--dg-line-soft, rgba(255,255,255,.065));
  box-shadow:0 8px 22px rgba(0,0,0,.20);
}
.brand img{
  background:transparent;
  box-shadow:none;
}
.brand-name{
  color:var(--dg-text, var(--text));
}
.brand-subtitle{
  color:var(--dg-muted-2, var(--muted));
}
.menu-btn,
.header-action,
.header-actions .icon-btn{
  border-color:var(--dg-line-soft, var(--line));
  background:transparent;
  box-shadow:none;
}
body.menu-open .menu-btn,
body[data-utility-overlay] .menu-btn{
  border-color:transparent;
  background:transparent;
  box-shadow:none;
  color:var(--dg-accent, var(--brand));
}

/* AP-29D-REV14-PHASE4-C | Kompakter Header und bereinigter Menübutton ohne Hintergrund/Kontur. */
html{
  --app-header-h:var(--app-header-compact-height, var(--shell-header-height, 64px));
}
.header-inner,
.app-header-inner{
  padding:4px 12px;
}
.brand-row{
  grid-template-columns:minmax(0,1fr) var(--app-header-action-size, 44px);
  gap:8px;
  min-height:calc(var(--app-header-compact-height, 64px) - 8px);
  align-items:center;
}
.brand{
  grid-template-columns:var(--app-header-logo-size, 42px) minmax(0,1fr);
  gap:10px;
  align-items:center;
}
.brand img{
  width:var(--app-header-logo-size, 42px);
  height:var(--app-header-logo-size, 42px);
  border-radius:14px;
}
.brand-text{
  min-height:auto;
  top:0;
  justify-content:center;
}
.brand-name{
  font-size:17px;
}
.brand-subtitle{
  margin-top:2px;
  font-size:9px;
  line-height:1;
}
.menu-btn,
.header-action,
.header-actions .icon-btn{
  width:var(--app-header-action-size, 44px);
  height:var(--app-header-action-size, 44px);
  min-width:var(--app-header-action-size, 44px);
  min-height:var(--app-header-action-size, 44px);
  border-radius:14px;
  top:0;
  align-self:center;
}
.menu-btn{
  display:grid;
  place-items:center;
  border:0;
  background:transparent;
  box-shadow:none;
  padding:0;
  color:var(--dg-text, var(--text));
}
.menu-btn:hover,
.menu-btn:active,
body.menu-open .menu-btn,
body[data-utility-overlay] .menu-btn{
  border:0;
  background:transparent;
  box-shadow:none;
  filter:none;
}
.menu-btn .material-symbols-rounded{
  font-size:30px;
  line-height:1;
  transform:scaleX(-1);
}
body.menu-open .menu-btn .material-symbols-rounded,
body[data-utility-overlay] .menu-btn .material-symbols-rounded{
  transform:scaleX(-1) rotate(90deg) scale(.96);
}
.menu-btn::before,
.menu-btn::after{
  width:22px;
  height:2px;
}
body.menu-open .menu-btn,
body[data-utility-overlay] .menu-btn{
  color:var(--dg-text, var(--text));
}
@media (max-width:520px){
  html{
    --app-header-h:var(--app-header-compact-height, 64px);
  }
  .brand-row{
    grid-template-columns:minmax(0,1fr) var(--app-header-action-size, 44px);
    min-height:calc(var(--app-header-compact-height, 64px) - 8px);
  }
  .brand{
    grid-template-columns:var(--app-header-logo-size, 42px) minmax(0,1fr);
  }
  .brand img{
    width:var(--app-header-logo-size, 42px);
    height:var(--app-header-logo-size, 42px);
  }
  .brand-text{
    min-height:auto;
    top:0;
  }
  .brand-name{
    font-size:17px;
  }
  .menu-btn,
  .header-action,
  .header-actions .icon-btn{
    width:var(--app-header-action-size, 44px);
    height:var(--app-header-action-size, 44px);
    min-width:var(--app-header-action-size, 44px);
    min-height:var(--app-header-action-size, 44px);
  }
}

/* AP-29D-REV14-PHASE4-C-REV8 | Safe-Area wird vom führenden Header dunkel getragen, ohne neue Header-Geometrie einzuführen. */
.header,
.app-header{
  padding-top:var(--app-header-safe, 0px);
}


/* AP-29D-REV14-PHASE4-C-REV16 | Header-Branding und weicher Compact-Header ohne zweite Header-Wahrheit. */
body[data-area="employee"]{
  --app-header-logo-size:44px;
  --app-header-action-size:50px;
  --app-header-compact-visual-h:54px;
}
body[data-area="employee"] .header,
body[data-area="employee"] .app-header{
  transition:min-height var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), box-shadow var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), background var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease);
}
body[data-area="employee"] .header-inner,
body[data-area="employee"] .app-header-inner{
  padding:7px 14px 7px 14px;
  transition:padding var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease);
}
body[data-area="employee"] .brand-row{
  grid-template-columns:minmax(0,1fr) var(--app-header-action-size, 50px);
  min-height:60px;
  align-items:center;
  transition:min-height var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), gap var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease);
}
body[data-area="employee"] .brand{
  grid-template-columns:var(--app-header-logo-size, 44px) minmax(0,1fr);
  gap:12px;
  align-items:center;
  transition:grid-template-columns var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), gap var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease);
}
body[data-area="employee"] .brand img{
  width:var(--app-header-logo-size, 44px);
  height:var(--app-header-logo-size, 44px);
  transition:width var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), height var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), transform var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease);
}
body[data-area="employee"] .brand-text{
  top:2px;
  justify-content:center;
  min-height:44px;
  opacity:1;
  transform:translate3d(0,0,0);
  max-width:260px;
  overflow:hidden;
  transition:opacity var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), transform var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), max-width var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease);
}
body[data-area="employee"] .brand-name{
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:20px;
  font-weight:760;
  line-height:.98;
  letter-spacing:-.038em;
}
body[data-area="employee"] .brand-subtitle{
  margin-top:4px;
  font-size:11px;
  line-height:1.05;
  letter-spacing:-.012em;
}
body[data-area="employee"] .menu-btn,
body[data-area="employee"] .header-action,
body[data-area="employee"] .header-actions .icon-btn{
  width:var(--app-header-action-size, 50px);
  height:var(--app-header-action-size, 50px);
  min-width:var(--app-header-action-size, 50px);
  min-height:var(--app-header-action-size, 50px);
  border-radius:16px;
  transition:width var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), height var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), min-width var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), min-height var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), transform var(--dg-motion-medium, 240ms) var(--dg-motion-ease, ease), filter var(--dg-motion-fast, 160ms) var(--dg-motion-ease, ease);
}
body[data-area="employee"] .menu-btn .material-symbols-rounded{
  font-size:34px;
}
body[data-area="employee"].header-compact .header-inner,
body[data-area="employee"].header-compact .app-header-inner{
  padding-top:3px;
  padding-bottom:3px;
}
body[data-area="employee"].header-compact .brand-row{
  min-height:var(--app-header-compact-visual-h, 54px);
}
body[data-area="employee"].header-compact .brand{
  grid-template-columns:38px 0fr;
  gap:0;
}
body[data-area="employee"].header-compact .brand img{
  width:38px;
  height:38px;
  transform:translate3d(0,0,0) scale(.96);
}
body[data-area="employee"].header-compact .brand-text{
  opacity:0;
  max-width:0;
  transform:translate3d(-8px,-2px,0);
  pointer-events:none;
}
body[data-area="employee"].header-compact .menu-btn,
body[data-area="employee"].header-compact .header-action,
body[data-area="employee"].header-compact .header-actions .icon-btn{
  width:46px;
  height:46px;
  min-width:46px;
  min-height:46px;
  transform:scale(.96);
}
body[data-area="employee"].header-compact .menu-btn .material-symbols-rounded{
  font-size:31px;
}

/* AP-29D-REV14-PHASE4-C-REV17 | Header-Branding-Feinlage: Logoachse, Wortmarke und Claim präziser geführt. */
body[data-area="employee"] .header-inner,
body[data-area="employee"] .app-header-inner{
  padding-left:18px;
  padding-right:14px;
}
body[data-area="employee"] .brand{
  gap:14px;
}
body[data-area="employee"] .brand-text{
  top:5px;
}
body[data-area="employee"] .brand-name{
  font-family:"Tekwar", "Tekwar Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight:740;
  letter-spacing:-.03em;
}
body[data-area="employee"] .brand-subtitle{
  margin-top:5px;
}
body[data-area="employee"].header-compact .brand{
  gap:0;
}
body[data-area="employee"].header-compact .brand-text{
  top:0;
}
@media (max-width:640px){
  body[data-area="employee"] .header-inner,
  body[data-area="employee"] .app-header-inner{
    padding-left:18px;
    padding-right:14px;
  }
  body[data-area="employee"] .brand{
    gap:13px;
  }
}
