/* SchoolSafar app styles — Theme 4 "Mint Soft". Mobile-first; desktop layout from 768px.
   Use tokens from tokens.css only (no raw colours here). */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.45;
  color: var(--color-text);
  background: var(--color-bg);
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[x-cloak] { display: none !important; }
.icon { flex: none; }

:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--color-primary); color: var(--color-on-primary);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-pill); font-weight: var(--fw-heavy);
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Building blocks ---------- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: var(--card-pad);
}

.brand { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.brand-mark {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 16px; background: var(--color-primary); color: var(--color-on-primary);
}
.brand-mark--sm { width: 38px; height: 38px; border-radius: var(--radius-icon); }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand__name { font-weight: var(--fw-heavy); font-size: var(--fs-md); }
.brand__school { font-size: var(--fs-xs); color: var(--color-text-muted); }

.avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); font-weight: var(--fw-heavy);
}
.avatar--mint { background: var(--tint-mint-bg); color: var(--tint-mint-fg); }

.icon-button {
  min-width: var(--touch-min); min-height: var(--touch-min);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-text-secondary);
  cursor: pointer;
}
.icon-button:hover { background: var(--color-surface-soft); color: var(--color-text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--button-h); padding: 0 28px;
  border: 0; border-radius: var(--radius-pill);
  font-size: 17px; font-weight: var(--fw-heavy); text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn--primary:hover { background: var(--color-primary-hover); }
.btn--secondary { background: var(--color-surface); color: var(--color-text); }
.btn--block { width: 100%; }

.link {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch-min);
  color: var(--color-primary); font-weight: var(--fw-bold); text-decoration: none;
}
.link:hover { text-decoration: underline; }
.link--button { border: 0; background: none; padding: 0; cursor: pointer; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: var(--space-5); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-text-secondary); }
.field__error { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-danger); }

.input {
  width: 100%; min-height: 52px; padding: 0 var(--space-4);
  border: var(--tile-border) solid transparent; border-radius: var(--radius-input);
  background: var(--color-surface-soft); font-size: var(--fs-md);
}
.input:focus { outline: none; border-color: var(--color-primary); background: var(--color-surface); }
.input--lg { min-height: var(--input-h); font-size: var(--fs-xl); font-weight: var(--fw-heavy); }
.input--code { letter-spacing: 0.5em; text-align: center; }
.input.has-error, .has-error .input { border-color: var(--color-danger); }

.input-prefixed { position: relative; display: flex; align-items: center; }
.input-prefixed__prefix {
  position: absolute; left: var(--space-4);
  font-size: var(--fs-xl); font-weight: var(--fw-heavy); color: var(--color-text-muted);
}
.input-prefixed .input { padding-left: 64px; }

.alert {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-row);
  font-size: var(--fs-sm); line-height: 1.5;
}
.alert--danger { background: var(--tint-danger-bg); color: var(--tint-danger-fg); font-weight: var(--fw-bold); }
.alert--butter { background: var(--tint-butter-bg); color: var(--tint-butter-fg); }
.code { font-size: var(--fs-md); letter-spacing: 0.15em; }

/* ---------- Auth pages ---------- */
.auth {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6) var(--space-4);
}
.auth__card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: var(--space-5); padding: 28px 24px; }
.auth__brand { margin-bottom: var(--space-2); }
.auth__title { font-size: var(--fs-2xl); font-weight: var(--fw-heavy); line-height: 1.15; }
.auth__lead { color: var(--color-text-muted); margin-top: calc(-1 * var(--space-3)); }
.auth__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); }

/* ---------- App shell: phone first ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
  background: var(--color-surface);
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
}
.topbar__brand { display: inline-flex; border-radius: var(--radius-icon); }
.topbar__title { flex: 1; min-width: 0; font-size: var(--fs-lg); font-weight: var(--fw-heavy);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-shell { padding: var(--space-4) var(--space-4) calc(88px + env(safe-area-inset-bottom)); }
.main { display: flex; flex-direction: column; gap: var(--page-gap); min-width: 0; outline: none; }

/* Sidebar as a slide-out drawer on phones */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: min(300px, 86vw); overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px;
  padding: 22px 14px;
  background: var(--color-surface);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  transform: translateX(-105%); visibility: hidden;
  transition: transform 0.2s ease, visibility 0s linear 0.2s;
}
.sidebar.is-open { transform: translateX(0); visibility: visible; transition: transform 0.2s ease; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 30; background: rgb(22 48 43 / 0.35); }
.menu-open { overflow: hidden; }

