:root {
  --hero-heading-min: 1.75rem;
  --hero-heading-max: 3rem;
}

/* Hero heading scaling */
.header-blue .hero h1,
.header-blue .hero h1 + p {
  font-size: clamp(var(--hero-heading-min), 4vw, var(--hero-heading-max));
  line-height: 1.2;
}

/* Compact buttons on very narrow screens */
@media (max-width: 400px) {
  .header-blue .action-button {
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
  }
  #auth-buttons .btn {
    padding: 0.4rem 0.65rem !important;
    font-size: 0.7rem !important;
  }
}

/* Nav overflow handling below 420px: hide excess + show more placeholder */
@media (max-width: 420px) {
  .navigation-clean-search .navbar-nav > li:nth-child(n + 8) {
    /* After 7 primary items */
    display: none;
  }
  .nav-more-trigger {
    display: inline-block !important;
  }
}

.nav-more-trigger {
  display: none;
}

/* Table responsiveness fallback */
.table-responsive-sm {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive-sm table {
  min-width: 600px;
}

/* Card/grid tightening on very small phones */
@media (max-width: 360px) {
  .stats-grid,
  .dashboard-page .stats-grid {
    gap: 0.75rem !important;
  }
  .dashboard-page .card-body {
    padding: 0.75rem !important;
  }
}
