/* club area: styles specific to these pages. Shared blocks live in ui-components.css. */

/* ---------- Cards with a list inside (head, rows, a form at the foot) ---------- */
.surface__title { display: flex; align-items: center; gap: var(--space-10); min-width: 0; }
.surface__title .h3 { margin: 0; }
.surface__count { font-size: var(--text-md); font-weight: 500; color: var(--text-muted); }
.surface--flush > .surface__body { padding: var(--space-16) var(--space-20); }
.surface--flush > .surface__body > .muted { font-size: var(--text-base); }

.surface__foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  padding: var(--space-16) var(--space-20) var(--space-16);
  background: var(--canvas);
  border-top: 1px solid var(--line-fine);
}

.surface__foot-title { font-size: var(--text-md); font-weight: 600; color: var(--ink); }
.surface__foot .muted { font-size: var(--text-sm); }
.surface__foot .inline-form .btn,
.surface .inline-form .btn { min-height: 48px; }

.plain-list { margin: 0; padding: 0; list-style: none; }
.card-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }

/* An empty list inside a card: one quiet line instead of a dashed box. */
.card-empty { display: flex; align-items: center; gap: var(--space-12); padding: var(--space-20); font-size: var(--text-base); color: var(--text-muted); }
.card-empty .icon { flex: none; color: var(--status-inactive); }

/* Payment rows inside a flush card: the card is the frame. */
.payment-list--bare { border: 0; border-radius: 0; box-shadow: none; }
.payment-row__badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); margin-top: var(--space-4); }
.payment-row__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }

.list-row form,
.payment-row form { margin: 0; }

/* ---------- Toolbar: filter tabs and a search above a list ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}

.toolbar__search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); flex: 1 1 420px; justify-content: flex-end; }
.toolbar__search .field__select { flex: 0 1 200px; width: auto; min-width: 150px; }
.toolbar__field { position: relative; flex: 1 1 220px; max-width: 340px; }
.toolbar__field .input { width: 100%; padding-left: var(--space-40); }
.toolbar__field .icon { position: absolute; left: 14px; top: 50%; color: var(--text-muted); transform: translateY(-50%); pointer-events: none; }
.toolbar__count { font-size: var(--text-md); color: var(--text-muted); }

@media (max-width: 719px) {
  .toolbar > .tabs { flex: 1 1 100%; }
  .toolbar__search .field__select { flex: 1 1 100%; width: 100%; }
  .toolbar__field { max-width: none; }
}

/* Tabs that sit on the page (months, report types, statuses). */
.tabs--fit { align-self: flex-start; }

/* ---------- People in tables and lists ---------- */
.person-cell { display: flex; align-items: center; gap: var(--space-12); min-width: 0; }
.person-cell__text { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.person-cell__name { font-size: var(--text-base); font-weight: 600; color: var(--ink); overflow-wrap: break-word; }
a.person-cell__name:hover { color: var(--purple); }
.person-cell__meta { font-size: var(--text-sm); color: var(--text-muted); }

/* The member table turns into stacked rows on phones: name first, groups and status below. */
@media (max-width: 719px) {
  .rtable thead { display: none; }
  .rtable,
  .rtable tbody { display: block; }

  .rtable tr {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-6) var(--space-8);
    padding: var(--space-14) var(--space-40) var(--space-14) var(--space-16);
    border-bottom: 1px solid var(--line-fine);
  }

  .rtable tr:last-child { border-bottom: 0; }
  .rtable td { display: block; padding: 0; border: 0; }
  .rtable td.rtable__main { flex: 1 0 100%; }
  .rtable td.rtable__secondary { font-size: var(--text-sm); color: var(--text-muted); }
  .rtable td.rtable__main + td.rtable__secondary { padding-left: var(--space-48); }
  .rtable td.rtable__secondary:empty,
  .rtable .rtable__wide-only { display: none; }
  .rtable td.chevron-cell { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
  .rtable tbody tr:hover td { background: none; }
}

/* ---------- Dashboard ---------- */
.stat__hint { display: inline-flex; align-items: center; gap: var(--space-4); margin-top: var(--space-2); font-size: var(--text-sm); font-weight: 500; color: var(--purple); }

.time-chip {
  flex: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 48px;
  padding: 0 var(--space-8);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--purple-deep);
  background: var(--lilac);
  border-radius: var(--radius-sm);
}

.time-chip__sub { font-family: var(--font-body); font-size: var(--text-2xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--purple); }
.time-chip--muted { color: var(--text-muted); background: var(--canvas); }
.time-chip--muted .time-chip__sub { color: var(--text-muted); }

/* ---------- Overview (US-4.14): what is next, what waits, how the club is doing ---------- */
.overview-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-16) var(--space-24); margin-bottom: var(--space-28); }
.overview-head__text { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.overview-head__date { margin: 0; font-size: var(--text-md); color: var(--text-muted); }
.overview-head__title { margin: 0; font-family: var(--font-display); font-size: var(--text-display-sm); line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
.overview-head__lead { margin: 0; font-size: var(--text-lg); color: var(--text); }
.overview-head__actions { display: flex; flex-wrap: wrap; gap: var(--space-10); }

.overview { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--space-24); align-items: start; margin-bottom: var(--space-32); }
.overview__main, .overview__side { display: flex; flex-direction: column; gap: var(--space-24); min-width: 0; }

.club-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  padding: var(--space-24);
  background: var(--white);
  border: var(--border-hairline) solid var(--line-fine);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}

.club-panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); }
.club-panel__title { margin: 0; font-family: var(--font-display); font-size: var(--text-4xl); color: var(--ink); }
.club-panel__link { display: inline-flex; align-items: center; gap: var(--space-6); min-height: 44px; font-size: var(--text-md); font-weight: 600; color: var(--purple-deep); text-decoration: none; }
.club-panel__link:hover { color: var(--ink); }

.club-panel-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); padding: var(--space-12) 0; text-align: center; }
.club-panel-empty__icon { display: grid; place-items: center; width: 56px; height: 56px; color: var(--purple); background: var(--lilac); border-radius: 50%; }
.club-panel-empty--done .club-panel-empty__icon { color: var(--success-text); background: var(--success-bg); }
.club-panel-empty__title { font-weight: 600; color: var(--ink); }
.club-panel-empty__body { max-width: 36ch; font-size: var(--text-md); color: var(--text-muted); }

