.mobile-menu-toggle,
.mobile-nav-backdrop {
  display: none;
}

#appShell > #primarySidebar {
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

@media (max-width: 700px) {
  .topbar,
  main:has(#salesAssistantSection:not([hidden])) > .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    height: auto;
    min-height: 72px;
    padding: 8px 12px;
  }

  .topbar > div:first-of-type {
    min-width: 0;
  }

  .topbar > div:first-of-type h1 {
    overflow: hidden;
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar > div:first-of-type .eyebrow {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 68px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-menu-toggle > span:first-child {
    font-size: 19px;
    line-height: 1;
  }

  .mobile-menu-toggle:focus-visible {
    outline: 3px solid rgba(10, 142, 130, .22);
    outline-offset: 2px;
  }

  .topbar .user-area {
    min-width: 0;
    justify-self: end;
  }

  .topbar .user-area .role-chip,
  .topbar .user-area > select,
  .topbar .user-area > div:not(.avatar),
  .topbar .user-area .logout-button {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    width: min(86vw, 320px);
    height: 100dvh;
    overflow-y: auto;
    transform: translateX(-102%);
    box-shadow: 18px 0 50px rgba(2, 20, 40, .28);
    transition: transform .2s ease;
  }

  .sidebar .brand div,
  .sidebar .nav-item small {
    display: block;
  }

  .sidebar .nav-item,
  .sidebar .nav-item.active {
    justify-content: flex-start;
    min-height: 44px;
    font-size: 14px;
  }

  .shell.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .shell.mobile-nav-open .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 39;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(4, 19, 36, .55);
  }

  body.mobile-nav-locked {
    overflow: hidden;
  }
}
