:root {
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #dbe1ea;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --sidebar: #111827;
    --sidebar-hover: #1f2937;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
}

a {
    color: #1d4ed8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Hoofdlayout */

.app {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 230px;
    min-height: 100vh;
    background: var(--sidebar);
    color: #fff;
    padding: 18px 14px;
    flex-shrink: 0;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 22px;
    padding: 0 8px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar nav a {
    color: #d1d5db;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.sidebar nav a:hover {
    background: var(--sidebar-hover);
    color: #fff;
    text-decoration: none;
}

.sidebar nav a.active {
    background: var(--primary);
    color: #fff;
}

.main {
    flex: 1;
    min-width: 0;
    padding: 0 13px 24px;
}

.topbar {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar h1 {
    margin: 0;
    font-size: 24px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.page-actions {
    margin-bottom: 14px;
    display: flex;
    gap: 8px;
}

/* Formulieren */

.grid {
    display: grid;
    gap: 16px 18px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field label,
label {
    display: block;
    font-weight: 700;
    margin-bottom: 7px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 10px 11px;
    font-size: 14px;
    background: #fff;
    color: #000;
}

input[type="checkbox"] {
    width: auto;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Knoppen */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 0;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background: #2563eb;
}

.btn-danger {
    background: var(--danger);
}

/* Tabellen */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.table th {
    font-weight: 700;
    background: #f8fafc;
}

.table tbody td {
    padding-top: 18px;
    padding-bottom: 18px;
}

.table td form {
    margin: 0;
    display: flex;
    align-items: center;
}

.table td .btn {
    vertical-align: middle;
    margin-right: 4px;
}

/* Meldingen */

.alert {
    padding: 12px 14px;
    border-radius: 9px;
    margin-bottom: 14px;
    font-weight: 600;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Producten formulier */

.product-form {
    max-width: 1120px;
}

.product-active-row {
    margin-bottom: 26px;
}

.product-active-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.product-row {
    display: grid;
    gap: 16px 18px;
    align-items: end;
    margin-bottom: 16px;
}

.product-row-top {
    grid-template-columns: 140px 520px 120px 140px 120px;
}

.product-row-middle {
    grid-template-columns: 140px 180px 110px 110px;
}

.product-row-description {
    grid-template-columns: 660px;
}

.product-row-description textarea {
    min-height: 105px;
}

.product-form-actions {
    margin-top: 28px;
    display: flex;
    gap: 8px;
}

/* Login */

.login-page {
    background: #f3f4f6;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.login-card h1 {
    margin: 0 0 6px;
    font-size: 26px;
}

.login-card p {
    margin: 0 0 22px;
    color: var(--muted);
}

.login-card .field {
    margin-bottom: 14px;
}

.login-btn {
    width: 100%;
    margin-top: 6px;
}

.dashboard-welcome {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-welcome h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.dashboard-date {
    color: var(--muted);
    font-weight: 600;
}

.dashboard-clock {
    font-size: 24px;
    font-weight: 800;
}

.dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-tile {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
}

.dashboard-tile-label {
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-tile-value {
    font-size: 20px;
    font-weight: 800;
}

.dashboard-agenda h3 {
    margin: 0 0 14px;
}

@media (max-width: 900px) {
    .dashboard-welcome {
        display: block;
    }

    .dashboard-clock {
        margin-top: 12px;
    }

    .dashboard-tiles {
        grid-template-columns: 1fr;
    }
}

/* Mobiel */

@media (max-width: 900px) {
    .app {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .main {
        padding: 0 10px 20px;
    }

    .topbar {
        height: auto;
        padding: 14px 0;
        align-items: flex-start;
        gap: 8px;
        flex-direction: column;
    }

    .grid-2,
    .product-row,
    .product-row-top,
    .product-row-middle,
    .product-row-description,
    .dashboard-tiles {
        grid-template-columns: 1fr;
    }

    .product-form {
        max-width: none;
    }
}

