/* Responsive system */
@media (max-width: 1100px) {
  .hero-grid,
  .auth-shell,
  .dashboard-shell,
  .dashboard-grid.cols-2,
  .dashboard-grid.cols-3,
  .dashboard-grid.cols-4,
  .footer-grid,
  .grid-4,
  .grid-3,
  .grid-2,
  .stat-strip {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 900px) {
  .nav-links,
  .nav-actions .hide-mobile,
  .sidebar {
    display: none;
  }

  .nav-links.open {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: color-mix(in srgb, var(--background) 88%, white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
  }

  .sidebar.open {
    display: block;
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    z-index: 95;
    height: auto;
    max-height: calc(100vh - 78px);
    overflow: auto;
    background: color-mix(in srgb, var(--surface) 94%, white);
    box-shadow: var(--shadow);
  }

  .mobile-toggle,
  .mobile-sidebar-toggle {
    display: inline-grid;
  }

  .hero-grid,
  .auth-shell,
  .dashboard-grid.cols-2,
  .dashboard-grid.cols-3,
  .dashboard-grid.cols-4,
  .footer-grid,
  .grid-4,
  .grid-3,
  .grid-2,
  .stat-strip,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 420px;
  }

  .dashboard-main,
  .sidebar {
    padding-inline: 1rem;
  }

  .dashboard-top,
  .section-head,
  .footer-bottom,
  .remember-row,
  .form-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-row,
  .social-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1rem, var(--container));
  }

  .hero {
    padding-top: 3rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .hero-card {
    padding: 1rem;
    border-radius: 26px;
  }

  .hero-visual {
    min-height: 360px;
  }

  .calendar-grid {
    gap: 0.35rem;
  }

  .calendar-day,
  .calendar-head {
    min-height: 44px;
    font-size: 0.84rem;
  }

  .table th,
  .table td {
    padding: 0.75rem 0.8rem;
  }

  .modal-card {
    border-radius: 22px;
  }
}
