/* Shared header contract with FotoCRM. Complete existing menu dialog is reused. */
.navbar {
  box-sizing: border-box; height: 64px; min-height: 64px;
  flex-wrap: nowrap; padding-block: 8px;
  border: 0; border-bottom: 1px solid #343b43;
}
.header-menu-toggle { display: none; }
@media (min-width: 1240px) {
  .navbar > nav {
    order: 0; flex: 1 1 auto; flex-wrap: nowrap; min-width: 0;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  }
  .navbar > nav::-webkit-scrollbar { display: none; }
  .navbar > nav > a, .navbar > nav > .menue { flex-shrink: 0; }
  .navbar > nav .menue-liste { position: fixed; width: min(320px, calc(100vw - 24px)); }
}
@media (min-width: 761px) and (max-width: 1239.98px) {
  .navbar > nav { display: none; }
  .navbar .brand { order: 0; flex-shrink: 0; }
  .navbar .wer { order: 1; margin-left: auto; flex-shrink: 0; }
  .navbar .header-menu-toggle {
    order: 2; display: inline-grid; place-items: center; flex-shrink: 0;
    width: 44px; height: 44px; min-height: 44px; padding: 0;
    color: var(--header-fg); border: 1px solid #65717d; border-radius: 6px;
    background: transparent; font: inherit; font-size: 20px; cursor: pointer;
  }
  .navbar .header-menu-toggle:hover { background: #3c444e; }
  .menue-blatt {
    display: block; position: fixed; inset: auto 0 0; margin: 0 auto;
    width: min(640px,100%); max-width: 100%; max-height: 85dvh; padding: 0;
    border: 0; border-radius: 12px 12px 0 0; background: var(--bg-surface);
    color: var(--text-primary); box-shadow: var(--shadow-md); overflow: auto;
  }
  .menue-blatt:not([open]) { display: none; }
  .menue-blatt::backdrop { background: #0007; }
  .menue-blatt-kopf { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 6px; }
  .menue-blatt-kopf button { min-width: 44px; min-height: 44px; }
  .menue-blatt-liste { display: grid; padding: 4px 8px 16px; }
  .menue-blatt-liste a, .menue-blatt-abmelden {
    display: flex; align-items: center; gap: 12px; min-height: 44px;
    padding: 8px 12px; border: 0; border-radius: 8px; background: transparent;
    color: var(--text-primary); font: inherit; font-size: 14px; text-align: left;
    cursor: pointer; text-decoration: none;
  }
  .menue-blatt-liste a.active { background: var(--accent-soft); color: var(--accent); }
  .menue-blatt-liste i { width: 20px; text-align: center; }
  .menue-blatt-gruppe { margin: 12px 12px 2px; font-size: 11px; font-weight: 500; color: var(--text-secondary); }
}
@media (max-width: 760px) {
  .navbar { height: 60px; min-height: 60px; padding-block: 6px; }
}

/* Equal page gutter for short and long pages, following FinScope native scrollbars. */
html { scrollbar-gutter: stable; }