.sidebar__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 0 var(--space-2); }

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav__item {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: var(--touch-min); padding: 12px 14px;
  border-radius: var(--radius-row);
  color: var(--color-text-secondary); text-decoration: none;
  font-size: var(--fs-base); font-weight: var(--fw-semibold);
}
a.nav__item:hover { background: var(--color-surface-soft); color: var(--color-text); }
.nav__item.is-active { background: var(--color-primary-soft); color: var(--color-on-primary-soft); font-weight: var(--fw-heavy); }
.nav__item.is-disabled { color: var(--color-text-muted); cursor: default; }
.nav__soon {
  margin-left: auto; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--tint-neutral-bg); color: var(--tint-neutral-fg);
  font-size: var(--fs-xs); font-weight: var(--fw-heavy);
}

.user-card {
  margin-top: auto;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); border-radius: 20px; background: var(--color-surface-soft);
}
.user-card form { margin-left: auto; }
.user-card__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-card__name { font-weight: var(--fw-heavy); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card__role { font-size: var(--fs-xs); color: var(--color-text-muted); }

/* Bottom tab bar (phones) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--color-surface);
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  box-shadow: 0 -2px 12px rgb(22 48 43 / 0.06);
}
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; border-radius: var(--radius-row);
  color: var(--color-text-secondary); text-decoration: none;
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
}
.tabbar__item.is-active { background: var(--color-primary-soft); color: var(--color-on-primary-soft); font-weight: var(--fw-heavy); }
.tabbar__item.is-disabled { color: var(--color-text-muted); }

/* ---------- Page pieces ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 4px 0; }
.page-header__title { font-size: var(--fs-xl); font-weight: var(--fw-heavy); line-height: 1.2; }
.page-header__subtitle { margin-top: 2px; font-size: var(--fs-base); color: var(--color-text-muted); }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: 40px 24px; text-align: center; }
.empty-state__icon {
  width: 64px; height: 64px; border-radius: var(--radius-tile);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tint-mint-bg); color: var(--tint-mint-fg);
}
.empty-state__title { font-size: var(--fs-lg); font-weight: var(--fw-heavy); }
.empty-state__text { max-width: 46ch; color: var(--color-text-muted); }

/* Toasts */
.toasts {
  position: fixed; z-index: 60; left: var(--space-4); right: var(--space-4);
  bottom: calc(84px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: var(--space-2); pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  border-radius: var(--radius-row); font-weight: var(--fw-bold);
  background: var(--color-text); color: var(--color-surface);
  box-shadow: 0 6px 24px rgb(22 48 43 / 0.18);
}
.toast > span { flex: 1; }
.toast--success { background: var(--tint-mint-bg); color: var(--tint-mint-fg); }
.toast--error { background: var(--tint-danger-bg); color: var(--tint-danger-fg); }
.toast__close {
  min-width: var(--touch-min); min-height: var(--touch-min);
  border: 0; background: transparent; cursor: pointer; font-size: 22px; line-height: 1; color: inherit;
}
.auth-body .toasts { bottom: var(--space-4); }

/* ---------- Cards, lists, pills ---------- */
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.card__title { font-size: var(--fs-lg); font-weight: var(--fw-heavy); }
.card__subtitle { font-size: var(--fs-md); font-weight: var(--fw-heavy); margin-top: var(--space-4); }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-4); }
.muted { color: var(--color-text-muted); }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.list-row {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  padding: 12px 14px; border-radius: var(--radius-row); background: var(--color-surface-soft);
}
.list-row__body { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.list-row__title { font-weight: var(--fw-heavy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__link { text-decoration: none; }
.list-row__link:hover { text-decoration: underline; }
.list-row__meta { font-size: var(--fs-sm); color: var(--color-text-muted); }
.list-row__actions { display: flex; align-items: center; gap: var(--space-2); }

.avatar--neutral { background: var(--tint-neutral-bg); color: var(--tint-neutral-fg); }
.avatar--sky { background: var(--tint-sky-bg); color: var(--tint-sky-fg); }

.pill {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: var(--fs-sm); font-weight: var(--fw-heavy); white-space: nowrap;
}
.pill--mint { background: var(--tint-mint-bg); color: var(--tint-mint-fg); }
.pill--peach { background: var(--tint-peach-bg); color: var(--tint-peach-fg); }
.pill--butter { background: var(--tint-butter-bg); color: var(--tint-butter-fg); }
.pill--danger { background: var(--tint-danger-bg); color: var(--tint-danger-fg); }
.pill--neutral { background: var(--tint-neutral-bg); color: var(--tint-neutral-fg); }
.pill--sky { background: var(--tint-sky-bg); color: var(--tint-sky-fg); }
.pill--lavender { background: var(--tint-lavender-bg); color: var(--tint-lavender-fg); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); margin: var(--space-4) 0 0; }
.facts dt { font-size: var(--fs-sm); color: var(--color-text-muted); font-weight: var(--fw-bold); }
.facts dd { margin: 2px 0 0; font-weight: var(--fw-heavy); }

/* ---------- Buttons (extra) ---------- */
.btn--small { min-height: var(--touch-min); padding: 0 18px; font-size: var(--fs-base); }
.btn--soft { background: var(--color-primary-soft); color: var(--color-on-primary-soft); }
.btn--secondary { border: 2px solid var(--chart-track); }
.btn--danger-soft { background: var(--tint-danger-bg); color: var(--tint-danger-fg); }

/* ---------- Tiles and chips (selectable, real radio/checkbox inputs) ---------- */
.tile-group { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.tile-group__items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: var(--tile-min-h); padding: var(--space-3);
  border: var(--tile-border) solid transparent; border-radius: var(--radius-tile);
  background: var(--color-surface-soft); text-align: center; cursor: pointer;
}
.tile__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile__icon { color: var(--color-text-secondary); }
.tile__label { font-size: var(--fs-base); font-weight: var(--fw-bold); }
.tile__hint { font-size: var(--fs-xs); color: var(--color-text-muted); }
.tile:hover { background: var(--color-bg); }
.tile:has(.tile__input:checked) {
  border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-on-primary-soft);
}
.tile:has(.tile__input:checked) .tile__label { font-weight: var(--fw-heavy); }
.tile:has(.tile__input:checked) .tile__icon,
.tile:has(.tile__input:checked) .tile__hint { color: var(--color-on-primary-soft); }
.tile:has(.tile__input:focus-visible) { outline: 3px solid var(--color-primary); outline-offset: 2px; }

.tile-group--chip .tile-group__items, .chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tile--chip {
  min-height: var(--touch-min); min-width: var(--touch-min); padding: 0 14px;
  border-width: 2px; border-radius: var(--radius-pill); background: var(--color-surface);
}
.tile-group--chip .tile--chip { background: var(--color-surface-soft); }
.tile--chip .tile__label { font-size: var(--fs-sm); }
.tile--chip:has(.tile__input:checked) { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.chip-row { border: 0; margin: 0; padding: 0; }
.filter-bar__actions { display: flex; align-items: center; gap: var(--space-3); }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px;
  height: var(--search-h); padding: 0 18px; border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text-muted);
}
.search:focus-within { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: var(--fs-base); color: var(--color-text); }

