/* SVH Heren 1 Team App */
:root {
  /* Clubkleuren SVH: rood, wit, zwart */
  --navy: #1a1718;
  --navy-2: #2d2829;
  --navy-3: #d4111a;
  --gold: #ee1b24;
  --gold-ink: #ffffff;
  --red-soft: #fde8e9;
  --bg: #f1f0f0;
  --surface: #ffffff;
  --surface-2: #f6f5f5;
  --ink: #161314;
  --ink-2: #4d4748;
  --ink-3: #807a7b;
  --line: #e6e2e2;
  --yes: #12a150;
  --yes-bg: #e3f6ec;
  --maybe: #d98a00;
  --maybe-bg: #fff3d6;
  --no: #d63b3b;
  --no-bg: #fde6e6;
  --none: #9aa3b2;
  --home: #1a1718;
  --home-bg: #e9e7e7;
  --away: #c8101a;
  --away-bg: #fde8e9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(13, 22, 38, .06), 0 4px 16px rgba(13, 22, 38, .06);
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0c0c;
    --surface: #181616;
    --surface-2: #221f1f;
    --ink: #f4f2f2;
    --ink-2: #c4bebe;
    --ink-3: #8c8585;
    --line: #332e2e;
    --navy-3: #ff4048;
    --red-soft: #3a1416;
    --yes-bg: #0f3324;
    --maybe-bg: #3a2c09;
    --no-bg: #3d1717;
    --home: #f4f2f2;
    --home-bg: #2d2a2a;
    --away: #ff6b72;
    --away-bg: #3a1416;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--home); text-decoration: none; }
img { display: block; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: .01em; margin: 0; line-height: 1.1; }
.splash { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: #fff; color: var(--navy); font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.splash img { border-radius: 22px; }

/* ---------- Layout ---------- */
.shell { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; color: #161314;
  background: #fff; border-bottom: 4px solid var(--gold);
  padding: calc(var(--safe-t) + 8px) 16px 8px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.topbar .brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: #161314; }
.topbar .brand img { height: 44px; width: auto; border-radius: 0; }
.topbar .brand b { font-family: var(--font-display); font-size: 22px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.topbar .brand b { border-left: 2px solid #e6e2e2; padding-left: 12px; color: #161314; }
.topbar .brand b span { color: var(--gold); }
.topbar .back { background: none; border: 0; color: #161314; padding: 6px; margin-left: -6px; cursor: pointer; display: grid; place-items: center; }
.topbar .page-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .me-btn { background: none; border: 0; padding: 0; cursor: pointer; }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 16px 16px calc(96px + var(--safe-b)); }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; color: var(--ink-3);
  font-size: 11.5px; font-weight: 600; position: relative;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--navy-3); }
.tabbar a.active::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
.badge-dot { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--no); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 236px 1fr; grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; }
  .tabbar {
    position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px); display: flex; flex-direction: column;
    border-top: 0; border-right: 1px solid var(--line); padding: 16px 12px; gap: 4px; grid-row: 2;
  }
  .tabbar a { flex-direction: row; gap: 12px; font-size: 15px; padding: 11px 14px; border-radius: 12px; }
  .tabbar a.active { background: var(--surface-2); }
  .tabbar a.active::before { top: 20%; bottom: 20%; left: 0; right: auto; width: 4px; height: auto; border-radius: 0 4px 4px 0; }
  .tabbar .more-only { display: flex; }
  .badge-dot { position: static; margin-left: auto; }
  main { padding: 24px 28px 48px; grid-row: 2; grid-column: 2; }
  .mobile-only { display: none !important; }
}
@media (max-width: 899px) { .tabbar .more-only { display: none; } .desktop-only { display: none !important; } }

