* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f4f5f7;
    color: #1f2328;
    line-height: 1.5;
}

.topbar {
    background: #1f2937;
    color: #fff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar h1 {
    font-size: 18px;
    font-weight: 600;
}

.topbar nav a, .topbar .user-info a {
    color: #fff;
    text-decoration: none;
    margin-left: 16px;
    font-size: 14px;
    opacity: 0.9;
}

.topbar nav a:hover, .topbar .user-info a:hover {
    opacity: 1;
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
    padding: 20px;
    margin-bottom: 20px;
}

h2 {
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 600;
}

.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filters {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #444;
}

input, select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

textarea {
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #d0d7de;
    background: #f6f8fa;
    color: #1f2328;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: #eef0f3;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e1e4e8;
    vertical-align: top;
}

th {
    font-weight: 600;
    color: #57606a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tr:hover {
    background: #f9fafb;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-te_bestellen {
    background: #fef3c7;
    color: #92400e;
}

.badge-besteld {
    background: #dbeafe;
    color: #1e40af;
}

.badge-ontvangen {
    background: #d1fae5;
    color: #065f46;
}

.actions {
    display: flex;
    gap: 6px;
}

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-wrap {
    max-width: 400px;
    margin: 80px auto;
}

.login-wrap .card {
    margin-bottom: 0;
}

.login-wrap h2 {
    text-align: center;
}

.muted {
    color: #6b7280;
    font-size: 13px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-box {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat-box .num {
    font-size: 26px;
    font-weight: 700;
}

.stat-box .label {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

@media (max-width: 700px) {
    table thead {
        display: none;
    }
    table, tbody, tr, td {
        display: block;
        width: 100%;
    }
    tr {
        border: 1px solid #e1e4e8;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 8px;
    }
    td {
        border: none;
        padding: 4px 8px;
    }
    td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        color: #57606a;
        display: block;
    }
}
