<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Projects - Task Panel</title>
    
    <!-- Google Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap" rel="stylesheet">
    
    <!-- Inline CSS for styling (Consistent with dashboard & users, pure Vanilla CSS) -->
    <style>
        /* CSS Custom Variables */
        :root {
            --primary-color: #3b46f1;
            --primary-hover: #2a35d8;
            --primary-light: #eff6ff;
            --bg-main: #f8fafc;
            --bg-card: #ffffff;
            
            --text-main: #0f172a;
            --text-muted: #64748b;
            --text-label: #334155;
            --border-color: #e2e8f0;
            --border-hover: #cbd5e1;
            --font-family: 'Instrument Sans', sans-serif;

            /* Status Theme Colors */
            --color-completed: #10b981;
            --color-completed-light: #ecfdf5;
            --color-progress: #3b82f6;
            --color-progress-light: #eff6ff;
            --color-pending: #f59e0b;
            --color-pending-light: #fffbeb;
            --color-hold: #ef4444;
            --color-hold-light: #fef2f2;
            
            --sidebar-width: 260px;
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
            --border-radius: 12px;
        }

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

        body {
            font-family: var(--font-family);
            background-color: var(--bg-main);
            color: var(--text-main);
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            overflow-x: hidden;
        }

        /* Main Page Layout Wrapper */
        .dashboard-layout {
            display: flex;
            position: relative;
            min-height: 100vh;
        }

        /* Sidebar Styling */
        .sidebar {
            width: var(--sidebar-width);
            background-color: var(--bg-card);
            border-right: 1px solid var(--border-color);
            height: 100vh;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 100;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 1.5rem;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Brand / Logo section */
        .sidebar-brand {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 2rem;
            text-decoration: none;
            color: var(--text-main);
        }

        .brand-logo-box {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            box-shadow: 0 4px 10px rgba(59, 70, 241, 0.2);
        }

        .brand-name {
            font-size: 1.25rem;
            font-weight: 700;
            letter-spacing: -0.025em;
            color: var(--text-main);
        }

        /* Sidebar Navigation Menu */
        .sidebar-menu {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.375rem;
            flex-grow: 1;
        }

        .sidebar-item a {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            color: var(--text-muted);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.95rem;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .sidebar-item a svg {
            width: 1.25rem;
            height: 1.25rem;
            stroke-width: 2;
        }

        /* Sidebar hover and active states */
        .sidebar-item a:hover {
            background-color: var(--primary-light);
            color: var(--primary-color);
        }

        .sidebar-item.active a {
            background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
            color: #ffffff;
            box-shadow: 0 4px 12px rgba(59, 70, 241, 0.15);
        }

        .sidebar-item.active a svg {
            color: #ffffff;
        }

        /* Sidebar Footer / Logout button */
        .sidebar-footer {
            border-top: 1px solid var(--border-color);
            padding-top: 1.25rem;
            margin-top: auto;
        }

        .logout-link {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            color: var(--text-muted);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.95rem;
            border-radius: 8px;
            transition: all 0.2s ease;
            cursor: pointer;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
        }

        .logout-link:hover {
            background-color: var(--color-hold-light);
            color: var(--color-hold);
        }

        .logout-link svg {
            width: 1.25rem;
            height: 1.25rem;
            stroke-width: 2;
        }

        /* Main Content Area */
        .main-content {
            margin-left: var(--sidebar-width);
            flex-grow: 1;
            padding: 2rem;
            display: flex;
            flex-direction: column;
            gap: 2rem;
            min-width: 0;
            transition: margin-left 0.3s ease;
        }

        /* Topbar Header Area */
        .topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1.5rem;
            flex-wrap: wrap;
        }

        /* Right section: Admin Profile */
        .topbar-right {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-left: auto;
        }

        /* User Admin profile badge */
        .admin-profile {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            background-color: var(--bg-card);
            padding: 0.375rem 0.875rem 0.375rem 0.375rem;
            border-radius: 50px;
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-sm);
        }

        .avatar-initials {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, #4f46e5, #3b82f6);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-weight: 700;
            font-size: 0.875rem;
            position: relative;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .online-dot {
            width: 10px;
            height: 10px;
            background-color: #10b981;
            border: 2px solid var(--bg-card);
            border-radius: 50%;
            position: absolute;
            bottom: 0;
            right: 0;
        }

        .admin-info {
            display: flex;
            flex-direction: column;
            line-height: 1.2;
        }

        .admin-name {
            font-size: 0.875rem;
            font-weight: 700;
            color: var(--text-main);
        }

        .admin-role {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-weight: 500;
        }

        /* Title Area */
        .dashboard-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            animation: fadeIn 0.5s ease-out;
        }

        .dashboard-title {
            font-size: 1.875rem;
            font-weight: 800;
            letter-spacing: -0.03em;
            color: var(--text-main);
        }

        /* Card Component base styling */
        .card {
            background-color: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            padding: 1.5rem;
            box-shadow: var(--shadow-sm);
            transition: all 0.3s ease;
        }

        /* Filters and Actions Bar above Table */
        .table-actions-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
            margin-bottom: 1.5rem;
            animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Search Form Input */
        .search-form {
            position: relative;
            max-width: 320px;
            width: 100%;
        }

        .search-input {
            width: 100%;
            padding: 0.625rem 1rem 0.625rem 2.5rem;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.875rem;
            color: var(--text-main);
            background-color: var(--bg-card);
            transition: all 0.2s ease;
            box-shadow: var(--shadow-sm);
        }

        .search-input::placeholder {
            color: var(--text-muted);
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(59, 70, 241, 0.15);
        }

        .search-icon {
            position: absolute;
            left: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            pointer-events: none;
            width: 1.125rem;
            height: 1.125rem;
            stroke-width: 2;
        }

        .search-clear-btn {
            position: absolute;
            right: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            border: none;
            background: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.125rem;
            border-radius: 50%;
        }

        .search-clear-btn:hover {
            background-color: var(--primary-light);
            color: var(--primary-color);
        }

        .search-clear-btn svg {
            width: 0.875rem;
            height: 0.875rem;
        }

        /* Add Project Button styling */
        .add-project-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background-color: var(--primary-color);
            color: #ffffff;
            padding: 0.625rem 1.125rem;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 700;
            text-decoration: none;
            box-shadow: 0 4px 6px -1px rgba(59, 70, 241, 0.1), 0 2px 4px -1px rgba(59, 70, 241, 0.06);
            transition: all 0.2s ease;
            cursor: pointer;
            border: none;
        }

        .add-project-btn:hover {
            background-color: var(--primary-hover);
            box-shadow: 0 10px 15px -3px rgba(59, 70, 241, 0.2), 0 4px 6px -2px rgba(59, 70, 241, 0.1);
        }

        .add-project-btn svg {
            width: 1.125rem;
            height: 1.125rem;
            stroke-width: 2.5;
        }

        /* Table Card & Responsive container */
        .table-card {
            padding: 0;
            overflow: hidden;
            animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .table-responsive {
            width: 100%;
            overflow-x: auto;
        }

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

        .projects-table th {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            font-weight: 700;
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            background-color: #fafafb;
        }

        .projects-table td {
            padding: 1.1rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            font-size: 0.9rem;
            color: var(--text-label);
        }

        .projects-table tr:last-child td {
            border-bottom: none;
        }

        .projects-table tbody tr {
            transition: background-color 0.2s ease;
        }

        .projects-table tbody tr:hover {
            background-color: #fafafb;
        }

        .project-name-bold {
            font-weight: 700;
            color: var(--text-main);
        }

        .client-name-text {
            color: var(--text-muted);
            font-weight: 500;
        }

        /* Type Badges */
        .type-badge {
            display: inline-flex;
            align-items: center;
            padding: 0.25rem 0.625rem;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 700;
            background-color: var(--bg-main);
            color: var(--text-muted);
            border: 1px solid var(--border-color);
        }

        /* Status Badges */
        .status-badge {
            display: inline-flex;
            align-items: center;
            padding: 0.25rem 0.625rem;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 700;
        }

        .status-completed {
            background-color: var(--color-completed-light);
            color: var(--color-completed);
        }

        .status-inprogress {
            background-color: var(--color-progress-light);
            color: var(--color-progress);
        }

        .status-pending {
            background-color: var(--color-pending-light);
            color: var(--color-pending);
        }

        .status-hold {
            background-color: var(--color-hold-light);
            color: var(--color-hold);
        }

        /* Action Buttons */
        .action-buttons-wrap {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .action-icon-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            background-color: var(--bg-card);
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
        }

        .action-icon-edit:hover {
            color: var(--primary-color);
            border-color: var(--primary-color);
            background-color: var(--primary-light);
        }

        .action-icon-delete:hover {
            color: var(--color-hold);
            border-color: var(--color-hold);
            background-color: var(--color-hold-light);
        }

        .action-icon-btn svg {
            width: 1.125rem;
            height: 1.125rem;
            stroke-width: 2;
        }

        /* Footer Pagination styling */
        .table-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.25rem 1.5rem;
            border-top: 1px solid var(--border-color);
            background-color: #fafafb;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .showing-text {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-weight: 600;
        }

        .pagination {
            display: flex;
            align-items: center;
            list-style: none;
            gap: 0.25rem;
        }

        .page-item a, .page-item span {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 32px;
            height: 32px;
            padding: 0 0.5rem;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-label);
            text-decoration: none;
            border: 1px solid var(--border-color);
            background-color: var(--bg-card);
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .page-item.active span {
            background-color: var(--primary-light);
            color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .page-item a:hover {
            border-color: var(--border-hover);
            background-color: var(--bg-main);
        }

        .page-item.disabled span {
            color: #cbd5e1;
            background-color: #f1f5f9;
            cursor: not-allowed;
            border-color: #e2e8f0;
        }

        .page-item svg {
            width: 0.875rem;
            height: 0.875rem;
            stroke-width: 2.5;
        }

        /* Alert notifications */
        .alert-success {
            background-color: var(--color-completed-light);
            border-left: 4px solid var(--color-completed);
            padding: 1rem;
            border-radius: 8px;
            margin-bottom: 1.5rem;
            box-shadow: var(--shadow-sm);
            display: flex;
            align-items: center;
            font-size: 0.875rem;
            font-weight: 600;
            color: #065f46;
            animation: fadeIn 0.4s ease-out;
        }

        .alert-success svg {
            width: 1.25rem;
            height: 1.25rem;
            margin-right: 0.5rem;
            color: var(--color-completed);
        }

        /* General Animation keyframes */
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(16px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .sidebar {
                transform: translateX(-100%);
            }
            .main-content {
                margin-left: 0;
                padding: 1.5rem;
            }
        }

        @media (max-width: 640px) {
            .table-actions-bar {
                flex-direction: column;
                align-items: stretch;
            }
            .search-form {
                max-width: 100%;
            }
            .add-project-btn {
                justify-content: center;
            }
            .table-footer {
                flex-direction: column;
                align-items: center;
            }
        }
    </style>
</head>
<body>

    <div class="dashboard-layout">
        
        <!-- ==========================================
             LEFT SIDEBAR NAVIGATION
             ========================================== -->
        <aside id="dashboard-sidebar" class="sidebar">
            <div>
                <a href="<?php echo e(route('dashboard')); ?>" class="sidebar-brand">
                    <div class="brand-logo-box">
                        <svg style="width: 1.25rem; height: 1.25rem;" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                            <path stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path>
                        </svg>
                    </div>
                    <span class="brand-name">TASK PANEL</span>
                </a>

                <!-- Navigation List Menu -->
                <ul class="sidebar-menu">
                    <li class="sidebar-item">
                        <a href="<?php echo e(route('dashboard')); ?>">
                            <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                <path stroke-linecap="round" stroke-linejoin="round" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path>
                            </svg>
                            <span>Dashboard</span>
                        </a>
                    </li>
                    <li class="sidebar-item">
                        <a href="<?php echo e(route('users.index')); ?>">
                            <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                <path stroke-linecap="round" stroke-linejoin="round" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a3 3 0 11-6 0 3 3 0 016 0z"></path>
                            </svg>
                            <span>Users</span>
                        </a>
                    </li>
                    <li class="sidebar-item active">
                        <a href="<?php echo e(route('projects.index')); ?>">
                            <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                <path stroke-linecap="round" stroke-linejoin="round" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path>
                            </svg>
                            <span>Projects</span>
                        </a>
                    </li>
                    <li class="sidebar-item">
                        <a href="#">
                            <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                <path stroke-linecap="round" stroke-linejoin="round" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10a2 2 0 01-2 2h-2a2 2 0 01-2-2zm9-1v-4a2 2 0 00-2-2h-2a2 2 0 00-2 2v4a2 2 0 002 2h2a2 2 0 002-2z"></path>
                            </svg>
                            <span>Reports</span>
                        </a>
                    </li>
                    <li class="sidebar-item">
                        <a href="#">
                            <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                <path stroke-linecap="round" stroke-linejoin="round" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path>
                                <circle cx="12" cy="12" r="3"></circle>
                            </svg>
                            <span>Settings</span>
                        </a>
                    </li>
                </ul>
            </div>

            <!-- Logout Link Button -->
            <div class="sidebar-footer">
                <form method="POST" action="<?php echo e(route('logout')); ?>" id="logout-form" style="display: none;">
                    <?php echo csrf_field(); ?>
                </form>
                <button class="logout-link" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                    <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                        <path stroke-linecap="round" stroke-linejoin="round" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path>
                    </svg>
                    <span>Logout</span>
                </button>
            </div>
        </aside>

        <!-- ==========================================
             RIGHT MAIN CONTENT AREA
             ========================================== -->
        <main class="main-content">
            
            <!-- Topbar Header Area -->
            <div class="topbar">
                
                <!-- Left side: Page Title -->
                <div class="dashboard-header">
                    <h1 class="dashboard-title">Projects</h1>
                </div>

                <!-- Right top elements calendar picker & profile -->
                <div class="topbar-right">
                    
                    <!-- Admin Profile Card -->
                    <div class="admin-profile">
                        <div class="avatar-initials">
                            AD
                            <span class="online-dot"></span>
                        </div>
                        <div class="admin-info">
                            <span class="admin-name">Admin</span>
                            <span class="admin-role">Super Admin</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Status Alerts -->
            <?php if(session('success')): ?>
                <div class="alert-success">
                    <svg fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                        <path stroke-linecap="round" stroke-linejoin="round" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
                    </svg>
                    <span><?php echo e(session('success')); ?></span>
                </div>
            <?php endif; ?>

            <!-- Main Listing Card -->
            <div class="card table-card">
                
                <!-- Actions Bar: Search and "+ Add Project" -->
                <div style="padding: 1.5rem 1.5rem 0 1.5rem;">
                    <div class="table-actions-bar">
                        <!-- Search Form (filters table) -->
                        <form method="GET" action="<?php echo e(route('projects.index')); ?>" class="search-form">
                            <svg class="search-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
                            </svg>
                            <input type="text" name="search" value="<?php echo e($search); ?>" class="search-input" placeholder="Search projects...">
                            
                            <?php if(!empty($search)): ?>
                                <button type="button" class="search-clear-btn" onclick="window.location.href='<?php echo e(route('projects.index')); ?>'" title="Clear search">
                                    <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                        <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path>
                                    </svg>
                                </button>
                            <?php endif; ?>
                        </form>

                        <!-- Add Project Link Button -->
                        <a href="<?php echo e(route('projects.create')); ?>" class="add-project-btn">
                            <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                <path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4"></path>
                            </svg>
                            <span>Add Project</span>
                        </a>
                    </div>
                </div>

                <!-- Table View -->
                <div class="table-responsive">
                    <table class="projects-table">
                        <thead>
                            <tr>
                                <th style="width: 80px;">S.No.</th>
                                <th>Project Name</th>
                                <th>Type (App/Web)</th>
                                <th>Client / Category</th>
                                <th>Status</th>
                                <th style="width: 120px;">Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__empty_1 = true; $__currentLoopData = $projects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $project): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                <tr>
                                    <td>
                                        <span style="font-weight: 700; color: var(--text-muted);"><?php echo e($index + 1); ?></span>
                                    </td>
                                    <td>
                                        <span class="project-name-bold"><?php echo e($project['name']); ?></span>
                                    </td>
                                    <td>
                                        <span class="type-badge"><?php echo e($project['type']); ?></span>
                                    </td>
                                    <td>
                                        <span class="client-name-text"><?php echo e($project['client']); ?></span>
                                    </td>
                                    <td>
                                        <?php
                                            $statusClass = 'inprogress';
                                            $statusLower = strtolower(str_replace(' ', '', $project['status']));
                                            if ($statusLower === 'completed') $statusClass = 'completed';
                                            elseif ($statusLower === 'pending') $statusClass = 'pending';
                                            elseif ($statusLower === 'onhold') $statusClass = 'hold';
                                        ?>
                                        <span class="status-badge status-<?php echo e($statusClass); ?>">
                                            <?php echo e($project['status']); ?>

                                        </span>
                                    </td>
                                    <td>
                                        <div class="action-buttons-wrap">
                                            <!-- Edit Mock button -->
                                            <a href="#" class="action-icon-btn action-icon-edit" onclick="alert('Mock Edit clicked for Project: <?php echo e($project['name']); ?>'); return false;" title="Edit project">
                                                <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                                    <path stroke-linecap="round" stroke-linejoin="round" d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"></path>
                                                </svg>
                                            </a>
                                            <!-- Delete button -->
                                            <a href="<?php echo e(route('projects.delete', $project['name'])); ?>" 
                                               class="action-icon-btn action-icon-delete" 
                                               onclick="return confirm('Are you sure you want to delete project: <?php echo e($project['name']); ?>?');"
                                               title="Delete project">
                                                <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                                    <path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path>
                                                </svg>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <tr>
                                    <td colspan="6" style="text-align: center; padding: 3rem 1.5rem; color: var(--text-muted);">
                                        <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
                                            <svg style="width: 2.5rem; height: 2.5rem; color: #cbd5e1;" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                                <path stroke-linecap="round" stroke-linejoin="round" d="M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
                                            </svg>
                                            <span style="font-weight: 600; font-size: 0.95rem;">No projects found</span>
                                            <span style="font-size: 0.85rem;">Try adjusting your keywords or clear search filters.</span>
                                        </div>
                                    </td>
                                </tr>
                            <?php endif; ?>
                        </tbody>
                    </table>
                </div>

                <!-- Footer Pagination -->
                <div class="table-footer">
                    <span class="showing-text">
                        Showing 1 to <?php echo e(count($projects)); ?> of <?php echo e(count(session('projects_list', []))); ?> projects
                    </span>
                    
                    <ul class="pagination">
                        <li class="page-item disabled">
                            <span>
                                <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                    <path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"></path>
                                </svg>
                            </span>
                        </li>
                        <li class="page-item active">
                            <span>1</span>
                        </li>
                        <li class="page-item">
                            <a href="#" onclick="alert('Mock page navigation'); return false;">2</a>
                        </li>
                        <li class="page-item">
                            <a href="#" onclick="alert('Mock page navigation'); return false;">3</a>
                        </li>
                        <li class="page-item">
                            <a href="#" onclick="alert('Mock page navigation'); return false;">4</a>
                        </li>
                        <li class="page-item">
                            <a href="#" onclick="alert('Mock page navigation'); return false;">
                                <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                    <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"></path>
                                </svg>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </main>
    </div>

</body>
</html>
<?php /**PATH D:\New\New\admin-panel\resources\views/projects/project.blade.php ENDPATH**/ ?>