

<?php if (isset($component)) { $__componentOriginale0f1cdd055772eb1d4a99981c240763e = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0f1cdd055772eb1d4a99981c240763e = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin-layout','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex justify-between items-center">
            <h2 class="font-bold text-2xl text-slate-800 flex items-center gap-2">
                <i class="ph-duotone ph-shield-check text-indigo-600"></i>
                <?php echo e(__('SaaS Command Center')); ?>

            </h2>
            <a href="<?php echo e(route('admin.tenants.create')); ?>"
                class="bg-indigo-600 text-white px-4 py-2 rounded-xl text-sm font-bold shadow-lg shadow-indigo-200 hover:bg-indigo-700 transition">
                + Provision New Firm
            </a>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="py-10 bg-slate-50 min-h-screen">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-8">

            <div class="grid grid-cols-1 md:grid-cols-4 gap-6">
                <div class="bg-white p-6 rounded-2xl shadow-sm border border-slate-100">
                    <p class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Total Firms</p>
                    <h3 class="text-3xl font-black text-slate-800 mt-2"><?php echo e($stats['total_firms']); ?></h3>
                </div>
                <div class="bg-white p-6 rounded-2xl shadow-sm border border-slate-100">
                    <p class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Active Subscriptions</p>
                    <h3 class="text-3xl font-black text-emerald-600 mt-2"><?php echo e($stats['active_firms']); ?></h3>
                </div>
                <div class="bg-white p-6 rounded-2xl shadow-sm border border-slate-100">
                    <p class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Monthly Growth</p>
                    <h3 class="text-3xl font-black text-indigo-600 mt-2">+<?php echo e($stats['new_this_month']); ?></h3>
                </div>
                <div class="bg-white p-6 rounded-2xl shadow-sm border border-slate-100">
                    <p class="text-[10px] font-black text-slate-400 uppercase tracking-widest">System Health</p>
                    <div class="flex items-center gap-2 mt-2">
                        <span class="h-3 w-3 rounded-full bg-emerald-500 animate-pulse"></span>
                        <span class="font-bold text-slate-700">All Systems Nominal</span>
                    </div>
                </div>
            </div>

            <div class="bg-white rounded-2xl shadow-sm border border-slate-100 overflow-hidden">
                <div class="p-6 border-b border-slate-50">
                    <h4 class="font-bold text-slate-800">Managed Law Firms</h4>
                </div>
                <table class="min-w-full text-left text-sm">
                    <thead class="bg-slate-50 text-slate-500 font-bold uppercase text-[10px] tracking-widest">
                        <tr>
                            <th class="px-6 py-4">Law Firm / Tenant ID</th>
                            <th class="px-6 py-4">Access URL</th>
                            <th class="px-6 py-4">Plan</th>
                            <th class="px-6 py-4">Status</th>
                            <th class="px-6 py-4 text-right">Actions</th>
                        </tr>
                    </thead>
                    <tbody class="divide-y divide-slate-100">
                        <?php $__currentLoopData = $tenants; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tenant): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr class="hover:bg-slate-50/50 transition">
                                <td class="px-6 py-4">
                                    <div class="font-bold text-slate-800"><?php echo e($tenant->firm_name); ?></div>
                                    <div class="text-xs text-slate-400 font-mono"><?php echo e($tenant->id); ?></div>
                                </td>
                                <td class="px-6 py-4">
                                    <?php $__currentLoopData = $tenant->domains; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $domain): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <a href="http://<?php echo e($domain->domain); ?>" target="_blank"
                                            class="text-indigo-600 hover:underline flex items-center gap-1">
                                            <?php echo e($domain->domain); ?> <i class="ph ph-arrow-square-out"></i>
                                        </a>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </td>
                                <td class="px-6 py-4">
                                    <span
                                        class="px-2 py-1 bg-slate-100 rounded text-[10px] font-bold uppercase text-slate-600">
                                        <?php echo e($tenant->plan ?? 'Premium'); ?>

                                    </span>
                                </td>
                                <td class="px-6 py-4">
                                    <span
                                        class="px-2 py-1 <?php echo e($tenant->subscription_status == 'active' ? 'bg-emerald-100 text-emerald-700' : 'bg-rose-100 text-rose-700'); ?> rounded-full text-[10px] font-bold uppercase">
                                        <?php echo e($tenant->subscription_status); ?>

                                    </span>
                                </td>
                                <td class="px-6 py-4 text-right">
                                    <button class="text-slate-400 hover:text-indigo-600"><i
                                            class="ph-bold ph-dots-three-outline"></i></button>




                                    <a href="<?php echo e(route('landlord.tenants.show', $tenant->id)); ?>"
                                        class="text-slate-400 hover:text-indigo-600">
                                        <i class="ph-bold ph-caret-right"></i>
                                    </a>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
                <div class="p-4 bg-slate-50 border-t border-slate-100">
                    <?php echo e($tenants->links()); ?>

                </div>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $attributes = $__attributesOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $component = $__componentOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__componentOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php /**PATH /Users/yousaf/Documents/GitHub/law-firm-project/resources/views/landlord/dashboard.blade.php ENDPATH**/ ?>