<?php $pageTitle = 'Add Teacher'; ?>
<div class="mb-3"><a href="<?= base_url('admin/teachers') ?>" class="text-secondary"><i class="fas fa-arrow-left me-1"></i> Back to Teachers</a></div>
<div class="card-cix">
    <div class="card-cix-header"><h5 class="mb-0"><i class="fas fa-user-plus text-orange me-2"></i> New Teacher</h5></div>
    <?php if (!empty($error)): ?><div class="alert-cix alert-cix-error"><i class="fas fa-exclamation-circle"></i> <?= $error ?></div><?php endif; ?>
    <form method="POST" action="<?= base_url('admin/teacher-create') ?>">
        <?= csrf_field() ?>
        <div class="row g-3">
            <div class="col-md-6"><div class="form-group-cix"><label class="form-label-cix">First Name *</label><input type="text" name="first_name" class="form-control-cix" required></div></div>
            <div class="col-md-6"><div class="form-group-cix"><label class="form-label-cix">Last Name *</label><input type="text" name="last_name" class="form-control-cix" required></div></div>
            <div class="col-md-6"><div class="form-group-cix"><label class="form-label-cix">Email *</label><input type="email" name="email" class="form-control-cix" required></div></div>
            <div class="col-md-6"><div class="form-group-cix"><label class="form-label-cix">Phone</label><input type="text" name="phone" class="form-control-cix"></div></div>
            <div class="col-md-6"><div class="form-group-cix"><label class="form-label-cix">Password *</label><input type="password" name="password" class="form-control-cix" required></div></div>
            <div class="col-md-6"><div class="form-group-cix"><label class="form-label-cix">Specialization</label><input type="text" name="specialization" class="form-control-cix"></div></div>
            <div class="col-md-6"><div class="form-group-cix"><label class="form-label-cix">Qualifications</label><input type="text" name="qualifications" class="form-control-cix"></div></div>
            <div class="col-md-6"><div class="form-group-cix"><label class="form-label-cix">Experience (years)</label><input type="number" name="experience_years" class="form-control-cix" value="0"></div></div>
        </div>
        <button type="submit" class="btn-cix btn-cix-accent mt-3"><i class="fas fa-save"></i> Create Teacher</button>
    </form>
</div>
