/* Natuurlijk Samen Sporten — stylesheet
   Natuurthema: groen, warm, rustig. */

:root {
    --green-900: #1f3d2b;
    --green-700: #2f6b43;
    --green-600: #3f8f5b;
    --green-500: #4fa86c;
    --green-100: #e7f2ea;
    --sand:      #f6f3ec;
    --ink:       #25342b;
    --muted:     #6b7a70;
    --line:      #e2e6e0;
    --white:     #ffffff;
    --danger:    #b23b3b;
    --shadow:    0 8px 28px rgba(31, 61, 43, 0.08);
    --radius:    14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--white);
    line-height: 1.6;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; color: var(--green-900); }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1em; }

.container { width: min(1140px, 92%); margin: 0 auto; }
.container.narrow { width: min(680px, 92%); }
.center { text-align: center; }
.muted { color: var(--muted); }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4em;
    padding: .6em 1.2em; border-radius: 999px; border: 2px solid transparent;
    font: inherit; font-weight: 700; cursor: pointer; transition: .15s ease;
    text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--green-600); color: #fff; }
.btn--primary:hover { background: var(--green-700); }
.btn--ghost { background: transparent; color: var(--green-700); border-color: var(--green-600); }
.btn--ghost:hover { background: var(--green-100); }
.btn--link { background: none; border: none; color: var(--green-700); padding: .2em .4em; font-weight: 700; }
.btn--danger { color: var(--danger); border-color: transparent; }
.btn--danger.btn--ghost { border-color: var(--danger); }
.btn--lg { padding: .8em 1.6em; font-size: 1.05rem; }
.btn--sm { padding: .4em .9em; font-size: .85rem; }

