<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dashboard - 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 (Zero external assets required, pure Vanilla CSS) -->
    <style>
        /* CSS Custom Variables (Consistent with login theme) */
        :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;

            /* Metrics 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;
            --color-purple: #8b5cf6;
            --color-purple-light: #f5f3ff;
            
            --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;
        }

        /* Scrollbar customization */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        ::-webkit-scrollbar-track {
            background: transparent;
        }
        ::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

        /* 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;
            transition: stroke 0.2s ease;
        }

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

        .sidebar-item a:hover svg {
            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 close button (mobile only) */
        .sidebar-close-btn {
            display: none;
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            position: absolute;
            top: 1.5rem;
            right: 1rem;
        }

        .sidebar-close-btn svg {
            width: 1.5rem;
            height: 1.5rem;
        }

        /* 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 Panel 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;
        }

        /* Left section: Hamburger (mobile), title badge */
        .topbar-left {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .menu-toggle-btn {
            display: none;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            width: 40px;
            height: 40px;
            border-radius: 8px;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text-label);
            transition: all 0.2s ease;
        }

        .menu-toggle-btn:hover {
            background-color: var(--primary-light);
            color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .menu-toggle-btn svg {
            width: 1.25rem;
            height: 1.25rem;
        }

        /* Top badge capsule e.g. "2. Dashboard" */
        .top-badge {
            background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
            color: #ffffff;
            padding: 0.5rem 1rem;
            border-radius: 9999px;
            font-size: 0.875rem;
            font-weight: 700;
            box-shadow: 0 4px 10px rgba(59, 70, 241, 0.15);
            display: flex;
            align-items: center;
            gap: 0.375rem;
        }

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

        /* Datepicker Dropdown Trigger Button */
        .datepicker-trigger {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background-color: var(--bg-card);
            border: 1px solid var(--border-color);
            padding: 0.625rem 1rem;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text-label);
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: var(--shadow-sm);
        }

        .datepicker-trigger:hover {
            border-color: var(--border-hover);
            background-color: #fafafb;
        }

        .datepicker-trigger svg {
            width: 1.125rem;
            height: 1.125rem;
            color: var(--primary-color);
        }

        /* 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);
        }

        /* Pure CSS avatar (Initial-based gradient fallback) */
        .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 indicator dot */
        .online-dot {
            width: 10px;
            height: 10px;
            background-color: #10b981;
            border: 2px solid var(--bg-card);
            border-radius: 50%;
            position: absolute;
            bottom: 0;
            right: 0;
            animation: pulse-green 2s infinite;
        }

        @keyframes pulse-green {
            0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
            70% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
            100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 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;
        }

        /* Welcome Section Header block */
        .dashboard-header {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            animation: fadeIn 0.5s ease-out;
        }

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

        .dashboard-subtitle {
            font-size: 0.95rem;
            color: var(--text-muted);
            font-weight: 500;
        }

        /* 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;
        }

        .card:hover {
            box-shadow: var(--shadow-md);
            border-color: var(--border-hover);
        }

        .card-title {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 1.25rem;
            letter-spacing: -0.01em;
        }

        /* Metrics summary cards grid layout */
        .metrics-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1.25rem;
            animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Themed metric icon circular frames */
        .metric-icon-box {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            transition: transform 0.3s ease;
        }

        .metric-card:hover .metric-icon-box {
            transform: scale(1.1);
        }

        .metric-icon-box svg {
            width: 1.5rem;
            height: 1.5rem;
            stroke-width: 2;
        }

        /* Stat numbers and trends styling */
        .metric-label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 0.25rem;
        }

        .metric-value {
            font-size: 1.75rem;
            font-weight: 800;
            color: var(--text-main);
            line-height: 1.1;
            margin-bottom: 0.5rem;
        }

        .metric-trend {
            font-size: 0.75rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        /* Theme application rules */
        .theme-blue {
            background-color: var(--color-progress-light);
            color: var(--color-progress);
        }
        .theme-purple {
            background-color: var(--color-purple-light);
            color: var(--color-purple);
        }
        .theme-orange {
            background-color: var(--color-pending-light);
            color: var(--color-pending);
        }
        .theme-green {
            background-color: var(--color-completed-light);
            color: var(--color-completed);
        }

        .trend-positive {
            color: var(--color-completed);
        }

        /* Middle Charts panel layout */
        .charts-grid {
            display: grid;
            grid-template-columns: 1.1fr 0.9fr;
            gap: 1.5rem;
            animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Donut Chart visual design */
        .donut-container {
            display: flex;
            align-items: center;
            justify-content: space-around;
            gap: 1.5rem;
            flex-wrap: wrap;
            padding: 0.5rem 0;
        }

        .donut-chart-wrapper {
            position: relative;
            width: 160px;
            height: 160px;
        }

        .donut-chart-wrapper svg {
            width: 100%;
            height: 100%;
            transform: rotate(-90deg);
        }

        /* Center details in Donut hole */
        .donut-center-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            display: flex;
            flex-direction: column;
            line-height: 1;
        }

        .donut-number {
            font-size: 1.75rem;
            font-weight: 800;
            color: var(--text-main);
        }

        .donut-label {
            font-size: 0.7rem;
            color: var(--text-muted);
            font-weight: 600;
            margin-top: 0.125rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        /* SVG Circle paths for slice rendering */
        .donut-slice {
            fill: transparent;
            stroke-width: 18;
            stroke-linecap: butt; /* clean edge cut overlay */
            transition: stroke-width 0.2s ease, filter 0.2s ease;
            cursor: pointer;
        }

        .donut-slice:hover {
            stroke-width: 21;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
        }

        /* Keyframes for loading circular charts */
        @keyframes draw-completed { from { stroke-dasharray: 0 439.8; } to { stroke-dasharray: 231.7 439.8; } }
        @keyframes draw-progress { from { stroke-dasharray: 0 439.8; } to { stroke-dasharray: 87.5 439.8; } }
        @keyframes draw-pending { from { stroke-dasharray: 0 439.8; } to { stroke-dasharray: 87.5 439.8; } }
        @keyframes draw-hold { from { stroke-dasharray: 0 439.8; } to { stroke-dasharray: 33.1 439.8; } }

        .slice-completed {
            stroke: var(--color-completed);
            animation: draw-completed 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }
        .slice-progress {
            stroke: var(--color-progress);
            animation: draw-progress 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }
        .slice-pending {
            stroke: var(--color-pending);
            animation: draw-pending 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }
        .slice-hold {
            stroke: var(--color-hold);
            animation: draw-hold 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }

        /* Legend items inside donut view */
        .donut-legend {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            min-width: 180px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            transition: background-color 0.2s ease;
        }

        .legend-item:hover {
            background-color: var(--bg-main);
        }

        .legend-left {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-label);
        }

        .legend-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .legend-right {
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-main);
            text-align: right;
        }

        .legend-percentage {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-weight: 500;
            margin-left: 0.25rem;
        }

        /* Vertical Bar Chart layout design */
        .bar-chart-container {
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            height: 200px;
            position: relative;
            padding-top: 1.5rem;
        }

        /* Horizontal Y-Axis Guideline grids */
        .bar-chart-gridlines {
            position: absolute;
            inset: 1.5rem 0 1.75rem 24px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            pointer-events: none;
            z-index: 1;
        }

        .gridline {
            width: 100%;
            border-bottom: 1px dashed var(--border-color);
            position: relative;
        }

        .gridline-label {
            position: absolute;
            left: -24px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--text-muted);
        }

        /* Columns alignment inside wrapper */
        .bar-chart-plot {
            position: relative;
            z-index: 5;
            display: flex;
            justify-content: space-around;
            align-items: flex-end;
            height: 100%;
            margin-left: 24px; /* Space for Y-axis labels */
            padding-bottom: 0.25rem;
        }

        .bar-column {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 50px;
            height: 100%;
            justify-content: flex-end;
        }

        .bar-value {
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 0.25rem;
            opacity: 0;
            transform: translateY(4px);
            animation: showValue 0.5s ease-out 0.8s forwards;
        }

        /* Bar visual column with top curve gradient */
        .bar-pill {
            width: 24px;
            border-radius: 4px 4px 0 0;
            position: relative;
            transition: all 0.3s ease;
            cursor: pointer;
            height: 0; /* Animated dynamically below */
        }

        .bar-pill:hover {
            transform: scaleX(1.15);
            filter: brightness(1.05);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        }

        /* Keyframes for vertical growing animation */
        @keyframes grow-bar-completed { from { height: 0; } to { height: 98%; } }
        @keyframes grow-bar-progress { from { height: 0; } to { height: 37%; } }
        @keyframes grow-bar-pending { from { height: 0; } to { height: 37%; } }
        @keyframes grow-bar-hold { from { height: 0; } to { height: 14%; } }

        .bar-completed {
            background: linear-gradient(to top, var(--color-completed), #34d399);
            animation: grow-bar-completed 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        .bar-progress {
            background: linear-gradient(to top, var(--color-progress), #60a5fa);
            animation: grow-bar-progress 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        .bar-pending {
            background: linear-gradient(to top, var(--color-pending), #fbbf24);
            animation: grow-bar-pending 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        .bar-hold {
            background: linear-gradient(to top, var(--color-hold), #f87171);
            animation: grow-bar-hold 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        .bar-label {
            font-size: 0.725rem;
            font-weight: 700;
            color: var(--text-muted);
            margin-top: 0.5rem;
            text-align: center;
            white-space: nowrap;
        }

        @keyframes showValue {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Bottom lists/tables layout */
        .bottom-grid {
            display: grid;
            grid-template-columns: 1.2fr 0.8fr;
            gap: 1.5rem;
            margin-bottom: 2rem;
            animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Table design customization */
        .table-responsive {
            width: 100%;
            overflow-x: auto;
        }

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

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

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

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

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

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

        /* Flex cell for dot indicator align */
        .task-name-cell {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
            color: var(--text-main);
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .project-tag {
            color: var(--text-muted);
            font-weight: 500;
        }

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

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

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

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

        /* Recent Users item list layout */
        .users-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .user-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding: 0.5rem;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .user-item:hover {
            background-color: #fafafb;
        }

        .user-meta-left {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        /* Clean circular profile avatar grids with unique user initial colors */
        .user-avatar-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-weight: 700;
            font-size: 0.875rem;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        /* Individual user gradient classes to eliminate external images */
        .avatar-rahul { background: linear-gradient(135deg, #4f46e5, #6366f1); }
        .avatar-anjali { background: linear-gradient(135deg, #a855f7, #c084fc); }
        .avatar-vikram { background: linear-gradient(135deg, #0d9488, #14b8a6); }
        .avatar-priya { background: linear-gradient(135deg, #db2777, #f472b6); }

        .user-details {
            display: flex;
            flex-direction: column;
            line-height: 1.25;
        }

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

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

        .user-role-badge {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-muted);
            background-color: var(--bg-main);
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            border: 1px solid var(--border-color);
        }

        /* Mobile Sidebar Backdrop shadow */
        .sidebar-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            background-color: rgba(15, 23, 42, 0.4);
            backdrop-filter: blur(4px);
            z-index: 90;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .sidebar-backdrop.active {
            display: block;
            opacity: 1;
        }

        /* 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 STYLES (Mobile / Tablet adaptations)
           ========================================================================== */
        @media (max-width: 1024px) {
            .sidebar {
                transform: translateX(-100%);
            }
            
            .sidebar.active {
                transform: translateX(0);
                box-shadow: var(--shadow-lg);
            }

            .sidebar-close-btn {
                display: block;
            }

            .main-content {
                margin-left: 0;
                padding: 1.5rem;
            }

            .menu-toggle-btn {
                display: flex;
            }

            .metrics-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .charts-grid {
                grid-template-columns: 1fr;
            }
        }

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

            .bottom-grid {
                grid-template-columns: 1fr;
            }

            .topbar-right {
                width: 100%;
                justify-content: space-between;
                margin-top: 0.5rem;
            }

            .datepicker-trigger, .admin-profile {
                flex-grow: 1;
                justify-content: center;
            }

            .donut-container {
                flex-direction: column;
                align-items: center;
            }
        }
    </style>
</head>
<body>

    <!-- Backdrop overlay for mobile sidebar drawer -->
    <div id="sidebar-backdrop" class="sidebar-backdrop"></div>

    <div class="dashboard-layout">
        
        <!-- ==========================================
             LEFT SIDEBAR NAVIGATION
             ========================================== -->
        <aside id="dashboard-sidebar" class="sidebar">
            <!-- Sidebar Close Button (Mobile Only) -->
            <button id="sidebar-close" class="sidebar-close-btn" aria-label="Close sidebar">
                <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>

            <!-- Brand Logo Header -->
            <div>
                <a href="#" class="sidebar-brand">
                    <div class="brand-logo-box">
                        <!-- Custom Task Panel SVG Icon -->
                        <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 active">
                        <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">
                        <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="<?php echo e(route('profile.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" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path>
                            </svg>
                            <span>Profile</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 id="logout-btn" 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">
            
            <!-- Top Navigation / Search bar / Avatar Profile row -->
            <div class="topbar">
                
                <!-- Left side: Page Title -->
                <div class="dashboard-header">
                    <h1 class="dashboard-title">Dashboard</h1>
                    <p class="dashboard-subtitle">Welcome back, Admin 👋</p>
                </div>

                <!-- Right top elements calendar picker & profile -->
                <div class="topbar-right">
                    
                    <!-- Date Picker Dropdown Trigger -->
                    <button id="datepicker-btn" class="datepicker-trigger">
                        <!-- Calendar SVG Icon -->
                        <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
                        </svg>
                        <span>02 May 2025</span>
                        <!-- Down Arrow Icon -->
                        <svg style="width: 0.875rem; height: 0.875rem; color: var(--text-muted);" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M19 9l-7 7-7-7"></path>
                        </svg>
                    </button>

                    <!-- Admin Profile Card -->
                    <div class="admin-profile">
                        <!-- CSS avatar with AD initials -->
                        <div class="avatar-initials">
                            <?php echo e(strtoupper(substr(session('admin_name', 'Admin'), 0, 2))); ?>

                            <span class="online-dot"></span>
                        </div>
                        <div class="admin-info">
                            <span class="admin-name"><?php echo e(session('admin_name', 'Admin')); ?></span>
                            <span class="admin-role">Super Admin</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- ==========================================
                 1. STATISTICS SUMMARY CARDS GRID
                 ========================================== -->
            <section class="metrics-grid">
                
                <!-- Card 1: Total Users -->
                <div class="card metric-card">
                    <div class="metric-icon-box theme-blue">
                        <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 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
                        </svg>
                    </div>
                    <div class="metric-label">Total Users</div>
                    <div class="metric-value">25</div>
                    <div class="metric-trend trend-positive">+3 this month</div>
                </div>

                <!-- Card 2: Total Projects -->
                <div class="card metric-card">
                    <div class="metric-icon-box theme-purple">
                        <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>
                    </div>
                    <div class="metric-label">Total Projects</div>
                    <div class="metric-value">12</div>
                    <div class="metric-trend trend-positive">+2 this month</div>
                </div>

                <!-- Card 3: Total Tasks -->
                <div class="card metric-card">
                    <div class="metric-icon-box theme-orange">
                        <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 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-3 7h3m-3 4h3m-6-4h.01M9 16h.01"></path>
                        </svg>
                    </div>
                    <div class="metric-label">Total Tasks</div>
                    <div class="metric-value">186</div>
                    <div class="metric-trend trend-positive">+18 this week</div>
                </div>

                <!-- Card 4: Completed Tasks -->
                <div class="card metric-card">
                    <div class="metric-icon-box theme-green">
                        <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 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
                        </svg>
                    </div>
                    <div class="metric-label">Completed Tasks</div>
                    <div class="metric-value">98</div>
                    <div class="metric-trend trend-positive">52.68%</div>
                </div>
            </section>

            <!-- ==========================================
                 2. CHARTS SECTION (DONUT & BAR CHART)
                 ========================================== -->
            <section class="charts-grid">
                
                <!-- Card 1: Task Progress Overview (Donut Chart) -->
                <div class="card">
                    <h2 class="card-title">Task Progress Overview</h2>
                    
                    <div class="donut-container">
                        <!-- Left: Circular Animated SVG Donut Chart -->
                        <div class="donut-chart-wrapper">
                            <svg viewBox="0 0 200 200">
                                <!-- Background Circle track -->
                                <circle cx="100" cy="100" r="70" fill="transparent" stroke="#f1f5f9" stroke-width="18" />
                                
                                <!-- Completed (52.68%) - Dashoffset 0 -->
                                <circle class="donut-slice slice-completed" cx="100" cy="100" r="70" 
                                        stroke-dasharray="231.7 439.8" stroke-dashoffset="0" />
                                
                                <!-- In Progress (19.89%) - Dashoffset starts at Completed (231.7) -->
                                <circle class="donut-slice slice-progress" cx="100" cy="100" r="70" 
                                        stroke-dasharray="87.5 439.8" stroke-dashoffset="-231.7" />
                                
                                <!-- Pending (19.89%) - Dashoffset starts at Completed+InProgress (319.2) -->
                                <circle class="donut-slice slice-pending" cx="100" cy="100" r="70" 
                                        stroke-dasharray="87.5 439.8" stroke-dashoffset="-319.2" />
                                
                                <!-- Hold (7.53%) - Dashoffset starts at Completed+InProgress+Pending (406.7) -->
                                <circle class="donut-slice slice-hold" cx="100" cy="100" r="70" 
                                        stroke-dasharray="33.1 439.8" stroke-dashoffset="-406.7" />
                            </svg>
                            
                            <!-- Central Label Display -->
                            <div class="donut-center-text">
                                <span class="donut-number">186</span>
                                <span class="donut-label">Total Tasks</span>
                            </div>
                        </div>

                        <!-- Right: Legend with matching color nodes -->
                        <div class="donut-legend">
                            <div class="legend-item">
                                <div class="legend-left">
                                    <span class="legend-dot" style="background-color: var(--color-completed);"></span>
                                    <span>Completed</span>
                                </div>
                                <div class="legend-right">
                                    <span>98</span><span class="legend-percentage">(52.68%)</span>
                                </div>
                            </div>
                            <div class="legend-item">
                                <div class="legend-left">
                                    <span class="legend-dot" style="background-color: var(--color-progress);"></span>
                                    <span>In Progress</span>
                                </div>
                                <div class="legend-right">
                                    <span>37</span><span class="legend-percentage">(19.89%)</span>
                                </div>
                            </div>
                            <div class="legend-item">
                                <div class="legend-left">
                                    <span class="legend-dot" style="background-color: var(--color-pending);"></span>
                                    <span>Pending</span>
                                </div>
                                <div class="legend-right">
                                    <span>37</span><span class="legend-percentage">(19.89%)</span>
                                </div>
                            </div>
                            <div class="legend-item">
                                <div class="legend-left">
                                    <span class="legend-dot" style="background-color: var(--color-hold);"></span>
                                    <span>Hold</span>
                                </div>
                                <div class="legend-right">
                                    <span>14</span><span class="legend-percentage">(7.53%)</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


                <div class="card">
                    <h2 class="card-title">Tasks by Status</h2>
                    
                    <div class="bar-chart-container">
                        <!-- Horizontal Gridlines background -->
                        <div class="bar-chart-gridlines">
                            <div class="gridline"><span class="gridline-label">100</span></div>
                            <div class="gridline"><span class="gridline-label">75</span></div>
                            <div class="gridline"><span class="gridline-label">50</span></div>
                            <div class="gridline"><span class="gridline-label">25</span></div>
                            <div class="gridline" style="border-bottom: 1px solid var(--border-color);"><span class="gridline-label">0</span></div>
                        </div>

                        <!-- Bar Plot columns -->
                        <div class="bar-chart-plot">
                            <!-- Completed Bar -->
                            <div class="bar-column">
                                <span class="bar-value">98</span>
                                <div class="bar-pill bar-completed" title="Completed: 98"></div>
                                <span class="bar-label">Completed</span>
                            </div>
                            
                            <!-- In Progress Bar -->
                            <div class="bar-column">
                                <span class="bar-value">37</span>
                                <div class="bar-pill bar-progress" title="In Progress: 37"></div>
                                <span class="bar-label">In Progress</span>
                            </div>
                            
                            <!-- Pending Bar -->
                            <div class="bar-column">
                                <span class="bar-value">37</span>
                                <div class="bar-pill bar-pending" title="Pending: 37"></div>
                                <span class="bar-label">Pending</span>
                            </div>
                            
                            <!-- Hold Bar -->
                            <div class="bar-column">
                                <span class="bar-value">14</span>
                                <div class="bar-pill bar-hold" title="Hold: 14"></div>
                                <span class="bar-label">Hold</span>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <section class="bottom-grid">
                
                <!-- Card 1: Recent Tasks Table -->
                <div class="card">
                    <h2 class="card-title">Recent Tasks</h2>
                    
                    <div class="table-responsive">
                        <table class="tasks-table">
                            <thead>
                                <tr>
                                    <th>Task Name</th>
                                    <th>Project</th>
                                    <th>Status</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        <div class="task-name-cell">
                                            <span class="status-dot" style="background-color: var(--color-completed);"></span>
                                            <span>Login API Integration</span>
                                        </div>
                                    </td>
                                    <td><span class="project-tag">Website</span></td>
                                    <td><span class="badge badge-progress">In Progress</span></td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="task-name-cell">
                                            <span class="status-dot" style="background-color: var(--color-pending);"></span>
                                            <span>Dashboard UI Design</span>
                                        </div>
                                    </td>
                                    <td><span class="project-tag">Project Admin Panel</span></td>
                                    <td><span class="badge badge-progress">In Progress</span></td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="task-name-cell">
                                            <span class="status-dot" style="background-color: var(--color-pending);"></span>
                                            <span>User Management Module</span>
                                        </div>
                                    </td>
                                    <td><span class="project-tag">Project Admin Panel</span></td>
                                    <td><span class="badge badge-completed">Completed</span></td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="task-name-cell">
                                            <span class="status-dot" style="background-color: var(--color-hold);"></span>
                                            <span>Notification System</span>
                                        </div>
                                    </td>
                                    <td><span class="project-tag">Project Mobile App</span></td>
                                    <td><span class="badge badge-pending">Pending</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <!-- Card 2: Recent Users List -->
                <div class="card">
                    <h2 class="card-title">Recent Users</h2>
                    
                    <div class="users-list">
                        <!-- User 1: Rahul Sharma -->
                        <div class="user-item">
                            <div class="user-meta-left">
                                <div class="user-avatar-circle avatar-rahul">RS</div>
                                <div class="user-details">
                                    <span class="user-fullname">Rahul Sharma</span>
                                    <span class="user-email">rahul@gmail.com</span>
                                </div>
                            </div>
                            <span class="user-role-badge">Developer</span>
                        </div>

                        <!-- User 2: Anjali Verma -->
                        <div class="user-item">
                            <div class="user-meta-left">
                                <div class="user-avatar-circle avatar-anjali">AV</div>
                                <div class="user-details">
                                    <span class="user-fullname">Anjali Verma</span>
                                    <span class="user-email">anjali@gmail.com</span>
                                </div>
                            </div>
                            <span class="user-role-badge">Designer</span>
                        </div>

                        <!-- User 3: Vikram Singh -->
                        <div class="user-item">
                            <div class="user-meta-left">
                                <div class="user-avatar-circle avatar-vikram">VS</div>
                                <div class="user-details">
                                    <span class="user-fullname">Vikram Singh</span>
                                    <span class="user-email">vikram@gmail.com</span>
                                </div>
                            </div>
                            <span class="user-role-badge">Tester</span>
                        </div>

                        <!-- User 4: Priya Patel -->
                        <div class="user-item">
                            <div class="user-meta-left">
                                <div class="user-avatar-circle avatar-priya">PP</div>
                                <div class="user-details">
                                    <span class="user-fullname">Priya Patel</span>
                                    <span class="user-email">priya@gmail.com</span>
                                </div>
                            </div>
                            <span class="user-role-badge">Developer</span>
                        </div>
                    </div>
                </div>
            </section>
        </main>
    </div>

    <!-- JavaScript code block for interactions -->
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Sidebar selectors
            const sidebar = document.getElementById('dashboard-sidebar');
            const sidebarToggle = document.getElementById('sidebar-toggle');
            const sidebarClose = document.getElementById('sidebar-close');
            const sidebarBackdrop = document.getElementById('sidebar-backdrop');
            
            // Function to toggle sidebar active drawer state
            function toggleSidebar() {
                sidebar.classList.toggle('active');
                sidebarBackdrop.classList.toggle('active');
            }
            
            // Register drawer event listeners
            if (sidebarToggle) {
                sidebarToggle.addEventListener('click', toggleSidebar);
            }
            if (sidebarClose) {
                sidebarClose.addEventListener('click', toggleSidebar);
            }
            if (sidebarBackdrop) {
                sidebarBackdrop.addEventListener('click', toggleSidebar);
            }

            // Simple notification calendar picker trigger logic
            const datepickerBtn = document.getElementById('datepicker-btn');
            if (datepickerBtn) {
                datepickerBtn.addEventListener('click', function() {
                    alert('Filter by date: 02 May 2025');
                });
            }

            // Interactive Donut Slice highlight hover logic
            const slices = document.querySelectorAll('.donut-slice');
            slices.forEach(slice => {
                slice.addEventListener('mouseenter', () => {
                    const value = slice.getAttribute('title');
                });
            });
        });
    </script>
</body>
</html>
<?php /**PATH D:\New\New\admin-panel\resources\views/dashboard/dashboard.blade.php ENDPATH**/ ?>