<?php require __DIR__ . '/_bootstrap.php'; include __DIR__ . '/_header.php'; ?>
<div class="page-header"><h1>Add Admin</h1></div>

<div class="card">
  <form action="<?php echo url_for('/admin/admin_add_post.php'); ?>" method="post" class="form-grid">
    <div class="field">
      <label>Full Name</label>
      <input type="text" name="full_name" required>
    </div>
    <div class="field">
      <label>Email</label>
      <input type="email" name="email" required>
    </div>
    
<div class="field row-span">
  <label>Password</label>
  <div class="pw-wrap">
    <input type="password" name="password" id="password_add" required autocomplete="new-password">
    <button type="button" class="pw-eye" aria-label="Show password" data-target="password_add">
      <!-- eye -->
      <svg class="icon-eye" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
        <path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12Z"/>
        <circle cx="12" cy="12" r="3"/>
      </svg>
      <!-- eye-off -->
      <svg class="icon-eye-off" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
        <path d="M17.94 17.94A10.94 10.94 0 0 1 12 19c-7 0-11-7-11-7a21.91 21.91 0 0 1 5.06-5.94M9.9 4.24A10.94 10.94 0 0 1 12 4c7 0 11 7 11 7a21.83 21.83 0 0 1-3.17 4.33"/>
        <line x1="1" y1="1" x2="23" y2="23"/>
      </svg>
    </button>
  </div>
</div>

    
    <div class="actions-bar">
      <a class="btn" href="<?php echo url_for('/admin/admins.php'); ?>">Cancel</a>
      <button class="btn btn-primary" type="submit">Save</button>
    </div>
  </form>
</div>
<?php include __DIR__ . '/_footer.php'; ?>
