<!DOCTYPE html>
<html>
<head><title>Debug Session</title></head>
<body style="font-family:Arial;padding:40px;">
    <h1>✅ AUTENTICACIÓN OK - Session Guardada</h1>
    <h2>User: <?= $user['nombre'] ?> (<?= $user['rol'] ?>)</h2>
    <pre>
<?php print_r(session()->all()); ?>
    </pre>
    <p><strong>isLoggedIn:</strong> <?= session('isLoggedIn') ? '✅ VERDE' : '❌ ROJO' ?></p>
    <a href="<?= site_url('admin/dashboard') ?>" style="background:#28a745;color:white;padding:15px 30px;font-size:18px;border-radius:8px;">→ IR A DASHBOARD</a>
</body>
</html>