/* The next training. */
.next-session__eyebrow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); }
.next-session__label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin: 0; font-size: var(--text-md); font-weight: 600; color: var(--purple-deep); }
.next-session__day { font-size: var(--text-sm); color: var(--text-muted); }
.next-session__main { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-8) var(--space-20); }
.next-session__time { font-family: var(--font-display); font-size: clamp(44px, 6vw, 52px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
.next-session__what { display: flex; flex-direction: column; gap: var(--space-2); padding-bottom: var(--space-4); min-width: 0; }
.next-session__group { font-size: var(--text-3xl); font-weight: 700; color: var(--ink); }
.next-session__meta { font-size: var(--text-md); color: var(--text-muted); }
.next-session__later { margin: 0; padding: 0; list-style: none; border-top: var(--border-hairline) solid var(--line-fine); }
.later-row { display: flex; align-items: center; gap: var(--space-14); min-height: 60px; color: var(--ink); text-decoration: none; border-bottom: var(--border-hairline) solid var(--line-fine); }
.later-row:hover { color: var(--ink); background: var(--canvas); }
.later-row__time { flex: none; width: 54px; font-weight: 700; }
.later-row__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.later-row__group { font-weight: 600; }
.later-row__meta { font-size: var(--text-sm); color: var(--text-muted); }

/* "Čeka tebe". */
.todo-list { margin: calc(-1 * var(--space-4)) 0 0; padding: 0; list-style: none; }
.todo-row { display: flex; align-items: center; gap: var(--space-14); padding: var(--space-14) 0; color: var(--ink); text-decoration: none; border-top: var(--border-hairline) solid var(--line-fine); }
.todo-row:hover { color: var(--ink); }
.todo-row:hover .todo-row__action { border-color: var(--ink); }
.todo-row__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; color: var(--purple-deep); background: var(--lilac); border-radius: var(--radius-lg); }
.todo-row--claims .todo-row__icon, .todo-row--verify .todo-row__icon { color: var(--status-soon-text); background: var(--warning-bg); }
.todo-row--overdue .todo-row__icon { color: var(--error-text); background: var(--error-bg); }
.todo-row__text { flex: 1; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.todo-row__title { font-weight: 600; }
.todo-row__meta { font-size: var(--text-sm); color: var(--text-muted); }
.todo-row__count { flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 var(--space-8); box-sizing: border-box; font-size: var(--text-sm); font-weight: 700; color: var(--white); background: var(--ink); border-radius: var(--radius-pill); }
.todo-row__action { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-16); font-size: var(--text-md); font-weight: 600; border: 1.5px solid var(--line-lilac); border-radius: var(--radius-md); }
.todo-row__chevron { display: none; flex: none; color: var(--text-muted); }

/* This month's money. */
.money-panel__figure { display: flex; flex-direction: column; gap: var(--space-6); }
.money-panel__amount { font-family: var(--font-display); font-size: clamp(30px, 4vw, 36px); font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.money-panel__of { font-size: var(--text-md); color: var(--text-muted); }
.money-panel__bar, .setup-panel__bar, .group-card__bar { display: block; height: 10px; overflow: hidden; background: var(--lilac); border-radius: var(--radius-pill); }
.money-panel__bar span, .setup-panel__bar span, .group-card__bar span { display: block; width: var(--progress); height: 100%; background: var(--status-paid); border-radius: var(--radius-pill); }
.money-panel__rows { margin: 0; }
.money-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); min-height: 44px; color: var(--ink); text-decoration: none; border-top: var(--border-hairline) solid var(--line-fine); }
.money-row:hover { color: var(--ink); background: var(--canvas); }
.money-row dt { font-weight: 400; }
.money-row dd { margin: 0; font-weight: 700; }
.money-row--due dd { color: var(--error-text); }

.overview-figures { display: flex; flex-wrap: wrap; gap: var(--space-24); margin: 0; }
.overview-figures div { display: flex; flex-direction: column-reverse; }
.overview-figures dt { font-size: var(--text-sm); color: var(--text-muted); }
.overview-figures dd { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--ink); }

/* A coach's last training. */
.last-session { display: flex; flex-direction: column; gap: var(--space-4); color: var(--ink); text-decoration: none; }
.last-session:hover { color: var(--ink); }
.last-session__when, .last-session__meta { font-size: var(--text-md); color: var(--text-muted); }
.last-session__count { font-family: var(--font-display); font-size: 30px; font-weight: 700; }

/* Groups. */
.overview-groups { display: flex; flex-direction: column; gap: var(--space-16); }
.group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-16); margin: 0; padding: 0; list-style: none; }
.group-card { display: flex; flex-direction: column; gap: var(--space-12); height: 100%; box-sizing: border-box; padding: var(--space-16) var(--space-20); color: var(--ink); text-decoration: none; background: var(--white); border: var(--border-hairline) solid var(--line-fine); border-radius: var(--radius-card); }
.group-card:hover { color: var(--ink); border-color: var(--lilac-soft); }
.group-card__head { display: flex; align-items: center; gap: var(--space-6); }
.group-card__name { flex: 1; min-width: 0; font-size: var(--text-xl); font-weight: 700; overflow-wrap: anywhere; }
.group-card__meta { font-size: var(--text-sm); color: var(--text-muted); }
.group-card__attendance { display: flex; justify-content: space-between; font-size: var(--text-sm); }
.group-card__attendance-label { color: var(--text-muted); }
.group-card__bar { height: 6px; }
.group-card__bar span { background: var(--purple); }

/* "Pokreni klub". */
.setup-panel__eyebrow { margin: 0 0 var(--space-4); font-size: var(--text-md); font-weight: 600; color: var(--purple-deep); }
.setup-panel__bar { height: 8px; }
.setup-panel__bar span { background: var(--purple); }
.setup-steps { margin: 0; padding: 0; list-style: none; }
.setup-step { display: flex; align-items: center; gap: var(--space-14); padding: var(--space-12) 0; color: var(--ink); text-decoration: none; border-top: var(--border-hairline) solid var(--line-fine); }
.setup-step:hover { color: var(--ink); }
.setup-step__mark { flex: none; display: grid; place-items: center; width: 32px; height: 32px; box-sizing: border-box; font-weight: 700; color: var(--text-muted); border: 1.5px solid var(--lilac-soft); border-radius: 50%; }
.setup-step--done .setup-step__mark { color: var(--white); background: var(--success-text); border-color: var(--success-text); }
.setup-step__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.setup-step__title { font-weight: 600; }
.setup-step--done .setup-step__title { color: var(--text-muted); text-decoration: line-through; }
.setup-step__hint { font-size: var(--text-sm); color: var(--text-muted); }

