<?php
/**
 * 404 Not Found Error Page
 * Kenyan Pension & Life Insurance Management System
 */

$pageTitle = '404 - Page Not Found';
http_response_code(404);

if (session_status() == PHP_SESSION_NONE) {
    session_start();
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>404 - Page Not Found</title>
    <link rel="stylesheet" href="../assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="../assets/css/pension-dashboard.css">
    <style>
        .error-page {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        }
        .error-card {
            background: white;
            border-radius: 20px;
            padding: 3rem;
            max-width: 600px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }
        .error-code {
            font-size: 120px;
            font-weight: 800;
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1;
            margin-bottom: 1rem;
        }
        .error-title {
            font-size: 32px;
            font-weight: 700;
            color: #2d3748;
            margin-bottom: 1rem;
        }
        .error-description {
            font-size: 18px;
            color: #718096;
            margin-bottom: 2rem;
            line-height: 1.6;
        }
        .error-actions {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }
        .error-btn {
            padding: 12px 32px;
            border-radius: 10px;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s;
            border: none;
            cursor: pointer;
        }
        .error-btn-primary {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            color: white;
        }
        .error-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(240, 147, 251, 0.4);
            color: white;
        }
        .error-btn-secondary {
            background: #e2e8f0;
            color: #4a5568;
        }
        .error-btn-secondary:hover {
            background: #cbd5e0;
            color: #2d3748;
        }
        .error-icon {
            font-size: 80px;
            margin-bottom: 1rem;
        }
    </style>
</head>
<body>
    <div class="error-page">
        <div class="error-card">
            <div class="error-icon">🔍</div>
            <div class="error-code">404</div>
            <h1 class="error-title">Page Not Found</h1>
            <p class="error-description">
                The page you're looking for doesn't exist or has been moved.
                Please check the URL or navigate back to the homepage.
            </p>
            <div class="error-actions">
                <?php if (isset($_SESSION['user_id'])): ?>
                    <a href="../index.php" class="error-btn error-btn-primary">
                        Go to Dashboard
                    </a>
                <?php else: ?>
                    <a href="../login.php" class="error-btn error-btn-primary">
                        Go to Login
                    </a>
                <?php endif; ?>
                <a href="javascript:history.back()" class="error-btn error-btn-secondary">
                    Go Back
                </a>
            </div>
        </div>
    </div>
</body>
</html>