

<?php $__env->startSection('title', 'People Dashboard'); ?>
<?php $__env->startSection('heading', 'People Dashboard'); ?>

<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('employees.top-submenu', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <?php
        $roleName = $pageRoleName ?? (auth()->user()->role?->name ?? 'employee');
        $kpis = $kpis ?? [];
        $kpiMeta = $kpiMeta ?? [];
        $attendanceTodaySummary = $attendanceTodaySummary ?? [];
        $chartWeeklyAttendance = $chartWeeklyAttendance ?? ['labels' => [], 'dates' => [], 'present' => []];
        $chartHiringVsExits = $chartHiringVsExits ?? ['labels' => [], 'hires' => [], 'exits' => []];
        $payrollBlock = $payrollBlock ?? [];
        $lifecycle = $lifecycle ?? [];
        $calendarEvents = $calendarEvents ?? ['holidays' => collect(), 'birthdays' => collect(), 'anniversaries' => collect()];
        $aiInsights = $aiInsights ?? [];
        $leaveDistLabels = ($leaveTypeDistribution ?? collect())->pluck('name')->values();
        $leaveDistDays = ($leaveTypeDistribution ?? collect())->pluck('days')->map(function ($d) {
            return (float) $d;
        })->values();
    ?>
     <div class="mb-5 flex flex-wrap items-center justify-between gap-3">
        <div>
            <h1 class="font-semibold uppercase tracking-[0.18em] text-primary">Workforce cockpit</h1>
            <p class="mt-1 text-sm text-slate-600">Decision-ready snapshot for People operations.</p>
        </div>
     </div>

    <div class="space-y-6 max-w-full overflow-x-hidden">
        <div class="flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between">
            <div class="flex flex-wrap gap-3">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->user()->hasPermission('users_create')): ?>
                    <a href="<?php echo e(route('employees.create')); ?>" class="inline-flex w-full items-center justify-center gap-2 rounded-full border border-sky-200 bg-sky-50 px-3.5 py-1.5 text-sm font-medium text-sky-800 shadow-sm transition hover:bg-sky-100 sm:w-auto">
                        <i class="bi bi-person-plus text-sm"></i> Add Employee
                    </a>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(($isHrStyle ?? false) && ($canViewPayrollAnalytics ?? false)): ?>
                    <a href="<?php echo e(route('payroll.index', ['tab' => 'run'])); ?>" class="inline-flex w-full items-center justify-center gap-2 rounded-full border border-emerald-200 bg-emerald-50 px-3.5 py-1.5 text-sm font-medium text-emerald-800 shadow-sm transition hover:bg-emerald-100 sm:w-auto">
                        <i class="bi bi-currency-dollar text-sm"></i> Run Payroll
                    </a>
                    <a href="<?php echo e(route('attendance.index')); ?>" class="inline-flex w-full items-center justify-center gap-2 rounded-full border border-violet-200 bg-violet-50 px-3.5 py-1.5 text-sm font-medium text-violet-800 shadow-sm transition hover:bg-violet-100 sm:w-auto">
                        <i class="bi bi-clock-history text-sm"></i> Attendance
                    </a>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <a href="<?php echo e(route('reports.index')); ?>" class="inline-flex w-full items-center justify-center gap-2 rounded-full border border-rose-200 bg-rose-50 px-3.5 py-1.5 text-sm font-medium text-rose-800 shadow-sm transition hover:bg-rose-100 sm:w-auto">
                    <i class="bi bi-file-earmark-bar-graph text-sm"></i> Reports
                </a>
            </div>
        </div>

        
        <div class="grid gap-3 sm:grid-cols-2 xl:grid-cols-6">
            <?php if (isset($component)) { $__componentOriginala4ae059936bc185e758290466e2179c1 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala4ae059936bc185e758290466e2179c1 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.kpi-card','data' => ['title' => 'Total employees','value' => number_format($kpis['total_employees'] ?? 0),'tone' => 'info','accent' => 'sky']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('kpi-card'); ?>
<?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' => 'Total employees','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(number_format($kpis['total_employees'] ?? 0)),'tone' => 'info','accent' => 'sky']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $attributes = $__attributesOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__attributesOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $component = $__componentOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__componentOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginala4ae059936bc185e758290466e2179c1 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala4ae059936bc185e758290466e2179c1 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.kpi-card','data' => ['title' => 'Present today','value' => number_format($kpis['present_today'] ?? 0),'tone' => 'positive','accent' => 'emerald']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('kpi-card'); ?>
<?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' => 'Present today','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(number_format($kpis['present_today'] ?? 0)),'tone' => 'positive','accent' => 'emerald']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $attributes = $__attributesOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__attributesOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $component = $__componentOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__componentOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginala4ae059936bc185e758290466e2179c1 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala4ae059936bc185e758290466e2179c1 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.kpi-card','data' => ['title' => 'Absent today','value' => number_format($kpis['absent_today'] ?? 0),'tone' => ($kpiMeta['absent'] ?? 'positive') === 'critical' ? 'critical' : (($kpiMeta['absent'] ?? '') === 'warning' ? 'warning' : 'positive'),'accent' => 'rose']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('kpi-card'); ?>
<?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' => 'Absent today','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(number_format($kpis['absent_today'] ?? 0)),'tone' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(($kpiMeta['absent'] ?? 'positive') === 'critical' ? 'critical' : (($kpiMeta['absent'] ?? '') === 'warning' ? 'warning' : 'positive')),'accent' => 'rose']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $attributes = $__attributesOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__attributesOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $component = $__componentOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__componentOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginala4ae059936bc185e758290466e2179c1 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala4ae059936bc185e758290466e2179c1 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.kpi-card','data' => ['title' => 'On leave today','value' => number_format($kpis['on_leave_today'] ?? 0),'tone' => 'warning','accent' => 'amber']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('kpi-card'); ?>
<?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' => 'On leave today','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(number_format($kpis['on_leave_today'] ?? 0)),'tone' => 'warning','accent' => 'amber']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $attributes = $__attributesOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__attributesOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $component = $__componentOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__componentOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginala4ae059936bc185e758290466e2179c1 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala4ae059936bc185e758290466e2179c1 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.kpi-card','data' => ['title' => 'New joiners (MTD)','value' => number_format($kpis['new_joiners_month'] ?? 0),'tone' => 'info','accent' => 'violet']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('kpi-card'); ?>
<?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' => 'New joiners (MTD)','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(number_format($kpis['new_joiners_month'] ?? 0)),'tone' => 'info','accent' => 'violet']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $attributes = $__attributesOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__attributesOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $component = $__componentOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__componentOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginala4ae059936bc185e758290466e2179c1 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala4ae059936bc185e758290466e2179c1 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.kpi-card','data' => ['title' => 'Attrition (MTD)','value' => number_format($kpis['attrition_rate'] ?? 0, 2).'%','tone' => ($kpiMeta['attrition'] ?? 'positive') === 'critical' ? 'critical' : (($kpiMeta['attrition'] ?? '') === 'warning' ? 'warning' : 'positive'),'accent' => 'primary','subtitle' => 'Exits vs headcount']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('kpi-card'); ?>
<?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' => 'Attrition (MTD)','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(number_format($kpis['attrition_rate'] ?? 0, 2).'%'),'tone' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(($kpiMeta['attrition'] ?? 'positive') === 'critical' ? 'critical' : (($kpiMeta['attrition'] ?? '') === 'warning' ? 'warning' : 'positive')),'accent' => 'primary','subtitle' => 'Exits vs headcount']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $attributes = $__attributesOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__attributesOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala4ae059936bc185e758290466e2179c1)): ?>
<?php $component = $__componentOriginala4ae059936bc185e758290466e2179c1; ?>
<?php unset($__componentOriginala4ae059936bc185e758290466e2179c1); ?>
<?php endif; ?>
        </div>

        <div class="grid gap-6 xl:grid-cols-12">
            <div class="space-y-6 xl:col-span-8 min-w-0">

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($isHrStyle ?? false): ?>
                    <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'Attendance','subtitle' => 'Today’s snapshot & 7-day present trend']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'Attendance','subtitle' => 'Today’s snapshot & 7-day present trend']); ?>
                         <?php $__env->slot('actions', null, []); ?> 
                            <a href="<?php echo e(route('attendance.index')); ?>" class="text-sm font-medium text-primary hover:underline">Open attendance</a>
                         <?php $__env->endSlot(); ?>
                        <div class="mb-4 grid gap-3 sm:grid-cols-4">
                            <div class="relative overflow-hidden rounded-xl border border-emerald-200 bg-emerald-50 px-3 py-2 pl-4 text-center">
                                <span class="absolute inset-y-0 left-0 w-1.5 rounded-l-xl bg-emerald-500" aria-hidden="true"></span>
                                <p class="text-xs text-emerald-700">Present</p>
                                <p class="text-lg font-semibold text-emerald-800"><?php echo e($attendanceTodaySummary['present'] ?? 0); ?></p>
                            </div>
                            <div class="relative overflow-hidden rounded-xl border border-rose-200 bg-rose-50 px-3 py-2 pl-4 text-center">
                                <span class="absolute inset-y-0 left-0 w-1.5 rounded-l-xl bg-rose-500" aria-hidden="true"></span>
                                <p class="text-xs text-rose-700">Absent</p>
                                <p class="text-lg font-semibold text-rose-800"><?php echo e($attendanceTodaySummary['absent'] ?? 0); ?></p>
                            </div>
                            <div class="relative overflow-hidden rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 pl-4 text-center">
                                <span class="absolute inset-y-0 left-0 w-1.5 rounded-l-xl bg-amber-500" aria-hidden="true"></span>
                                <p class="text-xs text-amber-700">On leave</p>
                                <p class="text-lg font-semibold text-amber-800"><?php echo e($attendanceTodaySummary['on_leave'] ?? 0); ?></p>
                            </div>
                            <div class="relative overflow-hidden rounded-xl border border-orange-200 bg-orange-50 px-3 py-2 pl-4 text-center">
                                <span class="absolute inset-y-0 left-0 w-1.5 rounded-l-xl bg-orange-500" aria-hidden="true"></span>
                                <p class="text-xs text-orange-700">Late</p>
                                <p class="text-lg font-semibold text-orange-800"><?php echo e($attendanceTodaySummary['late'] ?? 0); ?></p>
                            </div>
                        </div>
                        <div class="relative h-64 w-full min-w-0 overflow-hidden">
                            <canvas id="weeklyAttendanceChart" class="h-full w-full"></canvas>
                        </div>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($isHrStyle ?? false): ?>
                    <div class="grid gap-6 lg:grid-cols-2 ">
                        <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'Leave distribution','subtitle' => 'Approved days by type (last 6 months)','class' => 'overflow-hidden']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'Leave distribution','subtitle' => 'Approved days by type (last 6 months)','class' => 'overflow-hidden']); ?>
                             <?php $__env->slot('actions', null, []); ?> 
                                <a href="<?php echo e(route('leaves.index')); ?>" class="text-sm font-medium text-primary hover:underline">All leaves</a>
                             <?php $__env->endSlot(); ?>
                            <div class="relative h-56 w-full min-w-0 overflow-hidden">
                                <canvas id="leaveTypesChart" class="h-full w-full"></canvas>
                            </div>
                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>

                        <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'Leave balance signals','subtitle' => 'High utilization vs allocation (heuristic)']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'Leave balance signals','subtitle' => 'High utilization vs allocation (heuristic)']); ?>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(($leaveBalanceAlerts ?? collect())->isEmpty()): ?>
                                <p class="text-sm text-slate-500">No elevated utilization signals for configured leave types.</p>
                            <?php else: ?>
                                <ul class="space-y-2">
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $leaveBalanceAlerts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <li class="flex items-center justify-between rounded-lg border border-amber-100 bg-amber-50/60 px-3 py-2 text-sm">
                                            <span class="font-medium text-slate-800"><?php echo e($row->leave_type); ?></span>
                                            <span class="text-amber-900"><?php echo e(number_format($row->pct, 1)); ?>% utilized</span>
                                        </li>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </ul>
                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
                    </div>

                    <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'Pending leave requests','subtitle' => 'Approve or reject inline']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'Pending leave requests','subtitle' => 'Approve or reject inline']); ?>
                        <div class="overflow-x-auto">
                            <table class="min-w-full text-left text-sm">
                                <thead class="border-b border-slate-200 text-xs uppercase text-slate-500">
                                    <tr>
                                        <th class="pb-2 pr-4">Employee</th>
                                        <th class="pb-2 pr-4">Type</th>
                                        <th class="pb-2 pr-4">Dates</th>
                                        <th class="pb-2 pr-4">Days</th>
                                        <th class="pb-2">Actions</th>
                                    </tr>
                                </thead>
                                <tbody class="divide-y divide-slate-100">
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = ($pendingLeaves ?? collect()); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $leave): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                        <tr>
                                            <td class="py-2 pr-4 font-medium text-slate-900"><?php echo e($leave->user?->name ?? '—'); ?></td>
                                            <td class="py-2 pr-4 text-slate-600"><?php echo e($leave->leaveType?->name ?? '—'); ?></td>
                                            <td class="py-2 pr-4 text-slate-600"><?php echo e($leave->start_date?->format('M j')); ?> – <?php echo e($leave->end_date?->format('M j')); ?></td>
                                            <td class="py-2 pr-4"><?php echo e($leave->total_days); ?></td>
                                            <td class="py-2">
                                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('approve', $leave)): ?>
                                                    <form action="<?php echo e(route('leaves.update-status', $leave)); ?>" method="post" class="inline">
                                                        <?php echo csrf_field(); ?>
                                                        <input type="hidden" name="status" value="approved">
                                                        <button type="submit" class="text-emerald-600 hover:underline text-xs">Approve</button>
                                                    </form>
                                                    <form action="<?php echo e(route('leaves.update-status', $leave)); ?>" method="post" class="inline ms-2">
                                                        <?php echo csrf_field(); ?>
                                                        <input type="hidden" name="status" value="rejected">
                                                        <button type="submit" class="text-red-600 hover:underline text-xs">Reject</button>
                                                    </form>
                                                <?php else: ?>
                                                    <span class="text-xs text-slate-400">View only</span>
                                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                            </td>
                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                        <tr><td colspan="5" class="py-6 text-center text-slate-500">No pending leave requests.</td></tr>
                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </tbody>
                            </table>
                        </div>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(($isHrStyle ?? false) && ($canViewPayrollAnalytics ?? false)): ?>
                    <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'Payroll & compliance','subtitle' => 'Current month snapshot']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'Payroll & compliance','subtitle' => 'Current month snapshot']); ?>
                         <?php $__env->slot('actions', null, []); ?> 
                            <a href="<?php echo e(route('payroll.index')); ?>" class="text-sm font-medium text-primary hover:underline">Payroll hub</a>
                         <?php $__env->endSlot(); ?>
                        <div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
                            <div class="relative overflow-hidden rounded-xl border border-slate-200 bg-slate-50 p-3 pl-4">
                                <span class="absolute inset-y-0 left-0 w-1.5 rounded-l-xl bg-slate-400" aria-hidden="true"></span>
                                <p class="text-xs font-medium text-slate-500">Payroll status</p>
                                <p class="mt-1 text-lg font-semibold capitalize text-slate-900"><?php echo e($payrollBlock['status_label'] ?? '—'); ?></p>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!empty($payrollBlock['v2_cycle_status'])): ?>
                                    <p class="text-xs text-slate-500">V2 cycle: <?php echo e($payrollBlock['v2_cycle_status']); ?></p>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                            <div class="relative overflow-hidden rounded-xl border border-emerald-200 bg-emerald-50 p-3 pl-4">
                                <span class="absolute inset-y-0 left-0 w-1.5 rounded-l-xl bg-emerald-500" aria-hidden="true"></span>
                                <p class="text-xs font-medium text-emerald-700">Disbursed (net, paid)</p>
                                <p class="mt-1 text-lg font-semibold text-emerald-900">₹<?php echo e(number_format($payrollBlock['total_disbursed'] ?? 0, 2)); ?></p>
                            </div>
                            <div class="relative overflow-hidden rounded-xl border border-sky-200 bg-sky-50 p-3 pl-4">
                                <span class="absolute inset-y-0 left-0 w-1.5 rounded-l-xl bg-sky-500" aria-hidden="true"></span>
                                <p class="text-xs font-medium text-sky-700">PF (employer, V2)</p>
                                <p class="mt-1 text-lg font-semibold text-sky-900">₹<?php echo e(number_format($payrollBlock['pf_total'] ?? 0, 2)); ?></p>
                            </div>
                            <div class="relative overflow-hidden rounded-xl border border-violet-200 bg-violet-50 p-3 pl-4">
                                <span class="absolute inset-y-0 left-0 w-1.5 rounded-l-xl bg-violet-500" aria-hidden="true"></span>
                                <p class="text-xs font-medium text-violet-700">ESI (employer, V2)</p>
                                <p class="mt-1 text-lg font-semibold text-violet-900">₹<?php echo e(number_format($payrollBlock['esi_total'] ?? 0, 2)); ?></p>
                            </div>
                        </div>
                        <ul class="mt-4 space-y-2">
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $payrollBlock['alerts'] ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $alert): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li class="flex gap-2 rounded-lg border px-3 py-2 text-sm
                                    <?php echo e(($alert['type'] ?? 'info') === 'warning' ? 'border-amber-200 bg-amber-50 text-amber-900' : 'border-sky-200 bg-sky-50 text-sky-900'); ?>">
                                    <i class="bi bi-info-circle shrink-0"></i>
                                    <span><?php echo e($alert['message'] ?? ''); ?></span>
                                </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        </ul>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'Employee lifecycle','subtitle' => 'Month-to-date movement']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'Employee lifecycle','subtitle' => 'Month-to-date movement']); ?>
                    <div class="grid gap-3 sm:grid-cols-3">
                        <div class="rounded-xl border border-emerald-100 bg-emerald-50/60 p-4">
                            <p class="text-xs font-medium text-emerald-800">New joiners (MTD)</p>
                            <p class="mt-1 text-xl font-bold text-emerald-900"><?php echo e($lifecycle['new_joiners_mtd'] ?? 0); ?></p>
                        </div>
                        <div class="rounded-xl border border-red-100 bg-red-50/60 p-4">
                            <p class="text-xs font-medium text-red-800">Resignations (MTD)</p>
                            <p class="mt-1 text-xl font-bold text-red-900"><?php echo e($lifecycle['resignations_mtd'] ?? 0); ?></p>
                        </div>
                        <div class="rounded-xl border border-sky-100 bg-sky-50/60 p-4">
                            <p class="text-xs font-medium text-sky-800">Anniversary confirmations</p>
                            <p class="mt-1 text-xl font-bold text-sky-900"><?php echo e($lifecycle['confirmations_due'] ?? 0); ?></p>
                            <p class="mt-1 text-xs text-sky-800">Joining + 1 year in this month</p>
                        </div>
                    </div>
                    <div class="relative mt-6 h-64 w-full min-w-0 overflow-hidden">
                        <canvas id="hiringVsExitsChart" class="h-full w-full"></canvas>
                    </div>
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($isHrStyle ?? false): ?>
                    <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'Department performance','subtitle' => 'Headcount and 7d attendance intensity']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'Department performance','subtitle' => 'Headcount and 7d attendance intensity']); ?>
                        <div class="overflow-x-auto">
                            <table class="min-w-full text-left text-sm">
                                <thead class="border-b border-slate-200 text-xs uppercase text-slate-500">
                                    <tr>
                                        <th class="pb-2 pr-4">Department</th>
                                        <th class="pb-2 pr-4">Headcount</th>
                                        <th class="pb-2 pr-4">Attendance %</th>
                                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($canViewPayrollAnalytics ?? false): ?>
                                            <th class="pb-2">Avg salary / mo</th>
                                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                    </tr>
                                </thead>
                                <tbody class="divide-y divide-slate-100">
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = ($departmentPerformance ?? collect()); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                        <tr>
                                            <td class="py-2 pr-4 font-medium"><?php echo e($row['name']); ?></td>
                                            <td class="py-2 pr-4"><?php echo e($row['headcount']); ?></td>
                                            <td class="py-2 pr-4"><?php echo e($row['attendance_pct']); ?>%</td>
                                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($canViewPayrollAnalytics ?? false): ?>
                                                <td class="py-2">₹<?php echo e(number_format($row['avg_salary'] ?? 0, 2)); ?></td>
                                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                        <tr><td colspan="<?php echo e(($canViewPayrollAnalytics ?? false) ? 4 : 3); ?>" class="py-6 text-center text-slate-500">No department data.</td></tr>
                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </tbody>
                            </table>
                        </div>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($isHrStyle ?? false): ?>
                    <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'AI insights','subtitle' => 'Rule-based signals (not external AI)']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'AI insights','subtitle' => 'Rule-based signals (not external AI)']); ?>
                        <ul class="space-y-3">
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $aiInsights; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $insight): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li class="flex gap-3 rounded-xl border px-4 py-3 text-sm
                                    <?php echo e(($insight['type'] ?? '') === 'danger' ? 'border-red-200 bg-red-50 text-red-900' : ''); ?>

                                    <?php echo e(($insight['type'] ?? '') === 'warning' ? 'border-amber-200 bg-amber-50 text-amber-900' : ''); ?>

                                    <?php echo e(($insight['type'] ?? '') === 'info' ? 'border-sky-200 bg-sky-50 text-sky-900' : ''); ?>

                                    <?php echo e(($insight['type'] ?? '') === 'success' ? 'border-emerald-200 bg-emerald-50 text-emerald-900' : ''); ?>

                                ">
                                    <i class="bi bi-lightning-charge shrink-0"></i>
                                    <div>
                                        <p class="font-semibold"><?php echo e($insight['title'] ?? ''); ?></p>
                                        <p class="mt-0.5 text-slate-700"><?php echo e($insight['message'] ?? ''); ?></p>
                                    </div>
                                </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        </ul>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </div>

            
            <aside class="xl:col-span-4">
                <div class="space-y-6 xl:sticky xl:top-20">
                    <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'Tasks & alerts','subtitle' => 'Approvals and risk items']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'Tasks & alerts','subtitle' => 'Approvals and risk items']); ?>
                        <ul class="space-y-3 text-sm">
                            <li class="flex justify-between gap-2 rounded-xl border border-amber-200 bg-amber-50 px-3 py-2">
                                <span class="text-amber-800">Pending leaves</span>
                                <span class="font-semibold text-amber-900"><?php echo e($pending_leave_count ?? 0); ?></span>
                            </li>
                            <li class="flex justify-between gap-2 rounded-xl border border-violet-200 bg-violet-50 px-3 py-2">
                                <span class="text-violet-800">Attendance regularizations</span>
                                <span class="font-semibold text-violet-900"><?php echo e($pending_regularization_count ?? 0); ?></span>
                            </li>
                        </ul>
                        <div class="mt-4 flex flex-wrap gap-3">
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->user()?->canReviewAttendanceRegularizations()): ?>
                            <a href="<?php echo e(route('leaves.index', ['status' => 'pending'])); ?>" class="inline-flex flex-1 items-center justify-center gap-2 rounded-full border border-rose-200 bg-rose-50 px-3.5 py-1.5 text-center text-sm font-medium text-rose-800 shadow-sm transition hover:bg-rose-100">Review leaves</a>
                            <a href="<?php echo e(route('attendance-regularizations.index', ['status' => 'pending'])); ?>" class="inline-flex flex-1 items-center justify-center gap-2 rounded-full border border-violet-200 bg-violet-50 px-3.5 py-1.5 text-center text-sm font-medium text-violet-800 shadow-sm transition hover:bg-violet-100">Review regularizations</a>
                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        </div>

                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(($probation_soon ?? collect())->isNotEmpty()): ?>
                            <div class="mt-4 border-t border-slate-100 pt-4">
                                <p class="text-xs font-semibold uppercase text-slate-500">Probation ending (6 mo window)</p>
                                <ul class="mt-2 space-y-1 text-sm text-slate-700">
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $probation_soon; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $u): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <li class="flex justify-between gap-2">
                                            <span><?php echo e($u->name); ?></span>
                                            <span class="text-slate-500"><?php echo e($u->joining_date?->format('M j, Y')); ?></span>
                                        </li>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </ul>
                            </div>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(($documentComplianceGaps ?? collect())->isNotEmpty()): ?>
                            <div class="mt-4 border-t border-slate-100 pt-4">
                                <p class="text-xs font-semibold uppercase text-slate-500">Document compliance gaps</p>
                                <p class="mt-1 text-xs text-slate-500">6 mandatory types per employee (Aadhaar, PAN, bank proof, education, experience, appointment).</p>
                                <ul class="mt-2 space-y-1 text-sm">
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $documentComplianceGaps; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $g): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <li class="flex justify-between gap-2 text-slate-700">
                                            <a href="<?php echo e(route('employees.show', ['employee' => $g['user_id'] ?? 0, 'tab' => 'documents'])); ?>" class="truncate font-medium text-slate-800 hover:text-primary hover:underline">
                                                <?php echo e($g['user']); ?>

                                            </a>
                                            <span class="shrink-0 text-amber-700">
                                                <?php echo e(($g['completed'] ?? 0)); ?>/<?php echo e(($g['total'] ?? 6)); ?>

                                                <span class="text-xs">(<?php echo e($g['missing']); ?> missing)</span>
                                            </span>
                                        </li>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </ul>
                                <a href="<?php echo e(route('employees.index')); ?>" class="mt-2 block text-center text-xs font-medium text-primary hover:underline">Open employees</a>
                            </div>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>

                    <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'Calendar & events','subtitle' => 'Holidays, birthdays, anniversaries']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'Calendar & events','subtitle' => 'Holidays, birthdays, anniversaries']); ?>
                        <div class="space-y-4 text-sm">
                            <div>
                                <p class="flex items-center gap-2 text-xs font-semibold uppercase text-slate-500">
                                    <i class="bi bi-balloon-heart text-base normal-case text-orange-400"></i>
                                    Upcoming holidays
                                </p>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = ($calendarEvents['holidays'] ?? collect()); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $h): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <div class="mt-1 flex justify-between gap-2 border-b border-slate-100 py-1.5">
                                        <span class="font-medium text-sky-700"><?php echo e($h->name); ?></span>
                                        <span class="text-sky-600"><?php echo e($h->date?->format('M j')); ?></span>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <p class="mt-1 text-slate-500">No upcoming holidays.</p>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                            <div>
                                <p class="flex items-center gap-2 text-xs font-semibold uppercase text-slate-500">
                                    <i class="bi bi-cake2 text-base normal-case text-[#F08A8A]"></i>
                                    Birthdays (rolling year)
                                </p>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = ($calendarEvents['birthdays'] ?? collect()); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $u): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <div class="mt-1 flex justify-between gap-2 border-b border-slate-100 py-1.5">
                                        <span><?php echo e($u->name); ?></span>
                                        <span class="text-slate-500"><?php echo e($u->dob?->format('M j')); ?></span>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <p class="mt-1 text-slate-500">No birthdays in this pass.</p>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                            <div>
                                <p class="flex items-center gap-2 text-xs font-semibold uppercase text-slate-500">
                                    <i class="bi bi-stars text-base normal-case text-[#B9A8DE]"></i>
                                    Work anniversaries
                                </p>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = ($calendarEvents['anniversaries'] ?? collect()); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $u): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <div class="mt-1 flex justify-between gap-2 border-b border-slate-100 py-1.5">
                                        <span><?php echo e($u->name); ?></span>
                                        <span class="text-slate-500"><?php echo e($u->joining_date?->format('M j')); ?></span>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <p class="mt-1 text-slate-500">No anniversaries in this pass.</p>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                            <a href="<?php echo e(route('holidays.index')); ?>" class="block text-center text-xs font-medium text-primary hover:underline">Manage holidays</a>
                        </div>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>

                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($isHrStyle ?? false): ?>
                        <?php if (isset($component)) { $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.panel-card','data' => ['title' => 'Regularization queue','subtitle' => 'Latest pending']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('panel-card'); ?>
<?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' => 'Regularization queue','subtitle' => 'Latest pending']); ?>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = ($pending_regularizations ?? collect()); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $r): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                <div class="mb-2 flex flex-wrap items-center justify-between gap-2 rounded-lg border border-slate-100 px-3 py-2 text-xs">
                                    <span class="font-medium text-slate-800"><?php echo e($r->user?->name ?? '—'); ?></span>
                                    <span class="text-slate-500"><?php echo e($r->date?->format('M j, Y')); ?></span>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <p class="text-sm text-slate-500">No items in preview.</p>
                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $attributes = $__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__attributesOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6)): ?>
