<?php
$title = 'User Admin';
?>
<section class="admin-section">
    <div class="container">
        <div class="hero-panel">
            <span class="eyebrow">Manajemen User</span>
            <h1>User</h1>
            <p class="lead">Lihat data admin dan client yang terdaftar di sistem.</p>
        </div>

        <div class="card panel-stack admin-stack">
            <div class="admin-table-wrap">
                <table class="admin-table">
                    <thead>
                    <tr class="admin-table-head">
                        <th>Nama</th>
                        <th>Email</th>
                        <th>WhatsApp</th>
                        <th>Role</th>
                        <th>Terdaftar</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach ($users as $user): ?>
                        <tr>
                            <td><?= e($user['nama']) ?></td>
                            <td><?= e($user['email']) ?></td>
                            <td><?= e($user['whatsapp']) ?></td>
                            <td><span class="status-badge status-<?= e($user['role']) ?>"><?= e($user['role']) ?></span></td>
                            <td><?= e($user['created_at']) ?></td>
                        </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</section>
