/* ----------------------------- */
/* QUICKSTAND – HEADER (FINAL)   */
/* scoped to .qs-header          */
/* ----------------------------- */

/* Browser-Default-Spalt killen */
html, body{
  margin: 0;
  padding: 0;
}

:root{
  --qs-safe-left: env(safe-area-inset-left);
  --qs-safe-right: env(safe-area-inset-right);
  --qs-safe-top: env(safe-area-inset-top);
  --qs-safe-bottom: env(safe-area-inset-bottom);
}

/* verhindert Overflow (width:100% + padding) auf Seiten ohne globales box-sizing */
.qs-header,
.qs-header * ,
.qs-header *::before,
.qs-header *::after{
  box-sizing: border-box;
}

/* ----------------------------- */
/* SITE HEADER BASE              */
/* ----------------------------- */

.qs-header{
  display: flex;
  align-items: center;
  justify-content: flex-start;

  padding: 20px 40px;
  border-bottom: 1px solid #e6e6e6;

  position: sticky;
  top: 0;

  background: #fff;
  z-index: 9999;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);

  width: 100%;
  max-width: none;

  overflow: visible;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #003366;
}

/* NEU: rechter Cluster MUSS flex sein + nach rechts */
.qs-header .qs-header-right{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.qs-header--public{
  background: rgba(255,255,255,0.98);
}

.qs-header--app{
  background: #fff;
}

/* ----------------------------- */
/* BRAND (Logo + Name)           */
/* ----------------------------- */

.qs-header .brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.qs-header .brand-logo{
  display: block;
  width: auto;
  max-height: 40px;
  height: auto;
}

.qs-header .brand-name{
  font-size: 23px;
  font-weight: 700;
  color: #003366;
  font-family: inherit;
  white-space: nowrap;
  margin-left: 15px;
}

/* ----------------------------- */
/* ROLE BADGE                    */
/* ----------------------------- */

.qs-header .qs-header-right .qs-role-badge{
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #edf7ff;
  color: #003366;
  text-transform: uppercase;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* Fallback (falls irgendwo noch altes Markup ohne .qs-header-right existiert) */
.qs-header > .qs-role-badge{
  margin-left: auto;
  margin-right: 12px;
}

.qs-header .qs-role-badge--admin{ background: #fff1d6; color: #8a4b00; }
.qs-header .qs-role-badge--staff{ background: #e9f7ef; color: #1e6b3b; }
.qs-header .qs-role-badge--viewer{ background: #f1f1f1; color: #444; }

/* ----------------------------- */
/* NAVIGATION                    */
/* ----------------------------- */

.qs-header .qs-header-right .top-nav{
  margin: 0;

  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: nowrap;

  padding: 0;
  width: auto;
  min-width: 0;
}

/* Fallback für Legacy-Markup */
.qs-header > .top-nav{
  margin-left: auto;
}

.qs-header .top-nav a{
  text-decoration: none;
  color: #003366;
  font-weight: 500;

  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 4px;
  padding: 8px 12px;

  white-space: nowrap;
}

.qs-header .top-nav a:hover{
  color: #0055a5;
  background-color: rgba(0, 51, 102, 0.05);
}
 .qs-header .top-nav a.is-active{
  color: #003366;
  background-color: rgba(0, 51, 102, 0.08);
  font-weight: 700;
}

.qs-header .top-nav .qs-nav-link--cta{
  background: rgba(0, 148, 255, 0.10);
  border: 1px solid rgba(0, 148, 255, 0.22);
}

.qs-header .top-nav .qs-nav-link--cta:hover{
  background: rgba(0, 148, 255, 0.16);
}

.qs-header .top-nav .qs-search-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0, 51, 102, 0.12);
  background: rgba(0, 51, 102, 0.03);
}

.qs-header .top-nav .qs-search-link__icon{
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
}

.qs-header .top-nav .qs-search-link__label{
  font-weight: 600;
}

.qs-header .top-nav .qs-search-link.is-active{
  background: rgba(0, 148, 255, 0.12);
  border-color: rgba(0, 148, 255, 0.24);
}

/* nav-form: shield gegen globale form{} Regeln */
.qs-header .top-nav .nav-form{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;

  margin: 0;
  padding: 0;

  width: auto;
  max-width: none;
  min-width: 0;
}

/* nav buttons */
.qs-header .top-nav .nav-form button{
  all: unset;
  cursor: pointer;

  font-family: inherit;
  font-size: 1rem;
  color: #003366;
  font-weight: 500;

  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;

  padding: 8px 12px;
  border-radius: 4px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.qs-header .top-nav .nav-form button:hover{
  background-color: rgba(0, 51, 102, 0.05);
  color: #0055a5;
}

/* ----------------------------- */
/* NOTIFICATION BUTTON           */
/* ----------------------------- */

.qs-header .qs-notif-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  border-radius: 999px;

  text-decoration: none;
  color: #003366;

  flex: 0 0 auto;
}

.qs-header .qs-notif-btn:hover{
  background-color: rgba(0, 51, 102, 0.05);
  color: #0055a5;
}

.qs-header .qs-notif-icon{
  width: 20px;
  height: 20px;
  display: block;
}
.qs-header .qs-notif-icon path{
  fill: currentColor;
}

.qs-header .qs-notif-badge{
  position: absolute;
  top: -3px;
  right: -3px;

  min-width: 18px;
  height: 18px;
  padding: 0 5px;

  border-radius: 999px;
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;

  background: #2d89ef;
  color: #fff;
  text-align: center;
}

/* ----------------------------- */
/* PROFILE BUTTON + DROPDOWN     */
/* ----------------------------- */

.qs-header .profile-container{
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

/* Button */
.qs-header .profile-btn{
  box-sizing: border-box;

  width: 40px;
  height: 40px;
  padding: 0;

  border: 3px solid #003366;
  border-radius: 50%;
  overflow: hidden;

  background: #edf7ff;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s ease, transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);

  line-height: 0; /* verhindert Bild-baseline “Shift” */
}

/* Hover nur auf Geräten, die wirklich Hover haben (verhindert iOS “stuck hover”) */
@media (hover: hover) and (pointer: fine){
  .qs-header .profile-btn:hover{
    transform: scale(1.05);
    border-color: #0055a5;
    background: #003366;
  }
}

/* Wenn Menü offen ist: kein Scale (sonst Rect-Messung kann springen) */
.qs-header .profile-btn[aria-expanded="true"]{ transform: none; }

/* Profilbild hart “zentrieren” + gegen Fremd-CSS abschirmen */
.qs-header .profile-pic{
  width: 100% !important;
  height: 100% !important;
  display: block !important;

  object-fit: cover !important;
  object-position: 50% 50% !important;

  border-radius: 50% !important;

  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

/* Dropdown (Profilmenü) – fixed + wird per JS positioniert (clamp), damit es nie off-screen ist */
#profileDropdown{
  display: none;

  position: fixed;
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;

  background: #ffffff;
  border-radius: 12px;

  width: clamp(220px, 22vw, 320px);
  max-width: min(92vw, 320px);
  padding: 10px 10px;

  /* viele Menüpunkte => intern scrollen */
  max-height: min(60vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  z-index: 10050;

  transition: opacity 0.25s ease, transform 0.25s ease;
  opacity: 0;
  transform: translateY(-12px);

  pointer-events: none;

  /* falls JS es kurz in <body> verschiebt (Portal) */
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #003366;
}

#profileDropdown.show{
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#profileDropdown .dropdown-form{
  margin: 0;
  padding: 0;
}

#profileDropdown .dropdown-form button{
  width: 100%;
  padding: 10px 16px;

  background: #f4f6f8;
  border: none;
  text-align: left;

  font-size: 15px;
  color: #003366;
  font-weight: 500;

  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;

  border-radius: 8px;
  margin: 0 0 5px;
  display: block;
}

#profileDropdown .dropdown-form button:hover{
  background: #2d89ef;
  color: #fff;
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#profileDropdown:focus-within{
  outline: 2px solid #0055a5;
  outline-offset: 2px;
}

/* ===========================================================
   RESPONSIVE
=========================================================== */

@media (max-width: 1024px){
  .qs-header{ padding: 18px 30px; }

  .qs-header .brand-logo{ max-height: 32px; }
  .qs-header .brand-name{ font-size: 18px; }

  .qs-header .qs-header-right .top-nav{ gap: 16px; }
  .qs-header .top-nav a,
  .qs-header .top-nav .nav-form button{
    padding: 6px 10px;
    font-size: 0.95rem;
  }

  .qs-header .profile-btn{ width: 38px; height: 38px; }
  #profileDropdown{ width: 170px; }
  #profileDropdown .dropdown-form button{
    font-size: 14px;
    padding: 8px 14px;
  }
}

@media (max-width: 768px){
  .qs-header{ padding: 15px 20px; }

  .qs-header .brand-logo{ max-height: 28px; }
  .qs-header .brand-name{ font-size: 17px; }

  .qs-header .qs-header-right{ gap: 10px; }

  .qs-header .qs-header-right .top-nav{ gap: 12px; }
  .qs-header .top-nav a,
  .qs-header .top-nav .nav-form button{
    padding: 5px 8px;
    font-size: 0.9rem;
  }

  .qs-header .profile-btn{ width: 36px; height: 36px; }
  #profileDropdown{ width: 160px; }
  #profileDropdown .dropdown-form button{
    font-size: 14px;
    padding: 8px 12px;
    margin: 0 0 4px;
  }
}

