<!DOCTYPE html>
<html lang="id">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Daftar Akun - <%= brand.name %></title>
  <link rel="stylesheet" href="/style.css" />
</head>
<body>
  <%- include('../partials/nav') %>

  <main class="container container-narrow">
    <h1>Daftar Akun</h1>
    <% if (error) { %><p class="alert alert-error"><%= error %></p><% } %>

    <form method="POST" action="/register" class="card">
      <div class="form-group">
        <label for="name">Nama</label>
        <input type="text" id="name" name="name" value="<%= values.name || '' %>" required />
      </div>
      <div class="form-group">
        <label for="email">Email</label>
        <input type="email" id="email" name="email" value="<%= values.email || '' %>" required />
      </div>
      <div class="form-group">
        <label for="phone">No. HP (opsional)</label>
        <input type="text" id="phone" name="phone" value="<%= values.phone || '' %>" placeholder="08xxxxxxxxxx" />
      </div>
      <div class="form-group">
        <label for="password">Password (minimal 8 karakter)</label>
        <input type="password" id="password" name="password" minlength="8" required />
      </div>
      <button type="submit" class="btn btn-primary">Daftar</button>
    </form>

    <p>Sudah punya akun? <a href="/login">Login di sini</a></p>
  </main>

  <%- include('../partials/foot') %>
</body>
</html>
