/* Compact, overlap-safe mobile app header. */
@media (max-width: 700px) {
  .acl-top {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 64px !important;
    padding: 9px 11px !important;
  }
  .acl-top > #aclMenu {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #dbe4f0 !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #334155 !important;
    font-size: 19px !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }
  .acl-top-context {
    flex: 1 1 auto !important;
    gap: 8px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .acl-top-context > img {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
  }
  .acl-top-context > div {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .acl-top-context h2 {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .acl-top-context h2 span {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    color: #172033 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .acl-top-context h2 i,
  .acl-theme-toggle {
    display: none !important;
  }
  .acl-top-context small {
    display: block !important;
    max-width: 100% !important;
    margin-top: 3px !important;
    overflow: hidden !important;
    color: #64748b !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .acl-user-menu,
  .acl-order-bell {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    margin-left: 0 !important;
  }
  .acl-user-menu summary,
  .acl-order-bell {
    width: 40px !important;
    height: 40px !important;
    border-radius: 11px !important;
    box-shadow: none !important;
  }
  .acl-order-bell span {
    right: -4px !important;
    top: -5px !important;
  }
  .acl-content {
    padding-top: 14px !important;
  }
}

@media (max-width: 380px) {
  .acl-top {
    gap: 6px !important;
    padding-inline: 8px !important;
  }
  .acl-top > #aclMenu,
  .acl-user-menu,
  .acl-order-bell,
  .acl-user-menu summary {
    flex-basis: 38px !important;
    width: 38px !important;
    height: 38px !important;
  }
  .acl-top-context > img {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
  }
  .acl-top-context h2 span {
    font-size: 12px !important;
  }
  .acl-top-context small {
    display: none !important;
  }
}

html[data-acl-theme="dark"] .acl-top-context h2 span {
  color: #f8fafc !important;
}

html[data-acl-theme="dark"] .acl-top > #aclMenu {
  border-color: #334155 !important;
  background: #111827 !important;
  color: #e2e8f0 !important;
}

@media (max-width: 900px) {
  .acl-side {
    z-index: 1002 !important;
  }
  .acl-overlay {
    z-index: 1000 !important;
  }
  .acl-top {
    z-index: 40 !important;
  }
  .acl-bottom {
    z-index: 30 !important;
  }
  body:has(.acl-side.open) .acl-bottom {
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