@media (max-width: 640px){
  .qs-header .top-nav .qs-search-link__label{
    display: none;
  }

  .qs-header .top-nav .qs-search-link{
    min-width: 40px;
    padding-inline: 10px;
  }
}

@media (max-width: 480px){
  .qs-header{
    padding: 12px 12px;
    flex-wrap: nowrap;
  }

  .qs-header .brand-name{ display: none; }
  .qs-header .brand-logo{ max-height: 26px; }

  .qs-header .qs-header-right .top-nav{
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .qs-header .top-nav a,
  .qs-header .top-nav .nav-form button{
    padding: 4px 6px;
    font-size: 0.85rem;
  }

  .qs-header .qs-notif-btn{
    width: 36px;
    height: 36px;
  }

  .qs-header .profile-btn{
    width: 34px;
    height: 34px;
    border-width: 2px;
  }

  .qs-header .qs-header-right .qs-role-badge{
    font-size: 10px;
    padding: 4px 8px;
  }
}

@media (max-width: 360px){
  .qs-header .qs-header-right .qs-role-badge{ display: none; }
}

/* ----------------------------- */
/* PROFILE COMPLETENESS BANNER   */
/* ----------------------------- */
.qs-profile-banner{
  position: sticky;
  top: 72px;
  z-index: 9998;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #e6e6e6;
  background: #fff;
}

.qs-profile-banner__title{
  font-weight: 700;
  color: #003366;
  font-size: 14px;
}

.qs-profile-banner__next{
  font-size: 13px;
  color: #003366;
  opacity: 0.85;
}

.qs-profile-banner__bar{
  width: 260px;
  height: 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}

.qs-profile-banner__bar span{
  display: block;
  height: 100%;
  background: #2d89ef;
}

.qs-profile-banner__btn{
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 51, 102, 0.06);
  color: #003366;
  font-weight: 600;
}

