<?php
$db = Database::getInstance();
$activeGuests = (int)$db->fetchColumn("SELECT COUNT(*) FROM guest_passes WHERE valid_date = CURDATE() AND status IN ('issued','active')");
?>
<div class="card border-info h-100">
    <div class="card-body">
        <div class="d-flex justify-content-between">
            <div>
                <h6 class="text-muted mb-1"><?= lang('cards.active_guest_passes') ?></h6>
                <h3 class="mb-0 text-info"><?= number_format($activeGuests) ?></h3>
                <small class="text-muted">Active guest passes today</small>
            </div>
            <div class="align-self-center"><i class="fas fa-user-friends fa-2x text-info opacity-50"></i></div>
        </div>
        <a href="/guests" class="stretched-link"></a>
    </div>
</div>