/* "Upiši uplatu": find the member, then the form. */
.record-dialog .card-dialog__panel { gap: var(--space-16); }
.record-search { margin: 0; }
.record-results { margin: 0; padding: 0; list-style: none; }
.record-result { display: flex; align-items: center; gap: var(--space-12); min-height: 60px; color: var(--ink); text-decoration: none; border-top: var(--border-hairline) solid var(--line-fine); }
.record-result:hover { color: var(--ink); background: var(--canvas); }
.record-result__text, .record-member__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.record-result__name, .record-member__name { font-weight: 600; }
.record-result__meta, .record-member__meta { font-size: var(--text-sm); color: var(--text-muted); }
.record-member { display: flex; align-items: center; gap: var(--space-12); padding: var(--space-12) var(--space-14); background: var(--lilac); border-radius: var(--radius-lg); }

@media (max-width: 1023px) {
  .overview { grid-template-columns: minmax(0, 1fr); }
  .overview-head { margin-bottom: var(--space-20); }
  .overview-head__actions { width: 100%; }
  .club-panel { padding: var(--space-20); }
  .todo-row__action { display: none; }
  .todo-row__chevron { display: inline-flex; }
  .group-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: calc(-1 * var(--space-16)); padding-right: var(--space-16); }
  .group-cards li { flex: none; width: 240px; scroll-snap-align: start; }
}

/* ---------- Members list (US-4.15): per group, one thing on the right, parents on OktoSub ---------- */
.members-head { margin-bottom: var(--space-20); }

.requests-strip {
  display: flex;
  align-items: center;
  gap: var(--space-14);
  margin-bottom: var(--space-20);
  padding: var(--space-14) var(--space-16);
  color: var(--ink);
  text-decoration: none;
  background: var(--lilac);
  border-radius: var(--radius-card);
}

.requests-strip:hover { color: var(--ink); }
.requests-strip__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; color: var(--purple-deep); background: var(--white); border-radius: var(--radius-md); }
.requests-strip__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.requests-strip__title { font-weight: 600; }
.requests-strip__meta { font-size: var(--text-sm); color: var(--text); }

.members-tools { margin-bottom: var(--space-16); }
.members-search { display: flex; flex-direction: column; gap: var(--space-12); margin: 0; }
.members-search .club-search__field { position: relative; }
.members-search__icon { top: 50%; transform: translateY(-50%); }
.members-search__input { width: 100%; height: 52px; padding-left: var(--space-40); }
.members-chips { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.filter-chip__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; font-size: var(--text-xs); font-weight: 700; color: var(--purple-deep); background: var(--lilac); border-radius: var(--radius-pill); }
.filter-chip--on .filter-chip__count { color: var(--ink); background: var(--white); }
.filter-chip--empty { color: var(--text-muted); border-style: dashed; }
.filter-chip--empty .filter-chip__count { color: var(--text-muted); background: var(--canvas); }
.filter-chip--select select { padding-right: var(--space-4); margin-right: 0; }

.members-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); margin-bottom: var(--space-12); }
.members-bar__count { margin: 0; font-size: var(--text-md); color: var(--text-muted); }
.members-bar__count b { color: var(--ink); }

.segmented { display: inline-flex; gap: var(--space-4); padding: var(--space-4); background: var(--white); border: var(--border-hairline) solid var(--line-fine); border-radius: var(--radius-md); }
.segmented__item { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-12); font-size: var(--text-md); font-weight: 600; color: var(--ink); text-decoration: none; border-radius: var(--radius-sm); }
.segmented__item:hover { color: var(--ink); background: var(--canvas); }
.segmented__item--on, .segmented__item--on:hover { color: var(--white); background: var(--ink); }

.remind-all { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); margin-bottom: var(--space-16); padding: var(--space-14) var(--space-16); background: var(--error-bg); border-radius: var(--radius-card); }
.remind-all__hint { flex: 1 1 280px; margin: 0; font-size: var(--text-sm); color: var(--error-text); }
.remind-all form { margin: 0; }

.members-list {
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-24) var(--space-12);
  background: var(--white);
  border: var(--border-hairline) solid var(--line-fine);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}

.members-section__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-4) var(--space-10); padding: var(--space-20) 0 var(--space-8); }
.members-section__title { margin: 0; font-family: var(--font-display); font-size: var(--text-3xl); color: var(--ink); }
.members-section__meta { font-size: var(--text-md); color: var(--text-muted); }
.members-rows { margin: 0; padding: 0; list-style: none; }

.member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4) var(--space-16);
  padding: var(--space-12) 0;
  border-top: var(--border-hairline) solid var(--line-fine);
}

.member-row__main { display: flex; align-items: center; gap: var(--space-14); min-width: 0; color: var(--ink); text-decoration: none; }
.member-row__main:hover { color: var(--ink); }
.member-row__main:hover .member-row__name { text-decoration: underline; text-underline-offset: 3px; }
.member-row__main .avatar { flex: none; width: 44px; height: 44px; }
.member-row__text { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.member-row__name { font-size: var(--text-lg); font-weight: 600; overflow-wrap: anywhere; }
.member-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); font-size: var(--text-sm); color: var(--text-muted); }
.member-row__side { justify-self: end; }
.member-row__attendance { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--text-xs); color: var(--text-muted); }
.member-row__attendance b { font-size: var(--text-lg); color: var(--ink); }
.member-row__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-12); padding-left: 58px; font-size: var(--text-sm); }
.member-row__reminded { color: var(--text-muted); }
.member-row__form { display: inline; margin: 0; }

.member-tag { display: inline-flex; align-items: center; gap: var(--space-4); padding: 2px var(--space-8); font-size: var(--text-xs); font-weight: 600; color: var(--text); background: var(--lilac-mist); border-radius: var(--radius-xs); }

.money-pill { display: inline-flex; padding: var(--space-4) var(--space-10); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; border-radius: var(--radius-pill); }
.money-pill--ok { color: var(--success-text); background: var(--success-bg); }
.money-pill--warn { color: var(--status-soon-text); background: var(--warning-bg); }
.money-pill--due { color: var(--error-text); background: var(--error-bg); }
.money-pill--info { color: var(--purple-deep); background: var(--lilac); }

