/* Phone look ("Option B, colourful tiles", chosen by the Director 26 Nov 2026).
   Loaded only on screens narrower than 768px. Styling only: every page shows the same information,
   fields and columns as on a computer. */

body { background: #f4f1f7; }

/* Top bar: white with the logo, a rainbow line under it, menu button on the right */
.topbar { background: #fff !important; flex-wrap: wrap; row-gap: .25rem;
  border-bottom: 4px solid; border-image: linear-gradient(90deg, #5d0ea2, #a92093, #fe4b53, #ff9510, #ffcb04) 1; }
.topbar .m-brand { display: flex !important; align-items: center; gap: .5rem; font-weight: 800; color: #3d0870;
  text-decoration: none; font-size: 1.05rem; margin-right: auto; }
.topbar .m-brand img { height: 54px; width: auto; max-width: 78vw; }
.topbar .m-menu { order: 2; border: 0; background: none; color: #3d0870; font-size: 1.7rem; padding: 0 .2rem; line-height: 1; }
.topbar form { order: 3; width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }

main { padding: .9rem !important; }
h3 { font-size: 1.35rem; }

/* Dashboard tiles */
.m-tiles { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.m-tile { border-radius: 1.1rem; color: #fff !important; text-decoration: none; text-align: center; font-weight: 600;
  font-size: .78rem; min-height: 84px; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: .5rem .3rem; box-shadow: 0 2px 6px rgba(61, 8, 112, .18); line-height: 1.15; }
.m-tile i { font-size: 1.6rem; margin-bottom: .25rem; }

/* Cards: rounder and softer */
.card { border-radius: 1rem !important; }
.card.shadow-sm { box-shadow: 0 1px 4px rgba(61, 8, 112, .08) !important; }

/* Bigger, finger-friendly controls (16px text also stops iPhones zooming in) */
.form-control, .form-select { min-height: 46px; font-size: 16px; border-radius: .75rem; }
.btn { min-height: 42px; border-radius: .75rem; }
.btn-sm { min-height: 34px; }
.form-check-input { width: 1.35em; height: 1.35em; }

/* Tables become a stack of cards: one card per row, each value with its column name */
main table.table.m-cards { display: block; overflow: visible; background: transparent; }
main table.m-cards thead { display: none; }
main table.m-cards tbody, main table.m-cards tfoot { display: block; }
main table.m-cards tr { display: block; background: #fff; border-radius: 1rem; margin-bottom: .6rem; padding: .55rem .8rem;
  box-shadow: 0 1px 4px rgba(61, 8, 112, .08); }
main table.m-cards td, main table.m-cards tfoot th { display: flex; justify-content: space-between; align-items: center; gap: .8rem;
  border: 0 !important; padding: .28rem 0 !important; text-align: right !important; background: transparent !important;
  box-shadow: none !important; }
main table.m-cards td::before, main table.m-cards tfoot th::before { content: attr(data-label); color: #7a6a86; font-size: .8rem;
  font-weight: 600; text-align: left; flex-shrink: 0; max-width: 45%; }
main table.m-cards td:first-child { font-weight: 700; font-size: 1rem; }
main table.m-cards td[data-label=""]::before { display: none; }
main table.m-cards td[colspan] { justify-content: center; }
main .table-responsive:has(table.m-cards) { overflow: visible; }
main .card:has(> .table-responsive > table.m-cards), main .card:has(> table.m-cards) { background: transparent; box-shadow: none !important; }
main table.m-cards td:has(> .form-check-input:only-child) { justify-content: flex-start; padding-bottom: 0 !important; }
main table.m-cards td:has(> .form-check-input:only-child)::before { display: none; }
.list-group-item.active { background: #5d0ea2; border-color: #5d0ea2; }
