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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: 1.3em;
    margin-bottom: 5px;
}

.error {
    color: red;
    margin: 10px 0;
}


.controls input {
    padding: 5px;
    margin-right: 10px;
    width: 300px;
}

.controls button, .controls select {
    padding: 5px 10px;
    margin-right: 10px;
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background: #e0e0e0;
}

.sort-icon {
    font-size: 12px;
    margin-left: 5px;
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 20px;
    z-index: 100;
    border-bottom: 1px solid #ddd;
}

.timestamp {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
}

.controls {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 20px;
    z-index: 99;
    border-bottom: 1px solid #ddd;
}

.stats {
    position: fixed;
    top: 130px;
    left: 0;
    right: 0;
    padding: 5px 20px;
    background: #f5f5f5;
    font-size: 11px;
    z-index: 98;
    border-bottom: 1px solid #ddd;
    max-height: 80px;
    overflow-y: auto;
}

.table-wrapper {
    position: fixed;
    top: 180px;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
}

.table-container {
    height: 100%;
    overflow: auto;
    position: relative;
}

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

th, td {
    text-align: left;
    padding: 4px;
    border: 1px solid #ddd;
}

/* Eerste kolom sticky */
td:first-child, th:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background: #f5f5f5;
    border-right: 2px solid #ccc;
}

th:first-child {
    z-index: 11;
    background: #e0e0e0;
}

thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

th {
    background: #f0f0f0;
    font-weight: normal;
    position: sticky;
    top: 0;
    border-top: none;
}

tr:nth-child(even) {
    background: #fafafa;
}

a {
    color: blue;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
}

.modal-table td {
    padding: 5px;
    vertical-align: top;
}

.modal-table hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 10px 0;
}

/* Responsive - nog kleinere schermen */
@media (max-width: 768px) {
    .fixed-header {
        padding: 10px;
    }
    
    .controls {
        padding: 10px;
    }
    
    .stats {
        padding: 10px;
    }
    
    .table-wrapper {
        padding: 0;
    }
    
    th, td {
        padding: 4px;
        font-size: 11px;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
}