.parent-state { display: inline-flex; align-items: center; gap: var(--space-4); color: var(--text-muted); }
.parent-state--on_oktosub { color: var(--success-text); }
.parent-state--invited { color: var(--purple-deep); }
.link-btn--sm { min-height: 32px; padding: 0 var(--space-6); font-size: var(--text-sm); }
.link-btn--icon { gap: var(--space-4); }

.members-foot { margin: var(--space-20) 0 0; text-align: center; font-size: var(--text-md); font-weight: 600; }

@media (max-width: 639px) {
  .members-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(-1 * var(--space-16)); padding-right: var(--space-16); scrollbar-width: none; }
  .members-chips > * { flex: none; }
  .members-list { padding: var(--space-4) var(--space-16) var(--space-8); }
  .member-row__foot { padding-left: 0; }
  .requests-strip .btn { display: none; }
}

/* ---------- Member detail ---------- */
.member-hero { display: flex; align-items: center; gap: var(--space-16); min-width: 0; }
.member-hero .avatar { width: 64px; height: 64px; font-size: var(--text-4xl); }
.member-hero__text { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }

.facts { display: grid; gap: 0; margin: 0; }
.facts__row { display: flex; justify-content: space-between; gap: var(--space-12); padding: var(--space-12) 0; border-bottom: 1px solid var(--line-fine); }
.facts__row:first-child { padding-top: 0; }
.facts__row:last-child { padding-bottom: 0; border-bottom: 0; }
.facts dt { font-size: var(--text-md); color: var(--text-muted); }
.facts dd { margin: 0; font-size: var(--text-md); font-weight: 600; color: var(--ink); text-align: right; overflow-wrap: anywhere; }

.member-side { display: flex; flex-direction: column; gap: var(--space-16); }
.member-main { display: flex; flex-direction: column; gap: var(--space-24); min-width: 0; }
.surface .inline-form .form-field { flex: 1 1 160px; }
.surface .auth-form { gap: var(--space-14); }
.surface .admin-check { font-size: var(--text-md); }
.surface .invite-link .btn { align-self: flex-start; }

/* Moving a payment to other charges: a disclosure under the payment row. */
.reallocate { flex-basis: 100%; margin-top: var(--space-8); padding-top: var(--space-4); }
.reallocate summary { display: inline-flex; align-items: center; min-height: 32px; font-size: var(--text-md); font-weight: 500; color: var(--purple); cursor: pointer; }
.reallocate[open] .inline-form { margin-top: var(--space-10); padding: var(--space-14); background: var(--canvas); border-radius: var(--radius-md); }

.correct-form { flex-basis: 100%; }

/* ---------- Finance list ---------- */
.debt-row .list-row__aside { flex-direction: column; align-items: flex-end; gap: var(--space-4); }
.debt-row__amount { font-size: var(--text-xl); }

/* ---------- Groups ---------- */
.group-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-14);
  padding: var(--space-20);
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--line-fine);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.group-card:hover { color: var(--text); border-color: var(--lilac-soft); box-shadow: var(--shadow-notification); }
.group-card__top { display: flex; align-items: center; gap: var(--space-12); }
.group-card__name { flex: 1; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.group-card__meta { display: flex; align-items: center; gap: var(--space-6); font-size: var(--text-md); color: var(--text-muted); }
.group-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); padding-top: var(--space-12); border-top: 1px solid var(--line-fine); font-size: var(--text-md); font-weight: 600; color: var(--ink); }
.group-card--inactive { background: var(--canvas); box-shadow: none; }
.group-card--inactive .group-card__name { color: var(--text-muted); }

/* ---------- Trainings and attendance ---------- */
.open-session { display: flex; flex-wrap: wrap; gap: var(--space-10); }
.open-session form { margin: 0; }

.att-progress { display: flex; flex-direction: column; gap: var(--space-8); min-width: min(100%, 240px); }
.att-progress__label { display: flex; justify-content: space-between; gap: var(--space-12); font-size: var(--text-md); color: var(--text-muted); }
.att-progress__label strong { color: var(--ink); }

.scan-card { gap: var(--space-14); }
.scan-card .scan__video { max-width: 100%; }
.scan-card .inline-form { align-items: flex-end; gap: var(--space-10); }

.att-table td:not(:first-child),
.att-table th:not(:first-child) { text-align: center; width: 1%; white-space: nowrap; }
.att-num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.att-num--zero { font-weight: 400; color: var(--status-inactive); }

/* ---------- Profile ---------- */

/* ---------- Staff ---------- */
.role-select { min-width: 150px; }

/* ---------- Detail header: avatar left of the title ---------- */
.page-header--with-avatar .page-header__text { flex-direction: row; align-items: center; gap: var(--space-16); }

/* Member detail: the avatar sits in the title row. */
.page-header__title:has(.avatar) { display: flex; align-items: center; gap: var(--space-14); }
.page-header__title .avatar { width: 56px; height: 56px; font-size: var(--text-3xl); letter-spacing: 0; }

@media (max-width: 479px) {
  .page-header__title .avatar { width: 44px; height: 44px; font-size: var(--text-lg); }
}

/* A form that opens on demand at the foot of a card. */
details.surface__foot > summary { display: inline-flex; align-items: center; min-height: 32px; font-size: var(--text-md); cursor: pointer; list-style: none; }
details.surface__foot > summary::-webkit-details-marker { display: none; }
details.surface__foot > summary::before { content: "+"; margin-right: var(--space-8); font-size: var(--text-2xl); line-height: var(--leading-none); }
details.surface__foot[open] > summary::before { content: "–"; }
.payment-row .reallocate { margin-top: calc(-1 * var(--space-4)); padding-top: 0; }

@media (max-width: 1179px) {
  .att-layout > aside { order: -1; }
}

.att-layout .surface__body { padding: var(--space-16); }
.att-layout .att-row { background: var(--canvas); border-color: transparent; }

/* Inside a card the empty state needs no frame of its own. */
.surface__body > .empty-state { padding: var(--space-24) var(--space-12); border: 0; }
.context-picker { max-width: 640px; }
.invitation-club { padding: 0; min-height: 0; border: 0; }
details.surface__foot { display: block; }
details.surface__foot[open] > form { margin-top: var(--space-12); }


.rtable__label { display: none; }

@media (max-width: 719px) {
  .rtable .person-cell { min-width: 0; }
  .rtable__label { display: inline; }
  .plans-table tr { padding-right: var(--space-16); }
  .plans-table td.cell-actions { width: auto; margin-left: auto; }
}

