<?php use App\Helpers\Helper; ?>
<div class="auth-title">Create Account</div>
<div class="auth-subtitle">Join Zabibu Residence today — it's free</div>

<form method="POST" action="<?= APP_URL ?>/register">
  <?= Helper::csrf() ?>
  <div class="row g-3">
    <div class="col-6">
      <label class="form-label">First Name</label>
      <input type="text" name="first_name" class="form-control" placeholder="John" required value="<?= Helper::e($_POST['first_name'] ?? '') ?>">
    </div>
    <div class="col-6">
      <label class="form-label">Last Name</label>
      <input type="text" name="last_name" class="form-control" placeholder="Doe" required value="<?= Helper::e($_POST['last_name'] ?? '') ?>">
    </div>
    <div class="col-12">
      <label class="form-label">Email Address</label>
      <input type="email" name="email" class="form-control" placeholder="you@example.com" required value="<?= Helper::e($_POST['email'] ?? '') ?>">
    </div>
    <div class="col-12">
      <label class="form-label">Phone Number</label>
      <input type="tel" name="phone" class="form-control" placeholder="+255 7XX XXX XXX" value="<?= Helper::e($_POST['phone'] ?? '') ?>">
    </div>
    <div class="col-12">
      <label class="form-label">Password</label>
      <input type="password" name="password" class="form-control" placeholder="Minimum 8 characters" required minlength="8">
    </div>
    <div class="col-12">
      <label class="form-label">Confirm Password</label>
      <input type="password" name="confirm_password" class="form-control" placeholder="Repeat password" required>
    </div>
    <div class="col-12">
      <div class="form-check">
        <input class="form-check-input" type="checkbox" id="terms" required>
        <label class="form-check-label small" for="terms">I agree to the <a href="#" class="text-primary">Terms of Service</a> and <a href="#" class="text-primary">Privacy Policy</a></label>
      </div>
    </div>
    <div class="col-12">
      <button type="submit" class="btn btn-primary w-100 py-3 fw-600">
        <i class="bi bi-person-plus me-2"></i>Create Account
      </button>
    </div>
  </div>
  <p class="text-center text-muted small mt-3 mb-0">
    Already have an account? <a href="<?= APP_URL ?>/login" class="text-primary fw-600 text-decoration-none">Sign in</a>
  </p>
</form>