<?php $component = $__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6; ?>
<?php unset($__componentOriginal5ceb3117dd1be9fce83fbc66c9120fe6); ?>
<?php endif; ?>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
            </aside>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
<script>
document.addEventListener('DOMContentLoaded', function () {
    if (typeof Chart === 'undefined') return;

    var palette = {
        text: '#334155',
        muted: '#94a3b8',
        grid: 'rgba(148, 163, 184, 0.2)',
    };

    var weeklyLabels = <?php echo json_encode($chartWeeklyAttendance['labels'] ?? [], 15, 512) ?>;
    var weeklyPresent = <?php echo json_encode($chartWeeklyAttendance['present'] ?? [], 15, 512) ?>;
    var wctx = document.getElementById('weeklyAttendanceChart');
    if (wctx) {
        var weeklyLineCtx = wctx.getContext('2d');
        var weeklyGradient = weeklyLineCtx.createLinearGradient(0, 0, 0, wctx.clientHeight || 256);
        weeklyGradient.addColorStop(0, 'rgba(16, 185, 129, 0.35)');
        weeklyGradient.addColorStop(1, 'rgba(16, 185, 129, 0.02)');

        new Chart(weeklyLineCtx, {
            type: 'line',
            data: {
                labels: weeklyLabels,
                datasets: [{
                    label: 'Present (distinct employees)',
                    data: weeklyPresent,
                    borderColor: '#10b981',
                    backgroundColor: weeklyGradient,
                    fill: true,
                    tension: 0.35,
                    borderWidth: 2,
                    pointRadius: 3,
                    pointHoverRadius: 5,
                    pointBackgroundColor: '#10b981',
                    pointBorderColor: '#ffffff',
                    pointBorderWidth: 2,
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                normalized: true,
                plugins: {
                    legend: { display: false },
                    tooltip: {
                        callbacks: {
                            title: function (items) {
                                return items.length ? items[0].label : '';
                            }
                        }
                    }
                },
                scales: {
                    x: {
                        grid: { display: false },
                        ticks: {
                            color: palette.muted,
                            maxRotation: 0,
                            autoSkip: true,
                            maxTicksLimit: 7,
                        }
                    },
                    y: {
                        beginAtZero: true,
                        ticks: { color: palette.muted, precision: 0 },
                        grid: { color: palette.grid }
                    }
                }
            }
        });
    }

    var leaveLabels = <?php echo json_encode($leaveDistLabels, 15, 512) ?>;
    var leaveData = <?php echo json_encode($leaveDistDays, 15, 512) ?>;
    var lctx = document.getElementById('leaveTypesChart');
    if (lctx && leaveLabels.length) {
        new Chart(lctx.getContext('2d'), {
            type: 'doughnut',
            data: {
                labels: leaveLabels,
                datasets: [{
                    data: leaveData,
                    backgroundColor: ['#10b981', '#0ea5e9', '#6366f1', '#f59e0b', '#ef4444', '#14b8a6', '#64748b', '#8b5cf6'],
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                layout: { padding: 0 },
                plugins: {
                    legend: {
                        position: 'bottom',
                        labels: {
                            boxWidth: 10,
                            boxHeight: 10,
                            padding: 10,
                            font: {
                                size: 10
                            }
                        }
                    }
                }
            }
        });
    }

    var hLabels = <?php echo json_encode($chartHiringVsExits['labels'] ?? [], 15, 512) ?>;
    var hHires = <?php echo json_encode($chartHiringVsExits['hires'] ?? [], 15, 512) ?>;
    var hExits = <?php echo json_encode($chartHiringVsExits['exits'] ?? [], 15, 512) ?>;
    var hctx = document.getElementById('hiringVsExitsChart');
    if (hctx) {
        new Chart(hctx.getContext('2d'), {
            type: 'bar',
            data: {
                labels: hLabels,
                datasets: [
                    { label: 'Hires', data: hHires, backgroundColor: 'rgba(16, 185, 129, 0.7)' },
                    { label: 'Exits', data: hExits, backgroundColor: 'rgba(239, 68, 68, 0.65)' },
                ]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                scales: { y: { beginAtZero: true, ticks: { precision: 0 } } }
            }
        });
    }
});
</script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/kiyohr/v2_version/resources/views/employees/dashboard.blade.php ENDPATH**/ ?>