<%- include('../shared/_head', { title: title, portalCss: '/platform/merchant/css/portal.css', bodyClass: 'merchant-portal auth-page' }) %>

<div class="auth-shell">
  <div class="auth-card">
    <div class="auth-brand">
      <span class="brand-name">BeezifiPay</span>
      <div class="portal-badge portal-badge--merchant">Merchant</div>
    </div>

    <h1 class="auth-title">Set up your organization</h1>
    <p class="auth-subtitle">Create your business entity to start accepting payments.</p>

    <%- include('../shared/_errors', { errors }) %>

    <form method="POST" action="/merchant/organization/create" class="auth-form">
      <input type="hidden" name="_csrf" value="<%= csrfToken %>">

      <div class="field">
        <label for="name">Organization name <span class="required">*</span></label>
        <input type="text" id="name" name="name" autocomplete="organization"
               value="<%= typeof values.name !== 'undefined' ? values.name : '' %>"
               placeholder="Acme Coffee Co." required>
      </div>

      <div class="field">
        <label for="taxId">Tax ID / EIN <span class="field-hint">(optional)</span></label>
        <input type="text" id="taxId" name="taxId"
               value="<%= typeof values.taxId !== 'undefined' ? values.taxId : '' %>"
               placeholder="12-3456789">
      </div>

      <div class="field">
        <label for="website">Website <span class="field-hint">(optional)</span></label>
        <input type="url" id="website" name="website"
               value="<%= typeof values.website !== 'undefined' ? values.website : '' %>"
               placeholder="https://example.com">
      </div>

      <button type="submit" class="btn btn-primary btn--full">Create organization</button>
    </form>

    <p class="auth-footer">
      <a href="/merchant/dashboard">← Back to dashboard</a>
    </p>
  </div>
</div>

<%- include('../shared/_foot') %>
