/* -----------------------------------------
   ALGEMENE LAYOUT
------------------------------------------ */
:root {
    --bg: #f0f2f5;
    --text: #222;
    --card-bg: #fff;
    --border: #ddd;
    --primary: #0078d4;
    --danger: #c62828;
}

[data-theme="dark"] {
    --bg: #1e1e1e;
    --text: #e0e0e0;
    --card-bg: #2b2b2b;
    --border: #444;
    --primary: #4aa3ff;
    --danger: #ff6b6b;
}

.header-toggle {
    text-align: right;
    margin-bottom: 15px;
}

.toggle-btn {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.toggle-btn:hover {
    opacity: 0.8;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 30px;
}

.container {
    max-width: 1200px;
    margin: auto;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

h1 {
    margin-top: 0;
    font-size: 28px;
    color: var(--text);
}

p {
    font-size: 14px;
    color: var(--text);
}

/* -----------------------------------------
   FORMULIEREN
------------------------------------------ */
form {
    margin-bottom: 20px;
}

label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
    color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    background: var(--card-bg);
    color: var(--text);
}

button,
.btn {
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    text-align: center;
}

button:hover,
.btn:hover {
    opacity: 0.9;
}

.btn-danger {
    background: var(--danger);
}

/* -----------------------------------------
   TABEL
------------------------------------------ */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 15px;
    background: var(--card-bg);
    color: var(--text);
}

th {
    background: var(--primary);
    color: white;
    padding: 12px;
    text-align: left;
}

td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    color: var(--text);
}

/* Kolombreedtes */
table th:nth-child(1) { width: 40px; }
table th:nth-child(2) { width: 180px; }
table th:nth-child(3) { width: 200px; }
table th:nth-child(4) { width: 100px; }
table th:nth-child(5) { width: 140px; }
table th:nth-child(6) { width: 120px; }
table th:nth-child(7) { width: 220px; }
table th:nth-child(8) { width: 150px; }
table th:nth-child(9) { width: 150px; }

/* -----------------------------------------
   PRINT- EN ACTIEKNOPPEN
------------------------------------------ */
.print-col,
.action-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.print-col button,
.action-col a {
    width: 100%;
}

/* Printblok en actieblok naast elkaar */
.action-print-wrapper {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.action-print-wrapper > div {
    min-width: 90px;
}

/* -----------------------------------------
   MELDINGEN
------------------------------------------ */
.message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.success {
    background: #d4edda;
    color: #155724;
}

.error {
    background: #f8d7da;
    color: #721c24;
}

/* -----------------------------------------
   PRINT CSS
------------------------------------------ */
@media print {
    body * {
        visibility: hidden;
    }
    .print-area, .print-area * {
        visibility: visible;
    }
    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        padding: 20px;
        font-size: 18px;
    }
}

/* -----------------------------------------
   RESPONSIVE TABEL OP MOBIEL
------------------------------------------ */
@media screen and (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .print-col button,
    .action-col a {
        font-size: 13px;
        padding: 8px;
    }

    th, td {
        font-size: 14px;
    }
}
