<div>
    <div class="mb-2">
        <h1 class="text-2xl font-bold text-[var(--setel-text)]">Panel de administración</h1>
        <p class="mt-1 text-sm text-[var(--setel-text-muted)]">
            Vista global: usuarios, roles y operaciones de campo.
        </p>
    </div>

    <div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
        <div class="setel-card p-5">
            <p class="text-sm text-[var(--setel-text-muted)]">Usuarios activos</p>
            <p class="mt-1 text-3xl font-bold tabular-nums text-[var(--setel-text)]"><?php echo e(number_format((int) ($stats['users_active'] ?? 0))); ?></p>
            <a href="<?php echo e(route('users.index')); ?>" wire:navigate class="mt-3 inline-block text-sm font-medium text-[var(--setel-primary)] hover:underline">Gestionar usuarios</a>
        </div>
        <div class="setel-card p-5 lg:col-span-2">
            <h2 class="text-sm font-semibold text-[var(--setel-text)]">Usuarios por rol</h2>
            <ul class="mt-3 flex flex-wrap gap-2">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $stats['users_by_role'] ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <li class="setel-badge setel-badge--neutral gap-1 px-3 py-1.5 text-xs">
                        <span><?php echo e($role->name); ?></span>
                        <span class="font-bold tabular-nums"><?php echo e($role->users_count); ?></span>
                    </li>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                    <li class="text-sm text-[var(--setel-text-muted)]">Sin roles configurados.</li>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </ul>
        </div>
    </div>

    <?php echo $__env->make('livewire.dashboard.variants._operations', ['stats' => $stats], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
</div>
<?php /**PATH C:\laragon\www\setelsat-gilat-manager\resources\views\livewire\dashboard\variants\admin.blade.php ENDPATH**/ ?>