<aside class="flex w-60 shrink-0 flex-col border-r border-slate-800 bg-slate-950 text-slate-100">
    <div class="border-b border-slate-800 px-5 py-4">
        <a href="<?php echo e(route('super-admin.dashboard')); ?>" class="text-base font-semibold text-white">ImóvelZapAi</a>
        <p class="mt-1 text-xs text-slate-400">Painel da plataforma</p>
    </div>
    <nav class="flex-1 space-y-1 px-3 py-4 text-sm">
        <?php
            $links = [
                ['super-admin.dashboard', 'Visão geral', null],
                ['super-admin.tenants.index', 'Clientes', 'super_admin,support'],
                ['super-admin.plans.index', 'Planos', 'super_admin,finance,auditor'],
                ['super-admin.billing.subscriptions', 'Assinaturas', 'super_admin,finance,auditor'],
                ['super-admin.ai.index', 'Uso de IA', 'super_admin,devops,auditor'],
                ['super-admin.health', 'Status APIs', 'super_admin,devops,auditor'],
                ['super-admin.settings', 'Configurações', 'super_admin'],
                ['super-admin.support', 'Suporte', 'super_admin,support'],
                ['super-admin.incidents.index', 'Incidentes', 'super_admin,devops,support'],
            ];
            $role = auth('platform')->user()?->roleEnum()->value;
        ?>
        <?php $__currentLoopData = $links; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as [$route, $label, $roles]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php
                $allowed = $roles === null
                    || $role === 'super_admin'
                    || in_array($role, explode(',', (string) $roles), true);
            ?>
            <?php if($allowed): ?>
                <a href="<?php echo e(route($route)); ?>"
                   class="<?php echo \Illuminate\Support\Arr::toCssClasses([
                       'block rounded-lg px-3 py-2 font-medium transition',
                       'bg-emerald-600 text-white' => request()->routeIs($route) || request()->routeIs(str_replace('.index', '.*', $route)),
                       'text-slate-300 hover:bg-slate-800 hover:text-white' => ! (request()->routeIs($route) || request()->routeIs(str_replace('.index', '.*', $route))),
                   ]); ?>"><?php echo e($label); ?></a>
            <?php endif; ?>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </nav>
</aside>
<?php /**PATH /var/www/html/backend/resources/views/partials/superadmin-sidebar.blade.php ENDPATH**/ ?>