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

<?php $__env->startSection('header'); ?>
    <?php if (isset($component)) { $__componentOriginal111218edafe37a3ff745a947bea8c7e5 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal111218edafe37a3ff745a947bea8c7e5 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.isp-page-header','data' => ['title' => 'Network Routers','module' => 'Network Operations','description' => 'Manage MikroTik infrastructure, monitor connectivity, and control subscriber routing.','primaryLabel' => 'Provision router','primaryHref' => route('isp.routers.create')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('isp-page-header'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => 'Network Routers','module' => 'Network Operations','description' => 'Manage MikroTik infrastructure, monitor connectivity, and control subscriber routing.','primaryLabel' => 'Provision router','primaryHref' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('isp.routers.create'))]); ?>
         <?php $__env->slot('actions', null, []); ?> 
            <?php if (isset($component)) { $__componentOriginalbbe0c50ca1644acc2de128b41c5b4ecb = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalbbe0c50ca1644acc2de128b41c5b4ecb = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.export-dropdown','data' => ['formats' => $exportFormats ?? [],'label' => 'Export']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('export-dropdown'); ?>
<?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(['formats' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($exportFormats ?? []),'label' => 'Export']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalbbe0c50ca1644acc2de128b41c5b4ecb)): ?>
<?php $attributes = $__attributesOriginalbbe0c50ca1644acc2de128b41c5b4ecb; ?>
<?php unset($__attributesOriginalbbe0c50ca1644acc2de128b41c5b4ecb); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalbbe0c50ca1644acc2de128b41c5b4ecb)): ?>
<?php $component = $__componentOriginalbbe0c50ca1644acc2de128b41c5b4ecb; ?>
<?php unset($__componentOriginalbbe0c50ca1644acc2de128b41c5b4ecb); ?>
<?php endif; ?>
            <span class="isp-noc-live-pill" title="Live telemetry polled every minute via PollRouterHealthJob">
                <span class="isp-noc-live-pill__dot" aria-hidden="true"></span>
                Live NOC
            </span>
         <?php $__env->endSlot(); ?>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal111218edafe37a3ff745a947bea8c7e5)): ?>
<?php $attributes = $__attributesOriginal111218edafe37a3ff745a947bea8c7e5; ?>
<?php unset($__attributesOriginal111218edafe37a3ff745a947bea8c7e5); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal111218edafe37a3ff745a947bea8c7e5)): ?>
<?php $component = $__componentOriginal111218edafe37a3ff745a947bea8c7e5; ?>
<?php unset($__componentOriginal111218edafe37a3ff745a947bea8c7e5); ?>
<?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<?php
    $snapFor = fn ($r) => $r->noc ?? [];
    $detailPayload = fn ($router) => array_merge(
        $router->only(['id', 'name', 'ip_address', 'port', 'location', 'use_ssl', 'is_active']),
        ['customers_count' => $router->customers_count, 'noc' => $snapFor($router)]
    );
    $latencyTone = function (array $noc): string {
        $reach = $noc['reachability'] ?? 'unknown';
        if ($reach === 'offline') {
            return 'danger';
        }
        if (in_array($reach, ['degraded', 'rebooting'], true)) {
            return 'warn';
        }
        if (! ($noc['has_live'] ?? false)) {
            return 'muted';
        }
        $ms = $noc['latency_ms'] ?? 0;
        if ($ms > 35) {
            return 'warn';
        }
        return 'ok';
    };
?>

<div
    class="isp-noc-root space-y-6"
    x-data="{
        detailOpen: false,
        detail: null,
        refreshing: false,
        selected: [],
        lastSyncLabel: <?php echo \Illuminate\Support\Js::from(now()->format('H:i:s'))->toHtml() ?>,
        openDetail(payload) { this.detail = payload; this.detailOpen = true; document.body.classList.add('overflow-hidden'); },
        closeDetail() { this.detailOpen = false; this.detail = null; document.body.classList.remove('overflow-hidden'); },
        toggleAll(checked, ids) { this.selected = checked ? [...ids] : []; },
        syncFleet() {
            this.refreshing = true;
            window.setTimeout(() => window.location.reload(), 200);
        },
        init() {
            window.setInterval(() => {
                const d = new Date();
                this.lastSyncLabel = d.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit', second: '2-digit' });
            }, 1000);
        }
    }"
    @keydown.escape.window="closeDetail()"
