<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="utf-8">
<title><?= $heading; ?></title>

<meta name="viewport" content="width=device-width, initial-scale=1">

<style>
/* ================================
   🔥 GLOBAL STYLE
================================ */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #ff8c00, #ffb347);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ================================
   🔥 CARD
================================ */
.error-card {
    background: #fff;
    padding: 40px 35px;
    border-radius: 16px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    animation: fadeIn 0.4s ease;
}

/* ================================
   🔥 TITLE
================================ */
.error-code {
    font-size: 60px;
    font-weight: 700;
    color: #ff8c00;
    margin-bottom: 10px;
}

.error-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.error-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

/* ================================
   🔥 BUTTON
================================ */
.btn-dashboard {
    display: inline-block;
    padding: 10px 20px;
    background: #ff8c00;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.btn-dashboard:hover {
    background: #e67700;
}

/* ================================
   🔥 ANIMATION
================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
</style>

</head>
<body>

<div class="error-card">

    <!-- 🔥 KODE ERROR -->
    <div class="error-code">
        <?= strpos($heading, '404') !== false ? '404' : 'Error'; ?>
    </div>

    <!-- 🔥 TITLE -->
    <div class="error-title">
        <?= $heading; ?>
    </div>

    <!-- 🔥 MESSAGE -->
    <div class="error-message">
        <?= strip_tags($message); ?>
    </div>

    <!-- 🔥 BUTTON -->
    <a href="<?= base_url('dashboard'); ?>" class="btn-dashboard">
        Kembali ke Dashboard
    </a>

</div>

</body>
</html>