/* ============================================================
   Voetbaloefeningen — stijl
   Palet: veld-donkergroen, koel papier, grasgroen, warme accent-
   oranje, en een stempel dat de categorie van een oefening toont.
   ============================================================ */

:root {
    --ink:    #17251C;
    --paper:  #F4F6F1;
    --card:   #FFFFFF;
    --grass:  #2E7D46;
    --accent: #E4572E;
    --danger: #C63A3A;
    --muted:  #7C857C;
    --line:   #E1E5DD;

    --shadow: 0 1px 2px rgba(23,37,28,.05), 0 8px 24px rgba(23,37,28,.08);
    --radius: 14px;
    --wrap:   1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.6;
    background-image:
        radial-gradient(60rem 60rem at 82% -10%, rgba(46,125,70,.12), transparent 60%),
        radial-gradient(50rem 50rem at -5% 8%, rgba(228,87,46,.08), transparent 55%);
    background-attachment: fixed;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

/* ---- Kop van de site ---------------------------------------- */
.site-head {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 246, 241, .82);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-head-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: .8rem 1.4rem;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    font-family: "Fraunces", Georgia, serif;
    font-weight: 900;
    font-size: 1.35rem;
    letter-spacing: -.01em;
}

.wordmark-mark {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    background: var(--ink);
    color: var(--paper);
    border-radius: 9px;
    font-size: 1.15rem;
    transform: rotate(-6deg);
}

/* ---- Hoofdcontainer ------------------------------------------ */
.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 1rem 1.4rem 4rem;
}

/* ---- Het stempel (toont de categorie, of "Oefening") -------- */
.stamp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .34em .8em;
    border: 2px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-family: "Instrument Sans", sans-serif;
    font-weight: 700;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .3em;
    line-height: 1;
    transform: rotate(-4deg);
    position: relative;
    background: rgba(228,87,46,.05);
}
.stamp span { padding-left: .18em; }
.stamp::after {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1px solid var(--accent);
    border-radius: 2px;
    opacity: .45;
}
.stamp-sm { font-size: .56rem; padding: .3em .6em; letter-spacing: .22em; }
.stamp-lg { font-size: .92rem; padding: .42em .95em; letter-spacing: .3em; }

/* ---- Knoppen -------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .62rem 1.15rem;
    border-radius: 999px;
    border: 2px solid transparent;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .12s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid  { background: var(--grass); color: #fff; border-color: var(--grass); }
.btn-solid:hover { background: #266638; }
.btn-ghost  { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); padding: .4rem .8rem; font-size: .9rem; }
.btn-danger:hover { background: var(--danger); color: #fff; }

/* ---- Hero + insturen ----------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 2.6rem;
    align-items: center;
    padding: 1.5rem 0 2.8rem;
    animation: rise .5s ease both;
}
.hero-copy .stamp { margin-bottom: 1.1rem; }
.hero-title {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 900;
    font-size: clamp(2.1rem, 4.6vw, 3.5rem);
    line-height: 1.02;
    letter-spacing: -.02em;
    margin: 0 0 1rem;
}
.hero-title em {
    font-style: italic;
    font-weight: 600;
    color: var(--accent);
}
.hero-lead {
    font-size: 1.1rem;
    color: #3f4a41;
    max-width: 34ch;
    margin: 0;
}
.hero-lead a { color: var(--grass); font-weight: 600; }

.paste {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem 1.4rem 1.5rem;
}
.paste-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .01em;
    margin: 1rem 0 .35rem;
    color: var(--ink);
}
.paste-label:first-child { margin-top: 0; }
.paste-label .opt { color: var(--muted); font-weight: 500; }
.paste-row { display: flex; gap: .6rem; }
.paste-input {
    width: 100%;
    padding: .7rem .85rem;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font: inherit;
    color: var(--ink);
    background: #fcfdfb;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.paste-input::placeholder { color: #a9b0a7; }
.paste-input:focus {
    outline: none;
    border-color: var(--grass);
    box-shadow: 0 0 0 3px rgba(46,125,70,.2);
}
textarea.paste-input { resize: vertical; min-height: 2.6rem; }
.paste-row .paste-input { flex: 1; }
.paste-row .btn { flex-shrink: 0; }

/* Kaart met uitleg als iemand (nog) niet mag insturen. */
.notice-card { color: #3f4a41; }
.notice-card-title {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 900;
    font-size: 1.25rem;
    margin: 0 0 .5rem;
    color: var(--ink);
}
.notice-card a { color: var(--grass); font-weight: 600; }

/* Verborgen spamval. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.notice {
    margin: 1rem 0 0;
    padding: .7rem .9rem;
    border-radius: 10px;
    font-size: .95rem;
}
.notice-ok    { background: rgba(46,125,70,.14);  color: #1f5731; }
.notice-error { background: rgba(198,58,58,.10);  color: #8f2626; }

/* ---- Overzicht / feed ---------------------------------------- */
.feed { margin-top: 1rem; }
.feed-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    border-top: 2px solid var(--ink);
    padding-top: .8rem;
    margin-bottom: 1.4rem;
}
.feed-head h2, .feed-head h1 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 900;
    font-size: 1.5rem;
    margin: 0;
}
.feed-count {
    font-size: .8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600;
}

.cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.4rem;
}
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(23,37,28,.14); }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-media {
    position: relative;
    aspect-ratio: 3 / 4;
    background: #e7ece3;
    overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-fallback {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    background: repeating-linear-gradient(135deg, #e7ece3, #e7ece3 12px, #dfe6da 12px, #dfe6da 24px);
}
.card-stamp { position: absolute; top: .7rem; left: .7rem; }
.card-stamp .stamp { background: var(--card); }
.card-body { padding: .9rem 1rem 1.1rem; }
.card-title {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 600;
    font-size: 1.08rem;
    line-height: 1.2;
    margin: 0 0 .3rem;
}
.card-meta { margin: 0; font-size: .85rem; color: var(--muted); }

/* ---- Lege staat ---------------------------------------------- */
.empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}
.empty .stamp { margin-bottom: 1rem; }
.empty a { color: var(--grass); font-weight: 600; }

/* ---- Oefeningpagina ------------------------------------------ */
.recipe { max-width: 680px; margin: 1rem auto 0; }
.recipe-head { text-align: center; margin-bottom: 1.6rem; }
.recipe-head .stamp { margin-bottom: 1rem; }
.recipe-title {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 900;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: 0 0 .7rem;
}
.recipe-cat { margin: 0 0 .6rem; }
.recipe-meta { color: var(--muted); font-size: .95rem; margin: 0; }
.recipe-meta a { color: var(--grass); text-decoration: none; font-weight: 600; }
.recipe-meta a:hover { text-decoration: underline; }
.recipe-meta .dot { margin: 0 .3rem; }
.recipe-note {
    font-size: 1.12rem;
    line-height: 1.55;
    text-align: center;
    color: #38423a;
    max-width: 52ch;
    margin: 0 auto 2rem;
}
.recipe-video { display: flex; justify-content: center; min-height: 500px; }
.recipe-video .tiktok-embed { margin: 0 auto !important; }
.recipe-actions {
    display: flex;
    gap: .7rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ---- Beheer --------------------------------------------------- */
.admin-login { max-width: 440px; margin: 2rem auto; text-align: center; }
.admin-login .stamp { margin-bottom: 1rem; }
.admin-login h1 { font-family: "Fraunces", Georgia, serif; margin: 0 0 .4rem; }
.admin-login .paste { text-align: left; margin-top: 1.4rem; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.admin-table th, .admin-table td {
    text-align: left;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--line);
    font-size: .95rem;
    vertical-align: middle;
}
.admin-table th {
    background: #eaefe5;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table a { color: var(--ink); font-weight: 600; }
.admin-table form { margin: 0; }

.perm-state {
    display: inline-block;
    margin-right: .5rem;
    font-weight: 700;
    font-size: .85rem;
}
.perm-state.perm-on  { color: var(--grass); }
.perm-state.perm-off { color: var(--muted); }

/* ---- Voet ----------------------------------------------------- */
.site-foot {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 2rem 1.4rem 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .9rem;
}
.site-foot p { margin: 0; }

/* ---- Filterbalk (categorieen) -------------------------------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.6rem;
}
.chip {
    display: inline-flex;
    align-items: center;
    padding: .4rem .9rem;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--card);
    color: var(--ink);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.chip:hover { transform: translateY(-1px); border-color: var(--grass); }
.chip.is-active { background: var(--grass); border-color: var(--grass); color: #fff; }

/* ---- Categorielabel ------------------------------------------ */
.cat-badge {
    display: inline-block;
    padding: .24em .65em;
    border-radius: 999px;
    background: var(--grass);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    line-height: 1.5;
    text-decoration: none;
}
a.cat-badge:hover { background: #266638; }

/* ---- Navigatie in de bovenbalk ------------------------------- */
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1.4rem; justify-content: flex-end; }
.nav-link {
    position: relative;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    color: #4f584f;
    white-space: nowrap;
    padding: .3rem 0;
    transition: color .15s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s ease;
}
.nav-link:hover::after { transform: scaleX(1); }

.btn-sm { padding: .48rem .95rem; font-size: .92rem; }

@media (max-width: 620px) {
    .site-head-in { flex-wrap: wrap; gap: .6rem; }
    .site-nav { width: 100%; justify-content: flex-start; gap: .3rem 1.1rem; }
}

/* ---- Categorie-overzicht (tegels) ---------------------------- */
.cat-overview { margin-top: 1rem; }
.cat-tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.4rem;
}
.cat-tile a {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.cat-tile a:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(23,37,28,.14); }
.cat-tile-media {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    background: linear-gradient(155deg, #eef5ea 0%, #e3efdd 100%);
}
.cat-tile-icon-wrap {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(46,125,70,.12);
    display: grid;
    place-items: center;
}
.cat-icon { width: 40px; height: 40px; color: var(--grass); }
.cat-tile-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; }
.cat-tile-name {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 900;
    font-size: 1.2rem;
    line-height: 1.1;
}
.cat-tile-count { font-size: .85rem; color: var(--muted); }

.back-link { margin: 0 0 1.5rem; }
.back-link a { color: var(--grass); text-decoration: none; font-weight: 600; }
.back-link a:hover { text-decoration: underline; }

/* ---- Account / inloggen -------------------------------------- */
.auth { max-width: 460px; margin: 1.5rem auto; text-align: center; }
.auth .stamp { margin-bottom: 1rem; }
.auth h1 { font-family: "Fraunces", Georgia, serif; margin: 0 0 .4rem; }
.auth > p { color: var(--muted); margin: 0 0 1.4rem; }
.auth .paste { text-align: left; }
.auth-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-top: 1.2rem;
    font-size: .92rem;
    color: var(--muted);
}
.auth-actions a { color: var(--grass); font-weight: 600; text-decoration: none; }
.auth-actions a:hover { text-decoration: underline; }

/* ---- Bewaarknop ---------------------------------------------- */
.inline-form { display: inline; margin: 0; }

/* ---- Persoonlijk boek ---------------------------------------- */
.book { margin-top: 1rem; }
.book-sub {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 900;
    font-size: 1.25rem;
    margin: 1.8rem 0 1rem;
}

/* ---- Bewegingen ---------------------------------------------- */
@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Klein scherm -------------------------------------------- */
@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; gap: 1.6rem; padding-bottom: 2rem; }
    .hero-lead { max-width: none; }
    body { font-size: 16px; }
}

