/* V22.6 — mobile containment, compact login label, visible mobile logout */
.mobile-logout-v226{display:none}
.v226-admin-only-note{font-size:10px;color:#6f786f;background:#f8f3e8;border:1px solid #e8e1d4;border-radius:9px;padding:7px 9px;margin-top:8px}

@media(max-width:680px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:clip!important}
  body>.dashboard-shell,.dashboard-shell,.dashboard-main{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:clip!important}
  .dashboard-main{margin:0!important}
  .dashboard-content,.dashboard-content.management-page,.v22-page,.v21-page{
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin-left:0!important;margin-right:0!important;box-sizing:border-box!important;overflow-x:clip!important
  }
  .dashboard-content.management-page{padding-left:10px!important;padding-right:10px!important}
  .module-header,.panel,.management-columns,.management-columns>*{max-width:100%!important;min-width:0!important;box-sizing:border-box!important}

  /* Bottom navigation stays inside the viewport and does not widen the document. */
  .sidebar{
    left:0!important;right:0!important;width:100%!important;max-width:100%!important;min-width:0!important;
    box-sizing:border-box!important;overflow:hidden!important
  }
  .sidebar nav{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain}
  .sidebar nav button{flex:0 0 64px!important;min-width:64px!important;max-width:64px!important;box-sizing:border-box!important}

  /* Mobile logout is intentionally in the top bar because the account card is hidden in bottom-nav mode. */
  .mobile-logout-v226{
    display:inline-flex!important;align-items:center;justify-content:center;
    height:34px;min-width:48px;padding:0 9px;border:1px solid #dfd8ca;border-radius:10px;
    background:#fff;color:#8c403a;font-size:10px;font-weight:900;white-space:nowrap
  }
  .dashboard-topbar{padding-left:10px!important;padding-right:10px!important}
  .topbar-actions{gap:6px!important;flex-shrink:0}

  /* On mobile all login actions are deliberately labelled with the single word requested. */
  .portal-card>button,.role-switch + .modal-form>.primary-button{font-size:0!important}
  .portal-card>button::after,.role-switch + .modal-form>.primary-button::after{content:"الدخول";font-size:13px!important;font-weight:900}
  .portal-card>button span{display:none!important}

  /* Hard containment only while the admin Groups screen is active. */
  body.v226-groups-mobile .dashboard-content.management-page{overflow-x:hidden!important}
  body.v226-groups-mobile .management-columns{
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
    overflow:hidden!important;margin:0!important
  }
  body.v226-groups-mobile .management-columns>.group-create-form,
  body.v226-groups-mobile .management-columns>.group-registry{
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
    margin:0 0 12px!important;padding:12px!important;overflow:hidden!important;box-sizing:border-box!important
  }
  body.v226-groups-mobile .group-create-form *,
  body.v226-groups-mobile .group-registry *{box-sizing:border-box;min-width:0}
  body.v226-groups-mobile .group-create-form label,
  body.v226-groups-mobile .group-create-form input,
  body.v226-groups-mobile .group-create-form select,
  body.v226-groups-mobile .schedule-picker-block,
  body.v226-groups-mobile .days-picker,
  body.v226-groups-mobile .time-select-field,
  body.v226-groups-mobile .form-pair{width:100%!important;max-width:100%!important;min-width:0!important}
  body.v226-groups-mobile .form-pair,
  body.v226-groups-mobile .schedule-picker-block{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  body.v226-groups-mobile .day-choice-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:6px!important}
  body.v226-groups-mobile .day-choice{min-width:0!important;max-width:100%!important}
  body.v226-groups-mobile .day-choice span{width:100%!important;max-width:100%!important;min-width:0!important}

  body.v226-groups-mobile .group-registry article{
    width:100%!important;max-width:100%!important;min-width:0!important;
    display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;
    grid-template-rows:auto auto auto!important;gap:5px 8px!important;align-items:start!important;
    padding:10px 0!important;overflow:hidden!important
  }
  body.v226-groups-mobile .group-registry article>.group-time{grid-column:1!important;grid-row:1/3!important;width:46px!important;max-width:46px!important}
  body.v226-groups-mobile .group-registry article>div{grid-column:2!important;grid-row:1!important;width:100%!important;overflow-wrap:anywhere!important;word-break:break-word!important}
  body.v226-groups-mobile .group-registry article>em{grid-column:2!important;grid-row:2!important;justify-self:start!important;white-space:normal!important;max-width:100%!important}
  body.v226-groups-mobile .group-registry article>.group-delete-v20{
    grid-column:1/-1!important;grid-row:3!important;justify-self:center!important;
    width:auto!important;min-width:100px!important;max-width:90%!important;margin:3px auto 0!important
  }

  /* Student circle-choice screen also remains a single physical page on phones. */
  body.v226-circle-mobile .student-circle-grid,
  body.v226-circle-mobile .v22-circle-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
  body.v226-circle-mobile .student-circle-card,
  body.v226-circle-mobile .v22-circle{width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;box-sizing:border-box!important}
}
