/* Header navigation stays above workspace controls, below dialogs. */
.profile-menu-panel[hidden], .mobile-workspace-nav[hidden] { display: none; }
.mobile-workspace-nav, .account-menu-close, .account-menu-mobile-link { display: none; }
.profile-menu-panel { max-width: calc(100vw - 32px); }
.profile-menu-panel strong { overflow-wrap: anywhere; }
.profile-menu-panel .menu-button { display: flex; align-items: center; justify-content: space-between; text-decoration: none; }
.profile-menu-panel .menu-button[aria-current="page"] { color: #a73721; background: var(--accent-tint); }
.account-menu-count { padding: 2px 6px; border-radius: 5px; background: var(--surface-soft); font-size: 11px; }

@media (max-width: 700px) {
  body.signed-in .site-header { position: sticky; top: 0; z-index: 40; }
  body.dashboard-view .site-header { min-height: 64px; padding: 10px 16px; gap: 12px; grid-template-columns: minmax(0, 1fr) auto; }
  body.dashboard-view .site-header .brand { gap: 7px; min-width: 0; }
  body.dashboard-view .user-pill { gap: 10px; min-width: 0; }
  body.dashboard-view .user-pill > .plan-badge, body.dashboard-view #userName { display: none; }
  .profile-avatar, .site-header .app-notification-button { width: 44px; height: 44px; min-height: 44px; flex-shrink: 0; }
  .profile-menu-panel {
    top: calc(100% + 10px); right: 0; width: min(288px, calc(100vw - 32px));
    min-width: 0; max-height: calc(100dvh - 88px - env(safe-area-inset-bottom));
    overflow-y: auto; overscroll-behavior: contain; gap: 3px; padding: 10px;
    border-radius: 12px; box-shadow: 0 12px 36px #16171924;
  }
  .profile-menu-panel > strong { min-height: 44px; padding: 10px 44px 14px 10px; font-size: 13px; line-height: 1.5; }
  .account-menu-close { display: grid; place-items: center; position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font: 26px/1 var(--font-main); cursor: pointer; }
  .mobile-workspace-nav:not([hidden]) { display: grid; gap: 3px; border-bottom: 1px solid var(--border); padding-bottom: 9px; margin-bottom: 6px; }
  .account-menu-label { padding: 8px 10px 3px; color: var(--muted); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
  .profile-menu-panel .menu-button { min-height: 44px; width: 100%; padding: 10px; font-size: 14px; line-height: 1.4; white-space: normal; }
  .profile-menu-panel .account-menu-mobile-link { display: flex; }
  body.builder-mobile-navigation .app-sidebar { display: none; }
  body.builder-mobile-navigation .byndro-builder-shell { display: block; }
  body.builder-leads-view .app-topbar { flex-direction: row; flex-wrap: nowrap; align-items: center; }
  body.builder-leads-view .app-topbar > div:first-child { min-width: 0; }
  body.builder-leads-view .app-top-actions { display: none; }
}
