/* Touch layouts retain the original forms, field names and submit endpoints. */
@media screen and (max-width: 767.98px) {
  .hadira-app-shell .main-panel { min-width:0; }
  .hadira-app-shell .main-panel > .navbar { position:relative!important;top:auto!important;left:auto!important;min-height:64px; }
  .hadira-app-shell .main-panel .content { padding:18px 4px!important;margin-top:0!important; }
  .hadira-app-shell .content > .container-fluid { padding-right:12px;padding-left:12px; }
  .hadira-app-shell .row > [class*="col-"] { min-width:0; }
  .hadira-app-shell .card .card-body { padding:16px 12px; }
  .hadira-app-shell .card > .card-header { padding:14px 12px; }
  .hadira-app-shell .main-panel h3 { font-size:21px;line-height:1.35;overflow-wrap:anywhere; }
  .hadira-app-shell .main-panel .btn { min-height:44px;white-space:normal;line-height:1.4; }
  .hadira-app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .hadira-app-shell select,.hadira-app-shell textarea { font-size:16px!important;min-height:44px;max-width:100%; }
  .hadira-app-shell input[type="checkbox"],.hadira-app-shell input[type="radio"] { min-width:20px;min-height:20px; }
  .hadira-app-shell .table-responsive { max-width:100%;-webkit-overflow-scrolling:touch; }
  .hadira-app-shell .navbar-wrapper { min-width:0;max-width:calc(100% - 56px); }
  .hadira-app-shell .navbar-brand { white-space:normal;line-height:1.3;font-size:16px; }
  .hadira-app-shell .navbar-toggler { min-width:44px;min-height:44px; }
  .hadira-app-shell .sidebar .sidebar-wrapper { overflow-x:hidden; }
  .hadira-app-shell .sidebar .nav li > a { min-height:44px; }
  .hadira-app-shell .sidebar .hadira-sidebar-group summary { min-height:48px; }
  .hadira-role-shell .content .d-flex.justify-content-between { flex-wrap:wrap;gap:12px; }
  .hadira-role-shell .content .d-flex.justify-content-between > div { min-width:0; }
  .hadira-role-shell .schedule-card .btn-lg { width:100%; }
  .hadira-role-shell .summary-pill { margin-bottom:8px; }
  .hadira-role-shell .teacher-save-actions { position:sticky;bottom:0;padding:12px 0 calc(12px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #dce6eb;z-index:2; }
  .hadira-role-shell .teacher-save-actions .btn { width:100%;margin:0; }
  /* One pupil per card eliminates horizontal scrolling during roll call. */
  .hadira-role-shell .teacher-roll-call { overflow:visible; }
  .hadira-role-shell .teacher-roll-call table,
  .hadira-role-shell .teacher-roll-call tbody { display:block;width:100%; }
  .hadira-role-shell .teacher-roll-call thead { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
  .hadira-role-shell .teacher-roll-call tr { display:grid;grid-template-columns:1fr;gap:4px;border:1px solid #dce6eb;border-radius:10px;margin-bottom:12px;padding:12px;background:#fff; }
  .hadira-role-shell .teacher-roll-call td { display:block;border:0;padding:4px 0!important;white-space:normal;overflow-wrap:anywhere; }
  .hadira-role-shell .teacher-roll-call td[data-label]::before { content:attr(data-label);display:block;font-size:12px;color:#596f80;margin-bottom:3px; }
  .hadira-role-shell .teacher-roll-call .student-status select { width:100%;min-width:0; }
  .hadira-role-shell .teacher-roll-call strong { font-size:16px;color:#163b4b; }
  .hadira-role-shell .teacher-roll-call .roll-number { font-size:12px;color:#637388; }
  .hadira-role-shell .teacher-class-stats { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0; }
  .hadira-role-shell .teacher-class-stats > [class*="col-"] { max-width:none;width:auto;padding:8px 3px;background:#f2f7f7;border-radius:8px; }
  .hadira-role-shell .teacher-class-stats > .col-1 { display:none; }
  .hadira-role-shell .teacher-class-stats h5 { white-space:normal!important;font-size:12px; }
  .hadira-app-shell .teacher-access-banner { max-width:100%;font-size:12px; }
}
