@media (max-width: 900px) {
  html, body {
    overflow-x: hidden;
  }

  body.mobile-drawer-open,
  html.mobile-drawer-open {
    overflow: hidden;
  }

  #root > div.min-h-screen.flex,
  #root > div[class*="min-h-screen"][class*="flex"],
  #root .min-h-screen.flex.bg-background,
  #root .min-h-screen.flex,
  #root [class*="min-h-screen"][class*="flex"] {
    display: block !important;
    min-height: 100dvh !important;
  }

  #root aside,
  #root aside.w-64,
  #root aside.bg-sidebar {
    display: none !important;
  }

  #root main,
  #root main.flex-1,
  #root main.overflow-auto,
  #root .flex-1.overflow-auto,
  #root .flex-1 {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  #root .max-w-7xl,
  #root .max-w-6xl,
  #root .max-w-5xl,
  #root .max-w-4xl,
  #root .max-w-3xl,
  #root .max-w-2xl,
  #root .max-w-xl {
    max-width: 100% !important;
  }

  #root table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  #root th,
  #root td {
    white-space: nowrap;
  }

  #root .overflow-auto,
  #root .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }

  #root input,
  #root select,
  #root textarea,
  #root button {
    font-size: 16px !important;
  }

  #mobileAppBar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: .75rem !important;
    min-height: 4.25rem !important;
    padding: .9rem 1rem !important;
    background: hsl(var(--sidebar-background)) !important;
    color: hsl(var(--sidebar-foreground)) !important;
    border-bottom: 1px solid hsl(var(--sidebar-border)) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
  }

  #mobileAppBar .mobile-app-bar-brand {
    display: flex !important;
    align-items: center !important;
    gap: .75rem !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  #mobileAppBar .mobile-app-bar-brand img,
  #mobileAppBar .mobile-app-bar-brand svg {
    width: 1.6rem !important;
    height: 1.6rem !important;
    max-width: 1.6rem !important;
    flex: 0 0 auto !important;
    object-fit: contain !important;
  }

  #mobileAppBar .mobile-app-bar-title {
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .mobile-menu-toggle-btn,
  .mobile-drawer-close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex: 0 0 auto;
  }

  .mobile-menu-toggle-btn svg,
  .mobile-drawer-close svg {
    width: 1.05rem;
    height: 1.05rem;
    display: block;
  }

  #mobileDrawerBackdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .46);
    z-index: 69;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    border: 0;
    margin: 0;
    padding: 0;
  }

  html.mobile-drawer-open #mobileDrawerBackdrop {
    opacity: 1;
    pointer-events: auto;
  }

  #mobileDrawer {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 340px);
    max-width: 340px;
    background: hsl(var(--sidebar-background));
    color: hsl(var(--sidebar-foreground));
    z-index: 70;
    transform: translateX(-104%);
    transition: transform .22s ease;
    box-shadow: 0 18px 48px rgba(15,23,42,.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid hsl(var(--sidebar-border));
  }

  html.mobile-drawer-open #mobileDrawer {
    transform: translateX(0);
  }

  #mobileDrawer .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 4.25rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid hsl(var(--sidebar-border));
  }

  #mobileDrawer .mobile-drawer-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    flex: 1 1 auto;
  }

  #mobileDrawer .mobile-drawer-brand img,
  #mobileDrawer .mobile-drawer-brand svg {
    width: 1.6rem !important;
    height: 1.6rem !important;
    max-width: 1.6rem !important;
    object-fit: contain !important;
    flex: 0 0 auto !important;
  }

  #mobileDrawer .mobile-drawer-brand-title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #mobileDrawer .mobile-drawer-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
  }

  #mobileDrawer .mobile-drawer-nav a {
    text-decoration: none;
  }

  #mobileDrawer .mobile-drawer-nav a,
  #mobileDrawer .mobile-drawer-footer button {
    display: flex !important;
    align-items: center !important;
    gap: .75rem !important;
    width: 100% !important;
    min-height: 3.2rem !important;
    border-radius: .9rem !important;
    padding: .9rem 1rem !important;
    font-size: .98rem !important;
    line-height: 1.2 !important;
    box-sizing: border-box;
  }

  #mobileDrawer .mobile-drawer-nav a svg,
  #mobileDrawer .mobile-drawer-nav a img,
  #mobileDrawer .mobile-drawer-footer button svg {
    width: 1rem !important;
    height: 1rem !important;
    max-width: 1rem !important;
    flex: 0 0 auto !important;
  }

  #mobileDrawer .mobile-drawer-nav a .ml-auto {
    margin-left: auto !important;
  }

  #mobileDrawer .mobile-drawer-footer {
    padding: 1rem;
    border-top: 1px solid hsl(var(--sidebar-border));
  }
}