@media (max-width: 420px) {
    .paste-row { flex-direction: column; }
    .paste-row .btn { width: 100%; }
    .site-head { padding: 1rem; }
    .wordmark-text { display: none; }
}

/* ---- Toegankelijkheid ---------------------------------------- */
:focus-visible { outline: 3px solid var(--grass); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .btn:hover, .card:hover { transform: none; }
}

/* ---- Trainingssamensteller ---------------------------------- */
.training-builder-page {
    max-width: 980px;
    margin: 1rem auto 0;
    padding-top: .35rem;
}

.training-builder-page [hidden] {
    display: none !important;
}

.training-builder-intro {
    max-width: 720px;
    margin-bottom: 2rem;
}

.training-builder-intro .stamp {
    margin-bottom: 1rem;
}

.training-builder-intro h1,
.training-detail-head h1 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: 0 0 .75rem;
}

.training-builder-intro p {
    max-width: 60ch;
    margin: 0;
    color: #3f4a41;
    font-size: 1.08rem;
}

.training-builder-empty {
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.training-builder-empty .stamp {
    margin-bottom: 1rem;
}

.builder-panel {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
    padding: clamp(1.2rem, 3vw, 2rem);
    animation: rise .3s ease both;
}

#training-amount-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 350px);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.builder-panel h2 {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.4rem, 3vw, 1.75rem);
    line-height: 1.15;
    margin: .25rem 0 .45rem;
}

.builder-panel p {
    margin: 0;
    color: var(--muted);
}

.builder-step {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--accent);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.builder-step::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.builder-amount-control {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
    padding: 1.1rem;
    background: linear-gradient(145deg, #f8faf6, #eef4ea);
    border: 1px solid #dfe6da;
    border-radius: 16px;
}

.builder-amount-control label {
    font-size: .82rem;
    font-weight: 800;
    color: #405043;
}

.builder-amount-control input {
    width: 100%;
    min-height: 52px;
    font-size: 1.15rem;
    font-weight: 800;
    text-align: center;
    background: #fff;
}

.builder-amount-control .btn {
    width: 100%;
    min-height: 48px;
    margin-top: .15rem;
}

.builder-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.2rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--line);
}

#training-progress {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-top: .45rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: #edf4e9;
    color: #3f6047;
    font-size: .82rem;
    font-weight: 700;
}

.training-title-label {
    display: block;
    margin-top: 1.45rem;
}

.training-title-input {
    width: min(100%, 540px);
    margin-top: .4rem;
}

.text-button {
    appearance: none;
    border: 0;
    background: none;
    padding: .2rem 0;
    color: var(--grass);
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.text-button:hover {
    text-decoration: underline;
}

.text-button-danger {
    color: var(--danger);
}

.training-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.15rem;
    margin-top: 1.5rem;
}

.training-slot-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.training-slot {
    position: relative;
    display: flex;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 17px;
    cursor: pointer;
    font: inherit;
    isolation: isolate;
    box-shadow: 0 2px 10px rgba(23,37,28,.05);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.training-slot:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(23,37,28,.14);
}

.training-slot:active {
    transform: translateY(-1px);
}

.training-slot-empty {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: 1rem;
    border: 2px dashed #aeb9aa;
    background:
        radial-gradient(circle at 50% 35%, rgba(46,125,70,.08), transparent 38%),
        #f8faf6;
    color: #526052;
    font-weight: 700;
    text-align: center;
}

.training-slot-empty:hover {
    border-color: var(--grass);
    background-color: #f3f8f0;
    color: var(--grass);
}

.training-slot-empty > span:last-child {
    max-width: 12ch;
    line-height: 1.25;
    font-size: .9rem;
}

.training-slot-plus {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(46,125,70,.12);
    box-shadow: inset 0 0 0 1px rgba(46,125,70,.12);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
    transition: transform .15s ease, background-color .15s ease;
}

.training-slot-empty:hover .training-slot-plus {
    transform: scale(1.06);
    background: rgba(46,125,70,.18);
}

.training-slot-number {
    position: absolute;
    top: .65rem;
    left: .65rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,.16);
    font-size: .8rem;
    font-weight: 800;
}

.training-slot-filled {
    display: block;
    padding: 0;
    border: 0;
    background: #dfe6da;
    text-align: left;
}

.training-slot-filled > img,
.training-slot-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.training-slot-filled:hover > img,
.training-slot-filled:hover .training-slot-fallback {
    transform: scale(1.035);
}

.training-slot-fallback {
    display: grid;
    place-items: center;
    font-size: 3rem;
    background: linear-gradient(155deg, #eef5ea 0%, #dbe9d6 100%);
}

.training-slot-overlay {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    min-height: 58%;
    justify-content: flex-end;
    padding: 3.2rem .85rem .85rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(11,22,14,.94));
}

.training-slot-overlay strong {
    line-height: 1.15;
    font-size: .96rem;
}

.training-slot-overlay small {
    opacity: .8;
    margin-top: .18rem;
    font-size: .75rem;
}

.training-slot-overlay em {
    display: inline-flex;
    align-self: flex-start;
    margin-top: .4rem;
    padding: .15rem .45rem;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-style: normal;
    font-size: .68rem;
    font-weight: 700;
}

.training-slot-tools {
    display: flex;
    justify-content: space-between;
    gap: .65rem;
    min-height: 31px;
    padding: .4rem .15rem 0;
}

.training-slot-tools .text-button {
    font-size: .76rem;
}