.qs-profile-banner__btn:hover{
  background: rgba(0, 51, 102, 0.10);
}

/* ----------------------------- */
/* TOAST                         */
/* ----------------------------- */
#qsToast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 10000;
}

#qsToast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ===========================================================
   QS HEADER SHIELD – damit Seitencss nichts zerstört
=========================================================== */

.qs-header .top-nav .nav-form{
  max-width: none !important;
  width: auto !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* ===== Milestone 1: Shell/Header Polish ===== */
.qs-header {
  min-height: 72px;
  gap: 18px;
  padding: 16px 28px;
}

.qs-header .brand {
  gap: 14px;
}

.qs-header .brand-name {
  margin-left: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.qs-header .qs-header-right {
  gap: 14px;
}

.qs-header .top-nav {
  gap: 10px;
}

.qs-header .top-nav a,
.qs-header .top-nav .nav-form button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 650;
}

.qs-header--public .top-nav a,
.qs-header--public .top-nav .qs-search-link {
  border: 1px solid rgba(0, 51, 102, 0.10);
  background: rgba(255, 255, 255, 0.88);
}

.qs-header--public .top-nav a.is-active,
.qs-header--public .top-nav .qs-search-link.is-active {
  background: rgba(0, 51, 102, 0.08);
  border-color: rgba(0, 51, 102, 0.16);
  color: #003366;
}

.qs-header--public .top-nav .qs-nav-link--cta {
  background: rgba(0, 148, 255, 0.08);
  border-color: rgba(0, 148, 255, 0.20);
}

.qs-header--app .top-nav .nav-link {
  border: 1px solid transparent;
  background: transparent;
}

.qs-header--app .top-nav .nav-link.is-active {
  background: rgba(0, 51, 102, 0.08);
  border-color: rgba(0, 51, 102, 0.10);
}

.qs-header--app .top-nav .qs-search-link,
.qs-header--app .qs-notif-btn {
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(0, 51, 102, 0.10);
  background: rgba(0, 51, 102, 0.03);
}

.qs-header--app .top-nav .qs-search-link:hover,
.qs-header--app .qs-notif-btn:hover,
.qs-header--app .qs-notif-btn.is-active {
  background: rgba(0, 148, 255, 0.12);
  border-color: rgba(0, 148, 255, 0.20);
}

html.qs-has-app-bottomnav .qs-header--app {
  width: calc(100% + var(--qs-shell-offset, 0px));
  margin-left: calc(var(--qs-shell-offset, 0px) * -1);
  padding-left: calc(var(--qs-shell-offset, 0px) + 28px);
}

.dropdown-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(0, 51, 102, 0.08);
}

