@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;500;600&family=Syne:wght@500;700;800&display=swap');

:root {
    --color-bg-base: #f7f7f5;
    --color-surface: #ffffff;
    --color-text-main: #0a0a0a;
    --color-text-muted: #555555;
    --color-border: #e2e2e2;
    --color-black-accent: #000000;
    --color-danger: #c01a1a;
    --color-success: #15662a;

    --font-heading: 'Syne', sans-serif;
    --font-body: 'Epilogue', sans-serif;

    --sidebar-width: 280px;
    --radius-sm: 2px;
    --radius-md: 6px;
    --radius-lg: 12px;
    
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
    background-size: 24px 24px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-black-accent);
    color: var(--color-surface);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 0;
    z-index: 100;
    border-right: 1px solid #1a1a1a;
    transition: transform 0.3s ease;
}

/* AANGEPAST: Perfecte centrering op desktop zonder storende padding */
.sidebar-logo {
    width: 100%;
    padding: 0; 
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
}

.sidebar-logo img {
    max-width: 70%;
    height: auto;
    margin: 0 auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-links a {
    text-decoration: none;
    color: #a0a0a0;
    font-weight: 500;
    padding: 12px 30px;
    display: block;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 3px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--color-surface);
    background-color: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--color-surface);
}

.nav-bottom {
    margin-top: auto;
    padding: 0 30px;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 50px 60px;
    max-width: 1400px;
}

.page-header {
    margin-bottom: 40px;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-header h2 {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--color-border);
    margin-bottom: 30px;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: flex;
    flex-direction: column;
}

.card h3 { margin-bottom: 10px; }
.card p { color: var(--color-text-muted); font-size: 0.95rem; flex-grow: 1; }

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

a.clickable-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-top: 4px solid var(--color-border);
}
a.clickable-card:hover {
    border-top-color: var(--color-black-accent);
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

tbody tr:nth-child(1) { animation-delay: 0.1s; }
tbody tr:nth-child(2) { animation-delay: 0.15s; }
tbody tr:nth-child(3) { animation-delay: 0.2s; }
tbody tr:nth-child(4) { animation-delay: 0.25s; }
tbody tr:nth-child(5) { animation-delay: 0.3s; }

.btn {
    background-color: var(--color-black-accent);
    color: var(--color-surface);
    border: 1px solid var(--color-black-accent);
    padding: 10px 24px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn:hover {
    background-color: transparent;
    color: var(--color-black-accent);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-black-accent);
    border: 1px solid var(--color-black-accent);
    padding: 10px 24px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-outline:hover {
    background-color: var(--color-black-accent);
    color: var(--color-surface);
}

.btn-mini {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-main);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-mini:hover {
    border-color: var(--color-black-accent);
    background: var(--color-bg-base);
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background-color: var(--color-surface);
    color: var(--color-text-main);
    transition: all 0.3s ease;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-black-accent);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--color-text-main);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
}

th {
    text-align: left;
    padding: 15px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-black-accent);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
    vertical-align: middle;
}

tbody tr {
    transition: background-color 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

tbody tr:hover {
    background-color: var(--color-bg-base);
}

.badge {
    padding: 4px 10px;
    background-color: #f0f0f0;
    color: var(--color-text-main);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
}

.flash-messages {
    margin-bottom: 30px;
}
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    font-weight: 500;
    border-left: 4px solid;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.alert.success {
    background-color: #f0fdf4;
    color: var(--color-success);
    border-left-color: var(--color-success);
}
.alert.error {
    background-color: #fef2f2;
    color: var(--color-danger);
    border-left-color: var(--color-danger);
}
.alert.info {
    background-color: #f8fafc;
    color: var(--color-text-main);
    border-left-color: var(--color-text-main);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   AANVULLENDE STYLES (Dashboard Slider & Export)
   ========================================================================== */

.chart-slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 400px;
}

.chart-slide {
    display: none;
    animation: slideFade 0.5s ease;
}

.chart-slide.active {
    display: block;
}

@keyframes slideFade {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.slider-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    height: 10px;
    width: 10px;
    background-color: var(--color-border);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
}

.dot.active {
    background-color: var(--color-black-accent);
}

.boekhouding-card {
    background-color: var(--color-black-accent);
    color: var(--color-surface);
    margin-bottom: 40px;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 25px 30px;
    border-radius: var(--radius-md);
}

.boekhouding-info h3 {
    color: var(--color-surface);
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.boekhouding-info p {
    color: #a0a0a0;
    margin: 0;
    font-size: 0.85rem;
}

.boekhouding-export form {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.export-options {
    display: flex;
    gap: 15px;
}

.custom-checkbox {
    color: #ccc;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.custom-checkbox input {
    accent-color: var(--color-surface);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.export-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 15px;
}

.minimal-select {
    background: transparent;
    color: white !important;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    padding: 0;
    width: auto;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-transform: uppercase;
    font-weight: 600;
}

.minimal-select option {
    background: var(--color-black-accent);
    color: white;
}

.btn-zip {
    background: white;
    color: black;
    border: none;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

.boekhouding-countdown {
    text-align: right;
}

.boekhouding-countdown p {
    margin: 0;
    font-size: 0.8rem;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-timer {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1;
    color: var(--color-surface);
    margin-top: 5px;
}

.countdown-timer small {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 400;
    color: #a0a0a0;
    text-transform: lowercase;
}

/* ==========================================================================
   MOBIELE WEERGAVE (Horizontaal, Geen Hamburger, Gecentreerd Logo)
   ========================================================================== */
@media (max-width: 1024px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        padding: 20px 0 0 0;
        border-right: none;
        border-bottom: 1px solid #1a1a1a;
    }

    .sidebar-logo {
        width: 100%;
        margin-bottom: 20px;
        padding: 0;
    }
    
    .sidebar-logo img {
        /* AANGEPAST: Gehalveerd en perfect gecentreerd op mobiel */
        max-width: 40% !important; 
        margin: 0 auto;
        display: block;
    }

    .nav-links {
        flex-direction: row;
        overflow-x: auto; 
        padding: 0 20px 10px 20px;
        white-space: nowrap; 
        -webkit-overflow-scrolling: touch;
        gap: 10px;
    }

    .nav-links a {
        display: inline-block;
        padding: 10px 15px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .nav-links a:hover, .nav-links a.active {
        border-left: none;
        border-bottom: 3px solid var(--color-surface);
    }

    .nav-bottom {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 15px;
        padding: 15px 20px;
        border-top: 1px solid #1a1a1a;
        margin-top: 0;
    }
    
    .nav-bottom div {
        margin-bottom: 0 !important;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .boekhouding-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
        gap: 25px;
    }
    
    .boekhouding-info h3 {
        justify-content: center;
    }
    
    .boekhouding-export form {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        width: 100%;
    }
    
    .export-actions {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.2);
        padding-left: 0;
        padding-top: 15px;
        width: 100%;
        justify-content: center;
    }
    
    .boekhouding-countdown {
        text-align: center;
    }
}