.training-actions {
    margin-top: 1.8rem;
    padding: 1.15rem 1.25rem;
    border-radius: 16px;
    background: linear-gradient(145deg, #eef5ea, #e8f1e4);
    border: 1px solid #d4e2cf;
    box-shadow: 0 5px 18px rgba(46,125,70,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.training-actions strong {
    display: block;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.08rem;
}

.training-actions p {
    margin: .15rem 0 0;
    font-size: .9rem;
}

.training-actions-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    flex-shrink: 0;
}

/* Oefeningkiezer */
html.has-open-dialog {
    overflow: hidden;
}

.exercise-picker {
    width: min(900px, calc(100% - 2rem));
    max-height: min(760px, calc(100dvh - 2rem));
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 24px 80px rgba(10,25,15,.28);
}

.exercise-picker[open] {
    animation: picker-in .18s ease both;
}

.exercise-picker::backdrop {
    background: rgba(16,28,19,.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

@keyframes picker-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.picker-head {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) 100px;
    align-items: center;
    min-height: 66px;
    padding: .85rem 1.2rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(8px);
}

.picker-head h2 {
    overflow: hidden;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.45rem;
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

.picker-head .text-button {
    justify-self: start;
}

.picker-close {
    justify-self: end;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #edf1ea;
    color: var(--ink);
    font: inherit;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

.picker-close:hover {
    background: #e1e8dc;
    transform: rotate(4deg);
}

#picker-categories,
#picker-exercises {
    max-height: calc(min(760px, 100dvh - 2rem) - 66px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.picker-help {
    margin: 0;
    padding: 1.15rem 1.2rem 0;
    color: var(--muted);
}

.picker-category-grid,
.picker-exercise-grid {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
}

.picker-category-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.picker-category {
    position: relative;
    min-height: 132px;
    padding: 1.05rem;
    overflow: hidden;
    border: 1.5px solid var(--line);
    border-radius: 15px;
    background: linear-gradient(145deg, #fafcf8, #edf5ea);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.picker-category::after {
    content: "+";
    position: absolute;
    right: .85rem;
    bottom: .7rem;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: rgba(46,125,70,.11);
    color: var(--grass);
    font-size: 1.25rem;
    line-height: 1;
}

.picker-category strong {
    display: block;
    max-width: calc(100% - 30px);
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.22rem;
    line-height: 1.15;
}

.picker-category span {
    display: block;
    color: var(--muted);
    font-size: .85rem;
    margin-top: .35rem;
}

.picker-category:hover:not(:disabled) {
    border-color: var(--grass);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(23,37,28,.09);
}

.picker-category:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.picker-category:disabled::after {
    content: "–";
}

.picker-exercise-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.picker-exercise {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: .8rem;
    align-items: center;
    min-height: 98px;
    padding: .65rem;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.picker-exercise:hover:not(:disabled) {
    border-color: var(--grass);
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(23,37,28,.09);
}

.picker-exercise:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.picker-exercise-media {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 11px;
    overflow: hidden;
    background: #e4eadf;
}

.picker-exercise-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.picker-exercise-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 1.7rem;
}

.picker-exercise-copy {
    min-width: 0;
}

.picker-exercise-copy strong {
    display: block;
    overflow: hidden;
    line-height: 1.2;
    font-size: .92rem;
    text-overflow: ellipsis;
}

.picker-exercise-copy small {
    display: block;
    color: var(--muted);
    margin-top: .25rem;
}

.picker-exercise-copy em {
    display: inline-flex;
    margin-top: .35rem;
    padding: .14rem .42rem;
    border-radius: 999px;
    background: #f7e7e3;
    color: var(--accent);
    font-style: normal;
    font-size: .68rem;
    font-weight: 800;
}

@media (max-width: 760px) {
    #training-amount-panel {
        grid-template-columns: 1fr;
        gap: 1.3rem;
        align-items: stretch;
    }

    .training-slots {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .9rem;
    }

    .training-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .training-actions-buttons {
        width: 100%;
    }
}

@media (max-width: 580px) {
    .training-builder-page {
        margin-top: .4rem;
    }

    .builder-panel {
        padding: 1rem;
        border-radius: 15px;
    }

    .builder-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: .6rem;
    }

    .training-slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .8rem;
    }

    .training-slot {
        border-radius: 14px;
    }

    .training-slot-tools {
        flex-direction: column;
        gap: .05rem;
        align-items: flex-start;
        padding-top: .3rem;
    }

    .training-actions-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .training-actions-buttons .btn {
        width: 100%;
    }

    .exercise-picker {
        width: calc(100% - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: 16px;
    }

    .picker-head {
        grid-template-columns: 70px minmax(0, 1fr) 70px;
        min-height: 60px;
        padding: .7rem .75rem;
    }

    .picker-head h2 {
        font-size: 1.12rem;
    }

    .picker-head .text-button {
        font-size: .78rem;
    }

    .picker-close {
        width: 36px;
        height: 36px;
    }

    #picker-categories,
    #picker-exercises {
        max-height: calc(100dvh - 1rem - 60px);
    }

    .picker-help {
        padding: .95rem .9rem 0;
        font-size: .9rem;
    }

    .picker-category-grid,
    .picker-exercise-grid {
        grid-template-columns: 1fr;
        gap: .75rem;
        padding: .9rem;
    }

    .picker-category {
        min-height: 105px;
    }

    .picker-exercise {
        grid-template-columns: 66px minmax(0, 1fr);
        min-height: 82px;
    }

    .picker-exercise-media {
        width: 66px;
        height: 66px;
    }
}

@media (max-width: 380px) {
    .training-slots {
        grid-template-columns: 1fr;
    }

    .training-slot {
        aspect-ratio: 4 / 3;
    }
}


/* ---- Opgeslagen en gedeelde training ------------------------ */
.training-detail { max-width: 880px; margin: 1rem auto 0; }
.training-detail-head { text-align: center; margin-bottom: 1.8rem; }
.training-detail-head .stamp { margin-bottom: 1rem; }
.training-detail-head > p { color: var(--muted); margin: 0; }
.training-eyebrow { color: var(--accent) !important; text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; font-weight: 800; margin-bottom: .45rem !important; }
.training-notice { max-width: 600px; margin: 0 auto 1.4rem; text-align: center; }
.training-exercise-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.training-exercise-row {
    display: grid;
    grid-template-columns: 42px 92px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--card);
    box-shadow: 0 2px 12px rgba(23,37,28,.05);
}
.training-exercise-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: .85rem; }
.training-exercise-media { display: grid; place-items: center; width: 92px; height: 72px; overflow: hidden; border-radius: 10px; background: #e3eadd; text-decoration: none; font-size: 1.8rem; }
.training-exercise-media img { width: 100%; height: 100%; object-fit: cover; }
.training-exercise-info { min-width: 0; }
.training-exercise-info h3 { font-family: "Fraunces", Georgia, serif; font-size: 1.08rem; line-height: 1.2; margin: 0 0 .35rem; }
.training-exercise-info h3 a { text-decoration: none; }
.training-exercise-info h3 a:hover { text-decoration: underline; }
.training-exercise-info p { margin: 0; }
.training-exercise-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.training-share-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
    margin-top: 1.5rem;
    padding: 1.2rem 1.35rem;
    border-radius: 16px;
    background: #eaf3e6;
    border: 1px solid #d4e3cf;
}
.training-share-box h2 { font-family: "Fraunces", Georgia, serif; margin: 0 0 .2rem; font-size: 1.25rem; }
.training-share-box p { margin: 0; color: #4c594d; font-size: .92rem; }
.training-public-link { display: inline-block; margin-top: .45rem; color: var(--grass); font-weight: 700; font-size: .86rem; text-decoration: none; }
.training-public-link:hover { text-decoration: underline; }
[data-copy-text].is-copied, [data-copy-base64].is-copied { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- Trainingen in het account ------------------------------ */
.account-head { align-items: center; }
.account-summary { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; }
.account-section { margin-top: 2.2rem; }
.account-section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.account-section-head h2 { font-family: "Fraunces", Georgia, serif; font-size: 1.35rem; margin: 0; }
.account-section-head p { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
.account-section-head > a { color: var(--grass); font-size: .9rem; font-weight: 700; text-decoration: none; }
.account-empty-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border: 1px dashed #b7c1b3; border-radius: 14px; background: rgba(255,255,255,.55); }
.account-empty-card p { margin: 0; color: var(--muted); }
.training-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.training-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: var(--shadow); transition: transform .15s ease; }
.training-card:hover { transform: translateY(-2px); }
.training-card-link { display: block; color: inherit; text-decoration: none; }
.training-card-preview { position: relative; height: 135px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(150deg, #eaf3e6, #dcebd7); }
.training-card-preview img { width: 100%; height: 100%; object-fit: cover; }
.training-card-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(16,31,19,.45)); }
.training-card-icon { font-size: 2.5rem; }
.training-card-count { position: absolute; z-index: 2; right: .65rem; bottom: .6rem; padding: .25rem .55rem; border-radius: 999px; background: rgba(23,37,28,.9); color: #fff; font-size: .72rem; font-weight: 700; }
.training-card-body { padding: .85rem 1rem 1rem; }
.training-card-body h3 { font-family: "Fraunces", Georgia, serif; font-size: 1.08rem; line-height: 1.2; margin: 0 0 .25rem; }
.training-card-body p { margin: 0; color: var(--muted); font-size: .8rem; }

@media (max-width: 760px) {
    #training-amount-panel { grid-template-columns: 1fr; gap: 1.3rem; }
    .training-actions,
    .training-share-box { align-items: flex-start; flex-direction: column; }
    .training-exercise-row { grid-template-columns: 38px 72px minmax(0, 1fr); gap: .7rem; }
    .training-exercise-media { width: 72px; height: 62px; }
    .training-exercise-actions { grid-column: 2 / -1; justify-content: flex-start; }
    .account-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
    .training-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
    .builder-panel { padding: 1rem; }
    .builder-topline { align-items: flex-start; flex-direction: column; }
    .training-actions-buttons { width: 100%; }
    .training-actions-buttons .btn { width: 100%; }
    .picker-head { grid-template-columns: 70px 1fr 70px; padding: .85rem; }
    .picker-head h2 { font-size: 1.15rem; }
    .picker-category-grid { grid-template-columns: 1fr; }
    .picker-exercise-grid { grid-template-columns: 1fr; }
    .training-exercise-row { grid-template-columns: 34px 58px minmax(0, 1fr); padding: .65rem; }
    .training-exercise-media { width: 58px; height: 54px; }
    .training-exercise-info h3 { font-size: .95rem; }
    .training-exercise-actions .btn { padding: .4rem .65rem; font-size: .78rem; }
    .account-empty-card { align-items: flex-start; flex-direction: column; }
}

/* ---- Automatische trainingsgenerator ------------------------- */
.generator-explanation {
    display: grid;
    gap: .2rem;
    max-width: 570px;
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-left: 4px solid var(--grass);
    border-radius: 0 12px 12px 0;
    background: #eef5ea;
}

.generator-explanation strong {
    font-size: .9rem;
}

.generator-explanation span {
    color: #4f5d50;
    font-size: .86rem;
    line-height: 1.45;
}

.builder-start-buttons {
    display: grid;
    gap: .55rem;
}

.builder-start-buttons .btn {
    margin-top: 0;
}

.generator-message {
    margin: .15rem 0 0 !important;
    padding: .65rem .75rem;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.4;
}

.generator-message.is-success {
    color: #2e6040;
    background: #e6f2e3;
    border: 1px solid #cfe4ca;
}

.generator-message.is-error {
    color: #8f2f2f;
    background: #fae9e7;
    border: 1px solid #efd0cc;
}

.generator-message-inline {
    margin-top: 1rem !important;
}

.builder-top-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem 1rem;
}

/* ---- Training verwijderen ------------------------------------ */
.training-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 48px;
    padding: .55rem 1rem .7rem;
    border-top: 1px solid var(--line);
    background: #fbfcfa;
}

.training-card-footer .text-button,
.training-delete-form .text-button {
    font-size: .8rem;
}

.training-delete-form {
    margin: 0;
}

.training-delete-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-top: 1rem;
    padding: 1.05rem 1.25rem;
    border: 1px solid #eccbc7;
    border-radius: 16px;
    background: #fff5f3;
}

.training-delete-box h2 {
    margin: 0 0 .15rem;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.1rem;
}

.training-delete-box p {
    margin: 0;
    color: #725451;
    font-size: .86rem;
}

.training-delete-box form {
    flex-shrink: 0;
    margin: 0;
}

@media (max-width: 760px) {
    .builder-top-actions {
        justify-content: flex-start;
    }

    .training-delete-box {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .generator-explanation {
        padding: .8rem .85rem;
    }

    .builder-top-actions {
        display: grid;
        gap: .35rem;
    }

    .training-delete-box .btn {
        width: 100%;
    }

    .training-delete-box form {
        width: 100%;
    }
}

/* ---- Mooie deel- en oefenlinks ------------------------------- */
.training-share-content {
    flex: 1 1 430px;
    min-width: 0;
}

.share-link-preview {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    max-width: 560px;
    margin-top: .85rem;
    padding: .72rem .8rem;
    border: 1px solid rgba(46, 125, 70, .22);
    border-radius: 13px;
    background: rgba(255, 255, 255, .78);
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(23, 37, 28, .05);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.share-link-preview:hover {
    border-color: rgba(46, 125, 70, .48);
    box-shadow: 0 7px 18px rgba(23, 37, 28, .09);
    transform: translateY(-1px);
}

.share-link-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: #dfeeda;
    color: var(--grass);
}

.share-link-icon svg,
.training-link-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.share-link-copy {
    display: block;
    min-width: 0;
}

.share-link-copy strong {
    display: block;
    margin-bottom: .12rem;
    font-size: .84rem;
    line-height: 1.25;
}

.share-link-copy small {
    display: block;
    overflow: hidden;
    color: #637064;
    font-size: .76rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-link-arrow {
    color: var(--grass);
    font-size: 1.05rem;
    font-weight: 800;
}

.training-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 36px;
    padding: .42rem .68rem;
    border: 1px solid #c9d5c6;
    border-radius: 999px;
    background: #f7faf5;
    color: var(--grass);
    font: inherit;
    font-size: .78rem;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.training-link-button:hover {
    border-color: var(--grass);
    background: #eef6eb;
    transform: translateY(-1px);
}

.training-link-button svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.training-link-button-compact {
    min-height: 29px;
    padding: .32rem .54rem;
    font-size: .72rem;
}

.training-link-button.is-copied,
[data-share-url].is-copied {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

@media (max-width: 760px) {
    .training-share-content {
        width: 100%;
        flex-basis: auto;
    }

    .share-link-preview {
        max-width: none;
    }
}

@media (max-width: 520px) {
    .share-link-preview {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        gap: .65rem;
        padding: .65rem;
    }

    .share-link-icon {
        width: 38px;
        height: 38px;
    }

    .training-exercise-actions .training-link-button {
        min-height: 34px;
        padding: .4rem .62rem;
        font-size: .75rem;
    }

    .training-slot-tools {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ============================================================
   Mijn Team
   ============================================================ */
.team-page,
.team-event-page,
.team-stats-page { padding-top: 1rem; }

.team-hero,
.team-stats-hero,
.team-event-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.8rem 0 2rem;
}
.team-hero h1,
.team-stats-hero h1,
.team-event-hero h1 {
    margin: .18rem 0 .55rem;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -.035em;
}
.team-hero p,
.team-stats-hero p,
.team-event-hero p { max-width: 680px; margin: 0; color: #526056; }
.team-eyebrow,
.team-section-label,
.team-event-kicker {
    display: inline-block;
    color: var(--grass);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.team-event-kicker.is-match { color: var(--accent); }
.team-hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.team-flash { margin: 0 0 1.2rem; }

.team-panel {
    background: rgba(255,255,255,.94);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(23,37,28,.07);
    padding: 1.4rem;
}
.team-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}
.team-panel-head h2,
.team-side-panel h2,
.team-onboarding-copy h2 {
    margin: .12rem 0 .25rem;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.55rem;
    line-height: 1.15;
}
.team-panel-head p,
.team-side-panel > p,
.team-onboarding-copy > p { margin: 0; color: #667068; font-size: .92rem; }
.team-wide-button { width: 100%; }
.team-count-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #edf5eb;
    color: var(--grass);
    padding: .35rem .65rem;
    font-size: .78rem;
    font-weight: 800;
}

.team-onboarding-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 2rem;
    align-items: start;
    padding: 1rem 0 2rem;
}
.team-onboarding-copy { padding: 2rem 1rem 1rem 0; }
.team-step-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: .9rem;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
}
.team-benefits { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.team-benefits li { position: relative; padding: .35rem 0 .35rem 1.6rem; }
.team-benefits li::before { content: "✓"; position: absolute; left: 0; color: var(--grass); font-weight: 900; }
.team-create-form { padding: 1.7rem; }

.team-day-fieldset { min-width: 0; margin: 1.35rem 0; padding: 0; border: 0; }
.team-day-fieldset legend { padding: 0; font-weight: 800; }
.team-day-fieldset > p { margin: .1rem 0 .7rem; color: var(--muted); font-size: .82rem; }
.team-day-fieldset.compact { margin: 1rem 0; }
.team-day-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .42rem; }
.team-day-option { position: relative; display: block; min-width: 0; cursor: pointer; }
.team-day-option input { position: absolute; opacity: 0; pointer-events: none; }
.team-day-option span {
    display: grid;
    place-items: center;
    min-height: 46px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fafbf9;
    font-weight: 800;
    transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}
.team-day-option small { display: none; }
.team-day-option:hover span { border-color: #aab7a8; transform: translateY(-1px); }
.team-day-option input:checked + span { border-color: var(--grass); background: var(--grass); color: #fff; box-shadow: 0 5px 15px rgba(46,125,70,.18); }
.team-day-option input:focus-visible + span { outline: 3px solid rgba(46,125,70,.22); outline-offset: 2px; }

.team-switcher {
    display: flex;
    gap: .45rem;
    overflow-x: auto;
    padding: .3rem 0 1rem;
    scrollbar-width: thin;
}
.team-switcher a {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: .42rem .8rem;
    text-decoration: none;
    font-size: .84rem;
    font-weight: 750;
}
.team-switcher a.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }

.team-summary-grid {
    display: grid;
    grid-template-columns: 1.55fr repeat(3, 1fr);
    gap: .8rem;
    margin-bottom: 1rem;
}
.team-summary-card {
    min-height: 142px;
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 8px 24px rgba(23,37,28,.05);
}
.team-summary-card > span { display: block; color: var(--muted); font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.team-summary-card strong { display: block; margin: .35rem 0 .1rem; font-family: "Fraunces", Georgia, serif; font-size: 2rem; line-height: 1; }
.team-summary-card p { margin: 0; color: #667068; font-size: .8rem; }
.team-summary-card a { display: inline-block; margin-top: .65rem; color: var(--grass); font-size: .8rem; font-weight: 800; text-decoration: none; }
.team-summary-primary { border-color: #bfd2bb; background: linear-gradient(135deg, #eaf4e7, #fff); }
.team-summary-primary strong { font-size: 1.5rem; }

.team-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.team-main-column,
.team-side-column { display: grid; gap: 1rem; min-width: 0; }
.team-side-panel { padding: 1.25rem; }
.team-schedule-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
    margin-bottom: 1rem;
}
.team-schedule-strip > div { padding: .72rem .85rem; border-radius: 12px; background: #f4f7f2; }
.team-schedule-strip span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; font-weight: 800; letter-spacing: .06em; }
.team-schedule-strip strong { display: block; margin-top: .12rem; font-size: .88rem; }

.team-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1.5rem; }
.team-subpanel { padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfa; }
.team-subpanel h3 { margin: 0; font-size: 1rem; }
.team-subpanel > p { margin: .1rem 0 .8rem; color: var(--muted); font-size: .78rem; }
.team-subpanel label,
.team-inline-add label,
.team-trainer-form label,
.team-event-details label { display: block; color: #4c584f; font-size: .77rem; font-weight: 750; }
.team-subpanel label > span { color: var(--muted); font-weight: 500; }
.team-subpanel .paste-input,
.team-inline-add .paste-input,
.team-trainer-form .paste-input,
.team-event-details .paste-input { margin-top: .22rem; font-size: .88rem; }
.team-subpanel > label { margin-bottom: .58rem; }
.team-two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-bottom: .58rem; }

.team-list-heading { display: flex; align-items: center; justify-content: space-between; margin: 1rem 0 .55rem; }
.team-list-heading h3 { margin: 0; font-size: .98rem; }
.team-list-heading span,
.team-past-events summary span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 .35rem; border-radius: 999px; background: #edf0eb; color: #5f6a61; font-size: .72rem; font-weight: 800; }
.team-event-list { display: grid; gap: .45rem; }
.team-event-row {
    display: grid;
    grid-template-columns: 45px auto minmax(0, 1fr) auto 18px;
    gap: .65rem;
    align-items: center;
    min-width: 0;
    padding: .65rem;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.team-event-row:hover { border-color: #aebbaa; transform: translateY(-1px); box-shadow: 0 7px 18px rgba(23,37,28,.06); }
.team-event-date { display: grid; place-items: center; width: 45px; height: 48px; border-radius: 10px; background: #f0f3ee; line-height: 1; }
.team-event-date strong { font-size: 1.05rem; }
.team-event-date small { margin-top: -.1rem; color: var(--muted); font-size: .57rem; font-weight: 800; }
.team-event-type { display: inline-flex; align-items: center; width: max-content; border-radius: 999px; background: #e8f3e6; color: var(--grass); padding: .23rem .52rem; font-size: .65rem; font-weight: 800; }
.team-event-type.is-match { background: #fff0eb; color: var(--accent); }
.team-event-copy { min-width: 0; }
.team-event-copy strong,
.team-event-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-event-copy strong { font-size: .88rem; }
.team-event-copy small { color: var(--muted); font-size: .72rem; }
.team-event-progress { color: #5f6a61; font-size: .7rem; white-space: nowrap; }
.team-event-arrow { color: var(--grass); font-weight: 900; }
.team-past-events { margin-top: .8rem; }
.team-past-events summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; color: #536057; font-size: .84rem; font-weight: 750; }
.team-past-events[open] summary { margin-bottom: .55rem; }
.team-empty-state { padding: 1rem; border: 1px dashed #cad2c7; border-radius: 12px; background: #fafbf9; color: var(--muted); text-align: center; }
.team-empty-state p { margin: 0; }

.team-inline-add {
    display: grid;
    grid-template-columns: 1.5fr .65fr 1fr auto;
    gap: .55rem;
    align-items: end;
    padding: .8rem;
    margin-bottom: 1rem;
    border-radius: 13px;
    background: #f4f7f2;
}
.team-player-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.team-player-card,
.team-trainer-row {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    padding: .65rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.team-player-card > div,
.team-trainer-row > div { min-width: 0; flex: 1; }
.team-player-card strong,
.team-player-card small,
.team-trainer-row strong,
.team-trainer-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-player-card strong,
.team-trainer-row strong { font-size: .86rem; }
.team-player-card small,
.team-trainer-row small { color: var(--muted); font-size: .7rem; }
.team-shirt-number {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 11px 11px 14px 14px;
    background: var(--ink);
    color: #fff;
    font-weight: 900;
    line-height: 1;
}
.team-icon-button {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #929a92;
    font: inherit;
    font-size: 1.2rem;
    cursor: pointer;
}
.team-icon-button:hover { background: rgba(198,58,58,.09); color: var(--danger); }

.team-trainer-list { display: grid; gap: .5rem; margin: 1rem 0; }
.team-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: #e9f2e6; color: var(--grass); font-weight: 900; }
.team-trainer-form { padding-top: .9rem; border-top: 1px solid var(--line); }
.team-trainer-form .btn { width: 100%; margin-top: .55rem; }
.team-help-text { margin: .55rem 0 0 !important; color: var(--muted) !important; font-size: .72rem !important; }
.team-mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin: 1rem 0; }
.team-mini-stats div { padding: .55rem .3rem; border-radius: 10px; background: #f3f6f1; text-align: center; }
.team-mini-stats strong,
.team-mini-stats span { display: block; }
.team-mini-stats strong { font-size: 1.05rem; }
.team-mini-stats span { color: var(--muted); font-size: .59rem; line-height: 1.2; }
.team-settings-panel { padding: 1.1rem 1.2rem; }
.team-settings-panel > summary { cursor: pointer; font-weight: 800; }
.team-settings-panel[open] > summary { margin-bottom: .8rem; }

.team-back-link { display: inline-block; margin-top: .5rem; color: #526056; font-size: .84rem; font-weight: 750; text-decoration: none; }
.team-back-link:hover { color: var(--grass); }
.team-event-hero { align-items: center; }
.team-event-head-stats { display: flex; flex-wrap: wrap; gap: .5rem; }
.team-event-head-stats div { min-width: 92px; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 13px; background: #fff; text-align: center; }
.team-event-head-stats strong,
.team-event-head-stats span { display: block; }
.team-event-head-stats strong { font-family: "Fraunces", Georgia, serif; font-size: 1.35rem; line-height: 1; }
.team-event-head-stats span { margin-top: .15rem; color: var(--muted); font-size: .62rem; }
.team-event-form { display: grid; gap: 1rem; }
.team-event-details { padding: 1.1rem 1.3rem; }
.team-event-details .team-panel-head { margin-bottom: .7rem; }
.team-attendance-panel { padding: 0; overflow: hidden; }
.team-attendance-panel .team-panel-head { padding: 1.3rem 1.3rem 1rem; margin: 0; }
.team-bulk-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.team-bulk-actions button { border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: .35rem .65rem; color: #465248; font: inherit; font-size: .7rem; font-weight: 750; cursor: pointer; }
.team-bulk-actions button:hover { border-color: var(--grass); color: var(--grass); }
.team-attendance-table-wrap,
.team-stats-table-wrap { overflow-x: auto; }
.team-attendance-table,
.team-stats-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.team-attendance-table th,
.team-stats-table th { padding: .65rem .8rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f6f8f4; color: #657067; font-size: .68rem; text-align: left; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.team-attendance-table td,
.team-stats-table td { padding: .72rem .8rem; border-bottom: 1px solid #edf0ea; vertical-align: middle; }
.team-attendance-table tbody tr:last-child td,
.team-stats-table tbody tr:last-child td { border-bottom: 0; }
.team-player-cell { display: flex; align-items: center; gap: .6rem; min-width: 170px; }
.team-player-cell div { min-width: 0; }
.team-player-cell strong,
.team-player-cell small { display: block; }
.team-player-cell small { color: var(--muted); font-size: .68rem; }
.team-status-options { display: flex; flex-wrap: wrap; gap: .25rem; min-width: 360px; }
.team-status-choice { cursor: pointer; }
.team-status-choice input { position: absolute; opacity: 0; pointer-events: none; }
.team-status-choice span { display: block; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: .3rem .52rem; color: #68726a; font-size: .68rem; font-weight: 750; white-space: nowrap; }
.team-status-choice input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.team-status-choice.status-present input:checked + span { border-color: var(--grass); background: var(--grass); }
.team-status-choice.status-absent input:checked + span { border-color: var(--accent); background: var(--accent); }
.team-status-choice.status-injured input:checked + span { border-color: #916f21; background: #916f21; }
.team-status-choice.status-vacation input:checked + span { border-color: #3478a5; background: #3478a5; }
.team-stat-input { width: 64px; padding: .45rem; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; text-align: center; }
.team-stat-input:focus { outline: none; border-color: var(--grass); box-shadow: 0 0 0 3px rgba(46,125,70,.14); }
.team-stat-input:disabled { opacity: .35; background: #f2f3f1; }
.team-attendance-row.is-not-present { background: rgba(244,246,241,.5); }
.team-event-savebar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; border-top: 1px solid var(--line); background: #fbfcfa; }
.team-event-savebar strong,
.team-event-savebar span { display: block; }
.team-event-savebar span { color: var(--muted); font-size: .7rem; }
.team-event-delete { display: flex; justify-content: flex-end; margin-top: .8rem; }
.text-button.danger { border: 0; background: none; color: var(--danger); cursor: pointer; }
.team-empty-event { text-align: center; padding: 2.5rem; }
.team-empty-event h2 { margin: 0; font-family: "Fraunces", Georgia, serif; }

.team-stats-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.team-stats-cards article { padding: 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(23,37,28,.05); }
.team-stats-cards span,
.team-stats-cards strong,
.team-stats-cards small { display: block; }
.team-stats-cards span { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.team-stats-cards strong { margin: .3rem 0 .15rem; font-family: "Fraunces", Georgia, serif; font-size: 2rem; line-height: 1; }
.team-stats-cards small { color: #69736b; font-size: .7rem; }
.team-stats-notice { margin: 1rem 0 0; }
.team-highlight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.team-highlight-card { display: flex; align-items: center; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(135deg, #fff, #f6f8f4); }
.team-highlight-icon { display: grid; place-items: center; flex: 0 0 auto; width: 45px; height: 45px; border-radius: 13px; background: var(--ink); color: #fff; font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; font-weight: 900; }
.team-highlight-card small,
.team-highlight-card strong,
.team-highlight-card p { display: block; margin: 0; }
.team-highlight-card small { color: var(--muted); font-size: .68rem; text-transform: uppercase; font-weight: 800; letter-spacing: .05em; }
.team-highlight-card strong { font-size: .95rem; }
.team-highlight-card p { color: #667068; font-size: .72rem; }
.team-stats-table-panel { margin-top: 1rem; padding: 0; overflow: hidden; }
.team-stats-table-panel .team-panel-head { padding: 1.3rem 1.3rem .9rem; margin: 0; }
.team-stats-table th:first-child,
.team-stats-table td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
.team-stats-table th:first-child { background: #f6f8f4; }
.team-ranking-player { display: flex; align-items: center; gap: .55rem; min-width: 190px; }
.team-ranking-player > div { min-width: 0; }
.team-ranking-player strong,
.team-ranking-player small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-ranking-player small { color: var(--muted); font-size: .68rem; }
.team-rank { width: 20px; color: #899189; font-size: .7rem; font-weight: 800; text-align: center; }
.team-percentage-cell { min-width: 112px; }
.team-percentage-cell strong { display: block; font-size: .78rem; }
.team-percentage-cell > span { display: block; width: 100%; height: 5px; margin-top: .25rem; border-radius: 999px; background: #e8ece5; overflow: hidden; }
.team-percentage-cell i { display: block; height: 100%; border-radius: inherit; background: var(--grass); }
.team-event-stat-list { display: grid; }
.team-event-stat-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 18px; align-items: center; gap: .7rem; padding: .75rem 1rem; border-top: 1px solid #edf0ea; text-decoration: none; }
.team-event-stat-list a:hover { background: #fafbf9; }
.team-event-stat-list div { min-width: 0; }
.team-event-stat-list strong,
.team-event-stat-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-event-stat-list small { color: var(--muted); font-size: .7rem; }
.team-event-stat-list > a > span:nth-last-of-type(1) { color: #59645b; font-size: .75rem; white-space: nowrap; }
.team-event-stat-list b { color: var(--grass); }

.account-team-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: 0; margin: 0; list-style: none; }
.account-team-card { display: flex; align-items: center; gap: .8rem; padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; }
.account-team-card:hover { border-color: #a9b7a7; }
.account-team-card-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #e8f3e6; color: var(--grass); font-size: 1.3rem; }
.account-team-card div { min-width: 0; }
.account-team-card strong,
.account-team-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-team-card small { color: var(--muted); font-size: .75rem; }
.account-head-actions { display: flex; flex-wrap: wrap; gap: .55rem; }

@media (max-width: 980px) {
    .team-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-layout { grid-template-columns: 1fr; }
    .team-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-settings-panel { grid-column: 1 / -1; }
    .team-stats-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .team-hero,
    .team-stats-hero,
    .team-event-hero { align-items: flex-start; flex-direction: column; gap: 1rem; padding-top: 1.2rem; }
    .team-onboarding-grid { grid-template-columns: 1fr; gap: .5rem; }
    .team-onboarding-copy { padding: .6rem 0; }
    .team-form-grid,
    .team-schedule-strip { grid-template-columns: 1fr; }
    .team-inline-add { grid-template-columns: 1fr 1fr; }
    .team-inline-add label:first-of-type { grid-column: 1 / -1; }
    .team-inline-add .btn { min-height: 44px; }
    .team-player-grid { grid-template-columns: 1fr; }
    .team-event-row { grid-template-columns: 45px minmax(0, 1fr) 18px; }
    .team-event-row .team-event-type { grid-column: 2; grid-row: 2; }
    .team-event-copy { grid-column: 2; grid-row: 1; }
    .team-event-progress { display: none; }
    .team-event-arrow { grid-column: 3; grid-row: 1 / 3; }
    .team-event-date { grid-row: 1 / 3; }
    .team-event-head-stats { width: 100%; }
    .team-event-head-stats div { flex: 1; min-width: 84px; }
    .team-attendance-panel .team-panel-head { flex-direction: column; }
    .team-bulk-actions { justify-content: flex-start; }
    .team-event-savebar { align-items: stretch; flex-direction: column; }
    .team-event-savebar .btn { width: 100%; }
    .team-highlight-grid { grid-template-columns: 1fr; }
    .account-team-cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .team-panel { padding: 1rem; border-radius: 15px; }
    .team-create-form { padding: 1rem; }
    .team-day-picker { gap: .25rem; }
    .team-day-option span { min-height: 40px; border-radius: 10px; font-size: .78rem; }
    .team-summary-grid { grid-template-columns: 1fr 1fr; gap: .55rem; }
    .team-summary-card { min-height: 118px; padding: .85rem; }
    .team-summary-card strong { font-size: 1.55rem; }
    .team-summary-primary { grid-column: 1 / -1; }
    .team-side-column { grid-template-columns: 1fr; }
    .team-form-grid { display: block; }
    .team-subpanel + .team-subpanel { margin-top: .65rem; }
    .team-two-fields { grid-template-columns: 1fr; }
    .team-inline-add { grid-template-columns: 1fr; }
    .team-inline-add label:first-of-type { grid-column: auto; }
    .team-stats-cards { grid-template-columns: 1fr 1fr; gap: .5rem; }
    .team-stats-cards article { padding: .85rem; }
    .team-stats-cards strong { font-size: 1.55rem; }
    .team-event-stat-list a { grid-template-columns: minmax(0, 1fr) auto; }
    .team-event-stat-list .team-event-type { grid-column: 1; width: max-content; }
    .team-event-stat-list div { grid-column: 1; }
    .team-event-stat-list > a > span:nth-last-of-type(1) { grid-column: 2; grid-row: 1 / 3; }
    .team-event-stat-list b { display: none; }
}

/* ============================================================
   Spelerfoto's, wedstrijddetails en opstellingmaker
   ============================================================ */
.team-inline-add {
    grid-template-columns: 1.35fr .55fr .9fr 1.15fr auto;
}
.team-file-input {
    min-height: 42px;
    padding: .45rem;
    font-size: .72rem !important;
}
.team-file-input::file-selector-button {
    margin-right: .45rem;
    border: 0;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    padding: .42rem .55rem;
    cursor: pointer;
    font-weight: 750;
}
.team-player-card-photo {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
}
.team-player-card-copy { min-width: 0; }
.team-player-card-copy strong,
.team-player-card-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-player-photo {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, #e5eee1, #cbdcc6);
    color: var(--grass);
    box-shadow: 0 0 0 1px #cbd5c7, 0 5px 13px rgba(23,37,28,.12);
    overflow: visible;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.15rem;
    font-weight: 900;
}
.team-player-photo img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}
.team-player-photo > span { line-height: 1; }
.team-player-photo > b {
    position: absolute;
    right: -4px;
    bottom: -3px;
    display: grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-family: "Instrument Sans", sans-serif;
    font-size: .58rem;
    line-height: 1;
}
.team-player-photo-small { width: 46px; height: 46px; font-size: 1rem; }
.team-player-photo-mini { width: 38px; height: 38px; font-size: .8rem; }
.team-player-photo-mini > b { min-width: 17px; height: 17px; font-size: .5rem; }
.team-player-photo-form { flex: 0 0 auto; }
.team-photo-button {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8faf7;
    color: #59645b;
    padding: .3rem .52rem;
    cursor: pointer;
    font-size: .65rem;
    font-weight: 800;
    white-space: nowrap;
}
.team-photo-button:hover { border-color: var(--grass); color: var(--grass); }
.team-photo-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.team-match-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, .9fr);
    gap: .8rem;
    align-items: end;
    margin-top: .8rem;
}
.team-field-title { display: block; color: #4c584f; font-size: .77rem; font-weight: 750; }
.team-score-editor {
    min-width: 0;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #f8faf7;
}
.team-score-inputs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: .55rem; }
.team-score-inputs label { min-width: 0; }
.team-score-inputs label span { display: block; color: var(--muted); font-size: .66rem; }
.team-score-inputs input { text-align: center; font-size: 1.1rem !important; font-weight: 850; }
.team-score-inputs b { padding-bottom: .65rem; font-size: 1.4rem; }
.team-goal-balance {
    margin-top: .55rem;
    border-radius: 9px;
    background: #eef1ec;
    color: #606a62;
    padding: .46rem .58rem;
    font-size: .72rem;
    font-weight: 750;
}
.team-goal-balance.is-warning { background: #fff3d7; color: #7b5b11; }
.team-goal-balance.is-error { background: #ffe8e4; color: #a43d31; }
.team-goal-balance.is-complete { background: #e5f4e2; color: #276c3a; }
.team-input-help { display: block; margin-top: .25rem; color: var(--muted); font-size: .65rem; font-weight: 500; }
.team-duty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: .8rem; }
.team-score-head { border-color: #efc5b8 !important; background: #fff4f0 !important; }
.team-score-head strong { color: var(--accent); }
.team-attendance-table th small { display: block; color: var(--muted); font-size: .55rem; font-weight: 600; }

.team-lineup-panel { padding: 1.3rem; overflow: hidden; }
.team-lineup-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.team-lineup-toolbar label { color: #4c584f; font-size: .7rem; font-weight: 750; }
.team-lineup-toolbar .paste-input { min-width: 175px; margin-top: .2rem; padding: .54rem .65rem; font-size: .78rem; }
.team-lineup-toolbar .text-button { min-height: 36px; border: 0; background: none; color: #677169; cursor: pointer; font-size: .72rem; font-weight: 750; }
.team-lineup-builder {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) 265px;
    gap: 1rem;
    align-items: start;
}
.team-football-pitch {
    position: relative;
    width: min(100%, 680px);
    aspect-ratio: 68 / 98;
    justify-self: center;
    border: 4px solid #f7fbf4;
    border-radius: 20px;
    background:
        linear-gradient(to bottom, rgba(255,255,255,.055) 0 10%, transparent 10% 20%, rgba(255,255,255,.055) 20% 30%, transparent 30% 40%, rgba(255,255,255,.055) 40% 50%, transparent 50% 60%, rgba(255,255,255,.055) 60% 70%, transparent 70% 80%, rgba(255,255,255,.055) 80% 90%, transparent 90%),
        #3d8c4d;
    box-shadow: 0 0 0 1px #236c37, inset 0 0 35px rgba(10,62,25,.22), 0 18px 35px rgba(23,37,28,.12);
    overflow: hidden;
    touch-action: none;
}
.team-football-pitch::before {
    content: "";
    position: absolute;
    inset: 2.5%;
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 4px;
    pointer-events: none;
}
.pitch-halfway { position: absolute; left: 2.5%; right: 2.5%; top: 50%; border-top: 2px solid rgba(255,255,255,.85); pointer-events: none; }
.pitch-circle { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; border: 2px solid rgba(255,255,255,.85); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.pitch-circle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.9); transform: translate(-50%, -50%); }
.pitch-box { position: absolute; left: 25%; width: 50%; height: 16%; border: 2px solid rgba(255,255,255,.85); pointer-events: none; }
.pitch-box-top { top: 2.5%; border-top: 0; }
.pitch-box-bottom { bottom: 2.5%; border-bottom: 0; }
.pitch-goal { position: absolute; left: 39%; width: 22%; height: 2.7%; border: 2px solid rgba(255,255,255,.95); pointer-events: none; }
.pitch-goal-top { top: 0; border-top: 0; }
.pitch-goal-bottom { bottom: 0; border-bottom: 0; }
.team-football-pitch.is-drop-target { box-shadow: 0 0 0 5px rgba(255,179,87,.55), inset 0 0 35px rgba(10,62,25,.22); }
.team-lineup-token {
    position: absolute;
    z-index: 4;
    display: grid;
    justify-items: center;
    width: 78px;
    transform: translate(-50%, -50%);
    cursor: grab;
    user-select: none;
    touch-action: none;
}
.team-lineup-token.is-dragging { z-index: 10; cursor: grabbing; filter: drop-shadow(0 10px 8px rgba(0,0,0,.22)); }
.team-lineup-token > strong {
    max-width: 78px;
    margin-top: .22rem;
    border-radius: 999px;
    background: rgba(21,34,24,.86);
    color: #fff;
    padding: .17rem .42rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .58rem;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.team-lineup-avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #e8f1e5;
    color: var(--grass);
    box-shadow: 0 5px 14px rgba(0,0,0,.2);
    overflow: visible;
    font-family: "Fraunces", Georgia, serif;
    font-weight: 900;
}
.team-lineup-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.team-lineup-avatar > b { position: absolute; right: -5px; bottom: -3px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 3px; border: 2px solid #fff; border-radius: 999px; background: var(--ink); color: #fff; font-family: "Instrument Sans", sans-serif; font-size: .52rem; }
.team-lineup-avatar.is-small { width: 42px; height: 42px; border-width: 2px; font-size: .85rem; }
.team-lineup-avatar.is-small > b { min-width: 17px; height: 17px; font-size: .48rem; }
.team-lineup-remove {
    position: absolute;
    z-index: 3;
    right: 5px;
    top: -4px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: .8rem;
    line-height: 1;
}
.team-lineup-bench { padding: .85rem; border: 1px solid var(--line); border-radius: 15px; background: #f7f9f5; }
.team-lineup-bench > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }
.team-lineup-bench h3 { margin: 0; font-size: .9rem; }
.team-lineup-bench > div:first-child > span { color: var(--muted); font-size: .65rem; }
.team-lineup-bench > p { margin: .65rem 0 0; color: var(--muted); font-size: .65rem; line-height: 1.45; }
.team-bench-list { display: grid; gap: .4rem; max-height: 610px; overflow-y: auto; padding-right: .15rem; }
.team-bench-player {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    padding: .48rem;
    cursor: grab;
    text-align: left;
}
.team-bench-player:hover { border-color: var(--grass); box-shadow: 0 5px 12px rgba(23,37,28,.07); }
.team-bench-player.is-dragging { opacity: .45; }
.team-bench-player > span:nth-child(2) { min-width: 0; }
.team-bench-player strong,
.team-bench-player small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-bench-player strong { font-size: .74rem; }
.team-bench-player small { color: var(--muted); font-size: .61rem; }
.team-bench-player > i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e8f3e6; color: var(--grass); font-style: normal; font-weight: 900; }
.team-bench-empty { margin: 0; padding: .8rem; border: 1px dashed #c5d0c2; border-radius: 10px; color: var(--muted); font-size: .7rem; text-align: center; }

.team-highlight-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1100px) {
    .team-inline-add { grid-template-columns: 1fr 1fr; }
    .team-inline-add label:first-of-type { grid-column: 1 / -1; }
    .team-inline-add .btn { align-self: end; min-height: 44px; }
    .team-lineup-builder { grid-template-columns: minmax(330px, 1fr) 230px; }
}

@media (max-width: 860px) {
    .team-player-card-photo { grid-template-columns: auto minmax(0, 1fr) auto; }
    .team-player-photo-form { grid-column: 2; }
    .team-player-card-photo > form:last-child { grid-column: 3; grid-row: 1 / 3; }
    .team-lineup-builder { grid-template-columns: 1fr; }
    .team-football-pitch { width: min(100%, 560px); }
    .team-bench-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
    .team-lineup-toolbar { justify-content: flex-start; }
    .team-highlight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .team-match-detail-grid,
    .team-duty-grid { grid-template-columns: 1fr; }
    .team-lineup-panel { padding: 1rem; }
    .team-lineup-panel .team-panel-head { flex-direction: column; }
    .team-lineup-toolbar { width: 100%; align-items: stretch; }
    .team-lineup-toolbar label { width: 100%; }
    .team-lineup-toolbar .paste-input { width: 100%; }
    .team-lineup-toolbar .btn { flex: 1; }
    .team-football-pitch { min-height: 500px; aspect-ratio: auto; }
    .team-lineup-token { width: 64px; }
    .team-lineup-token > strong { max-width: 64px; font-size: .52rem; }
    .team-lineup-avatar { width: 46px; height: 46px; }
    .team-bench-list { grid-template-columns: 1fr; }
    .team-player-card-photo { grid-template-columns: auto minmax(0, 1fr) auto; }
    .team-photo-button span { font-size: 0; }
    .team-photo-button span::after { content: "Foto"; font-size: .65rem; }
}

@media (max-width: 620px) {
    .team-inline-add { grid-template-columns: 1fr; }
    .team-inline-add label:first-of-type { grid-column: auto; }
    .team-highlight-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Mobiele navigatie, seizoendashboard en teamhulpmiddelen
   ============================================================ */
.site-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    cursor: pointer;
}
.site-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 4px 0;
    border-radius: 99px;
    background: var(--ink);
    transition: transform .18s ease, opacity .18s ease;
}
.site-menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.site-menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.team-dashboard-page { padding-top: 1rem; }
.team-section-nav {
    position: sticky;
    top: 65px;
    z-index: 20;
    display: flex;
    gap: .35rem;
    margin: 0 0 1rem;
    padding: .38rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 8px 20px rgba(23,37,28,.06);
    overflow-x: auto;
    scrollbar-width: none;
}
.team-section-nav::-webkit-scrollbar { display: none; }
.team-section-nav a {
    flex: 0 0 auto;
    border-radius: 10px;
    padding: .58rem .8rem;
    color: #556158;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.team-section-nav a:hover { background: #f1f4ef; color: var(--ink); }
.team-section-nav a.is-active { background: var(--ink); color: #fff; }

.team-season-picker {
    min-width: 190px;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.team-season-picker label { display: block; margin-bottom: .2rem; color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.team-season-picker .paste-input { padding: .52rem .65rem; font-size: .84rem; }

.season-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1.65fr) repeat(4, minmax(135px, .7fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.season-dashboard-card,
.season-kpi-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(23,37,28,.06);
}
.season-dashboard-next { grid-row: span 2; padding: 1.25rem; background: linear-gradient(145deg, #eaf4e7, #fff); }
.season-card-label,
.season-kpi-card > span { display: block; color: var(--muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.season-dashboard-next h2 { margin: .45rem 0 .15rem; font-family: "Fraunces", Georgia, serif; font-size: 1.75rem; line-height: 1.1; }
.season-dashboard-next p { margin: 0 0 .25rem; color: #556158; }
.season-dashboard-next small { display: block; margin: .4rem 0 .9rem; color: var(--grass); font-size: .74rem; font-weight: 750; }
.season-event-chip { display: inline-flex; margin-top: .75rem; border-radius: 999px; background: #e8f3e6; color: var(--grass); padding: .25rem .55rem; font-size: .67rem; font-weight: 850; }
.season-event-chip.is-match { background: #fff0eb; color: var(--accent); }
.season-kpi-card { padding: 1rem; }
.season-kpi-card strong { display: block; margin: .35rem 0 .15rem; font-family: "Fraunces", Georgia, serif; font-size: 1.7rem; line-height: 1; }
.season-kpi-card small { display: block; color: #687169; font-size: .68rem; line-height: 1.35; }
.season-dashboard-columns { display: grid; grid-template-columns: 1.3fr .7fr; gap: 1rem; margin-bottom: 1rem; }
.season-dashboard-panel { padding: 1.2rem; }
.season-upcoming-list { display: grid; gap: .45rem; }
.season-upcoming-list a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .65rem;
    padding: .65rem;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fbfcfa;
    text-decoration: none;
}
.season-upcoming-list a:hover { border-color: #afbaad; background: #fff; }
.season-upcoming-list div { min-width: 0; }
.season-upcoming-list strong,
.season-upcoming-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season-upcoming-list strong { font-size: .84rem; }
.season-upcoming-list small { color: var(--muted); font-size: .67rem; }
.season-upcoming-list > a > span:nth-last-of-type(1) { color: #657067; font-size: .68rem; white-space: nowrap; }
.season-upcoming-list b { color: var(--grass); font-size: 1.2rem; }
.season-last-match { display: grid; gap: .55rem; min-height: 190px; place-content: center; border-radius: 15px; background: linear-gradient(145deg, #17251c, #294333); color: #fff; padding: 1.25rem; text-align: center; text-decoration: none; }
.season-last-match > span { color: rgba(255,255,255,.68); font-size: .7rem; }
.season-last-match > strong { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; }
.season-last-match > strong b { display: inline-block; margin: 0 .35rem; color: #ffb357; font-size: 1.65rem; }
.season-last-match > small { color: rgba(255,255,255,.78); }
.season-leaders-panel { padding: 1.2rem; }
.season-leader-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.season-leader-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .7rem; min-height: 96px; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: #fafbf9; overflow: hidden; }
.season-leader-icon { position: absolute; right: .55rem; top: .35rem; color: #dfe6dc; font-family: "Fraunces", Georgia, serif; font-size: 2.3rem; font-weight: 900; line-height: 1; }
.season-leader-card > div:last-child { min-width: 0; }
.season-leader-card small,
.season-leader-card strong,
.season-leader-card p { display: block; margin: 0; }
.season-leader-card small { color: var(--muted); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.season-leader-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.season-leader-card p { color: var(--grass); font-size: .7rem; font-weight: 800; }

.team-message-card {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr) auto;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #cbd8c8;
    border-radius: 17px;
    background: linear-gradient(135deg, #edf6ea, #fff);
}
.team-message-card h2 { margin: .1rem 0 .2rem; font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; }
.team-message-card p { margin: 0; color: #647067; font-size: .76rem; }
.team-message-card pre { margin: 0; padding: .75rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #465149; font: 500 .74rem/1.45 "Instrument Sans", sans-serif; white-space: pre-wrap; }
.team-message-actions { display: grid; gap: .45rem; }
.team-message-actions .btn { width: 100%; }

.team-training-linker { display: flex; align-items: flex-end; gap: .65rem; margin-top: .6rem; }
.team-training-linker label { flex: 1; }
.team-linked-training-card { display: grid; grid-template-columns: minmax(180px, .6fr) minmax(0, 1.4fr); gap: .8rem; margin-top: .8rem; padding: .8rem; border: 1px solid #cbd8c8; border-radius: 13px; background: #f1f7ef; }
.team-linked-training-card span,
.team-linked-training-card strong,
.team-linked-training-card small { display: block; }
.team-linked-training-card > div:first-child > span { color: var(--grass); font-size: .63rem; font-weight: 850; text-transform: uppercase; }
.team-linked-training-card strong { font-size: .9rem; }
.team-linked-training-card small { color: var(--muted); font-size: .67rem; }
.team-linked-exercises { display: flex; flex-wrap: wrap; align-content: center; gap: .35rem; }
.team-linked-exercises a,
.team-linked-exercises > span { border-radius: 999px; background: #fff; padding: .3rem .55rem; color: #526056; font-size: .67rem; font-weight: 700; text-decoration: none; }
.team-linked-exercises a:hover { color: var(--grass); }
.team-single-field { grid-template-columns: 1fr; }
.team-side-actions { display: grid; gap: .45rem; }

.training-team-link-box { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(300px, 1.2fr); gap: 1rem; align-items: center; margin: 1rem 0; padding: 1.2rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(23,37,28,.06); }
.training-team-link-box h2 { margin: .15rem 0 .25rem; font-family: "Fraunces", Georgia, serif; }
.training-team-link-box p { margin: 0; color: var(--muted); }
.training-team-link-box form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .6rem; }
.training-team-link-box form .paste-label { grid-column: 1 / -1; margin: 0; }

@media (max-width: 1120px) {
    .season-dashboard-grid { grid-template-columns: minmax(280px, 1.3fr) repeat(2, minmax(145px, .7fr)); }
    .season-dashboard-next { grid-row: span 2; }
}

@media (max-width: 820px) {
    .season-dashboard-columns { grid-template-columns: 1fr; }
    .season-leader-grid { grid-template-columns: 1fr 1fr; }
    .team-message-card { grid-template-columns: 1fr; align-items: stretch; }
    .team-message-actions { grid-template-columns: 1fr 1fr; }
    .team-training-linker { align-items: stretch; flex-direction: column; }
    .team-training-linker .btn { width: 100%; }
    .team-linked-training-card { grid-template-columns: 1fr; }
    .training-team-link-box { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    body { background-attachment: scroll; }
    .site-head-in { position: relative; flex-wrap: nowrap; padding: .62rem .85rem; }
    .site-menu-toggle { display: block; flex: 0 0 auto; }
    .site-nav {
        position: absolute;
        left: .65rem;
        right: .65rem;
        top: calc(100% + .35rem);
        display: none;
        width: auto;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        align-items: stretch;
        flex-direction: column;
        gap: .15rem;
        padding: .65rem;
        border: 1px solid var(--line);
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 18px 45px rgba(23,37,28,.18);
    }
    .site-nav.is-open { display: flex; }
    .site-nav .nav-link { width: 100%; padding: .72rem .75rem; border-radius: 10px; }
    .site-nav .nav-link:hover { background: #f2f5f0; }
    .site-nav .nav-link::after { display: none; }
    .site-nav .btn { width: 100%; margin-top: .25rem; }
    .wrap { padding: .65rem .85rem 5rem; }
    .btn { min-height: 44px; }
    .paste-input, input, select, textarea { font-size: 16px; }

    .team-page,
    .team-event-page,
    .team-stats-page,
    .team-dashboard-page { padding-top: .3rem; }
    .team-section-nav { top: 60px; margin-left: -.2rem; margin-right: -.2rem; border-radius: 12px; }
    .team-hero,
    .team-stats-hero,
    .team-event-hero { padding: 1rem 0 1.15rem; }
    .team-hero h1,
    .team-stats-hero h1,
    .team-event-hero h1 { font-size: clamp(1.9rem, 10vw, 2.7rem); }
    .team-hero-actions { width: 100%; }
    .team-hero-actions .btn { flex: 1; }
    .team-season-picker { width: 100%; min-width: 0; }

    .season-dashboard-grid {
        display: flex;
        gap: .65rem;
        margin-left: -.85rem;
        margin-right: -.85rem;
        padding: 0 .85rem .25rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .season-dashboard-grid::-webkit-scrollbar { display: none; }
    .season-dashboard-card,
    .season-kpi-card { flex: 0 0 82%; scroll-snap-align: start; }
    .season-kpi-card { flex-basis: 62%; min-height: 130px; }
    .season-dashboard-next { min-height: 260px; }
    .season-upcoming-list a { grid-template-columns: auto minmax(0, 1fr) auto; }
    .season-upcoming-list b { display: none; }
    .season-leader-grid { grid-template-columns: 1fr; }

    .team-summary-grid {
        display: flex;
        gap: .55rem;
        margin-left: -.85rem;
        margin-right: -.85rem;
        padding: 0 .85rem .25rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .team-summary-grid::-webkit-scrollbar { display: none; }
    .team-summary-card { flex: 0 0 68%; min-height: 125px; scroll-snap-align: start; }
    .team-summary-primary { flex-basis: 84%; }
    .team-panel { box-shadow: 0 8px 24px rgba(23,37,28,.06); }
    .team-panel-head { align-items: stretch; flex-direction: column; }
    .team-count-badge { align-self: flex-start; }
    .team-event-row { padding: .62rem; }
    .team-event-copy strong { white-space: normal; line-height: 1.25; }
    .team-event-copy small { white-space: normal; line-height: 1.3; }

    .team-attendance-table-wrap { overflow: visible; padding: 0 .75rem 1rem; }
    .team-attendance-table,
    .team-attendance-table tbody,
    .team-attendance-table tr,
    .team-attendance-table td { display: block; width: 100%; }
    .team-attendance-table thead { display: none; }
    .team-attendance-table tbody { display: grid; gap: .7rem; }
    .team-attendance-table tr { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
    .team-attendance-table td { padding: .72rem; border: 0; border-bottom: 1px solid #edf0ea; }
    .team-attendance-table td:last-child { border-bottom: 0; }
    .team-attendance-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: .35rem; color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
    .team-attendance-table td[data-label="Speler"]::before { display: none; }
    .team-player-cell { min-width: 0; }
    .team-status-options { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; gap: .35rem; }
    .team-status-choice span { min-height: 40px; display: grid; place-items: center; padding: .42rem; text-align: center; white-space: normal; }
    .team-mobile-stat-cell { display: grid !important; grid-template-columns: minmax(0, 1fr) 88px; align-items: center; gap: .75rem; }
    .team-mobile-stat-cell::before { margin: 0 !important; }
    .team-stat-input { width: 88px; min-height: 44px; }
    .team-event-savebar { position: sticky; z-index: 15; bottom: 0; margin: 0 -.75rem -1rem; padding: .75rem; box-shadow: 0 -10px 25px rgba(23,37,28,.1); }
    .team-event-savebar > div { display: none; }
    .team-event-savebar .btn { width: 100%; }
    .team-bulk-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .team-bulk-actions button { min-height: 40px; }

    .team-message-actions { grid-template-columns: 1fr; }
    .team-message-card pre { max-height: 210px; overflow-y: auto; }
    .team-linked-exercises { flex-wrap: nowrap; padding-bottom: .2rem; overflow-x: auto; }
    .team-linked-exercises a,
    .team-linked-exercises > span { flex: 0 0 auto; }
    .training-team-link-box form { grid-template-columns: 1fr; }
    .training-team-link-box form .paste-label { grid-column: auto; }
    .training-team-link-box .btn { width: 100%; }

    .team-stats-table-wrap { -webkit-overflow-scrolling: touch; }
    .team-stats-table { min-width: 900px; }
    .team-stats-table th:first-child,
    .team-stats-table td:first-child { box-shadow: 8px 0 12px rgba(23,37,28,.05); }

    .training-builder-page,
    .training-detail { margin-top: .25rem; }
    .builder-panel,
    .training-share-box,
    .training-delete-box,
    .training-team-link-box { border-radius: 15px; }
    .training-actions-buttons,
    .training-share-box .training-actions-buttons { width: 100%; }
    .training-actions-buttons .btn { width: 100%; }
    .exercise-picker { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
}

@media (max-width: 480px) {
    .wordmark { font-size: 1.12rem; }
    .wordmark-mark { width: 1.85rem; height: 1.85rem; }
    .wordmark-text { display: inline; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .site-head { padding: 0; }
    .team-section-nav a { padding: .55rem .68rem; font-size: .72rem; }
    .team-day-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .team-day-option small { display: block; margin-top: .15rem; color: var(--muted); font-size: .55rem; text-align: center; }
    .team-player-card-photo { padding: .65rem; }
    .team-player-photo { width: 48px; height: 48px; }
    .team-event-head-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-event-head-stats div { min-width: 0; }
    .team-score-inputs { gap: .35rem; }
    .team-score-inputs b { padding-bottom: .55rem; }
    .team-football-pitch { min-height: 430px; }
    .season-dashboard-card,
    .season-kpi-card { flex-basis: 88%; }
    .season-kpi-card { flex-basis: 72%; }
}

/* ============================================================
   Automatisch opslaan + rijd/was/vlagschema
   ============================================================ */
.team-autosave-status { color: var(--ink); }
.team-autosave-status.is-ready { color: #536057; }
.team-autosave-status.is-pending,
.team-autosave-status.is-saving { color: #9a6200; }
.team-autosave-status.is-saved { color: var(--grass); }
.team-autosave-status.is-error { color: var(--danger); }
.team-match-when-fields { margin-top: .15rem; }

.team-player-card-photo { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
.team-player-card-copy em { display: block; margin-top: .16rem; color: #718078; font-size: .61rem; font-style: normal; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-player-duty-form { display: flex; align-items: center; }
.team-duty-switch { position: relative; display: inline-flex; cursor: pointer; }
.team-duty-switch input { position: absolute; opacity: 0; pointer-events: none; }
.team-duty-switch span { position: relative; display: block; width: 38px; height: 22px; border-radius: 999px; background: #d9ded7; transition: background .18s ease; }
.team-duty-switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(23,37,28,.2); transition: transform .18s ease; }
.team-duty-switch input:checked + span { background: var(--grass); }
.team-duty-switch input:checked + span::after { transform: translateX(16px); }
.team-duty-switch input:focus-visible + span { outline: 3px solid rgba(57,104,67,.2); outline-offset: 2px; }

.team-duty-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.team-duty-generator-panel,
.team-duty-list-panel { padding: 1.25rem; }
.team-duty-generator-form { display: grid; gap: .85rem; }
.team-three-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.team-three-fields label,
.team-duty-generator-form label,
.team-import-panel label { color: #4c584f; font-size: .75rem; font-weight: 750; }
.team-three-fields .paste-input,
.team-duty-generator-form .paste-input,
.team-import-panel .paste-input { margin-top: .22rem; }
.team-duty-generator-summary { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: 13px; background: #f2f6f0; }
.team-duty-generator-summary span { color: #5b675e; font-size: .72rem; }
.team-duty-generator-summary strong { color: var(--ink); font-size: .95rem; }
.team-duty-generator-summary .btn { margin-left: auto; }

.team-duty-match-list { display: grid; gap: .55rem; }
.team-duty-match-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) 18px; gap: .75rem; align-items: center; padding: .75rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.team-duty-match-card:hover { border-color: #aebbaa; box-shadow: 0 8px 20px rgba(23,37,28,.06); transform: translateY(-1px); }
.team-duty-match-copy { min-width: 0; }
.team-duty-match-copy > div > strong,
.team-duty-match-copy > div > small { display: block; }
.team-duty-match-copy > div > strong { font-size: .9rem; }
.team-duty-match-copy > div > small { color: var(--muted); font-size: .7rem; }
.team-duty-match-copy dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin: .55rem 0 0; }
.team-duty-match-copy dl > div { min-width: 0; padding: .45rem .55rem; border-radius: 9px; background: #f5f7f3; }
.team-duty-match-copy dt { color: var(--muted); font-size: .57rem; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.team-duty-match-copy dd { margin: .1rem 0 0; color: #465149; font-size: .67rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.team-duty-player-form { display: grid; gap: .75rem; }
.team-duty-player-list { display: grid; gap: .4rem; max-height: 430px; overflow-y: auto; padding-right: .15rem; }
.team-duty-player-list > label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; padding: .52rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.team-duty-player-list > label > span:nth-child(2) { min-width: 0; }
.team-duty-player-list strong,
.team-duty-player-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-duty-player-list strong { font-size: .78rem; }
.team-duty-player-list small { color: var(--muted); font-size: .62rem; }
.team-duty-player-list input { width: 20px; height: 20px; accent-color: var(--grass); }
.team-player-photo-tiny { width: 38px; height: 38px; border-width: 1px; box-shadow: 0 0 0 1px #cbd5c7; font-size: .8rem; overflow: hidden; }
.team-player-photo-tiny b { position: static; min-width: 0; height: auto; border: 0; background: transparent; color: var(--grass); font-size: .8rem; }

.team-import-panel form { display: grid; gap: .65rem; margin-top: .8rem; }
.team-import-drop { display: grid; gap: .3rem; padding: .75rem; border: 1px dashed #aebbaa; border-radius: 12px; background: #f7faf5; }
.team-import-drop input { width: 100%; font-size: .72rem; }
.team-import-check { display: flex !important; align-items: center; gap: .45rem; }
.team-import-check input { width: 18px; height: 18px; accent-color: var(--grass); }
.team-example-download { display: inline-block; margin-top: .7rem; }

@media (max-width: 1050px) {
    .team-duty-layout { grid-template-columns: 1fr; }
    .team-duty-layout .team-side-column { grid-template-columns: 1fr 1fr; display: grid; }
}

@media (max-width: 860px) {
    .team-player-card-photo { grid-template-columns: auto minmax(0, 1fr) auto auto; }
    .team-player-photo-form { grid-column: 2; }
    .team-player-duty-form { grid-column: 3; grid-row: 1 / 3; }
    .team-player-card-photo > form:last-child { grid-column: 4; grid-row: 1 / 3; }
    .team-duty-match-copy dl { grid-template-columns: 1fr; }
    .team-duty-match-copy dd { white-space: normal; }
}

@media (max-width: 760px) {
    .team-duty-layout .team-side-column { grid-template-columns: 1fr; }
    .team-three-fields { grid-template-columns: 1fr; }
    .team-duty-generator-summary { align-items: stretch; flex-direction: column; }
    .team-duty-generator-summary .btn { width: 100%; margin-left: 0; }
    .team-duty-match-card { grid-template-columns: 44px minmax(0, 1fr); }
    .team-duty-match-card .team-event-arrow { display: none; }
    .team-duty-generator-panel,
    .team-duty-list-panel { padding: .85rem; }
    .team-match-when-fields { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
    .team-player-card-photo { grid-template-columns: auto minmax(0, 1fr) auto; }
    .team-player-duty-form { grid-column: 3; grid-row: 1; }
    .team-player-photo-form { grid-column: 2 / 4; grid-row: 2; }
    .team-player-card-photo > form:last-child { position: absolute; right: .35rem; top: .35rem; grid-column: auto; grid-row: auto; }
    .team-match-when-fields { grid-template-columns: 1fr; }
    .team-duty-match-card { padding: .62rem; }
    .team-duty-match-copy dl { gap: .3rem; }
}

/* Deelbaar totaaloverzicht voor het rijd-, was- en vlagschema */
.team-duty-share-panel { padding: 1.25rem; }
.team-duty-share-grid { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: .9rem; align-items: start; }
.team-duty-share-grid pre { margin: 0; max-height: 360px; overflow: auto; padding: .9rem; border: 1px solid var(--line); border-radius: 13px; background: #f7f9f5; color: #465149; font: 600 .76rem/1.55 "Instrument Sans", sans-serif; white-space: pre-wrap; }
.team-duty-share-actions { display: grid; gap: .55rem; }
.team-duty-share-actions .btn { width: 100%; }
.team-import-status { min-height: 1.2em; margin: .2rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.team-import-status.is-loading { color: #756126; }
.team-import-status.is-success { color: var(--grass); }
.team-import-status.is-error { color: #a43f3f; }
.team-import-status.is-ready { color: var(--muted); }
.team-import-panel button[disabled] { opacity: .62; cursor: wait; }

@media (max-width: 760px) {
    .team-duty-share-panel { padding: .85rem; }
    .team-duty-share-grid { grid-template-columns: 1fr; }
    .team-duty-share-grid pre { max-height: 300px; font-size: .71rem; }
    .team-duty-share-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 460px) {
    .team-duty-share-actions { grid-template-columns: 1fr; }
}
