/* ============================================
   CIRCULAIRE CAMPUS MATERIAALPLATFORM
   Stylesheet v4.7.3
   
   KLANT AANPASSINGEN:
   Pas de kleuren aan in :root hieronder
   ============================================ */

:root {
    /* Primaire kleuren - TU Delft huisstijl */
    --color-primary: #00A6D6;         /* TU Delft cyaan */
    --color-primary-dark: #0088b3;
    --color-secondary: #0C2340;       /* TU Delft donkerblauw */
    
    /* Status kleuren */
    --color-success: #10b981;         /* Groen */
    --color-warning: #f59e0b;         /* Oranje */
    --color-danger: #dc2626;          /* Rood */
    --color-info: #3b82f6;            /* Blauw */
    
    /* Categorie kleuren */
    --color-cat1: #10b981;  /* Campus hergebruik - groen */
    --color-cat2: #3b82f6;  /* Extern hergebruik - blauw */
    --color-cat3: #8b5cf6;  /* Refurbishment - paars */
    --color-cat4: #ec4899;  /* Recycling - roze */
    
    /* Grijs tinten */
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: var(--color-gray-100);
            min-height: 100vh;
            padding: 20px;
        }
        
        .app-container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: var(--radius-xl);
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            overflow: hidden;
        }
        
        .header {
            background: var(--color-primary);
            color: white;
            padding: 30px;
        }
        
        .header h1 {
            font-size: 28px;
            margin-bottom: 8px;
        }
        
        .header p {
            opacity: 0.9;
            font-size: 14px;
        }
        
        .phase-badge {
            display: inline-block;
            background: rgba(255,255,255,0.2);
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            margin-top: 10px;
        }
        
        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        .tabs {
            display: flex;
            background: #f8fafc;
            border-bottom: 2px solid #e2e8f0;
            overflow-x: auto;
            align-items: center;
        }
        
        .tabs-main {
            display: flex;
            flex: 1;
        }
        
        .tab {
            padding: 16px 24px;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #64748b;
            transition: all 0.2s;
            position: relative;
            white-space: nowrap;
        }
        
        .tab:hover {
            background: rgba(59, 130, 246, 0.1);
            color: var(--color-primary);
        }
        
        .tab.active {
            color: var(--color-primary);
        }
        
        .tab.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--color-primary);
        }

        .beheer-dropdown {
            position: relative;
            margin-left: auto;
            margin-right: 8px;
        }

        .beheer-toggle {
            padding: 10px 16px;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            color: #475569;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
        }

        .beheer-toggle:hover {
            background: #e2e8f0;
            border-color: #cbd5e1;
        }

        .beheer-toggle.active {
            background: var(--color-primary);
            color: white;
            border-color: var(--color-primary);
        }

        .beheer-menu {
            position: fixed;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
            min-width: 220px;
            z-index: 9999;
            overflow: visible;
        }

        .beheer-menu-item {
            display: block;
            width: 100%;
            padding: 14px 16px;
            background: none;
            border: none;
            text-align: left;
            cursor: pointer;
            font-size: 14px;
            color: #374151;
            transition: all 0.15s;
        }

        .beheer-menu-item:hover {
            background: #f0f9ff;
            color: #0369a1;
        }

        .beheer-menu-item.active {
            background: #eff6ff;
            color: var(--color-primary);
            font-weight: 500;
        }

        .beheer-menu-divider {
            height: 1px;
            background: #e2e8f0;
            margin: 4px 0;
        }
        
        .content {
            padding: 30px;
        }
        
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .stat-card {
            background: white;
            padding: 24px;
            border-radius: 12px;
            border-left: 4px solid var(--color-primary);
        }
        
        .stat-label {
            font-size: 12px;
            color: #64748b;
            text-transform: uppercase;
            font-weight: 600;
            margin-bottom: 8px;
        }
        
        .stat-value {
            font-size: 32px;
            font-weight: 700;
            color: #1e293b;
        }
        
        .progress-bar {
            width: 100%;
            height: 8px;
            background: #e2e8f0;
            border-radius: 4px;
            margin-top: 12px;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background: var(--color-primary);
            transition: width 0.3s ease;
        }
        
        .card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 20px;
        }
        
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            flex-wrap: wrap;
            gap: 12px;
        }
        
        .card-title {
            font-size: 18px;
            font-weight: 600;
            color: #1e293b;
        }
        
        .btn {
            padding: 10px 20px;
            border-radius: 8px;
            border: none;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        
        .btn-primary {
            background: var(--color-primary);
            color: white;
        }
        
        .btn-primary:hover {
            background: #0095C0;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 166, 214, 0.4);
        }
        
        .btn-secondary {
            background: #f1f5f9;
            color: #475569;
        }
        
        .btn-secondary:hover {
            background: #e2e8f0;
        }
        
        .btn-success {
            background: var(--color-success);
            color: white;
        }
        
        .btn-success:hover {
            background: #059669;
        }
        
        .btn-danger {
            background: #ef4444;
            color: white;
        }
        
        .btn-danger:hover {
            background: var(--color-danger);
        }
        
        .btn-small {
            padding: 6px 12px;
            font-size: 12px;
        }
        
        .material-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .material-item {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 16px;
            transition: all 0.2s;
        }
        
        .material-item:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        .material-item-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            gap: 12px;
        }
        
        .material-name {
            font-size: 16px;
            font-weight: 600;
            color: #1e293b;
        }
        
        .category-badge {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap;
        }
        
        .category-1 {
            background: #d1fae5;
            color: #065f46;
        }
        
        .category-2 {
            background: #e0e7ff;
            color: #4338ca;
        }
        
        .category-3 {
            background: #ddd6fe;
            color: #6d28d9;
        }
        
        .category-4 {
            background: #fce7f3;
            color: #be185d;
        }
        
        .unknown-badge {
            background: #fef3c7;
            color: #92400e;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 10px;
            font-weight: 600;
            margin-left: 8px;
        }
        
        .warning-box {
            background: #fef3c7;
            border-left: 4px solid var(--color-warning);
            padding: 12px;
            border-radius: 8px;
            font-size: 13px;
            color: #92400e;
            margin-top: 8px;
        }
        
        .success-box {
            background: #d1fae5;
            border-left: 4px solid var(--color-success);
            padding: 12px;
            border-radius: 8px;
            font-size: 13px;
            color: #065f46;
            margin-top: 8px;
        }
        
        .info-box {
            background: #dbeafe;
            border-left: 4px solid var(--color-primary);
            padding: 12px;
            border-radius: 8px;
            font-size: 13px;
            color: #1e40af;
            margin-top: 8px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            display: block;
            font-size: 14px;
            font-weight: 500;
            color: #475569;
            margin-bottom: 8px;
        }
        
        .form-input, .form-select, .form-textarea {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.2s;
        }
        
        .form-input:focus, .form-select:focus, .form-textarea:focus {
            outline: none;
            border-color: var(--color-primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        
        .form-textarea {
            min-height: 100px;
            resize: vertical;
        }
        
        .radio-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .radio-option {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }
        
        .radio-option input[type="radio"] {
            cursor: pointer;
        }
        
        .reliability-indicator {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 14px;
            font-weight: 500;
        }
        
        .star {
            color: #fbbf24;
        }
        
        .star-empty {
            color: #d1d5db;
        }
        
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            padding: 20px;
        }
        
        .modal {
            background: white;
            border-radius: 16px;
            max-width: 800px;
            width: 100%;
            max-height: 90vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            position: relative;
        }
        
        .modal-header {
            padding: 24px;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            background: white;
            z-index: 10;
        }
        
        .modal-title {
            font-size: 20px;
            font-weight: 600;
            color: #1e293b;
        }
        
        .modal-close {
            background: none;
            border: none;
            font-size: 24px;
            color: #64748b;
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            transition: all 0.2s;
        }
        
        .modal-close:hover {
            background: #f1f5f9;
            color: #1e293b;
        }
        
        .modal-body {
            padding: 24px;
            overflow-y: auto;
            max-height: calc(90vh - 160px);
            scroll-behavior: auto;
        }
        
        .modal-body input:focus,
        .modal-body textarea:focus,
        .modal-body select:focus {
            scroll-margin-top: 100px;
        }
        
        .modal-footer {
            padding: 24px;
            border-top: 1px solid #e2e8f0;
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            flex-wrap: wrap;
            position: sticky;
            bottom: 0;
            background: white;
            z-index: 10;
        }
        
        .file-upload {
            border: 2px dashed #cbd5e1;
            border-radius: 12px;
            padding: 40px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
        }
        
        .file-upload:hover {
            border-color: var(--color-primary);
            background: #f8fafc;
        }
        
        .file-upload.dragging {
            border-color: var(--color-primary);
            background: #eff6ff;
        }
        
        .file-upload-icon {
            font-size: 48px;
            color: #cbd5e1;
            margin-bottom: 12px;
        }
        
        .upload-text {
            color: #64748b;
            font-size: 14px;
        }
        
        .file-input-hidden {
            display: none;
        }
        
        .photo-gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 12px;
            margin-top: 12px;
        }
        
        .photo-item {
            position: relative;
            aspect-ratio: 1;
            border-radius: 8px;
            overflow: hidden;
            border: 2px solid #e2e8f0;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .photo-item:hover {
            border-color: var(--color-primary);
            transform: scale(1.05);
        }
        
        .photo-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .photo-delete {
            position: absolute;
            top: 4px;
            right: 4px;
            background: rgba(239, 68, 68, 0.9);
            color: white;
            border: none;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            opacity: 0;
            transition: opacity 0.2s;
        }
        
        .photo-item:hover .photo-delete {
            opacity: 1;
        }
        
        .photo-lightbox {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.9);
            z-index: 2000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        
        .photo-lightbox img {
            max-width: 90%;
            max-height: 90%;
            border-radius: 8px;
        }
        
        .photo-lightbox-close {
            position: absolute;
            top: 20px;
            right: 20px;
            background: white;
            color: black;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 24px;
        }
        
        .criteria-list {
            list-style: none;
            padding-left: 0;
        }
        
        .criteria-list li {
            padding: 8px 0;
            display: flex;
            align-items: start;
            gap: 8px;
        }
        
        .criteria-list li::before {
            content: '✓';
            color: var(--color-success);
            font-weight: bold;
            flex-shrink: 0;
        }
        
        .missing-data-list {
            list-style: none;
            padding-left: 0;
        }
        
        .missing-data-list li {
            padding: 6px 0;
            display: flex;
            align-items: start;
            gap: 8px;
            color: #92400e;
        }
        
        .missing-data-list li::before {
            content: '•';
            font-weight: bold;
            flex-shrink: 0;
        }
        
        .action-buttons {
            display: flex;
            gap: 12px;
            margin-top: 20px;
            flex-wrap: wrap;
        }
        
        .help-text {
            font-size: 13px;
            color: #64748b;
            margin-top: 8px;
        }
        
        .dimension-inputs {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            gap: 12px;
            align-items: center;
        }
        
        .knowledge-contribution {
            background: #f0f9ff;
            border: 1px solid #bae6fd;
            border-radius: 12px;
            padding: 20px;
            margin-top: 20px;
        }
        
        .contribution-title {
            font-size: 16px;
            font-weight: 600;
            color: #0c4a6e;
            margin-bottom: 12px;
        }
        
        .contribution-options {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .contribution-link {
            color: #0369a1;
            text-decoration: none;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px;
            border-radius: 6px;
            transition: background 0.2s;
        }
        
        .contribution-link:hover {
            background: rgba(3, 105, 161, 0.1);
        }
        
        .empty-state {
            text-align: center;
            padding: 60px 20px;
        }
        
        .empty-state-icon {
            font-size: 64px;
            margin-bottom: 16px;
        }
        
        .empty-state-text {
            font-size: 16px;
            color: #64748b;
            margin-bottom: 24px;
        }
        
        .toast {
            position: fixed;
            bottom: 20px;
            right: 20px;
            padding: 16px 24px;
            border-radius: 8px;
            color: white;
            font-weight: 500;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            z-index: 3000;
            animation: slideIn 0.3s ease;
        }
        
        .toast.success {
            background: var(--color-success);
        }
        
        .toast.error {
            background: #ef4444;
        }
        
        @keyframes slideIn {
            from {
                transform: translateX(400px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        
        .mapping-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }
        
        @media (max-width: 600px) {
            .mapping-grid {
                grid-template-columns: 1fr;
            }
        }
        
        /* Parameters Tab Styles */
        .params-container {
            max-width: 1200px;
        }
        
        .params-section {
            background: #f8fafc;
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 24px;
            border: 1px solid #e2e8f0;
        }
        
        .params-section-title {
            font-size: 16px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .params-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
        }
        
        .param-item {
            background: white;
            padding: 16px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
        }
        
        .categories-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .category-param-item {
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 16px;
            align-items: center;
            background: white;
            padding: 16px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
        }
        
        .category-number {
            font-weight: 600;
            color: var(--color-primary);
            min-width: 50px;
        }
        
        .color-picker-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .color-preview {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            border: 2px solid #e2e8f0;
        }
        
        @media (max-width: 768px) {
            .category-param-item {
                grid-template-columns: 1fr;
            }
        }