.dropdown-summary__avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(0, 51, 102, 0.12);
  background: rgba(0, 148, 255, 0.06);
}

.dropdown-summary__copy {
  min-width: 0;
}

.dropdown-summary__title {
  font-size: 15px;
  font-weight: 750;
  color: #003366;
  line-height: 1.2;
}

.dropdown-summary__sub {
  margin-top: 3px;
  font-size: 12px;
  color: #667085;
  line-height: 1.35;
}

#profileDropdown {
  width: clamp(240px, 24vw, 320px);
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(0, 51, 102, 0.10);
  box-shadow: 0 18px 40px rgba(0, 24, 58, 0.16);
}

#profileDropdown .dropdown-link,
#profileDropdown .dropdown-form button {
  min-height: 44px;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  color: #003366;
}

#profileDropdown .dropdown-link {
  text-decoration: none;
}

#profileDropdown .dropdown-link:hover,
#profileDropdown .dropdown-form button:hover {
  background: rgba(0, 148, 255, 0.10);
  color: #003366;
  box-shadow: none;
}

#profileDropdown .dropdown-form button {
  margin: 0;
  background: rgba(0, 51, 102, 0.04);
}

#profileDropdown .dropdown-sep {
  margin: 8px 6px;
  background: rgba(0, 51, 102, 0.08);
}

@media (min-width: 1000px) {
  html.qs-has-app-bottomnav .qs-header--app {
    padding-right: 30px;
  }
}

@media (max-width: 768px) {
  .qs-header {
    padding: 14px 18px;
    gap: 12px;
  }

  .qs-header .top-nav {
    gap: 8px;
  }

  .qs-header .top-nav a,
  .qs-header .top-nav .nav-form button {
    min-height: 38px;
    padding: 0 12px;
  }

  #profileDropdown {
    width: min(88vw, 300px);
  }

  .dropdown-summary__sub {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .qs-header .brand-name {
    display: none;
  }

  .qs-header .top-nav .qs-search-link,
  .qs-header .qs-notif-btn,
  .qs-header .profile-btn {
    width: 38px;
    height: 38px;
  }

  .qs-header .top-nav a,
  .qs-header .top-nav .nav-form button {
    min-height: 36px;
    padding: 0 10px;
  }
}


/* ===== Milestone 1 refresh: shell / header / landing coherence ===== */
.qs-header {
  min-height: 78px;
  gap: 20px;
  padding: 16px 28px;
}

.qs-header .brand {
  min-width: 0;
  gap: 14px;
}

