:root {
  --mp-header-bg: var(--neutral-900, #0b1020);
  --mp-header-fg: var(--mist-050, #f4f7ff);
  --mp-header-border: var(--neutral-700, #252b41);
  --mp-drawer-bg: color-mix(in srgb, var(--neutral-900, #0b1020) 94%, transparent);
  --mp-drawer-border: var(--mist-200, #cfd5ea);
  --mp-drawer-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  --mp-link-hover: var(--mist-200, #cfd5ea);
}

.mp-shared-header {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px;
  background: var(--mp-header-bg);
  color: var(--mp-header-fg);
  border-bottom: 1px solid var(--mp-header-border);
  backdrop-filter: blur(18px);
}

.mp-shared-header .logo,
.mp-shared-header .logo-40 {
  display: inline-flex;
  align-items: center;
}

.mp-shared-header .logo img,
.mp-shared-header .logo-40 img {
  width: 40px;
  height: 40px;
}

.mp-header-title-block {
  display: flex;
  flex: 1;
  flex-direction: column;
  /* gap: 2px; */
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.mp-header-title-block .title,
.mp-header-title-block .heading-xl,
.mp-header-title-block h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: inherit;
}

.mp-header-subtitle {
  margin: 0;
  color: var(--mist-300, #aebbf3);
  font-size: 0.95rem;
}

.mp-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-left: auto;
}

.mp-burger {
  background: transparent;
  border: 1px solid var(--mist-300, #aebbf3);
  color: inherit;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
}

.mp-burger:focus-visible {
  outline: 2px solid var(--mist-100, #ccd5ff);
  outline-offset: 2px;
}

.mp-shared-drawer {
  display: none;
  position: fixed;
  top: calc(var(--mp-header-height, 64px) - 6px);
  right: 12px;
  min-width: 240px;
  padding: 12px;
  border-radius: 16px;
  background: var(--mp-drawer-bg);
  border: 1px solid var(--mp-drawer-border);
  box-shadow: var(--mp-drawer-shadow);
  z-index: 140;
  max-height: calc(100vh - var(--mp-header-height, 64px) - 16px);
  overflow: auto;
  margin-top: 0;
}

.mp-menu-list {
  display: grid;
  gap: 4px;
}

.mp-menu-section {
  background: color-mix(in srgb, var(--mp-header-bg) 86%, transparent);
  border: 1px solid color-mix(in srgb, var(--mp-drawer-border) 60%, transparent);
  border-radius: 12px;
  padding: 4px;
}

.mp-menu-section + .mp-menu-section {
  margin-top: 8px;
}

.mp-menu-toggle {
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  color: inherit;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.mp-menu-section__title {
  margin: 0;
  font-size: 0.95rem;
  color: var(--mist-200, #d9e1ff);
  font-weight: 700;
}

.mp-menu-chevron {
  transition: transform 140ms ease;
}

.mp-menu-section.is-open .mp-menu-chevron {
  transform: rotate(180deg);
}

.mp-menu-content {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 0 6px 6px;
}

.mp-menu-content[hidden] {
  display: none !important;
}

.mp-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--mp-header-fg);
  font-weight: 600;
}

.mp-menu-link:hover,
.mp-menu-link:focus-visible {
  background: color-mix(in srgb, var(--mp-link-hover) 22%, transparent);
  outline: none;
}

.mp-menu-link[data-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Minimal Overlay Styles (für Login-Overlay in Apps) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(80, 80, 80, 0.35);
  backdrop-filter: blur(1px);
}

.modal-panel {
  position: relative;
  width: min(920px, calc(100vw - 24px));
  height: min(780px, calc(100vh - 24px));
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
}

.modal-iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .mp-shared-header {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 12px 14px;
  }

  .mp-shared-header .logo img {
    width: 42px;
    height: 42px;
  }
}
