<?php $__env->startSection('title', 'Manage Users'); ?>

<?php $__env->startSection('content'); ?>

    <div class="flex justify-between items-end mb-8">
        <div>
            <h1 class="text-3xl font-extrabold text-white tracking-tight">Client Management</h1>
            <p class="text-slate-400 mt-1 text-sm">View and manage all registered clients.</p>
        </div>
    </div>

    <div class="bg-slate-800/40 border border-slate-700 rounded-2xl overflow-hidden shadow-lg">
        <div class="p-6 border-b border-slate-700 flex justify-between items-center">
            <h2 class="text-lg font-bold text-white"><i class="fas fa-users text-blue-400 mr-2"></i> All Users</h2>
            <div class="relative">
                <input type="text" placeholder="Search users..." class="bg-slate-900 border border-slate-700 text-white text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-64 pl-10 p-2.5">
                <i class="fas fa-search absolute left-3 top-3 text-slate-500"></i>
            </div>
        </div>

        <div class="overflow-x-auto">
            <table class="w-full text-left text-sm text-slate-300">
                <thead class="bg-slate-800/80 text-xs uppercase font-semibold text-slate-400">
                    <tr>
                        <th class="px-6 py-4">Client Info</th>
                        <th class="px-6 py-4">Contact</th>
                        <th class="px-6 py-4">Balance</th>
                        <th class="px-6 py-4">Status</th>
                        <th class="px-6 py-4">Joined</th>
                        <th class="px-6 py-4 text-right">Actions</th>
                    </tr>
                </thead>
                <tbody class="divide-y divide-slate-700/50">
                    <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr class="hover:bg-slate-800/50 transition-colors">
                        <td class="px-6 py-4">
                            <div class="flex items-center gap-3">
                                <div class="w-10 h-10 rounded-full bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-white font-bold shadow-md">
                                    <?php echo e(strtoupper(substr($user->username, 0, 1))); ?>

                                </div>
                                <div>
                                    <div class="font-bold text-white"><?php echo e($user->username); ?></div>
                                    <div class="text-xs text-slate-500">ID: #<?php echo e($user->id); ?></div>
                                </div>
                            </div>
                        </td>
                        <td class="px-6 py-4">
                            <div class="text-slate-300"><?php echo e($user->email); ?></div>
                            <div class="text-xs text-slate-500"><?php echo e($user->phone ?? 'N/A'); ?></div>
                        </td>
                        <td class="px-6 py-4">
                            <span class="font-bold text-emerald-400">৳<?php echo e(number_format($user->balance, 2)); ?></span>
                        </td>
                        <td class="px-6 py-4">
                            <?php if($user->status == 'active'): ?>
                                <span class="bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-2 py-1 rounded text-xs font-medium"><i class="fas fa-circle text-[8px] mr-1"></i> Active</span>
                            <?php else: ?>
                                <span class="bg-red-500/10 text-red-400 border border-red-500/20 px-2 py-1 rounded text-xs font-medium"><i class="fas fa-ban mr-1"></i> Suspended</span>
                            <?php endif; ?>
                        </td>
                        <td class="px-6 py-4 text-slate-400">
                            <?php echo e(date('d M, Y', strtotime($user->created_at))); ?>

                        </td>
                        <td class="px-6 py-4 text-right">
                            <a href="<?php echo e(route('admin.users.show', $user->id)); ?>" class="text-blue-400 hover:text-blue-300 bg-blue-500/10 hover:bg-blue-500/20 px-3 py-2 rounded-lg transition-colors inline-flex items-center gap-2 font-medium">
                                <i class="fas fa-eye"></i> View
                            </a>
                        </td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>
        
        <div class="p-4 border-t border-slate-700">
            <?php echo e($users->links()); ?>

        </div>
    </div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/anstserv/public_html/resources/views/admin/users/index.blade.php ENDPATH**/ ?>