﻿*, *::before, *::after { box-sizing: border-box; }

html {
    overflow-x: hidden;
    max-width: 100%;
}

:root {
    --primair: #2d7a1e;
    --primair-donker: #1e5e12;
    --succes: #1a7a1a;
    --grijs-licht: #f5f5f5;
    --grijs: #ddd;
    --tekst: #222;
    --tekst-zacht: #666;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    color: var(--tekst);
    background: #f0f0f0;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

/* Header */
.site-header {
    background: var(--primair);
    color: white;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.site-header .header-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-header img.logo {
    height: 56px;
    width: auto;
}

.site-header .header-tekst h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.site-header .header-tekst p {
    margin: 2px 0 0;
    font-size: 13px;
    opacity: 0.85;
}

/* Nav (beheer) */
.beheer-nav {
    background: #1e5e12;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.beheer-nav .nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 4px;
}

.beheer-nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 10px 14px;
    font-size: 14px;
    display: inline-block;
    border-bottom: 3px solid transparent;
}

.beheer-nav a:hover,
.beheer-nav a.actief {
    color: white;
    border-bottom-color: white;
}

/* Container */
.container {
    max-width: 860px;
    margin: 30px auto;
    padding: 0 16px;
}

.container-breed {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 16px;
}

/* Kaart */
.kaart {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    padding: 28px 32px;
    margin-bottom: 24px;
}

.kaart-titel {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primair);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--grijs);
}

/* Formulier */
.form-groep {
    margin-bottom: 18px;
}

.form-groep label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
    color: #444;
}

.form-groep label .verplicht {
    color: var(--primair);
    margin-left: 2px;
}

.form-groep input[type="text"],
.form-groep input[type="email"],
.form-groep input[type="tel"],
.form-groep input[type="date"],
.form-groep input[type="time"],
.form-groep input[type="password"],
.form-groep select,
.form-groep textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    color: var(--tekst);
    background: white;
    transition: border-color 0.15s;
}

.form-groep input:focus,
.form-groep select:focus,
.form-groep textarea:focus {
    outline: none;
    border-color: var(--primair);
    box-shadow: 0 0 0 3px rgba(45,122,30,0.15);
}

.form-groep textarea {
    resize: vertical;
    min-height: 90px;
}

.form-rij {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-hint {
    font-size: 12px;
    color: var(--tekst-zacht);
    margin-top: 4px;
}

/* Radio groep */
.radio-groep {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 4px 0;
}

.radio-groep label {
    font-weight: normal !important;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Knoppen */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s, opacity 0.15s;
}

.btn-primair {
    background: var(--primair);
    color: white;
}

.btn-primair:hover { background: var(--primair-donker); }

.btn-succes {
    background: var(--succes);
    color: white;
}

.btn-succes:hover { background: #1e5e12; }

.btn-gevaar {
    background: #c0392b;
    color: white;
}

.btn-gevaar:hover { background: #a02020; }

.btn-secundair {
    background: #555;
    color: white;
}

.btn-secundair:hover { background: #333; }

.btn-licht {
    background: #eee;
    color: #333;
    border: 1px solid #ccc;
}

.btn-licht:hover { background: #ddd; }

.btn-klein {
    padding: 5px 12px;
    font-size: 13px;
}

/* Meldingen */
.melding {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 18px;
    font-size: 14px;
}

.melding-fout {
    background: #fde8e8;
    border: 1px solid #f5b7b7;
    color: #8b1a1a;
}

.melding-ok {
    background: #e6f4ea;
    border: 1px solid #a8d5b2;
    color: #1a5e2a;
}

.melding-info {
    background: #e8f0fe;
    border: 1px solid #b0c8f8;
    color: #1a3a6e;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-nieuw { background: #e3f0ff; color: #0057b3; }
.badge-goedgekeurd { background: #e6f4ea; color: #1a5e2a; }
.badge-afgewezen { background: #fde8e8; color: #8b1a1a; }
.badge-ingetrokken { background: #fff3e0; color: #b35900; }
.badge-wacht_akkoord_b { background: #fff8e1; color: #8a6000; }
.badge-definitief { background: #e6f4ea; color: #1a5e2a; }
.badge-geweigerd_door_b { background: #fde8e8; color: #8b1a1a; }

/* Tabel */
.tabel-wrapper {
    overflow-x: auto;
}

table.overzicht {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table.overzicht th {
    background: var(--grijs-licht);
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--grijs);
    white-space: nowrap;
    color: #444;
}

table.overzicht td {
    padding: 9px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

table.overzicht tr:hover td {
    background: #fafafa;
}

table.overzicht a {
    color: var(--primair);
    text-decoration: none;
    font-weight: 600;
}

table.overzicht a:hover { text-decoration: underline; }

/* Detail tabel */
table.detail {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table.detail td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

table.detail td:first-child {
    font-weight: 600;
    width: 35%;
    color: #555;
    white-space: nowrap;
}

/* Filters */
.filter-balk {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 20px;
}

.filter-balk .form-groep {
    margin: 0;
    min-width: 160px;
}

.filter-balk label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    display: block;
    margin-bottom: 4px;
}

.filter-balk select,
.filter-balk input {
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

/* Login pagina */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    padding: 20px;
}

.login-kaart {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo img {
    height: 72px;
}

.login-kaart h2 {
    margin: 0 0 24px;
    font-size: 20px;
    text-align: center;
    color: var(--primair);
}

/* Bevestigingspagina */
.bevestiging-icoon {
    font-size: 56px;
    text-align: center;
    margin: 8px 0 16px;
}

.bevestiging-nr {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--primair);
    letter-spacing: 1px;
    margin: 8px 0;
}

/* Actie rij */
.actie-rij {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Footer */
.site-footer {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 24px 16px 32px;
}

/* Responsive */
@media (max-width: 600px) {
    .form-rij { grid-template-columns: 1fr; }
    .kaart { padding: 18px 16px; }
    .filter-balk { flex-direction: column; }
    .filter-balk .form-groep { min-width: 100%; }
    .beheer-nav .nav-inner { flex-wrap: wrap; padding: 0 8px; }
    .beheer-nav a { padding: 8px 10px; font-size: 13px; }
}
