/* Hoachey styles — mobile first, colours from the Hoachey logo:
   orange (accent/CTA), stick blue, field green, white cards. */

:root {
    --orange: #f36f21;
    --orange-dark: #d95a10;
    --orange-soft: #fdeadd;
    --blue: #1e56a0;
    --navy: #12315e;
    --green: #3f9b2f;
    --green-dark: #2c7a1f;
    --green-soft: #e7f4e2;
    --bg: #f4f6f2;
    --card: #ffffff;
    --text: #1c2733;
    --muted: #647285;
    --border: #e4e9e1;
    --danger: #d33a2c;
    --shadow: 0 1px 2px rgba(18, 49, 94, .06), 0 4px 14px rgba(18, 49, 94, .06);
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: var(--blue); }
h1 { font-size: 24px; margin: 0 0 14px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 17px; margin: 0 0 12px; font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 14px; margin: 18px 0 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* ---- Top bar --------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-emblem { width: 30px; height: 30px; }
.brand-img { height: 34px; width: auto; display: block; }
.brand-word {
    font-size: 19px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -.02em;
    color: var(--orange);
}

/* Desktop nav links (hidden on mobile) */
.topnav-links { display: none; }

/* Team switcher button: shrinks with ellipsis so the bar never overflows */
.teambtn {
    margin: 0 0 0 auto;
    min-width: 0;
    flex: 0 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px 7px 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text);
    box-shadow: none;
    width: auto;
}
.teambtn svg { flex: none; color: var(--muted); }
.teambtn-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-inner { min-width: 0; }
.topbar-inner .brand { flex: none; }
.topbar-inner .avatar { flex: none; }
body { overflow-x: hidden; }
.modal-list button.current { border-color: var(--green); background: var(--green-soft); }
.modal-list button.add-team { color: var(--blue); border-style: dashed; }
.modal-check {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; flex: none;
    font-weight: 800; color: var(--green-dark);
}
.modal-list button.add-team .modal-check { color: var(--blue); font-size: 18px; }

/* ---- Bottom navigation (mobile) -------------------------------------- */
.bottomnav {
    position: fixed;
    left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    display: flex;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 6px 24px rgba(18, 49, 94, .14);
    padding: 6px;
    z-index: 20;
}
.bottomnav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 0 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    border-radius: 14px;
}
.bottomnav a.active { color: var(--orange-dark); background: var(--orange-soft); }
.bottomnav svg { width: 23px; height: 23px; }

/* ---- Layout ----------------------------------------------------------- */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 18px 14px 96px;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 14px;
}
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
a.card { display: block; text-decoration: none; color: var(--text); transition: transform .12s, box-shadow .12s; }
a.card:hover { transform: translateY(-1px); box-shadow: 0 3px 6px rgba(18,49,94,.08), 0 8px 22px rgba(18,49,94,.1); }

/* ---- Forms ------------------------------------------------------------ */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], select {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 11px 13px;
    font-size: 15px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
}
input:focus-visible, select:focus-visible, button:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 1px;
}
button {
    cursor: pointer;
    border: none;
    border-radius: 12px;
    padding: 11px 18px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(180deg, var(--orange), var(--orange-dark));
    color: #fff;
    box-shadow: 0 2px 6px rgba(243, 111, 33, .35);
}
button:hover { filter: brightness(1.05); }
button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
button.secondary {
    background: var(--card);
    color: var(--navy);
    border: 1.5px solid var(--border);
    box-shadow: none;
}
button.secondary:hover { border-color: var(--navy); filter: none; }
button.link {
    background: none;
    color: var(--blue);
    padding: 0;
    font-weight: 600;
    text-decoration: underline;
    box-shadow: none;
}
button.link.danger { color: var(--danger); }
.button-link { display: inline-block; margin-top: 8px; font-weight: 700; text-decoration: none; color: var(--blue); }
.button-link.boxed {
    margin-top: 0;
    padding: 8px 14px;
    font-size: 13px;
    color: #fff;
    background: linear-gradient(180deg, var(--orange), var(--orange-dark));
    border-radius: 999px;
}

/* ---- Flash messages --------------------------------------------------- */
.flash { padding: 11px 14px; border-radius: 12px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.flash-ok { background: var(--green-soft); color: var(--green-dark); }
.flash-error { background: #fbe9e7; color: var(--danger); }

/* ---- Tables ------------------------------------------------------------ */
table { width: 100%; border-collapse: collapse; }
td { padding: 9px 6px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
td.num { width: 46px; color: var(--muted); }
td.right { text-align: right; }
tr.unavailable td { opacity: .45; }

/* Availability toggle */
.toggle {
    width: 36px; height: 36px;
    border-radius: 50%;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    background: linear-gradient(180deg, var(--green), var(--green-dark));
    box-shadow: 0 2px 5px rgba(63, 155, 47, .35);
}
.toggle.off { background: var(--border); color: var(--muted); box-shadow: none; }
.tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-dark);
}
.tag-out { background: var(--orange-soft); color: var(--orange-dark); }

/* Add-player / add-coach rows */
.player-add, .coach-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.player-add input[type=text], .coach-add input[type=email] { flex: 1 1 130px; margin-top: 0; }
.player-add input.jersey { flex: 0 0 80px; margin-top: 0; }

/* Club picker on /team/nieuw */
.picker-list { display: flex; flex-direction: column; gap: 4px; margin: -6px 0 12px; }
.picker-list button {
    text-align: left;
    background: var(--bg);
    color: var(--text);
    border: 1.5px solid var(--border);
    font-weight: 500;
    box-shadow: none;
}
.picker-list button:hover { background: var(--green-soft); border-color: var(--green); filter: none; }

/* ---- Misc -------------------------------------------------------------- */
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }

/* ---- Dashboard --------------------------------------------------------- */
.team-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.team-head h1 { margin-bottom: 2px; }
.team-head p { margin: 0; }