/* ---------- Forms (extra) ---------- */
.form--narrow { max-width: 640px; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }  /* 2 columns from 768px */
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.form__actions--sticky {
  position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 10;
  padding: var(--space-3); border-radius: var(--radius-pill); background: var(--color-surface);
  box-shadow: 0 4px 18px rgb(22 48 43 / 0.1);
}
.field__help { font-size: var(--fs-sm); color: var(--color-text-muted); }
.input--textarea { min-height: 96px; padding: var(--space-3) var(--space-4); resize: vertical; line-height: 1.4; }
.input-file { font-size: var(--fs-sm); min-height: var(--touch-min); }
.check { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch-min); font-size: var(--fs-sm); }
.check input { width: 20px; height: 20px; accent-color: var(--color-primary); }
.logo-field { display: flex; align-items: flex-start; gap: var(--space-4); }
.logo-field__preview { border-radius: var(--radius-icon); object-fit: contain; background: var(--color-surface-soft); }
.logo-field__inputs { flex: 1; min-width: 0; }
.brand-mark--logo { object-fit: contain; background: var(--color-surface-soft); padding: 4px; }
.settings-form { gap: var(--page-gap); }
.form--inline { margin-top: var(--space-2); }

/* ---------- Phase 2: masters, students, import ---------- */
.tile--lg { min-height: var(--tile-lg-min-h); }
.tile--lg .tile__label { font-size: var(--fs-md); font-weight: var(--fw-heavy); }
.form__row--3 { grid-template-columns: 1fr; }
.alert > .icon { margin-top: 1px; }
.alert--sky { background: var(--tint-sky-bg); color: var(--tint-sky-fg); }
.alert--butter { margin: 0; }
.check--warn { color: var(--color-danger); font-weight: var(--fw-bold); }
.list-caption { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.plain-list { margin: var(--space-2) 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.plain-list--spaced { gap: var(--space-3); }
.prewrap { white-space: pre-line; }
.step {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-right: 6px;
  border-radius: 50%; background: var(--color-primary-soft); color: var(--color-on-primary-soft); font-size: var(--fs-base);
}

/* Chip buttons (date shortcuts) */
.chip {
  min-height: var(--touch-min); padding: 0 14px; border: 2px solid transparent; border-radius: var(--radius-pill);
  background: var(--color-surface-soft); font-size: var(--fs-sm); font-weight: var(--fw-bold); cursor: pointer;
}
.chip:hover { background: var(--color-bg); }
.chip.is-active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); }