.qs-header .brand-name {
  margin-left: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.qs-header .qs-header-right {
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.qs-header .qs-role-badge {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0, 51, 102, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.qs-header .top-nav {
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}

.qs-header .top-nav a,
.qs-header .top-nav .nav-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.qs-header .top-nav a.is-active,
.qs-header .top-nav .nav-form button.is-active {
  border-color: rgba(0, 51, 102, 0.10);
  box-shadow: 0 8px 18px rgba(0, 51, 102, 0.06);
}

.qs-header .top-nav .qs-search-link {
  min-width: 44px;
  padding: 0 14px;
  border-radius: 999px;
}

.qs-header .top-nav .qs-search-link__label {
  line-height: 1;
}

.qs-header .qs-notif-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 51, 102, 0.10);
  background: rgba(0, 51, 102, 0.03);
  box-shadow: 0 6px 16px rgba(0, 51, 102, 0.06);
}

.qs-header .qs-notif-btn.is-active,
.qs-header .qs-notif-btn:hover {
  background: rgba(0, 148, 255, 0.10);
  border-color: rgba(0, 148, 255, 0.18);
  color: #003366;
}

.qs-header .profile-btn {
  width: 44px;
  height: 44px;
  border-width: 2px;
  box-shadow: 0 8px 18px rgba(0, 51, 102, 0.10);
}

.qs-header .profile-btn[aria-expanded="true"] {
  border-color: rgba(0, 148, 255, 0.46);
  background: rgba(0, 148, 255, 0.08);
}

.qs-header--public,
.qs-header--landing {
  background: rgba(255,255,255,0.98);
}

.qs-header--public .top-nav a,
.qs-header--landing .top-nav a {
  background: rgba(255,255,255,0.92);
  border-color: rgba(0, 51, 102, 0.10);
}

.qs-header--public .top-nav a.is-active,
.qs-header--landing .top-nav a.is-active {
  background: rgba(0, 51, 102, 0.08);
  border-color: rgba(0, 51, 102, 0.14);
}

.qs-header--public .top-nav .qs-nav-link--cta {
  background: rgba(0, 148, 255, 0.08);
  border-color: rgba(0, 148, 255, 0.20);
}

.qs-header--landing {
  box-shadow: 0 8px 22px rgba(0, 29, 61, 0.06);
}

.qs-header--app .top-nav .nav-link {
  background: transparent;
}

.qs-header--app .top-nav .nav-link.is-active {
  background: rgba(0, 51, 102, 0.08);
}

html.qs-has-app-bottomnav .qs-header.qs-header--app,
html.qs-has-app-bottomnav .qs-header.qs-header--landing {
  width: calc(100% + var(--qs-shell-offset, 0px));
  margin-left: calc(var(--qs-shell-offset, 0px) * -1);
  padding-left: calc(var(--qs-shell-offset, 0px) + 26px);
  padding-right: 26px;
}

html.qs-has-app-bottomnav .qs-header.qs-header--landing {
  width: 100%;
  margin-left: 0;
  padding-left: 26px;
}

#profileDropdown {
  width: clamp(250px, 24vw, 330px);
  border-radius: 20px;
  border: 1px solid rgba(0, 51, 102, 0.10);
  box-shadow: 0 24px 46px rgba(0, 24, 58, 0.16);
  padding: 12px;
}

#profileDropdown .dropdown-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(0, 51, 102, 0.08);
}

#profileDropdown .dropdown-summary__avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(0, 51, 102, 0.10);
}

#profileDropdown .dropdown-summary__title {
  font-size: 15px;
  font-weight: 760;
  line-height: 1.25;
}

#profileDropdown .dropdown-summary__sub {
  margin-top: 3px;
  font-size: 12px;
  color: #667085;
}

#profileDropdown .dropdown-link,
#profileDropdown .dropdown-form button {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  width: 100%;
  border-radius: 14px;
}

@media (max-width: 1100px) {
  .qs-header {
    padding: 14px 20px;
  }

  .qs-header .brand-name {
    font-size: 18px;
  }

  .qs-header .top-nav {
    gap: 8px;
  }

  .qs-header .top-nav a,
  .qs-header .top-nav .nav-form button {
    min-height: 40px;
    padding: 0 13px;
  }

  .qs-header .qs-role-badge {
    display: none;
  }
}

@media (max-width: 768px) {
  .qs-header {
    min-height: 68px;
    padding: 12px 14px;
    gap: 12px;
  }

  .qs-header .brand {
    gap: 10px;
  }

  .qs-header .brand-name {
    font-size: 18px;
  }

  .qs-header .qs-header-right {
    gap: 8px;
  }

  .qs-header .top-nav {
    gap: 8px;
  }

  .qs-header .top-nav a,
  .qs-header .top-nav .nav-form button {
    min-height: 38px;
    padding: 0 11px;
  }

  .qs-header .qs-notif-btn,
  .qs-header .profile-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 560px) {
  .qs-header .brand-name {
    display: none;
  }

  .qs-header .top-nav .nav-link {
    padding-inline: 12px;
  }

  #profileDropdown {
    width: min(88vw, 320px);
  }
}


/* ===== Milestone 1 final shell pass ===== */
.qs-header {
  position: relative;
  gap: 16px;
}

.qs-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #003366;
  flex: 0 0 auto;
}

.qs-header .brand-logo {
  height: 42px;
}

.qs-header .qs-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.qs-header .top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.qs-header .top-nav a,
.qs-header .top-nav .nav-form button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
}

.qs-header--app .top-nav .nav-link {
  border: 1px solid rgba(0, 51, 102, 0.10);
  background: rgba(255, 255, 255, 0.92);
}