/* The plan a parent chose with the link request, waiting on the member page (US-6.12). */
.plan-suggestion { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12) var(--space-24); }
.plan-suggestion__text { flex: 1 1 320px; display: flex; flex-direction: column; gap: var(--space-4); }
/* "Vrati u članove" on an archived member (US-4.17). */
.member-return__choices { display: flex; flex-direction: column; gap: var(--space-8); min-width: 0; margin: 0; padding: 0; border: 0; }
.member-return__choices legend { margin-bottom: var(--space-8); padding: 0; }
.member-return .btn { align-self: flex-start; }
.plan-suggestion__text p, .plan-suggestion__text h2 { margin: 0; }
.plan-suggestion form { margin: 0; }

/* "Has an OktoSub account" (US-4.15). */
.oktosub-mark { display: inline-flex; align-items: center; }
.oktosub-mark svg { display: block; }

/* ---------- Groups (US-4.16): how each group lives ---------- */
.group-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-20); margin: 0; padding: 0; list-style: none; }

.group-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-14);
  height: 100%;
  box-sizing: border-box;
  padding: var(--space-20);
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: var(--border-hairline) solid var(--line-fine);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}

.group-tile:hover { color: var(--ink); border-color: var(--lilac-soft); }
.group-tile--inactive { opacity: .7; }
.group-tile__head { display: flex; align-items: center; gap: var(--space-12); }
.group-tile__head > .avatar { flex: none; width: 44px; height: 44px; }
.group-tile__title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.group-tile__name { font-size: var(--text-2xl); font-weight: 700; overflow-wrap: anywhere; }
.group-tile__meta { font-size: var(--text-sm); color: var(--text-muted); }
.group-tile__coaches { display: flex; }
.group-tile__coaches .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--white); }
.group-tile__facts { display: flex; flex-direction: column; gap: var(--space-6); }
.group-tile__fact { display: flex; align-items: center; gap: var(--space-8); font-size: var(--text-sm); color: var(--text); }
.group-tile__fact .icon { flex: none; color: var(--text-muted); }
.group-tile__row { display: flex; justify-content: space-between; gap: var(--space-12); font-size: var(--text-sm); color: var(--text-muted); }
.group-tile__row b { color: var(--ink); }
.group-tile > .group-tile__row { padding-top: var(--space-12); border-top: var(--border-hairline) solid var(--line-fine); }
.group-tile__attendance { display: flex; flex-direction: column; gap: var(--space-6); }
.group-tile__bar { display: block; height: 6px; overflow: hidden; background: var(--lilac); border-radius: var(--radius-pill); }
.group-tile__bar span { display: block; width: var(--progress); height: 100%; background: var(--purple); border-radius: var(--radius-pill); }

/* ---------- Trainings (US-7.9): the week, the day, the previous ---------- */
.overview-head + .week-strip, .week-strip { margin-bottom: var(--space-20); }
.week-strip { display: flex; gap: var(--space-6); padding: var(--space-6); background: var(--white); border: var(--border-hairline) solid var(--line-fine); border-radius: var(--radius-card); }
.week-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); min-height: 64px; padding: var(--space-8) 0; color: var(--ink); text-decoration: none; border-radius: var(--radius-lg); }
.week-day:hover { color: var(--ink); background: var(--canvas); }
.week-day__name { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); }
.week-day__date { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; }
.week-day__dots { display: flex; gap: 3px; height: 5px; }
.week-day__dots span { width: 5px; height: 5px; background: var(--purple); border-radius: 50%; }
.week-day--today .week-day__name { color: var(--purple-deep); }
.week-day--on, .week-day--on:hover { color: var(--white); background: var(--ink); }
.week-day--on .week-day__name { color: rgb(255 255 255 / .75); }
.week-day--on .week-day__dots span { background: var(--white); }
.week-strip + .club-panel, .club-panel + .club-panel { margin-top: var(--space-20); }

.session-rows { margin: calc(-1 * var(--space-4)) 0 0; padding: 0; list-style: none; }
.session-row { display: flex; align-items: center; gap: var(--space-16); min-height: 68px; padding: var(--space-10) 0; color: var(--ink); text-decoration: none; border-top: var(--border-hairline) solid var(--line-fine); }
.session-row:hover { color: var(--ink); }
.session-row:hover .session-row__group { text-decoration: underline; text-underline-offset: 3px; }
.session-row__time { flex: none; width: 64px; font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 700; }
.session-row__text { flex: 1; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.session-row__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.session-row__group { font-size: var(--text-lg); font-weight: 600; }
.session-row__live { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; color: var(--success-text); }
.session-row__meta { font-size: var(--text-sm); color: var(--text-muted); }
.session-row__side { flex: none; display: flex; align-items: center; }
.session-row__figure { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--text-xs); color: var(--text-muted); }
.session-row__figure b { font-size: var(--text-lg); color: var(--ink); }
.session-row--canceled .session-row__time, .session-row--canceled .session-row__group { color: var(--text-muted); text-decoration: line-through; }
.money-pill--muted { color: var(--text-muted); background: var(--canvas); }

.open-groups { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.open-groups form { margin: 0; }
.open-group { display: flex; align-items: center; gap: var(--space-12); width: 100%; min-height: 60px; padding: 0; font: inherit; font-weight: 600; text-align: left; color: var(--ink); background: none; border: 0; border-top: var(--border-hairline) solid var(--line-fine); cursor: pointer; }
.open-group > span:nth-child(2) { flex: 1; }

/* ---------- Taking attendance (US-7.9): one tap per member, the bar at the bottom ---------- */
.roll-head { display: flex; flex-direction: column; gap: var(--space-8); margin-bottom: var(--space-20); }
.roll-head__back { display: inline-flex; align-items: center; gap: var(--space-4); align-self: flex-start; min-height: 44px; font-size: var(--text-md); font-weight: 600; color: var(--purple-deep); text-decoration: none; }
.roll-head__row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-12); }
.roll-head__text { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.roll-head__live { font-size: var(--text-sm); font-weight: 700; text-transform: uppercase; color: var(--success-text); }
.roll-head__when, .roll-head__place { display: inline-flex; align-items: center; gap: var(--space-4); font-size: var(--text-md); color: var(--text-muted); }

.more-menu { position: relative; }
.more-menu__toggle { list-style: none; cursor: pointer; background: var(--white); border: var(--border-hairline) solid var(--line-fine); border-radius: 50%; }
.more-menu__toggle::-webkit-details-marker { display: none; }
.more-menu__panel { position: absolute; right: 0; top: calc(100% + var(--space-6)); z-index: 5; min-width: 220px; padding: var(--space-6); background: var(--white); border: var(--border-hairline) solid var(--line-fine); border-radius: var(--radius-lg); box-shadow: var(--shadow-drawer); }
.more-menu__panel form { margin: 0; }
.more-menu__item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 var(--space-12); font: inherit; font-weight: 600; text-align: left; background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; }
.more-menu__item:hover { background: var(--canvas); }
.more-menu__item--danger { color: var(--error-text); }

