<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dashboard | CAC Gambia Admin</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-color: #ff6b35;
            --secondary-color: #004e64;
            --sidebar-width: 250px;
        }
        body {
            background: #f5f6fa;
        }
        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: linear-gradient(180deg, var(--secondary-color), #001a2b);
            color: white;
            padding: 20px;
            z-index: 1000;
        }
        .sidebar-brand {
            font-size: 1.4rem;
            font-weight: 700;
            padding: 15px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            margin-bottom: 30px;
        }
        .sidebar-menu {
            list-style: none;
            padding: 0;
        }
        .sidebar-menu li {
            margin-bottom: 5px;
        }
        .sidebar-menu a {
            display: flex;
            align-items: center;
            padding: 12px 15px;
            color: rgba(255,255,255,0.8);
            text-decoration: none;
            border-radius: 8px;
            transition: all 0.3s;
        }
        .sidebar-menu a:hover, .sidebar-menu a.active {
            background: var(--primary-color);
            color: white;
        }
        .sidebar-menu i {
            width: 30px;
        }
        .main-content {
            margin-left: var(--sidebar-width);
            padding: 30px;
        }
        .stat-card {
            background: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
            transition: transform 0.3s;
        }
        .stat-card:hover {
            transform: translateY(-5px);
        }
        .stat-icon {
            width: 60px;
            height: 60px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }
    </style>
</head>
<body>
    <div class="sidebar">
        <div class="sidebar-brand">
            <i class="fas fa-church me-2"></i>CAC Gambia
        </div>
        <ul class="sidebar-menu">
            <li>
                <a href="{{ route('admin.dashboard') }}" class="{{ request()->routeIs('admin.dashboard') ? 'active' : '' }}">
                    <i class="fas fa-home"></i> Dashboard
                </a>
            </li>
            <li>
                <a href="{{ route('admin.departments') }}" class="{{ request()->routeIs('admin.departments') || request()->routeIs('admin.departments.*') ? 'active' : '' }}">
                    <i class="fas fa-users"></i> Departments
                </a>
            </li>
            <li>
                <a href="{{ route('admin.menu') }}">
                    <i class="fas fa-bars"></i> Menu Management
                </a>
            </li>
            <li>
                <a href="{{ route('admin.donation') }}" class="{{ request()->routeIs('admin.donation') ? 'active' : '' }}">
                    <i class="fas fa-donate"></i> Donation Settings
                </a>
            </li>
            <li>
                <a href="#">
                    <i class="fas fa-newspaper"></i> Content
                </a>
            </li>
            <li>
                <a href="#">
                    <i class="fas fa-images"></i> Media
                </a>
            </li>
            <li>
                <a href="#">
                    <i class="fas fa-cog"></i> Settings
                </a>
            </li>
            <li class="mt-5">
                <a href="{{ route('admin.logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                    <i class="fas fa-sign-out-alt"></i> Logout
                </a>
                <form id="logout-form" action="{{ route('admin.logout') }}" method="POST" style="display: none;">
                    @csrf
                </form>
            </li>
        </ul>
    </div>

    <div class="main-content">
        <div class="d-flex justify-content-between align-items-center mb-4">
            <h2 class="mb-0">Dashboard</h2>
            <div>
                <span class="text-muted">Welcome, Admin</span>
            </div>
        </div>

        <div class="row g-4 mb-4">
            <div class="col-md-3">
                <div class="stat-card">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h6 class="text-muted mb-2">Departments</h6>
                            <h3 class="mb-0">10</h3>
                        </div>
                        <div class="stat-icon" style="background: rgba(255, 107, 53, 0.1); color: var(--primary-color);">
                            <i class="fas fa-users"></i>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="stat-card">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h6 class="text-muted mb-2">Pages</h6>
                            <h3 class="mb-0">6</h3>
                        </div>
                        <div class="stat-icon" style="background: rgba(0, 78, 100, 0.1); color: var(--secondary-color);">
                            <i class="fas fa-file-alt"></i>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="stat-card">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h6 class="text-muted mb-2">Pastors</h6>
                            <h3 class="mb-0">6</h3>
                        </div>
                        <div class="stat-icon" style="background: rgba(0, 180, 216, 0.1); color: var(--accent-color);">
                            <i class="fas fa-user-tie"></i>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="stat-card">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h6 class="text-muted mb-2">Media Files</h6>
                            <h3 class="mb-0">12</h3>
                        </div>
                        <div class="stat-icon" style="background: rgba(255, 159, 28, 0.1); color: #ff9f1c;">
                            <i class="fas fa-image"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row g-4">
            <div class="col-md-6">
                <div class="card border-0 shadow-sm">
                    <div class="card-header bg-white border-0">
                        <h5 class="mb-0"><i class="fas fa-info-circle me-2" style="color: var(--primary-color);"></i>Quick Info</h5>
                    </div>
                    <div class="card-body">
                        <p class="text-muted">Welcome to CAC Gambia Admin Panel. Use the sidebar to navigate through the management features.</p>
                        <ul class="list-unstyled">
                            <li class="mb-2"><i class="fas fa-check text-success me-2"></i>Manage Departments/Ministries</li>
                            <li class="mb-2"><i class="fas fa-check text-success me-2"></i>Manage Menu Items</li>
                            <li class="mb-2"><i class="fas fa-check text-success me-2"></i>Edit Page Content</li>
                            <li class="mb-2"><i class="fas fa-check text-success me-2"></i>Upload Media</li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="card border-0 shadow-sm">
                    <div class="card-header bg-white border-0">
                        <h5 class="mb-0"><i class="fas fa-link me-2" style="color: var(--primary-color);"></i>Quick Links</h5>
                    </div>
                    <div class="card-body">
                        <div class="d-grid gap-2">
                            <a href="{{ route('home') }}" target="_blank" class="btn btn-outline-primary">
                                <i class="fas fa-external-link-alt me-2"></i>View Website
                            </a>
                            <a href="{{ route('admin.departments') }}" class="btn btn-outline-secondary">
                                <i class="fas fa-users me-2"></i>Manage Departments
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
