/* static/style.css */

/* === BASIS INSTELLINGEN === */
*, *::before, *::after {
    box-sizing: border-box; 
}

:root {
    --bg-color: #0E1117;       
    --sidebar-color: #262730;  
    --card-color: #1E2129;     
    --text-color: #FAFAFA;     
    --secondary-text: #97989C; 
    --accent: #00CC96;         
    --red: #FF4B4B;            
    --blue: #29B5E8;           
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden; 
    font-family: "Source Sans Pro", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
}

/* --- SIDEBAR (Desktop) --- */
.sidebar {
    width: 380px; 
    background-color: var(--sidebar-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.1);
    overflow-y: auto;
    overflow-x: hidden; 
    flex-shrink: 0;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.menu-btn {
    display: none;
    position: absolute;
    top: 15px; left: 15px;
    z-index: 500;
    background: var(--card-color);
    border: 1px solid #444;
    color: white;
    font-size: 1.5rem;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 900;
}

/* Kalender aanpassingen */
.flatpickr-calendar.inline { 
    background: transparent !important; 
    box-shadow: none !important; 
    margin: 0 auto; 
    max-width: 100%; 
}

.sidebar h2 { font-size: 1.5rem; margin-top: 0; margin-bottom: 20px; font-weight: 600; }
.sidebar h3 { font-size: 0.9rem; color: var(--secondary-text); text-transform: uppercase; margin-top: 20px; margin-bottom: 10px; }
.nav-item { display: block; text-decoration: none; color: var(--text-color); padding: 10px 15px; margin-bottom: 5px; border-radius: 5px; transition: background 0.2s; font-size: 1rem; }
.nav-item:hover { background-color: rgba(255,255,255,0.1); }
.nav-item.active { background-color: rgba(100, 100, 100, 0.3); border-left: 4px solid var(--red); padding-left: 11px; }
.divider { border-top: 1px solid rgba(255,255,255,0.1); margin: 20px 0; }
.info-box { font-size: 0.9rem; color: var(--secondary-text); line-height: 1.6; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }

/* --- MAIN CONTENT --- */
.main { 
    flex-grow: 1; 
    padding: 2rem 3rem; 
    overflow-y: auto; 
    position: relative; 
    width: 100%; 
    max-width: 100vw; 
}
h1 { margin-top: 0; font-size: 2.2rem; font-weight: 700; margin-bottom: 30px; }

.metrics-row { display: flex; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.metric-card { flex: 1; min-width: 200px; background: var(--card-color); padding: 15px; border-radius: 8px; }
.metric-label { font-size: 0.9rem; color: var(--secondary-text); margin-bottom: 5px; }
.metric-val { font-size: 2.2rem; font-weight: 700; }
.metric-delta { font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; margin-top: 5px; font-weight: 500;}
.delta-bad { color: var(--red); }
.delta-good { color: var(--accent); }

h4 { margin-top: 30px; margin-bottom: 10px; color: var(--secondary-text); font-weight: 400; font-size: 1rem; }
.chart-container { width: 100%; height: 400px; margin-bottom: 20px; position: relative; }
.table-wrap { height: 400px; overflow-y: auto; border: 1px solid #444; border-radius: 4px; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; background: #1e1e1e; padding: 10px; text-align: left; color: var(--secondary-text); border-bottom: 1px solid #444; }
td { padding: 10px; border-bottom: 1px solid #333; font-size: 0.9rem; }

/* --- MOBIELE AANPASSINGEN --- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed; 
        top: 0; left: 0;
        height: 100%;
        width: 320px; 
        max-width: 85vw;
        padding: 2rem 0.5rem; 
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    }
    .sidebar.active { transform: translateX(0); }

    .menu-btn { display: block; } 
    
    .main {
        padding: 1.5rem 1rem;
        padding-top: 4rem; 
        width: 100vw;
    }

    h1 { font-size: 1.5rem; margin-bottom: 20px; }
    .metrics-row { gap: 1rem; }
    .metric-card { min-width: 100%; } 
    .chart-container { height: 300px; } 

    .table-wrap {
        overflow-x: hidden;
    }

    table {
        width: 100%;
        table-layout: fixed;
    }

    th:first-child, td:first-child {
        width: 18%;           /* Smalle kolom */
        font-size: 0.8rem;    /* Kleiner lettertype */
        text-align: left;
        color: #999;          /* Iets grijzer zodat het minder opvalt */
        white-space: nowrap;  /* Datum niet afbreken */
        padding: 8px 2px;
    }

    /* 2. De CIJFER kolommen (De rest) */
    th:not(:first-child), td:not(:first-child) {
        width: 16.4%;         /* De resterende 82% verdeeld over 5 kolommen */
        font-size: 0.85rem;   /* Groter en duidelijker lettertype */
        text-align: center;
        padding: 8px 2px;
    }
    
    /* Zorg dat de headers ook goed staan */
    th {
        font-size: 0.7rem !important; /* Headers mogen klein blijven */
        text-transform: uppercase;
    }
}