/* ========================================
   MiniCodex Admin — Mobile polish (≤900px)
   Sidebar-ul off-canvas + burger există deja în layout.css; aici:
   tabele scrollabile, statistici pe coloană, modale full-width,
   header-e care se împachetează, țintă de tap decentă.
   ======================================== */

@media (max-width: 900px) {
  #content, #section-content,
  .enrollments-content, .students-module-content, .team-content, .system-content {
    min-width: 0;
    max-width: 100%;
  }

  /* Statistici: o coloană pe telefon, două pe tabletă mică */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Header-ele de secțiune cu butoane: se împachetează frumos */
  .section-header { flex-wrap: wrap; gap: 10px; }
  .section-header .btn { width: 100%; justify-content: center; }

  /* Filtre & toolbar-uri: pe verticală, lățime plină */
  .table-filter { min-width: 0 !important; flex: 1 1 45% !important; }

  /* Modale: aproape full-screen, scroll intern */
  .modal { width: calc(100vw - 20px) !important; max-width: none !important;
           max-height: calc(100dvh - 24px); }

  /* Butoane de acțiune din tabele: țintă de tap mai mare */
  .data-table .btn-sm, .data-table button { min-height: 38px; min-width: 38px; }

  /* Textul din celule nu forțează lățimea */
  .data-table th, .data-table td { white-space: nowrap; }

  .ops-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .ops-row > .ui-icon { display: none; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  #topbar-title { font-size: 1rem; }
  #section-content { padding: 12px; }
  .card { border-radius: 10px; }
}

/* Orice tabel de date primește scroll orizontal propriu, indiferent de ecran —
   vederea unificată are 10 coloane și pe laptop mic tot ajută. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