/* Segmented page switch */
.segmented {
  display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px;
  border-radius: var(--radius-pill); background: var(--color-surface);
}
.segmented__item {
  display: inline-flex; align-items: center; min-height: var(--touch-min); padding: 0 20px;
  border-radius: var(--radius-pill); text-decoration: none; font-weight: var(--fw-bold); color: var(--color-text-secondary);
}
.segmented__item.is-active { background: var(--color-primary); color: var(--color-on-primary); }

/* Seats filled */
.load { display: inline-flex; flex-direction: column; gap: 4px; min-width: 72px; font-size: var(--fs-sm); }
.load__bar { display: block; height: 8px; border-radius: var(--radius-pill); background: var(--chart-track); overflow: hidden; }
.load__fill { display: block; height: 100%; width: 0; border-radius: var(--radius-pill); background: var(--chart-2); }
.load__fill.is-full { background: var(--chart-alert); }
.load__fill--10 { width: 10%; } .load__fill--20 { width: 20%; } .load__fill--30 { width: 30%; }
.load__fill--40 { width: 40%; } .load__fill--50 { width: 50%; } .load__fill--60 { width: 60%; }
.load__fill--70 { width: 70%; } .load__fill--80 { width: 80%; } .load__fill--90 { width: 90%; }
.load__fill--100 { width: 100%; }

/* Rows with a stacked body (bulk route change) and extra facts (students list) */
.list-row--stack { flex-direction: column; align-items: stretch; }
.list-row__head { display: flex; align-items: center; gap: var(--space-3); }
.row-facts { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.row-facts__item { display: flex; flex-direction: column; line-height: 1.3; }
.row-facts__label { font-size: var(--fs-xs); color: var(--color-text-muted); }
.row-facts__value { font-weight: var(--fw-heavy); }

/* Ordered stops */
.stops { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.stops__item {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  padding: 8px 10px 8px 14px; border-radius: var(--radius-row); background: var(--color-surface-soft);
}
.stops__seq {
  width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--tint-mint-bg); color: var(--tint-mint-fg); font-weight: var(--fw-heavy); font-size: var(--fs-sm);
}
.stops__body { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.stops__name { font-weight: var(--fw-heavy); }
.stops__time { font-size: var(--fs-sm); color: var(--color-text-muted); }
.stops__actions { display: flex; align-items: center; }
.stops__actions form { display: flex; }
.stops__edit { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.stops__edit .input { flex: 1 1 160px; min-height: var(--touch-min); }
.input--time { flex: 0 1 150px; }
.stops__add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); margin-top: var(--space-4); }
.stops__add-name { flex: 1 1 200px; }
.icon-button:disabled { opacity: 0.35; cursor: default; background: transparent; }

/* Timeline (student history) */
.timeline { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: flex; flex-direction: column; }
.timeline__item { position: relative; display: flex; gap: var(--space-3); padding-bottom: var(--space-4); }
.timeline__item:not(:last-child)::before {
  content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--chart-track);
}
.timeline__dot { flex: none; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; background: var(--chart-2); }
.timeline__dot--neutral { background: var(--chart-7); }
.timeline__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.timeline__when { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-text-muted); }
.timeline__title { font-weight: var(--fw-heavy); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.timeline__meta, .timeline__note { font-size: var(--fs-sm); color: var(--color-text-secondary); }

/* Two-column page (main + side) */
.split { display: flex; flex-direction: column; gap: var(--page-gap); }
.split__main, .split__side { display: flex; flex-direction: column; gap: var(--page-gap); min-width: 0; }
.facts--stack { grid-template-columns: 1fr; }

/* Import preview */
.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.summary__item { display: flex; flex-direction: column; padding: 18px 20px; border-radius: var(--radius-panel); }
.summary__value { font-size: var(--fs-2xl); font-weight: var(--fw-heavy); line-height: 1.1; }
.summary__label { font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.summary__item--mint { background: var(--tint-mint-bg); color: var(--tint-mint-fg); }
.summary__item--danger { background: var(--tint-danger-bg); color: var(--tint-danger-fg); }
.summary__item--butter { background: var(--tint-butter-bg); color: var(--tint-butter-fg); }
.summary__item--sky { background: var(--tint-sky-bg); color: var(--tint-sky-fg); }
.table-wrap { margin-top: var(--space-4); overflow-x: auto; border-radius: var(--radius-row); }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; vertical-align: top; white-space: nowrap; border-bottom: 1px solid var(--chart-track); }
.data-table thead th { background: var(--color-surface-soft); font-weight: var(--fw-heavy); }
.data-table td.has-error { background: var(--tint-danger-bg); color: var(--tint-danger-fg); white-space: normal; min-width: 160px; }
.data-table__error { display: block; font-weight: var(--fw-heavy); margin-top: 2px; }

.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table__note { display: block; font-size: var(--fs-xs); color: var(--color-text-muted); }
.data-table tr.is-credit td.num { color: var(--tint-mint-fg); font-weight: var(--fw-heavy); }
.data-table tr.is-reversed td { color: var(--color-text-muted); text-decoration: line-through; }
.data-table tr.is-reversed .data-table__note { text-decoration: none; }
.amount-due { color: var(--color-danger); }

/* ---------- Phase 4: Collect Fee and history (docs/ui collect-fee) ---------- */
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { text-decoration: underline; }
.page-header__actions--wide { flex: 1 1 320px; max-width: 420px; }

/* Student finder (type-ahead) */
.finder { position: relative; width: 100%; }
.finder .search { width: 100%; }
.finder__results:empty { display: none; }
.page-header .finder__results {
  position: absolute; left: 0; right: 0; top: calc(var(--search-h) + 6px); z-index: 30;
  padding: var(--space-2); border-radius: var(--radius-row); background: var(--color-surface);
  box-shadow: 0 10px 30px rgb(22 48 43 / 0.15);
}
.finder__list { margin-top: var(--space-3); }
.page-header .finder__list { margin-top: 0; }
.finder__row { text-decoration: none; color: inherit; flex-wrap: nowrap; }
.finder__row:hover, .finder__row:focus-visible { background: var(--color-primary-soft); }
.finder__empty { padding: var(--space-3); }

/* Mint student card */
.hero {
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--card-pad); border-radius: var(--radius-card);
  background: var(--tint-mint-bg); color: var(--color-text);
}
.hero__main { display: flex; align-items: center; gap: var(--space-4); }
.hero__avatar {
  width: 64px; height: 64px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-surface); color: var(--tint-mint-fg); font-size: var(--fs-xl); font-weight: var(--fw-heavy);
}
.hero__text { min-width: 0; }
.hero__name { font-size: var(--fs-xl); font-weight: var(--fw-heavy); line-height: 1.2; }
.hero__meta { font-size: 14px; color: var(--color-text-secondary); margin-top: 2px; }
.hero__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero__chips li {
  padding: 8px 14px; border-radius: var(--radius-pill); background: var(--color-surface);
  font-size: var(--fs-sm); font-weight: var(--fw-bold);
}

