<?php
include 'includes/auth.php';
include 'db.php';
$dashboard_title = 'Housekeeping Dashboard';
$dashboard_icon  = 'fa-broom'; // Font Awesome broom icon

// Modules for housekeeping
$module_cards = [
    ['link'=>'rooms_status.php', 'icon'=>'fa-bed', 'title'=>'Room Status', 'color'=>'bg-primary'],
    ['link'=>'cleaning_schedule.php', 'icon'=>'fa-calendar-alt', 'title'=>'Cleaning Schedule', 'color'=>'bg-success'],

       ['link'=>'house_keeping_inventory.php', 'icon'=>'fa-tools', 'title'=>'Inventory Requisitions', 'color'=>'bg-warning'],
      ['link'=>'hk_requisition_request.php', 'icon'=>'fa-tools', 'title'=>'Requisitions Reports', 'color'=>'bg-warning'],
    ['link'=>'maintenance_requests.php', 'icon'=>'fa-tools', 'title'=>'Maintenance Requests', 'color'=>'bg-warning'],
    ['link'=>'housekeeping_reports.php', 'icon'=>'fa-chart-line', 'title'=>'Reports', 'color'=>'bg-dark'],
];

// Include header
include 'includes/header.php';
?>


<style>
/* ================= STYLING CARDS ================= */
.card-module {
    width: 140px;
    text-align: center;
    display: inline-block;
    border-radius: 10px;
    transition: 0.2s;
    cursor: pointer;
}

.card-module:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.card-module a {
    text-decoration: none;
    color: inherit;
}

.icon-box {
    font-size: 28px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 10px auto;
    color: #fff;
}

.welcome-msg {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #1b4d32;
}

.flex-center {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}
</style>

<div class="container-fluid mt-4">

    <!-- ================= WELCOME MESSAGE ================= -->
    <div class="welcome-msg">
        <i class="fa fa-user-circle"></i> Welcome, <strong><?= htmlspecialchars($_SESSION['username'] ?? 'Guest') ?></strong>!
    </div>

    <h3 class="mb-3">
        <i class="fa <?= $dashboard_icon ?> text-success"></i> <?= $dashboard_title ?>
    </h3>
    <hr>

    <!-- ================= MODULE CARDS ================= -->
    <div class="flex-center">
        <?php foreach($module_cards as $card): ?>
            <div class="card card-module shadow-sm">
                <a href="<?= $card['link'] ?>">
                    <div class="card-body p-2">
                        <div class="icon-box <?= $card['color'] ?>">
                            <i class="fa <?= $card['icon'] ?>"></i>
                        </div>
                        <h6><?= $card['title'] ?></h6>
                    </div>
                </a>
            </div>
        <?php endforeach; ?>
    </div>
<div class="tips-box" align="center">
  <h4>💡Tips</h4>
  <ul>
    <li>✅ <strong>Confirm First:</strong> Click Invoice to Receive Payment  using the button below the invoice.</li>

  </ul>
</div>
</div>

<?php include 'includes/footer.php'; ?>

