<?php
session_start();
if(!isset($_SESSION['admin'])){
    header("Location: login.php");
    exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Admin Dashboard</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css" rel="stylesheet">

<style>
body{
    background: linear-gradient(135deg,#141e30,#243b55);
    min-height:100vh;
    /*padding:40px;*/
}
.dashboard-card{
    border-radius:20px;
    transition:0.3s;
}
.dashboard-card:hover{
    transform: translateY(-5px);
    box-shadow:0 10px 25px rgba(0,0,0,0.3);
}
.card-icon{
    font-size:40px;
}
.header-box{
    background:white;
    border-radius:20px;
    padding:30px;
    margin-bottom:30px;
}
</style>
</head>
<body>
<?php include "navbar.php"; ?> <br>
<div class="container-fluid">


<div class="header-box text-center shadow">
    <h2 class="fw-bold">🔐 Admin Dashboard</h2>
    <p class="text-muted">Manage capture links, monitor uploads & control system</p>
</div>

<div class="row g-4">

    <div class="col-md-4">
        <a href="generate_link.php" class="text-decoration-none">
            <div class="card dashboard-card shadow p-4 text-center">
                <div class="card-icon text-success mb-3">
                    <i class="bi bi-link-45deg"></i>
                </div>
                <h5 class="fw-bold">Generate Link</h5>
                <p class="text-muted">Create secure capture links</p>
            </div>
        </a>
    </div>

    <div class="col-md-4">
        <a href="manage_links.php" class="text-decoration-none">
            <div class="card dashboard-card shadow p-4 text-center">
                <div class="card-icon text-primary mb-3">
                    <i class="bi bi-list-check"></i>
                </div>
                <h5 class="fw-bold">Manage Links</h5>
                <p class="text-muted">View & deactivate active links</p>
            </div>
        </a>
    </div>

    <div class="col-md-4">
        <a href="photos.php" class="text-decoration-none">
            <div class="card dashboard-card shadow p-4 text-center">
                <div class="card-icon text-warning mb-3">
                    <i class="bi bi-images"></i>
                </div>
                <h5 class="fw-bold">Uploaded Photos</h5>
                <p class="text-muted">Browse captured images</p>
            </div>
        </a>
    </div>

    <div class="col-md-4 offset-md-4">
        <a href="logout.php" class="text-decoration-none">
            <div class="card dashboard-card shadow p-4 text-center bg-danger text-white">
                <div class="card-icon mb-3">
                    <i class="bi bi-box-arrow-right"></i>
                </div>
                <h5 class="fw-bold">Logout</h5>
                <p>Securely sign out</p>
            </div>
        </a>
    </div>

</div>

</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>

</body>
</html>