:root {
    --kleur-primair: #2f7a4f;
    --kleur-primair-donker: #235f3c;
    --kleur-gevaar: #b3402a;
    --kleur-tekst: #23281f;
    --kleur-hint: #6b7566;
    --kleur-rand: #dde3d8;
    --kleur-achtergrond: #f6f8f3;
    --kleur-kaart: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--kleur-achtergrond);
    color: var(--kleur-tekst);
}

a { color: var(--kleur-primair-donker); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.5rem;
    background: var(--kleur-primair);
    color: white;
}
.topbar .logo { color: white; font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 1.1rem; }
.topbar nav a { color: white; opacity: 0.92; }
.topbar nav a:hover { opacity: 1; }
.ingelogd-als { opacity: 0.9; font-size: 0.92rem; }
.badge {
    background: rgba(255,255,255,0.25);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

main { max-width: 960px; margin: 0 auto; padding: 1.75rem 1.25rem 4rem; }

.flashes { margin-bottom: 1.2rem; }
.flash {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    background: #fff3cd;
    border: 1px solid #f0d999;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.flash-success { background: #e3f4e8; border-color: #b9e2c4; }
.flash-warning { background: #fdecea; border-color: #f3c2ba; }

.pagina-kop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

h1 { margin: 0 0 0.3rem; }

.kaarten-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.1rem;
}

.route-kaart {
    display: block;
    background: var(--kleur-kaart);
    border: 1px solid var(--kleur-rand);
    border-radius: 12px;
    padding: 1.1rem;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.route-kaart:hover {
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(35, 95, 60, 0.12);
    transform: translateY(-2px);
}
.route-kaart h2 { margin: 0 0 0.35rem; font-size: 1.15rem; }

.locatie { color: var(--kleur-hint); margin: 0.2rem 0; }
.beschrijving-kort { color: var(--kleur-tekst); opacity: 0.85; font-size: 0.92rem; }
.beschrijving { white-space: pre-line; line-height: 1.5; }

.route-stats { display: flex; gap: 1rem; margin: 0.4rem 0; font-size: 0.9rem; color: var(--kleur-primair-donker); }
.meta { color: var(--kleur-hint); font-size: 0.82rem; margin-top: 0.6rem; }
.hint { color: var(--kleur-hint); font-size: 0.9rem; }

.kaart { height: 420px; border-radius: 10px; margin: 1rem 0; border: 1px solid var(--kleur-rand); }

.fotos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.9rem;
    margin: 0.8rem 0 1.4rem;
}
.foto-item { background: var(--kleur-kaart); border: 1px solid var(--kleur-rand); border-radius: 10px; overflow: hidden; padding-bottom: 0.5rem; }
.foto-item img { width: 100%; height: 140px; object-fit: cover; display: block; }
.foto-item form { text-align: center; margin-top: 0.4rem; }

.foto-upload-form, .route-formulier, .auth-card {
    background: var(--kleur-kaart);
    border: 1px solid var(--kleur-rand);
    border-radius: 12px;
    padding: 1.3rem;
    max-width: 520px;
}
.foto-upload-form label, .route-formulier label, .auth-card label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.92rem;
}
.route-formulier input[type=text], .route-formulier textarea,
.auth-card input, .foto-upload-form input {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--kleur-rand);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}
.formulier-acties { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; }

button, .knop-primair, .knop-klein, .knop-google {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.92rem;
    cursor: pointer;
    font-family: inherit;
}
.knop-primair, button[type=submit] {
    background: var(--kleur-primair);
    color: white;
}
.knop-primair:hover, button[type=submit]:hover { background: var(--kleur-primair-donker); text-decoration: none; }
.knop-klein { background: #eef2ea; color: var(--kleur-tekst); padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.knop-klein:hover { background: #e0e8db; text-decoration: none; }
.knop-gevaar { background: #fbeae6; color: var(--kleur-gevaar); }
.knop-gevaar:hover { background: #f6d9d1; }
.knop-google {
    display: block;
    text-align: center;
    background: white;
    border: 1px solid var(--kleur-rand);
    color: var(--kleur-tekst);
}
.of-scheiding { text-align: center; color: var(--kleur-hint); margin: 0.9rem 0; font-size: 0.85rem; }
.auth-link { margin-top: 1rem; font-size: 0.9rem; }

.acties { display: flex; gap: 0.5rem; align-items: center; }

.tabel { width: 100%; border-collapse: collapse; background: var(--kleur-kaart); border: 1px solid var(--kleur-rand); border-radius: 10px; overflow: hidden; }
.tabel th, .tabel td { padding: 0.65rem 0.9rem; text-align: left; border-bottom: 1px solid var(--kleur-rand); font-size: 0.92rem; }
.tabel th { background: #eef2ea; }
.tabel .acties { display: flex; gap: 0.4rem; }

/* --- GPX later uploaden --- */
.optioneel { font-weight: 400; color: var(--kleur-hint); font-size: 0.85rem; }
.veld-hint { display: block; font-weight: 400; color: var(--kleur-hint); font-size: 0.82rem; margin-top: 0.3rem; }

.gpx-acties {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0.6rem 0 1rem;
    font-size: 0.9rem;
}

.gpx-leeg {
    background: var(--kleur-kaart);
    border: 1px dashed var(--kleur-rand);
    border-radius: 12px;
    padding: 1.2rem;
    margin: 1rem 0 1.5rem;
}
.gpx-leeg .hint { margin-top: 0; }

.gpx-upload-form {
    background: var(--kleur-kaart);
    border: 1px solid var(--kleur-rand);
    border-radius: 10px;
    padding: 1rem;
    max-width: 520px;
    margin-top: 0.8rem;
}
.gpx-leeg .gpx-upload-form { border: none; padding: 0.6rem 0 0; margin-top: 0; }
.gpx-upload-form label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.8rem; }
.gpx-upload-form input[type=file] {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.5rem;
    border: 1px solid var(--kleur-rand);
    border-radius: 8px;
    font-size: 0.9rem;
}

.badge-geen-gpx {
    background: #fdf1dd;
    color: #8a6218;
    border: 1px solid #f0ddb8;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
}
