/* GlowAuth mobile header/menu layout correction.
   Keep Shop and Menu in separate named grid areas so their contents cannot overlap. */
@media (max-width: 700px) {
  .dashboard-header.topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    grid-template-areas:
      "brand shop menu"
      "actions actions actions" !important;
    align-items: center !important;
    column-gap: 7px !important;
    row-gap: 9px !important;
  }

  .dashboard-header > .brand-link {
    grid-area: brand !important;
    grid-column: auto !important;
    grid-row: auto !important;
    min-width: 0 !important;
    max-width: 100%;
  }

  .dashboard-header > .brand-link .brand-copy {
    min-width: 0 !important;
    overflow: hidden;
  }

  .dashboard-header > .brand-link .brand-copy strong {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .dashboard-header > #openShopHeaderButton {
    grid-area: shop !important;
    grid-column: auto !important;
    grid-row: auto !important;
    justify-self: end;
    align-self: center;
    min-width: 57px;
    min-height: 38px !important;
    height: 38px;
    padding: 0 10px !important;
    gap: 6px;
    font: 800 .66rem/1 Inter, system-ui, sans-serif !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
  }

  .dashboard-header > #openShopHeaderButton::before,
  .dashboard-header > #openShopHeaderButton::after {
    content: none !important;
    display: none !important;
  }

  .dashboard-header > #mobileNavToggle {
    grid-area: menu !important;
    grid-column: auto !important;
    grid-row: auto !important;
    position: relative !important;
    z-index: 172 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    gap: 7px !important;
    min-width: 70px !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 10px !important;
    border: 1px solid rgba(166, 149, 255, .3) !important;
    border-radius: 11px !important;
    background: linear-gradient(145deg, rgba(134, 111, 255, .17), rgba(75, 112, 255, .09)) !important;
    color: #eeeaff !important;
    font: 800 .66rem/1 Inter, system-ui, sans-serif !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-indent: 0 !important;
    text-transform: none !important;
    white-space: nowrap !important;
    word-spacing: normal !important;
    writing-mode: horizontal-tb !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05) !important;
    overflow: visible !important;
  }

  .dashboard-header > #mobileNavToggle::before,
  .dashboard-header > #mobileNavToggle::after {
    content: none !important;
    display: none !important;
  }

  .dashboard-header > #mobileNavToggle > .mobile-tabs-toggle-icon {
    position: relative !important;
    display: flex !important;
    flex: 0 0 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 3.5px !important;
    width: 14px !important;
    min-width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    pointer-events: none;
  }

  .dashboard-header > #mobileNavToggle > .mobile-tabs-toggle-icon > i {
    display: block !important;
    flex: 0 0 1.5px !important;
    width: 14px !important;
    min-width: 14px !important;
    height: 1.5px !important;
    min-height: 1.5px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 99px !important;
    background: #d6cdff !important;
    opacity: 1;
    transform-origin: center !important;
    box-shadow: none !important;
    transition: transform .16s ease, opacity .12s ease !important;
  }

  .dashboard-header > #mobileNavToggle.is-open > .mobile-tabs-toggle-icon > i:first-child {
    transform: translateY(5px) rotate(45deg) !important;
  }

  .dashboard-header > #mobileNavToggle.is-open > .mobile-tabs-toggle-icon > i:nth-child(2) {
    opacity: 0 !important;
  }

  .dashboard-header > #mobileNavToggle.is-open > .mobile-tabs-toggle-icon > i:last-child {
    transform: translateY(-5px) rotate(-45deg) !important;
  }

  .dashboard-header > #mobileNavToggle > .mobile-tabs-toggle-label {
    display: inline-block !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font: inherit !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-indent: 0 !important;
    text-transform: none !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  .dashboard-header > .top-actions {
    grid-area: actions !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Leave the header above the dimming scrim so Menu can also close the overlay. */
  .mobile-nav-scrim:not(.hidden) {
    z-index: 150 !important;
  }
  .dashboard-header {
    z-index: 160 !important;
  }
  #dashboardNav {
    z-index: 170 !important;
  }
}

@media (max-width: 390px) {
  .dashboard-header > #openShopHeaderButton {
    min-width: 53px;
    padding-inline: 8px !important;
    gap: 5px;
    font-size: .61rem !important;
  }

  .dashboard-header > #mobileNavToggle {
    min-width: 65px !important;
    padding-inline: 8px !important;
    gap: 6px !important;
    font-size: .62rem !important;
  }

  .dashboard-header > .brand-link {
    gap: 7px !important;
  }

  .dashboard-header > .brand-link .brand-copy strong {
    font-size: .78rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-header > #mobileNavToggle > .mobile-tabs-toggle-icon > i {
    transition: none !important;
  }
}