/* --- Header --- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--green-900); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand__logo { width: 36px; height: 36px; display: block; flex-shrink: 0; }
.brand--admin .brand__logo { width: 32px; height: 32px; }
.site-nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-nav a { font-weight: 700; color: var(--ink); }
.inline-form { display: inline; margin: 0; }

/* --- Hamburger (mobiel) --- */
.nav-burger {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 9px; cursor: pointer; border-radius: 10px; margin-left: auto;
}
.nav-burger span { display: block; width: 100%; height: 3px; border-radius: 3px; background: var(--green-900); transition: transform .25s ease, opacity .2s ease; }
.nav-burger:hover { background: rgba(0, 0, 0, .05); }
.nav-burger--light span { background: #fff; }
.nav-burger--light:hover { background: rgba(255, 255, 255, .1); }

/* --- Flash --- */
.flash-stack { margin-top: 1rem; }
.flash { padding: .8rem 1rem; border-radius: 10px; margin-bottom: .6rem; font-weight: 600; }
.flash--success { background: #e4f4e9; color: #1f6b3a; border: 1px solid #b6e0c4; }
.flash--error { background: #fbe9e9; color: #9c2b2b; border: 1px solid #f1c4c4; }

/* --- Bevestigingspopup (modal) --- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(31, 61, 43, .55); cursor: pointer; }
.modal__dialog {
    position: relative; background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    padding: 2.4rem 2rem 1.8rem; max-width: 420px; width: 100%; text-align: center; animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal__close { position: absolute; top: .5rem; right: .8rem; background: none; border: none; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer; }
.modal__close:hover { color: var(--ink); }
.modal__icon { width: 66px; height: 66px; margin: 0 auto 1rem; border-radius: 50%; background: var(--green-100); color: var(--green-600); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; }
.modal__title { margin: 0 0 .4rem; }
.modal__text { color: #46544b; margin: 0 0 1.5rem; font-size: 1.05rem; }

/* --- Hero --- */
.hero {
    background: linear-gradient(160deg, var(--green-100), var(--sand));
    padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.hero__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: center; }
.hero__eyebrow { display: inline-block; font-weight: 700; color: var(--green-700); letter-spacing: .03em; margin-bottom: .6rem; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.hero__lead { font-size: 1.15rem; color: #3c4a40; max-width: 38ch; }
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.4rem 0; }
.hero__usps { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; color: var(--green-900); font-weight: 600; }
.hero__card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.hero__card-title { font-weight: 800; color: var(--green-900); margin-bottom: 1rem; }
.mini-agenda { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .7rem; }
.mini-agenda li { display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem; align-items: center; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.mini-agenda__dot { width: 10px; height: 10px; border-radius: 50%; grid-row: span 2; }
.mini-agenda__when { font-size: .8rem; color: var(--muted); font-weight: 700; }
.mini-agenda__title { font-weight: 700; }
.hero__card-link { font-weight: 700; }

/* --- Sections --- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--alt { background: var(--sand); }
.section__head { text-align: center; max-width: 600px; margin: 0 auto 2.2rem; }
.section__head--left { text-align: left; margin-left: 0; }
.section__head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* --- Lesson cards --- */
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.lesson-card {
    background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
    border-top: 5px solid var(--accent, var(--green-600)); display: flex; flex-direction: column; gap: .6rem;
}
.lesson-card__title { margin: 0; }
.lesson-card__desc { color: #46544b; margin: .2rem 0; }
.lesson-card__meta { list-style: none; padding: 0; margin: .2rem 0 1rem; display: grid; gap: .3rem; color: var(--muted); font-weight: 600; }
.lesson-card .btn { margin-top: auto; align-self: flex-start; }
.badge { align-self: flex-start; background: var(--green-100); color: var(--green-700); font-weight: 700; font-size: .78rem; padding: .2em .7em; border-radius: 999px; }

/* --- Agenda (boekingskalender) --- */
.agenda { display: grid; gap: .8rem; max-width: 860px; margin: 0 auto; }
.agenda-day {
    display: grid; grid-template-columns: 88px 1fr; gap: 1rem; background: #fff;
    border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.agenda-day__date {
    background: var(--green-700); color: #fff; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 1rem .5rem; text-align: center;
}
.agenda-day__weekday { font-size: .8rem; font-weight: 700; opacity: .85; }
.agenda-day__num { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.agenda-day__month { font-size: .75rem; font-weight: 700; opacity: .85; }
.agenda-day__slots { display: grid; gap: .5rem; padding: .9rem 1rem; }
.slot {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .3rem 1rem;
    padding: .6rem .8rem; border-radius: 10px; background: var(--sand);
    border-left: 5px solid var(--accent, var(--green-600));
}
.slot__time { font-weight: 800; color: var(--green-900); font-variant-numeric: tabular-nums; }
.slot__title { font-weight: 700; }
.slot__loc { grid-column: 2; font-size: .82rem; color: var(--muted); }
.slot__cta { grid-row: span 2; grid-column: 3; font-weight: 700; padding: .4em .9em; border: 2px solid var(--green-600); border-radius: 999px; color: var(--green-700); }
.slot__cta:hover { background: var(--green-100); text-decoration: none; }

/* --- Forms --- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.form { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; font-size: .92rem; }
.field--check label { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.field input, .field select, .field textarea {
    font: inherit; padding: .65rem .8rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); }
.form__note { font-size: .82rem; color: var(--muted); margin: 0; }
.form--flash { animation: flashring .9s ease; }
@keyframes flashring { 0%,100% { box-shadow: var(--shadow); } 30% { box-shadow: 0 0 0 4px var(--green-500); } }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.auth-card { max-width: 480px; margin: 0 auto; }
.auth-card__alt { text-align: center; margin: 1rem 0 0; color: var(--muted); }

.site-footer { background: var(--green-900); color: #cfe0d4; padding: 2rem 0; margin-top: 2rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.site-footer a { color: #fff; margin-right: 1rem; }
.site-footer__copy { color: #9fb6a6; font-size: .9rem; }

.error-code { font-size: 4rem; color: var(--green-600); margin: 0; }

/* --- Strippenkaart --- */
.balance-box {
    display: flex; flex-direction: column; gap: .2rem; background: linear-gradient(135deg, var(--green-600), var(--green-700));
    color: #fff; border-radius: 14px; padding: 1.2rem 1.4rem; margin: .4rem 0 1rem; max-width: 320px;
}
.balance-box.is-negative { background: linear-gradient(135deg, #c0653b, #9c2b2b); }
.balance-box__label { font-size: .85rem; font-weight: 700; opacity: .9; text-transform: uppercase; letter-spacing: .04em; }
.balance-box__value { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.balance-box__value span { font-size: 1rem; font-weight: 700; opacity: .9; }
.subtle-head { font-size: 1rem; color: var(--muted); margin: 1.2rem 0 .5rem; }

/* --- Ledendashboard --- */
.my-lessons { display: grid; gap: .7rem; }
.my-lesson {
    display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 1rem;
    background: var(--sand); border-radius: 12px; padding: .8rem 1rem; border-left: 5px solid var(--green-600);
}
.my-lesson.is-absent { border-left-color: #c9a23a; opacity: .85; }
.my-lesson__date { background: var(--green-700); color: #fff; border-radius: 10px; padding: .5rem; text-align: center; display: flex; flex-direction: column; }
.my-lesson.is-absent .my-lesson__date { background: #b08a2c; }
.my-lesson__num { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.my-lesson__mon { font-size: .72rem; font-weight: 700; opacity: .9; }
.my-lesson__info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.my-lesson__action { display: flex; align-items: center; }
.tag-absent { align-self: flex-start; margin-top: .2rem; background: #fbf1d6; color: #8a6a16; font-weight: 700; font-size: .8rem; padding: .15em .7em; border-radius: 999px; }

.afmeld summary { list-style: none; cursor: pointer; }
.afmeld summary::-webkit-details-marker { display: none; }
.afmeld[open] summary { margin-bottom: .5rem; }
.afmeld__form { display: flex; flex-direction: column; gap: .4rem; min-width: 230px; }
.afmeld__form input { font: inherit; padding: .5rem .7rem; border: 1.5px solid var(--line); border-radius: 8px; }

.enroll-list { display: grid; gap: .5rem; }
.enroll-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .7rem .9rem; background: var(--sand); border-radius: 10px; }
.panel + .panel { margin-top: 1.4rem; }
.section .panel { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }

/* =================== ADMIN =================== */
.admin { background: var(--sand); }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--green-900); color: #d8e6dd; display: flex; flex-direction: column; padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh; }
.brand--admin { color: #fff; margin-bottom: 1.8rem; padding-left: .4rem; }
.brand--admin .brand__name { color: #fff; }
.admin-menu { display: grid; gap: .3rem; }
.admin-menu a { color: #cfe0d4; padding: .7rem .9rem; border-radius: 10px; font-weight: 700; }
.admin-menu a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.admin-menu a.active { background: var(--green-600); color: #fff; }
.admin-sidebar__foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.admin-sidebar__foot .btn--link { color: #fff; text-align: left; padding-left: 0; }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 2rem; background: #fff; border-bottom: 1px solid var(--line); }
.admin-topbar h1 { margin: 0; font-size: 1.4rem; }
.admin-content { padding: 1.8rem 2rem; display: grid; gap: 1.4rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat { background: #fff; border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); display: grid; gap: .2rem; }
.stat--accent { background: var(--green-700); color: #fff; }
.stat--accent .stat__label, .stat--accent .stat__link { color: #e5f1e9; }
.stat__num { font-size: 2.2rem; font-weight: 800; color: var(--green-900); }
.stat--accent .stat__num { color: #fff; }
.stat__label { color: var(--muted); font-weight: 700; }
.stat__link { font-size: .85rem; font-weight: 700; margin-top: .3rem; }

.panel { background: #fff; border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.panel__head h2 { margin: 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tr.is-past { opacity: .5; }
.row-actions { display: flex; gap: .3rem; align-items: center; white-space: nowrap; }
.cell-message { max-width: 240px; font-size: .9rem; }

.pill { display: inline-block; padding: .2em .7em; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.pill--new { background: #e7eefb; color: #2a4fa0; }
.pill--contacted { background: #fff1da; color: #9a6a16; }
.pill--converted { background: #e4f4e9; color: #1f6b3a; }
.pill--closed { background: #ececec; color: #666; }

.filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { padding: .35em .9em; border-radius: 999px; background: var(--green-100); color: var(--green-700); font-weight: 700; font-size: .85rem; }
.chip--on { background: var(--green-600); color: #fff; }
.chip:hover { text-decoration: none; }

.select-inline { font: inherit; padding: .3em .5em; border-radius: 8px; border: 1.5px solid var(--line); font-weight: 700; }
.abs-detail summary { cursor: pointer; }
.abs-detail ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .88rem; color: var(--ink); }
.abs-detail li { margin-bottom: .2rem; }
.schedule-list { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .5rem; }
.schedule-list li { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .6rem .8rem; background: var(--sand); border-radius: 10px; }
.schedule-list li > span:first-child { margin-right: auto; }
.form--compact, .form--admin { gap: .8rem; }

/* --- Responsive --- */
/* Publieke header / ledendashboard: nav inklappen onder hamburger. */
@media (max-width: 760px) {
    .site-header__inner { flex-wrap: wrap; }
    .nav-burger { display: flex; }
    .site-nav {
        display: none; width: 100%; flex-direction: column; align-items: stretch;
        gap: .35rem; padding: .5rem 0 .2rem; margin-top: .5rem; border-top: 1px solid var(--line);
    }
    #nav-toggle:checked ~ .site-nav { display: flex; }
    .site-nav a, .site-nav .btn { width: 100%; text-align: center; }
    .site-nav .inline-form, .site-nav .inline-form .btn { width: 100%; }
    #nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    #nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
    #nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; }
    .cols { grid-template-columns: 1fr; }

    /* Admin: sidebar wordt een topbalk met hamburger. */
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .7rem 1rem; }
    .brand--admin { margin-bottom: 0; }
    .nav-burger { display: flex; }
    .admin-menu { display: none; width: 100%; grid-auto-flow: row; margin-top: .6rem; }
    .admin-sidebar__foot {
        display: none; width: 100%; margin: .4rem 0 0; padding-top: .6rem;
        border-top: 1px solid rgba(255, 255, 255, .12); flex-direction: row; align-items: center; justify-content: space-between;
    }
    #admin-toggle:checked ~ .admin-menu { display: grid; }
    #admin-toggle:checked ~ .admin-sidebar__foot { display: flex; }
    #admin-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    #admin-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
    #admin-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .slot { grid-template-columns: 1fr auto; }
    .slot__cta { grid-row: span 2; }
    .my-lesson { grid-template-columns: 56px 1fr; }
    .my-lesson__action { grid-column: 2; }
    .afmeld__form { min-width: 0; }
}