.qs-header--app .top-nav .nav-link:hover,
.qs-header--app .top-nav .nav-link.is-active {
  border-color: rgba(0, 51, 102, 0.14);
  background: rgba(0, 51, 102, 0.08);
  box-shadow: 0 8px 18px rgba(0, 51, 102, 0.06);
}

.qs-header--app .top-nav .qs-search-link {
  width: auto !important;
  min-width: 44px !important;
  height: 44px;
  padding: 0 14px 0 12px !important;
  border-radius: 999px;
  border: 1px solid rgba(0, 51, 102, 0.10);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(0, 51, 102, 0.06);
}

.qs-header--app .top-nav .qs-search-link:hover,
.qs-header--app .top-nav .qs-search-link.is-active {
  border-color: rgba(0, 148, 255, 0.22);
  background: rgba(0, 148, 255, 0.08);
}

.qs-header--app .top-nav .qs-search-link__icon {
  width: 18px;
  height: 18px;
}

.qs-header--app .top-nav .qs-search-link__label {
  display: inline-block;
  line-height: 1;
  font-weight: 700;
}

.qs-header .qs-notif-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 51, 102, 0.10);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(0, 51, 102, 0.06);
}

.qs-header .qs-notif-btn:hover,
.qs-header .qs-notif-btn.is-active {
  border-color: rgba(0, 148, 255, 0.22);
  background: rgba(0, 148, 255, 0.08);
}

.qs-header .profile-btn {
  width: 44px !important;
  height: 44px !important;
  border: 1px solid rgba(0, 51, 102, 0.16);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 51, 102, 0.10);
}

.qs-header .profile-btn:hover,
.qs-header .profile-btn[aria-expanded="true"] {
  border-color: rgba(0, 148, 255, 0.28);
  background: rgba(0, 148, 255, 0.08);
}

html.qs-has-app-bottomnav .qs-header.qs-header--app {
  width: calc(100% + var(--qs-shell-offset, 0px));
  margin-left: calc(var(--qs-shell-offset, 0px) * -1);
  padding-left: 18px;
  padding-right: 18px;
}

#profileDropdown {
  width: clamp(252px, 24vw, 340px);
  border-radius: 24px;
  border: 1px solid rgba(0, 51, 102, 0.10);
  box-shadow: 0 26px 50px rgba(0, 24, 58, 0.18);
  padding: 12px;
  overflow-x: hidden;
}

#profileDropdown .dropdown-summary {
  padding: 4px 6px 12px;
  margin-bottom: 8px;
}

#profileDropdown .dropdown-link,
#profileDropdown .dropdown-form button {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  margin: 0 0 2px;
  text-decoration: none;
  font-weight: 700;
}

#profileDropdown .dropdown-link:hover,
#profileDropdown .dropdown-link:focus-visible,
#profileDropdown .dropdown-form button:hover,
#profileDropdown .dropdown-form button:focus-visible {
  background: rgba(0, 148, 255, 0.10);
  outline: none;
}

#profileDropdown .dropdown-form button {
  background: rgba(0, 51, 102, 0.04);
}

#profileDropdown .dropdown-sep {
  margin: 8px 6px 10px;
}

@media (min-width: 1000px) {
  html.qs-has-app-bottomnav .qs-header.qs-header--app {
    padding-left: 20px;
    padding-right: 22px;
  }
}

@media (max-width: 1100px) {
  .qs-header .top-nav {
    gap: 8px;
  }

  .qs-header .top-nav a,
  .qs-header .top-nav .nav-form button {
    padding: 0 14px;
  }
}

@media (max-width: 880px) {
  .qs-header--app .top-nav .qs-search-link__label {
    display: none;
  }

  .qs-header--app .top-nav .qs-search-link {
    padding: 0 12px !important;
  }
}

@media (max-width: 768px) {
  .qs-header {
    min-height: 70px;
    padding: 12px 14px;
  }

  .qs-header .qs-notif-btn,
  .qs-header .profile-btn {
    width: 40px !important;
    height: 40px !important;
  }

  #profileDropdown {
    width: min(86vw, 320px);
  }
}


/* ===== Milestone: Public Landing vs Hub ===== */
.qs-header--landing {
  padding: 18px 28px;
  background: rgba(255,255,255,0.98);
}

.qs-header--landing .qs-header-right {
  gap: 12px;
}

.qs-header--landing .qs-role-badge {
  background: rgba(0, 148, 255, 0.08);
  color: #003366;
}

.qs-header--landing .top-nav {
  gap: 12px;
}

