:root {
    --primary-blue: #142c4c;       /* Diep marineblauw */
    --accent-orange: #b86d29;      /* Goud/oranje van de salon */
    --accent-orange-hover: #96541e;
    --light-bg: #f4f6f9;
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    min-height: 100vh;
}

/* --- INLOGSCHERM --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--light-bg);
    padding: 20px;
}

.auth-box {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(20, 44, 76, 0.1);
    width: 100%;
    max-width: 420px;
}

.auth-box h2 {
    color: var(--primary-blue);
    font-size: 22px;
    margin-bottom: 24px;
    font-weight: 600;
}

/* --- FORMULIEREN --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background-color: var(--white);
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--accent-orange);
}

/* --- FULL-WIDTH NAVIGATIEBALK (DIEPBLAUW) --- */
.dashboard-container-full {
    width: 100%;
}

.main-nav-blue {
    width: 100%;
    background-color: var(--primary-blue) !important;
    padding: 15px 0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 40px !important;
}

.nav-inside {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo-white {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.nav-logo-white span {
    color: var(--accent-orange);
    font-weight: 400;
    margin-left: 5px;
}

.nav-menu-wrapper {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link-white {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s;
}

/* Tekstkleur bij eroverheen bewegen (blijft licht wit, geen oranje streep) */
.nav-link-white:hover {
    color: var(--white) !important;
}

/* Alleen het ACTIEVE tabblad krijgt de witte kleur en de oranje onderstreep */
.nav-link-white.active {
    color: var(--white) !important;
}

.nav-link-white.active::after {
    content: '';
    position: absolute;
    bottom: -15px; /* Schuift de streep strak naar de onderkant van de diepblauwe balk */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-orange) !important;
    border-radius: 2px;
}


/* Speciale subtiele styling voor de Beheerknop */
.nav-link-white.nav-admin-badge {
    background-color: rgba(184, 109, 41, 0.2);
    color: var(--accent-orange) !important;
    padding: 6px 12px !important;
    border-radius: 4px;
}
.nav-link-white.nav-admin-badge:hover {
    background-color: rgba(184, 109, 41, 0.4);
    color: var(--white) !important;
}
.nav-link-white.nav-admin-badge.active::after {
    display: none; /* Geen streep onder de beheer badge */
}

.nav-user-white {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    color: var(--white);
}

.menu-toggle {
    display: none; /* Standaard onzichtbaar op desktop */
    font-size: 24px;
    color: var(--white);
    cursor: pointer;
}

/* --- INTERN & KAARTEN --- */
.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    width: 100%;
}

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

.card-white {
    background: var(--white) !important;
    padding: 35px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(20, 44, 76, 0.05) !important;
}

.card-white h3 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 20px;
}

.card-blue {
    background-color: var(--primary-blue) !important;
    color: var(--white) !important;
    padding: 35px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(20, 44, 76, 0.1) !important;
}

.card-blue h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 20px;
}

.btn-primary {
    display: block;
    background-color: var(--accent-orange) !important;
    color: var(--white) !important;
    border: none !important;
    padding: 14px 20px !important;
    border-radius: 25px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--accent-orange-hover) !important;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #cbd5e1;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    transition: all 0.2s;
}
.btn-secondary:hover {
    background-color: #cbd5e1;
}

.btn-logout-white {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--white);
    transition: all 0.2s;
}

.btn-logout-white:hover {
    background-color: #ef4444;
    border-color: #ef4444;
}

.full-width { width: 100%; }
.toggle-text { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-light); }
.toggle-text a { color: var(--accent-orange); text-decoration: none; font-weight: 600; }

