* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f7f4ee;
    color: #241f1a;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Zijbalk */
.sidebar {
    width: 240px;
    background: #241f1a;
    border-right: 1px solid #241f1a;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
}

.sidebar-nav {
    padding: 12px 8px;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 2px;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-item.active {
    background: #fff;
    color: #241f1a;
}

.nav-item svg {
    flex-shrink: 0;
}

/* Hoofdinhoud */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: #f7f4ee;
}

.view {
    display: none;
    padding: 32px;
    max-width: 1600px;
}

.view.active {
    display: block;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.view-header h2 {
    margin: 0 0 4px;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.view-subtitle {
    margin: 0;
    color: #6b6456;
    font-size: 14px;
}

.view-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: #241f1a;
    color: #fff;
}

.btn-primary:hover {
    background: #3a332c;
}

.btn-secondary {
    background: #fff;
    color: #241f1a;
    border: 1px solid #e8e4dc;
}

.btn-secondary:hover {
    background: #f7f4ee;
}

/* Inputs */
.search-input,
.date-input,
.filter-select {
    padding: 10px 14px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #241f1a;
    outline: none;
    transition: border-color 0.15s;
}

.search-input {
    min-width: 240px;
}

.search-input:focus,
.date-input:focus,
.filter-select:focus {
    border-color: #241f1a;
}

/* Tabellen */
.table-container {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e4dc;
    overflow: hidden;
}

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

.data-table thead {
    background: #fafaf8;
    border-bottom: 1px solid #e8e4dc;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: #6b6456;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0ede5;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #fafaf8;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-bevestigd {
    background: #e6f4ea;
    color: #1e7e34;
}

.status-afwachting {
    background: #fff3cd;
    color: #856404;
}

.status-afgerond {
    background: #e8e4dc;
    color: #6b6456;
}

.status-geannuleerd {
    background: #f8d7da;
    color: #721c24;
}

.status-betaald {
    background: #e6f4ea;
    color: #1e7e34;
}

.status-openstaand {
    background: #fff3cd;
    color: #856404;
}

/* Action buttons in table */
.table-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 10px;
    border: 1px solid #e8e4dc;
    background: none;
    border-radius: 4px;
    font-size: 13px;
    color: #6b6456;
    cursor: pointer;
    transition: all 0.15s;
}

.action-btn:hover {
    background: #f7f4ee;
    color: #241f1a;
    border-color: #241f1a;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 20px;
}

.stat-label {
    font-size: 13px;
    color: #6b6456;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.stat-change {
    font-size: 13px;
    color: #6b6456;
}

.stat-change.positive {
    color: #1e7e34;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(36, 31, 26, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(36, 31, 26, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e8e4dc;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b6456;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s;
}

.modal-close:hover {
    background: #f7f4ee;
    color: #241f1a;
}

.modal form {
    padding: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid #e8e4dc;
}

/* Form fields */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #241f1a;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #241f1a;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #241f1a;
}

.form-field textarea {
    resize: vertical;
}

/* Settings */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.settings-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 24px;
}

.settings-section h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
}

.openingstijden-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

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

.dag-row label {
    min-width: 100px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dag-row input[type="time"] {
    padding: 8px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.dag-row input[type="time"]:focus {
    border-color: #241f1a;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }

    .view {
        padding: 24px 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8e4dc;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .nav-item svg {
        display: none;
    }

    .view-header {
        flex-direction: column;
        gap: 16px;
    }

    .view-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
    }
}