/* Amount due + month bubbles */
.due { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.due__label { font-size: 14px; font-weight: var(--fw-bold); color: var(--color-text-muted); }
.due__amount { font-size: var(--fs-3xl); font-weight: var(--fw-heavy); line-height: 1.1; color: var(--color-danger); }
.due__amount--clear { color: var(--tint-mint-fg); }
.due__amount--advance { color: var(--tint-sky-fg); }
.bubbles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.bubble {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-size: var(--fs-sm); font-weight: var(--fw-heavy); line-height: 1.2;
}
.bubble__text { font-size: 11px; font-weight: var(--fw-bold); }
.bubble--paid { background: var(--tint-mint-bg); color: var(--tint-mint-fg); }
.bubble--partial { background: var(--tint-butter-bg); color: var(--tint-butter-fg); }
.bubble--due { background: var(--tint-peach-bg); color: var(--tint-peach-fg); }
.bubble--more { background: var(--tint-neutral-bg); color: var(--tint-neutral-fg); }

/* Amount tiles: big rupee label, hint below */
.tile--amount .tile__label { font-size: 19px; font-weight: var(--fw-heavy); }
.tile--amount .tile__hint { font-size: var(--fs-xs); font-weight: var(--fw-bold); }

.paid-on summary { cursor: pointer; min-height: var(--touch-min); display: flex; align-items: center; font-size: 14px; font-weight: var(--fw-bold); color: var(--color-text-muted); }
.paid-on[open] summary { margin-bottom: var(--space-3); }
.paid-on .input { max-width: 260px; }

.sms-preview { padding: 16px 18px; border-radius: 20px; background: var(--color-sms-panel); }
.sms-preview__title { font-size: var(--fs-sm); font-weight: var(--fw-heavy); color: var(--tint-lavender-fg); margin-bottom: 4px; }
.sms-preview__text { font-size: 14px; color: var(--color-text); overflow-wrap: anywhere; }

.collect__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.collect__summary { font-size: 14px; font-weight: var(--fw-bold); color: var(--color-text-muted); }
.collect__summary strong { color: var(--color-text); }
.collect__foot .btn { flex: 1 1 220px; }

/* History */
.history { display: flex; flex-direction: column; gap: 14px; }
.chip--link { display: inline-flex; align-items: center; text-decoration: none; color: var(--color-text-secondary); background: var(--color-bg); }
.history__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.history__item { display: flex; align-items: flex-start; gap: var(--space-3); padding: 12px 14px; border-radius: var(--radius-row); background: var(--color-surface-soft); }
.history__icon {
  width: 36px; height: 36px; flex: none; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: var(--fw-heavy);
}
.history__icon--sky { background: var(--tint-sky-bg); color: var(--tint-sky-fg); }
.history__icon--mint { background: var(--tint-mint-bg); color: var(--tint-mint-fg); }
.history__icon--lavender { background: var(--tint-lavender-bg); color: var(--tint-lavender-fg); }
.history__icon--butter { background: var(--tint-butter-bg); color: var(--tint-butter-fg); }
.history__icon--danger { background: var(--tint-danger-bg); color: var(--tint-danger-fg); }
.history__body { flex: 1; min-width: 0; }
.history__title { font-size: 14px; font-weight: var(--fw-heavy); }
.history__meta { font-size: var(--fs-sm); color: var(--color-text-muted); overflow-wrap: anywhere; }
.history__action { min-height: 32px; font-size: var(--fs-sm); }
.history__date { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--color-text-muted); white-space: nowrap; }
.history__item.is-reversed .history__title { text-decoration: line-through; }
.history__item.is-reversed .pill { text-decoration: none; }

