@media screen and (max-width: 1087.99px) {
  /* Keep the header actions in the viewport on phones. The header is shared
     by the legacy layout and the refreshed shell, so these rules are global
     rather than scoped to GlobalHeader.vue. */
  body .layout.mobile .global-header-shell,
  body .layout.mobile .global-header-shell .topbar,
  body .layout.mobile .global-header-shell .topbar-inner {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  /* The header itself is fixed, so its wrapper must always reserve the same
     full height. Otherwise the workspace tabs rise into the header controls. */
  body .layout.mobile .global-header-shell {
    height: 56px !important;
    min-height: 56px !important;
    flex: 0 0 56px !important;
  }
  body .layout.mobile .global-header-shell .topbar,
  body .layout.mobile .global-header-shell .topbar-inner {
    height: 56px !important;
    min-height: 56px !important;
  }
  body .layout.mobile .global-header-shell .ant-header-fixedHeader {
    top: 0 !important;
    z-index: 20 !important;
  }
  body .layout.mobile .global-header-shell .topbar-inner {
    padding: 0 12px !important;
    gap: 4px !important;
  }
  body .layout.mobile .global-header-shell .breadcrumb,
  body .layout.mobile .global-header-shell .topbar-divider,
  body .layout.mobile .global-header-shell .topbar-spacer,
  body .layout.mobile .global-header-shell .page-cache-refresh {
    display: none !important;
  }
  body .layout.mobile .global-header-shell .topbar-spacer {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  body .layout.mobile .global-header-shell .mobile-menu-trigger,
  body .layout.mobile .global-header-shell .visit-quick-entry,
  body .layout.mobile .global-header-shell .user-wrapper,
  body .layout.mobile .global-header-shell .user-wrapper > .action,
  body .layout.mobile .global-header-shell .user-wrapper .logout-action {
    flex-shrink: 0 !important;
  }
  body .layout.mobile .global-header-shell .user-wrapper {
    display: flex !important;
    align-items: center !important;
    min-width: max-content !important;
    margin-left: 0 !important;
    white-space: nowrap !important;
  }
  body .layout.mobile .global-header-shell .user-wrapper .action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
  }
  body .layout.mobile .global-header-shell .user-wrapper .user-dropdown-menu {
    width: 34px !important;
    min-width: 34px !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }
  body .layout.mobile .global-header-shell .user-wrapper .user-dropdown-menu > span {
    display: none !important;
  }
  body .layout.mobile .global-header-shell .user-wrapper .logout-action,
  body .layout.mobile .global-header-shell .user-wrapper .logout_title {
    display: inline-flex !important;
    align-items: center !important;
    min-width: max-content !important;
    white-space: nowrap !important;
  }
  body .layout.mobile .global-header-shell .user-wrapper .logout-label-mobile {
    display: inline !important;
  }
  body .layout.mobile .global-header-shell .topbar {
    box-shadow: none !important;
  }
  body .layout.mobile .global-header-shell .mobile-page-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin-right: 4px !important;
    overflow: hidden !important;
    color: #172033 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body .layout.mobile .global-header-shell .mobile-menu-trigger,
  body .layout.mobile .global-header-shell .mobile-more-trigger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #475569 !important;
    font-size: 20px !important;
    line-height: 1 !important;
    cursor: pointer !important;
  }
  body .layout.mobile .global-header-shell .visit-quick-entry {
    width: auto !important;
    min-width: 60px !important;
    height: 44px !important;
    justify-content: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #155eef !important;
    font-size: 14px !important;
    font-weight: 500 !important;
  }
  body .layout.mobile .global-header-shell .visit-quick-entry > .anticon,
  body .layout.mobile .global-header-shell .visit-quick-entry-label {
    display: none !important;
  }
  body .layout.mobile .global-header-shell .visit-quick-entry-short {
    display: inline !important;
  }
  body .layout.mobile .global-header-shell .user-wrapper .header-notice {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 6px !important;
  }
  body .layout.mobile .global-header-shell .header-notice-unread-dot {
    top: 9px !important;
    right: 9px !important;
    bottom: auto !important;
    width: 6px !important;
    height: 6px !important;
  }
  body .layout.mobile .global-header-shell button:hover {
    background: #f4f6f8 !important;
  }
  body .layout.mobile .global-header-shell button:focus-visible {
    outline: 2px solid #155eef !important;
    outline-offset: -2px !important;
  }
}
@media screen and (max-width: 1087.99px) and screen and (max-width: 380px) {
  body .layout.mobile .global-header-shell .topbar-inner {
    padding-right: 8px !important;
    padding-left: 8px !important;
  }
  body .layout.mobile .global-header-shell .mobile-menu-trigger {
    margin-right: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }
  body .layout.mobile .global-header-shell .visit-quick-entry {
    width: auto !important;
    min-width: 60px !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 10px !important;
  }
  body .layout.mobile .global-header-shell .visit-quick-entry-short {
    display: inline !important;
  }
  body .layout.mobile .global-header-shell .user-wrapper .action {
    min-width: 44px !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }
  body .layout.mobile .global-header-shell .user-wrapper .user-dropdown-menu {
    width: 32px !important;
    min-width: 32px !important;
  }
}

.mobile-page-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  padding: 0 16px;
  overflow-x: auto;
  border-bottom: 1px solid #e8edf3;
  background: #fff;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.mobile-page-tabs::-webkit-scrollbar {
  display: none;
}
.mobile-page-tab {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  color: #7c899b;
}
.mobile-page-tab.is-active {
  color: #155eef;
}
.mobile-page-tab.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  content: '';
}
.mobile-page-link,
.mobile-page-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  touch-action: manipulation;
}
.mobile-page-link:hover,
.mobile-page-close:hover {
  color: #155eef;
  background: #f4f6f8;
}
.mobile-page-link:focus-visible,
.mobile-page-close:focus-visible {
  outline: 2px solid #155eef;
  outline-offset: -2px;
}
.mobile-page-link {
  display: block;
  max-width: 182px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.is-active .mobile-page-link {
  font-weight: 500;
}
.mobile-page-close {
  width: 36px;
  font-size: 10px;
}
.user-menu-search-dropdown {
  z-index: 2000 !important;
}
.mobile-header-menu {
  min-width: 200px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  border: 1px solid #e8edf3;
  border-radius: 8px;
}
.mobile-header-menu .ant-dropdown-menu-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 4px;
  color: #334155;
  font-size: 14px;
}
.mobile-header-menu .mobile-header-account {
  max-width: 240px;
  min-height: 32px;
  overflow: hidden;
  color: #7c899b;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-header-menu .mobile-header-logout {
  color: #b42318;
}
