<?php
session_start();
if (!isset($_SESSION['id_kurir'])) {
    header("Location: login_kurir.php");
    exit();
}
$username = $_SESSION['username'];
?>
<!DOCTYPE html>
<html lang="id">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Dashboard Kurir</title>
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
  <style>
    body {
        background-color: #f1f8e9;
    }
    .card {
        border: none;
        border-radius: 1rem;
        text-align: center;
        transition: 0.3s;
    }
    .card:hover {
        transform: scale(1.03);
        box-shadow: 0 0 15px rgba(0,0,0,0.15);
    }
    .card-body {
        background-color: #ffffff;
        border-radius: 1rem;
        padding: 20px;
    }
    .card-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }
    .text-title {
        font-size: 0.9rem;
        font-weight: 600;
        color: #33691e;
    }
    .navbar {
        border-top: 1px solid #ccc;
    }
    .navbar-brand i {
        font-size: 1.3rem;
        color: #33691e;
    }
    .content-wrapper {
        text-align: center;
        margin-bottom: 20px;
    }
  </style>
</head>
<body>

<!-- Header -->
<div class="content-wrapper">
    <h5>Selamat datang Kurir, <?php echo $username; ?>!</h5>
    <p>Pilih menu di bawah untuk mengelola layanan Anda.</p>
</div>

<div class="container-fluid p-3">
    <div class="row justify-content-center">

        <!-- Ambil Order -->
        <div class="col-6 col-md-4 mb-3">
            <a href="order_kurir.php" class="text-decoration-none">
                <div class="card shadow-sm">
                    <div class="card-body">
                        <img src="img/laundri3.png" alt="Ambil Order" class="card-icon">
                        <div class="text-title">Ambil Order</div>
                    </div>
                </div>
            </a>
        </div>

        <!-- Antar Cucian -->
        <div class="col-6 col-md-4 mb-3">
            <a href="antar_cucian.php" class="text-decoration-none">
                <div class="card shadow-sm">
                    <div class="card-body">
                        <img src="img/laundri4.png" alt="Antar Cucian" class="card-icon">
                        <div class="text-title">Antar Cucian</div>
                    </div>
                </div>
            </a>
        </div>

        <!-- Daftar Pelanggan -->
        <div class="col-6 col-md-4 mb-3">
            <a href="daftar_pelanggan.php" class="text-decoration-none">
                <div class="card shadow-sm">
                    <div class="card-body">
                        <img src="img/pasien.png" alt="Pelanggan" class="card-icon">
                        <div class="text-title">Daftar Pelanggan</div>
                    </div>
                </div>
            </a>
        </div>

        <!-- Riwayat Pengantaran -->
        <div class="col-6 col-md-4 mb-3">
            <a href="riwayat_pengiriman.php" class="text-decoration-none">
                <div class="card shadow-sm">
                    <div class="card-body">
                        <img src="img/history-book.png" alt="Riwayat" class="card-icon">
                        <div class="text-title">Riwayat Kirim</div>
                    </div>
                </div>
            </a>
        </div>

        <!-- Profil Kurir -->
        <div class="col-6 col-md-4 mb-3">
            <a href="profil_kurir.php" class="text-decoration-none">
                <div class="card shadow-sm">
                    <div class="card-body">
                        <img src="img/profil.png" alt="Profil" class="card-icon">
                        <div class="text-title">Profil Saya</div>
                    </div>
                </div>
            </a>
        </div>

        <!-- Logout -->
        <div class="col-6 col-md-4 mb-3">
            <a href="logout.php" class="text-decoration-none">
                <div class="card shadow-sm">
                    <div class="card-body">
                        <img src="img/logout.png" alt="Logout" class="card-icon">
                        <div class="text-title">Logout</div>
                    </div>
                </div>
            </a>
        </div>

    </div>
</div>

<!-- Navbar Bawah -->
<nav class="navbar fixed-bottom navbar-light bg-light">
    <div class="container-fluid justify-content-around">
        <a href="halaman_menu2_kurir.php" class="navbar-brand"><i class="fas fa-home"></i></a>
        <a href="ambil_order.php" class="navbar-brand"><i class="fas fa-box"></i></a>
        <a href="riwayat_pengiriman.php" class="navbar-brand"><i class="fas fa-history"></i></a>
        <a href="profil_kurir.php" class="navbar-brand"><i class="fas fa-user-cog"></i></a>
    </div>
</nav>

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