/* ---------- Phase 5: expenses (docs/ui add-expense) ---------- */
.month-pill {
  padding: 10px 18px; border-radius: var(--radius-pill); background: var(--color-surface);
  font-size: 14px; font-weight: var(--fw-bold); color: var(--color-text-secondary);
}
.month-pill strong { color: var(--color-text); font-weight: var(--fw-heavy); }
.tile__icon--tinted {
  width: 48px; height: 48px; border-radius: var(--radius-icon);
  display: inline-flex; align-items: center; justify-content: center;
}
.tone--mint { background: var(--tint-mint-bg); color: var(--tint-mint-fg); }
.tone--peach { background: var(--tint-peach-bg); color: var(--tint-peach-fg); }
.tone--butter { background: var(--tint-butter-bg); color: var(--tint-butter-fg); }
.tone--sky { background: var(--tint-sky-bg); color: var(--tint-sky-fg); }
.tone--lavender { background: var(--tint-lavender-bg); color: var(--tint-lavender-fg); }
.tone--neutral { background: var(--tint-neutral-bg); color: var(--tint-neutral-fg); }
.tile:has(.tile__input:checked) .tile__icon--tinted { color: inherit; }
.avatar--code {
  width: 46px; height: 40px; border-radius: 12px; font-size: var(--fs-xs);
  background: var(--tint-mint-bg); color: var(--tint-mint-fg);
}
.expense-amount { font-weight: var(--fw-heavy); white-space: nowrap; margin-left: auto; }
.expense-list .list-row { flex-wrap: nowrap; }
.list-row.is-void .list-row__title, .list-row.is-void .expense-amount { text-decoration: line-through; color: var(--color-text-muted); }
.list-row.is-void .pill { text-decoration: none; }
.date-range { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.more-filters { flex: 1 1 100%; }
.more-filters summary { cursor: pointer; min-height: var(--touch-min); display: inline-flex; align-items: center; font-weight: var(--fw-bold); color: var(--color-primary); }
.more-filters[open] summary { margin-bottom: var(--space-2); }
.more-filters__legend { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-text-muted); margin-bottom: 4px; }
.more-filters .chip-row + .chip-row { margin-top: var(--space-3); }
.date-range .field { flex: 1 1 160px; }

/* ---------- Phase 6: lists ---------- */
.report-cards { display: grid; grid-template-columns: 1fr; gap: var(--page-gap); }
.report-card { display: flex; flex-direction: column; gap: var(--space-2); text-decoration: none; color: inherit; }
.report-card:hover { outline: 3px solid var(--color-primary-soft); }
.report-card__icon { width: 48px; height: 48px; border-radius: var(--radius-icon); display: inline-flex; align-items: center; justify-content: center; }
.report-card__title { font-size: var(--fs-lg); font-weight: var(--fw-heavy); }
.report-card__text { color: var(--color-text-muted); font-size: 14px; }
.stat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.stat-tile {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; min-height: 86px;
  border: var(--tile-border) solid transparent; border-radius: var(--radius-panel); text-decoration: none;
}
.stat-tile__value { font-size: var(--fs-2xl); font-weight: var(--fw-heavy); line-height: 1.1; }
.stat-tile__label { font-size: 14px; font-weight: var(--fw-bold); }
.stat-tile--white { background: var(--color-surface); color: var(--color-text); }
.stat-tile--mint { background: var(--tint-mint-bg); color: var(--tint-mint-fg); }
.stat-tile--butter { background: var(--tint-butter-bg); color: var(--tint-butter-fg); }
.stat-tile--peach { background: var(--tint-peach-bg); color: var(--tint-peach-fg); }
.stat-tile--danger { background: var(--tint-danger-bg); color: var(--tint-danger-fg); }
.stat-tile--sky { background: var(--tint-sky-bg); color: var(--tint-sky-fg); }
.stat-tile.is-active { border-color: var(--color-primary); }
.stat-tile:hover { filter: brightness(0.98); }

