/* Mobile sidebar menu overrides */
#mk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1030;
}

body.sr-menu-open #mk-overlay {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 767.98px) {
  #wrapper {
    overflow-x: hidden;
  }

  #sidebar-wrapper {
    top: 0;
    height: 100vh;
    width: 100vw;
    max-width: 100vw;
    left: -100%;
    padding: 0.5rem 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    background: #0f172a;
    border-right: 1px solid rgba(148, 163, 184, 0.2);
  }

  #wrapper.toggled #sidebar-wrapper {
    left: 0;
  }

  #sidebar-wrapper .brand-logo {
    padding: 0.5rem 1rem 0.25rem;
  }

  #sidebar-wrapper .brand-logo img {
    max-height: 38px;
  }

  #sidebar-wrapper .sidebar-menu {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }

  #sidebar-wrapper .sidebar-menu > li > a {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    line-height: 1.2rem;
    min-height: 48px;
    color: #e2e8f0;
    border-left-color: transparent;
  }

  #sidebar-wrapper .sidebar-submenu > li > a {
    padding: 0.6rem 1rem 0.6rem 2.1rem;
    font-size: 0.9rem;
    min-height: 44px;
    color: #cbd5f5;
  }

  #sidebar-wrapper .sidebar-menu li.sidebar-header {
    padding: 0.65rem 1rem 0.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #94a3b8;
  }

  #sidebar-wrapper input[type="search"],
  #sidebar-wrapper input[type="text"],
  #sidebar-wrapper .form-control {
    border-radius: 12px;
    height: 44px;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
  }

  #sidebar-wrapper .sidebar-menu > li:hover > a,
  #sidebar-wrapper .sidebar-menu > li.active > a {
    background: rgba(20, 184, 166, 0.18);
    color: #f8fafc;
    border-left-color: #14b8a6;
  }

  #menu-controls {
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  }

  #menu-controls {
    display: none;
  }

  #sidebar-wrapper .simplebar-content-wrapper {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  #sidebar-wrapper .simplebar-content {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom));
  }
}