.roll { display: flex; flex-direction: column; gap: var(--space-20); padding-bottom: 150px; }
.roll__list .club-panel__head form { margin: 0; }
.roll-rows { margin: 0; padding: 0; list-style: none; }
.roll-row { display: flex; align-items: center; gap: var(--space-12); min-height: 64px; border-top: var(--border-hairline) solid var(--line-fine); }
.roll-row > .avatar { flex: none; }
.roll-row__name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.roll-row__more { flex: none; color: var(--text-muted); }
.roll-row form { margin: 0; }
.roll-check { flex: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; color: transparent; background: var(--white); border: 1.5px solid var(--line-lilac); border-radius: var(--radius-lg); cursor: pointer; }
.roll-check:hover { border-color: var(--status-paid); color: var(--success-bg); }
.roll-check--on, .roll-check--on:hover { color: var(--white); background: var(--status-paid); border-color: var(--status-paid); }

.roll-sheet__choices { display: flex; flex-direction: column; gap: var(--space-8); }
.roll-sheet__form { margin: 0; }
.roll-choice { display: flex; align-items: center; width: 100%; min-height: 52px; padding: 0 var(--space-14); font: inherit; font-weight: 600; text-align: left; color: var(--ink); background: var(--white); border: 1.5px solid var(--line-lilac); border-radius: var(--radius-lg); cursor: pointer; }
.roll-choice:hover { border-color: var(--ink); }

.roll-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-16) calc(var(--space-12) + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: var(--border-hairline) solid var(--line-fine);
  box-shadow: 0 -6px 20px rgb(var(--ink-rgb) / .06);
}

.roll-bar__count { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4) var(--space-12); font-size: var(--text-sm); color: var(--text-muted); }
.roll-bar__count b { font-size: var(--text-md); color: var(--ink); }
.roll-bar__progress { display: block; height: 8px; overflow: hidden; background: var(--lilac); border-radius: var(--radius-pill); }
.roll-bar__progress span { display: block; width: var(--progress); height: 100%; background: var(--status-paid); border-radius: var(--radius-pill); }
.roll-bar__actions { display: flex; gap: var(--space-10); }
.roll-bar__form { flex: 1; display: flex; margin: 0; }
.roll-bar__finish { flex: 1; }
.roll-bar__done { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 600; }

@media (min-width: 1024px) {
  .roll-bar { left: var(--sidebar-width, 268px); padding-inline: var(--space-40); }
}

/* ---------- Attendance for a month (US-7.10) ---------- */
.attendance-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); margin-bottom: var(--space-12); }
.attendance-month { display: inline-flex; align-items: center; gap: var(--space-4); padding: var(--space-4); background: var(--white); border: var(--border-hairline) solid var(--line-fine); border-radius: var(--radius-pill); }
.attendance-month .month-switch__month { padding: 0 var(--space-10); font-weight: 700; color: var(--ink); }
.attendance-month .month-switch__arrow { display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); border-radius: 50%; }
.attendance-month .month-switch__arrow:hover { background: var(--canvas); }
.attendance-legend { display: flex; flex-wrap: wrap; gap: var(--space-14); margin: 0 0 var(--space-20); font-size: var(--text-sm); color: var(--text-muted); }
.attendance-legend__item { display: inline-flex; align-items: center; gap: var(--space-6); }
.att-square { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.att-square--ok { background: var(--status-paid); }
.att-square--warn { background: var(--status-soon); }
.att-square--muted { background: var(--lilac-soft); }
.att-square--due { background: var(--status-due); }
.attendance-group + .attendance-group { margin-top: var(--space-20); }
.attendance-group__meta { font-size: var(--text-sm); color: var(--text-muted); }
.attendance-group__average { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--text-xs); color: var(--text-muted); }
.attendance-group__average b { font-family: var(--font-display); font-size: var(--text-display-xs); color: var(--ink); }
.attendance-rows { margin: 0; padding: 0; list-style: none; }
.attendance-row { display: flex; align-items: center; gap: var(--space-14); min-height: 60px; padding: var(--space-8) 0; border-top: var(--border-hairline) solid var(--line-fine); }
.attendance-row > .avatar { flex: none; }
.attendance-row__name { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); min-width: 0; font-weight: 600; }
.attendance-row__name a { color: var(--ink); text-decoration: none; }
.attendance-row__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.attendance-row__history { display: flex; gap: 4px; }
.attendance-row__figure { flex: none; width: 70px; display: flex; flex-direction: column; align-items: flex-end; font-size: var(--text-xs); color: var(--text-muted); }
.attendance-row__figure b { font-size: var(--text-lg); color: var(--ink); }
.attendance-row__figure--low b { color: var(--error-text); }

@media (max-width: 639px) {
  .attendance-row { flex-wrap: wrap; }
  .attendance-row__history { order: 3; width: 100%; padding-left: 58px; }
  .attendance-tools .members-chips { width: 100%; }
}

