@media (max-width: 768px) {
  .sidebar {
    width: 80%;
    max-width: 320px;
    position: fixed;
    top: 0;
    left: -100%;
    bottom: 0;
    z-index: 250;
    transition: left 0.3s ease;
    height: 100%;
    box-shadow: 8px 0 40px rgba(0,0,0,0.25);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-logo {
    justify-content: flex-start;
    padding: 1.5rem;
  }

  .sidebar-nav {
    padding-top: 1rem;
  }

  .sidebar-link {
    padding: 1rem 1.5rem;
  }

  .sidebar-footer {
    padding: 1.5rem;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .sidebar-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-main {
    margin-left: 0;
    padding: 1.5rem;
  }

  .admin-app {
    flex-direction: column;
  }

  .mobile-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 1rem;
  }

  .mobile-sidebar-toggle:hover {
    background: rgba(255,255,255,0.06);
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header > div,
  .page-header > button,
  .page-header > .btn-primary {
    width: 100%;
  }

  .page-header > button + div {
    margin-top: 0.75rem;
  }

  .page-header > div + .btn-primary {
    margin-top: 1rem;
    align-self: flex-start;
  }
}
