<!-- Awal file tetap sama untuk session -->
<?php
session_start();
if (!isset($_SESSION['id_pelanggan'])) {
    header("Location: login.php");
    exit();
}
$username = $_SESSION['username'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Home Laundry</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: #e3f2fd;
    }
    .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.1);
    }
    .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: #00796b;
    }
    .content-wrapper {
        text-align: center;
        margin-bottom: 20px;
    }
    .navbar {
        border-top: 1px solid #ccc;
    }
    .navbar-brand i {
        font-size: 1.3rem;
        color: #00796b;
    }
  </style>
</head>
<body>

<!-- Header -->
<div class="content-wrapper">
    <h2 class="h5">Selamat datang di Aplikasi Laundry, <?php echo $username; ?>!</h2>
    <p>Pilih layanan di bawah untuk mulai menggunakan.</p>
</div>

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

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

        <!-- Menu Status Cucian -->
        <div class="col-6 col-md-4 mb-3">
            <a href="laundri1.php" class="text-decoration-none">
                <div class="card shadow-sm">
                    <div class="card-body">
                        <img src="img/checklist.png" alt="Status" class="card-icon">
                        <div class="text-title">Daftar laundri</div>
                    </div>
                </div>
            </a>
        </div>

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

        <!-- Menu Riwayat -->
        <div class="col-6 col-md-4 mb-3">
            <a href="riwayat.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</div>
                    </div>
                </div>
            </a>
        </div>

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

        <!-- Menu 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="index.php" class="navbar-brand"><i class="fas fa-home"></i></a>
        <a href="status.php" class="navbar-brand"><i class="fas fa-tshirt"></i></a>
        <a href="riwayat.php" class="navbar-brand"><i class="fas fa-history"></i></a>
        <a href="profil.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>
