/* Cabeçalho móvel com botão de menu flutuante e arrastável. */
@media (max-width: 768px) {
  html body.premium-ui.mc-ux-536 #appView .main header.topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    height: auto !important;
    min-height: calc(68px + env(safe-area-inset-top, 0px)) !important;
    padding: calc(12px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 12px max(12px, env(safe-area-inset-left, 0px)) !important;
    margin: 0 0 16px !important;
    width: 100% !important;
    position: relative !important;
    top: auto !important;
    z-index: 100 !important;
    background: #0b1423 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid #29374c !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html body.premium-ui.mc-ux-536 #appView header.topbar .ros-topbar-tabs,
  html body.premium-ui.mc-ux-536 #appView header.topbar .ros-search-wrap { display: none !important; }
  html body.premium-ui.mc-ux-536 #appView header.topbar .ros-topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 0 0 auto !important;
    flex: 0 0 auto !important;
    width: auto !important;
  }
  html body.premium-ui.mc-ux-536 #appView header.topbar .top-actions-clean {
    display: flex !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
  }
  /* mobileMenuBtn flutuante e arrastável */
  html body.premium-ui.mc-ux-536 #appView #mobileMenuBtn,
  html body.premium-ui #appView #mobileMenuBtn {
    position: fixed !important;
    top: var(--menu-btn-top, max(64px, calc(env(safe-area-inset-top, 0px) + 14px)));
    left: var(--menu-btn-left, 14px);
    right: auto !important;
    bottom: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 50% !important;
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #f1f5f9 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    z-index: 10005 !important;
    cursor: grab !important;
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }
  html body.premium-ui.mc-ux-536 #appView header.topbar :is(.icon-btn, .ros-user-avatar, .dashboard-new-order) {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }
  html body.premium-ui.mc-ux-536 #appView header.topbar :is(.icon-btn, .ros-user-avatar) {
    width: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
  }
  html body.premium-ui.mc-ux-536 #appView header.topbar .dashboard-new-order {
    width: auto !important;
    min-width: 100px !important;
    padding: 0 14px !important;
    white-space: nowrap !important;
    box-shadow: none !important;
  }
  html body.premium-ui.mc-ux-536 #appView header.topbar .mobile-page-context {
    display: flex !important;
    align-items: baseline;
    gap: 8px;
    order: 3;
    flex: 0 0 100%;
    min-width: 0;
    padding: 10px 2px 0 56px;
    border-top: 1px solid #26364b;
    line-height: 1.25;
  }
  #appView header.topbar .mobile-page-context span { color: #93a7c2; font-size: 12px; white-space: nowrap; }
  #appView header.topbar .mobile-page-context strong { color: #edf4ff; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #appView header.topbar button:focus-visible { outline: 2px solid #93c5fd !important; outline-offset: 2px; }
  html body.premium-ui.mc-ux-536 #appView #page-orders .professional-toolbar .toolbar-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  html body.premium-ui.mc-ux-536 #appView #page-orders .professional-toolbar .toolbar-actions > button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0 !important;
    white-space: nowrap;
  }
}
@media (max-width: 360px) {
  html body.premium-ui.mc-ux-536 #appView #page-orders #toggleArchived,
  html body.premium-ui.mc-ux-536 #appView #page-orders #toggleViewMode {
    white-space: nowrap !important;
    font-size: 12px !important;
    padding-inline: 6px !important;
  }
}
@media (min-width: 769px) {
  html body.premium-ui #appView #mobileMenuBtn,
  html body.premium-ui #appView header.topbar #mobileMenuBtn,
  .mobile-menu-btn { display: none !important; }
  html body.premium-ui #appView header.topbar .mobile-page-context { display: none !important; }
}
