:root {
  --navy: #0b2a5b;
  --navy-2: #163f80;
  --blue-soft: #e8eefb;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #141a2a;
  --muted: #667085;
  --line: #e3e7ee;
  --yes: #15803d;
  --yes-bg: #e5f6eb;
  --maybe: #b45309;
  --maybe-bg: #fef3dc;
  --no: #c62828;
  --no-bg: #fdeaea;
  --grey: #8a93a3;
  --grey-bg: #eef0f4;
  --ere: #e8590c;
  --ere-bg: #fff0e6;
  --ober: #5b3cc4;
  --ober-bg: #efeafd;
  --r: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body.has-nav { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
a { color: var(--navy-2); }
h1 { font-size: 1.35rem; margin: .1rem 0 .5rem; letter-spacing: -.01em; line-height: 1.2; }
h2 { font-size: .98rem; margin: 1.1rem 0 .45rem; display: flex; align-items: center; gap: .4rem; }
p { margin: .4rem 0; }
.count { background: var(--grey-bg); color: var(--muted); font-size: .75rem; padding: 1px 7px; border-radius: 99px; font-weight: 700; }
.muted { color: var(--muted); font-weight: normal; }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; margin: .3rem 0; }
pre { margin: .4rem 0 0; white-space: pre-wrap; font-size: .85rem; }
[hidden] { display: none !important; }

/* ---------- kop & navigatie ---------- */
.top {
  position: sticky; top: 0; z-index: 10; background: var(--navy); color: #fff;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { color: #fff; text-decoration: none; font-weight: 700; display: flex; align-items: center; gap: .5rem; font-size: 1rem; }
.brand b { font-weight: 800; color: #9cc4ff; }
.brand-text { line-height: 1.15; }
.logo { height: 38px; width: auto; display: block; margin: -3px 2px -3px 0; }
.puck { width: 20px; height: 12px; background: #fff; border-radius: 50%; box-shadow: 0 3px 0 #9cc4ff; }
.who { font-size: .85rem; opacity: .85; }

main { max-width: 640px; margin: 0 auto; padding: 12px 14px 24px; }

nav.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff;
  border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom);
}
nav.bottom a {
  flex: 1; min-width: 0; text-align: center; text-decoration: none; color: var(--muted); font-size: .66rem; font-weight: 600; white-space: nowrap;
  padding: 7px 2px 8px; display: flex; flex-direction: column; align-items: center; gap: 1px;
}
nav.bottom svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav.bottom a.on { color: var(--navy); }

.flash { padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-weight: 500; font-size: .92rem; animation: drop .25s ease-out; }
.flash-ok { background: var(--yes-bg); color: #0b5e2a; }
.flash-error { background: var(--no-bg); color: #8e1b1b; }

/* ---------- knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:active, .mini:active, .fchip:active, .toggle:active { transform: scale(.97); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-big { width: 100%; min-height: 50px; font-size: 1.02rem; }
.btn-s { min-height: 36px; padding: 0 11px; font-size: .86rem; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-danger { background: #fff; color: var(--no); border-color: #f3b9b9; width: 100%; }
.btn-danger-s { color: var(--no); border-color: #f3c4c4; }
.btn-wa { background: #128c4a; border-color: #128c4a; color: #fff; }
.btn-reserve { background: var(--grey-bg); border-color: #d5dae2; color: #4a5263; }
.btn-x { width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 1rem; cursor: pointer; border-radius: 8px; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--navy-2); text-decoration: underline; cursor: pointer; }
.inline { display: inline; margin: 0; }
.row-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.back { display: inline-block; margin: 0 0 8px; text-decoration: none; font-weight: 600; font-size: .92rem; }

/* ---------- filters ---------- */
.chips { display: flex; gap: 6px; margin: 2px 0 12px; overflow-x: auto; }
.chip { padding: 6px 12px; border-radius: 99px; background: #fff; border: 1.5px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-eredivisie.on { background: var(--ere); border-color: var(--ere); }
.chip-oberliga.on { background: var(--ober); border-color: var(--ober); }

/* ---------- wedstrijdkaarten ---------- */
.card {
  display: block; background: var(--card); border-radius: var(--r); padding: 11px 13px 12px; margin-bottom: 10px;
  color: inherit; text-decoration: none; border-left: 5px solid var(--navy);
  box-shadow: 0 1px 2px rgba(16,24,40,.06); scroll-margin-top: 64px;
}
.card.comp-eredivisie { border-left-color: var(--ere); }
.card.comp-oberliga { border-left-color: var(--ober); }
.card-link:active { transform: scale(.99); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.badge { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 5px; }
.badge-eredivisie { background: var(--ere-bg); color: #a63c00; }
.badge-oberliga { background: var(--ober-bg); color: var(--ober); }
.when { color: var(--muted); font-size: .8rem; font-weight: 500; }
.date { font-weight: 600; font-size: .95rem; color: #3a4252; }
.date::first-letter { text-transform: uppercase; }
.opp { font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; }
.notes { background: var(--bg); padding: 6px 9px; border-radius: 8px; margin: 8px 0 0; font-size: .88rem; }
.assigned { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--blue-soft); color: var(--navy); font-size: .92rem; }
.assigned-reserve { background: var(--grey-bg); color: #4a5263; }
.hint { text-align: center; color: var(--maybe); font-size: .8rem; font-weight: 600; margin: 6px 0 0; }
.hint-locked { color: var(--muted); }

.counts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; }
.cnt { font-size: .78rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.cnt-yes { background: var(--yes-bg); color: var(--yes); }
.cnt-maybe { background: var(--maybe-bg); color: var(--maybe); }
.cnt-no { background: var(--no-bg); color: var(--no); }
.cnt-sep { width: 1.5px; align-self: stretch; background: var(--line); margin: 1px 3px; }
.score-low { background: var(--no-bg) !important; color: var(--no) !important; }
.score-mid { background: var(--maybe-bg) !important; color: var(--maybe) !important; }
.score-high { background: var(--yes) !important; color: #fff !important; }
.cnt-reserve { background: var(--grey-bg); color: var(--muted); }
.rank-line { margin-top: 6px; font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-open { background: var(--yes); } .dot-closed { background: var(--maybe); }

/* beschikbaarheid (medewerker) */
.choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px;
  border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit; font-size: 1.25rem;
  font-weight: 800; color: var(--muted); cursor: pointer; line-height: 1.1;
}
.opt span { font-size: .78rem; font-weight: 700; }
.opt-yes { color: var(--yes); } .opt-maybe { color: var(--maybe); } .opt-no { color: var(--no); }
.opt-yes.on { background: var(--yes); border-color: var(--yes); color: #fff; }
.opt-maybe.on { background: var(--maybe); border-color: var(--maybe); color: #fff; }
.opt-no.on { background: var(--no); border-color: var(--no); color: #fff; }
.btn.opt-yes, .btn.opt-maybe, .btn.opt-no { display: inline-flex; flex-direction: row; min-height: 36px; font-size: .86rem; }
.choice.locked .opt { cursor: not-allowed; opacity: .5; }
.choice.locked .opt.on { opacity: 1; }
details.note { margin-top: 8px; }
details.note summary { color: var(--muted); font-size: .85rem; cursor: pointer; }
details.note input { margin-top: 6px; }

/* ---------- wedstrijdpagina (beheer) ---------- */
.head-card { margin-bottom: 8px; }

.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toggles form { display: block; }
.toggle {
  width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center;
  text-align: left; padding: 9px 11px; border-radius: var(--r); border: 1.5px solid var(--line); background: #fff;
  font: inherit; cursor: pointer; color: var(--text); transition: background .2s, border-color .2s;
}
.t-label { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
.t-state { grid-row: 2; grid-column: 1 / span 2; font-weight: 700; font-size: .92rem; white-space: nowrap; margin-top: 2px; }
.sw { grid-row: 1; grid-column: 2; width: 40px; height: 24px; border-radius: 99px; background: #cfd5df; position: relative; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.toggle.on { border-color: #b7e2c5; background: #f4fbf6; }
.toggle.on .sw { background: var(--yes); }
.toggle.on .sw::after { transform: translateX(16px); }
.toggle.off .t-state { color: var(--muted); }
/* 'Reageren gesloten': aan = rood */
.toggle-close.off .t-state { color: var(--text); }
.toggle-close.on { border-color: var(--no); background: #fff5f5; }
.toggle-close.on .sw { background: var(--no); }
.toggle-close.on .t-label { color: var(--no); }
.toggle-close.off .t-label { color: var(--yes); }
.toggle-note { margin: 5px 2px 0; }

.sec { background: #fff; border-radius: var(--r); padding: 10px 12px 12px; margin-top: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.06); scroll-margin-top: 64px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; }
.sec-head h2 { margin: 0; font-size: 1.05rem; }
.score { font-weight: 800; font-size: 1rem; padding: 2px 10px; border-radius: 99px; background: var(--maybe-bg); color: var(--maybe); }
.score.full { background: var(--yes); color: #fff; }
.open-pos { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 2px; }
.pos-chip { font-size: .74rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; border: 1.5px dashed #f0b56a; color: var(--maybe); background: #fffaf1; }
.pos-chip.is-opt { border-color: #d5dae2; color: var(--grey); background: #fafbfc; }

.crew-list { margin-top: 8px; }
.crew-item { border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.crew-item:first-child { border-top: 0; }
.crew-row {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 2px; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.crew-func { min-width: 92px; font-weight: 800; font-size: .86rem; color: var(--navy); }
.crew-func.empty { color: var(--maybe); font-weight: 700; }
.crew-func.filled { color: var(--yes); }
.crew-name { flex: 1; font-weight: 600; }
.chev { color: var(--muted); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.open > .crew-row .chev { transform: rotate(90deg); }
.crew-item.is-reserve .crew-func, .crew-item.is-reserve .crew-name { color: var(--grey); }
.crew-item.is-reserve .crew-name { font-weight: 500; }
.crew-sep { margin-top: 6px; padding: 6px 2px 2px; border-top: 1px solid var(--line); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--grey); }
.crew-empty { color: var(--muted); font-size: .9rem; margin: 4px 0; }
.crew-item .pbody { padding: 0 2px 12px; }
.crew-item.hl { animation: arrive 1.6s ease-out; border-radius: 8px; }

.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fchip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 7px 4px; min-height: 48px;
  border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: .84rem;
  color: var(--text); cursor: pointer; line-height: 1.15;
}
.fchip small { font-size: .68rem; font-weight: 600; color: var(--muted); }
.fchip.pref { border-color: #9cc4ff; background: #f5f8ff; }
.fchip.is-opt { border-style: dashed; }
.fchip.taken { background: var(--yes-bg); border-color: #b7e2c5; color: var(--yes); }
.fchip.taken small { color: var(--yes); }
.fchip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.fchip.on small { color: #9cc4ff; }
.fchip.ghost { color: var(--muted); font-weight: 600; }

.guest-row { display: flex; gap: 6px; margin: 10px 0 4px; }
.guest-row input { flex: 1; min-height: 40px !important; margin: 0 !important; padding: 8px 10px !important; font-size: 16px; }

details.group { margin-top: 12px; }
details.group > summary {
  list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer;
  font-weight: 800; font-size: .95rem; padding: 4px 2px;
}
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary::after { content: "›"; margin-left: auto; color: var(--muted); font-size: 1.3rem; transition: transform .2s; }
details.group[open] > summary::after { transform: rotate(90deg); }
.g-yes > summary { color: var(--yes); } .g-maybe > summary { color: var(--maybe); }
.g-no > summary { color: var(--no); } .g-none > summary, .g-hidden > summary { color: var(--muted); }

.person {
  background: #fff; border-radius: 10px; margin-top: 6px; box-shadow: 0 1px 2px rgba(16,24,40,.05);
  scroll-margin-top: 80px; overflow: hidden;
  transition: transform .35s ease-in, opacity .35s ease-in, height .35s ease-in, margin .35s ease-in;
}
.person.open { box-shadow: 0 0 0 1.5px var(--navy-2); }
.person.moving { transform: translateY(-14px) scale(.96); opacity: 0; height: 0 !important; margin-top: 0; }
.prow { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 0; }
.pmain {
  flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px;
  padding: 4px 4px 4px 11px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.pname { font-weight: 700; }
.pfuncs, .pnote { flex-basis: 100%; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnote { font-style: italic; color: #4a5263; }
.person .pbody { padding: 0 11px 11px; }
.person .pbody .row-btns:first-child { margin-top: 0; }

.mini {
  min-height: 36px; padding: 0 11px; border-radius: 9px; font: inherit; font-weight: 700; font-size: .84rem;
  cursor: pointer; border: 1.5px solid transparent; transition: background .2s, color .2s, transform .1s;
}
.mini-in { background: var(--navy); color: #fff; }
.mini-res { background: var(--grey-bg); color: #4a5263; border-color: #d5dae2; }
.mini.done { background: var(--yes); border-color: var(--yes); color: #fff; animation: pop .3s ease-out; transition: none; }

.rank { font-size: .66rem; font-weight: 800; padding: 1px 5px; border-radius: 4px; }
.rank-1 { background: var(--blue-soft); color: var(--navy); }
.rank-2 { background: var(--grey-bg); color: var(--muted); }
.tag { font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--maybe-bg); color: var(--maybe); }
.tag-guest { background: #fff3d6; color: #8a5300; }
.tag-admin { background: var(--blue-soft); color: var(--navy); }

@keyframes arrive {
  0% { background: #c9f0d6; transform: translateX(-10px); }
  25% { transform: none; }
  100% { background: transparent; }
}
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- lijsten & formulieren ---------- */
.box { background: #fff; border-radius: var(--r); padding: 12px 14px; margin-bottom: 12px; border: 1px solid var(--line); }
.list { list-style: none; padding: 0; margin: 0; background: #fff; border-radius: var(--r); border: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list a { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 10px 40px 10px 13px; text-decoration: none; color: inherit; }
.list a::after { content: "›"; position: absolute; right: 14px; top: 8px; color: var(--muted); font-size: 1.3rem; }
.optflag { display: flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.add-row { display: flex; gap: 8px; margin-top: 10px; }
.add-row input { flex: 1; margin-top: 0 !important; }

.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: block; font-weight: 600; font-size: .92rem; }
input:not([type=radio]):not([type=checkbox]), select, textarea {
  display: block; width: 100%; margin-top: 5px; font: inherit; font-size: 16px; padding: 10px 11px; min-height: 44px;
  border: 1.5px solid #cfd5df; border-radius: 10px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 3px solid #9cc4ff; border-color: var(--navy-2); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 5px; padding: 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.two > label { min-width: 0; }

/* Datum- en tijdvelden: iOS Safari geeft ze een eigen minimale breedte en centreert de tekst.
   Hier zorgen we dat ze netjes binnen hun kolom blijven en links uitlijnen zoals andere velden. */
input[type=date], input[type=time] {
  -webkit-appearance: none; appearance: none;
  min-width: 0; max-width: 100%; width: 100%;
  text-align: left; line-height: 1.3;
}
input[type=date]::-webkit-date-and-time-value,
input[type=time]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type=date]::-webkit-calendar-picker-indicator,
input[type=time]::-webkit-calendar-picker-indicator { opacity: .55; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 2px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; cursor: pointer; }
.seg-opt input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg-eredivisie input:checked + span { background: var(--ere); border-color: var(--ere); }
.seg-oberliga input:checked + span { background: var(--ober); border-color: var(--ober); }
.seg-opt input:focus-visible + span, .check input:focus-visible + span { outline: 3px solid #9cc4ff; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check span { display: inline-block; padding: 7px 12px; border-radius: 99px; border: 2px solid var(--line); background: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; }
.check input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.check input:checked + span::before { content: "✓ "; }
.switch { display: flex; align-items: flex-start; gap: 10px; background: #fff; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }
.switch input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--navy); }

.danger-zone { margin-top: 24px; }
.empty { text-align: center; padding: 26px 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.footer-links { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; text-align: center; font-size: .9rem; }

/* bestanden */
.quick-files { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 10px; }
.quick-file { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 10px; background: #fff4dc; border: 1.5px solid #f6d48a; color: #7a4e00; font-weight: 700; font-size: .88rem; text-decoration: none; }
.files { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.file { display: flex; gap: 12px; background: #fff; border-radius: var(--r); padding: 10px; box-shadow: 0 1px 2px rgba(16,24,40,.06); }
.file-thumb { flex: none; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--grey-bg); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-type { font-weight: 800; font-size: .8rem; color: var(--muted); letter-spacing: .05em; }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.file-info .tiny { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.file-info .row-btns { margin-top: 6px; }
.upload b { font-size: .95rem; }
.show-file { background: #fff; border-radius: var(--r); padding: 10px; margin-bottom: 10px; text-align: center; }
.show-file img { max-width: 100%; max-height: 70vh; border-radius: 8px; }
.pdf-frame { width: 100%; height: 70vh; border: 0; }

/* checklists */
.cl-wrap { margin-top: 8px; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.cl-wrap > summary { cursor: pointer; font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.cl-count { margin-left: auto; font-size: .75rem; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: var(--maybe-bg); color: var(--maybe); white-space: nowrap; }
.crew-row .cl-count { margin-left: 0; }
.cl-count.full { background: var(--yes-bg); color: var(--yes); }
.checklist { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.checklist form { margin: 0; }
.ck { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 8px; min-height: 42px;
      border: 1.5px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-size: .92rem; color: var(--text); cursor: pointer; }
.box-ck { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid #b8c0cc; display: flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s; }
.ck.done { background: #f4fbf6; border-color: #b7e2c5; }
.ck.done .box-ck { background: var(--yes); border-color: var(--yes); }
.ck.done .box-ck::after { content: "✓"; color: #fff; font-size: .8rem; font-weight: 900; }
.ck.done .ck-text { color: var(--muted); text-decoration: line-through; }

/* agenda */
.cal-box .small { margin-top: 0; }
.cal-scope { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.cal-scope > summary { cursor: pointer; }
.cal-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.cal-btns .btn { width: 100%; }
.cal-g { border-color: #c6dafc; color: #1a56c4; }
.cal-o { border-color: #c7d8f2; color: #0f4c9c; }
.cal-a { border-color: #d5dae2; }
.cal-copy { display: flex; gap: 6px; margin-top: 8px; }
.cal-copy input { margin: 0 !important; min-height: 36px !important; padding: 6px 9px !important; font-size: 13px !important; color: var(--muted); }

.push-banner { background: #fff; border: 1.5px solid #9cc4ff; border-radius: var(--r); padding: 10px 12px; margin-bottom: 12px; }
.push-box p { margin: 0 0 6px; }
.ok-text { color: var(--yes); }

.login { max-width: 380px; margin: 5vh auto 0; }
.login h1 { margin-bottom: 0; }
.login .stack { margin-top: 18px; }
.notice { border-color: #f6d48a; background: #fffaf0; margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.login-logo { background: var(--navy); border-radius: var(--r); padding: 20px; margin-bottom: 16px; text-align: center; }
.login-logo img { height: 90px; width: auto; }

@media (max-width: 400px) { .brand-text { font-size: .92rem; } }

/* ---------- strakker op telefoon ---------- */
.sub { font-size: .86rem; color: var(--muted); margin: -.25rem 0 .8rem; line-height: 1.4; }
.page-head + .sub { margin-top: -.1rem; }
.center { text-align: center; }
.box-title { font-size: .95rem; }

/* agenda-menuutje op kaarten */
.card-top-r { display: flex; align-items: center; gap: 8px; }
.cal-menu { position: relative; }
.cal-menu > summary { list-style: none; width: 30px; height: 26px; border-radius: 8px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: .9rem; cursor: pointer; }
.cal-menu > summary::-webkit-details-marker { display: none; }
.cal-menu[open] > summary { background: var(--blue-soft); }
.cal-pop { position: absolute; right: 0; top: 32px; z-index: 6; min-width: 180px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px -8px rgba(11,42,91,.35), 0 0 0 1px var(--line); overflow: hidden; animation: drop .15s ease-out; }
.cal-pop a { display: block; padding: 11px 14px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--text); border-top: 1px solid var(--line); }
.cal-pop a:first-child { border-top: 0; }

/* compacte rijen (functies, checklists) */
.rows { background: #fff; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; }
.frow { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 32px; gap: 6px; align-items: center; padding: 5px 6px 5px 4px; border-top: 1px solid var(--line); margin: 0; }
.frow:first-child { border-top: 0; }
.frow form { margin: 0; }
.frow-3 { grid-template-columns: 32px minmax(0, 1fr) 32px; }
.frow-add, .frow-3.frow-add { grid-template-columns: 32px minmax(0, 1fr) auto; background: #fafbfc; }
.frow-main { display: flex; gap: 6px; align-items: center; min-width: 0; }
.inline-input { flex: 1; min-width: 0; margin: 0 !important; min-height: 38px !important; padding: 6px 9px !important;
  border-color: transparent !important; background: var(--bg) !important; font-weight: 600 !important; }
.inline-input:focus { border-color: var(--navy-2) !important; background: #fff !important; }
.icon-btn { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 8px; color: var(--muted); font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.icon-btn:disabled { visibility: hidden; }
.icon-btn.danger:active { background: var(--no-bg); color: var(--no); }
.pill-toggle { position: relative; flex: none; margin: 0; }
.pill-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pill-toggle span { display: inline-block; padding: 6px 8px; border-radius: 7px; border: 1.5px dashed #cfd5df; font-size: .72rem; font-weight: 800; color: var(--grey); cursor: pointer; }
.pill-toggle input:checked + span { border-style: solid; border-color: #c6d4ee; background: var(--blue-soft); color: var(--navy); }
.pill-toggle input:focus-visible + span { outline: 3px solid #9cc4ff; }
.pill-link { padding: 7px 9px; border-radius: 8px; background: var(--grey-bg); color: var(--muted); font-weight: 800; font-size: .8rem; text-decoration: none; white-space: nowrap; }
.pill-link.has { background: var(--blue-soft); color: var(--navy); }
.empty-row { padding: 12px 14px; color: var(--muted); font-size: .88rem; margin: 0; }

/* instellingen */
.setting-row { display: flex; flex-direction: column; gap: 6px; }
.setting-row > input { margin-top: 0; }
.inline-save { display: flex; gap: 8px; align-items: center; }
.inline-save input { margin: 0 !important; width: 110px !important; flex: none; }

/* account */
.me-row { display: flex; align-items: center; gap: 12px; }
.me-row form { margin: 0; }
.me-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.row-btns.tight { margin-top: 0; }
.push-box .tiny { margin: 8px 0 0; }
.fold > summary { cursor: pointer; }
.fold[open] > summary { margin-bottom: 10px; }
.cal-note { margin-top: 8px; }
.cal-scope:first-of-type { border-top: 0; padding-top: 0; }

/* bestandskiezer */
.file-drop { position: relative; display: flex; align-items: center; gap: 10px; border: 2px dashed #c9d0db; border-radius: 10px; padding: 13px 14px; cursor: pointer; background: var(--bg); font-weight: 700; color: var(--navy); font-size: .92rem; overflow: hidden; }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop [data-file-name] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-drop.chosen { border-style: solid; border-color: #b7e2c5; background: var(--yes-bg); color: var(--yes); }
.fd-icon { font-size: 1.2rem; }

/* ---------- bezetting als rustige lijst met posities ---------- */
.slots { margin-top: 6px; }
.slot { border-top: 1px solid var(--line); scroll-margin-top: 80px; border-radius: 0; }
.slots > .slot:first-child { border-top: 0; }
.slot-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 2px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.slot-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--yes); }
.slot-pos { flex: none; width: 96px; font-size: .84rem; font-weight: 700; color: var(--muted); }
.slot-name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-add { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed #e3a857; color: var(--maybe); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.slot .chev { flex: none; }
.slot .cl-count { margin-left: 0; }

/* lege verplichte plek */
.slot.is-open .slot-dot { background: transparent; border: 2px solid #e3a857; }
.slot.is-open .slot-name { color: var(--maybe); font-weight: 600; }
/* lege optionele plek: rustig grijs */
.slot.is-open.is-optional .slot-dot { border-color: #cfd5df; }
.slot.is-open.is-optional .slot-pos, .slot.is-open.is-optional .slot-name { color: var(--grey); font-weight: 500; }
.slot.is-open.is-optional .slot-add { border-color: #cfd5df; color: var(--grey); }
/* iemand zonder functie */
.slot.is-nofunc .slot-dot { background: var(--maybe); }
.slot.is-nofunc .slot-pos { color: var(--maybe); }
/* reserve */
.slot.is-reserve .slot-dot { background: #cfd5df; }
.slot.is-reserve .slot-name { color: var(--grey); font-weight: 500; }
.slot.open > .slot-row .chev { transform: rotate(90deg); }
.slot.open > .slot-row .slot-add { background: var(--maybe-bg); }
.slot .pbody { padding: 0 2px 12px 22px; }
.slot.hl { animation: arrive 1.6s ease-out; border-radius: 8px; }
.slot-sep { padding: 12px 2px 4px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--grey); border-top: 1px solid var(--line); }

.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick form { margin: 0; }
.pick-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: .9rem; color: var(--text); cursor: pointer; }
.pick-chip small { font-size: .7rem; font-weight: 600; color: var(--muted); }
.pick-chip.pref { border-color: #9cc4ff; background: #f5f8ff; color: var(--navy); }
.pick-chip.maybe { border-style: dashed; }
.pick-chip:active { transform: scale(.97); }

/* ---------- 'Jij' bij een wedstrijd en in het overzicht ---------- */
.me-sec .sec-head h2 { font-size: .95rem; }
.me-sec .choice { margin-top: 8px; }
.card-main { display: block; color: inherit; text-decoration: none; }
.card-main:active { opacity: .8; }
.open-link { margin-left: auto; font-weight: 700; color: var(--navy-2); }
.me-split { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.me-split::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.me-split + .assigned, .me-split + .my-choice .choice, .me-split + .cl-wrap { margin-top: 8px; }

/* ---------- overzicht: maanden, binnenkort, filteranimatie ---------- */
.month { margin: 16px 2px 8px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.month::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.match-list > .month:first-child, .match-list > .month:first-of-type { margin-top: 2px; }
.card.soon { box-shadow: 0 0 0 2px #f59e0b, 0 6px 16px -8px rgba(245,158,11,.55); }
.when-soon { color: #b45309; font-weight: 800; }
.card.leaving { animation: card-out .22s ease-in forwards; pointer-events: none; }
.card.entering { animation: card-in .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes card-out { to { opacity: 0; transform: translateX(-24px) scale(.97); } }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.chip { transition: background .2s, color .2s, border-color .2s; }
.filter-empty { padding: 20px 10px; color: var(--muted); }

/* ---------- meldingvoorkeuren ---------- */
.prefs { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.prefs-title { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; display: flex; justify-content: space-between; }
.prefs-saved { color: var(--yes); animation: drop .2s ease-out; }
.pref-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-weight: 400; cursor: pointer; }
.prefs-title + .pref-row { border-top: 0; }
.pref-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pref-text b { font-size: .92rem; }
.pref-text .tiny { margin: 0; }
.ios-switch { -webkit-appearance: none; appearance: none; flex: none; width: 46px !important; height: 28px; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
  border-radius: 99px; background: #cfd5df !important; border: 0 !important; position: relative; cursor: pointer; transition: background .2s; }
.ios-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.ios-switch:checked { background: var(--yes) !important; }
.ios-switch:checked::after { transform: translateX(18px); }
.ios-switch:focus-visible { outline: 3px solid #9cc4ff; }

/* ---------- woorden i.p.v. tekens, knipperende rand ---------- */
.opt { font-size: .95rem; font-weight: 800; line-height: 1.15; padding: 6px 4px; min-height: 52px; text-align: center; }
.avail-words { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: .84rem; font-weight: 700; }
.w-yes { color: var(--yes); } .w-maybe { color: var(--maybe); } .w-no { color: var(--no); }
.btn.opt-yes, .btn.opt-maybe, .btn.opt-no { font-weight: 700; }
.g-yes > summary, .g-maybe > summary, .g-no > summary { font-weight: 800; }

.card.soon { box-shadow: 0 0 0 3px #f59e0b; animation: soon-pulse 2.6s ease-in-out infinite; }
@keyframes soon-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 1), 0 6px 18px -8px rgba(245, 158, 11, .6); }
  50%      { box-shadow: 0 0 0 3px rgba(245, 158, 11, .2), 0 6px 18px -8px rgba(245, 158, 11, 0); }
}

/* ---------- wedstrijden inklappen ---------- */
.collapse-btn { width: 30px; height: 26px; border: 0; border-radius: 8px; background: var(--bg); color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; font-size: 1rem; font-weight: 800; }
.collapse-btn span { display: inline-block; transition: transform .25s ease; line-height: 1; margin-top: 4px; }
.card.collapsed .collapse-btn span { transform: rotate(180deg); margin-top: -2px; }
.card-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .28s ease; }
.card-body-in { min-height: 0; overflow: hidden; }
.card.collapsed .card-body { grid-template-rows: 0fr; }
.card.collapsed .card-body-in { visibility: hidden; transition: visibility 0s .28s; }
.card-sum { display: none; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: .84rem; font-weight: 700; }
.card.collapsed .card-sum { display: flex; animation: drop .2s ease-out; }
.sum-role { color: var(--navy); }
.sum-open { color: var(--maybe); }
.card.collapsed { padding-bottom: 10px; }

/* checklist-link op de kaart, pijltje naar de wedstrijd */
.cl-link-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 9px 10px; border-radius: 10px; background: var(--bg); color: var(--text); text-decoration: none; font-weight: 700; font-size: .9rem; }
.cl-link-row .cl-count { margin-left: auto; }
.cl-link-row .chev { color: var(--muted); font-size: 1.2rem; line-height: 1; }
.open-arrow { color: var(--muted); font-weight: 600; }
.me-sec > .assigned:first-child { margin-top: 0; }

.tag-push { background: var(--yes-bg); color: var(--yes); }
