/* ==========================================================================
   ARISA admin/member panel — shared mobile responsiveness.
   Linked (in addition to css/style.css) on every admin/member screen, after
   each page's own inline <style> block, so these overrides win at the
   breakpoints below without needing !important or per-page edits.
   ========================================================================== */

@media (max-width: 900px) {
  .admin-shell {
    padding: 24px 16px !important;
  }

  .admin-top {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }

  .admin-nav {
    flex-wrap: wrap;
    gap: 10px 14px !important;
    margin-bottom: 20px !important;
  }

  .filter-row {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .filter-row a { flex-shrink: 0; }

  /* Data tables: horizontal scroll on narrow screens instead of squeezing
     or breaking layout. The table itself scrolls; nothing else on the page
     needs to move. */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  thead, tbody, tr { display: table; width: 100%; table-layout: auto; }

  /* Key/value detail rows (application + accreditation review pages) stack
     instead of forcing a fixed 180px label column into a narrow screen. */
  .kv {
    grid-template-columns: 1fr !important;
    gap: 2px 0 !important;
    margin-bottom: 14px !important;
  }

  .form-grid { grid-template-columns: 1fr !important; }

  .action-row, .btn-row, .status-actions {
    flex-direction: column;
    align-items: stretch !important;
  }
  .action-row input, .status-actions button { width: 100%; }

  .review-card, .cert-box, .enq-card { padding: 22px 18px !important; }

  h1 { font-size: 22px !important; }
}

@media (max-width: 520px) {
  .admin-shell { padding: 18px 12px !important; }

  .login-box { padding: 30px 22px !important; }

  .score-row, .doc-row, .panel-row { flex-wrap: wrap; gap: 4px 0; }

  .card-grid, .pillars-grid, .status-grid { grid-template-columns: 1fr !important; }
}
