/* Colours and frame follow the shell prototype (shell-prototype/index.html). */
:root {
  --bg: #ffffff; --ink: #0f172a; --muted: #475569; --line: #e2e8f0; --soft: #f1f5f9;
  --teal: #00b2a9; --teal-ink: #00756f; --teal-soft: #e0f5f4;
  --amber: #b45309; --amber-soft: #fef3c7; --red: #b91c1c; --red-soft: #fee2e2;
  --green: #15803d; --green-soft: #dcfce7;
  --proto: #1e293b; --proto-ink: #e2e8f0; --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1220; --ink: #e2e8f0; --muted: #94a3b8; --line: #1e293b; --soft: #111a2c;
    --teal-ink: #5eead4; --teal-soft: #0b3a38; --amber: #fbbf24; --amber-soft: #3b2a08;
    --red: #fca5a5; --red-soft: #3f1212; --green: #86efac; --green-soft: #0f2e1a; --proto: #020617; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0; }
h2 { font-size: 1.05rem; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.proto { background: var(--proto); color: var(--proto-ink); padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; }
.proto strong { color: #fff; }
.proto .spacer { flex: 1; }
.proto button { background: #334155; color: #fff; border: 1px solid #475569; border-radius: 6px; padding: 3px 10px; font-size: 13px; }

.topbar { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 4; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.mark { width: 30px; height: 30px; border-radius: 8px; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; }
.club { color: var(--muted); }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.search input:focus { outline: 2px solid var(--teal); background: var(--bg); }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgb(0 0 0 / .18); overflow: hidden; }
.results a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; text-decoration: none; border-bottom: 1px solid var(--line); }
.results a:last-child { border-bottom: 0; }
.results a:hover, .results a.active { background: var(--teal-soft); }
.results .none { padding: 10px 12px; color: var(--muted); }
.who { margin-left: auto; font-size: 13px; text-align: right; white-space: nowrap; }

.frame { display: flex; align-items: flex-start; }
.sidebar { width: 230px; flex-shrink: 0; padding: 14px 12px; position: sticky; top: 57px; }
.menu h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 8px 4px; font-weight: 600; }
.menu a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 6px; text-decoration: none; }
.menu a:hover { background: var(--soft); }
.menu a.current { background: var(--teal-soft); font-weight: 600; }
.menu .count { font-size: 12px; background: var(--amber-soft); color: var(--amber); border-radius: 999px; padding: 0 8px; font-weight: 600; }
main { flex: 1; min-width: 0; padding: 24px 28px 64px; display: flex; flex-direction: column; gap: 18px; max-width: 1080px; border-left: 1px solid var(--line); min-height: calc(100vh - 100px); }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.card > header { padding: 14px 16px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card > .body { padding: 0 16px 14px; }
.badge { display: inline-block; font-size: 12px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--green-soft); border-color: transparent; color: var(--green); }
.badge.wait { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.badge.teal { background: var(--teal-soft); border-color: transparent; color: var(--teal-ink); }
.btn { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 6px 12px; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(.95); }
.link { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--teal-ink); }
a.text { color: var(--teal-ink); }

/* The work list. */
.tasks details { border-top: 1px solid var(--line); }
.tasks summary { list-style: none; display: grid; grid-template-columns: 34px 1fr auto 16px; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; }
.tasks summary::-webkit-details-marker { display: none; }
.tasks summary:hover { background: var(--soft); }
.tasks .glyph { width: 34px; height: 34px; border-radius: 9px; background: var(--teal-soft); display: grid; place-items: center; font-size: 17px; }
.tasks .chev { color: var(--muted); transition: transform .15s; font-size: 20px; line-height: 1; }
.tasks details[open] .chev { transform: rotate(90deg); }
.tasks .inside { padding: 2px 16px 16px 62px; display: flex; flex-direction: column; gap: 10px; }
.rows { display: flex; flex-direction: column; }
.rows > div { padding: 8px 0; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; }
.rows > div:first-child { border-top: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.done-list div, .self-list div { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line); align-items: baseline; }
.tick { color: var(--green); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; display: block; }
a.stat:hover { background: var(--soft); }
.stat b { font-size: 1.5rem; display: block; line-height: 1.2; }

/* The member list. */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters input, .filters select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.filters input { flex: 1; min-width: 180px; max-width: 320px; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.row:hover { background: var(--soft); }
table.list tr.came-from { background: var(--teal-soft); }
table.list td a { text-decoration: none; font-weight: 600; display: block; }
.empty { padding: 20px 16px; color: var(--muted); }

/* One page per member. */
.back { align-self: flex-start; }
.person { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-ink); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.columns > div { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.item { padding: 10px 16px; border-top: 1px solid var(--line); }
.item .top { display: flex; justify-content: space-between; gap: 0 12px; flex-wrap: wrap; }
details.item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
details.item summary > :last-child { text-align: right; flex-shrink: 0; }
details.item summary::-webkit-details-marker { display: none; }
details.item summary:hover b { text-decoration: underline; }
details.item .why { margin-top: 8px; padding: 10px 12px; background: var(--soft); border-radius: 8px; display: flex; flex-direction: column; gap: 4px; }
.why .line { display: flex; justify-content: space-between; gap: 12px; }
.why .sum { border-top: 1px solid var(--line); padding-top: 4px; font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--proto); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: 0 8px 24px rgb(0 0 0 / .25); z-index: 9; max-width: calc(100vw - 32px); }

@media (max-width: 820px) {
  .frame { flex-direction: column; align-items: stretch; }
  .sidebar { width: auto; position: static; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .menu { display: flex; gap: 6px; overflow-x: auto; }
  .menu h3 { display: none; }
  .menu a { white-space: nowrap; gap: 8px; }
  main { padding: 16px 16px 56px; border-left: 0; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .who { display: none; }
  .club { display: none; }
  .search { max-width: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .columns { grid-template-columns: 1fr; }
  .tasks summary { grid-template-columns: 34px 1fr 16px; }
  .tasks summary .badge { display: none; }
  .tasks .inside { padding-left: 16px; }
  table.list thead { display: none; }
  table.list tr.row { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.list td { display: block; border: 0; padding: 1px 0; }
  table.list td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); }
}

/* ── The demo strip: scene, whose screen, events from outside ────────────── */
.proto select { background: #334155; color: #fff; border: 1px solid #475569; border-radius: 6px; padding: 3px 6px; font-size: 13px; max-width: min(60vw, 330px); }
.proto .personas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.proto .as { color: #94a3b8; }
.proto a.persona { text-decoration: none; border: 1px solid #475569; border-radius: 999px; padding: 2px 10px; color: var(--proto-ink); }
.proto a.persona.on { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.proto .today { color: #94a3b8; }
.proto button.event { background: #b45309; border-color: #d97706; font-weight: 600; }

/* ── Sign-ups and waiting lists ──────────────────────────────────────────── */
.rows > div.signup { align-items: center; }
.item.new { background: var(--teal-soft); }
.card > header h2 + .muted { display: block; font-weight: 400; }
.badge + .badge { margin-left: 4px; }

/* ── A parent's phone ────────────────────────────────────────────────────── */
body.phone-view .topbar, body.phone-view .sidebar { display: none; }
body.phone-view { background: var(--soft); }
body.phone-view .frame { justify-content: center; padding: 28px 0 48px; }
body.phone-view main { flex: none; width: 390px; max-width: 100%; min-height: 740px; padding: 0 0 28px; gap: 0; border: 1px solid var(--line); border-radius: 30px; background: var(--bg); box-shadow: 0 18px 50px rgb(0 0 0 / .14); overflow: hidden; }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); line-height: 1.25; }
.phone-head .mark { width: 36px; height: 36px; font-size: 13px; }
.phone-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.phone-body h1 { font-size: 1.4rem; }
.kid .body { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.offer { border-color: var(--teal); background: var(--teal-soft); }
.offer .body { display: flex; flex-direction: column; gap: 10px; }
.btn.wide { display: block; width: 100%; text-align: center; padding: 11px 12px; text-decoration: none; }
.form { display: flex; flex-direction: column; gap: 14px; }
.fields { display: flex; flex-direction: column; gap: 10px; }
.fields label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.fields input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-weight: 400; }
.known { background: var(--teal-soft); border-radius: 8px; padding: 8px 10px; }
.card .body > p + p, .card .body > p + .options, .card .body > .options + p, .card .body > p + label { margin-top: 10px; }
.options { display: flex; flex-direction: column; gap: 8px; }
.option { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.option input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); }
.hint { background: var(--amber-soft); color: var(--amber); border-radius: 8px; padding: 8px 10px; }
@media (max-width: 820px) {
  body.phone-view { background: var(--bg); }
  body.phone-view .frame { padding: 0; }
  body.phone-view main { width: 100%; border: 0; border-radius: 0; box-shadow: none; min-height: 0; }
  .rows > div.signup .btn { width: 100%; }
  .rows > div.signup > span:last-child { width: 100%; }
}
.item .badge { white-space: normal; }

/* ── The trainer's attendance list ───────────────────────────────────────── */
.counter { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 12px; background: var(--soft); border-radius: 10px; }
.counter .muted { flex: 1; }
.attlist { display: flex; flex-direction: column; gap: 6px; }
.att { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.att.ja { border-color: var(--green); } .att.nee { border-color: var(--amber); }
.att summary, .att.walkin { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 12px; cursor: pointer; }
.att summary::-webkit-details-marker { display: none; }
.att .kidname { flex: 1; min-width: 0; line-height: 1.3; }
.att .small { font-size: 12px; }
.att .small .badge { font-size: 11px; margin-right: 2px; }
.marks { display: flex; gap: 6px; flex-shrink: 0; }
.tap { width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 20px; font-weight: 700; color: var(--muted); }
.tap.ja.on { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.tap.nee.on { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.sheet { padding: 4px 12px 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 8px; }
.note { background: var(--amber-soft); color: var(--amber); border-radius: 8px; padding: 8px 10px; font-weight: 600; }
.propose summary { cursor: pointer; }
.propose-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.propose-form input[name="remark"] { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.option.small { padding: 8px 10px; }
.att.walkin { background: var(--teal-soft); cursor: default; }

/* ── A proposal to move a child, judged where it arrives ─────────────────── */
.proposals details.proposal { border-top: 1px dashed var(--line); }
.proposals details.proposal:first-child { border-top: 0; }
.proposals details.proposal summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto 16px; gap: 12px; padding: 8px 0; align-items: center; }
.proposals details.proposal summary::-webkit-details-marker { display: none; }
.proposals details.proposal summary:hover { background: var(--soft); }
.proposals details.proposal .chev { color: var(--muted); font-size: 20px; line-height: 1; transition: transform .15s; }
.proposals details.proposal[open] .chev { transform: rotate(90deg); }
.compare { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 12px; }
.compare table.list td:first-child { color: var(--muted); width: 140px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 820px) {
  .proposals details.proposal summary { grid-template-columns: 1fr 16px; }
  .proposals details.proposal summary > span:nth-child(2) { grid-column: 1; }
  .compare table.list thead { display: table-header-group; }
  .compare table.list tr.row { display: table-row; }
  .compare table.list td { display: table-cell; padding: 6px 8px; }
  .compare table.list td[data-label]::before { content: none; }
}

/* ── Financiën ───────────────────────────────────────────────────────────── */
.chip { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.chip.on { background: var(--teal-soft); border-color: var(--teal); font-weight: 600; }
.chip:hover { background: var(--soft); }
.stats .stat b { overflow-wrap: anywhere; }

/* ── Seizoensovergang ────────────────────────────────────────────────────── */
.step .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 13px; margin-right: 6px; }
.step.later { opacity: .75; }
.options.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.fields textarea { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: inherit; font-weight: 400; }
.fields select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-weight: 400; }
.item .num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-ink); font-size: 12px; font-weight: 700; margin-right: 6px; }

/* ── Sign-up in steps ────────────────────────────────────────────────────── */
details.card.step > summary { list-style: none; cursor: pointer; padding: 14px 16px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
details.card.step > summary::-webkit-details-marker { display: none; }
details.card.step .num { background: var(--amber); }
details.card.step.done .num { background: var(--green); }
.complete { margin-top: 6px; font-size: 13px; }
.complete .badge { white-space: normal; }
