<?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 $__env->slot('heading', null, []); ?> Dashboard <?php $__env->endSlot(); ?>

    <div class="space-y-6">

        <!-- Top stats row -->
        <div class="grid grid-cols-2 gap-3 sm:grid-cols-4">
            <?php if (isset($component)) { $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.stat-card','data' => ['label' => 'Active Ponds','value' => $ponds->where('status','active')->count(),'colour' => 'green','href' => ''.e(route('ponds.index', ['status' => 'active'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('stat-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(['label' => 'Active Ponds','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($ponds->where('status','active')->count()),'colour' => 'green','href' => ''.e(route('ponds.index', ['status' => 'active'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $attributes = $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $component = $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.stat-card','data' => ['label' => 'Active Cycles','value' => $activeCycles->count(),'colour' => 'blue']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('stat-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(['label' => 'Active Cycles','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($activeCycles->count()),'colour' => 'blue']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $attributes = $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $component = $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.stat-card','data' => ['label' => 'Harvest Ready','value' => $harvestReadyPonds->count(),'colour' => $harvestReadyPonds->count() > 0 ? 'teal' : 'gray','href' => ''.e(route('ponds.index', ['status' => 'harvest_ready'])).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('stat-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(['label' => 'Harvest Ready','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($harvestReadyPonds->count()),'colour' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($harvestReadyPonds->count() > 0 ? 'teal' : 'gray'),'href' => ''.e(route('ponds.index', ['status' => 'harvest_ready'])).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $attributes = $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $component = $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.stat-card','data' => ['label' => 'Low Inventory','value' => $lowInventory->count(),'colour' => $lowInventory->count() > 0 ? 'red' : 'gray','href' => ''.e(route('inventory.index')).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('stat-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(['label' => 'Low Inventory','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($lowInventory->count()),'colour' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($lowInventory->count() > 0 ? 'red' : 'gray'),'href' => ''.e(route('inventory.index')).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $attributes = $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $component = $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
        </div>

        <!-- Alerts bar -->
        <?php if($alertPonds->isNotEmpty() || $pondsWithNoFeedingToday->isNotEmpty() || $samplingOverdue->isNotEmpty() || $activeWithdrawals->isNotEmpty()): ?>
        <div class="rounded-xl border border-amber-200 bg-amber-50 p-4 space-y-2">
            <p class="font-semibold text-amber-900 text-sm">Attention Required</p>
            <?php if($alertPonds->isNotEmpty()): ?>
            <p class="text-sm text-amber-800">
                💧 Water quality alert on:
                <a href="<?php echo e(route('water-quality.index')); ?>" class="font-medium underline">
                    <?php echo e($ponds->whereIn('id', $alertPonds)->pluck('name')->join(', ')); ?>

                </a>
            </p>
            <?php endif; ?>
            <?php if($pondsWithNoFeedingToday->isNotEmpty()): ?>
            <p class="text-sm text-amber-800">
                No feeding logged today for:
                <a href="<?php echo e(route('feeding.create')); ?>" class="font-medium underline"><?php echo e($pondsWithNoFeedingToday->pluck('name')->join(', ')); ?></a>
            </p>
            <?php endif; ?>
            <?php if($samplingOverdue->isNotEmpty()): ?>
            <p class="text-sm text-amber-800">
                Sampling overdue (&gt;21 days):
                <span class="font-medium"><?php echo e($samplingOverdue->pluck('name')->join(', ')); ?></span>
            </p>
            <?php endif; ?>
            <?php if($activeWithdrawals->isNotEmpty()): ?>
            <p class="text-sm text-amber-800">
                Harvest blocked — withdrawal active:
                <span class="font-medium"><?php echo e($activeWithdrawals->pluck('pond.name')->filter()->join(', ')); ?></span>
            </p>
            <?php endif; ?>
        </div>
        <?php endif; ?>

        <!-- Admin financial summary -->
        <?php if(auth()->user()->isAdmin() && $monthlyRevenue !== null): ?>
        <div class="grid grid-cols-1 gap-3 sm:grid-cols-2">
            <?php if (isset($component)) { $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.stat-card','data' => ['label' => ''.e(now()->format('F')).' Revenue','value' => '₦'.e(number_format($monthlyRevenue)).'','colour' => 'green']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('stat-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(['label' => ''.e(now()->format('F')).' Revenue','value' => '₦'.e(number_format($monthlyRevenue)).'','colour' => 'green']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $attributes = $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $component = $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.stat-card','data' => ['label' => 'Outstanding Payments','value' => '₦' . number_format($outstandingPayments) . ($outstandingCount ? ' (' . $outstandingCount . ' unpaid)' : ''),'colour' => $outstandingPayments > 0 ? 'amber' : 'gray','href' => ''.e(route('reports.sales-receivables')).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('stat-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(['label' => 'Outstanding Payments','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute('₦' . number_format($outstandingPayments) . ($outstandingCount ? ' (' . $outstandingCount . ' unpaid)' : '')),'colour' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($outstandingPayments > 0 ? 'amber' : 'gray'),'href' => ''.e(route('reports.sales-receivables')).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $attributes = $__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__attributesOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682)): ?>
<?php $component = $__componentOriginal527fae77f4db36afc8c8b7e9f5f81682; ?>
<?php unset($__componentOriginal527fae77f4db36afc8c8b7e9f5f81682); ?>
<?php endif; ?>
        </div>
        <?php endif; ?>

        <!-- Pond grid -->
        <div>
            <div class="flex items-center justify-between mb-3">
                <h2 class="font-semibold text-gray-900">All Ponds</h2>
                <a href="<?php echo e(route('ponds.index')); ?>" class="text-sm text-primary-600 hover:underline">Manage ponds →</a>
            </div>
            <?php if($ponds->isEmpty()): ?>
            <div class="rounded-xl border-2 border-dashed border-gray-200 bg-white py-10 text-center">
                <p class="text-sm text-gray-500">No ponds yet.</p>
                <?php if(auth()->user()->hasRole(['admin','manager'])): ?>
                <a href="<?php echo e(route('ponds.create')); ?>" class="mt-2 inline-flex items-center gap-1 text-sm font-medium text-primary-600 hover:underline">
                    Add your first pond →
                </a>
                <?php endif; ?>
            </div>
            <?php else: ?>
            <div class="grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3">
                <?php $__currentLoopData = $ponds; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pond): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <a href="<?php echo e(route('ponds.show', $pond)); ?>"
                   class="group rounded-xl border border-gray-100 bg-white p-4 shadow-sm hover:shadow-md transition-shadow">
                    <div class="flex items-center justify-between mb-2">
                        <p class="font-semibold text-gray-900 group-hover:text-primary-600"><?php echo e($pond->name); ?></p>
                        <?php if (isset($component)) { $__componentOriginal8c81617a70e11bcf247c4db924ab1b62 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8c81617a70e11bcf247c4db924ab1b62 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.status-badge','data' => ['status' => $pond->status,'size' => 'xs']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('status-badge'); ?>
<?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(['status' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($pond->status),'size' => 'xs']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8c81617a70e11bcf247c4db924ab1b62)): ?>
<?php $attributes = $__attributesOriginal8c81617a70e11bcf247c4db924ab1b62; ?>
<?php unset($__attributesOriginal8c81617a70e11bcf247c4db924ab1b62); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8c81617a70e11bcf247c4db924ab1b62)): ?>
<?php $component = $__componentOriginal8c81617a70e11bcf247c4db924ab1b62; ?>
<?php unset($__componentOriginal8c81617a70e11bcf247c4db924ab1b62); ?>
<?php endif; ?>
                    </div>

                    <?php if($pond->activeCycle): ?>
                    <p class="text-xs text-gray-500 mb-2">
                        Day <?php echo e($pond->activeCycle->days_elapsed); ?> ·
                        <?php echo e($pond->activeCycle->stockingRecords->pluck('species')->unique()->join(', ')); ?>

                    </p>
                    <?php endif; ?>

                    <div class="flex flex-wrap gap-2 text-xs">
                        <?php if(isset($todayFeeding[$pond->id])): ?>
                        <span class="rounded-full bg-green-100 px-2 py-0.5 text-green-700">
                            Fed <?php echo e(number_format($todayFeeding[$pond->id], 1)); ?>kg today
                        </span>
                        <?php elseif($pond->status === 'active'): ?>
                        <span class="rounded-full bg-amber-100 px-2 py-0.5 text-amber-700">No feeding today</span>
                        <?php endif; ?>

                        <?php if($pond->latestWaterQuality): ?>
                        <?php $wqStatus = $pond->latestWaterQuality->overall_status; ?>
                        <?php if($wqStatus !== 'safe'): ?>
                        <span class="<?php echo \Illuminate\Support\Arr::toCssClasses([
                            'rounded-full px-2 py-0.5',
                            'bg-red-100 text-red-700' => $wqStatus === 'danger',
                            'bg-amber-100 text-amber-700' => $wqStatus === 'warning',
                        ]); ?>">WQ <?php echo e(ucfirst($wqStatus)); ?></span>
                        <?php endif; ?>
                        <?php endif; ?>
                    </div>
                </a>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
            <?php endif; ?>
        </div>

        <div class="grid grid-cols-1 gap-6 lg:grid-cols-2">

            <!-- 7-day feeding chart -->
            <div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
                <h3 class="font-semibold text-gray-900 mb-4">Feed Used — Last 7 Days (kg)</h3>
                <div id="feeding-chart" class="h-48"></div>
            </div>

            <!-- Active cycles list -->
            <div class="rounded-xl border border-gray-100 bg-white shadow-sm overflow-hidden">
                <div class="px-5 py-4 border-b border-gray-50">
                    <h3 class="font-semibold text-gray-900">Active Production Cycles</h3>
                </div>
                <?php if($activeCycles->isEmpty()): ?>
                <p class="px-5 py-6 text-center text-sm text-gray-400">No active production cycles.</p>
                <?php else: ?>
                <div class="divide-y divide-gray-50">
                    <?php $__currentLoopData = $activeCycles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cycle): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <a href="<?php echo e(route('cycles.show', [$cycle->pond, $cycle])); ?>"
                       class="flex items-center justify-between px-5 py-3 hover:bg-gray-50">
                        <div>
                            <p class="font-medium text-gray-900"><?php echo e($cycle->pond->name); ?></p>
                            <p class="text-xs text-gray-400">
                                Cycle #<?php echo e($cycle->cycle_number); ?> ·
                                <?php echo e($cycle->stockingRecords->pluck('species')->unique()->join(', ')); ?>

                            </p>
                        </div>
                        <div class="text-right">
                            <p class="text-sm font-semibold text-gray-700">Day <?php echo e($cycle->days_elapsed); ?></p>
                            <p class="text-xs text-gray-400"><?php echo e(number_format($cycle->total_stocked)); ?> fish</p>
                        </div>
                    </a>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
                <?php endif; ?>
            </div>

        </div>

        <!-- Low inventory -->
        <?php if($lowInventory->isNotEmpty()): ?>
        <div class="rounded-xl border border-red-100 bg-white shadow-sm overflow-hidden">
            <div class="px-5 py-4 border-b border-red-50 flex items-center justify-between">
                <h3 class="font-semibold text-gray-900">Low Stock Alert</h3>
                <a href="<?php echo e(route('inventory.index')); ?>" class="text-xs font-medium text-primary-600 hover:underline">Manage inventory →</a>
            </div>
            <div class="divide-y divide-gray-50">
                <?php $__currentLoopData = $lowInventory; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="flex items-center justify-between px-5 py-3">
                    <div>
                        <p class="text-sm font-medium text-gray-900"><?php echo e($item->item_name); ?></p>
                        <p class="text-xs text-gray-400 capitalize"><?php echo e($item->category); ?></p>
                    </div>
                    <div class="text-right">
                        <p class="text-sm font-bold text-red-700"><?php echo e(number_format($item->current_stock, 1)); ?> <?php echo e($item->unit); ?></p>
                        <p class="text-xs text-gray-400">reorder at ≤ <?php echo e(number_format($item->reorder_threshold)); ?></p>
                    </div>
                </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
        <?php endif; ?>

    </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 $__env->startPush('scripts'); ?>
<script src="https://cdn.jsdelivr.net/npm/apexcharts@3/dist/apexcharts.min.js"></script>
<script>
const feedingData = <?php echo json_encode($feedingChart, 15, 512) ?>;
new ApexCharts(document.querySelector('#feeding-chart'), {
    series: [{name: 'Feed (kg)', data: feedingData.map(d => parseFloat(d.total) || 0)}],
    chart: {type: 'bar', height: 190, toolbar: {show: false}},
    plotOptions: {bar: {borderRadius: 4, columnWidth: '55%'}},
    dataLabels: {enabled: false},
    colors: ['#16a34a'],
    xaxis: {categories: feedingData.map(d => d.date), labels: {style: {fontSize: '11px'}}},
    yaxis: {labels: {formatter: v => v.toFixed(1)}},
    tooltip: {y: {formatter: v => v.toFixed(1) + ' kg'}},
    grid: {borderColor: '#f3f4f6', padding: {left: 0, right: 0}},
}).render();
</script>
<?php $__env->stopPush(); ?>
<?php /**PATH C:\laragon\www\farm\resources\views\dashboard.blade.php ENDPATH**/ ?>