<?php if (isset($component)) { $__componentOriginal91fdd17964e43374ae18c674f95cdaa3 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal91fdd17964e43374ae18c674f95cdaa3 = $attributes; } ?>
<?php $component = App\View\Components\AdminLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin-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\AdminLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex flex-col gap-1 sm:flex-row sm:items-end sm:justify-between">
            <div>
                <p class="text-[10px] font-bold uppercase tracking-[0.16em] text-indigo-600 dark:text-indigo-400">Platform command</p>
                <h2 class="text-xl font-bold text-slate-900 dark:text-white leading-tight">
                    <?php echo e(__('Super Admin NOC')); ?>

                </h2>
                <p class="mt-1 text-sm text-slate-500 dark:text-slate-400">Tenant fleet health, billing posture, and global audit telemetry.</p>
            </div>
            <div class="flex flex-wrap items-center gap-2 text-xs text-slate-500 dark:text-slate-400">
                <span class="inline-flex items-center gap-1.5 rounded-full border border-slate-200 bg-white px-3 py-1 shadow-sm dark:border-slate-700 dark:bg-slate-900">
                    <span class="pb-noc-dot pb-noc-dot--healthy" aria-hidden="true"></span>
                    Fleet poll ~1m
                </span>
                <a href="<?php echo e(route('admin.audit.activity')); ?>" class="font-semibold text-indigo-600 hover:text-indigo-500 dark:text-indigo-400">Global audit →</a>
            </div>
        </div>
     <?php $__env->endSlot(); ?>

    
    <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4 mb-6">
        <div class="rounded-2xl border border-slate-200/80 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-900">
            <p class="text-[10px] font-bold uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">Total ISPs</p>
            <p class="mt-2 text-3xl font-extrabold tabular-nums text-slate-900 dark:text-white"><?php echo e(number_format($stats['total_isps'])); ?></p>
            <p class="mt-1 text-xs text-slate-500 dark:text-slate-400"><?php echo e(number_format($stats['active_isps'])); ?> active tenants</p>
        </div>
        <div class="rounded-2xl border border-slate-200/80 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-900">
            <p class="text-[10px] font-bold uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">Subscribers</p>
            <p class="mt-2 text-3xl font-extrabold tabular-nums text-slate-900 dark:text-white"><?php echo e(number_format($stats['total_customers'])); ?></p>
            <p class="mt-1 text-xs text-slate-500 dark:text-slate-400"><?php echo e(number_format($stats['active_customers'])); ?> active</p>
        </div>
        <div class="rounded-2xl border border-slate-200/80 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-900">
            <p class="text-[10px] font-bold uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400">Gross collections</p>
            <p class="mt-2 text-3xl font-extrabold tabular-nums text-slate-900 dark:text-white">KES <?php echo e(number_format($stats['total_revenue'], 0)); ?></p>
            <p class="mt-1 text-xs text-slate-500 dark:text-slate-400">All completed payments</p>
        </div>
        <div class="rounded-2xl border border-rose-200/70 bg-gradient-to-br from-rose-50/80 to-white p-5 shadow-sm dark:border-rose-500/20 dark:from-rose-950/30 dark:to-slate-900">
            <p class="text-[10px] font-bold uppercase tracking-[0.14em] text-rose-600 dark:text-rose-400">Invoice pressure</p>
            <p class="mt-2 text-3xl font-extrabold tabular-nums text-rose-700 dark:text-rose-300"><?php echo e(number_format($stats['pending_invoices'])); ?></p>
            <p class="mt-1 text-xs text-rose-600/80 dark:text-rose-300/80"><?php echo e(number_format($stats['overdue_invoices'])); ?> customer invoices overdue</p>
        </div>
    </div>

    
    <div class="grid grid-cols-1 gap-6 lg:grid-cols-3">
        <div class="space-y-6 lg:col-span-2">
            <?php if (isset($component)) { $__componentOriginal9f481534314b7cdb158e307b16c23344 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9f481534314b7cdb158e307b16c23344 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.dashboard.fleet-status','data' => ['totals' => $fleetTotals,'tenants' => $fleetTenants]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.dashboard.fleet-status'); ?>