/* --- 100% MOBIELE COMPATIBILITEIT (RESPONSIVE DESIGN) --- */
@media (max-width: 850px) {
    .menu-toggle {
        display: block; /* Toon hamburger icoon */
    }
    
    .nav-menu-wrapper {
        display: none; /* Verberg menu standaard op mobiel */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: var(--primary-blue);
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-menu-wrapper.mobile-open {
        display: flex; /* Open menu bij klik */
    }
    
    .nav-link-white {
        width: 100%;
        text-align: center;
        padding: 12px 0;
    }
    
    .nav-link-white.active::after {
        bottom: 2px;
    }

    .nav-user-white {
        display: none; /* Verberg gebruikersnaam rechts op mobiel voor ruimte */
    }
}

/* --- FAILSAFES --- */
body:not(.logged-in) #main-app { display: none !important; }
body.logged-in #auth-screen { display: none !important; }
body.logged-in #main-app { display: block !important; }

/* --- LUXE iOS AGENDA STYLING --- */
.agenda-header-ios {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* De strakke Apple-stijl weergaveknop */
.agenda-modes-ios {
    display: flex;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 8px;
}

.ios-toggle-btn {
    background: transparent;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.ios-toggle-btn.active {
    background: var(--white);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* OPTIE 1: Verticale Tijdlijn Styling */
.timeline-ios {
    display: flex;
    flex-direction: column;
    position: relative;
    border-left: 1px solid #e2e8f0;
    margin-left: 60px;
    padding-left: 15px;
}

.timeline-hour-row {
    display: flex;
    align-items: center; /* Centreert de tekst en blokken netjes verticaal */
    height: 32px; /* Super slank gemaakt voor de kwartieren */
    border-bottom: 1px dashed #e2e8f0;
    position: relative;
}

.timeline-hour-row {
    display: flex;
    align-items: center;
    height: 45px; /* Perfecte, rustige hoogte voor de halfuurs-labels */
    border-bottom: 1px dashed #e2e8f0;
    position: relative;
}

.ios-appointment-block {
    background-color: rgba(184, 109, 41, 0.12);
    border-left: 4px solid var(--accent-orange);
    padding: 6px 12px; /* Weer iets ruimer voor een luxe uitstraling */
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: var(--primary-blue);
    width: 100%;
    margin-top: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* Het zwevende gekleurde afspraakblok in de tijdlijn */
.ios-appointment-block {
    background-color: rgba(184, 109, 41, 0.12); /* Zachte oranje gloed */
    border-left: 4px solid var(--accent-orange);
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: var(--primary-blue);
    width: 100%;
    margin-top: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* OPTIE 2: Lijstweergave Styling */
.ios-list-day-group {
    margin-bottom: 25px;
}

.ios-list-day-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-blue);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.ios-list-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.ios-list-time {
    width: 90px;
    font-weight: 700;
    color: var(--accent-orange);
    font-size: 14px;
}

.ios-list-info {
    flex: 1;
    font-size: 14px;
}
/* --- LUXE MODAL / POP-UP STYLING (MAXIMALE PRIORITEIT) --- */
.ios-modal-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(20, 44, 76, 0.4); 
    backdrop-filter: blur(4px); 
    display: flex; 
    justify-content: center; 
    align-items: center;
    z-index: 999999 !important; /* Dwingt de pop-up absoluut naar de voorgrond */
}

.ios-modal-box {
    background: var(--white);
    width: 100%; 
    max-width: 500px;
    padding: 30px; 
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    animation: popupAnim 0.25s ease-out;
    z-index: 1000000 !important;
}

/* Zorgt dat alle knoppen in de pop-up gegarandeerd reageren op de muis */
.ios-modal-body button {
    position: relative;
    z-index: 1000001 !important;
    cursor: pointer !important;
}

.ios-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #e2e8f0; padding-bottom: 12px; margin-bottom: 20px;
}

.ios-modal-header h3 { color: var(--primary-blue); font-size: 18px; }
.ios-modal-close { font-size: 24px; color: var(--text-light); cursor: pointer; font-weight: bold; }
.ios-modal-close:hover { color: #ef4444; }
.ios-modal-body p { margin-bottom: 12px; font-size: 15px; color: var(--text-dark); }
.ios-modal-body strong { color: var(--primary-blue); }

@keyframes popupAnim {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Zorgt dat afspraken in de tijdlijn klikbaar zijn */
.ios-appointment-block {
    cursor: pointer !important;
    transition: transform 0.1s, background-color 0.2s !important;
}
.ios-appointment-block:hover {
    background-color: rgba(184, 109, 41, 0.2) !important;
    transform: translateY(-1px);
}
/* Zorgt dat de agenda containers netjes openvouwen en zichtbaar worden */
.agenda-view-container {
    display: block;
    width: 100%;
    margin-top: 10px;
    min-height: 400px; /* Geeft de tijdlijn direct een mooie, vaste hoogte */
}
/* Dwingt het nieuwe Klantdossier tabblad om visueel open te vouwen */
#sec-dossier {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

/* Zorgt dat wanneer JS de display op block zet, de CSS direct gehoorzaamt */
#sec-dossier[style*="display: block"] {
    display: block !important;
}

/* --- WEEKWEERGAVE GRID STYLING --- */
.ios-week-grid-container {
    min-width: 650px; /* Zorgt dat kolommen op mobiel niet in elkaar gedrukt worden */
    margin-top: 10px;
}

.ios-week-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.ios-week-table th {
    background: #f8fafc;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 13px;
    padding: 10px 5px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.ios-week-table td {
    height: 50px; /* Hoogte per half uur in de weekweergave */
    border: 1px solid #e2e8f0;
    vertical-align: top;
    padding: 2px;
    position: relative;
    background: #fff;
}

/* Tijd-kolom links */
.ios-week-time-cell {
    text-align: center;
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
    background: #f8fafc !important;
    vertical-align: middle !important;
}

/* Compacte afspraakblokken in de weekkolom */
.ios-week-appointment-block {
    background: rgba(184, 109, 41, 0.12);
    border-left: 3px solid var(--accent-orange);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 11px;
    color: var(--primary-blue);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    height: calc(100% - 4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ios-week-appointment-block:hover {
    background: rgba(184, 109, 41, 0.2);
}
/* GARANTIE VOOR DE WEEKWEERGAVE RANDEN */
.ios-week-table, 
.ios-week-table tr, 
.ios-week-table th, 
.ios-week-table td {
    border: 1px solid #cbd5e1 !important; /* Dwingt een duidelijke, lichtgrijze rand af */
    border-collapse: collapse !important;
}

.ios-week-table td {
    height: 50px !important;
    min-height: 50px !important;
    background-color: #ffffff !important;
    padding: 4px !important;
    vertical-align: top !important;
}

/* Subtiele hover-kleur voor de lege klikbare vakken */
.ios-week-table td[onclick]:hover {
    background-color: #f1f5f9 !important;
}
