<?php
include 'includes/auth.php';
include 'db.php';
$dashboard_title = 'Inventory Dashboard';
$dashboard_icon  = 'fa-boxes';
$module_cards = [
 

  ['link'=>'inventory_data.php', 'icon'=>'fa-exchange-alt', 'title'=>'Inventory', 'color'=>'bg-primary'],


    ['link'=>'inventory_reports.php', 'icon'=>'fa-chart-bar', 'title'=>'Inventory Reports', 'color'=>'bg-dark'],
    
         ['link'=>'bar_inventory.php',     'icon'=>'fa-chart-line',   'title'=>'Bar Inventory',    'color'=>'bg-danger'],
    
       ['link'=>'bar_requisitions.php',     'icon'=>'fa-chart-line',   'title'=>'Bar Inventory Replenshiment',    'color'=>'bg-danger'],
     ['link'=>'sales_pos.php',       'icon'=>'fa-cash-register', 'title'=>'POS',        'color'=>'bg-info'],
    ['link'=>'open_bar_tab.php',    'icon'=>'fa-folder-plus',   'title'=>'Open Tab',   'color'=>'bg-primary'],
    ['link'=>'bar_tab_pos.php',     'icon'=>'fa-receipt',      'title'=>'Tabs',       'color'=>'bg-warning'],
    ['link'=>'bar_sale_list.php',   'icon'=>'fa-glass-cheers', 'title'=>'Bar Sales',  'color'=>'bg-success'],
        ['link'=>'bar_reports.php',     'icon'=>'fa-chart-line',   'title'=>'Bar Sales Reports',    'color'=>'bg-danger'],
          ['link'=>'guest_account_management.php', 'icon'=>'fa-shopping-basket', 'title'=>'Guest  Account Management', 'color'=>'bg-primary'], // General orders


      ['link'=>'inventory_requisitions.php',   'icon'=>'fa-glass-cheers', 'title'=>'Inventory Requisitions',  'color'=>'bg-success'],
      
      
       
 
];
// 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">
     <div class="welcome-msg">
        <i class="fa fa-user-circle"></i> Welcome, <strong><?= htmlspecialchars($_SESSION['username'] ?? 'Guest') ?></strong>!
    </div>
<button class="btn btn-secondary" onclick="history.back()"><i class="fa fa-arrow-left"></i> Back</button>
    

    <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'; ?>

