<?php include('includes/header.php');?>

<div class="container py-4">

  <h4 class="text-gradient mb-3">My Cards</h4>

  <?php if ($userData['card_number']): ?>
    <!-- Show Card -->
    <div class="card p-4 text-center">
      <i class="bi bi-credit-card-2-front display-3 text-warning"></i>
      <h5 class="mt-3"><?= $firstname ?> <?= $lastname ?></h5>
      <p class="fs-4 mt-2"><b><?= $card_number ?></b></p>
      <p class="text-muted small">This is your active debit card.</p>
    </div>

  <?php else: ?>
    <!-- Request Card Button -->
    <div class="card p-4 text-center">
      <i class="bi bi-credit-card display-4 text-secondary"></i>
      <h5>No Card Assigned</h5>
      <p class="text-muted small">Tap below to request a new debit card.</p>
      <a href="card_request" class="btn btn-info mt-2">Request Card</a>
    </div>
  <?php endif; ?>

</div>

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