.select-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  margin: var(--space-3) 0; padding: 8px 14px; border-radius: var(--radius-row); background: var(--color-surface-soft);
}
.select-bar__count { font-size: var(--fs-sm); font-weight: var(--fw-heavy); margin-right: auto; }

.student-rows { gap: 10px; }
.student-row {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "avatar who" "contact contact" "monthly balance" "end end";
  gap: 10px 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius-row); background: var(--color-surface-soft);
}
.student-row:has(.student-row__pick) { grid-template-columns: auto auto 1fr; grid-template-areas: "pick avatar who" "contact contact contact" "monthly monthly balance" "end end end"; }
.student-row__pick { grid-area: pick; display: inline-flex; align-items: center; justify-content: center; min-width: var(--touch-min); min-height: var(--touch-min); }
.student-row__pick input { width: 20px; height: 20px; accent-color: var(--color-primary); }
.student-row > .avatar { grid-area: avatar; }
.student-row__who { grid-area: who; min-width: 0; display: flex; flex-direction: column; }
.student-row__contact { grid-area: contact; display: flex; flex-direction: column; font-size: 14px; min-width: 0; }
.student-row__money { display: flex; flex-direction: column; }
.student-row__monthly { grid-area: monthly; }
.student-row__balance { grid-area: balance; }
.student-row__end { grid-area: end; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

/* ---------- Phase 7: dashboard (docs/ui dashboard) ---------- */
.month-picker { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
.month-picker .chip { flex: none; }
.quick-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }  /* one column on phones (docs/ui mobile) */
.quick-action {
  display: flex; align-items: center; gap: var(--space-3); min-height: 72px; padding: 14px 16px;
  border-radius: var(--radius-panel); background: var(--color-surface); color: var(--color-text);
  text-decoration: none; font-size: var(--fs-md); font-weight: var(--fw-heavy);
}
.quick-action__icon {
  width: 44px; height: 44px; flex: none; border-radius: var(--radius-icon);
  display: inline-flex; align-items: center; justify-content: center; background: var(--tint-sky-bg); color: var(--tint-sky-fg);
}
.quick-action--primary { background: var(--color-primary); color: var(--color-on-primary); }
.quick-action--primary .quick-action__icon { background: var(--color-surface); color: var(--color-primary); }
.quick-action.is-disabled { color: var(--color-text-muted); }
.quick-action:not(.is-disabled):hover { outline: 3px solid var(--color-primary-soft); }

.stat-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
@media (min-width: 600px) {
  .quick-actions, .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--radius-panel); min-width: 0; }
.stat-card__label { font-size: 14px; font-weight: var(--fw-bold); }
.stat-card__value { font-size: var(--fs-2xl); font-weight: var(--fw-heavy); line-height: 1.15; white-space: nowrap; }
.stat-card__suffix { font-size: var(--fs-md); }
.stat-card__sub { font-size: var(--fs-sm); }
.stat-card__link { font-size: var(--fs-sm); font-weight: var(--fw-heavy); color: inherit; min-height: 32px; display: inline-flex; align-items: center; }
.stat-card--mint { background: var(--tint-mint-bg); color: var(--tint-mint-fg); }
.stat-card--peach { background: var(--tint-peach-bg); color: var(--tint-peach-fg); }
.stat-card--sky { background: var(--tint-sky-bg); color: var(--tint-sky-fg); }
.stat-card--lavender { background: var(--tint-lavender-bg); color: var(--tint-lavender-fg); }

.progress-card { display: flex; flex-direction: column; gap: var(--space-3); }
.progress-card .card__head { flex-wrap: wrap; }
.progress { height: 22px; border-radius: var(--radius-pill); background: var(--tint-peach-bg); overflow: hidden; }
.progress__fill { height: 100%; width: 0; border-radius: var(--radius-pill); background: var(--color-primary); }
.timeline-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px;
  font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--color-text-muted); }
.left-dues { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: 8px 12px; border-radius: var(--radius-row);
  background: var(--tint-neutral-bg); color: var(--tint-neutral-fg); font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.left-dues .link { margin-left: auto; min-height: 32px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--page-gap); align-items: start; }
