<?php ob_start(); ?>

<h2><?= __('installer.admin_title') ?></h2>
<p><?= __('installer.admin_text') ?></p>

<?php if (!empty($error)): ?>
<div class="alert alert-error"><?= e($error) ?></div>
<?php endif; ?>

<form method="POST" action="/installer/step/5">
    <?= $csrf->field() ?>
    <div class="form-group">
        <label for="admin_username"><?= __('installer.admin_username') ?></label>
        <input type="text" id="admin_username" name="admin_username" required>
    </div>
    <div class="form-group">
        <label for="admin_email"><?= __('installer.admin_email') ?></label>
        <input type="email" id="admin_email" name="admin_email" required>
    </div>
    <div class="form-group">
        <label for="admin_password"><?= __('installer.admin_password') ?></label>
        <input type="password" id="admin_password" name="admin_password" required minlength="8">
        <small><?= __('installer.admin_password_hint') ?></small>
    </div>
    <div class="form-group">
        <label for="admin_password_confirm"><?= __('installer.admin_password_confirm') ?></label>
        <input type="password" id="admin_password_confirm" name="admin_password_confirm" required>
    </div>

    <div class="step-actions">
        <a href="/installer/step/4" class="btn btn-secondary"><?= __('installer.admin_back') ?></a>
        <button type="submit" class="btn btn-primary"><?= __('installer.admin_create') ?></button>
    </div>
</form>

<?php $content = ob_get_clean(); include __DIR__ . '/layout.php'; ?>