/* ---------- Components ---------- */
.grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid.two { grid-template-columns: 1fr 1fr; align-items: start; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.hidden { display: none !important; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; border: 1px solid var(--line); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-head h2 { font-size: 21px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.card-head .link { margin-left: auto; font-size: 14px; font-weight: 600; }
.section-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 18px 2px 8px; }

.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  background: radial-gradient(120% 140% at 100% 0%, #3a2f30 0%, var(--navy) 60%);
}
.hero::after { content: ''; position: absolute; right: 24px; top: -60px; width: 26px; height: 150px; z-index: 0; background: var(--gold); opacity: .9; box-shadow: -22px 0 0 rgba(255,255,255,.08); transform: rotate(24deg); pointer-events: none; }
.hero .kicker { font-family: var(--font-display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: #ff4b53; font-weight: 700; }
.hero .versus { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 30px; line-height: 1.05; text-transform: uppercase; margin: 8px 0 4px; }
.hero .versus .vs { color: #ff4b53; font-size: 20px; padding: 0 4px; }
.hero .meta { color: #d6d0d0; font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.hero .meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero .countdown { position: absolute; right: 16px; top: 16px; z-index: 1; text-align: center; background: var(--gold); border-radius: 12px; padding: 6px 10px; font-family: var(--font-display); }
.hero .countdown b { display: block; font-size: 28px; line-height: 1; color: #fff; }
.hero .countdown small { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.chip.home { background: var(--home-bg); color: var(--home); }
.chip.away { background: var(--away-bg); color: var(--away); }
.chip.gold { background: var(--gold); color: var(--gold-ink); }
.chip.yes { background: var(--yes-bg); color: var(--yes); }
.chip.maybe { background: var(--maybe-bg); color: var(--maybe); }
.chip.no { background: var(--no-bg); color: var(--no); }
.chip.none { background: var(--surface-2); color: var(--ink-3); }
.chip.plain { background: var(--surface-2); color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; border-radius: 12px;
  padding: 11px 16px; font-weight: 700; font-size: 15px; background: var(--navy); color: #fff; transition: transform .08s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.gold { background: var(--gold); color: var(--gold-ink); }
.btn.ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--no-bg); color: var(--no); }
.btn.small { padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
@media (prefers-color-scheme: dark) { .btn { background: #3a3435; } .btn.gold { background: var(--gold); } .btn.ghost { background: var(--surface-2); } }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--ink-3); padding: 6px; border-radius: 8px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }

/* Beschikbaarheid knoppen */
.avail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.avail button {
  border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 6px; cursor: pointer;
  font-weight: 700; font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-2);
  transition: all .12s;
}
.avail button .i { font-size: 20px; line-height: 1; }
.avail button.yes.on { border-color: var(--yes); background: var(--yes-bg); color: var(--yes); }
.avail button.maybe.on { border-color: var(--maybe); background: var(--maybe-bg); color: var(--maybe); }
.avail button.no.on { border-color: var(--no); background: var(--no-bg); color: var(--no); }
.hero .avail button { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }
.hero .avail button.yes.on { background: var(--yes); border-color: var(--yes); color: #fff; }
.hero .avail button.maybe.on { background: var(--maybe); border-color: var(--maybe); color: #fff; }
.hero .avail button.no.on { background: var(--no); border-color: var(--no); color: #fff; }

/* Telbalk */
.tally { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.hero .tally { background: rgba(255, 255, 255, .12); }
.tally i { display: block; height: 100%; }
.tally .y { background: var(--yes); } .tally .m { background: var(--maybe); } .tally .n { background: var(--no); }
.tally-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; margin-top: 6px; }
.tally-legend b { font-size: 16px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.y { background: var(--yes); } .dot.m { background: var(--maybe); } .dot.n { background: var(--no); } .dot.o { background: var(--none); }
.big-count { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: .9; }
.big-count small { font-size: 18px; color: var(--ink-3); font-weight: 600; }

/* Avatars */
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; overflow: hidden; background: var(--navy-3); object-fit: cover; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.xl { width: 112px; height: 112px; font-size: 38px; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.avatars { display: flex; flex-wrap: wrap; }
.avatars .avatar { margin-right: -6px; border: 2px solid var(--surface); }
.hero .avatars .avatar { border-color: var(--navy); }

.people { display: flex; flex-direction: column; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person .who { flex: 1; min-width: 0; }
.person .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .who small { color: var(--ink-3); font-size: 12.5px; }

.group-label { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 14px 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.group-label:first-child { margin-top: 0; }
.group-label .cnt { margin-left: auto; font-family: var(--font-display); font-size: 18px; }

/* Lijsten */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: inherit; cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item.past { opacity: .62; }
.datebox { flex: none; width: 52px; text-align: center; border-radius: 12px; background: var(--surface-2); padding: 6px 0; font-family: var(--font-display); line-height: 1; }
.datebox .d { font-size: 24px; font-weight: 800; display: block; }
.datebox .m { font-size: 12.5px; text-transform: uppercase; font-weight: 700; color: var(--ink-3); letter-spacing: .06em; }
.datebox .w { font-size: 11px; text-transform: uppercase; font-weight: 700; color: var(--ink-3); display: block; margin-bottom: 2px; }
.datebox.home { box-shadow: inset 4px 0 0 var(--home); }
.datebox.away { box-shadow: inset 4px 0 0 var(--away); }
.li-main { flex: 1; min-width: 0; }
.li-main .t { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-main .s { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.counts { display: flex; gap: 6px; font-weight: 700; font-size: 13.5px; }
.counts .y { color: var(--yes); } .counts .m { color: var(--maybe); } .counts .n { color: var(--no); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

.week-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.week-chips button {
  flex: none; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 12px; cursor: pointer; text-align: center;
  font-family: var(--font-display); line-height: 1.1;
}
.week-chips button b { display: block; font-size: 20px; }
.week-chips button small { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.week-chips button.on { border-color: var(--gold); background: var(--gold); color: var(--gold-ink); }
.week-chips button.on small { color: var(--gold-ink); }
.week-chips button.cancel { text-decoration: line-through; opacity: .6; }
.week-chips .mine { display: block; margin: 4px auto 0; width: 8px; height: 8px; border-radius: 50%; background: var(--none); }
.week-chips .mine.yes { background: var(--yes); } .week-chips .mine.maybe { background: var(--maybe); } .week-chips .mine.no { background: var(--no); }

/* Taken */
.task { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.task:last-child { border-bottom: 0; }
.task .check {
  flex: none; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; color: transparent; margin-top: 2px;
}
.task .check.on { background: var(--yes); border-color: var(--yes); color: #fff; }
.task.done .title { text-decoration: line-through; color: var(--ink-3); }
.task .title { font-weight: 700; }
.task .when { font-size: 13.5px; color: var(--ink-3); }
.task .who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.task.mine { background: linear-gradient(90deg, rgba(238, 27, 36, .10), transparent 60%); }
.kind-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: var(--surface-2); }
.slot { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.slot.empty { padding: 4px 10px; border: 1.5px dashed var(--line); background: none; color: var(--ink-3); }

/* Chat */
.chat-wrap { display: flex; flex-direction: column; height: calc(100dvh - 54px - 58px - var(--safe-b) - var(--safe-t)); margin: -16px -16px calc(-96px - var(--safe-b)); }
@media (min-width: 900px) { .chat-wrap { height: calc(100dvh - 62px); margin: -24px -28px -48px; } }
.chat-scroll { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { background: var(--surface); border: 1px solid var(--line); padding: 7px 12px 6px; border-radius: 16px 16px 16px 4px; box-shadow: 0 1px 1px rgba(0, 0, 0, .04); white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 16px 16px 4px 16px; }
@media (prefers-color-scheme: dark) { .msg.mine .bubble { background: #3a3435; border-color: #3a3435; } }
.msg .name { font-size: 12.5px; font-weight: 700; color: var(--navy-3); margin-bottom: 1px; }
.msg .time { font-size: 11px; color: var(--ink-3); margin-left: 8px; float: right; margin-top: 6px; }
.msg.mine .time { color: #bdb5b5; }
.msg.cont .avatar { visibility: hidden; }
.msg.cont .name { display: none; }
.msg .del { opacity: 0; transition: opacity .15s; }
.msg:hover .del { opacity: 1; }
.msg.deleted .bubble { font-style: italic; color: var(--ink-3); background: transparent; }
.day-sep { align-self: center; font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; margin: 10px 0 6px; text-transform: uppercase; letter-spacing: .05em; }
.composer { display: flex; gap: 8px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line); background: var(--surface-2); border-radius: 20px; padding: 10px 14px; max-height: 140px; outline: none; }
.composer textarea:focus { border-color: var(--navy-3); }
.composer .btn { border-radius: 50%; width: 44px; height: 44px; padding: 0; flex: none; }
.chat-preview .msg { max-width: 100%; }
.chat-preview .bubble { font-size: 14.5px; }

/* Formulieren */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; background: var(--surface); outline: none;
}
.input:focus { border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(238, 27, 36, .15); }
textarea.input { min-height: 90px; resize: vertical; }
.form-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked { background: var(--yes); }
.switch input:checked::after { transform: translateX(18px); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--home-bg); font-size: 14.5px; }
.notice.warn { background: var(--maybe-bg); }
.notice.err { background: var(--no-bg); color: var(--no); }
.notice.gold { background: var(--gold); color: var(--gold-ink); font-weight: 600; }

/* Login */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(115deg, var(--navy) 0 58%, var(--gold) 58% 66%, var(--navy) 66%); }
.auth .panel { width: 100%; max-width: 420px; }
.auth .logo { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; margin-bottom: 20px; text-align: center; }
.auth .logo img { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.auth .logo h1 { font-size: 34px; font-weight: 800; font-style: italic; text-transform: uppercase; }
.auth .logo h1 span { color: var(--gold); }
.auth .logo p { margin: 0; color: #d6d0d0; }
.auth .logo .clublogo { width: auto; height: auto; max-width: 300px; background: #fff; padding: 14px 18px; border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.player-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 10px 14px; text-align: center; color: inherit; position: relative; overflow: hidden; }
.player-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 46px; background: linear-gradient(115deg, var(--navy) 0 62%, var(--gold) 62% 70%, var(--navy) 70%); }
.player-card .avatar { margin: 0 auto 8px; position: relative; border: 3px solid var(--surface); }
.player-card b { display: block; font-weight: 700; line-height: 1.2; }
.player-card .pos { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.player-card .nr { position: absolute; right: 10px; top: 6px; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 26px; color: #fff; z-index: 1; }
.profile-hero { text-align: center; padding: 24px 16px; }
.profile-hero .avatar { margin: 0 auto 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--ink-3); font-weight: 600; }
.kv dd { margin: 0; }

.stat-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.stat-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.stat-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.stat-table tr:last-child td { border-bottom: 0; }
.bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--yes); }
.table-wrap { overflow-x: auto; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.preview-table th, .preview-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.preview-table th { font-size: 12px; text-transform: uppercase; color: var(--ink-3); position: sticky; top: 0; background: var(--surface); }
.preview-table tr.skip td { opacity: .45; }

.drop { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 16px; text-align: center; cursor: pointer; background: var(--surface-2); }
.drop:hover, .drop.over { border-color: var(--navy-3); }

.carpool { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.carpool > div { background: var(--surface-2); border-radius: 12px; padding: 10px 6px; }
.carpool b { font-family: var(--font-display); font-size: 28px; display: block; line-height: 1; }
.carpool small { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.empty { text-align: center; padding: 28px 16px; color: var(--ink-3); }
.empty .e { font-size: 34px; margin-bottom: 6px; }

/* Modal en toast */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 10, 25, .55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal { background: var(--surface); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 18px 18px calc(18px + var(--safe-b)); animation: up .2s ease-out; }
@media (min-width: 640px) { .modal-bg { align-items: center; } .modal { border-radius: 20px; } }
.modal h2 { font-size: 24px; margin-bottom: 14px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14.5px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 60; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--no); color: #fff; }

.install-card { display: flex; gap: 12px; align-items: center; }
.install-card img { width: 46px; height: 46px; border-radius: 11px; }
.spin { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--navy-3); border-radius: 50%; animation: spin .7s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.greet h1 { font-size: 30px; font-weight: 800; font-style: italic; text-transform: uppercase; }
.greet p { margin: 2px 0 0; color: var(--ink-3); }
.record { display: flex; gap: 16px; }
.record div { text-align: center; }
.record b { font-family: var(--font-display); font-size: 30px; font-weight: 800; display: block; line-height: 1; }
.record small { font-size: 12px; color: var(--ink-3); text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }
.result { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.result.w { color: var(--yes); } .result.l { color: var(--no); }

/* Clubkleuren in de wedstrijdkaart */
.hero .chip.home { background: #fff; color: #161314; }
.hero .chip.away { background: var(--gold); color: #fff; }
.hero .chip.plain { background: rgba(255, 255, 255, .14) !important; color: #fff !important; }

/* Kratjes */
.crate-svg { flex: none; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
.crate-btn { font-size: 16px; }
.reason-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reason-pick button { border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 10px; cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.reason-pick button span { font-size: 26px; }
.reason-pick button b { font-size: 14.5px; line-height: 1.2; }
.reason-pick button small { color: var(--ink-3); font-size: 12px; }
.reason-pick button.on { border-color: var(--gold); background: var(--red-soft); }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; text-align: center; margin-top: 4px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pod b { font-size: 14px; }
.pod .block { width: 100%; border-radius: 10px 10px 0 0; background: var(--navy); color: #fff; font-family: var(--font-display); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0; }
.pod .block span { font-size: 28px; font-weight: 800; line-height: 1; }
.pod-1 .block { height: 96px; background: var(--gold); }
.pod-2 .block { height: 70px; }
.pod-3 .block { height: 54px; background: #4d4748; }

.hero > *:not(.countdown) { position: relative; z-index: 1; }
.hero .countdown { right: 60px; }

/* Opstappoll thuiswedstrijden */
.pickups { display: flex; flex-direction: column; gap: 8px; }
.pickup {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; transition: all .12s;
}
.pickup:hover:not(:disabled) { border-color: var(--ink-3); }
.pickup:disabled { cursor: default; opacity: .8; }
.pickup .pk-nr { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 17px; background: var(--surface-2); color: var(--ink-2); }
.pickup .pk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pickup .pk-main b { font-weight: 700; }
.pickup .pk-who { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pickup .pk-cnt { flex: none; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--ink-3); min-width: 22px; text-align: right; }
.pickup.on { border-color: var(--gold); background: var(--red-soft); }
.pickup.on .pk-nr { background: var(--gold); color: #fff; }
.pickup.on .pk-cnt { color: var(--gold); }
.pickup.absent.on { border-color: var(--ink-2); background: var(--surface-2); }
.pickup.absent.on .pk-nr { background: var(--ink-2); }
.pickup.absent.on .pk-cnt { color: var(--ink-2); }