/* ---------- Dugovanja (US-5.9) ---------- */
.debts-summary { margin-bottom: var(--space-16); }
.debts-summary__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-12); }
.debts-summary__figure { display: flex; flex-direction: column; gap: var(--space-4); }
.debts-summary__label { font-size: var(--text-md); color: var(--text-muted); }
.debts-summary__amount { font-family: var(--font-display); font-size: clamp(30px, 4vw, 40px); font-weight: 700; line-height: 1; color: var(--ink); }
.debts-summary__amount span { font-size: var(--text-3xl); color: var(--text-muted); }
.debts-summary__bar { display: block; height: 10px; overflow: hidden; background: var(--lilac); border-radius: var(--radius-pill); }
.debts-summary__bar span { display: block; width: var(--progress); height: 100%; background: var(--status-paid); border-radius: var(--radius-pill); }
.debts-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-10); }
.debts-part { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-12) var(--space-14); color: var(--ink); text-decoration: none; background: var(--white); border: 1.5px solid var(--line-lilac); border-radius: var(--radius-lg); }
.debts-part:hover { color: var(--ink); border-color: var(--lilac-soft); }
.debts-part b { font-size: var(--text-2xl); white-space: nowrap; }
@media (max-width: 480px) { .debts-parts { gap: var(--space-6); } .debts-part { padding: var(--space-10); } .debts-part b { font-size: var(--text-lg); } }
.debts-part__count { font-size: var(--text-xs); color: var(--text-muted); }
.debts-part--on, .debts-part--on:hover { color: var(--white); background: var(--ink); border-color: var(--ink); }
.debts-part--on .debts-part__count { color: rgb(255 255 255 / .75); }
.debts-part--on .status-dot { color: var(--white); }
.debts-groups { margin-bottom: var(--space-16); }
.debt-figure { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--text-xs); color: var(--text-muted); }
.debt-figure b { font-size: var(--text-xl); color: var(--ink); }
.debt-figure--overdue b { color: var(--error-text); }
.debt-figure--paid b { color: var(--success-text); }
.member-row__foot .oktosub-mark { margin-right: var(--space-2); }

/* ---------- Prijave uplata (US-5.9) ---------- */
.claims-tabs { margin-bottom: var(--space-20); }
.claim-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--space-20); margin: 0; padding: 0; list-style: none; }
.claim-card { display: flex; flex-direction: column; gap: var(--space-14); padding: var(--space-20); background: var(--white); border: var(--border-hairline) solid var(--line-fine); border-radius: var(--radius-panel); box-shadow: var(--shadow-panel); }
.claim-card__head { display: flex; align-items: center; gap: var(--space-14); }
.claim-card__head > .avatar { flex: none; width: 44px; height: 44px; }
.claim-card__head .member-row__text { flex: 1; }
.claim-card__name { color: var(--ink); text-decoration: none; }
.claim-card__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.claim-card__amount { flex: none; font-family: var(--font-display); font-size: var(--text-display-xs); font-weight: 700; color: var(--ink); }
.claim-card__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-10); margin: 0; font-size: var(--text-sm); }
.claim-card__facts dt { color: var(--text-muted); }
.claim-card__facts dd { margin: 0; font-weight: 700; color: var(--ink); }
.claim-card__note { display: flex; gap: var(--space-8); margin: 0; padding: var(--space-10) var(--space-12); font-size: var(--text-sm); color: var(--text); background: var(--lilac-mist); border-radius: var(--radius-md); }
.claim-card__note .icon { flex: none; margin-top: 2px; color: var(--text-muted); }
.claim-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); padding-top: var(--space-12); border-top: var(--border-hairline) solid var(--line-fine); }
.claim-card__footnote { font-size: var(--text-sm); color: var(--text-muted); }
.claim-card__actions { display: flex; gap: var(--space-10); }
.claim-card__accept { margin: 0; }
.claim-resolved { display: flex; align-items: center; gap: var(--space-14); min-height: 64px; border-top: var(--border-hairline) solid var(--line-fine); }
.claim-resolved:first-child { border-top: 0; }
.claim-resolved > .avatar { flex: none; }
.claim-resolved .member-row__text { flex: 1; }

@media (max-width: 639px) {
  .claim-card__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .claim-card__actions { width: 100%; }
  .claim-card__actions > * { flex: 1; }
  .claim-card__accept .btn { width: 100%; }
}

