 /* Additional styles for documents page */
        /* ==================== DOCUMENTS PAGE HEADER ==================== */
        .documents-page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 32px;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
            padding: 28px 32px;
            border-radius: 16px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border: 1px solid rgba(59, 130, 246, 0.1);
            transition: all 0.3s ease;
        }

        .documents-page-header:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
        }

        .page-title-section h1 {
            font-size: 32px;
            font-weight: 700;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 8px;
        }

        .page-subtitle {
            color: #64748b;
            font-size: 15px;
            margin: 0;
        }

        .documents-controls .btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 28px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 15px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
            transition: all 0.3s ease;
            letter-spacing: 0.5px;
        }

        .documents-controls .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }

        .documents-controls .btn:active {
            transform: scale(0.97);
        }

        /* ==================== UPLOAD AREA ==================== */
        .upload-area {
            border: 3px dashed #667eea;
            border-radius: 16px;
            padding: 50px;
            text-align: center;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
            margin-bottom: 32px;
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .upload-area::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
            transition: left 0.5s ease;
        }

        .upload-area:hover::before {
            left: 100%;
        }

        .upload-area:hover, .upload-area.dragover {
            border-color: #764ba2;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
            transform: translateY(-4px);
            box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
        }

        .upload-icon {
            font-size: 64px;
            margin-bottom: 20px;
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        .upload-text h3 {
            font-size: 20px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 8px;
        }

        .upload-text p {
            color: #64748b;
            margin-bottom: 16px;
            font-size: 15px;
        }

        .file-types {
            font-size: 13px;
            color: #9ca3af;
        }
/* File Upload Area Styling */
.file-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.file-upload-icon {
    font-size: 48px;
    color: #fbbf24;
    margin-bottom: 16px;
}

.file-upload-text {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.file-upload-text strong {
    color: #1e293b;
    font-weight: 600;
}
        .documents-filters {
            display: flex;
            gap: 16px;
            align-items: center;
            background: white;
            padding: 20px 24px;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border: 1px solid #e2e8f0;
            margin-bottom: 24px;
        }

        /* ==================== DOCUMENTS GRID ==================== */
        .documents-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 24px;
        }

        .document-card {
            background: white;
            border-radius: 16px;
            padding: 24px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            border: 1px solid #e2e8f0;
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .document-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, #667eea, #764ba2);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        .document-card:hover::before {
            transform: scaleX(1);
        }

        .document-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
            border-color: rgba(102, 126, 234, 0.3);
        }

        .document-icon {
            width: 48px;
            height: 48px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            margin-bottom: 16px;
        }

        .document-pdf {
            background: #fef2f2;
            color: #dc2626;
        }

        .document-docx {
            background: #eff6ff;
            color: #2563eb;
        }

        .document-xlsx {
            background: #f0fdf4;
            color: #16a34a;
        }

        .document-default {
            background: #f8fafc;
            color: #64748b;
        }

        .document-name {
            font-size: 16px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 8px;
            line-height: 1.4;
        }

        .document-project {
            font-size: 14px;
            color: #2563eb;
            margin-bottom: 12px;
        }

        .document-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            color: #64748b;
            margin-bottom: 16px;
        }

        .document-actions {
            display: flex;
            gap: 8px;
        }

        /* ==================== ACTION BUTTONS ==================== */
        .action-btn {
            padding: 8px 14px;
            border: 2px solid #e2e8f0;
            background: white;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .action-btn:hover {
            border-color: #667eea;
            color: #764ba2;
            transform: translateY(-2px);
        }

        .action-btn.primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-color: transparent;
        }

        .action-btn.primary:hover {
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
            transform: translateY(-2px);
        }

        /* ==================== STATS GRID ==================== */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 24px;
            margin-bottom: 32px;
        }

        .stat-card {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
            border-radius: 16px;
            padding: 24px;
            text-align: center;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(59, 130, 246, 0.1);
            transition: all 0.3s ease;
        }

        .stat-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
        }

        .stat-number {
            font-size: 36px;
            font-weight: 700;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 8px;
        }

        .stat-label {
            font-size: 14px;
            color: #64748b;
            font-weight: 500;
        }

        .empty-documents {
            text-align: center;
            padding: 80px 40px;
            background: white;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
        }

        .empty-documents-icon {
            font-size: 64px;
            color: #e5e7eb;
            margin-bottom: 16px;
        }

        /* Upload Modal */
        .upload-modal .modal {
            max-width: 500px;
        }

        .upload-progress {
            width: 100%;
            height: 8px;
            background: #f1f5f9;
            border-radius: 4px;
            overflow: hidden;
            margin: 16px 0;
        }

        .upload-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #2563eb, #3b82f6);
            border-radius: 4px;
            transition: width 0.3s ease;
            width: 0%;
        }
        .search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 16px;
    pointer-events: none;
}
        /* ==================== FILTERS SECTION ==================== */
        .documents-filters {
            display: flex;
            gap: 16px;
            align-items: center;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
            padding: 20px 24px;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(59, 130, 246, 0.1);
            margin-bottom: 24px;
            flex-wrap: wrap;
            transition: all 0.3s ease;
        }

        .documents-filters:hover {
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
        }

