      /* Additional styles for projects page */
        .projects-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: 32px;
            border-radius: 12px;
            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;
        }

        .projects-page-header:hover {
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
            border-color: rgba(59, 130, 246, 0.2);
        }

        .page-title-section h1 {
            font-size: 32px;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 4px;
        }

        .page-subtitle {
            color: #64748b;
            font-size: 16px;
        }

        .projects-controls {
            display: flex;
            gap: 16px;
            align-items: center;
        }

        .search-filter-bar {
            display: flex;
            gap: 16px;
            align-items: center;
            background: white;
            padding: 24px;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border: 1px solid rgba(59, 130, 246, 0.1);
            margin-bottom: 24px;
            transition: all 0.3s ease;
        }

        .search-filter-bar:hover {
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
            border-color: rgba(59, 130, 246, 0.2);
        }

        .search-box {
            position: relative;
            flex: 1;
            max-width: 300px;
        }

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

        .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: #9ca3af;
            font-size: 16px;
        }

        .filter-group {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .filter-select {
            padding: 12px 16px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 14px;
            background: white;
            cursor: pointer;
            min-width: 140px;
        }

        .sort-buttons {
            display: flex;
            gap: 4px;
            background: #f8fafc;
            padding: 4px;
            border-radius: 8px;
        }

        .sort-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 12px;
            border: none;
            background: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #64748b;
            transition: all 0.2s ease;
        }

        .sort-btn.active {
            background: #2563eb;
            color: white;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .sort-btn:hover:not(.active) {
            background: #e2e8f0;
        }

        .projects-stats {
            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));
            padding: 24px;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border: 1px solid rgba(59, 130, 246, 0.1);
            text-align: center;
            transition: all 0.3s ease;
        }

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

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

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

        .projects-table-container {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border: 1px solid rgba(59, 130, 246, 0.1);
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .projects-table-container:hover {
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
            border-color: rgba(59, 130, 246, 0.2);
        }

        .projects-table {
            width: 100%;
            border-collapse: collapse;
        }

        .projects-table thead {
            background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
        }

        .projects-table th {
            padding: 18px 20px;
            text-align: left;
            font-weight: 600;
            color: #374151;
            font-size: 14px;
            border-bottom: 2px solid #e5e7eb;
        }

        .projects-table td {
            padding: 16px 20px;
            border-bottom: 1px solid #f3f4f6;
            vertical-align: middle;
        }

        .projects-table tbody tr {
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .projects-table tbody tr:hover {
            background: linear-gradient(to right, rgba(102, 126, 234, 0.05), transparent);
            transform: scale(1.01);
            box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
        }

        .project-name-cell {
            font-weight: 600;
            color: #1e293b;
        }

        .project-name-link {
            color: inherit;
            text-decoration: none;
            display: block;
        }

        .project-name-link:hover {
            color: #2563eb;
        }

        .department-badge {
            display: inline-flex;
            align-items: center;
            padding: 6px 12px;
            background: #f1f5f9;
            color: #475569;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
            border: 1px solid #e2e8f0;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }

        .status-badge:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        /* Active Status - Green Gradient */
        .status-active {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            border: 2px solid #10b981;
        }

        /* In Progress Status - Orange/Yellow Gradient */
        .status-inprogress,
        .status-in-progress {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
            border: 2px solid #f59e0b;
        }

        /* Completed Status - Blue Gradient */
        .status-completed {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            color: white;
            border: 2px solid #3b82f6;
        }

        .status-badge::before {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: white;
            box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% {
                opacity: 1;
                transform: scale(1);
            }
            50% {
                opacity: 0.7;
                transform: scale(1.1);
            }
        }

        .documents-count {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 6px 10px;
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            color: #2563eb;
            border-radius: 16px;
            font-size: 13px;
            font-weight: 600;
            border: 1px solid #bfdbfe;
        }

        .empty-state {
            text-align: center;
            padding: 80px 40px;
            color: #6b7280;
        }

        .empty-state-icon {
            font-size: 64px;
            margin-bottom: 16px;
            opacity: 0.5;
        }

        .empty-state h3 {
            font-size: 18px;
            margin-bottom: 8px;
            color: #374151;
        }

        .empty-state p {
            margin-bottom: 24px;
            font-size: 16px;
        }

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

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

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

            .projects-controls {
                justify-content: stretch;
            }

            .add-project-btn {
                width: 100%;
                justify-content: center;
            }

            .search-filter-bar {
                flex-direction: column;
                gap: 12px;
                align-items: stretch;
                padding: 16px;
            }

            .filter-group {
                flex-wrap: wrap;
                width: 100%;
            }

            .filter-select {
                flex: 1;
                min-width: 120px;
            }

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

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

            .stat-card {
                padding: 16px;
            }

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

            .projects-table-container {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            .projects-table {
                min-width: 700px;
            }

            .projects-table th,
            .projects-table td {
                padding: 12px;
                font-size: 13px;
            }

            .sort-buttons {
                justify-content: center;
                width: 100%;
            }
        }

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

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

            .search-filter-bar {
                padding: 16px;
            }

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

            .projects-table th,
            .projects-table td {
                padding: 12px;
                font-size: 13px;
            }
        }
        .add-project-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.add-project-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.plus-icon {
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}
.add-project-btn:active {
    transform: scale(0.97);
}
/* Icon Buttons for Edit/Delete */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

.btn-icon:hover {
    background: #f1f5f9;
    transform: scale(1.1);
}

.btn-icon.btn-danger:hover {
    background: #fef2f2;
}
/* ==================== PROJECT DETAILS MODAL ==================== */
.project-details-modal {
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.project-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.back-btn:hover {
    background: #f8fafc;
    border-color: #2563eb;
    color: #2563eb;
    transform: translateX(-4px);
}

.project-actions {
    display: flex;
    gap: 12px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.project-title-section {
    padding: 32px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.project-title-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    line-height: 1.2;
}

.project-meta {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.meta-item {
    color: #64748b;
    font-size: 14px;
}

.meta-item strong {
    color: #1e293b;
}

.project-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 24px 32px;
    background: #f8fafc;
}

.detail-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease;
}

.detail-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.detail-stat-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 12px;
}

.detail-stat-info {
    flex: 1;
}

.detail-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 4px;
}

.detail-stat-text {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

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

.project-detail-section {
    padding: 32px;
    border-bottom: 1px solid #e2e8f0;
}

.project-detail-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}

.section-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.description-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
    min-height: 80px;
}