>
    
    <div class="isp-noc-kpi-grid">
        <div class="isp-noc-kpi pb-card p-4">
            <p class="isp-noc-kpi__label">Total routers</p>
            <p class="isp-noc-kpi__value"><?php echo e(number_format($fleetStats['total'])); ?></p>
            <p class="isp-noc-kpi__hint">Fleet inventory</p>
        </div>
        <div class="isp-noc-kpi pb-card p-4 isp-noc-kpi--ok">
            <p class="isp-noc-kpi__label">Online</p>
            <p class="isp-noc-kpi__value text-emerald-600 dark:text-emerald-400"><?php echo e(number_format($fleetStats['online'])); ?></p>
            <p class="isp-noc-kpi__hint">Operational</p>
        </div>
        <div class="isp-noc-kpi pb-card p-4 isp-noc-kpi--danger">
            <p class="isp-noc-kpi__label">Offline</p>
            <p class="isp-noc-kpi__value text-rose-600 dark:text-rose-400"><?php echo e(number_format($fleetStats['offline'])); ?></p>
            <p class="isp-noc-kpi__hint">Standby / unreachable</p>
        </div>
        <div class="isp-noc-kpi pb-card p-4">
            <p class="isp-noc-kpi__label">Subscribers on routers</p>
            <p class="isp-noc-kpi__value"><?php echo e(number_format($fleetStats['connected_customers'])); ?></p>
            <p class="isp-noc-kpi__hint">Assigned customers</p>
        </div>
        <div class="isp-noc-kpi pb-card p-4">
            <p class="isp-noc-kpi__label">Avg latency</p>
            <p class="isp-noc-kpi__value">
                <?php if($fleetStats['avg_latency_ms'] !== null): ?>
                    <?php echo e($fleetStats['avg_latency_ms']); ?><span class="text-base font-bold text-slate-400">ms</span>
                <?php else: ?>
                    —
                <?php endif; ?>
            </p>
            <p class="isp-noc-kpi__hint"><?php echo e($fleetStats['with_telemetry'] ?? 0); ?> / <?php echo e($fleetStats['total']); ?> reporting</p>
        </div>
        <div class="isp-noc-kpi pb-card p-4 isp-noc-kpi--health">
            <p class="isp-noc-kpi__label">Network health</p>
            <p class="isp-noc-kpi__value">
                <?php if($fleetStats['network_health'] !== null): ?>
                    <?php echo e($fleetStats['network_health']); ?><span class="text-base font-bold text-slate-400">%</span>
                <?php else: ?>
                    —
                <?php endif; ?>
            </p>
            <div class="isp-noc-health-bar mt-2" role="progressbar" aria-valuenow="<?php echo e($fleetStats['network_health'] ?? 0); ?>" aria-valuemin="0" aria-valuemax="100">
                <span style="width: <?php echo e($fleetStats['network_health'] !== null ? min(100, $fleetStats['network_health']) : 0); ?>%"></span>
            </div>
        </div>
    </div>

    
    <div class="pb-card isp-noc-live-strip overflow-hidden">
        <div class="flex flex-col gap-3 border-b border-slate-200/80 px-4 py-3 dark:border-slate-700/80 sm:flex-row sm:items-center sm:justify-between sm:px-5">
            <div class="flex flex-wrap items-center gap-3 text-xs font-semibold text-slate-600 dark:text-slate-300">
                <span class="inline-flex items-center gap-1.5 rounded-full bg-emerald-500/10 px-2.5 py-1 text-emerald-700 ring-1 ring-emerald-500/25 dark:text-emerald-300">
                    <span class="isp-noc-pulse h-2 w-2 rounded-full bg-emerald-500" aria-hidden="true"></span>
                    Live polling — every minute
                </span>
                <span class="hidden sm:inline text-slate-400">|</span>
                <span class="tabular-nums text-slate-500 dark:text-slate-400">Clock <span x-text="lastSyncLabel"></span></span>
                <span class="hidden md:inline text-slate-400">·</span>
                <span class="text-violet-600 dark:text-violet-300"><?php echo e($fleetStats['degraded'] ?? 0); ?> degraded</span>
            </div>
            <div class="flex flex-wrap items-center gap-2">
                <form method="POST" action="<?php echo e(route('isp.routers.bulk')); ?>" class="inline">
                    <?php echo csrf_field(); ?>
                    <input type="hidden" name="action" value="poll">
                    <?php $__currentLoopData = $routers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $r): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <input type="hidden" name="ids[]" value="<?php echo e($r->id); ?>">
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <button type="submit" class="isp-noc-toolbar-btn isp-noc-toolbar-btn--primary" title="Queue an immediate poll for every router on this page">
                        <svg class="h-4 w-4 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/><path d="M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"/><path d="M16 16h5v5"/></svg>
                        Sync fleet now
                    </button>
                </form>
                <button type="button" class="isp-noc-toolbar-btn" :class="refreshing && 'isp-noc-toolbar-btn--loading'" :disabled="refreshing" @click="syncFleet()" title="Reload this page">
                    Reload view
                </button>
            </div>
        </div>
        <div class="grid gap-px bg-slate-200/80 dark:bg-slate-700/80 sm:grid-cols-3">
            <div class="isp-noc-live-cell bg-[var(--pb-panel)] px-4 py-3 sm:px-5">
                <p class="text-[10px] font-bold uppercase tracking-[0.12em] text-slate-500 dark:text-slate-400">Reachability source</p>
                <p class="mt-1 text-sm font-bold text-slate-900 dark:text-white">RouterOS API ping</p>
                <p class="mt-0.5 text-xs text-slate-500 dark:text-slate-400">Stored in router_metrics every minute</p>
            </div>
            <div class="isp-noc-live-cell bg-[var(--pb-panel)] px-4 py-3 sm:px-5">
                <p class="text-[10px] font-bold uppercase tracking-[0.12em] text-slate-500 dark:text-slate-400">Telemetry</p>
                <p class="mt-1 text-sm font-bold text-slate-900 dark:text-white"><?php echo e($fleetStats['with_telemetry'] ?? 0); ?> / <?php echo e($fleetStats['total']); ?> reporting</p>
                <p class="mt-0.5 text-xs text-slate-500 dark:text-slate-400">Sparklines pulled from real polls</p>
            </div>
            <div class="isp-noc-live-cell bg-[var(--pb-panel)] px-4 py-3 sm:px-5">
                <p class="text-[10px] font-bold uppercase tracking-[0.12em] text-slate-500 dark:text-slate-400">Scope</p>
                <p class="mt-1 text-sm font-bold text-slate-900 dark:text-white">MikroTik fleet</p>
                <p class="mt-0.5 text-xs text-slate-500 dark:text-slate-400">Hotspot · PPP · interfaces · CPU/RAM</p>
            </div>
        </div>
    </div>

    
    <?php if($fleetStats['total'] > 0): ?>
    <div class="grid gap-4 lg:grid-cols-3">
        <div class="isp-noc-topo pb-card p-5 lg:col-span-1">
            <div class="flex items-start justify-between gap-2">
                <div>
                    <h2 class="text-[11px] font-extrabold uppercase tracking-[0.16em] text-slate-500 dark:text-slate-400">Topology</h2>
                    <p class="mt-1 text-sm font-bold text-slate-900 dark:text-white">Branch map (preview)</p>
                </div>
                <span class="rounded-md bg-indigo-500/10 px-2 py-0.5 text-[10px] font-bold uppercase text-indigo-600 dark:text-indigo-300">Beta</span>
            </div>
            <div class="isp-noc-topo__canvas mt-4" aria-hidden="true">
                <div class="isp-noc-topo__node isp-noc-topo__node--core">CORE</div>
                <div class="isp-noc-topo__edge"></div>
                <div class="isp-noc-topo__node isp-noc-topo__node--edge">EDGE</div>
                <div class="isp-noc-topo__edge isp-noc-topo__edge--2"></div>
                <div class="isp-noc-topo__node isp-noc-topo__node--cpe">CPE</div>
            </div>
            <p class="mt-4 text-xs leading-relaxed text-slate-500 dark:text-slate-400">
                Geographic / branch overlays and L2 path tracing will render here. For now this panel anchors the NOC layout.
            </p>
        </div>
        <div class="space-y-3 lg:col-span-2">
            <h2 class="px-0.5 text-[11px] font-extrabold uppercase tracking-[0.16em] text-slate-500 dark:text-slate-400">Quick insights</h2>
            <div class="grid gap-3 sm:grid-cols-2">
                <div class="isp-noc-insight pb-card p-4">
                    <p class="text-[10px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400">Highest traffic (preview)</p>
                    <?php if($networkInsights['busiest']): ?>
                        <p class="mt-2 font-mono text-sm font-bold text-slate-900 dark:text-white"><?php echo e($networkInsights['busiest']->name); ?></p>
                        <p class="mt-1 text-xs text-slate-500 dark:text-slate-400">Relative load index <?php echo e($snapFor($networkInsights['busiest'])['traffic_score'] ?? '—'); ?></p>
                    <?php else: ?>
                        <p class="mt-2 text-sm text-slate-500">—</p>
                    <?php endif; ?>
                </div>
                <div class="isp-noc-insight pb-card p-4">
                    <p class="text-[10px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400">Most subscribers</p>
                    <?php if($networkInsights['most_subscribers']): ?>
                        <p class="mt-2 font-mono text-sm font-bold text-slate-900 dark:text-white"><?php echo e($networkInsights['most_subscribers']->name); ?></p>
                        <p class="mt-1 text-xs text-slate-500 dark:text-slate-400"><?php echo e(number_format($networkInsights['most_subscribers']->customers_count)); ?> customers</p>
                    <?php else: ?>
                        <p class="mt-2 text-sm text-slate-500">—</p>
                    <?php endif; ?>
                </div>
                <div class="isp-noc-insight pb-card p-4">
                    <p class="text-[10px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400">Last standby router</p>
                    <?php if($networkInsights['last_offline']): ?>
                        <p class="mt-2 font-mono text-sm font-bold text-rose-600 dark:text-rose-400"><?php echo e($networkInsights['last_offline']->name); ?></p>
                        <p class="mt-1 text-xs text-slate-500 dark:text-slate-400">Inactive in billing · verify WAN</p>
                    <?php else: ?>
                        <p class="mt-2 text-sm text-emerald-600 dark:text-emerald-400">All routers marked active</p>
                    <?php endif; ?>
                </div>
                <div class="isp-noc-insight pb-card p-4">
                    <p class="text-[10px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400">Congestion</p>
                    <p class="mt-2 text-sm font-semibold text-slate-800 dark:text-slate-200"><?php echo e($networkInsights['congestion_note']); ?></p>
                </div>
            </div>
        </div>
    </div>
    <?php endif; ?>

    
    <?php if($fleetStats['total'] > 0): ?>
    <div class="pb-card overflow-hidden p-0">
        <div class="border-b border-slate-200/80 px-4 py-3 dark:border-slate-700/80 sm:px-5">
            <div class="flex flex-wrap items-center justify-between gap-2">
                <h2 class="text-[11px] font-extrabold uppercase tracking-[0.16em] text-slate-500 dark:text-slate-400">Fleet filters</h2>
                <span class="text-[10px] font-medium text-slate-400">Search · status · branch · health · transport</span>
            </div>
        </div>
        <form
            action="<?php echo e(route('isp.routers.index')); ?>"
            method="GET"
            class="isp-noc-filter-form px-4 py-4 sm:px-5"
            data-turbo-frame="pb-main"
            x-data="pbFilterForm({ autoSearch: true })"
        >
            <div class="isp-noc-filter-grid">
                <div class="relative">
                    <svg class="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
                    <input type="search" name="q" value="<?php echo e(request('q')); ?>" placeholder="Search name, IP, site…" class="isp-noc-filter-input pl-10" autocomplete="off" />
                </div>
                <select name="is_active" class="isp-noc-filter-select" aria-label="Operational status">
                    <option value="">All statuses</option>
                    <option value="1" <?php if(request('is_active') === '1'): echo 'selected'; endif; ?>>Active / in service</option>
                    <option value="0" <?php if(request('is_active') === '0'): echo 'selected'; endif; ?>>Inactive / standby</option>
                </select>
                <input type="text" name="branch" value="<?php echo e(request('branch')); ?>" placeholder="Branch / site filter" class="isp-noc-filter-input" title="Matches location field" />
                <select name="health" class="isp-noc-filter-select" aria-label="Reachability">
                    <option value="">All reachability</option>
                    <option value="ok" <?php if(request('health') === 'ok'): echo 'selected'; endif; ?>>Online · healthy latency</option>
                    <option value="online" <?php if(request('health') === 'online'): echo 'selected'; endif; ?>>Any online</option>
                    <option value="warn" <?php if(request('health') === 'warn'): echo 'selected'; endif; ?>>Degraded / rebooting</option>
                    <option value="offline" <?php if(request('health') === 'offline'): echo 'selected'; endif; ?>>Offline</option>
                    <option value="unknown" <?php if(request('health') === 'unknown'): echo 'selected'; endif; ?>>Awaiting first poll</option>
                </select>
                <select name="conn_type" class="isp-noc-filter-select" aria-label="Transport">
                    <option value="">All transports</option>
                    <option value="ssl" <?php if(request('conn_type') === 'ssl'): echo 'selected'; endif; ?>>HTTPS API</option>
                    <option value="plain" <?php if(request('conn_type') === 'plain'): echo 'selected'; endif; ?>>HTTP API</option>
                </select>
                <select name="lifecycle" class="isp-noc-filter-select" aria-label="Lifecycle">
                    <option value="">All lifecycle</option>
                    <?php $__currentLoopData = ['live', 'stock', 'maintenance', 'retired']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $opt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($opt); ?>" <?php if(request('lifecycle') === $opt): echo 'selected'; endif; ?>><?php echo e(ucfirst($opt)); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <select name="sort" class="isp-noc-filter-select" aria-label="Sort">
                    <option value="latest" <?php if(request('sort','latest') === 'latest'): echo 'selected'; endif; ?>>Newest first</option>
                    <option value="name" <?php if(request('sort') === 'name'): echo 'selected'; endif; ?>>Name</option>
                    <option value="latency" <?php if(request('sort') === 'latency'): echo 'selected'; endif; ?>>Latency (low → high)</option>
                    <option value="health" <?php if(request('sort') === 'health'): echo 'selected'; endif; ?>>Health (high → low)</option>
                    <option value="customers" <?php if(request('sort') === 'customers'): echo 'selected'; endif; ?>>Most subscribers</option>
                </select>
                <select name="per_page" class="isp-noc-filter-select" aria-label="Per page">
                    <?php $__currentLoopData = [10, 15, 25, 50]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $size): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($size); ?>" <?php if((int) request('per_page', 15) === $size): echo 'selected'; endif; ?>><?php echo e($size); ?> / page</option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
            <div class="mt-4 flex flex-wrap items-center justify-between gap-2">
                <a href="<?php echo e(route('isp.routers.index')); ?>" data-turbo-frame="pb-main" class="isp-noc-toolbar-btn">Reset</a>
                <?php if(count($filterChips ?? []) > 0): ?>
                    <?php if (isset($component)) { $__componentOriginalb04499f975483930b83b2f024afe63b2 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalb04499f975483930b83b2f024afe63b2 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.filter-chips','data' => ['chips' => $filterChips,'class' => 'flex-1']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('filter-chips'); ?>
<?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(['chips' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($filterChips),'class' => 'flex-1']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalb04499f975483930b83b2f024afe63b2)): ?>
<?php $attributes = $__attributesOriginalb04499f975483930b83b2f024afe63b2; ?>
<?php unset($__attributesOriginalb04499f975483930b83b2f024afe63b2); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalb04499f975483930b83b2f024afe63b2)): ?>
<?php $component = $__componentOriginalb04499f975483930b83b2f024afe63b2; ?>
<?php unset($__componentOriginalb04499f975483930b83b2f024afe63b2); ?>
<?php endif; ?>
                <?php endif; ?>
            </div>
        </form>
    </div>
    <?php endif; ?>

    <?php if($fleetStats['total'] === 0): ?>
        <div class="isp-noc-empty pb-card overflow-hidden">
            <div class="isp-noc-empty__hero px-6 py-10 text-center sm:px-10 sm:py-12">
                <div class="mx-auto flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-indigo-500/20 to-cyan-500/15 ring-1 ring-indigo-500/25">
                    <svg class="h-8 w-8 text-indigo-600 dark:text-indigo-300" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"><rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/></svg>
                </div>
                <h3 class="mt-6 text-xl font-extrabold tracking-tight text-slate-900 dark:text-white">Provision your first MikroTik edge</h3>
                <p class="mx-auto mt-2 max-w-lg text-sm text-slate-600 dark:text-slate-400">
                    This console is built for live RouterOS fleets. Add a router to sync hotspot servers, IP pools, sessions, and subscriber attachment points.
                </p>
                <a href="<?php echo e(route('isp.routers.create')); ?>" class="pb-btn pb-btn-primary mt-8 inline-flex">Start connection wizard</a>
            </div>
            <div class="grid gap-px border-t border-slate-200/80 bg-slate-200/80 dark:border-slate-700/80 dark:bg-slate-700/80 sm:grid-cols-3">
                <div class="bg-[var(--pb-panel)] px-5 py-4 text-left">
                    <p class="text-[10px] font-bold uppercase tracking-wider text-violet-600 dark:text-violet-300">1 · Reachability</p>
                    <p class="mt-1 text-xs text-slate-600 dark:text-slate-400">Validate API port, SSL, and firewall allow-list.</p>
                </div>
                <div class="bg-[var(--pb-panel)] px-5 py-4 text-left">
                    <p class="text-[10px] font-bold uppercase tracking-wider text-cyan-600 dark:text-cyan-300">2 · Services</p>
                    <p class="mt-1 text-xs text-slate-600 dark:text-slate-400">Import hotspot profiles and pools into billing.</p>
                </div>
                <div class="bg-[var(--pb-panel)] px-5 py-4 text-left">
                    <p class="text-[10px] font-bold uppercase tracking-wider text-emerald-600 dark:text-emerald-300">3 · Subscribers</p>
                    <p class="mt-1 text-xs text-slate-600 dark:text-slate-400">Attach customers to this edge for automation.</p>
                </div>
            </div>
        </div>
    <?php elseif($routers->isEmpty()): ?>
        <div class="pb-card p-8 text-center">
            <p class="text-sm font-semibold text-slate-900 dark:text-white">No routers match these filters</p>
            <p class="mt-1 text-xs text-slate-500 dark:text-slate-400">Adjust search or status, or reset the fleet filters.</p>
            <a href="<?php echo e(route('isp.routers.index')); ?>" class="pb-btn pb-btn-primary mt-4 inline-flex text-sm">Reset filters</a>
        </div>
    <?php else: ?>
        
        <form method="POST" action="<?php echo e(route('isp.routers.bulk')); ?>" class="pb-card p-3 sm:p-4" x-show="selected.length > 0" x-cloak>
            <?php echo csrf_field(); ?>
            <template x-for="id in selected" :key="id">
                <input type="hidden" name="ids[]" :value="id">
            </template>
            <div class="flex flex-wrap items-center gap-3">
                <span class="text-xs font-bold uppercase tracking-wider text-slate-500"><span x-text="selected.length"></span> selected</span>
                <button type="submit" name="action" value="poll" class="pb-btn text-xs">Poll telemetry</button>
                <button type="submit" name="action" value="test" class="pb-btn text-xs">Test API</button>
                <button type="submit" name="action" value="backup" class="pb-btn text-xs">Backup config</button>
                <button type="submit" name="action" value="activate" class="pb-btn text-xs">Activate</button>
                <button type="submit" name="action" value="deactivate" class="pb-btn text-xs border-amber-200 bg-amber-50 text-amber-900 hover:bg-amber-100 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-100">Deactivate</button>
                <button type="button" class="pb-btn text-xs" @click="selected = []">Clear selection</button>
            </div>
        </form>

        
        <div class="hidden md:block pb-card p-0 overflow-hidden">
            <div class="isp-noc-table-scroll">
                <table class="isp-noc-table min-w-[1180px] w-full text-left text-sm">
                    <thead>
                        <tr>
                            <th class="isp-noc-th w-8">
                                <input type="checkbox" @change="toggleAll($event.target.checked, [<?php echo e($routers->pluck('id')->implode(',')); ?>])"
                                       class="rounded border-slate-300 text-indigo-600 focus:ring-indigo-500" aria-label="Select all on page" />
                            </th>
                            <th class="isp-noc-th">Router</th>
                            <th class="isp-noc-th">Endpoints</th>
                            <th class="isp-noc-th">Site</th>
                            <th class="isp-noc-th">Health</th>
                            <th class="isp-noc-th">Telemetry</th>
                            <th class="isp-noc-th">Subscribers</th>
                            <th class="isp-noc-th isp-noc-th--sticky text-right">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $routers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $router): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php $noc = $snapFor($router); $tone = $latencyTone($noc); ?>
                            <tr class="isp-noc-tr group">
                                <td class="isp-noc-td">
                                    <input type="checkbox" :value="<?php echo e($router->id); ?>" x-model.number="selected"
                                           class="rounded border-slate-300 text-indigo-600 focus:ring-indigo-500" aria-label="Select router <?php echo e($router->name); ?>" />
                                </td>
                                <td class="isp-noc-td">
                                    <div class="flex items-start gap-3">
                                        <span class="isp-noc-router-icon" aria-hidden="true">
                                            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"><rect x="4" y="4" width="16" height="10" rx="1"/><path d="M9 20h6"/><path d="M12 14v6"/></svg>
                                        </span>
                                        <div class="min-w-0">
                                            <p class="font-bold text-slate-900 dark:text-white"><?php echo e($router->name); ?></p>
                                            <p class="mt-0.5 text-[11px] text-slate-500 dark:text-slate-400"><?php echo e($noc['model']); ?></p>
                                            <div class="mt-2 flex flex-wrap gap-1.5">
                                                <?php $reach = $noc['reachability'] ?? 'unknown'; ?>
                                                <?php if($reach === 'online'): ?>
                                                    <span class="isp-noc-chip isp-noc-chip--ok"><span class="isp-noc-pulse h-1.5 w-1.5 rounded-full bg-emerald-400"></span> Online</span>
                                                <?php elseif(in_array($reach, ['degraded', 'rebooting'], true)): ?>
                                                    <span class="isp-noc-chip isp-noc-chip--warn"><span class="h-1.5 w-1.5 rounded-full bg-amber-400"></span> <?php echo e(ucfirst($reach)); ?></span>
                                                <?php elseif($reach === 'offline'): ?>
                                                    <span class="isp-noc-chip isp-noc-chip--danger"><span class="h-1.5 w-1.5 rounded-full bg-rose-400"></span> Offline</span>
                                                <?php else: ?>
                                                    <span class="isp-noc-chip isp-noc-chip--muted">Awaiting poll</span>
                                                <?php endif; ?>
                                                <?php if($noc['api_status'] === 'connected'): ?>
                                                    <span class="isp-noc-chip isp-noc-chip--info">API</span>
                                                <?php elseif($noc['api_status'] === 'degraded'): ?>
                                                    <span class="isp-noc-chip isp-noc-chip--warn">API</span>
                                                <?php else: ?>
                                                    <span class="isp-noc-chip isp-noc-chip--muted">API</span>
                                                <?php endif; ?>
                                                <?php if($router->branch): ?>
                                                    <span class="isp-noc-chip isp-noc-chip--muted"><?php echo e($router->branch); ?></span>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </td>
                                <td class="isp-noc-td font-mono text-xs">
                                    <div class="text-slate-900 dark:text-slate-100"><?php echo e($router->ip_address); ?></div>
                                    <div class="mt-1 text-slate-500 dark:text-slate-400">:<?php echo e($router->port); ?><?php if($router->use_ssl): ?><span class="ml-1 text-emerald-600 dark:text-emerald-400">TLS</span><?php else: ?><span class="ml-1 text-slate-400">plain</span><?php endif; ?></div>
                                </td>
                                <td class="isp-noc-td text-xs text-slate-600 dark:text-slate-300"><?php echo e($router->location ?? '—'); ?></td>
                                <td class="isp-noc-td">
                                    <div class="flex items-center gap-3">
                                        <div class="isp-noc-ring" data-tone="<?php echo e($router->is_active ? $tone : 'danger'); ?>" style="--p: <?php echo e($router->is_active ? $noc['health_pct'] : 0); ?>">
                                            <span><?php echo e($router->is_active ? $noc['health_pct'] : 0); ?>%</span>
                                        </div>
                                        <div class="min-w-0">
                                            <div class="isp-noc-uptime-track">
                                                <span style="width: <?php echo e($router->is_active ? $noc['uptime_pct'] : 0); ?>%"></span>
                                            </div>
                                            <p class="mt-1 text-[10px] font-semibold uppercase tracking-wider text-slate-500">Uptime est. <?php echo e($router->is_active ? $noc['uptime_pct'] : 0); ?>%</p>
                                        </div>
                                    </div>
                                </td>
                                <td class="isp-noc-td">
                                    <div class="flex flex-wrap items-center gap-2">
                                        <?php if($router->is_active && $noc['latency_ms'] !== null): ?>
                                            <span class="isp-noc-lat isp-noc-lat--<?php echo e($tone); ?>"><?php echo e($noc['latency_ms']); ?>ms</span>
                                        <?php else: ?>
                                            <span class="isp-noc-lat isp-noc-lat--danger">—</span>
                                        <?php endif; ?>
                                        <?php if($router->is_active && $noc['last_sync_sec'] !== null): ?>
                                            <span class="text-[10px] font-medium text-slate-500 dark:text-slate-400">Sync <?php echo e($noc['last_sync_sec']); ?>s</span>
                                        <?php endif; ?>
                                    </div>
                                    <div class="mt-2">
                                        <?php if (isset($component)) { $__componentOriginal87107310305910649180f68a39fd74db = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal87107310305910649180f68a39fd74db = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dashboard.sparkline','data' => ['data' => $noc['spark'],'height' => 32,'width' => 112,'stroke' => $tone === 'warn' ? '#f59e0b' : ($router->is_active ? '#10b981' : '#64748b'),'fill' => $tone === 'warn' ? 'rgba(245, 158, 11, 0.12)' : ($router->is_active ? 'rgba(16, 185, 129, 0.12)' : 'rgba(100, 116, 139, 0.1)')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dashboard.sparkline'); ?>
<?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(['data' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($noc['spark']),'height' => 32,'width' => 112,'stroke' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($tone === 'warn' ? '#f59e0b' : ($router->is_active ? '#10b981' : '#64748b')),'fill' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($tone === 'warn' ? 'rgba(245, 158, 11, 0.12)' : ($router->is_active ? 'rgba(16, 185, 129, 0.12)' : 'rgba(100, 116, 139, 0.1)'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal87107310305910649180f68a39fd74db)): ?>
<?php $attributes = $__attributesOriginal87107310305910649180f68a39fd74db; ?>
<?php unset($__attributesOriginal87107310305910649180f68a39fd74db); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal87107310305910649180f68a39fd74db)): ?>
<?php $component = $__componentOriginal87107310305910649180f68a39fd74db; ?>
<?php unset($__componentOriginal87107310305910649180f68a39fd74db); ?>
<?php endif; ?>
                                    </div>
                                </td>
                                <td class="isp-noc-td tabular-nums">
                                    <span class="text-base font-bold text-slate-900 dark:text-white"><?php echo e(number_format($router->customers_count)); ?></span>
                                    <p class="text-[10px] text-slate-500">assigned</p>
                                </td>
                                <td class="isp-noc-td isp-noc-td--sticky text-right">
                                    <div class="isp-noc-actions flex justify-end gap-1">
                                        <button type="button" class="isp-noc-icon-btn" title="Quick view" @click.prevent="openDetail(<?php echo e(\Illuminate\Support\Js::from($detailPayload($router))); ?>)">
                                            <svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>
                                        </button>
                                        <a href="<?php echo e(route('isp.routers.show', $router)); ?>" class="isp-noc-icon-btn" title="Full detail page">
                                            <svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>
                                        </a>
                                        <a href="<?php echo e(route('isp.routers.edit', $router)); ?>" class="isp-noc-icon-btn" title="Edit router">
                                            <svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>
                                        </a>
                                        <div class="relative" x-data="{ open: false }">
                                            <button type="button" class="isp-noc-icon-btn isp-noc-icon-btn--more" @click="open = !open" :aria-expanded="open" title="More operations">
                                                <svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
                                            </button>
                                            <div x-show="open" x-cloak @click.outside="open = false" x-transition class="isp-noc-dropdown absolute right-0 z-50 mt-1 w-56 py-1">
                                                <form method="POST" action="<?php echo e(route('isp.routers.poll', $router)); ?>" class="block">
                                                    <?php echo csrf_field(); ?>
                                                    <button type="submit" class="isp-noc-dropdown__item w-full text-left">Poll telemetry now</button>
                                                </form>
                                                <form method="POST" action="<?php echo e(route('isp.routers.test', $router)); ?>" class="block" onsubmit="confirmFormSubmit(event, {title: 'Test API session', text: 'Run API handshake to <?php echo e($router->name); ?>?', icon: 'question', confirmButtonText: 'Test'}); return false;">
                                                    <?php echo csrf_field(); ?>
                                                    <button type="submit" class="isp-noc-dropdown__item w-full text-left">Test API connection</button>
                                                </form>
                                                <form method="POST" action="<?php echo e(route('isp.routers.backup', $router)); ?>" class="block">
                                                    <?php echo csrf_field(); ?>
                                                    <button type="submit" class="isp-noc-dropdown__item w-full text-left">Backup config (/export)</button>
                                                </form>
                                                <?php if($router->is_active): ?>
                                                    <a href="<?php echo e(route('isp.hotspot-servers.index')); ?>" class="isp-noc-dropdown__item">Hotspot servers</a>
                                                    <a href="<?php echo e(route('isp.customers.index', ['router_id' => $router->id])); ?>" class="isp-noc-dropdown__item">PPPoE / subscribers</a>
                                                    <form method="POST" action="<?php echo e(route('isp.routers.reboot', $router)); ?>" onsubmit="confirmFormSubmit(event, {title: 'Reboot router', text: 'Disconnect every subscriber on <?php echo e($router->name); ?> for ~90 seconds?', icon: 'warning', confirmButtonText: 'Reboot'}); return false;">
                                                        <?php echo csrf_field(); ?>
                                                        <button type="submit" class="isp-noc-dropdown__item isp-noc-dropdown__item--danger w-full text-left">Reboot router</button>
                                                    </form>
                                                    <form method="POST" action="<?php echo e(route('isp.routers.deactivate', $router)); ?>" onsubmit="confirmFormSubmit(event, {title: 'Disable router', text: 'Mark this router inactive in billing?', icon: 'warning', confirmButtonText: 'Disable'}); return false;">
                                                        <?php echo csrf_field(); ?>
                                                        <button type="submit" class="isp-noc-dropdown__item isp-noc-dropdown__item--danger w-full text-left">Disable in billing</button>
                                                    </form>
                                                <?php else: ?>
                                                    <form method="POST" action="<?php echo e(route('isp.routers.activate', $router)); ?>" onsubmit="confirmFormSubmit(event, {title: 'Enable router', text: 'Activate <?php echo e($router->name); ?>?', icon: 'question', confirmButtonText: 'Enable'}); return false;">
                                                        <?php echo csrf_field(); ?>
                                                        <button type="submit" class="isp-noc-dropdown__item w-full text-left">Enable</button>
                                                    </form>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>

        
        <div class="space-y-3 md:hidden">
            <?php $__currentLoopData = $routers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $router): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php $noc = $snapFor($router); $tone = $latencyTone($noc); ?>
                <div class="isp-noc-mobile-card pb-card p-4">
                    <div class="flex items-start justify-between gap-3">
                        <div>
                            <p class="font-bold text-slate-900 dark:text-white"><?php echo e($router->name); ?></p>
                            <p class="text-[11px] text-slate-500"><?php echo e($noc['model']); ?></p>
                        </div>
                        <?php if($router->is_active): ?>
                            <span class="isp-noc-chip isp-noc-chip--ok">Online</span>
                        <?php else: ?>
                            <span class="isp-noc-chip isp-noc-chip--danger">Offline</span>
                        <?php endif; ?>
                    </div>
                    <div class="mt-3 grid grid-cols-2 gap-2 text-xs">
                        <div>
                            <p class="text-[10px] font-bold uppercase text-slate-400">IP</p>
                            <p class="font-mono text-slate-800 dark:text-slate-200"><?php echo e($router->ip_address); ?>:<?php echo e($router->port); ?></p>
                        </div>
                        <div>
                            <p class="text-[10px] font-bold uppercase text-slate-400">Latency</p>
                            <p class="font-semibold <?php echo e($tone === 'warn' ? 'text-amber-600' : ($router->is_active ? 'text-emerald-600' : 'text-rose-600')); ?>">
                                <?php echo e($router->is_active && $noc['latency_ms'] !== null ? $noc['latency_ms'].' ms' : '—'); ?>

                            </p>
                        </div>
                        <div>
                            <p class="text-[10px] font-bold uppercase text-slate-400">Health</p>
                            <p class="font-bold"><?php echo e($router->is_active ? $noc['health_pct'] : 0); ?>%</p>
                        </div>
                        <div>
                            <p class="text-[10px] font-bold uppercase text-slate-400">Customers</p>
                            <p class="font-bold tabular-nums"><?php echo e(number_format($router->customers_count)); ?></p>
                        </div>
                    </div>
                    <div class="mt-3 flex flex-wrap gap-2 border-t border-slate-200/80 pt-3 dark:border-slate-700/80">
                        <button type="button" class="pb-btn pb-btn-primary text-xs" @click="openDetail(<?php echo e(\Illuminate\Support\Js::from($detailPayload($router))); ?>)">Quick view</button>
                        <a href="<?php echo e(route('isp.routers.show', $router)); ?>" class="pb-btn text-xs">Open</a>
                        <a href="<?php echo e(route('isp.routers.edit', $router)); ?>" class="pb-btn text-xs">Edit</a>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>

        <div class="pb-card flex flex-col gap-3 p-4 sm:flex-row sm:items-center sm:justify-between">
            <p class="text-sm text-slate-500 dark:text-slate-400">
                Showing
                <span class="font-medium text-slate-700 dark:text-slate-200"><?php echo e($routers->firstItem() ?? 0); ?></span>
                –
                <span class="font-medium text-slate-700 dark:text-slate-200"><?php echo e($routers->lastItem() ?? 0); ?></span>
                of
                <span class="font-medium text-slate-700 dark:text-slate-200"><?php echo e(number_format($routers->total())); ?></span>
            </p>
            <?php if($routers->hasPages()): ?>
                <div class="pb-pagination"><?php echo e($routers->withQueryString()->links()); ?></div>
            <?php endif; ?>
        </div>
    <?php endif; ?>

    
    <div
        x-show="detailOpen"
        x-cloak
        class="isp-noc-modal-root fixed inset-0 z-[100] flex items-end justify-center sm:items-center"
        x-transition.opacity
        aria-modal="true"
        role="dialog"
    >
        <div class="absolute inset-0 bg-slate-950/60 backdrop-blur-[2px]" @click="closeDetail()"></div>
        <div
            class="isp-noc-modal relative z-10 m-0 max-h-[min(92vh,720px)] w-full max-w-lg overflow-y-auto rounded-t-2xl border border-slate-200 bg-[var(--pb-panel)] shadow-2xl dark:border-slate-700 sm:m-4 sm:rounded-2xl"
            x-show="detailOpen"
            x-transition
            @click.stop
        >
            <template x-if="detail">
                <div>
                    <div class="sticky top-0 z-10 flex items-start justify-between gap-3 border-b border-slate-200/80 bg-[var(--pb-panel)]/95 px-5 py-4 backdrop-blur dark:border-slate-700/80">
                        <div class="min-w-0">
                            <p class="text-[10px] font-extrabold uppercase tracking-[0.14em] text-violet-600 dark:text-violet-300">Router detail</p>
                            <h3 class="truncate text-lg font-extrabold text-slate-900 dark:text-white" x-text="detail.name"></h3>
                            <p class="mt-0.5 font-mono text-xs text-slate-500" x-text="detail.ip_address + ':' + detail.port"></p>
                        </div>
                        <button type="button" class="isp-noc-icon-btn shrink-0" @click="closeDetail()" title="Close">
                            <svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
                        </button>
                    </div>
                    <div class="space-y-4 px-5 py-5">
                        <div class="grid grid-cols-2 gap-3 text-xs">
                            <div class="rounded-xl border border-slate-200/80 p-3 dark:border-slate-700/80">
                                <p class="text-[10px] font-bold uppercase text-slate-400">API</p>
                                <p class="mt-1 font-semibold text-slate-900 dark:text-white" x-text="detail.noc.api_label"></p>
                            </div>
                            <div class="rounded-xl border border-slate-200/80 p-3 dark:border-slate-700/80">
                                <p class="text-[10px] font-bold uppercase text-slate-400">Firmware</p>
                                <p class="mt-1 font-mono font-semibold text-slate-900 dark:text-white" x-text="detail.noc.firmware"></p>
                            </div>
                            <div class="rounded-xl border border-slate-200/80 p-3 dark:border-slate-700/80">
                                <p class="text-[10px] font-bold uppercase text-slate-400">CPU</p>
                                <p class="mt-1 font-semibold text-slate-900 dark:text-white"><span x-text="detail.noc.cpu_pct ?? '—'"></span><span x-show="detail.noc.cpu_pct != null">%</span></p>
                            </div>
                            <div class="rounded-xl border border-slate-200/80 p-3 dark:border-slate-700/80">
                                <p class="text-[10px] font-bold uppercase text-slate-400">Memory</p>
                                <p class="mt-1 font-semibold text-slate-900 dark:text-white"><span x-text="detail.noc.mem_pct ?? '—'"></span><span x-show="detail.noc.mem_pct != null">%</span></p>
                            </div>
                            <div class="rounded-xl border border-slate-200/80 p-3 dark:border-slate-700/80">
                                <p class="text-[10px] font-bold uppercase text-slate-400">Hotspot users</p>
                                <p class="mt-1 font-semibold text-slate-900 dark:text-white" x-text="detail.noc.hotspot_users ?? '—'"></p>
                            </div>
                            <div class="rounded-xl border border-slate-200/80 p-3 dark:border-slate-700/80">
                                <p class="text-[10px] font-bold uppercase text-slate-400">PPPoE users</p>
                                <p class="mt-1 font-semibold text-slate-900 dark:text-white" x-text="detail.noc.pppoe_users ?? '—'"></p>
                            </div>
                        </div>
                        <div class="rounded-xl border border-slate-200/80 p-3 text-xs dark:border-slate-700/80">
                            <p class="text-[10px] font-bold uppercase text-slate-400">Interfaces (preview)</p>
                            <p class="mt-1 font-semibold text-slate-900 dark:text-white">
                                <span x-text="detail.noc.interfaces_up"></span> / <span x-text="detail.noc.interfaces_total"></span> up
                            </p>
                        </div>
                        <div class="rounded-xl border border-slate-200/80 p-3 text-xs dark:border-slate-700/80">
                            <p class="text-[10px] font-bold uppercase text-slate-400">Traffic</p>
                            <p class="mt-1 text-slate-600 dark:text-slate-400">Relative load index <span class="font-mono font-bold text-slate-900 dark:text-white" x-text="detail.noc.traffic_score"></span> · sparkline shown in fleet grid.</p>
                        </div>
                        <a class="pb-btn pb-btn-primary block w-full text-center text-sm" :href="`<?php echo e(url('/isp/routers')); ?>/${detail.id}`">Open full router page</a>
                    </div>
                </div>
            </template>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

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