<?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(['totals' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($fleetTotals),'tenants' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($fleetTenants)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9f481534314b7cdb158e307b16c23344)): ?>
<?php $attributes = $__attributesOriginal9f481534314b7cdb158e307b16c23344; ?>
<?php unset($__attributesOriginal9f481534314b7cdb158e307b16c23344); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9f481534314b7cdb158e307b16c23344)): ?>
<?php $component = $__componentOriginal9f481534314b7cdb158e307b16c23344; ?>
<?php unset($__componentOriginal9f481534314b7cdb158e307b16c23344); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginal941bf2c3468219ab3d8bf00980d617e7 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal941bf2c3468219ab3d8bf00980d617e7 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.dashboard.tenant-list','data' => ['tenants' => $recentIsps]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.dashboard.tenant-list'); ?>
<?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(['tenants' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($recentIsps)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal941bf2c3468219ab3d8bf00980d617e7)): ?>
<?php $attributes = $__attributesOriginal941bf2c3468219ab3d8bf00980d617e7; ?>
<?php unset($__attributesOriginal941bf2c3468219ab3d8bf00980d617e7); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal941bf2c3468219ab3d8bf00980d617e7)): ?>
<?php $component = $__componentOriginal941bf2c3468219ab3d8bf00980d617e7; ?>
<?php unset($__componentOriginal941bf2c3468219ab3d8bf00980d617e7); ?>
<?php endif; ?>
        </div>

        <div class="space-y-6 lg:sticky lg:top-20 lg:self-start">
            <?php if (isset($component)) { $__componentOriginalcfa9aa1fc45fc071c63a5e6b2109cdf4 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalcfa9aa1fc45fc071c63a5e6b2109cdf4 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.dashboard.activity-feed','data' => ['events' => $activityFeed]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.dashboard.activity-feed'); ?>
<?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(['events' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($activityFeed)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalcfa9aa1fc45fc071c63a5e6b2109cdf4)): ?>
<?php $attributes = $__attributesOriginalcfa9aa1fc45fc071c63a5e6b2109cdf4; ?>
<?php unset($__attributesOriginalcfa9aa1fc45fc071c63a5e6b2109cdf4); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalcfa9aa1fc45fc071c63a5e6b2109cdf4)): ?>
<?php $component = $__componentOriginalcfa9aa1fc45fc071c63a5e6b2109cdf4; ?>
<?php unset($__componentOriginalcfa9aa1fc45fc071c63a5e6b2109cdf4); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginal254241c105632d952289b60a88fad444 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal254241c105632d952289b60a88fad444 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.dashboard.critical-alerts','data' => ['alerts' => $criticalAlerts]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.dashboard.critical-alerts'); ?>
<?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(['alerts' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($criticalAlerts)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal254241c105632d952289b60a88fad444)): ?>
<?php $attributes = $__attributesOriginal254241c105632d952289b60a88fad444; ?>
<?php unset($__attributesOriginal254241c105632d952289b60a88fad444); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal254241c105632d952289b60a88fad444)): ?>
<?php $component = $__componentOriginal254241c105632d952289b60a88fad444; ?>
<?php unset($__componentOriginal254241c105632d952289b60a88fad444); ?>
<?php endif; ?>
        </div>
    </div>

    
    <div class="mt-8 grid grid-cols-1 gap-4 sm:grid-cols-3">
        <a href="<?php echo e(route('admin.isps.index')); ?>" class="rounded-2xl border border-slate-200/80 bg-white p-5 shadow-sm transition hover:border-indigo-200 hover:shadow-md dark:border-slate-800 dark:bg-slate-900 dark:hover:border-indigo-500/30">
            <p class="text-sm font-bold text-slate-900 dark:text-white">Manage ISPs</p>
            <p class="mt-1 text-xs text-slate-500 dark:text-slate-400">Tenant roster, SaaS plans, lock controls</p>
        </a>
        <a href="<?php echo e(route('admin.finance.index')); ?>" class="rounded-2xl border border-slate-200/80 bg-white p-5 shadow-sm transition hover:border-indigo-200 hover:shadow-md dark:border-slate-800 dark:bg-slate-900 dark:hover:border-indigo-500/30">
            <p class="text-sm font-bold text-slate-900 dark:text-white">Platform finance</p>
            <p class="mt-1 text-xs text-slate-500 dark:text-slate-400">SaaS billing calendar & commission ledger</p>
        </a>
        <a href="<?php echo e(route('admin.network.index')); ?>" class="rounded-2xl border border-slate-200/80 bg-white p-5 shadow-sm transition hover:border-indigo-200 hover:shadow-md dark:border-slate-800 dark:bg-slate-900 dark:hover:border-indigo-500/30">
            <p class="text-sm font-bold text-slate-900 dark:text-white">Network operations</p>
            <p class="mt-1 text-xs text-slate-500 dark:text-slate-400">Cross-tenant router telemetry & maintenance</p>
        </a>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal91fdd17964e43374ae18c674f95cdaa3)): ?>
<?php $attributes = $__attributesOriginal91fdd17964e43374ae18c674f95cdaa3; ?>
<?php unset($__attributesOriginal91fdd17964e43374ae18c674f95cdaa3); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal91fdd17964e43374ae18c674f95cdaa3)): ?>
<?php $component = $__componentOriginal91fdd17964e43374ae18c674f95cdaa3; ?>
<?php unset($__componentOriginal91fdd17964e43374ae18c674f95cdaa3); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\ispbilling\resources\views/admin/dashboard.blade.php ENDPATH**/ ?>