/* A learning centre's screens: the month's fees (tu-), the rooms' week (rm-), the season's funnel (en-), the pupil's study on
   his card (st-), the lesson's journal in the roster (jr-). Colours by the theme's tokens; the state words carry the meaning,
   the colour only repeats it. */

/* ---------- the month's fees ---------- */
.tu-page { display: grid; gap: 16px; }
.tu-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tu-month { display: flex; align-items: center; gap: 6px; }
.tu-month__title { min-width: 170px; text-align: center; font-family: var(--font-display); font-size: 22px; font-weight: var(--display-weight); letter-spacing: var(--display-tracking); }
.tu-top__hint { font-size: 13px; }

.tu-kpis { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 10px; }
.tu-kpi { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.tu-kpi small { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.tu-kpi b { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.tu-kpi--main { background: var(--hero-bg, var(--ink)); border-color: transparent; color: #fff; }
.tu-kpi--main small { color: var(--hero-muted, rgba(255, 255, 255, .7)); }
.tu-kpi--main b { font-size: 30px; }
.tu-kpi--bad b { color: var(--bad); }
.tu-kpi--bad.is-zero b { color: var(--ok); }
.tu-meter { position: relative; display: block; height: 8px; border-radius: 99px; background: color-mix(in srgb, currentColor 16%, transparent); overflow: hidden; }
.tu-meter i { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: inherit; background: var(--ok); transition: width .4s ease-out; }
.tu-kpi--main .tu-meter { margin: 4px 0 2px; background: rgba(255, 255, 255, .16); }
.tu-kpi--main .tu-meter i { background: #6ee7a8; }
.tu-meter--thin { height: 4px; margin: 0 16px 6px; color: var(--ink-3); }

.tu-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tu-bar .chip b { font-weight: 700; opacity: .7; }
.tu-groups { display: grid; gap: 12px; }
.tu-group { overflow: hidden; }
.tu-group__head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 8px; }
.tu-group__dot { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--ink-3)); }
.tu-group__name { display: grid; flex: 1; min-width: 0; }
.tu-group__name b { font-size: 15px; }
.tu-group__name small, .tu-group__sum small { font-size: 12px; }
.tu-group__sum { display: grid; justify-items: end; }

.tu-rows > .tu-row + .tu-row { border-top: 1px solid var(--line-soft); }
.tu-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(120px, .8fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 16px; }
.tu-row__who { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.tu-row__name { display: grid; min-width: 0; }
.tu-row__name b, .tu-row__name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tu-row__name small { font-size: 12px; }
.tu-state { display: grid; gap: 1px; }
.tu-state b { font-size: 14px; }
.tu-state small { font-size: 12px; color: var(--ink-3); }
.tu-state.is-paid b { color: var(--ok); }
.tu-state.is-paid b::before { content: "✓ "; }
.tu-state.is-debt b { color: var(--bad); }
.tu-state.is-waiting b { color: var(--warn); }
.tu-state.is-none b, .tu-state.is-ahead b { color: var(--ink-3); }
.tu-row__note { display: grid; font-size: 12.5px; min-width: 0; }
.tu-row.has-arrears .tu-row__note > span { color: var(--bad); font-weight: 600; }
.tu-row__actions { display: flex; gap: 6px; justify-content: flex-end; }

.tu-months { display: grid; gap: 6px; }
.tu-month-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.tu-month-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.tu-month-opt.is-debt .tu-month-opt__name small { color: var(--bad); font-weight: 600; }
.tu-month-opt__name { display: grid; flex: 1; }
.tu-month-opt__name small { font-size: 12px; }
.tu-month-opt input { width: 18px; height: 18px; accent-color: var(--accent); }

.tu-sent { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.tu-manual { display: grid; gap: 8px; margin-top: 8px; }
.tu-manual__row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tu-manual__row.is-done { opacity: .55; }
.tu-manual__who { display: grid; flex: 1; min-width: 0; }
.tu-manual__who small { font-size: 12px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

@media (max-width: 900px) {
  .tu-kpis { grid-template-columns: 1fr 1fr; }
  .tu-kpi--main { grid-column: 1 / -1; }
  .tu-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .tu-row__note { grid-column: 1 / -1; }
  .tu-row__note:empty, .tu-row__note:has(span:empty):has(small:empty) { display: none; }
  .tu-row__actions { grid-column: 1 / -1; justify-content: stretch; }
  .tu-row__actions .btn { flex: 1; }
  .tu-row__actions [hidden] { display: none; }
  .tu-state { justify-items: end; text-align: right; }
}

/* ---------- the rooms' week ---------- */
.rm-page { display: grid; gap: 14px; }
.rm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rm-days button { display: inline-flex; align-items: baseline; gap: 4px; }
.rm-days small { font-size: 11px; color: var(--ink-3); }
.rm-loads { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.rm-load { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.rm-load__name { display: grid; }
.rm-load__name small { font-size: 12px; }
.rm-load .tu-meter { grid-column: 1 / -1; color: var(--ink-3); height: 6px; }
.rm-load .tu-meter i { background: var(--accent); }
.rm-load__pct { grid-row: 1; grid-column: 2; font-weight: 700; }
.rm-warn { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: 13px; }

.rm-grid { display: grid; grid-template-columns: 52px repeat(var(--rooms, 1), minmax(132px, 1fr)); grid-template-rows: 40px repeat(var(--rows, 24), 24px);
  overflow-x: auto; padding-bottom: 8px; }
.rm-hour { grid-column: 1; grid-row: var(--r) / span 2; align-self: start; padding: 0 6px; font-size: 11px; color: var(--ink-3); transform: translateY(-7px); }
.rm-head { grid-column: var(--c); grid-row: 1; align-self: center; padding: 0 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-lane { grid-column: var(--c); grid-row: 2 / -1; border-left: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px 48px); }
.rm-block { grid-column: var(--c); grid-row: var(--r1) / var(--r2); z-index: 1; display: grid; align-content: start; gap: 1px; min-width: 0; margin: 2px 5px;
  padding: 5px 8px; border-left: 3px solid var(--tone, var(--accent)); border-radius: var(--radius-xs); overflow: hidden; color: var(--ink);
  background: color-mix(in srgb, var(--tone, var(--accent)) 14%, var(--bg)); font-size: 12px; }
.rm-block b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-block small { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-gap { grid-column: var(--c); grid-row: var(--r1) / var(--r2); display: grid; place-items: center; margin: 3px 7px; border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-xs); color: var(--ink-3); font-size: 11px; text-align: center; }
.rm-free { padding: 4px 0; }
.rm-free__row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 9px 14px; font-size: 13px; }
.rm-free__row + .rm-free__row { border-top: 1px solid var(--line-soft); }
.rm-free__list { color: var(--ink-2); }
@media (max-width: 700px) { .rm-free__row { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- the season's funnel ---------- */
.en-page { display: grid; gap: 6px; }
.en-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.en-intro { max-width: 640px; font-size: 13.5px; }
.en-funnel { display: grid; gap: 6px; margin: 12px 0 0; padding: 16px; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.en-step { display: grid; grid-template-columns: 170px 1fr 64px; align-items: center; gap: 12px; }
.en-step__label { font-size: 13.5px; color: var(--ink-2); }
.en-step__track { display: flex; justify-content: center; }
.en-step__bar { display: grid; place-items: center; width: var(--w, 0%); min-width: 44px; height: 40px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) calc(100% - var(--i, 0) * 18%), var(--bg)); color: var(--accent-ink); transition: width .4s ease-out; }
.en-step__bar b { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.en-step__conv { justify-self: end; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.en-step__conv:empty { visibility: hidden; }
.en-list > .en-row + .en-row { border-top: 1px solid var(--line-soft); }
.en-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 14px; }
.en-row__who { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.en-row__name, .en-row__what { display: grid; min-width: 0; }
.en-row__name small, .en-row__what small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.en-row__actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.en-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.en-trow { display: grid; grid-template-columns: minmax(0, 1.3fr) 70px 70px minmax(110px, 1fr); align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; }
.en-trow + .en-trow { border-top: 1px solid var(--line-soft); }
.en-trow--head { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.en-trow--head b { font-weight: 600; }
.en-trow--head .tu-meter { display: none; }
.en-trow__conv { display: grid; grid-template-columns: 1fr 40px; align-items: center; gap: 8px; color: var(--ink-3); }
.en-trow__conv .tu-meter { height: 6px; }
.en-trow__conv .tu-meter i { background: var(--accent); }
.en-trow__conv b { text-align: right; color: var(--ink); }
.en-groups { display: grid; gap: 6px; }
.en-groups .is-full { opacity: .5; }
@media (max-width: 900px) {
  .en-step { grid-template-columns: 110px 1fr 52px; gap: 8px; }
  .en-step__label { font-size: 12.5px; }
  .en-split { grid-template-columns: 1fr; }
  .en-row { grid-template-columns: minmax(0, 1fr); }
  .en-row__actions { justify-content: stretch; }
  .en-row__actions .btn { flex: 1; }
}

/* ---------- the pupil's study on his card ---------- */
.st-head-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.st-fees { display: grid; gap: 8px; margin-bottom: 10px; }
.st-fee { display: grid; gap: 10px; padding: 12px 14px; }
.st-fee__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-fee__name { display: grid; flex: 1; min-width: 160px; }
.st-fee__name small { font-size: 12px; }
.st-fee__actions { display: flex; gap: 6px; }
.st-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.st-m { display: grid; justify-items: center; gap: 2px; padding: 7px 4px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); }
.st-m small { font-size: 11px; color: var(--ink-3); text-transform: capitalize; }
.st-m b { font-size: 13px; }
.st-m.is-paid { background: var(--ok-soft); border-color: transparent; }
.st-m.is-paid b { color: var(--ok); }
.st-m.is-debt { background: var(--bad-soft); border-color: transparent; }
.st-m.is-debt b { color: var(--bad); }
.st-m.is-waiting { background: var(--warn-soft); border-color: transparent; }
.st-m.is-waiting b { color: var(--warn); }
.st-m.is-ahead { border-style: dashed; }
.st-m.is-ahead b { color: var(--ink-3); font-weight: 600; }
.st-m.is-now { box-shadow: 0 0 0 2px var(--accent); }
.st-exams { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.st-exam { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.st-exam__head { display: flex; align-items: baseline; gap: 8px; }
.st-exam__name { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.st-exam__last { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.st-exam__change { font-size: 12.5px; font-weight: 700; color: var(--ok); }
.st-exam__change:empty { display: none; }
.st-exam__plot { height: 80px; }
.st-exam__svg { width: 100%; height: 100%; overflow: visible; }
.st-exam__area { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.st-exam__line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.st-exam__dot { fill: var(--bg); stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.st-exam__target { stroke: var(--ok); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.st-exam__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-exam__target-btn { padding: 3px 9px; border-radius: 99px; border: 1px dashed var(--ok); color: var(--ok); font-size: 12px; font-weight: 600; background: transparent; cursor: pointer; }
.st-exam__target-btn:disabled { cursor: default; }
.st-exam__left { font-size: 12px; color: var(--ink-2); }
.st-exam.is-reached .st-exam__left { color: var(--ok); font-weight: 700; }
.st-exam__dates { display: flex; justify-content: space-between; font-size: 11px; }
.st-report-opts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.st-report-opts .segmented button { text-transform: capitalize; }
.st-report-text { min-height: 200px; font-size: 14px; line-height: 1.5; resize: vertical; }

/* ---------- the lesson's journal in the roster ---------- */
.jr-journal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; position: relative; }
.jr-saved { position: absolute; right: 0; top: -2px; font-size: 11.5px; color: var(--ok); }
.jr-head-actions { display: flex; align-items: center; gap: 8px; }
.jr-grade { width: auto; min-width: 64px; height: 32px; padding: 0 26px 0 10px; font-size: 13px; font-weight: 700; }
.jr-grade.has-grade { border-color: var(--accent); color: var(--accent-text); }
.roster-row__membership.is-ok { color: var(--ok); }
@media (max-width: 700px) { .jr-journal { grid-template-columns: 1fr; } }

/* ---------- groups: a pupil's fee, the group's mock exam ---------- */
.gx-fee { font-size: 12px; color: var(--ink-2); }
.gx-fee.is-own { color: var(--ok); font-weight: 700; }
.gx-foot { flex-wrap: wrap; }
.gx-foot__more { display: flex; gap: 4px; margin-right: auto; flex-wrap: wrap; }
.gx-list { display: grid; gap: 6px; }
.gx-row { display: grid; grid-template-columns: 1fr 110px; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.gx-row__name { display: grid; min-width: 0; }
.gx-row__name small { font-size: 12px; }
.gx-row input { text-align: right; font-weight: 700; }

/* ---------- a club's door ---------- */
.ci-page { display: grid; gap: 14px; }
.ci-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ci-search { display: flex; gap: 8px; }
.ci-search__wrap { flex: 1; }
.ci-search__input { height: 52px; font-size: 17px; border-radius: var(--radius); }
.ci-scan { height: 52px; }
.ci-stats { display: flex; gap: 8px; }
.ci-stat { display: grid; gap: 1px; min-width: 96px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.ci-stat small { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.ci-stat b { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.ci-stat--main { background: var(--hero-bg, var(--ink)); border-color: transparent; color: #fff; }
.ci-stat--main small { color: var(--hero-muted, rgba(255, 255, 255, .7)); }
.ci-results { display: grid; gap: 6px; }
.ci-results:empty { display: none; }
.ci-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); text-align: left; cursor: pointer; }
.ci-option:hover { border-color: var(--line-strong); }
.ci-option__name { display: grid; flex: 1; min-width: 0; }
.ci-option__name small { font-size: 12px; }
.ci-pill { padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.ci-pill.is-ok { background: var(--ok-soft); color: var(--ok); }
.ci-pill.is-bad { background: var(--bad-soft); color: var(--bad); }
.ci-pill:empty { display: none; }

.ci-door { display: grid; gap: 14px; padding: 18px; animation: ci-in .18s ease-out; }
@keyframes ci-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .ci-door { animation: none; } }
.ci-door__head { display: flex; align-items: center; gap: 14px; }
.ci-door__who { display: grid; flex: 1; min-width: 0; }
.ci-door__name { color: inherit; font-family: var(--font-display); font-size: 22px; }
.ci-door__who small { font-size: 13px; }
.ci-verdict { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 12px; padding: 14px 16px; border-radius: var(--radius); }
.ci-verdict .ic { grid-row: span 2; width: 30px; height: 30px; }
.ci-verdict b { font-size: 18px; }
.ci-verdict small { font-size: 13px; }
.ci-verdict small:empty { display: none; }
.ci-verdict.is-ok { background: var(--ok-soft); color: var(--ok); }
.ci-verdict.is-warn { background: var(--warn-soft); color: var(--warn); }
.ci-verdict.is-bad { background: var(--bad-soft); color: var(--bad); }
.ci-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.ci-facts div { display: grid; gap: 2px; min-width: 0; }
.ci-facts dt { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.ci-facts dd { margin: 0; font-weight: 600; font-size: 14px; }
.ci-door__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ci-door__actions .btn { flex: 1; min-width: 180px; }
.ci-go { background: var(--ok); border-color: var(--ok); color: #fff; }

.ci-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0 16px; align-items: start; }
.ci-split > .section { margin-top: 6px; }
@media (max-width: 1000px) { .ci-split { grid-template-columns: 1fr; } }
.ci-list > .ci-visit + .ci-visit { border-top: 1px solid var(--line-soft); }
.ci-visit { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 14px; }
.ci-visit__time { font-size: 15px; }
.ci-visit__who { display: grid; min-width: 0; color: inherit; }
.ci-visit__who small { font-size: 12px; }
.ci-heat-note { font-size: 13px; }
.ci-heat { display: grid; grid-template-columns: 34px repeat(17, minmax(14px, 1fr)) 44px; gap: 3px; padding: 14px; overflow-x: auto; }
.ci-heat__h { font-size: 10.5px; color: var(--ink-3); text-align: left; }
.ci-heat__d { font-size: 12px; align-self: center; }
.ci-heat__c { height: 26px; border-radius: 4px; background: color-mix(in srgb, var(--accent) calc(var(--a, 0) * 100%), var(--surface)); }
.ci-heat__n { align-self: center; justify-self: end; font-size: 12px; }
.ci-cam { position: relative; overflow: hidden; border-radius: var(--radius); background: #000; aspect-ratio: 4 / 3; }
.ci-cam video { width: 100%; height: 100%; object-fit: cover; }
.ci-cam__frame { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 18px; }
@media (max-width: 760px) {
  .ci-top { grid-template-columns: 1fr; }
  .ci-stats .ci-stat { flex: 1; min-width: 0; }
  .ci-facts { grid-template-columns: 1fr 1fr; }
  .ci-scan span { display: none; }
}

/* ---------- who is slipping away ---------- */
.rt-page { display: grid; gap: 12px; }
.rt-intro { max-width: 680px; font-size: 13.5px; }
.rt-stats { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 10px; }
.rt-stat { display: grid; align-content: start; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); text-align: left; }
button.rt-stat { cursor: pointer; }
.rt-stat small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.rt-stat b { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.rt-stat[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rt-stat--main { background: var(--hero-bg, var(--ink)); border-color: transparent; color: #fff; }
.rt-stat--main small { color: var(--hero-muted, rgba(255, 255, 255, .7)); }
.rt-hint { margin: 0; }
.rt-list > .rt-row + .rt-row { border-top: 1px solid var(--line-soft); }
.rt-row { display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(0, 1fr) minmax(120px, .8fr) auto; align-items: center; gap: 12px; padding: 9px 14px; }
.rt-row__who { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.rt-row__name, .rt-row__m, .rt-row__last { display: grid; min-width: 0; }
.rt-row__name small, .rt-row__m small, .rt-row__last small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-row.is-long .rt-row__last b { color: var(--bad); }
.rt-row__actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
@media (max-width: 900px) {
  .rt-stats { grid-template-columns: 1fr 1fr; }
  .rt-row { grid-template-columns: minmax(0, 1fr) auto; }
  .rt-row__m { grid-column: 1 / -1; }
  .rt-row__actions { grid-column: 1 / -1; justify-content: stretch; }
  .rt-row__actions .btn { flex: 1; }
}

/* ---------- the member's club card ---------- */
.club { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px; }
.club__qr { padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.club__qr svg { display: block; width: 100%; height: auto; }
.club__body { display: grid; align-content: start; gap: 6px; }
.club__no { font-size: 15px; }
.club__no:empty { display: none; }
.club__hint { margin: 0; font-size: 13px; }
.club__last { margin: 0; font-size: 13px; font-weight: 600; }
.club__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
@media (max-width: 520px) { .club { grid-template-columns: 110px 1fr; } }

/* the pages' grids never wider than the phone: a row of chips scrolls inside itself */
.tu-page, .ci-page, .rm-page, .en-page, .rt-page { grid-template-columns: minmax(0, 1fr); }
.tu-bar .chips { min-width: 0; flex: 1 1 auto; }
@media (max-width: 520px) { .tu-bar .btn { width: 100%; } }
.rm-days { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.rm-days::-webkit-scrollbar { display: none; }
@media (max-width: 520px) { .rm-days button { padding-inline: 8px; } .rm-top .btn { width: 100%; } }
@media (max-width: 1000px) { .ci-split { grid-template-columns: minmax(0, 1fr); } }
.ci-split > .section { min-width: 0; }
@media (max-width: 900px) {
  .rt-row__actions { flex-wrap: wrap; }
  .rt-row__actions .btn { flex: 1 1 40%; }
}
