<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>

<div class="container">
    <div class="card auth-card shadow-sm">
        <div class="card-body p-4">
            <h4 class="mb-1 text-center">Create your Agency account</h4>
            <p class="text-muted text-center mb-4">Starts free — upgrade anytime.</p>

            <form method="post" action="<?= base_url('register/agency') ?>">
                <?= csrf_field() ?>
                <h6 class="text-muted">Your details</h6>
                <div class="mb-3">
                    <label class="form-label">Your Full Name</label>
                    <input type="text" name="owner_name" class="form-control" value="<?= old('owner_name') ?>" required>
                </div>
                <div class="mb-3">
                    <label class="form-label">Email</label>
                    <input type="email" name="email" class="form-control" value="<?= old('email') ?>" required>
                </div>
                <div class="mb-3">
                    <label class="form-label">Mobile Number</label>
                    <input type="text" name="phone" class="form-control" value="<?= old('phone') ?>" placeholder="e.g. 03001234567" required>
                    <div class="form-text">You'll receive a verification code via SMS.</div>
                </div>
                <div class="mb-3">
                    <label class="form-label">Password</label>
                    <input type="password" name="password" class="form-control" minlength="8" required>
                </div>

                <hr class="my-4">
                <h6 class="text-muted">Company details</h6>
                <div class="mb-3">
                    <label class="form-label">Company Name</label>
                    <input type="text" name="company_name" class="form-control" value="<?= old('company_name') ?>" required>
                </div>
                <div class="mb-3">
                    <label class="form-label">Company Email (optional — defaults to your email)</label>
                    <input type="email" name="company_email" class="form-control" value="<?= old('company_email') ?>">
                </div>
                <div class="mb-3">
                    <label class="form-label">Industry</label>
                    <input type="text" name="industry" class="form-control" value="<?= old('industry') ?>">
                </div>

                <button type="submit" class="btn btn-primary w-100 mt-2">Create Agency Account</button>
            </form>

            <p class="text-center mt-3 mb-0">Already have an account? <a href="<?= base_url('login') ?>">Log in</a></p>
        </div>
    </div>
</div>

<?= $this->endSection() ?>
