<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-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(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <?php if (isset($component)) { $__componentOriginal91a231a9270579fa1ae9246bd51fb785 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal91a231a9270579fa1ae9246bd51fb785 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.ui.page-header','data' => ['title' => 'Tableau de bord','description' => 'Vue d\'ensemble de la plateforme TransTev']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('ui.page-header'); ?>
<?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(['title' => 'Tableau de bord','description' => 'Vue d\'ensemble de la plateforme TransTev']); ?>
         <?php $__env->slot('actions', null, []); ?> 
            <a href="<?php echo e(route('admin.filiales.create')); ?>" class="btn-primary btn-sm">+ Filiale</a>
            <a href="<?php echo e(route('admin.forms.create')); ?>" class="btn-accent btn-sm">+ Formulaire</a>
         <?php $__env->endSlot(); ?>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal91a231a9270579fa1ae9246bd51fb785)): ?>
<?php $attributes = $__attributesOriginal91a231a9270579fa1ae9246bd51fb785; ?>
<?php unset($__attributesOriginal91a231a9270579fa1ae9246bd51fb785); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal91a231a9270579fa1ae9246bd51fb785)): ?>
<?php $component = $__componentOriginal91a231a9270579fa1ae9246bd51fb785; ?>
<?php unset($__componentOriginal91a231a9270579fa1ae9246bd51fb785); ?>
<?php endif; ?>

    <?php if (isset($component)) { $__componentOriginal5194778a3a7b899dcee5619d0610f5cf = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5194778a3a7b899dcee5619d0610f5cf = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.alert','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('alert'); ?>
<?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 echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5194778a3a7b899dcee5619d0610f5cf)): ?>
<?php $attributes = $__attributesOriginal5194778a3a7b899dcee5619d0610f5cf; ?>
<?php unset($__attributesOriginal5194778a3a7b899dcee5619d0610f5cf); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5194778a3a7b899dcee5619d0610f5cf)): ?>
<?php $component = $__componentOriginal5194778a3a7b899dcee5619d0610f5cf; ?>
<?php unset($__componentOriginal5194778a3a7b899dcee5619d0610f5cf); ?>
<?php endif; ?>

    <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-5 mb-8">
        <div class="stat-card border-l-4 border-l-transtev-600">
            <p class="text-sm font-medium text-slate-500">Filiales</p>
            <p class="mt-2 text-3xl font-bold text-transtev-700"><?php echo e($stats['filiales']); ?></p>
            <p class="text-xs text-slate-400 mt-1"><?php echo e($stats['filiales_active']); ?> actives</p>
        </div>
        <div class="stat-card border-l-4 border-l-transtev-accent">
            <p class="text-sm font-medium text-slate-500">Formulaires</p>
            <p class="mt-2 text-3xl font-bold text-transtev-700"><?php echo e($stats['forms']); ?></p>
            <a href="<?php echo e(route('admin.forms.index')); ?>" class="text-xs text-transtev-600 hover:underline mt-1 inline-block">Gérer →</a>
        </div>
        <div class="stat-card border-l-4 border-l-emerald-500">
            <p class="text-sm font-medium text-slate-500">Soumissions</p>
            <p class="mt-2 text-3xl font-bold text-emerald-700"><?php echo e($stats['submissions']); ?></p>
            <a href="<?php echo e(route('admin.submissions.overview')); ?>" class="text-xs text-transtev-600 hover:underline mt-1 inline-block">Par filiale →</a>
        </div>
        <div class="stat-card border-l-4 border-l-amber-500">
            <p class="text-sm font-medium text-slate-500">En attente</p>
            <p class="mt-2 text-3xl font-bold text-amber-600"><?php echo e($stats['pending_assignments']); ?></p>
        </div>
    </div>

    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
        <div class="card overflow-hidden">
            <div class="px-6 py-4 border-b border-slate-100 flex justify-between items-center">
                <h2 class="font-semibold text-slate-800">Filiales récentes</h2>
                <a href="<?php echo e(route('admin.filiales.index')); ?>" class="text-sm text-transtev-600 hover:underline">Tout voir</a>
            </div>
            <div class="divide-y divide-slate-100">
                <?php $__currentLoopData = $recentFiliales; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $filiale): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="px-6 py-3 flex justify-between items-center hover:bg-slate-50">
                        <div>
                            <p class="font-medium text-slate-800"><?php echo e($filiale->name); ?></p>
                            <p class="text-xs text-slate-500"><?php echo e($filiale->code); ?></p>
                        </div>
                        <a href="<?php echo e(route('admin.filiales.edit', $filiale)); ?>" class="text-sm text-transtev-600">Modifier</a>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
        <div class="card overflow-hidden">
            <div class="px-6 py-4 border-b border-slate-100 flex justify-between items-center">
                <h2 class="font-semibold text-slate-800">Formulaires récents</h2>
                <a href="<?php echo e(route('admin.forms.index')); ?>" class="text-sm text-transtev-600 hover:underline">Tout voir</a>
            </div>
            <div class="divide-y divide-slate-100">
                <?php $__currentLoopData = $recentForms; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $form): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="px-6 py-3 flex justify-between items-center hover:bg-slate-50">
                        <div>
                            <p class="font-medium text-slate-800"><?php echo e($form->title); ?></p>
                            <p class="text-xs text-slate-500"><?php echo e($form->fields_count); ?> champs · <?php echo e($form->filiales_count); ?> filiales</p>
                        </div>
                        <a href="<?php echo e(route('admin.forms.show', $form)); ?>" class="text-sm text-transtev-600">Voir</a>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\teyssir\resources\views/admin/dashboard.blade.php ENDPATH**/ ?>