<?php
require_once 'includes/config.php';
requireLogin();
header('Content-Type: application/json');
echo json_encode([
    'pin_verified'  => $_SESSION['pin_verified'] ?? 'NOT SET',
    'pin_last_time' => $_SESSION['pin_last_time'] ?? 'NOT SET',
    'session_id'    => session_id(),
    'time_now'      => time(),
    'diff'          => isset($_SESSION['pin_last_time']) ? (time() - $_SESSION['pin_last_time']) : 'N/A',
]);
