/* --- HUISSTIJL CONFIGURATIE --- */
:root {
    --ns-dark: #0A2342;
    --ns-teal: #67B296;
    --ns-yellow: #E6D65C;
    --ns-alert: #e63946;
    --ns-bg: #F4F7FA;
    --ns-white: #FFFFFF;
    --ns-gradient: linear-gradient(135deg, #67B296 0%, #E6D65C 100%);
    --shadow: 0 10px 30px rgba(10, 35, 66, 0.08);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--ns-bg);
    color: var(--ns-dark);
    height: 100vh;
    overflow: hidden;
    display: flex; flex-direction: column;
}

/* --- HEADER --- */
header {
    height: 70px; background: var(--ns-white);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 30px; border-bottom: 1px solid #e2e8f0; z-index: 10;
}
.logo-img { height: 40px; }
.header-meta { font-size: 0.8rem; color: #8898aa; text-transform: uppercase; letter-spacing: 1px; }

/* --- LAYOUT --- */
.dashboard-container {
    display: flex; flex: 1; overflow: hidden;
}

/* --- SIDEBAR NAV --- */
.sidebar {
    width: 320px; background: var(--ns-dark); color: white;
    padding: 40px 30px; display: flex; flex-direction: column;
    box-shadow: 5px 0 20px rgba(0,0,0,0.1); z-index: 5;
    position: relative;
}
.sidebar::before {
    content: ''; position: absolute; top:0; left:0; width:100%; height: 6px; background: var(--ns-gradient);
}

.sidebar h1 { font-size: 1.8rem; line-height: 1.2; margin-bottom: 10px; }
.sidebar p { opacity: 0.7; font-size: 0.9rem; margin-bottom: 40px; }

.nav-item {
    padding: 20px; border-radius: 12px; margin-bottom: 15px; cursor: pointer;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    transition: 0.3s; display: flex; align-items: center; gap: 15px;
}
.nav-item:hover, .nav-item.active {
    background: var(--ns-gradient); border-color: transparent;
    color: var(--ns-dark); transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.nav-icon { font-size: 1.5rem; }
.nav-text { font-weight: 600; font-size: 1.1rem; }

/* --- MAIN CONTENT --- */
.content {
    flex: 1; padding: 40px; overflow-y: auto; position: relative;
    background: radial-gradient(circle at top left, #eefcf6 0%, #F4F7FA 100%);
}

/* WELCOME STATE */
.welcome-state {
    height: 100%; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; text-align: center;
    opacity: 0.6; animation: fadeIn 1s;
}

/* GRIDS */
.grid-view {
    display: none; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px; animation: slideUp 0.5s ease-out;
    padding-bottom: 100px; /* Ruimte voor Nex */
}
.grid-view.active { display: grid; }

.card {
    background: var(--ns-white); border-radius: 16px; padding: 30px;
    box-shadow: var(--shadow); border-top: 5px solid transparent;
    transition: 0.3s; cursor: pointer; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }

.card.teal:hover { border-top-color: var(--ns-teal); }
.card.blue:hover { border-top-color: var(--ns-dark); }
.card.alert:hover { border-top-color: var(--ns-alert); }

.card-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
.card-icon { font-size: 2.5rem; background: #f0f4f8; padding: 10px; border-radius: 12px; }
.tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; padding: 5px 10px; border-radius: 20px; background: #eefcf6; color: var(--ns-teal); height: fit-content; }
.tag.alert { background: #fff5f5; color: var(--ns-alert); }

.card h3 { font-size: 1.3rem; margin-bottom: 10px; font-weight: 700; }
.card p { font-size: 0.9rem; color: #64748b; line-height: 1.6; flex-grow: 1; }
.card-footer { margin-top: 20px; font-weight: 600; font-size: 0.9rem; color: var(--ns-teal); display: flex; align-items: center; gap: 5px; }

/* --- SLIDE-OVER DETAIL PANEL --- */
.detail-panel {
    position: fixed; top: 0; right: -100%; width: 55%; height: 100%;
    background: var(--ns-white); box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    padding: 60px; overflow-y: auto; transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1); z-index: 20;
}
.detail-panel.open { right: 0; }

.close-btn {
    position: absolute; top: 30px; right: 30px; width: 40px; height: 40px;
    background: #f1f5f9; border: none; border-radius: 50%; cursor: pointer;
    font-size: 1.2rem; transition: 0.2s;
}
.close-btn:hover { background: var(--ns-alert); color: white; }

/* CONTENT STYLES IN PANEL */
.detail-content h2 { font-size: 2.2rem; color: var(--ns-dark); margin-bottom: 10px; line-height: 1.2; }
.detail-subtitle { font-size: 1.1rem; color: #64748b; margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 20px; }

.detail-content h3 { font-size: 1.4rem; color: var(--ns-teal); margin-top: 30px; margin-bottom: 15px; }
.detail-content p { color: #475569; line-height: 1.7; margin-bottom: 15px; }
.detail-content ul { padding-left: 20px; color: #475569; margin-bottom: 20px; }
.detail-content li { margin-bottom: 10px; }

/* SPECIAL BOXES */
.box-code { background: var(--ns-dark); color: var(--ns-teal); padding: 20px; border-radius: 8px; font-family: monospace; border-left: 5px solid var(--ns-teal); margin: 20px 0; }
.box-calc { background: #fdfdf0; border: 2px dashed var(--ns-yellow); padding: 25px; border-radius: 12px; margin: 20px 0; }
.box-alert { background: #fff5f5; border-left: 5px solid var(--ns-alert); padding: 20px; color: #c53030; font-weight: 600; margin: 20px 0; display: flex; gap: 15px; align-items: center;}

/* SOURCE BUTTONS */
.source-container {
    margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee;
}
.source-label { font-size: 0.8rem; text-transform: uppercase; color: #aaa; margin-bottom: 10px; display: block; font-weight: 600; }
.btn-source {
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none; background: #e2e8f0; color: var(--ns-dark);
    padding: 10px 20px; border-radius: 30px; font-weight: 600; font-size: 0.9rem;
    transition: 0.2s; margin-right: 10px; margin-bottom: 10px;
}
.btn-source:hover { background: var(--ns-dark); color: white; }

/* CHECKLIST */
.checklist-item {
    display: flex; align-items: flex-start; gap: 15px; padding: 15px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 10px; cursor: pointer; transition: 0.2s;
}
.checklist-item:hover { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.check-box { width: 24px; height: 24px; border: 2px solid #cbd5e0; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: 0.2s;}
.checklist-item.checked .check-box { background: var(--ns-teal); border-color: var(--ns-teal); }
.checklist-item.checked .check-box::after { content: '✓'; color: white; font-weight: bold; }
.checklist-item.checked { opacity: 0.6; }

/* --- NEX CHARACTER --- */
.nex-container {
    position: fixed; bottom: 30px; right: 40px; z-index: 100;
    display: flex; align-items: flex-end; gap: 20px; pointer-events: none;
}
.nex-bubble {
    background: white; padding: 20px; border-radius: 20px 20px 0 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); max-width: 320px;
    font-size: 0.95rem; opacity: 0; transform: translateY(20px); transition: 0.4s; pointer-events: auto;
    border: 1px solid #e2e8f0;
}
.nex-bubble.visible { opacity: 1; transform: translateY(0); }
.nex-avatar {
    width: 100px; height: 100px; pointer-events: auto; cursor: pointer;
    animation: float 4s ease-in-out infinite; position: relative;
}

/* SVG NEX */
.nex-svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2)); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 0.6; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile */
@media (max-width: 1024px) {
    .detail-panel { width: 100%; }
    .sidebar { width: 80px; padding: 20px 10px; }
    .sidebar h1, .sidebar p, .nav-text { display: none; }
    .nav-item { justify-content: center; padding: 15px; }
    .header-meta { display: none; }
}