﻿/* ===========================
   ICT Platform - Hoofd Stylesheet
   =========================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Kleuren - Wiskunde Thema (Groen) */
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary-color: #14b8a6;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    
    /* Neutrale kleuren */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Schaduwen */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Animaties */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.6;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed !important;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Main App Container */
.main-app {
    background: var(--gray-50);
    min-height: 100vh;
}

/* Header */
.app-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin: 0;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* User Menu */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 2px solid var(--gray-200);
}

.user-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 2px solid var(--gray-200);
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-transform: uppercase;
}

.user-name {
    font-weight: 500;
    color: var(--gray-700);
}

.logout-btn {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.logout-btn:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.module-header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1.5rem;
}

.admin-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
}

.admin-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.admin-btn svg {
    width: 20px;
    height: 20px;
}

/* Dashboard Container */
.app-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Welcome Section */
.welcome-section {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.welcome-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-subtitle {
    color: var(--gray-600);
    font-size: 1.125rem;
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.module-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.module-card:hover:not(.disabled) {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.module-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.module-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.module-card p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* Progress Bar */
.module-progress {
    margin-top: 1rem;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.cell-output {
    display: block;
    width: 100%;
    max-width: 100%;
    position: relative;
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0.75rem;
    font-family: "JetBrains Mono", "Fira Code", "Ubuntu Mono", monospace;
    font-size: 0.95rem;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 320px;
    box-sizing: border-box;
}

.cell-output.markdown-cell-output {
    max-height: none !important;
    overflow-y: visible !important;
}

.cell-output::-webkit-scrollbar {
    height: 6px;
}

.cell-output::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.cell-output .output-content {
    white-space: pre-wrap;
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    overflow-y: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cell-output.markdown-cell-output .output-content,
.output-content.markdown-output {
    overflow-y: visible !important;
    max-height: none !important;
}

.cells-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    min-height: 0;
}

.notebook-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}


/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .header-left {
        gap: 1rem;
    }
    
    .main-nav {
        display: none;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-section h1 {
        font-size: 1.5rem;
    }
}