/* ---------- Paketi članarina (US-5.9) ---------- */
.plan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--space-20); margin: 0 0 var(--space-20); padding: 0; list-style: none; }
.plan-card { display: flex; flex-direction: column; gap: var(--space-14); padding: var(--space-20); background: var(--white); border: var(--border-hairline) solid var(--line-fine); border-radius: var(--radius-panel); box-shadow: var(--shadow-panel); }
.plan-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-12); }
.plan-card__title { display: flex; flex-direction: column; min-width: 0; }
.plan-card__name { font-size: var(--text-2xl); font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.plan-card__due { font-size: var(--text-sm); color: var(--text-muted); }
.plan-card__price { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-size: var(--text-xs); color: var(--text-muted); }
.plan-card__price b { font-family: var(--font-display); font-size: var(--text-display-xs); line-height: 1; color: var(--ink); }
.plan-card__groups { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.plan-card__row { display: flex; justify-content: space-between; gap: var(--space-12); padding-top: var(--space-12); font-size: var(--text-sm); color: var(--text-muted); border-top: var(--border-hairline) solid var(--line-fine); }
.plan-card__row b { color: var(--ink); }
.plan-card__edit { align-self: flex-start; padding: 0; }
.plan-note { margin-bottom: var(--space-12); }

/* ---------- Izvještaji (US-5.9) ---------- */
.report-money { margin-bottom: var(--space-20); }
.report-money__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-12); }
.report-legend { display: flex; gap: var(--space-16); font-size: var(--text-sm); color: var(--text-muted); }
.report-legend > span { display: inline-flex; align-items: center; gap: var(--space-6); }
.report-legend__swatch { width: 12px; height: 12px; border-radius: 3px; }
.report-legend__swatch--charged, .money-bars__charged { background: var(--lilac-glow); fill: var(--lilac-glow); }
.report-legend__swatch--collected, .money-bars__collected { background: var(--purple); fill: var(--purple); }
.money-bars__collected--latest { fill: var(--ink); }
.money-bars__label { font-size: 12px; fill: var(--text-muted); font-family: var(--font-body); }
.report-table__table { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.report-table__table th, .report-table__table td { padding: var(--space-10) 0; text-align: left; border-top: var(--border-hairline) solid var(--line-fine); }
.report-table__table thead th { font-size: var(--text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); border-top: 0; }
.report-table__table .num { text-align: right; }
.report-open { color: var(--text-muted); }
.report-open--due { color: var(--error-text); font-weight: 600; }
.report-debtors__lead { margin: 0 0 var(--space-16); }

/* Osoblje (US-4.18): the roles with what they may do, people by role, open invitations, the invite dialog. */
.staff-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-10); margin: 0; padding: 0; list-style: none; }
.staff-role { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-12) var(--space-16); background: var(--lilac-mist); border-radius: var(--radius-lg); }
.staff-role__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-8); }
.staff-role__count { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; }
.staff-role__what { font-size: var(--text-sm); color: var(--text); }
.staff-section + .staff-section { margin-top: var(--space-16); }
.staff-section__title { display: flex; align-items: baseline; gap: var(--space-8); margin: 0 0 var(--space-6); font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; }
.staff-section__count { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); }
.staff-rows { margin: 0; padding: 0; list-style: none; }
.staff-row { display: flex; align-items: center; gap: var(--space-14); padding: var(--space-12) 0; border-top: var(--border-hairline) solid var(--line-fine); }
.staff-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.staff-row__name { font-size: var(--text-lg); font-weight: 600; }
.staff-row__name--email { overflow-wrap: anywhere; }
.staff-row__meta { font-size: var(--text-sm); color: var(--text-muted); overflow-wrap: anywhere; }
.staff-row__groups { display: flex; flex-wrap: wrap; gap: var(--space-6); padding-top: var(--space-4); font-size: var(--text-sm); }
.staff-row__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-4); }
.staff-row__form { margin: 0; }
.link-btn--danger { color: var(--error-text); }
.more-menu__label { display: block; padding: var(--space-6) var(--space-12); font-size: var(--text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.more-menu__item--current { justify-content: space-between; background: var(--canvas); cursor: default; }
.more-menu__divider { display: block; height: 1px; margin: var(--space-6) 0; background: var(--line-fine); }
.staff-invite .choices { gap: var(--space-8); }
.staff-invite .choice__label { font-size: var(--text-md); line-height: var(--leading-normal); }
.staff-invite__groups { min-width: 0; margin: 0; padding: 0; border: 0; }
.staff-invite__groups legend { margin-bottom: var(--space-8); padding: 0; }
/* Groups are only for a coach: shown while "Trener" is chosen. */
.staff-invite form:not(:has(#role_coach:checked)) .staff-invite__groups { display: none; }
.check-chips { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.check-chip { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-14); font-size: var(--text-sm); font-weight: 600; color: var(--ink); background: var(--white); border: 1.5px solid var(--line-lilac); border-radius: var(--radius-pill); cursor: pointer; }
.check-chip__input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip:has(.check-chip__input:checked) { color: var(--white); background: var(--ink); border-color: var(--ink); }
.check-chip:has(.check-chip__input:focus-visible) { box-shadow: var(--shadow-focus); }
@media (max-width: 719px) {
  .staff-row { flex-wrap: wrap; }
  .staff-row__actions { width: 100%; justify-content: flex-start; padding-left: 58px; }
}

/* Profil kluba (US-4.18): the form cards, a save bar that shows once something changed, the locations map, and on the
   side the directory preview and what the profile lacks. */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-24); align-items: start; }
.profile-layout__main, .profile-layout__side, .profile-form { display: flex; flex-direction: column; gap: var(--space-24); min-width: 0; }
/* On a phone the preview comes first, and the save bar stays above the tab bar. */
@media (max-width: 1023px) {
  .profile-layout__side { order: -1; }
  .app-body--tabbar .profile-save { bottom: calc(var(--tabbar-height) + var(--space-12) + env(safe-area-inset-bottom)); }
}
@media (min-width: 1024px) {
  .profile-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .profile-layout__side { position: sticky; top: var(--space-24); }
}
.profile-card__head { display: flex; flex-direction: column; gap: var(--space-2); }
.profile-card__head p { margin: 0; }
.profile-verified { margin-top: var(--space-4); }
.profile-save { position: sticky; bottom: var(--space-16); z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); padding: var(--space-12) var(--space-16); font-size: var(--text-sm); color: var(--white); background: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-drawer); }
.profile-save[hidden] { display: none; }
.profile-save__text { flex: 1 1 240px; }
.profile-save__actions { display: flex; gap: var(--space-8); }
.profile-save__discard, .profile-save__discard:hover { color: var(--white); background: transparent; }
.input-prefix { display: flex; align-items: center; min-height: 48px; padding-left: var(--space-14); background: var(--white); border: 1.5px solid var(--line-lilac); border-radius: var(--radius-md); }
.input-prefix:focus-within { border-color: var(--purple); box-shadow: var(--shadow-focus); }
.input-prefix__text { flex: none; color: var(--text-muted); }
.input-prefix .input-prefix__input { flex: 1; min-width: 0; padding-left: 0; border: 0; box-shadow: none; background: transparent; }
.input-prefix .input-prefix__input:focus { outline: none; box-shadow: none; }
.profile-map { overflow: hidden; border-radius: var(--radius-lg); }
.profile-map__canvas { position: relative; z-index: 0; isolation: isolate; height: 220px; background: var(--lilac-mist); }
.profile-pin { flex: none; display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); background: var(--lilac-mist); border-radius: var(--radius-sm); }
.profile-pin--primary { color: var(--white); background: var(--purple); }
.profile-map-status { padding-top: var(--space-2); }
.profile-add { padding-top: var(--space-8); border-top: var(--border-hairline) solid var(--line-fine); }
.profile-add > summary { list-style: none; width: fit-content; gap: var(--space-6); }
.profile-add > summary::-webkit-details-marker { display: none; }
.profile-add[open] > form { margin-top: var(--space-12); }
.profile-preview__label { display: flex; align-items: center; gap: var(--space-6); margin: 0; font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.profile-preview__card { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-16); background: var(--white); border: var(--border-hairline) solid var(--line-fine); border-radius: var(--radius-lg); }
.profile-preview__head { display: flex; align-items: center; gap: var(--space-12); }
.profile-preview__title { display: flex; flex-direction: column; min-width: 0; font-size: var(--text-sm); }
.profile-preview__title b { font-size: var(--text-xl); overflow-wrap: anywhere; }
.profile-preview__text { margin: 0; font-size: var(--text-sm); color: var(--text); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.profile-preview__tags { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.profile-check__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-8); }
.profile-check__head .club-panel__title { font-size: var(--text-xl); }
.profile-check__list { display: flex; flex-direction: column; gap: var(--space-10); margin: 0; padding: 0; list-style: none; }
.profile-check__item { display: flex; align-items: center; gap: var(--space-10); font-size: var(--text-sm); font-weight: 600; }
.profile-check__item--done { font-weight: 400; color: var(--text-muted); }
.profile-check__mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; box-sizing: border-box; border: 1.5px solid var(--line-lilac); border-radius: 50%; }
.profile-check__item--done .profile-check__mark { color: var(--white); background: var(--status-paid); border-color: var(--status-paid); }
.billing-pause__months .check-chip { justify-content: center; }
@media (max-width: 479px) {
  .billing-pause__months { display: grid; grid-template-columns: repeat(3, 1fr); }
}
.billing-pause__submit { align-self: flex-start; }