.filter-select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 160px;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-select:hover {
    border-color: #cbd5e1;
}

        /* ==================== RESPONSIVE DESIGN ==================== */
        @media (max-width: 1024px) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .documents-page-header {
                flex-direction: column;
                gap: 16px;
                align-items: stretch;
                padding: 20px;
            }

            .page-title-section h1 {
                font-size: 26px;
            }

            .documents-controls {
                width: 100%;
            }

            .documents-controls .btn {
                width: 100%;
                justify-content: center;
            }

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 16px;
            }

            .stat-number {
                font-size: 28px;
            }

            .upload-area {
                padding: 40px 20px;
            }

            .upload-icon {
                font-size: 48px;
            }

            .documents-filters {
                flex-direction: column;
                gap: 12px;
                align-items: stretch;
                padding: 16px;
            }

            .search-box {
                max-width: none;
            }

            .filter-select {
                width: 100%;
            }

            .documents-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .document-card {
                padding: 20px;
            }
        }

        @media (max-width: 480px) {
            .stats-grid {
                grid-template-columns: 1fr;
            }

            .documents-page-header {
                padding: 16px;
            }

            .page-title-section h1 {
                font-size: 24px;
            }

            .upload-area {
                padding: 30px 16px;
            }

            .upload-text h3 {
                font-size: 18px;
            }

            .file-types {
                font-size: 11px;
            }
        }

        /* Upload Modal */
.upload-modal .modal {
    max-width: 560px;
}

.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: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 2px solid #f1f5f9;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn-outline {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn:not(.btn-outline) {
    background: #2563eb;
    color: white;
}

.btn:not(.btn-outline):hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn:active {
    transform: scale(0.98);
}
/* ==================== UPLOAD PROGRESS & LOADER ==================== */
.upload-progress {
    width: 100%;
    margin: 16px 0 0 0;
    padding: 0;
    display: none;
}

.progress-content {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

.progress-text {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.upload-message {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-percentage {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(102, 126, 234, 0.2);
}

.upload-progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(226, 232, 240, 0.8);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 8px 0;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.upload-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Enhanced progress bar for better visual feedback */
.upload-progress-bar.processing {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.upload-progress-bar.complete {
    background: linear-gradient(90deg, #10b981, #059669);
}

.upload-progress-bar.error {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .progress-content {
        padding: 12px;
    }
    
    .progress-header {
        gap: 10px;
    }
    
    .spinner {
        width: 24px;
        height: 24px;
        border-width: 2.5px;
    }
    
    .upload-message {
        font-size: 12px;
    }
    
    .upload-percentage {
        font-size: 14px;
    }
    
    .upload-progress-bar-container {
        height: 10px;
    }
}

@media (max-width: 768px) {
    .documents-filters {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .modal {
        padding: 24px;
        border-radius: 12px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .file-upload-area {
        padding: 24px;
    }

    .file-upload-icon {
        font-size: 36px;
    }

    .modal-title {
        font-size: 20px;
    }
}
/* Additional CSS for Image Support */

.document-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.document-card.is-image {
    overflow: hidden;
}

.document-image-preview {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.document-image-preview:hover {
    transform: scale(1.02);
}

.document-card.is-image:hover {
    transform: translateY(-4px);
}

.document-card.is-image .document-name {
    font-size: 14px;
}

/* Additional CSS for Image Support */

.document-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.document-card.is-image {
    overflow: hidden;
}

.document-image-preview {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.document-image-preview:hover {
    transform: scale(1.02);
}

.document-card.is-image:hover {
    transform: translateY(-4px);
}

.document-card.is-image .document-name {
    font-size: 14px;
}

/* Image badge */
.image-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Filter for images */
.filter-image-only {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.filter-image-only:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Loading state for image uploads */
.image-uploading {
    position: relative;
    opacity: 0.6;
}

.image-uploading::after {
    content: "🖼️ Processing...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}