.dash-stack { display: flex; flex-direction: column; gap: var(--page-gap); }
.route-dues { margin-top: var(--space-3); }
.route-due { flex-wrap: nowrap; }
.route-due__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.route-due__head { display: flex; justify-content: space-between; gap: var(--space-2); font-weight: var(--fw-bold); }
.route-due__count { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--color-text-muted); white-space: nowrap; }
.segmented--small { padding: 3px; background: var(--color-bg); }
.segmented--small .segmented__item { min-height: 36px; padding: 0 14px; border: 0; background: transparent; font-size: var(--fs-sm); cursor: pointer; }
.segmented--small .segmented__item.is-active { background: var(--color-surface); color: var(--color-primary); }

.donut { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); margin-top: var(--space-3); }
.donut__chart { flex: none; }
.donut__track { stroke: var(--chart-track); }
.donut__caption { font-size: 3px; fill: var(--color-text-muted); font-weight: 700; }
.donut__total { font-size: 4.2px; fill: var(--color-text); font-weight: 800; }
.donut__legend { flex: 1 1 200px; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.donut__legend li { display: flex; align-items: center; gap: var(--space-2); }
.donut__name { flex: 1; }
.donut__dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.stroke--chart-1 { stroke: var(--chart-1); } .fill--chart-1 { background: var(--chart-1); }
.stroke--chart-2 { stroke: var(--chart-2); } .fill--chart-2 { background: var(--chart-2); }
.stroke--chart-3 { stroke: var(--chart-3); } .fill--chart-3 { background: var(--chart-3); }
.stroke--chart-4 { stroke: var(--chart-4); } .fill--chart-4 { background: var(--chart-4); }
.stroke--chart-5 { stroke: var(--chart-5); } .fill--chart-5 { background: var(--chart-5); }
.stroke--chart-6 { stroke: var(--chart-6); } .fill--chart-6 { background: var(--chart-6); }
.stroke--chart-7 { stroke: var(--chart-7); } .fill--chart-7 { background: var(--chart-7); }

.rings { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.ring { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ring__track { stroke: var(--chart-track); }
.ring__fill { stroke: var(--color-primary); stroke-linecap: round; }
.ring--alert .ring__fill { stroke: var(--chart-alert); }
.ring__text { font-size: 7px; font-weight: 800; fill: var(--color-text); }
.ring__label { font-size: var(--fs-sm); font-weight: var(--fw-heavy); }

.sms-card { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.sms-card__icon { width: 48px; height: 48px; border-radius: var(--radius-icon); display: inline-flex; align-items: center; justify-content: center; }
.sms-card__title { font-size: var(--fs-lg); font-weight: var(--fw-heavy); }
.sms-card__link { margin-left: auto; font-size: var(--fs-sm); font-weight: var(--fw-bold); }

.sidebar-note { padding: 12px 16px; border-radius: 20px; background: var(--color-sms-panel); color: var(--tint-lavender-fg); font-size: var(--fs-sm); }
.sidebar-note__title { font-weight: var(--fw-heavy); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-3); margin-top: var(--space-4); }
.pagination__info { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-text-muted); }

/* ---------- Desktop: floating sidebar ---------- */
@media (min-width: 768px) {
  .topbar, .tabbar, .drawer-backdrop, .sidebar__close { display: none !important; }
  .menu-open { overflow: auto; }

  .app-shell {
    display: flex; align-items: flex-start; gap: var(--page-gap);
    padding: var(--page-gap);
  }
  .sidebar {
    position: sticky; top: var(--page-gap); inset: auto;
    flex: 0 0 var(--sidebar-w); width: var(--sidebar-w);
    max-height: calc(100vh - 2 * var(--page-gap));
    border-radius: var(--radius-card);
    transform: none; visibility: visible; transition: none;
  }
  .main { flex: 1; }
  .page-header__title { font-size: var(--fs-2xl); }
  .tile-group__items { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .form__actions--sticky { bottom: var(--page-gap); }
  .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile-group--lg .tile-group__items { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .list-row .row-facts { flex: 1 1 320px; justify-content: flex-end; }
  .stat-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .report-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-actions, .stat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .toasts { left: auto; right: var(--page-gap); bottom: var(--page-gap); width: 380px; }
}

@media (min-width: 1100px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-row { grid-template-columns: auto minmax(150px, 1.3fr) minmax(170px, 1.4fr) 110px 110px auto; grid-template-areas: "avatar who contact monthly balance end"; }
  .student-row:has(.student-row__pick) { grid-template-columns: auto auto minmax(150px, 1.3fr) minmax(170px, 1.4fr) 110px 110px auto; grid-template-areas: "pick avatar who contact monthly balance end"; }
  .student-row__end { justify-content: flex-end; }
  .split { flex-direction: row; align-items: flex-start; }
  .split__main { flex: 1 1 0; }
  .split__side { flex: 0 0 360px; }
  .split--collect .split__main { flex: 3 1 0; }
  .split--collect .split__side { flex: 2 1 340px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .sidebar.is-open { transition: none; }
}
