<?= $this->extend("layout/main_layout"); ?>

<?= $this->section("content"); ?>
<main class="flex-1 p-6 overflow-auto">
    <div class="flex flex-col md:flex-row md:items-center md:justify-between mb-6 gap-4">
        <div>
            <h1 class="text-2xl font-bold tracking-tight text-base-content">Dashboard</h1>
            <p class="text-sm mt-1 opacity-70">Quality Control Overview</p>
        </div>
    </div>

    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
        <div class="bg-base-100 rounded-xl border border-base-300 shadow-sm p-6">
            <div class="flex items-center justify-between">
                <div>
                    <p class="text-sm text-base-content/60">Total Controls</p>
                    <p class="text-2xl font-bold text-base-content mt-1">24</p>
                </div>
                <div class="w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center">
                    <i class="fa-solid fa-vial text-primary text-xl"></i>
                </div>
            </div>
        </div>
        
        <div class="bg-base-100 rounded-xl border border-base-300 shadow-sm p-6">
            <div class="flex items-center justify-between">
                <div>
                    <p class="text-sm text-base-content/60">Tests Today</p>
                    <p class="text-2xl font-bold text-base-content mt-1">156</p>
                </div>
                <div class="w-12 h-12 rounded-lg bg-success/10 flex items-center justify-center">
                    <i class="fa-solid fa-check text-success text-xl"></i>
                </div>
            </div>
        </div>
        
        <div class="bg-base-100 rounded-xl border border-base-300 shadow-sm p-6">
            <div class="flex items-center justify-between">
                <div>
                    <p class="text-sm text-base-content/60">Pass Rate</p>
                    <p class="text-2xl font-bold text-base-content mt-1">98.5%</p>
                </div>
                <div class="w-12 h-12 rounded-lg bg-warning/10 flex items-center justify-center">
                    <i class="fa-solid fa-chart-line text-warning text-xl"></i>
                </div>
            </div>
        </div>
        
        <div class="bg-base-100 rounded-xl border border-base-300 shadow-sm p-6">
            <div class="flex items-center justify-between">
                <div>
                    <p class="text-sm text-base-content/60">Alerts</p>
                    <p class="text-2xl font-bold text-base-content mt-1">3</p>
                </div>
                <div class="w-12 h-12 rounded-lg bg-error/10 flex items-center justify-center">
                    <i class="fa-solid fa-triangle-exclamation text-error text-xl"></i>
                </div>
            </div>
        </div>
    </div>

    <div class="bg-base-100 rounded-xl border border-base-300 shadow-sm p-6">
        <h2 class="text-lg font-semibold text-base-content mb-4">Recent QC Results</h2>
        <p class="text-base-content/60 text-center py-8">Dashboard content coming soon...</p>
    </div>
</main>
<?= $this->endSection(); ?>