.qs-header--landing .top-nav .nav-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
}

.qs-header--landing .top-nav.qs-top-nav--landing-preview .nav-link.is-active {
  background: rgba(0, 51, 102, 0.08);
  border-color: rgba(0, 51, 102, 0.12);
}

@media (max-width: 720px) {
  .qs-header--landing {
    padding: 14px 18px;
  }

  .qs-header--landing .qs-header-right {
    gap: 8px;
  }

  .qs-header--landing .top-nav.qs-top-nav--landing-preview .nav-link {
    min-height: 38px;
    padding: 0 14px;
  }
}


/* ===== Milestone B2: Header rechts & globale Controls ===== */
.qs-header .profile-container{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.qs-header .qs-notif-btn,
.qs-header .profile-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(0, 51, 102, 0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,249,253,0.95));
  color: #003366;
  box-shadow: 0 10px 24px rgba(0, 51, 102, 0.08);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.qs-header .qs-notif-btn{
  overflow: visible;
}

.qs-header .qs-notif-btn .qs-notif-icon{
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.96;
}

.qs-header .qs-notif-btn .qs-notif-icon path{
  fill: currentColor;
}

.qs-header .qs-notif-btn::before,
.qs-header .profile-btn::before{
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.qs-header .qs-notif-btn > *,
.qs-header .profile-btn > *{
  position: relative;
  z-index: 1;
}

.qs-header .qs-notif-btn:hover,
.qs-header .qs-notif-btn.is-active,
.qs-header .qs-notif-btn[aria-expanded="true"],
.qs-header .profile-btn:hover,
.qs-header .profile-btn[aria-expanded="true"]{
  color: #003366;
  border-color: rgba(0, 148, 255, 0.24);
  background: linear-gradient(180deg, rgba(244,250,255,0.98), rgba(226,241,255,0.96));
  box-shadow: 0 14px 28px rgba(0, 51, 102, 0.12);
}

.qs-header .qs-notif-btn:active,
.qs-header .profile-btn:active{
  transform: translateY(1px);
}

.qs-header .qs-notif-btn:focus-visible,
.qs-header .profile-btn:focus-visible{
  outline: 2px solid rgba(0, 85, 165, 0.38);
  outline-offset: 2px;
}

.qs-header .qs-notif-badge{
  top: -2px;
  right: -2px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(45, 137, 239, 0.28);
}

.qs-header .profile-btn{
  overflow: hidden;
  padding: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(237,247,255,0.96));
}

.qs-header .profile-btn::after{
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.82);
  pointer-events: none;
}

.qs-header .profile-pic{
  position: relative;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: 50% 50% !important;
  background: rgba(0, 51, 102, 0.04);
}

.qs-header .profile-btn[aria-expanded="true"]{
  border-color: rgba(0, 148, 255, 0.30);
  box-shadow: 0 16px 32px rgba(0, 51, 102, 0.14);
}

@media (hover: hover) and (pointer: fine){
  .qs-header .qs-notif-btn:hover,
  .qs-header .profile-btn:hover{
    transform: translateY(-1px);
  }
}

@media (max-width: 768px){
  .qs-header .qs-notif-btn,
  .qs-header .profile-btn{
    width: 40px;
    height: 40px;
  }

  .qs-header .qs-notif-btn .qs-notif-icon{
    width: 17px;
    height: 17px;
  }
}


/* ===== Milestone B3: Logged-in Landing Preview ===== */
.qs-header--landing .top-nav.qs-top-nav--landing-preview {
  gap: 10px;
}

.qs-header--landing .top-nav.qs-top-nav--landing-preview .qs-nav-context-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 51, 102, 0.08);
  background: rgba(0, 51, 102, 0.04);
  color: #33506f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.qs-header--landing .top-nav.qs-top-nav--landing-preview .qs-nav-link--cta {
  box-shadow: 0 10px 20px rgba(0, 51, 102, 0.08);
}

@media (max-width: 880px) {
  .qs-header--landing .top-nav.qs-top-nav--landing-preview .qs-nav-context-pill {
    display: none;
  }
}

@media (max-width: 720px) {
  .qs-header--landing .top-nav.qs-top-nav--landing-preview {
    gap: 8px;
  }

  .qs-header--landing .top-nav.qs-top-nav--landing-preview .qs-nav-link--cta {
    min-height: 38px;
    padding: 0 14px;
  }
}


/* ============================= */
/* C1 – APP SHELL STABILIZATION  */
/* ============================= */

