        /* ===================== */
        /* PROJECTS             */
        /* ===================== */
        .projects-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 1rem;
        }
        
        .project-card {
            background: white;
            border-radius: 12px;
            padding: 1.25rem;
            border: 1px solid #e5e7eb;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            overflow: hidden;
        }
        
        .project-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
        }
        
        .project-card:hover {
            box-shadow: 0 8px 24px rgba(0,0,0,0.1);
            transform: translateY(-2px);
        }
        
        .project-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.75rem;
        }
        
        .project-card-title {
            font-weight: 700;
            font-size: 1rem;
            color: var(--dark);
            line-height: 1.3;
        }
        
        .project-card-status {
            font-size: 0.7rem;
            font-weight: 600;
            padding: 0.15rem 0.5rem;
            border-radius: 6px;
            white-space: nowrap;
        }
        
        .project-card-status.active { background: #dcfce7; color: #16a34a; }
        .project-card-status.paused { background: #fef3c7; color: #d97706; }
        .project-card-status.completed { background: #e0e7ff; color: #4338ca; }
        
        .project-card-desc {
            font-size: 0.8rem;
            color: var(--gray);
            margin-bottom: 0.75rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .project-card-stats {
            display: flex;
            gap: 1rem;
            font-size: 0.75rem;
            color: var(--gray);
            margin-bottom: 0.75rem;
        }
        
        .project-card-stats span {
            display: flex;
            align-items: center;
            gap: 0.2rem;
        }
        
        .project-progress-bar {
            height: 6px;
            background: #e5e7eb;
            border-radius: 3px;
            overflow: hidden;
        }
        
        .project-progress-fill {
            height: 100%;
            border-radius: 3px;
            transition: width 0.3s;
        }
        
        .project-progress-label {
            display: flex;
            justify-content: space-between;
            font-size: 0.7rem;
            color: var(--gray);
            margin-top: 0.25rem;
        }
        
        .project-card-deadline {
            font-size: 0.75rem;
            margin-top: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .project-card-deadline.overdue { color: var(--danger); font-weight: 600; }
        
        /* Project list view */
        .projects-list-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
        }
        
        .projects-list-table th {
            text-align: left;
            padding: 0.75rem 1rem;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--gray);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border-bottom: 2px solid #e5e7eb;
        }
        
        .projects-list-table td {
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #f0f0f0;
            font-size: 0.85rem;
            cursor: pointer;
        }
        
        .projects-list-table tr:hover td {
            background: #f9fafb;
        }
        
        /* Project timeline view */
        .project-timeline {
            position: relative;
            padding: 1rem 0;
        }
        
        .timeline-header {
            display: flex;
            border-bottom: 2px solid #e5e7eb;
            margin-bottom: 0.5rem;
        }
        
        .timeline-header-label {
            flex: 1;
            text-align: center;
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--gray);
            padding: 0.25rem;
        }
        
        .timeline-row {
            display: flex;
            align-items: center;
            height: 40px;
            margin-bottom: 4px;
            position: relative;
        }
        
        .timeline-row-label {
            width: 180px;
            flex-shrink: 0;
            font-size: 0.8rem;
            font-weight: 600;
            padding-right: 1rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            cursor: pointer;
        }
        
        .timeline-row-bar-area {
            flex: 1;
            position: relative;
            height: 100%;
        }
        
        .timeline-bar {
            position: absolute;
            height: 24px;
            top: 8px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            padding: 0 0.5rem;
            font-size: 0.65rem;
            color: white;
            font-weight: 600;
            overflow: hidden;
            white-space: nowrap;
        }
        
        .timeline-bar-progress {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            border-radius: 4px;
            opacity: 0.3;
            background: white;
        }
        
        /* Project detail — board/kanban */
        .project-detail-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .project-detail-back {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            font-weight: 600;
            color: var(--dark);
            font-size: 1.1rem;
        }
        
        .project-detail-back:hover { color: var(--primary); }
        
        .project-board-columns {
            display: flex;
            gap: 1rem;
            overflow-x: auto;
            padding-bottom: 1rem;
        }
        
        .project-board-col {
            min-width: 260px;
            max-width: 300px;
            flex-shrink: 0;
            background: #f3f4f6;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            max-height: calc(100vh - 280px);
        }
        
        .project-board-col-header {
            padding: 0.75rem 1rem;
            font-weight: 600;
            font-size: 0.85rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 2px solid #e5e7eb;
        }
        
        .project-board-col-cards {
            padding: 0.5rem;
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        
        .project-task-card {
            background: white;
            border-radius: 8px;
            padding: 0.65rem 0.75rem;
            cursor: pointer;
            border-left: 3px solid #e5e7eb;
            font-size: 0.85rem;
            transition: box-shadow 0.2s;
        }
        
        .project-task-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
        .project-task-card.priority-high { border-left-color: #ef4444; }
        .project-task-card.priority-medium { border-left-color: #f59e0b; }
        .project-task-card.priority-low { border-left-color: #22c55e; }
        
        .project-task-card-title { font-weight: 500; margin-bottom: 0.25rem; }
        .project-task-card-meta { font-size: 0.7rem; color: var(--gray); display: flex; gap: 0.5rem; }
        
        /* Color dot for project color picker */
        input[name="projectColor"]:checked + .color-dot {
            border-color: var(--dark) !important;
            box-shadow: 0 0 0 2px white, 0 0 0 4px var(--dark);
        }
        
        @media (max-width: 767px) {
            .projects-grid { grid-template-columns: 1fr; }
            .project-board-columns { flex-direction: column; }
            .project-board-col { min-width: unset; max-width: unset; max-height: none; }
            .timeline-row-label { width: 100px; font-size: 0.7rem; }
        }

        .process-template-step {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem;
            background: #f9fafb;
            border-radius: 8px;
            margin-bottom: 0.5rem;
        }
        
        .process-template-step .step-number {
            width: 28px;
            height: 28px;
            background: var(--primary);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.85rem;
            flex-shrink: 0;
        }
        
        .process-template-step .step-arrow {
            color: var(--gray);
            margin-left: auto;
        }
        
        .process-steps-builder {
            border: 2px dashed #e5e7eb;
            border-radius: 12px;
            padding: 1rem;
            min-height: 120px;
        }
        
        .process-steps-builder.drag-over {
            border-color: var(--primary);
            background: #f0fdf4;
        }
        
        .add-step-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.75rem;
            border: 2px dashed #d1d5db;
            border-radius: 8px;
            color: var(--gray);
            cursor: pointer;
            transition: all 0.2s;
            background: transparent;
            width: 100%;
            font-size: 0.9rem;
        }
        
        .add-step-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: #f0fdf4;
        }
        
