/* --- Dashboard layout --- */

.dashboard-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 10px 20px 20px 20px;
    box-sizing: border-box;
}

.dashboard-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #002B45;
}

/* --- KPI blokken --- */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.kpi-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 3px solid transparent;
    transition: border-color 0.25s ease;
}

.kpi-number {
    font-size: 56px;
    font-weight: bold;
    color: #002B45;
    line-height: 1;
    margin-bottom: 8px;
}

.kpi-label {
    font-size: 16px;
    color: #607080;
}

/* KPI randkleuren */
.kpi-red {
    border-color: #d9534f;
}

.kpi-blue {
    border-color: #0275d8;
}

.kpi-orange {
    border-color: #f0ad4e;
}

.kpi-green {
    border-color: #28a745;
}


/* --- Tabellen --- */

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    table-layout: fixed;
}

.dashboard-table th {
    background: #002B45;
    color: #ffffff;
    padding: 8px 10px;
    text-align: left;
    font-size: 12px;
    white-space: nowrap;
}

.dashboard-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eeeeee;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Transport kleuren */
.transport-weg {
    background: #007bff;
    color: white;
}

.transport-lucht {
    background: #17a2b8;
    color: white;
}

.transport-zee {
    background: #6f42c1;
    color: white;
}

/* --- Ritten containers --- */

.ritten-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-top: 10px;
}

#rittenGestart {
    flex: 0 0 auto;
}

/* --- Scrollsectie (onderste tabel) --- */

.ritten-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;

    /* GEEN padding-right → anders verschuiven kolommen */
    padding-right: 0;

    /* zelfde look als bovenste tabel */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

    display: block;
    position: relative;

    /* scrollbarbreedte blijft stabiel → perfecte uitlijning */
    scrollbar-gutter: stable;
}

/* Tabel binnen scrollbox */
.ritten-scroll table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 0;
    box-shadow: none;
    overflow: visible !important;
    display: table;
}

/* Sticky header */
.ritten-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #002B45;
}

/* Ronde hoeken in onderste header */
.ritten-scroll thead th:first-child {
    border-top-left-radius: 12px;
}

.ritten-scroll thead th:last-child {
    border-top-right-radius: 12px;
}

/* Scrollbar styling */
.ritten-scroll::-webkit-scrollbar {
    width: 10px;
    transition: width 0.3s ease;
}

.ritten-scroll::-webkit-scrollbar-thumb {
    background: #002B45;
    border-radius: 5px;
}

/* Scrollbar zichtbaar bij activiteit */
body.bars-visible .ritten-scroll::-webkit-scrollbar {
    width: 10px;
}

/* Scrollbar verbergen na 3 seconden */
body:not(.bars-visible) .ritten-scroll::-webkit-scrollbar {
    width: 0px;
}

/* --- Titelbalken --- */

.ritten-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 15px 0 6px 0;
    padding-left: 8px;
    border-left: 5px solid #007bff;
    color: #333;
}

.ritten-title-started {
    border-left-color: #28a745;
}