:root{
  --qs-header-h: 78px;
}

html{
  scrollbar-gutter: stable;
}

body{
  padding-top: calc(var(--qs-header-h, 78px) + var(--qs-safe-top, 0px));
}

.qs-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  min-height: var(--qs-header-h, 78px);
  padding: 16px 22px;
  overflow: visible;
  contain: none;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.qs-header .brand{
  min-width: 0;
  gap: 14px;
}

.qs-header .brand-name{
  margin-left: 0;
}

.qs-header .qs-header-right{
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.qs-profile-banner{
  top: calc(var(--qs-header-h, 78px) + 8px);
}

html.qs-has-app-bottomnav .qs-header.qs-header--app,
html.qs-has-app-bottomnav .qs-header.qs-header--landing,
html.qs-has-app-bottomnav .qs-header--app,
html.qs-has-app-bottomnav .qs-header--landing{
  width: 100% !important;
  margin-left: 0 !important;
  padding-left: 22px !important;
  padding-right: 22px !important;
}

@media (min-width: 1000px){
  .qs-header{
    padding: 16px 28px;
  }

  html.qs-has-app-bottomnav .qs-header.qs-header--app,
  html.qs-has-app-bottomnav .qs-header.qs-header--landing,
  html.qs-has-app-bottomnav .qs-header--app,
  html.qs-has-app-bottomnav .qs-header--landing{
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
}

@media (max-width: 768px){
  :root{
    --qs-header-h: 72px;
  }

  .qs-header{
    padding: 14px 18px;
  }
}

@media (max-width: 560px){
  :root{
    --qs-header-h: 68px;
  }

  .qs-header{
    padding: 12px 14px;
  }
}


/* ===== D3 final shell lock ===== */
html{
  scrollbar-gutter: stable;
}

body{
  margin: 0;
  padding-top: calc(var(--qs-header-h, 78px) + var(--qs-safe-top, 0px));
}

.qs-header{
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: none;
}

html.qs-has-app-bottomnav .qs-header.qs-header--app,
html.qs-has-app-bottomnav .qs-header.qs-header--landing{
  padding-left: 22px !important;
  padding-right: 22px !important;
}

@media (min-width: 1000px){
  html.qs-has-app-bottomnav .qs-header.qs-header--app,
  html.qs-has-app-bottomnav .qs-header.qs-header--landing{
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
}


/* ===== E3 retry – definitive shell/header lock (current ZIP scope only) ===== */
html{
  scrollbar-gutter: stable;
}

body{
  margin: 0;
  padding-top: calc(var(--qs-header-h, 78px) + var(--qs-safe-top, 0px));
}

.qs-header{
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: none;
}

html.qs-has-app-bottomnav .qs-header.qs-header--app,
html.qs-has-app-bottomnav .qs-header.qs-header--landing{
  padding-left: 22px !important;
  padding-right: 22px !important;
}

@media (min-width: 1000px){
  html.qs-has-app-bottomnav .qs-header.qs-header--app,
  html.qs-has-app-bottomnav .qs-header.qs-header--landing{
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
}


/* ===== Milestone B1: public desktop shell hygiene ===== */
.qs-header .top-nav .qs-nav-link--desktop-only,
.qs-header .top-nav .qs-search-link--desktop-utility{
  display:none;
}

@media (min-width: 1000px){
  .qs-header--public .top-nav,
  .qs-header--landing .top-nav{
    gap:12px;
  }

  .qs-header--public .top-nav .qs-nav-link--desktop-only,
  .qs-header--public .top-nav .qs-search-link--desktop-utility{
    display:inline-flex;
  }

  .qs-header--public .top-nav .qs-search-link--desktop-utility{
    width:auto;
    min-width:44px;
    height:44px;
    padding:0 14px 0 12px;
    border-radius:999px;
    background:rgba(255,255,255,0.92);
    border:1px solid rgba(0, 51, 102, 0.10);
    box-shadow:0 8px 18px rgba(0, 51, 102, 0.06);
  }

  .qs-header--public .top-nav .qs-search-link--desktop-utility:hover,
  .qs-header--public .top-nav .qs-search-link--desktop-utility.is-active,
  .qs-header--public .top-nav .qs-nav-link--desktop-only:hover,
  .qs-header--public .top-nav .qs-nav-link--desktop-only.is-active{
    border-color:rgba(0, 51, 102, 0.14);
    background:rgba(0, 51, 102, 0.08);
  }
}
