/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width:1200px){
  .stat-grid{ grid-template-columns:repeat(3,1fr); }
  .chart-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:992px){
  .login-wrap{ grid-template-columns:1fr; }
  .login-brand{ padding:36px 28px; }
  .login-brand h2{ font-size:1.6rem; }
  .split, .detail-grid{ grid-template-columns:1fr; }
  .sidebar{ transform:translateX(-100%); }
  .sidebar.open{ transform:none; box-shadow:var(--shadow-lg); }
  .main{ margin-left:0; }
  .hamburger{ display:inline-flex; }
}
@media (max-width:768px){
  .stat-grid{ grid-template-columns:repeat(2,1fr); }
  .chart-grid{ grid-template-columns:1fr; }
  .content{ padding:16px 14px 90px; }
  .form-grid{ grid-template-columns:1fr; }
  .bottom-nav{ display:grid; }
  .fab{ bottom:84px; }
  .toast-holder{ bottom:84px; right:14px; left:14px; max-width:none; }
  .kv{ grid-template-columns:1fr; gap:2px 0; }
  .kv dt{ margin-top:8px; }
  .lead-hero .actions{ margin-left:0; }
  .searchbar{ max-width:none; }
  .profile-chip .profile-name{ display:none; }
}
@media (max-width:480px){
  .stat-grid{ grid-template-columns:1fr 1fr; gap:10px; }
  .stat-card{ padding:14px; gap:10px; }
  .stat-num{ font-size:1.2rem; }
  .page-head .actions{ width:100%; }
}

@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; }
}


/* Dashboard mode tabs stay usable on phones. */
@media (max-width:768px){
  .page-head .actions{ align-items:center; }
  .tabs{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    justify-content:flex-start;
    scrollbar-width:none;
  }
  .tabs::-webkit-scrollbar{ display:none; }
  .tab{
    flex:0 0 auto;
    white-space:nowrap;
    padding:9px 15px;
  }
}

/* Longer dashboard labels wrap below the title on standard laptop screens. */
@media (max-width:1500px){
  .page-head .actions{
    width:100%;
    margin-left:0;
    justify-content:flex-end;
  }
}

.page-head,
.page-head .actions{
  min-width:0;
  max-width:100%;
}

/* Keep wide Student/Job tables inside their scroll containers. */
.content,
.content > *,
.card,
.table-wrap{
  min-width:0;
  max-width:100%;
}
