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

<?php $__env->startSection('content'); ?>
    <section class="hero">
        <p class="eyebrow">Operations Overview</p>
        <h1>Central command for websites, agents, backups, and health.</h1>
        <p class="muted">The panel is prepared for API-driven management at scale, with audit-first workflows and room for future file, log, queue, and deployment modules.</p>

        <div class="stat-strip">
            <div class="stat-pill">
                <p class="eyebrow">Average Latency</p>
                <strong><?php echo e($headlineStats['average_latency']); ?> ms</strong>
            </div>
            <div class="stat-pill">
                <p class="eyebrow">Tracked Tables</p>
                <strong><?php echo e(number_format($headlineStats['tracked_tables'])); ?></strong>
            </div>
            <div class="stat-pill">
                <p class="eyebrow">Error Rate</p>
                <strong><?php echo e($headlineStats['error_rate']); ?>%</strong>
            </div>
            <div class="stat-pill">
                <p class="eyebrow">Active Sessions</p>
                <strong><?php echo e($headlineStats['active_sessions']); ?></strong>
            </div>
        </div>
    </section>

    <section class="metric-grid">
        <?php $__currentLoopData = $cards; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $card): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <article class="metric-card">
                <p class="eyebrow"><?php echo e($card['label']); ?></p>
                <strong><?php echo e($card['value']); ?></strong>
                <p class="muted"><?php echo e($card['meta']); ?></p>
            </article>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </section>

    <section class="two-column">
        <article class="card">
            <div class="page-header">
                <p class="eyebrow">System Health</p>
                <h1>Current stability mix</h1>
            </div>

            <div class="health-list">
                <?php $__currentLoopData = $healthBreakdown; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $label => $count): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="health-row">
                        <div>
                            <strong><?php echo e(str($label)->headline()); ?></strong>
                            <p class="muted">Website health classification</p>
                        </div>
                        <?php if (isset($component)) { $__componentOriginal8c81617a70e11bcf247c4db924ab1b62 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8c81617a70e11bcf247c4db924ab1b62 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.status-badge','data' => ['value' => $label]] + (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(['value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($label)]); ?>
<?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; ?>
                        <strong><?php echo e($count); ?></strong>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </article>

        <article class="card">
            <div class="page-header">
                <p class="eyebrow">Recent Backups</p>
                <h1>Latest backup stream</h1>
            </div>

            <div class="summary-list">
                <?php $__empty_1 = true; $__currentLoopData = $recentBackups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $backup): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <div class="summary-row">
                        <div>
                            <strong><?php echo e($backup->website->name); ?></strong>
                            <p class="muted"><?php echo e(str($backup->type)->headline()); ?> backup</p>
                        </div>
                        <?php if (isset($component)) { $__componentOriginal8c81617a70e11bcf247c4db924ab1b62 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8c81617a70e11bcf247c4db924ab1b62 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.status-badge','data' => ['value' => $backup->status]] + (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(['value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($backup->status)]); ?>
<?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 endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <p class="muted">No backups have been recorded yet.</p>
                <?php endif; ?>
            </div>
        </article>
    </section>

    <section class="card">
        <div class="page-header">
            <p class="eyebrow">Recent Actions</p>
            <h1>Audit log spotlight</h1>
        </div>

        <div class="table-wrap">
            <table>
                <thead>
                    <tr>
                        <th>Action</th>
                        <th>Website</th>
                        <th>User</th>
                        <th>When</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $recentActivity; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td>
                                <strong><?php echo e(str($log->action)->headline()); ?></strong>
                                <div class="muted"><?php echo e($log->description); ?></div>
                            </td>
                            <td><?php echo e($log->website?->name ?? 'System'); ?></td>
                            <td><?php echo e($log->user?->name ?? 'System'); ?></td>
                            <td><?php echo e($log->occurred_at->diffForHumans()); ?></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="4" class="muted">No recent activity recorded.</td>
                        </tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.panel', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\contol\resources\views/dashboard/index.blade.php ENDPATH**/ ?>