/* ═══════════════════════════════════════════════════════════════
   VIVEREA — App Shell Navigation (Single Source of Truth)
   Struktur: nav > logo | .v-nav-viewport-center | .v-nav-right
   Nav-Mittelpunkt = exakt 50 % der Header-/Viewport-Breite
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Header: volle Breite, Positionierungskontext ── */
html[data-theme="light"] body > nav:first-of-type,
html[data-theme="dark"] body > nav:first-of-type,
body > nav:first-of-type,
body > nav:first-of-type.v-app-shell-nav {
  position: sticky !important;
  top: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  z-index: 200 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* ── 2. Logo: unabhängig links, keine Trennlinie ── */
html body > nav:first-of-type > .v-nav-logo,
html body > nav:first-of-type > a.v-nav-logo {
  position: absolute !important;
  left: max(0px, calc((100% - 1400px) / 2)) !important;
  top: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 72px !important;
  padding: 0 0.75rem 0 1rem !important;
  margin: 0 !important;
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  z-index: 2 !important;
  flex: none !important;
}

html body > nav:first-of-type > .v-nav-logo::before,
html body > nav:first-of-type > .v-nav-logo::after,
html body > nav:first-of-type > a.v-nav-logo::before,
html body > nav:first-of-type > a.v-nav-logo::after {
  display: none !important;
  content: none !important;
}

html body > nav:first-of-type > .v-nav-logo img,
html body > nav:first-of-type > a.v-nav-logo img.v-nav-logo-img,
html body > nav:first-of-type > a.v-nav-logo img[alt="VIVEREA"] {
  display: block !important;
  visibility: visible !important;
  width: auto !important;
  height: 52px !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  opacity: 1 !important;
  filter: brightness(0) opacity(0.87) !important;
  object-fit: contain !important;
}

/* ── 3. Nav-Wrapper: exakt viewport-zentriert (direktes Nav-Kind) ── */
html body > nav:first-of-type > .v-nav-viewport-center {
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  max-width: calc(100vw - 16rem) !important;
  height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 1 !important;
  pointer-events: auto !important;
  box-sizing: border-box !important;
}

html body > nav:first-of-type > .v-nav-viewport-center > .v-nav-center {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
  width: max-content !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
}

html body > nav:first-of-type > .v-nav-viewport-center > .v-nav-center::-webkit-scrollbar {
  display: none !important;
}

/* ── 4. Nav-Items ── */
html body > nav:first-of-type .v-nav-item {
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  height: 72px !important;
  padding: 0 0.875rem !important;
  margin: 0 !important;
  font-family: Inter, system-ui, -apple-system, sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  color: #6b7280 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  border-bottom: 2px solid transparent !important;
  box-sizing: border-box !important;
  transition: color 0.15s ease, border-color 0.15s ease !important;
}

html body > nav:first-of-type .v-nav-item:hover {
  color: #1f2937 !important;
}

html body > nav:first-of-type .v-nav-item.active {
  color: #2997ff !important;
  font-weight: 500 !important;
  border-bottom-color: #2997ff !important;
}

/* ── 5. Profil: unabhängig rechts ── */
html body > nav:first-of-type > .v-nav-right {
  position: absolute !important;
  right: 1.5rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  pointer-events: none !important;
  z-index: 2 !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: none !important;
}

html body > nav:first-of-type > .v-nav-right a,
html body > nav:first-of-type > .v-nav-right button {
  pointer-events: auto !important;
}

@media (max-width: 1023px) {
  html body > nav:first-of-type > .v-nav-viewport-center {
    display: none !important;
  }
}

@media (max-width: 768px) {
  html body > nav:first-of-type,
  html body > nav:first-of-type > .v-nav-viewport-center > .v-nav-center,
  html body > nav:first-of-type .v-nav-item {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
  }

  html body > nav:first-of-type > .v-nav-logo,
  html body > nav:first-of-type > a.v-nav-logo {
    left: 0 !important;
    width: 108px !important;
    min-width: 108px !important;
    max-width: 108px !important;
    height: 60px !important;
  }

  html body > nav:first-of-type > .v-nav-right {
    right: 1rem !important;
  }

  html body > nav:first-of-type > .v-nav-logo img,
  html body > nav:first-of-type > a.v-nav-logo img[alt="VIVEREA"] {
    height: 44px !important;
  }
}

[data-theme="dark"] html body > nav:first-of-type > .v-nav-logo img,
[data-theme="dark"] html body > nav:first-of-type > a.v-nav-logo img[alt="VIVEREA"] {
  filter: brightness(0) invert(1) opacity(0.92) !important;
}

@media (min-width: 1024px) and (max-width: 1440px) {
  html body > nav:first-of-type .v-nav-item {
    padding: 0 0.875rem !important;
    font-size: 0.875rem !important;
  }
}
