<?php
session_start();

if ($_SESSION['username'] !== "admin@admin.com") {
    header("Location: login.php");
    exit;
}
?>
<!DOCTYPE html>
<html lang="id">
<head>
  <meta charset="UTF-8">
  <title>Dashboard Admin</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
  <style>
    body {
      background: linear-gradient(135deg, #f5f7fa, #e4e9f7);
      font-family: 'Verdana', sans-serif;
    }
    .menu-link {
      text-decoration: none;
      color: #0d6efd;
      font-size: 16px;
    }
    .menu-link:hover {
      color: #084298;
      text-decoration: underline;
    }
    .card {
      border-radius: 1rem;
    }
  </style>
</head>
<body>

<div class="container mt-5">
  <div class="card shadow-lg border-0">
    <div class="card-body text-center p-5">
      <h2 class="mb-4 text-primary">Administrator Dashboard</h2>
      <p class="text-muted">Selamat datang di panel kontrol toko online Anda</p>
      <a href="logout.php" class="btn btn-danger mt-3">Logout</a>
    </div>
  </div>

  <div class="card mt-4 shadow-sm border-0">
    <div class="card-body">
      <h5 class="mb-3 text-center text-success">🔧 Menu Pengaturan</h5>
      <div class="row text-center">
        <div class="col-md-6 col-lg-4 mb-3"><a href="setup.php" class="menu-link">🛒 Setup Toko</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="setup_rekening.php" class="menu-link">🏦 Setup Rekening Transaksi</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="setup_email.php" class="menu-link">📧 Setup Email Perusahaan</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="ubah_sandi_admin.php" class="menu-link">🔑 Ubah Sandi Admin</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="ongkos_kirim.php" class="menu-link">🚚 Tarif Ongkos Kirim</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="log_admin.php" class="menu-link">🧾 Log Admin</a></div>
      </div>

      <hr>

      <h5 class="mb-3 text-center text-success">📦 Data Barang</h5>
      <div class="row text-center">
        <div class="col-md-6 col-lg-4 mb-3"><a href="isi_brg.php" class="menu-link">➕ Tambah Barang Baru</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="update_brg.php" class="menu-link">✏️ Edit Data Barang</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="hapus_brg.php" class="menu-link">🗑️ Hapus Data Barang</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="recycle_bin.php" class="menu-link">♻️ Recycle Bin Barang</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="lihat_brg.php" class="menu-link">👀 Lihat Semua Barang</a></div>
      </div>

      <hr>

      <h5 class="mb-3 text-center text-success">👥 Data Pelanggan</h5>
      <div class="row text-center">
        <div class="col-md-6 col-lg-4 mb-3"><a href="hapus_plg.php" class="menu-link">🗑️ Hapus Pelanggan</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="recycle_bin_pelanggan.php" class="menu-link">♻️ Recycle Bin Pelanggan</a></div>
        <div class="col-md-6 col-lg-4 mb-3"><a href="lihat_plg.php" class="menu-link">👀 Lihat Semua Pelanggan</a></div>
      </div>

      <hr>

      <h5 class="mb-3 text-center text-success">💰 Data Transaksi</h5>
      <div class="row text-center">
        <div class="col-md-6 col-lg-6 mb-3"><a href="lihat_trans.php" class="menu-link">📋 Lihat Semua Transaksi</a></div>
        <div class="col-md-6 col-lg-6 mb-3">
          <a href="kosong_transaksi.php" class="menu-link text-danger fw-bold">⚠️ Kosongkan Semua Transaksi</a>
        </div>
      </div>
    </div>
  </div>
</div>

</body>
</html>
