/* --- CENTRALE VARIABELEN (THEMA) --- */
:root {
    /* Lichte modus (Standaard) */
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --primary: #007bff;
    /* Het blauw */
    --primary-hover: #0056b3;
    --border: #e1e4e8;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Slimme Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #121212;
        --bg-card: #1e1e1e;
        --text-main: #e0e0e0;
        --text-muted: #a0a0a0;
        --primary: #4dabf7;
        /* Iets lichter blauw voor contrast */
        --primary-hover: #339af0;
        --border: #333333;
        --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
}

/* --- ALGEMENE OPMAAK --- */
body {
    font-family: var(--font-stack);
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    line-height: 1.6;
    transition: background-color 0.3s ease;
}

/* --- CONTAINER (KAART) --- */
.main-container {
    width: 100%;
    max-width: 600px;
    /* Mooi smal voor focus */
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* --- NAVIGATIE --- */
nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    /* Pill shape */
    transition: all 0.2s ease;
}

nav a:hover,
nav a.active {
    background-color: var(--primary);
    color: white;
}

/* --- KOPJES & TEKST --- */
h2 {
    text-align: center;
    margin-top: 0;
    color: var(--text-main);
}

/* --- FORMULIEREN --- */
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input,
select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--bg-body);
    /* Iets afwijkend van kaart */
    color: var(--text-main);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Readonly veld (tijd) */
input[readonly] {
    background-color: transparent;
    border-color: transparent;
    font-weight: bold;
    color: var(--primary);
    padding-left: 0;
}

/* --- KNOPPEN --- */
button.primary {
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

button.primary:hover {
    background-color: var(--primary-hover);
}

/* --- MELDINGEN --- */
.alert {
    padding: 12px;
    border-radius: 8px;
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* --- TABEL (LOGBOEK) --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    text-align: left;
    padding: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

/* --- RESPONSIVE / MOBIEL --- */
@media (max-width: 600px) {

    /* Maak van tabelrijen 'kaartjes' op mobiel */
    thead {
        display: none;
    }

    tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 10px;
        background: var(--bg-body);
    }

    td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid var(--border);
        font-size: 0.95rem;
    }

    td:last-child {
        border-bottom: none;
    }

    /* Gebruik data-label voor de titels links */
    td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--text-muted);
        margin-right: 10px;
    }
}