/* The next match: a green "pitch" hero card */
.next-game {
    background: linear-gradient(135deg, #4aac37, var(--green-dark));
    border: none;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.next-game::after {                 /* subtle tactics-board accent */
    content: "";
    position: absolute;
    right: -34px; top: -34px;
    width: 130px; height: 130px;
    border: 2.5px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
}
.next-game h2 { margin: 4px 0 6px; color: #fff; }
.next-game p { margin: 0 0 6px; }
.next-game .muted, .next-game .muted.small { color: rgba(255, 255, 255, .85); }
.next-game .tag { background: var(--orange); color: #fff; }
.next-game:hover { transform: translateY(-1px); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile, a.card.tile { display: flex; flex-direction: column; gap: 4px; margin-bottom: 0; }   /* a.card would make it block -> title + text on one line */
.tile strong { color: var(--navy); font-size: 15px; }

/* ---- Matches ----------------------------------------------------------- */
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.small-btn { padding: 8px 14px; font-size: 13px; border-radius: 999px; }
.month-head { margin: 16px 4px 8px; text-transform: capitalize; font-weight: 700; }
.game-row, a.card.game-row { display: flex; align-items: center; gap: 12px; padding: 12px; }
.game-date {
    width: 54px;
    height: 54px;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(160deg, #4aac37, var(--green-dark));
    color: #fff;
}
.game-date strong { display: block; font-size: 20px; line-height: 1.05; font-weight: 800; }
.game-date span { font-size: 10px; font-weight: 700; opacity: .9; text-transform: lowercase; }
.game-row.played .game-date { background: var(--bg); color: var(--muted); border: 1.5px solid var(--border); }
.game-info { flex: 1; min-width: 0; }
.game-info strong { display: block; font-size: 14px; }
.game-title { font-size: 18px; }
.played-head { margin: 22px 4px 10px; }
.game-row.played { opacity: .8; }
.score-pill {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    background: var(--bg);
    color: var(--text);
    white-space: nowrap;
}
.score-pill.win { background: var(--green-soft); color: var(--green-dark); }
.score-pill.loss { background: #fbe9e7; color: var(--danger); }
.w-toggle { width: 44px; }
.side-label { margin-bottom: 4px; }

.keeper-pick { display: flex; gap: 8px; align-items: center; }
.keeper-pick select { flex: 1; margin: 0; }
.lang-pick { display: flex; gap: 18px; }

/* ---- Players page ------------------------------------------------------ */
.player { padding: 8px 12px; margin-bottom: 8px; }
.player summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; min-height: 44px; }
.player summary::-webkit-details-marker { display: none; }
.player .num {
    color: var(--muted);
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    flex: none;
}
.player .name { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .name .tag { margin-left: 4px; padding: 1px 6px; }
.player .chevron { color: var(--muted); transition: transform .15s; flex: none; }
.player[open] .chevron { transform: rotate(180deg); }
.player.unavailable .name, .player.unavailable .num, .player.unavailable .pref-badges { opacity: .4; }

/* Star badges in the collapsed row: see at a glance who has preferences */
.pref-badges { display: inline-flex; gap: 3px; align-items: center; flex: none; }
.pref-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    font-weight: 400;                                 /* letters not bold */
    color: var(--muted);
}
.pref-badge.has { color: var(--text); }
.star-ic { width: 32px; height: 32px; flex: none; }
.star-ic path { fill: #d9dfda; }                      /* empty: grey star */
.pref-badge.has .star-ic path { fill: #f0a500; }      /* filled: gold star */
.star-ic text {
    font-size: 11px;
    font-weight: 800;
    fill: #fff;
    text-anchor: middle;
    font-family: inherit;
}
.pref-badge.side {
    padding: 2px 7px;
    border-radius: 7px;
    background: var(--bg);
}
.pref-badge.side.has { color: var(--text); }          /* neutral grey, no alarm colour */
.pref-empty {
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--orange-soft);
    color: var(--orange-dark);
    font-size: 12px; font-weight: 900;
}

/* Expanded preferences: instant save, no button */
.player .prefs { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; position: relative; }
.pref-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.pref-label { width: 64px; color: var(--muted); font-size: 13px; font-weight: 600; flex: none; }
.save-toast {
    position: absolute;
    top: 8px; right: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--green-dark);
    background: var(--green-soft);
    padding: 3px 10px;
    border-radius: 999px;
}
.player-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }

/* Per-player heatmap: where did she play (share of total minutes)? */
.heatmap-wrap { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.heatmap-wrap p { margin: 0 0 6px; }
.heatmap { width: 100%; max-width: 280px; display: block; margin: 0 auto; }
.heatmap .heat { fill: #f0a500; }
.heatmap .heat-pct {
    font-size: 5px;
    font-weight: 800;
    fill: #fff;
    text-anchor: middle;
    paint-order: stroke;
    stroke: rgba(0, 0, 0, .35);
    stroke-width: .6;
}

/* Star rating (pure CSS: inputs are reversed, so ~ selects the lower stars) */
.stars { display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 2px; }
.stars input { position: absolute; opacity: 0; width: 0; }
.stars label { font-size: 22px; line-height: 1; color: var(--border); cursor: pointer; margin: 0; padding: 2px 1px; }
.stars label.star-none { font-size: 15px; color: var(--muted); padding-right: 6px; }
.stars input:checked ~ label:not(.star-none) { color: var(--orange); }
.stars label:hover, .stars label:hover ~ label:not(.star-none) { color: var(--orange); }
.side-pick { display: flex; gap: 12px; flex-wrap: wrap; }

/* Avoid pairs */
.pair-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pair-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pair-add select { flex: 1 1 140px; margin: 0; }

/* ---- Substitution schedule --------------------------------------------- */
.schedule { margin-top: 14px; }
.period-head {
    font-weight: 800;
    font-size: 12px;
    color: var(--green-dark);
    margin: 16px 0 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.block { border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.block-time { margin: 0 0 8px; font-weight: 800; font-size: 13px; color: var(--navy); }
.lines { display: flex; flex-direction: column; gap: 6px; }
.line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.line-label { min-width: 58px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.pos { background: var(--green-soft); color: var(--green-dark); border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 700; }
.pos em { font-style: normal; font-weight: 400; opacity: .75; }
.pos.bench { background: var(--bg); color: var(--muted); border: 1px dashed var(--border); }
.line-keeper .pos { background: var(--orange-soft); color: var(--orange-dark); }
.minutes td { font-size: 14px; }

/* Mode toggle */
.mode-pick { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }

/* ---- Line-up on half a hockey pitch ------------------------------------ */
.pitch {
    position: relative;
    max-width: 380px;
    margin: 0 auto;
    aspect-ratio: 100 / 64;
    background: linear-gradient(180deg, #4aac37, #2c7a1f);
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), var(--shadow);
    overflow: hidden;
}
.pitch-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.pitch-lines rect, .pitch-lines line, .pitch-lines path {
    fill: none;
    stroke: rgba(255, 255, 255, .55);
    stroke-width: .8;
}
.pitch-lines .pitch-fill { fill: rgba(255, 255, 255, .55); stroke: none; }
.pitch-rows {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3% 5% 1.5%;
}
.pitch-row { display: flex; justify-content: space-evenly; align-items: flex-start; }
.pitch-row-keeper { justify-content: center; }

.fchip { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.fchip-dot {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    border: 2.5px solid var(--blue);
}
.fchip-keeper .fchip-dot { border-color: var(--orange); background: var(--orange); color: #fff; }
.fchip-name {
    font-size: 10.5px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
    white-space: nowrap;
}
.pitch-bench {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    max-width: 380px;
    margin: 8px auto 0;
}

/* Formation choice in the schedule form */
.formation-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.formation-pick label.inline { gap: 8px; font-weight: 600; color: var(--muted); }
.formation-pick select { width: auto; margin: 0; padding: 8px 12px; font-weight: 700; }

/* Collapsible cards (e.g. attendance on the match page) */
.collapse summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.collapse summary::-webkit-details-marker { display: none; }
.collapse summary h2 { margin: 0; flex: 1; }
.collapse .chevron { color: var(--muted); transition: transform .15s; }
.collapse[open] .chevron { transform: rotate(180deg); }
.collapse[open] summary { margin-bottom: 10px; }

/* Swap banner between "alles tegelijk" blocks: who comes in / goes out */
.swap-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 0 8px;
    padding: 7px 10px;
    border-radius: 12px;
    background: var(--card);
    border: 1.5px dashed var(--border);
}
.swap-group { display: inline-flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.swap-banner .swap-chip { flex: none; padding: 3px 10px; font-size: 12px; }
.swap-banner .swap-group:last-child { justify-content: flex-end; }

/* ---- Rolling substitutions: graphical timeline ------------------------- */
.swap-flow { display: flex; flex-direction: column; gap: 6px; }
.swap-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 12px;
}
.swap-row:nth-child(even) { background: var(--bg); }
.swap-time {
    min-width: 46px;
    text-align: center;
    font-weight: 800;
    font-size: 12px;
    color: var(--navy);
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 3px 6px;
}
.swap-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
    flex: 1;
    min-width: 0;
}
.swap-chip svg { width: 13px; height: 13px; flex: none; }
.swap-chip svg path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.swap-in { background: var(--green-soft); color: var(--green-dark); }
.swap-out { background: #fdeceb; color: var(--danger); justify-content: flex-end; }
.swap-arrows { width: 18px; height: 18px; flex: none; color: var(--muted); }
.swap-arrows path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Live match (roadbook) --------------------------------------------- */
.live-start {
    display: block;
    text-align: center;
    margin: 0 0 14px;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #4aac37, var(--green-dark));
    box-shadow: 0 2px 8px rgba(63, 155, 47, .4);
}
.rotate-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

.live-clock-card { text-align: center; }
.live-score-bar { display: flex; align-items: stretch; gap: 6px; margin-bottom: 10px; }
.live-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.live-team {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.live-goals { font-size: 30px; font-weight: 900; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.live-score-btns { display: flex; gap: 6px; }
.live-score-btns button { padding: 2px 12px; font-size: 16px; border-radius: 999px; line-height: 1.4; }
.live-score-btns .score-min { background: var(--card); color: var(--muted); border: 1.5px solid var(--border); box-shadow: none; }
.live-mid { flex: 0 0 auto; align-self: center; }
.live-clock { font-size: 44px; font-weight: 900; letter-spacing: -.02em; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.live-period { margin: 2px 0 0; font-weight: 700; }
.live-controls { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
#live-pause-btn { min-width: 56px; }
.live-formation { width: auto; margin: 0; padding: 8px 12px; font-weight: 700; border-radius: 12px; }
.live-clock.overtime { color: var(--danger); }
.tip-text { font-size: 15px; line-height: 1.5; margin: 4px 0 16px; }
.tip-text p { margin: 0 0 12px; padding: 10px 12px; background: var(--green-soft); border-radius: 10px; }
#tip-next { width: 100%; margin-bottom: 8px; }

.live-next { text-align: center; border: 2px solid var(--border); }
.live-next-label { margin: 0 0 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* The substitution field drawing with movement arrows */
.live-next-pitch { max-width: 380px; margin: 0 auto 8px; }
.live-pitch { width: 100%; display: block; }
.schedule .live-pitch { max-width: 360px; margin: 0 auto; }
.live-pitch .lp-grass, .heatmap .lp-grass { fill: #3b912a; }
.live-pitch .lp-lines rect, .live-pitch .lp-lines path,
.heatmap .lp-lines rect, .heatmap .lp-lines path { fill: none; stroke: rgba(255,255,255,.5); stroke-width: .7; }
.live-pitch .lp-fill, .heatmap .lp-fill { fill: rgba(255,255,255,.5); }
.live-pitch .lp-benchzone { fill: var(--bg); stroke: var(--border); stroke-width: .5; }
.live-pitch .lp-benchlabel { font-size: 3px; font-weight: 700; fill: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lp-chip circle { fill: #fff; stroke: var(--blue); stroke-width: .9; }
.lp-chip.lp-keeper circle { fill: var(--orange); stroke: var(--orange-dark); }
.lp-chip .lp-nr { font-size: 3.8px; font-weight: 800; fill: var(--navy); text-anchor: middle; }
.lp-chip.lp-keeper .lp-nr { fill: #fff; }
.lp-chip .lp-name { font-size: 3px; font-weight: 700; fill: #fff; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.35); stroke-width: .5; }
.lp-chip.lp-bench .lp-name { fill: var(--muted); stroke: none; }
.lp-arrow { fill: none; stroke-width: .9; stroke-dasharray: 2 1.4; stroke-linecap: round; }
.lp-arrow-in { stroke: #fff; }               /* readable on the green pitch */
.lp-arrow-out { stroke: #d33a2c; }
.lp-arrow-move { stroke: #ffb84d; }
.rb-rotate { font-weight: 700; color: var(--orange-dark); }
.rb-reason { font-size: 15px; }
.rb-goal { font-weight: 800; color: var(--navy); }

/* Sickbay strip + heal button (extra substitutions) */
.sickbay {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}
.sick-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    border: 1.5px solid var(--border);
    box-shadow: none;
}
.sick-chip:hover { border-color: var(--navy); filter: none; }
.sick-chip em { font-style: normal; font-weight: 800; color: var(--muted); }
.med-cross { color: #d33a2c; font-weight: 900; font-size: 15px; line-height: 1; }

/* Modals (who scored? / extra substitution) */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(18, 49, 94, .45);
    display: flex; align-items: center; justify-content: center;
    z-index: 40; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }   /* hidden must win over flex */
.modal {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    width: 100%;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(18, 49, 94, .3);
}
.modal-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.modal-list button {
    display: flex; align-items: center; gap: 8px;
    text-align: left;
    background: var(--bg);
    color: var(--text);
    border: 1.5px solid var(--border);
    box-shadow: none;
    font-weight: 600;
}
.modal-list button:hover { border-color: var(--green); background: var(--green-soft); filter: none; }
.modal-nr {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--card); border: 2px solid var(--blue);
    font-size: 12px; font-weight: 800; color: var(--navy); flex: none;
}
.modal .secondary { width: 100%; }

/* Auth pages (login/register/reset): big logo, no header */
.auth-body .topbar, .auth-body .bottomnav { display: none; }
.auth-logo { text-align: center; padding: 44px 16px 6px; }
.auth-logo img { max-height: 130px; max-width: 78vw; }
.auth-logo .auth-emblem { width: 88px; height: 88px; }
.auth-word {
    font-size: 34px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -.02em;
    color: var(--orange);
    margin-top: 2px;
}
.auth-body .container { padding-top: 10px; }
.flash-warn { background: #fdf1e2; color: #8a5a12; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.verify-banner form { display: inline; }

/* Substitution limit inputs on the settings page */
.limit-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.limit-row label.inline { gap: 10px; }
.limit-input { width: 72px; margin: 0; padding: 8px 10px; font-weight: 700; text-align: center; }

/* Danger zone (team deletion) */
.danger-zone { border: 1.5px solid #f3c1bc; }
.danger-zone h2 { color: var(--danger); }
.danger-btn {
    background: var(--card);
    color: var(--danger);
    border: 1.5px solid var(--danger);
    box-shadow: none;
}
.danger-btn:hover { background: #fbe9e7; filter: none; }

/* Back link (replaces the bare breadcrumb) */
.backlink {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    background: var(--card);
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
}
.backlink:hover { border-color: var(--navy); }
.live-countdown { font-size: 40px; font-weight: 900; color: var(--navy); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.live-next button { width: 100%; padding: 15px; font-size: 17px; }
.live-next.warning { border-color: var(--orange); }
.live-next.warning .live-countdown { color: var(--orange-dark); }
.live-next.urgent { border-color: var(--danger); animation: live-pulse 1s infinite; }
.live-next.urgent .live-countdown { color: var(--danger); }
.live-next.done { border-color: var(--green); }
@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(211, 58, 44, .35); }
    50% { box-shadow: 0 0 0 8px rgba(211, 58, 44, 0); }
}

.roadbook { list-style: none; margin: 0; padding: 0; }
.rb-item { padding: 8px 6px; border-bottom: 1px solid var(--border); }
.rb-head { display: flex; align-items: center; gap: 10px; }
.rb-item.done { opacity: .5; }
.rb-item.next { background: var(--green-soft); border-radius: 10px; }
.rb-pitch { max-width: 356px; padding-left: 56px; box-sizing: border-box; margin: 8px auto 2px; }   /* centred under the chips (56px = time column) */
.rb-time { min-width: 46px; font-weight: 800; font-size: 13px; color: var(--navy); font-variant-numeric: tabular-nums; }
.rb-time.shifted { color: var(--orange-dark); }
.rb-time.shifted::after { content: "*"; }
.rb-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.rb-group { display: flex; flex-wrap: wrap; gap: 4px; }
.rb-body .swap-chip { flex: 0 0 auto; padding: 3px 9px; font-size: 12px; white-space: nowrap; }
.rb-check { font-size: 12px; font-weight: 700; color: var(--green-dark); white-space: nowrap; }
.player-stats { margin-top: 8px; }

/* Full screen while the match clock runs: no header, menu or back link and
   a compact layout so everything fits one phone screen without scrolling. */
body.live-active .topbar,
body.live-active .bottomnav,
body.live-active .backlink { display: none; }
body.live-active .container { padding: 8px 10px 12px; max-width: 520px; }
body.live-active .card { padding: 10px 12px; margin-bottom: 8px; }
body.live-active .live-clock { font-size: 34px; }
body.live-active .live-goals { font-size: 22px; }
body.live-active .live-controls button { padding: 8px 14px; font-size: 14px; }
body.live-active .live-next-label { margin-bottom: 4px; }
body.live-active .live-next-pitch svg { height: 34vh; width: auto; max-width: 100%; margin: 0 auto; display: block; }
body.live-active .live-countdown { font-size: 28px; margin-bottom: 6px; }
body.live-active .live-next button { padding: 11px; font-size: 15px; }

/* ---- Rules PDF --------------------------------------------------------- */
.pdf-frame { width: 100%; height: 70vh; border: 1.5px solid var(--border); border-radius: 12px; }
@media (max-width: 600px) { .pdf-frame { height: 55vh; } }

/* ---- Desktop (≥900px): nav in the top bar, wider content --------------- */
@media (min-width: 900px) {
    .bottomnav { display: none; }
    .container { max-width: 860px; padding-bottom: 40px; }
    .tiles { grid-template-columns: repeat(4, 1fr); }

    .topnav-links { display: flex; gap: 4px; margin-left: 10px; }
    .topnav-links a {
        padding: 8px 16px;
        border-radius: 999px;
        font-size: 14px;
        font-weight: 700;
        color: var(--muted);
        text-decoration: none;
    }
    .topnav-links a:hover { background: var(--bg); color: var(--navy); }
    .topnav-links a.active { background: var(--orange-soft); color: var(--orange-dark); }
}

/* Add players: one textarea, one name per line (paste-friendly) */
.player-add textarea {
    flex: 1 1 100%;
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
    resize: vertical;
}

/* Regular-keeper toggle on the players page */
.keeper-row { margin-top: 4px; }
.keeper-btn {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 999px;
    background: var(--card);
    color: var(--muted);
    border: 1.5px solid var(--border);
    box-shadow: none;
}
.keeper-btn.active { background: var(--orange-soft); color: var(--orange-dark); border-color: var(--orange); }

/* Substitution style choice on the settings page */
.mode-choice { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.mode-choice label.inline { flex-wrap: wrap; gap: 8px; }
.mode-choice p { margin: 0; }
.small-input { width: 60px; }
.schedule-setting { margin: -6px 0 10px; }

/* Settings: hidden rows really hide; compact number inputs */
.limit-row[hidden], .per-period[hidden] { display: none; }
.per-period { display: inline-flex; align-items: center; gap: 8px; }
input[type=number].limit-input { width: 72px; display: inline-block; margin: 0; padding: 8px 10px; }
input[type=number].small-input { width: 60px; }

/* Settings: option cards with nested settings, uniform setting rows */
.option-card {
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--card);
}
.option-card.active { border-color: var(--orange); background: #fffaf5; }
.option-head { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; flex-wrap: wrap; }
.option-head input { margin: 0; }
.option-title { font-size: 15px; font-weight: 800; color: var(--text); }
.option-sub { font-size: 13px; font-weight: 400; color: var(--muted); }
.option-body { margin: 10px 0 0 26px; padding-top: 8px; border-top: 1px dashed var(--border); }
.option-body p { margin: 6px 0 0; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; color: var(--text); }
.setting-value { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.rotation-row { margin-top: 6px; }
.rotation-row label.inline { font-size: 14px; color: var(--text); }
.subprefs > p.muted { margin-top: 2px; }

/* PWA install banner */
.pwa-banner {
    position: fixed;
    left: 10px; right: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 40;                                  /* boven de feedbackknop (30) */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(18, 49, 94, .18);
    z-index: 30;
}
.pwa-banner[hidden] { display: none; }
.pwa-icon { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.pwa-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pwa-text strong { font-size: 14px; }
.pwa-banner #pwa-install { padding: 9px 14px; font-size: 14px; border-radius: 999px; }
.pwa-banner #pwa-dismiss { color: var(--muted); text-decoration: none; font-size: 16px; padding: 4px; }
@media (min-width: 900px) { .pwa-banner { bottom: 16px; left: auto; right: 16px; max-width: 440px; } }
body.live-active .pwa-banner { display: none; }

/* Instant-save toast (assets/js/app.js) */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(12px);
    z-index: 60;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    max-width: min(92vw, 480px);
    text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-ok { background: var(--green-dark); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
@media (min-width: 900px) { .toast { bottom: 28px; } }
form.saving { opacity: .7; }
.option-body[hidden] { display: none; }

/* Team photo as dashboard header: dark gradient keeps the text readable */
.team-hero {
    position: relative;
    min-height: 150px;
    padding: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: var(--blue);
    display: flex;
    align-items: flex-end;
}
.team-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .10) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .72) 100%);
}
.team-hero-text { position: relative; padding: 16px 16px 14px; color: #fff; }
.team-hero-text h1 { margin: 0 0 2px; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .7), 0 0 2px rgba(0, 0, 0, .9); }
.team-hero-text p { margin: 0; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); font-weight: 600; }
.team-hero.preview { min-height: 120px; margin-bottom: 12px; border-radius: 12px; }
@media (min-width: 900px) { .team-hero { min-height: 200px; } }
.photo-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.file-pick { display: inline-block; cursor: pointer; }
.file-pick input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.button-like {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
}
.file-pick:focus-within .button-like { outline: 2px solid var(--blue); outline-offset: 2px; }
/* Initials badge in the top bar → /profiel */
.avatar {
    flex: none;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-left: auto;
    border: 2px solid transparent;
}
.avatar:hover, .avatar.active { border-color: var(--orange); }
.avatar.big { width: 56px; height: 56px; font-size: 20px; margin: 0; }
.topbar-inner .teambtn + .avatar { margin-left: 8px; }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.profile-head h2 { margin: 0; }
.profile-head p { margin: 0; }
.profile-pointer { text-align: center; margin: 18px 0 8px; }
.small-x { font-size: 16px; padding: 2px 8px; }
td.right form { display: inline; }
.danger-zone .inline-form { margin-bottom: 14px; }
/* Confirmation modal (app.js hoacheyConfirm) */
.modal .confirm-title { margin-top: 0; }
.modal .confirm-text { margin: 6px 0 16px; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }
.modal-actions .danger-btn { width: 100%; }
/* Players page: the regular keeper shows a chip instead of star badges */
.keeper-chip {
    flex: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--orange-dark);
    background: var(--orange-soft);
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
}
.keeper-note { margin: 8px 0 0; border-top: 1px solid var(--border); padding-top: 8px; }#live-swap-btn { margin-bottom: 8px; }

/* Swap chips above the pitch: centred, same rows as in the roadbook */
.live-next-swaps { max-width: 380px; margin: 0 auto 8px; align-items: center; }
.live-next-swaps[hidden] { display: none; }
.rb-group { justify-content: center; }
.rb-body { align-items: center; text-align: center; }
.rb-body .rb-rotate, .rb-body .rb-reason { align-self: center; }

/* Pitch chips: tint who comes on (green) and who goes off (red), like the swap chips */
.lp-chip.lp-in circle { fill: var(--green-soft); stroke: var(--green-dark); }
.lp-chip.lp-in .lp-nr { fill: var(--green-dark); }
.lp-chip.lp-out circle { fill: #fdeceb; stroke: var(--danger); }
.lp-chip.lp-out .lp-nr { fill: var(--danger); }
.lp-chip.lp-move circle { fill: #fff3e6; stroke: var(--orange); }
.lp-chip.lp-keeper.lp-in circle, .lp-chip.lp-keeper.lp-out circle { fill: var(--orange); stroke: var(--orange-dark); }

.side-hint { margin: 2px 0 0 64px; }
.stats th { font-weight: 600; text-align: left; padding-bottom: 4px; }
.stats th.right { text-align: right; }

label.remember { margin: 4px 0 14px; font-weight: 600; }
.auth-logo img.login-logo { max-height: 220px; max-width: 86vw; }

.minutes .stretch-head th { font-weight: 600; text-align: left; padding-bottom: 4px; }
.minutes .stretch-head th.right { text-align: right; }

.game-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.game-actions form { margin: 0; }
.speed-tag { font-size: 11px; font-weight: 800; color: var(--orange-dark); background: var(--orange-soft); border-radius: 999px; padding: 2px 8px; display: inline-block; margin-top: 2px; }

/* Topscorers: podium (2-1-3) and fun-fact cards */
.podium-card { padding: 22px 12px 0; overflow: hidden; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; }
.podium-spot { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; max-width: 150px; }
.podium-medal { font-size: 26px; }
.podium-avatar {
    width: 46px; height: 46px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--blue); color: #fff; font-weight: 800;
}
.podium-spot.p1 .podium-avatar { width: 58px; height: 58px; background: var(--orange); font-size: 18px; }
.podium-name { font-size: 13px; text-align: center; color: var(--navy); }
.podium-goals { font-weight: 800; color: var(--green-dark); }
.podium-block { width: 100%; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, var(--green-soft), #d6ecd0); }
.podium-spot.p1 .podium-block { height: 86px; background: linear-gradient(180deg, #ffe2a8, #ffd07a); }
.podium-spot.p2 .podium-block { height: 58px; background: linear-gradient(180deg, #e8ecf2, #d4dbe6); }
.podium-spot.p3 .podium-block { height: 40px; background: linear-gradient(180deg, #f4dfc9, #ecc9a4); }
.topscorer-list .rank-nr { width: 30px; }
.facts-head { margin: 18px 4px 10px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.facts .fact { margin-bottom: 0; }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 0; }
.fact-emoji { font-size: 26px; }
.fact-value { font-size: 20px; color: var(--navy); }
.fact-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile-topscorer strong { color: var(--orange-dark); }
/* Heatmap goal markers: an orange counter inside the position blob */
.heatmap .heat-goal circle { fill: var(--orange); stroke: #fff; stroke-width: .7; }
.heatmap .heat-goal text { font-size: 3.4px; font-weight: 800; fill: #fff; text-anchor: middle; }
.heat-goal-hint { margin: 4px 0 0; }

/* Season playing time: badge in the row + panel next to the heatmap */
.season-mins {
    flex: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--green-dark);
    background: var(--green-soft);
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}
.heatmap-flex { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.heatmap-left { flex: 1 1 260px; min-width: 220px; max-width: 420px; }
.season-stats { flex: 1 1 180px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.season-stats div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.season-stats dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.season-stats dd { margin: 0; font-weight: 800; color: var(--navy); white-space: nowrap; }
/* Feedback button + admin */
.feedback-fab {
    position: fixed;
    right: 14px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    width: 50px; height: 50px;
    border-radius: 50%;
    padding: 0;
    display: grid;
    place-items: center;
    background: var(--orange);
    color: #fff;
    box-shadow: 0 4px 14px rgba(243, 111, 33, .45);
}
.feedback-fab svg { width: 24px; height: 24px; }
.feedback-fab:hover { background: var(--orange-dark); }
@media (min-width: 900px) { .feedback-fab { bottom: 24px; } }
body.live-active .feedback-fab { display: none; }   /* not during a running match */
body:has(.pwa-banner:not([hidden])) .feedback-fab { display: none; }   /* banner boven de knop */
#feedback-form textarea, #fbp-form textarea { width: 100%; margin-top: 4px; padding: 11px 13px; font: inherit; font-size: 15px; border: 1.5px solid var(--border); border-radius: 12px; }
#feedback-form button, #fbp-form button { width: 100%; margin-top: 8px; }

.health { display: flex; align-items: center; gap: 14px; }
.health h2 { margin: 0 0 2px; }
.health-light { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: 0 0 0 6px rgba(0,0,0,.04); }
.health-ok .health-light { background: #34a853; box-shadow: 0 0 12px rgba(52,168,83,.6); }
.health-warn .health-light { background: #f5a623; box-shadow: 0 0 12px rgba(245,166,35,.6); }
.health-slow .health-light { background: var(--danger); box-shadow: 0 0 12px rgba(211,58,44,.6); }

.usage-bars { display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.usage-col { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 44px; }
.usage-count { font-size: 11px; font-weight: 700; color: var(--navy); }
.usage-bar { width: 26px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--blue), #6d9bd6); }
.usage-day { font-size: 11px; color: var(--muted); }
.usage-ms { font-size: 11px; font-weight: 700; color: var(--green-dark); }
.usage-ms.meh { color: #b57b12; }
.usage-ms.bad { color: var(--danger); }

/* Ticket cards: the WHOLE header row is the click target (negative margins
   stretch it to the card edges), textareas run full width. */
.feedback-item summary {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; list-style: none;
    margin: -18px; padding: 16px 18px;
    border-radius: var(--radius);
    min-height: 52px;
}
.feedback-item summary::-webkit-details-marker { display: none; }
.feedback-item summary:hover { background: var(--bg); }
.feedback-item[open] summary { margin-bottom: 0; border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.feedback-item[open] { padding-bottom: 16px; }
.feedback-item .chevron { margin-left: auto; color: var(--muted); transition: transform .15s; }
.feedback-item[open] .chevron { transform: rotate(180deg); }
.feedback-item .fb-message { margin-top: 14px; font-size: 15px; }
.feedback-item textarea {
    display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
    font-size: 15px; border: 1.5px solid var(--border); border-radius: 12px;
    background: var(--card); resize: vertical; min-height: 90px;
}
.feedback-item form button[type=submit] { margin-top: 8px; }
.fact-link { text-decoration: none; color: var(--text); transition: transform .12s, box-shadow .12s; }
.fact-link:hover { transform: translateY(-1px); box-shadow: 0 3px 6px rgba(18,49,94,.08), 0 8px 22px rgba(18,49,94,.1); }
.fb-status { flex: none; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 9px; text-transform: uppercase; }
.fb-status.open { background: var(--orange-soft); color: var(--orange-dark); }
.fb-status.closed { background: var(--green-soft); color: var(--green-dark); }
.fb-head { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.fb-message { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.fb-context { border-top: 1px dashed var(--border); padding-top: 8px; word-break: break-all; }
.fb-reply { border-left: 3px solid var(--green); padding-left: 10px; margin: 8px 0; }
.fb-status-form { margin-top: 8px; }
/* ---- Public homepage (landing) ---------------------------------------- */
.lp { max-width: 1060px; margin: 0 auto; padding: 0 18px 40px; }
body.landing-body { background: #f0f3ee; }   /* exactly the logo background: seamless header */
.lp-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 6px; }
.lp-brand img { height: 84px; display: block; margin-left: -10px; }
@media (max-width: 640px) { .lp-brand img { height: 60px; } }
.lp-nav { display: flex; gap: 10px; }
.lp-btn {
    display: inline-block; text-decoration: none; font-weight: 800;
    border-radius: 999px; padding: 10px 20px; font-size: 15px;
    border: 2px solid transparent; transition: transform .12s, box-shadow .12s;
}
.lp-btn:hover { transform: translateY(-1px); }
.lp-btn.primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(243, 111, 33, .35); }
.lp-btn.outline { border-color: var(--blue); color: var(--blue); }
.lp-btn.ghost { color: var(--navy); }
.lp-btn.big { padding: 14px 28px; font-size: 17px; }
.lp-hero { display: grid; gap: 28px; align-items: center; padding: 26px 0 40px; }
@media (min-width: 820px) { .lp-hero { grid-template-columns: 1.1fr 1fr; padding: 46px 0 64px; } }
.lp-eyebrow {
    display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; color: var(--green-dark); background: var(--green-soft);
    border-radius: 999px; padding: 4px 12px; margin-bottom: 12px;
}
.lp-hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; color: var(--navy); margin: 0 0 14px; }
.lp-lead { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 54ch; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 10px; }
.lp-demo-card {
    background: var(--card); border-radius: 20px; padding: 14px;
    box-shadow: 0 10px 34px rgba(18, 49, 94, .16);
    transform: rotate(1.2deg);
}
.lp-demo-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--navy); margin: 2px 4px 8px; }
.lp-demo-time { background: var(--navy); color: #fff; border-radius: 8px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.lp-demo-chips { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.lp-demo-chips .swap-chip { flex: none; }
.lp-features h2, .lp-how h2, .lp-closing h2 { text-align: center; font-size: 28px; color: var(--navy); margin: 30px 0 18px; }
.lp-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .lp-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .lp-grid { grid-template-columns: repeat(3, 1fr); } }
.lp-feature { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.lp-feature strong { display: block; color: var(--navy); font-size: 16px; margin: 10px 0 4px; }
.lp-feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.lp-ico {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: var(--green-soft); color: var(--green-dark);
}
.lp-ico svg { width: 24px; height: 24px; }
.lp-feature:nth-child(2) .lp-ico { background: var(--orange-soft); color: var(--orange-dark); }
.lp-feature:nth-child(3) .lp-ico { background: #e8eef7; color: var(--blue); }
.lp-feature:nth-child(5) .lp-ico { background: var(--orange-soft); color: var(--orange-dark); }
.lp-feature:nth-child(6) .lp-ico { background: #e8eef7; color: var(--blue); }
.lp-steps { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; display: flex; flex-direction: column; gap: 12px; }
.lp-steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.lp-steps strong {
    flex: none; width: 32px; height: 32px; border-radius: 50%;
    display: inline-grid; place-items: center;
    background: var(--orange); color: #fff;
}
.lp-closing { text-align: center; padding: 26px 0 10px; }
.lp-closing .lp-lead { margin: 0 auto 18px; }
.lp-foot { text-align: center; margin-top: 40px; }
.auth-body .lp .live-pitch { max-width: 100%; }

/* ---- Onboarding tour ---------------------------------------------------- */
.tour-backdrop { z-index: 70; }
.modal.tour { max-width: 400px; text-align: center; position: relative; padding-top: 26px; }
.tour-skip { position: absolute; top: 10px; right: 14px; color: var(--muted); }
.tour-emoji { font-size: 44px; margin-bottom: 6px; }
.tour-step p { color: var(--muted); line-height: 1.55; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.tour-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.tour-dots span.on { background: var(--orange); }
.tour-nav { display: flex; gap: 10px; }
.tour-nav button { flex: 1; }
/* Honeypot: parked far off-screen (display:none would tip off smart bots) */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Admin: hockey.nl sync block */
.sync-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.sync-pill { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 10px; }
.sync-pill.ok { background: var(--green-soft); color: var(--green-dark); }
.sync-pill.fail { background: #fbe9e7; color: var(--danger); cursor: help; }
.sync-table td { padding-top: 4px; padding-bottom: 4px; }
/* One-sided-preferences warning on the players page */
.pref-warning { display: block; }
.pref-warning ul { margin: 6px 0; padding-left: 20px; font-weight: 400; }
.pref-warning .small { font-weight: 400; color: #8a5a12; }

.pref-warning[hidden] { display: none; }
#pref-warning-modal ul { text-align: left; padding-left: 20px; margin: 8px 0 4px; }
#pref-warning-modal button { width: 100%; margin-top: 10px; }

/* Preference levels: dropdown per line + coloured letter badges in the row */
.pref-select { display: inline-block; width: auto; margin: 0; padding: 7px 30px 7px 12px; font-size: 14px; font-weight: 600; border-radius: 10px; }
.pref-badge.lvl0 .star-ic path { fill: var(--danger); }      /* rood: liever niet */
.pref-badge.lvl1 .star-ic path { fill: var(--orange); }      /* oranje: kan */
.pref-badge.lvl2 .star-ic path { fill: #f0c400; }            /* geel: graag */
.pref-badge.lvl3 .star-ic path { fill: #34a853; }            /* groen: vaste plek */
.pref-badge.lvl1, .pref-badge.lvl2, .pref-badge.lvl3 { color: var(--text); }.tour-speed { font-size: 13px; color: var(--orange-dark); background: var(--orange-soft); border-radius: 10px; padding: 8px 12px; margin-top: 10px; }

.tour-choice { display: flex; flex-direction: column; gap: 8px; }
.tour-choice[hidden] { display: none; }
.tour-choice button { width: 100%; }

/* Mobile: keyboards eat the bottom half, so modals dock to the TOP of the
   screen instead of the centre — the content stays visible while typing. */
@media (max-width: 700px) {
    .modal-backdrop { align-items: flex-start; padding-top: max(14px, env(safe-area-inset-top, 0px)); }
    .modal { max-height: 78vh; }
}

/* Admin: coach list */
.table-scroll { overflow-x: auto; }
.admin-coaches th { text-align: left; }
.admin-coaches th.right, .admin-coaches td.right { text-align: right; white-space: nowrap; }
.admin-coaches td { vertical-align: top; }

/* Veelgestelde vragen / kennisbank */
.kb-hero { padding: 18px 0 6px; }
.kb-hero h1 { margin: 0 0 8px; }
.kb-cat h2 { margin: 26px 0 12px; }
.kb-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .kb-grid { grid-template-columns: 1fr 1fr; } }
.kb-card { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; }
.kb-card strong { line-height: 1.35; }
.kb-more { color: var(--accent, #3f9b2f); font-weight: 600; font-size: .9em; margin-top: auto; }
.kb-faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.kb-faq details:last-child { border-bottom: 0; }
.kb-faq summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.kb-faq p { margin: 4px 0 10px; }
.kb-crumb { margin: 6px 0 12px; }
.kb-article { padding: 24px; }
.kb-article h1 { margin-top: 0; line-height: 1.3; }
.kb-article h2 { margin: 22px 0 8px; }
.kb-article p, .kb-article li { line-height: 1.6; }
.kb-article ul { padding-left: 20px; }
.kb-intro { font-size: 1.06em; color: var(--muted, #5c6b7a); }
.kb-table td, .kb-table th { padding: 6px 10px; }
.kb-cta { text-align: center; padding: 26px; margin-top: 26px; }
.kb-cta p { margin: 6px 0 14px; }
@media (max-width: 640px) { .lp-kb-link { display: none; } }
/* Kijk-demo banner */
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    background: #eaf4e6; border: 1px solid #bcd9b0; color: #2c5e20; }
.demo-banner-actions { display: flex; gap: 8px; }
.demo-banner .lp-btn { padding: 7px 14px; font-size: .9em; }
/* Deelknop + openbare meekijkpagina */
.share-vak { margin: 8px 0 14px; }
.share-rij { display: flex; gap: 8px; margin: 8px 0; }
.share-rij input { flex: 1; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: .9em; }
.share-wa { background: #25d366; color: #fff; }
.pub-kop { text-align: center; }
.pub-teams { margin: 6px 0; font-size: 1.3rem; }
.pub-score { display: inline-block; background: var(--card); border: 2px solid var(--border); border-radius: 12px; padding: 2px 14px; margin: 0 8px; font-variant-numeric: tabular-nums; }
.pub-status { font-weight: 700; margin: 4px 0 0; }
.pub-status-live { color: #c2261a; }
.pub-regel { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.pub-regel:last-child { border-bottom: 0; }
.pub-tijd { min-width: 46px; font-variant-numeric: tabular-nums; color: var(--muted, #5c6b7a); }
.pub-in { color: #2c8443; font-weight: 600; }
.pub-uit { color: #c2261a; font-weight: 600; }
.pub .lp-bar { margin-bottom: 6px; }
/* Vangnet: het hidden-attribuut wint altijd van display-regels */
[hidden] { display: none !important; }
