:root {
  --bg: #f4f6f3; --card: #fff; --ink: #14201a; --muted: #5d6b63; --line: #dfe5e0;
  --brand: #14532d; --brand-ink: #fff; --accent: #f59e0b; --danger: #b42318;
  --t1: #e8590c; --t2: #1c7ed6; --t3: #2f9e44; --t4: #9c36b5; --t5: #d6336c; --t6: #0c8599; --t7: #5c940d; --t8: #868e96;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.topbar { background: var(--brand); color: var(--brand-ink); padding: calc(12px + env(safe-area-inset-top)) 16px 12px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 5; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: .3px; }
#topinfo { font-size: 14px; opacity: .85; }
.view { max-width: 640px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 12px; }
h2 { font-size: 18px; margin: 20px 0 8px; }
p.hint { color: var(--muted); font-size: 15px; margin: 4px 0 12px; }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.tabs button { flex: 1; border: 0; background: none; padding: 14px 4px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); min-height: 60px; }
.tabs button.on { color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }

.btn { display: block; width: 100%; min-height: 54px; border-radius: 14px; border: 2px solid var(--brand); background: var(--card); color: var(--brand); font: inherit; font-weight: 700; padding: 12px 16px; margin: 8px 0; cursor: pointer; text-align: center; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.small { display: inline-block; width: auto; min-height: 44px; padding: 8px 14px; margin: 0; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 8px 0; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.item:last-child { border-bottom: 0; }
.item .name { flex: 1; font-weight: 600; }
.check { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #b8c2bb; display: grid; place-items: center; color: transparent; font-weight: 800; flex: none; }
.item.on { background: #e8f3ec; } .item.on .check { background: var(--brand); border-color: var(--brand); color: #fff; }

.badge { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: #e9ecea; color: #333; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.badge.cap { background: var(--accent); color: #3b2500; }
.badge.lvl-Sterk { background: #fde2e1; color: #8a1c14; } .badge.lvl-Gemiddeld { background: #fff1cc; color: #7a5200; } .badge.lvl-Beginnend { background: #dff2e4; color: #1d5a31; }

.counter { position: sticky; top: 52px; z-index: 4; background: var(--bg); padding: 8px 0; }
.counter .box { background: var(--brand); color: #fff; border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.counter .box.warn { background: #7a4b00; }
.counter small { display: block; font-weight: 500; opacity: .9; }

label.field { display: block; font-weight: 600; margin: 12px 0 6px; }
input[type=text], input[type=date] { width: 100%; min-height: 52px; font: inherit; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
input:focus { outline: none; border-color: var(--brand); }
.seg { display: flex; gap: 8px; } .seg button { flex: 1; min-height: 52px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 700; } .seg button.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 8px 0; font-weight: 600; }
.toggle input { width: 28px; height: 28px; accent-color: var(--brand); }

#overlay:empty { display: none; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.sheet h1 { margin-top: 0; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: 608px; margin: 0 auto; background: #222; color: #fff; padding: 12px 16px; border-radius: 12px; z-index: 40; text-align: center; }
.toast.err { background: var(--danger); }

/* Teamoverzicht (ook gebruikt voor screenshot-weergave) */
.sharecard { background: #fff; border-radius: 18px; padding: 16px; border: 1px solid var(--line); }
.sharecard .title { text-align: center; margin-bottom: 12px; }
.sharecard .title b { display: block; font-size: 24px; letter-spacing: .5px; }
.sharecard .title span { color: var(--muted); text-transform: capitalize; font-size: 16px; }
.team { border-radius: 14px; overflow: hidden; border: 2px solid var(--tc); margin: 12px 0; background: #fff; }
.team-h { background: var(--tc); color: #fff; padding: 10px 14px; font-weight: 800; font-size: 20px; display: flex; justify-content: space-between; align-items: center; }
.team-h button { background: rgba(255,255,255,.25); border: 0; color: #fff; font: inherit; font-size: 14px; font-weight: 700; border-radius: 10px; padding: 8px 12px; min-height: 40px; }
.team ol { list-style: none; margin: 0; padding: 4px 0; }
.team li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; font-size: 20px; font-weight: 600; border-bottom: 1px solid #eef1ee; }
.team li:last-child { border-bottom: 0; }
.team li.edit { cursor: pointer; min-height: 52px; } .team li.sel { background: #fff3bf; outline: 3px solid var(--accent); outline-offset: -3px; }

.share-view { position: fixed; inset: 0; background: #fff; z-index: 30; overflow: auto; padding: calc(16px + env(safe-area-inset-top)) 14px 24px; }
.share-view .sharecard { border: 0; padding: 0; max-width: 520px; margin: 0 auto; }
.share-hint { position: fixed; left: 0; right: 0; bottom: 20px; text-align: center; animation: fade 4s forwards; pointer-events: none; }
.share-hint span { background: #222; color: #fff; padding: 8px 14px; border-radius: 99px; font-size: 14px; }
@keyframes fade { 0%, 70% { opacity: 1 } 100% { opacity: 0 } }

.sess-item .meta { color: var(--muted); font-size: 14px; font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.chev { color: var(--muted); font-size: 22px; }

@media print {
  body { background: #fff; padding: 0; }
  .topbar, .tabs, .toast, .share-hint, .no-print { display: none !important; }
  .view { padding: 0; } .share-view { position: static; padding: 0; overflow: visible; }
  body.printing > :not(#overlay):not(#view) { display: none; }
  .team { break-inside: avoid; } * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