.documents-list {
    display: grid;
    gap: 16px;
}

.document-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.document-item:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
    transform: translateX(4px);
}

.doc-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

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

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

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

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

.doc-info {
    flex: 1;
}

.doc-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.doc-meta {
    font-size: 13px;
    color: #64748b;
}

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

.doc-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.doc-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.doc-btn.primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.doc-btn.primary:hover {
    background: #1d4ed8;
}

.empty-documents {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-documents-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-documents h4 {
    font-size: 18px;
    color: #374151;
    margin-bottom: 8px;
}

.empty-documents p {
    margin-bottom: 20px;
}

.loading-state {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .project-details-modal {
        max-width: 100%;
        border-radius: 0;
    }

    .project-details-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .project-actions {
        flex-direction: column;
    }

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

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

    .project-detail-section {
        padding: 20px 16px;
    }

    .document-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .doc-actions {
        width: 100%;
        flex-direction: column;
    }

    .doc-btn {
        width: 100%;
    }
}

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

    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
.modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 36px 18px 36px;
  border-radius: 10px 10px 0 0;
  min-height: 56px;
}
.modal-title {
  flex: 1;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 1.7rem;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
  padding: 0;
}
.modal-close:hover {
  background: #f1f5f9;
  color: #2563eb;
}
@media (max-width: 480px) {
  .modal-header {
    padding: 16px 12px 8px 12px;
    min-height: 44px;
  }
  .modal-close {
    top: 6px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
  }
  .modal-title { font-size: 1.04rem; }
}