<?= $this->extend('admin/layout') ?>

<?= $this->section('content') ?>

<div class="d-flex justify-content-between align-items-center mb-4">
    <h2 class="h3 text-gray-800 mb-0">Dashboard</h2>
</div>

<div class="row">
    <!-- Total Enquiries Card -->
    <div class="col-xl-4 col-md-6 mb-4">
        <div class="card border-left-primary shadow h-100 py-2" style="border-left: .25rem solid var(--primary-green);">
            <div class="card-body">
                <div class="row no-gutters align-items-center">
                    <div class="col mr-2">
                        <div class="text-xs font-weight-bold text-uppercase mb-1" style="color: var(--primary-green);">
                            Total Enquiries</div>
                        <div class="h5 mb-0 font-weight-bold text-gray-800"><?= esc($total_enquiries) ?></div>
                    </div>
                    <div class="col-auto">
                        <i class="bi bi-envelope fa-2x text-gray-300" style="font-size: 2rem; color: #dddfeb;"></i>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Total Products Card -->
    <div class="col-xl-4 col-md-6 mb-4">
        <div class="card shadow h-100 py-2" style="border-left: .25rem solid var(--accent-gold);">
            <div class="card-body">
                <div class="row no-gutters align-items-center">
                    <div class="col mr-2">
                        <div class="text-xs font-weight-bold text-uppercase mb-1" style="color: var(--accent-gold);">
                            Products</div>
                        <div class="h5 mb-0 font-weight-bold text-gray-800"><?= esc($total_products) ?></div>
                    </div>
                    <div class="col-auto">
                        <i class="bi bi-box-seam fa-2x text-gray-300" style="font-size: 2rem; color: #dddfeb;"></i>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Total Gallery Card -->
    <div class="col-xl-4 col-md-6 mb-4">
        <div class="card shadow h-100 py-2" style="border-left: .25rem solid var(--earthy-brown);">
            <div class="card-body">
                <div class="row no-gutters align-items-center">
                    <div class="col mr-2">
                        <div class="text-xs font-weight-bold text-uppercase mb-1" style="color: var(--earthy-brown);">
                            Gallery Images</div>
                        <div class="h5 mb-0 font-weight-bold text-gray-800"><?= esc($total_gallery) ?></div>
                    </div>
                    <div class="col-auto">
                        <i class="bi bi-images fa-2x text-gray-300" style="font-size: 2rem; color: #dddfeb;"></i>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="row mt-4">
    <div class="col-lg-12">
        <div class="card shadow mb-4">
            <div class="card-header py-3">
                <h6 class="m-0 font-weight-bold" style="color: var(--primary-green);">Welcome to Admin Panel</h6>
            </div>
            <div class="card-body">
                <p>Welcome back, <strong><?= session()->get('admin_name') ?></strong>! Use the sidebar to navigate through the different sections of the website. You can manage products, view customer enquiries, and update the website content from here.</p>
            </div>
        </div>
    </div>
</div>

<?= $this->endSection() ?>
