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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f7f7f7;
    color: #1a1a1a;
}

header {
    background: white;
    color: #1a1a1a;
    padding: 0.8rem 2rem;
    border-bottom: 3px solid #00b8d4;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.logo-link {
    flex-shrink: 0;
}

.logo {
    height: 40px;
}

header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
}

header .subtitle {
    font-size: 0.85rem;
    color: #636e72;
    margin-top: 0.15rem;
}

#app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Summary cards */
#summary-panel {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-card {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.summary-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3436;
}

.summary-label {
    font-size: 0.8rem;
    color: #636e72;
    margin-top: 0.2rem;
}

#total-card {
    border-left: 4px solid #00b8d4;
}

/* Filters */
#filter-panel {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #636e72;
    text-transform: uppercase;
}

.filter-group select,
.filter-group input {
    padding: 0.4rem 0.6rem;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    font-size: 0.85rem;
}

.filter-group input[type="number"] {
    width: 80px;
}

.filter-group select[multiple] {
    height: 80px;
    min-width: 180px;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    background: #00b8d4;
    color: white;
    font-weight: 500;
}

button:hover {
    opacity: 0.9;
}

#btn-reset-filters {
    background: #b2bec3;
}

#btn-export-csv {
    background: #1a1a1a;
}

/* Map */
#map {
    height: 500px;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Table */
#table-container {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#table-container h2 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

#table-count {
    font-weight: 400;
    color: #636e72;
    font-size: 0.9rem;
}

#table-wrapper {
    overflow-x: auto;
}

#data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

#data-table th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    background: #f5f6fa;
    border-bottom: 2px solid #dfe6e9;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

#data-table th:hover {
    background: #dfe6e9;
}

#data-table td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid #f0f0f0;
}

#data-table tbody tr:hover {
    background: #f0f7ff;
    cursor: pointer;
}

/* Pagination */
#pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #dfe6e9;
}

#pagination button {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}

#page-info {
    font-size: 0.85rem;
    color: #636e72;
}

/* Checkbox dropdown for gebruiksdoel */
.checkbox-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: white;
    color: #2d3436;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 400;
    min-width: 200px;
    text-align: left;
    cursor: pointer;
}

.dropdown-toggle:hover {
    background: #f5f6fa;
    opacity: 1;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    min-width: 220px;
    padding: 0.3rem 0;
}

.dropdown-content.open {
    display: block;
}

.dropdown-content label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 400;
    text-transform: none;
    color: #2d3436;
    cursor: pointer;
}

.dropdown-content label:hover {
    background: #f0f7ff;
}

.dropdown-content input[type="checkbox"] {
    accent-color: #00b8d4;
}

.dropdown-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-bottom: 1px solid #dfe6e9;
    margin-bottom: 0.2rem;
}

.dropdown-actions button {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    background: #dfe6e9;
    color: #2d3436;
}

/* Statistics panels */
#stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stats-panel {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stats-panel h3 {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    color: #2d3436;
}

.stat-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

.stat-bar-label {
    min-width: 140px;
    color: #636e72;
    text-align: right;
    flex-shrink: 0;
}

.stat-bar-track {
    flex: 1;
    height: 18px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: #00b8d4;
    border-radius: 3px;
    transition: width 0.3s;
}

.stat-bar-value {
    min-width: 50px;
    font-weight: 600;
    color: #2d3436;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item-label {
    color: #636e72;
}

.stat-item-value {
    font-weight: 600;
    color: #2d3436;
}

/* Zone colors in popups */
.zone-a { color: #0070ff; font-weight: 600; }
.zone-b { color: #38a800; font-weight: 600; }
.zone-kern { color: #e17055; font-weight: 600; }

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-size: 1.2rem;
    color: #636e72;
}

@media (max-width: 768px) {
    #summary-panel {
        flex-wrap: wrap;
    }
    .summary-card {
        flex: 1 1 45%;
    }
    #filter-panel {
        flex-direction: column;
        align-items: stretch;
    }
}
