/**
 * Мобильная вёрстка админки (≤767px). Классы навешиваются из AdminLayout.
 */
@media (max-width: 767px) {
  .unify-admin-shell {
    width: 100%;
    max-width: 100vw;
  }

  .unify-admin-shell--mobile .unify-admin-sidebar {
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    bottom: 0;
    margin: 0 !important;
    width: min(280px, calc(100vw - env(safe-area-inset-left, 0px))) !important;
    max-width: calc(100vw - 0.75rem);
    border-radius: 0 1rem 1rem 0 !important;
    transform: translateX(-110%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 16px 48px rgb(0 0 0 / 0.22);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

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

  .unify-mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgb(0 0 0 / 0.45);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .unify-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 2.75rem;
    width: 2.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(228 228 231);
    background: #fff;
    color: rgb(24 24 27);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  }

  html.dark .unify-mobile-menu-btn {
    border-color: rgb(63 63 70);
    background: rgb(39 39 42);
    color: rgb(244 244 245);
  }

  .unify-admin-shell--mobile main {
    padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    min-width: 0;
    flex: 1 1 0%;
  }

  .unify-admin-shell--mobile kbd {
    display: none !important;
  }

  .unify-admin-shell--mobile .unify-surface-scroll {
    -webkit-overflow-scrolling: touch;
  }

  .unify-admin-shell--mobile .overflow-x-auto,
  .unify-admin-shell--mobile [class*="overflow-x-auto"] {
    max-width: 100%;
  }

  .unify-admin-shell--mobile table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .unify-admin-shell--mobile .unify-core-configs-split {
    grid-template-columns: 1fr !important;
  }

  .unify-admin-shell--mobile .unify-health-resources {
    grid-template-columns: 1fr !important;
  }

  .unify-admin-shell--mobile .unify-health-lower {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 768px) {
  .unify-mobile-menu-btn,
  .unify-mobile-nav-backdrop {
    display: none !important;
  }
}
