<div class="py-8">
    <div class="max-w-4xl mx-auto sm:px-6 lg:px-8">
        
        <div class="bg-white rounded-xl shadow-sm border border-gray-200">
            <div class="p-6 md:p-8">

                
                <div class="mb-8 border-b border-gray-200 pb-5 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
                    <div>
                        <h2 class="text-2xl font-bold text-gray-900" style="font-family:'Playfair Display',serif;"><?php echo e($isEdit ? 'Edit Enrollment Application' : 'Basic Education Enrollment Form'); ?></h2>
                        <p class="text-sm text-gray-500 mt-1">Please fill out the information carefully. All fields marked with <span class="text-red-500 font-bold" style="color: #ef4444;">*</span> are required.</p>
                    </div>
                    <div class="flex items-center gap-3 self-start sm:self-auto">
                        <span class="text-xs font-bold px-3 py-1 bg-blue-50 text-blue-900 border border-blue-200 rounded-full shadow-sm">
                            Step <?php echo e($step); ?> of <?php echo e($totalSteps); ?>

                        </span>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!$isEdit && session()->has('enrollment_draft_user_' . auth()->id())): ?>
                            <button type="button" wire:click="resetDraft" wire:confirm="Are you sure you want to clear your saved draft and start over from Step 1?" class="text-xs text-red-500 hover:text-red-700 underline font-medium">
                                Clear draft & restart
                            </button>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </div>
                </div>

                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($errors->any()): ?>
                    <div class="mb-6 bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded-xl text-sm">
                        <p class="font-bold mb-1">Please correct the following errors:</p>
                        <ul class="list-disc list-inside space-y-1">
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                <li><?php echo e($error); ?></li>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                        </ul>
                    </div>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                <form wire:submit.prevent="submit" class="space-y-6">

                    
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($step === 1): ?>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">STEP 1 &mdash; Enrollment Information</h3>
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-5">
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-1">School Year <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                <select wire:model="academic_year" class="w-full border-gray-300 rounded-lg shadow-sm focus:border-gray-500 focus:ring-gray-300">
                                    <option value="2026-2027">2026–2027</option>
                                </select>
                            </div>
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-1">Grade Level to Enroll <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                <select wire:model="grade_level_to_enroll" class="w-full border-gray-300 rounded-lg shadow-sm focus:border-gray-500 focus:ring-gray-300 <?php $__errorArgs = ['grade_level_to_enroll'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> border-red-500 <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                    <option value="">Select Grade Level</option>
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php for($i=7; $i<=12; $i++): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                        <option value="<?php echo e($i); ?>">Grade <?php echo e($i); ?></option>
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endfor; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                                </select>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['grade_level_to_enroll'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-2">With LRN? <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                <div class="flex gap-4">
                                    <label class="inline-flex items-center"><input type="radio" name="with_lrn" wire:model.live="with_lrn" value="Yes" class="text-blue-600"> <span class="ml-2">Yes</span></label>
                                    <label class="inline-flex items-center"><input type="radio" name="with_lrn" wire:model.live="with_lrn" value="No" class="text-blue-600"> <span class="ml-2">No</span></label>
                                </div>
                            </div>
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-2">Returning Learner (Balik-Aral)? <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                <div class="flex gap-4">
                                    <label class="inline-flex items-center"><input type="radio" name="returning_learner" wire:model.live="returning_learner" value="Yes" class="text-blue-600"> <span class="ml-2">Yes</span></label>
                                    <label class="inline-flex items-center"><input type="radio" name="returning_learner" wire:model.live="returning_learner" value="No" class="text-blue-600"> <span class="ml-2">No</span></label>
                                </div>
                            </div>
                        </div>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">For Learners in Senior High School</h3>
                        <div class="grid grid-cols-1 md:grid-cols-3 gap-5">
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-2">Semester</label>
                                <div class="flex gap-4 mt-2">
                                    <label class="inline-flex items-center"><input type="radio" name="semester" wire:model.live="semester" value="1st" class="text-blue-600"> <span class="ml-2">1st</span></label>
                                    <label class="inline-flex items-center"><input type="radio" name="semester" wire:model.live="semester" value="2nd" class="text-blue-600"> <span class="ml-2">2nd</span></label>
                                </div>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['semester'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                            <div x-data="{ track: <?php if ((object) ('track') instanceof \Livewire\WireDirective) : ?>window.Livewire.find('<?php echo e($__livewire->getId()); ?>').entangle('<?php echo e('track'->value()); ?>')<?php echo e('track'->hasModifier('live') ? '.live' : ''); ?><?php else : ?>window.Livewire.find('<?php echo e($__livewire->getId()); ?>').entangle('<?php echo e('track'); ?>')<?php endif; ?> }">
                                <label class="block text-sm font-semibold text-gray-700 mb-1">Track</label>
                                <select wire:model.live="track" class="w-full border-gray-300 rounded-lg shadow-sm <?php $__errorArgs = ['track'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> border-red-500 <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                    <option value="">Select Track</option>
                                    <option value="Academic">Academic</option>
                                    <option value="TVL">Technical Vocational & Livelihood Program</option>
                                </select>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['track'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-1">Strand</label>
                                <select wire:model="strand" class="w-full border-gray-300 rounded-lg shadow-sm <?php $__errorArgs = ['strand'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> border-red-500 <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                    <option value="">Select Strand</option>
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($track === 'Academic'): ?>
                                        <option value="HUMSS">HUMSS</option>
                                        <option value="STEM">STEM</option>
                                        <option value="ABM">ABM</option>
                                    <?php elseif($track === 'TVL'): ?>
                                        <option value="Bread and Pastry">Bread and Pastry</option>
                                        <option value="Computer System Servicing NC II">Computer System Servicing NC II</option>
                                        <option value="Electrical Installation and Maintenance NCII">ELECTRICAL INSTALLATION AND MAINTENANCE NCII</option>
                                        <option value="Electronics Products Assembly Services">Electronics Products Assembly Services</option>
                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </select>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['strand'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                        </div>
                    
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">For Returning Learner (Balik-Aral) and Those Who Will Transfer/Move In</h3>
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-5">
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-1">Last Grade Level Completed</label>
                                <select wire:model="last_grade_level_completed" class="w-full border-gray-300 rounded-lg shadow-sm">
                                    <option value="">Select Grade Level</option>
                                    <option value="Grade 7">Grade 7</option>
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php for($i=8; $i<=11; $i++): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                        <option value="<?php echo e($i); ?>">Grade <?php echo e($i); ?></option>
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endfor; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                                </select>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['last_grade_level_completed'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </div>
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-1">Last School Year Completed<span class="text-red-500 font-bold" style="color: #ef4444;">*</span>/label>
                                <input type="text" wire:model="last_school_year_completed" class="w-full border-gray-300 rounded-lg shadow-sm" placeholder="e.g. 2024-2025">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['last_school_year_completed'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-1">Last School Attended<span class="text-red-500 font-bold" style="color: #ef4444;">*</span>/label>
                                <input type="text" wire:model="school_last_attended" class="w-full border-gray-300 rounded-lg shadow-sm">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['school_last_attended'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-1">School ID<span class="text-red-500 font-bold" style="color: #ef4444;">*</span>/label>
                                <input type="text" wire:model="last_school_id" class="w-full border-gray-300 rounded-lg shadow-sm">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['last_school_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                        </div>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">Preferred Learning Modality</h3>
                        <div>
                            <label class="block text-sm text-gray-700 mb-3">If school will implement other distance learning modalities aside from face-to-face instruction, what would you prefer for your child? (Choose all that apply):</label>
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-3 pl-2">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = ['Modular (Print)', 'Modular (Digital)', 'Online', 'Educational Television', 'Radio-Based Instruction', 'Homeschooling', 'Blended']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $modality): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                    <label class="inline-flex items-center">
                                        <input type="checkbox" wire:model="preferred_learning_modality" value="<?php echo e($modality); ?>" class="rounded text-blue-600 border-gray-300 shadow-sm"> 
                                        <span class="ml-2 text-sm"><?php echo e($modality); ?></span>
                                    </label>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                            </div>
                        </div>
                    
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                    
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($step === 2): ?>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">STEP 2 &mdash; Learner Information</h3>
                        <div class="space-y-5">
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-5">
                                <div>
                                    <label class="block text-sm font-semibold text-gray-700 mb-1">PSA Birth Certificate No.</label>
                                    <input type="text" wire:model="psa_birth_cert_no" class="w-full border-gray-300 rounded-lg shadow-sm" placeholder="If available upon registration">
                                </div>
                                <div>
                                    <label class="block text-sm font-semibold text-gray-700 mb-1">Learner Reference No. (LRN) <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                    <input type="text" wire:model="lrn" class="w-full border-gray-300 rounded-lg shadow-sm <?php $__errorArgs = ['lrn'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> border-red-500 <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['lrn'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </div>
                            </div>
                            
                            <div>
                                <p class="block text-sm font-semibold text-gray-700 mb-2 border-b pb-1">Name of Learner</p>
                                <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
                                    <div>
                                        <label class="block text-xs text-gray-500 mb-1">Last Name <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                        <input type="text" wire:model="last_name" class="w-full border-gray-300 rounded-lg shadow-sm <?php $__errorArgs = ['last_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> border-red-500 <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['last_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                    </div>
                                    <div>
                                        <label class="block text-xs text-gray-500 mb-1">First Name <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                        <input type="text" wire:model="first_name" class="w-full border-gray-300 rounded-lg shadow-sm <?php $__errorArgs = ['first_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> border-red-500 <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['first_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                    </div>
                                    <div>
                                        <label class="block text-xs text-gray-500 mb-1">Middle Name</label>
                                        <input type="text" wire:model="middle_name" class="w-full border-gray-300 rounded-lg shadow-sm">
                                    </div>
                                    <div>
                                        <label class="block text-xs text-gray-500 mb-1">Extension Name</label>
                                        <input type="text" wire:model="extension_name" placeholder="e.g., Jr., III" class="w-full border-gray-300 rounded-lg shadow-sm">
                                    </div>
                                </div>
                            </div>

                            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-5"
                                 x-data="{
                                     calcAge(val) {
                                         if (!val) return '';
                                         const parts = val.split('-');
                                         if (parts.length !== 3) return '';
                                         const y = parseInt(parts[0], 10);
                                         const m = parseInt(parts[1], 10);
                                         const d = parseInt(parts[2], 10);
                                         if (isNaN(y) || isNaN(m) || isNaN(d)) return '';
                                         const now = new Date();
                                         let a = now.getFullYear() - y;
                                         if ((now.getMonth() + 1) < m || ((now.getMonth() + 1) === m && now.getDate() < d)) {
                                             a--;
                                         }
                                         return a >= 0 ? a : 0;
                                     },
                                     handleDateChange(e) {
                                         const age = this.calcAge(e.target.value);
                                         if (age !== '') {
                                             if ($refs.ageInput) $refs.ageInput.value = age;
                                             $wire.set('age', age);
                                         }
                                     }
                                 }"
                                 x-init="
                                     if ($refs.birthDateInput && $refs.birthDateInput.value) {
                                         handleDateChange({ target: $refs.birthDateInput });
                                     }
                                 ">
                                <div>
                                    <label class="block text-sm font-semibold text-gray-700 mb-1">Birthdate <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                    <input type="date" 
                                           x-ref="birthDateInput"
                                           wire:model.live="birth_date" 
                                           x-on:input="handleDateChange($event)"
                                           x-on:change="handleDateChange($event)"
                                           class="w-full border-gray-300 rounded-lg shadow-sm <?php $__errorArgs = ['birth_date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> border-red-500 <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['birth_date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </div>
                                <div>
                                    <label class="block text-sm font-semibold text-gray-700 mb-1">Age</label>
                                    <input type="text" 
                                           x-ref="ageInput"
                                           wire:model="age" 
                                           readonly 
                                           placeholder="Auto-calculated"
                                           class="w-full border-gray-300 bg-gray-100 rounded-lg shadow-sm font-semibold text-gray-800">
                                </div>
                                <div>
                                    <label class="block text-sm font-semibold text-gray-700 mb-1">Sex <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                    <div class="flex gap-4 mt-2">
                                        <label class="inline-flex items-center"><input type="radio" name="gender" wire:model.live="gender" value="Male" class="text-blue-600"> <span class="ml-2">Male</span></label>
                                        <label class="inline-flex items-center"><input type="radio" name="gender" wire:model.live="gender" value="Female" class="text-blue-600"> <span class="ml-2">Female</span></label>
                                    </div>
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['gender'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </div>
                                <div>
                                    <label class="block text-sm font-semibold text-gray-700 mb-1">Mother Tongue</label>
                                    <input type="text" wire:model="mother_tongue" class="w-full border-gray-300 rounded-lg shadow-sm" placeholder="e.g., Tagalog, Ilokano">
                                </div>
                            </div>
                            
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-1">Place of Birth (Municipality/City) <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                <input type="text" wire:model="place_of_birth" class="w-full border-gray-300 rounded-lg shadow-sm <?php $__errorArgs = ['place_of_birth'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> border-red-500 <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['place_of_birth'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                        </div>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">Current Address</h3>
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                            <div><label class="block text-sm font-semibold text-gray-700 mb-1">House No.<span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label><input type="text" wire:model="current _house_no" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                            <div><label class="block text-sm font-semibold text-gray-700 mb-1">Sitio/Street Name</label><input type="text" wire:model="current_street" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                            <div><label class="block text-sm font-semibold text-gray-700 mb-1">Barangay <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label><input type="text" wire:model="current_barangay" class="w-full border-gray-300 rounded-lg shadow-sm <?php $__errorArgs = ['current_barangay'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> border-red-500 <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['current_barangay'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?></div>
                            <div><label class="block text-sm font-semibold text-gray-700 mb-1">Municipality/City <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label><input type="text" wire:model="current_city" class="w-full border-gray-300 rounded-lg shadow-sm <?php $__errorArgs = ['current_city'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> border-red-500 <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['current_city'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?></div>
                            <div><label class="block text-sm font-semibold text-gray-700 mb-1">Province <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label><input type="text" wire:model="current_province" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                            <div><label class="block text-sm font-semibold text-gray-700 mb-1">Country <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label><input type="text" wire:model="current_country" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                            <div><label class="block text-sm font-semibold text-gray-700 mb-1">Zip Code</label><input type="text" wire:model="current_zip_code" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                        </div>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">Permanent Address</h3>
                        <div class="mb-5">
                            <label class="block text-sm font-semibold text-gray-700 mb-2">Same with your Current Address? <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                            <div class="flex gap-4">
                                <label class="inline-flex items-center"><input type="radio" name="permanent_same_as_current" wire:model.live="permanent_same_as_current" value="Yes" class="text-blue-600"> <span class="ml-2">Yes</span></label>
                                <label class="inline-flex items-center"><input type="radio" name="permanent_same_as_current" wire:model.live="permanent_same_as_current" value="No" class="text-blue-600"> <span class="ml-2">No</span></label>
                            </div>
                        </div>

                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($permanent_same_as_current === 'No'): ?>
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                                <div><label class="block text-sm font-semibold text-gray-700 mb-1">House No./Street</label><input type="text" wire:model="permanent_house_no" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                <div><label class="block text-sm font-semibold text-gray-700 mb-1">Street Name</label><input type="text" wire:model="permanent_street" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                <div><label class="block text-sm font-semibold text-gray-700 mb-1">Barangay</label><input type="text" wire:model="permanent_barangay" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                <div><label class="block text-sm font-semibold text-gray-700 mb-1">Municipality/City</label><input type="text" wire:model="permanent_city" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                <div><label class="block text-sm font-semibold text-gray-700 mb-1">Province</label><input type="text" wire:model="permanent_province" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                <div><label class="block text-sm font-semibold text-gray-700 mb-1">Country</label><input type="text" wire:model="permanent_country" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                <div><label class="block text-sm font-semibold text-gray-700 mb-1">Zip Code</label><input type="text" wire:model="permanent_zip_code" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                            </div>
                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                    
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($step === 3): ?>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">STEP 3 &mdash; Additional Learner Information</h3>
                         <div>
                            <label class="block text-sm font-semibold text-gray-700 mb-2">Is the child a Learner With Disability? <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                            <div class="flex gap-4 mb-4">
                                <label class="inline-flex items-center"><input type="radio" name="is_learner_with_disability" wire:model.live="is_learner_with_disability" value="Yes" class="text-blue-600"> <span class="ml-2">Yes</span></label>
                                <label class="inline-flex items-center"><input type="radio" name="is_learner_with_disability" wire:model.live="is_learner_with_disability" value="No" class="text-blue-600"> <span class="ml-2">No</span></label>
                            </div>
                            
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($is_learner_with_disability === 'Yes'): ?>
                                <label class="block text-sm text-gray-600 mb-2">If Yes, specify the type of disability:</label>
                                <div class="grid grid-cols-1 md:grid-cols-2 gap-3 pl-2">
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = ['Visual Impairment', 'Blind', 'Low Vision', 'Hearing Impairment', 'Autism Spectrum Disorder', 'Speech/Language Disorder', 'Learning Disability', 'Emotional-Behavioral Disorder', 'Intellectual Disability', 'Orthopedic/Physical Handicap', 'Cerebral Palsy', 'Special Health Problem/Chronic Disease', 'Cancer', 'Multiple Disorder']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                        <label class="inline-flex items-center">
                                            <input type="checkbox" wire:model="disability_type" value="<?php echo e($type); ?>" class="rounded text-blue-600 border-gray-300 shadow-sm"> 
                                            <span class="ml-2 text-sm"><?php echo e($type); ?></span>
                                        </label>
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                                </div>
                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        </div>
                        <div class="space-y-6">
                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-2">Does the learner belong to any Indigenous Peoples (IP) Community / Indigenous Cultural Community? <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                <div class="flex gap-4">
                                    <label class="inline-flex items-center"><input type="radio" name="is_ip_community" wire:model.live="is_ip_community" value="Yes" class="text-blue-600"> <span class="ml-2">Yes</span></label>
                                    <label class="inline-flex items-center"><input type="radio" name="is_ip_community" wire:model.live="is_ip_community" value="No" class="text-blue-600"> <span class="ml-2">No</span></label>
                                </div>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($is_ip_community === 'Yes'): ?>
                                    <div class="mt-3">
                                        <label class="block text-sm text-gray-600 mb-1">If Yes, please specify:</label>
                                        <input type="text" wire:model="ip_community_name" class="w-full md:w-1/2 border-gray-300 rounded-lg shadow-sm">
                                    </div>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>

                            <div>
                                <label class="block text-sm font-semibold text-gray-700 mb-2">Is your family a beneficiary of 4Ps? <span class="text-red-500 font-bold" style="color: #ef4444;">*</span></label>
                                <div class="flex gap-4">
                                    <label class="inline-flex items-center"><input type="radio" name="is_4ps_beneficiary" wire:model.live="is_4ps_beneficiary" value="Yes" class="text-blue-600"> <span class="ml-2">Yes</span></label>
                                    <label class="inline-flex items-center"><input type="radio" name="is_4ps_beneficiary" wire:model.live="is_4ps_beneficiary" value="No" class="text-blue-600"> <span class="ml-2">No</span></label>
                                </div>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($is_4ps_beneficiary === 'Yes'): ?>
                                    <div class="mt-3">
                                        <label class="block text-sm text-gray-600 mb-1">4Ps Household ID Number:</label>
                                        <input type="text" wire:model="four_ps_household_id" class="w-full md:w-1/2 border-gray-300 rounded-lg shadow-sm">
                                    </div>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                        </div>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                    
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($step === 4): ?>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">STEP 4 &mdash; PARENT'S/GUARDIAN'S INFORMATION</h3>
                        
                        <div class="space-y-6">
                            <div>
                                <h4 class="font-bold text-gray-800 border-b pb-1 mb-3">Father's Name</h4>
                                <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
                                    <div><label class="block text-xs text-gray-500 mb-1">Last Name</label><input type="text" wire:model="father_last_name" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                    <div><label class="block text-xs text-gray-500 mb-1">First Name</label><input type="text" wire:model="father_first_name" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                    <div><label class="block text-xs text-gray-500 mb-1">Middle Name</label><input type="text" wire:model="father_middle_name" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                    <div><label class="block text-xs text-gray-500 mb-1">Contact Number</label><input type="text" wire:model="father_contact" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                </div>
                            </div>

                            <div>
                                <h4 class="font-bold text-gray-800 border-b pb-1 mb-3">Mother's Maiden Name</h4>
                                <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
                                    <div><label class="block text-xs text-gray-500 mb-1">Last Name</label><input type="text" wire:model="mother_last_name" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                    <div><label class="block text-xs text-gray-500 mb-1">First Name</label><input type="text" wire:model="mother_first_name" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                    <div><label class="block text-xs text-gray-500 mb-1">Middle Name</label><input type="text" wire:model="mother_middle_name" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                    <div><label class="block text-xs text-gray-500 mb-1">Contact Number</label><input type="text" wire:model="mother_contact" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                </div>
                            </div>

                            <div>
                                <h4 class="font-bold text-gray-800 border-b pb-1 mb-3">Legal Guardian's Name</h4>
                                <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
                                    <div><label class="block text-xs text-gray-500 mb-1">Last Name</label><input type="text" wire:model="guardian_last_name" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                    <div><label class="block text-xs text-gray-500 mb-1">First Name</label><input type="text" wire:model="guardian_first_name" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                    <div><label class="block text-xs text-gray-500 mb-1">Middle Name</label><input type="text" wire:model="guardian_middle_name" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                    <div><label class="block text-xs text-gray-500 mb-1">Contact Number</label><input type="text" wire:model="guardian_contact" class="w-full border-gray-300 rounded-lg shadow-sm"></div>
                                </div>
                            </div>
                        </div>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                    
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($step === 5): ?>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">STEP 5 &mdash; Enrollment Requirements</h3>
                        
                        <div class="space-y-6">
                            <div class="border border-gray-200 rounded-xl p-4 bg-gray-50">
                                <label class="block text-sm font-bold text-gray-800 mb-2">PSA Birth Certificate</label>
                                <p class="text-xs text-gray-500 mb-3">Accepted: PDF, JPG, JPEG, PNG</p>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(isset($preStoredFiles['birth_certificate'])): ?>
                                    <div class="flex items-center gap-2 mb-2 px-3 py-2 rounded-lg bg-green-50 border border-green-200 text-green-800 text-xs font-semibold">
                                        <svg class="w-4 h-4 text-green-600" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>
                                        Uploaded: <?php echo e($preStoredFiles['birth_certificate']['original_filename']); ?>

                                    </div>
                                    <p class="text-xs text-gray-400 mb-2">Upload a new file below to replace it.</p>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                <input type="file" wire:model="psa_birth_cert_file" class="block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-gray-200 file:text-gray-700 hover:file:bg-gray-300">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['psa_birth_cert_file'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-red-500 text-xs"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>

                            <div class="border border-gray-200 rounded-xl p-4 bg-gray-50">
                                <label class="block text-sm font-bold text-gray-800 mb-2">SF10</label>
                                <p class="text-xs text-gray-500 mb-3">Accepted: PDF, JPG, JPEG, PNG</p>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(isset($preStoredFiles['sf10'])): ?>
                                    <div class="flex items-center gap-2 mb-2 px-3 py-2 rounded-lg bg-green-50 border border-green-200 text-green-800 text-xs font-semibold">
                                        <svg class="w-4 h-4 text-green-600" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>
                                        Uploaded: <?php echo e($preStoredFiles['sf10']['original_filename']); ?>

                                    </div>
                                    <p class="text-xs text-gray-400 mb-2">Upload a new file below to replace it.</p>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                <input type="file" wire:model="sf10_file" class="block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-gray-200 file:text-gray-700 hover:file:bg-gray-300">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['sf10_file'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-red-500 text-xs"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>

                            <div class="border border-gray-200 rounded-xl p-4 bg-gray-50">
                                <label class="block text-sm font-bold text-gray-800 mb-2">Other Required Document</label>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(isset($preStoredFiles['other'])): ?>
                                    <div class="flex items-center gap-2 mb-2 px-3 py-2 rounded-lg bg-green-50 border border-green-200 text-green-800 text-xs font-semibold">
                                        <svg class="w-4 h-4 text-green-600" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>
                                        Uploaded: <?php echo e($preStoredFiles['other']['original_filename']); ?>

                                    </div>
                                    <p class="text-xs text-gray-400 mb-2">Upload a new file below to replace it.</p>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                <input type="file" wire:model="other_document_file" class="block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-gray-200 file:text-gray-700 hover:file:bg-gray-300">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['other_document_file'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-red-500 text-xs"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                        </div>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                    
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($step === 6): ?>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">STEP 6 &mdash; Review Your Information</h3>
                        
                        <div class="space-y-4">
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = [
                                1 => 'Enrollment Information',
                                2 => 'Learner Information',
                                3 => 'Additional Learner Information',
                                4 => 'Learner With Disability',
                                5 => 'Current Address',
                                6 => 'Permanent Address',
                                7 => 'Parent\'s/Guardian\'s Information',
                                8 => 'Returning Learner/Transfer Information',
                                9 => 'Senior High School Information',
                                10 => 'Preferred Learning Modality',
                                11 => 'Enrollment Requirements',
                            ]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s => $title): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(
                                    ($s === 8 && $returning_learner === 'No') || 
                                    ($s === 9 && !in_array(trim(str_ireplace('Grade', '', (string)$grade_level_to_enroll)), ['11', '12']))
                                ): ?> 
                                    <?php continue; ?> 
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                
                                <div class="border border-gray-200 rounded-lg overflow-hidden">
                                    <div class="bg-gray-50 px-4 py-3 border-b border-gray-200 flex justify-between items-center">
                                        <h4 class="font-bold text-gray-800 text-sm"><?php echo e($title); ?></h4>
                                        <button type="button" wire:click="gotoStep(<?php echo e($s); ?>)" class="text-xs text-blue-600 hover:text-blue-800 font-semibold flex items-center gap-1">
                                            Edit ✏️
                                        </button>
                                    </div>
                                    <div class="p-4 bg-white text-sm text-gray-600">
                                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($s === 1): ?>
                                            <div class="grid grid-cols-1 sm:grid-cols-2 gap-2">
                                                <p><strong class="text-gray-800">School Year:</strong> <?php echo e($academic_year ?: '—'); ?></p>
                                                <p><strong class="text-gray-800">Grade Level to Enroll:</strong> <?php echo e($grade_level_to_enroll ? (str_starts_with($grade_level_to_enroll, 'Grade') ? $grade_level_to_enroll : 'Grade ' . $grade_level_to_enroll) : '—'); ?></p>
                                                <p><strong class="text-gray-800">With LRN:</strong> <?php echo e($with_lrn ?: '—'); ?></p>
                                                <p><strong class="text-gray-800">Returning Learner (Balik-Aral):</strong> <?php echo e($returning_learner ?: '—'); ?></p>
                                            </div>
                                        <?php elseif($s === 2): ?>
                                            <div class="grid grid-cols-1 sm:grid-cols-2 gap-2">
                                                <p class="sm:col-span-2"><strong class="text-gray-800">Name:</strong> <?php echo e(trim("$first_name $middle_name $last_name $extension_name") ?: '—'); ?></p>
                                                <p><strong class="text-gray-800">LRN:</strong> <?php echo e($lrn ?: 'N/A'); ?></p>
                                                <p><strong class="text-gray-800">PSA Birth Cert No:</strong> <?php echo e($psa_birth_cert_no ?: 'None'); ?></p>
                                                <p><strong class="text-gray-800">Birthdate:</strong> <?php echo e($birth_date ?: '—'); ?></p>
                                                <p><strong class="text-gray-800">Age:</strong> <?php echo e($age !== null ? $age : '—'); ?></p>
                                                <p><strong class="text-gray-800">Sex:</strong> <?php echo e($gender ?: '—'); ?></p>
                                                <p><strong class="text-gray-800">Mother Tongue:</strong> <?php echo e($mother_tongue ?: '—'); ?></p>
                                                <p class="sm:col-span-2"><strong class="text-gray-800">Place of Birth:</strong> <?php echo e($place_of_birth ?: '—'); ?></p>
                                            </div>
                                        <?php elseif($s === 3): ?>
                                            <div class="grid grid-cols-1 sm:grid-cols-2 gap-2">
                                                <div>
                                                    <p><strong class="text-gray-800">Belong to IP Community:</strong> <?php echo e($is_ip_community ?: 'No'); ?></p>
                                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($is_ip_community === 'Yes' && $ip_community_name): ?>
                                                        <p class="text-xs text-gray-500 mt-0.5">Community: <?php echo e($ip_community_name); ?></p>
                                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                </div>
                                                <div>
                                                    <p><strong class="text-gray-800">4Ps Beneficiary:</strong> <?php echo e($is_4ps_beneficiary ?: 'No'); ?></p>
                                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($is_4ps_beneficiary === 'Yes' && $four_ps_household_id): ?>
                                                        <p class="text-xs text-gray-500 mt-0.5">Household ID: <?php echo e($four_ps_household_id); ?></p>
                                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                </div>
                                            </div>
                                        <?php elseif($s === 4): ?>
                                            <div>
                                                <p><strong class="text-gray-800">Learner With Disability:</strong> <?php echo e($is_learner_with_disability ?: 'No'); ?></p>
                                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($is_learner_with_disability === 'Yes'): ?>
                                                    <p class="mt-1.5"><strong class="text-gray-800">Disabilities Specified:</strong> <?php echo e(!empty($disability_type) ? (is_array($disability_type) ? implode(', ', $disability_type) : $disability_type) : 'None specified'); ?></p>
                                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                            </div>
                                        <?php elseif($s === 5): ?>
                                            <div class="space-y-1">
                                                <p><strong class="text-gray-800">House / Street:</strong> <?php echo e(trim("$current_house_no $current_street") ?: '—'); ?></p>
                                                <div class="grid grid-cols-1 sm:grid-cols-2 gap-2 text-xs sm:text-sm">
                                                    <p><strong class="text-gray-800">Barangay:</strong> <?php echo e($current_barangay ?: '—'); ?></p>
                                                    <p><strong class="text-gray-800">Municipality / City:</strong> <?php echo e($current_city ?: '—'); ?></p>
                                                    <p><strong class="text-gray-800">Province:</strong> <?php echo e($current_province ?: '—'); ?></p>
                                                    <p><strong class="text-gray-800">Country:</strong> <?php echo e($current_country ?: 'Philippines'); ?> <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($current_zip_code): ?> (Zip: <?php echo e($current_zip_code); ?>) <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?></p>
                                                </div>
                                            </div>
                                        <?php elseif($s === 6): ?>
                                            <div class="space-y-1">
                                                <p><strong class="text-gray-800">Same as Current Address:</strong> <?php echo e($permanent_same_as_current); ?></p>
                                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($permanent_same_as_current === 'No'): ?>
                                                    <p><strong class="text-gray-800">House / Street:</strong> <?php echo e(trim("$permanent_house_no $permanent_street") ?: '—'); ?></p>
                                                    <div class="grid grid-cols-1 sm:grid-cols-2 gap-2 text-xs sm:text-sm">
                                                        <p><strong class="text-gray-800">Barangay:</strong> <?php echo e($permanent_barangay ?: '—'); ?></p>
                                                        <p><strong class="text-gray-800">Municipality / City:</strong> <?php echo e($permanent_city ?: '—'); ?></p>
                                                        <p><strong class="text-gray-800">Province:</strong> <?php echo e($permanent_province ?: '—'); ?></p>
                                                        <p><strong class="text-gray-800">Country:</strong> <?php echo e($permanent_country ?: 'Philippines'); ?> <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($permanent_zip_code): ?> (Zip: <?php echo e($permanent_zip_code); ?>) <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?></p>
                                                    </div>
                                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                            </div>
                                        <?php elseif($s === 7): ?>
                                            <div class="grid grid-cols-1 sm:grid-cols-3 gap-3">
                                                <div class="border-b sm:border-b-0 sm:border-r border-gray-100 pb-2 sm:pb-0 sm:pr-2">
                                                    <p class="font-bold text-gray-800 text-xs uppercase mb-1">Father</p>
                                                    <p><?php echo e(trim("$father_first_name $father_middle_name $father_last_name") ?: 'Not specified'); ?></p>
                                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($father_contact): ?><p class="text-xs text-gray-500">Contact: <?php echo e($father_contact); ?></p><?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                </div>
                                                <div class="border-b sm:border-b-0 sm:border-r border-gray-100 pb-2 sm:pb-0 sm:pr-2">
                                                    <p class="font-bold text-gray-800 text-xs uppercase mb-1">Mother (Maiden)</p>
                                                    <p><?php echo e(trim("$mother_first_name $mother_middle_name $mother_last_name") ?: 'Not specified'); ?></p>
                                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($mother_contact): ?><p class="text-xs text-gray-500">Contact: <?php echo e($mother_contact); ?></p><?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                </div>
                                                <div>
                                                    <p class="font-bold text-gray-800 text-xs uppercase mb-1">Guardian</p>
                                                    <p><?php echo e(trim("$guardian_first_name $guardian_middle_name $guardian_last_name") ?: 'Not specified'); ?></p>
                                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($guardian_contact): ?><p class="text-xs text-gray-500">Contact: <?php echo e($guardian_contact); ?></p><?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                </div>
                                            </div>
                                        <?php elseif($s === 8): ?>
                                            <div class="grid grid-cols-1 sm:grid-cols-2 gap-2">
                                                <p><strong class="text-gray-800">Last Grade Completed:</strong> <?php echo e($last_grade_level_completed ?: '—'); ?></p>
                                                <p><strong class="text-gray-800">Last School Year:</strong> <?php echo e($last_school_year_completed ?: '—'); ?></p>
                                                <p><strong class="text-gray-800">Last School Attended:</strong> <?php echo e($school_last_attended ?: '—'); ?></p>
                                                <p><strong class="text-gray-800">School ID:</strong> <?php echo e($last_school_id ?: '—'); ?></p>
                                            </div>
                                        <?php elseif($s === 9): ?>
                                            <div class="grid grid-cols-1 sm:grid-cols-3 gap-2">
                                                <p><strong class="text-gray-800">Semester:</strong> <?php echo e($semester ?: '—'); ?></p>
                                                <p><strong class="text-gray-800">Track:</strong> <?php echo e($track ?: '—'); ?></p>
                                                <p><strong class="text-gray-800">Strand:</strong> <?php echo e($strand ?: '—'); ?></p>
                                            </div>
                                        <?php elseif($s === 10): ?>
                                            <div>
                                                <p><strong class="text-gray-800">Selected Modalities:</strong> <?php echo e(!empty($preferred_learning_modality) ? (is_array($preferred_learning_modality) ? implode(', ', $preferred_learning_modality) : $preferred_learning_modality) : 'Face-to-Face / Not specified'); ?></p>
                                            </div>
                                        <?php elseif($s === 11): ?>
                                            <div class="grid grid-cols-1 sm:grid-cols-3 gap-3">
                                                <div>
                                                    <p class="font-semibold text-gray-700 text-xs">PSA Birth Certificate:</p>
                                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!empty($preStoredFiles['birth_certificate']['original_filename'])): ?>
                                                        <span class="text-green-600 text-xs font-semibold">✓ <?php echo e($preStoredFiles['birth_certificate']['original_filename']); ?></span>
                                                    <?php elseif($psa_birth_cert_file): ?>
                                                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(is_object($psa_birth_cert_file) && method_exists($psa_birth_cert_file, 'getClientOriginalName')): ?>
                                                            <span class="text-green-600 text-xs font-semibold">✓ <?php echo e($psa_birth_cert_file->getClientOriginalName()); ?></span>
                                                        <?php elseif(is_string($psa_birth_cert_file)): ?>
                                                            <span class="text-green-600 text-xs font-semibold">✓ <?php echo e(basename($psa_birth_cert_file)); ?></span>
                                                        <?php else: ?>
                                                            <span class="text-green-600 text-xs font-semibold">✓ Uploaded</span>
                                                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                    <?php elseif($isEdit): ?>
                                                        <span class="text-gray-500 text-xs">Attached in application</span>
                                                    <?php else: ?>
                                                        <span class="text-gray-400 text-xs italic">Not uploaded</span>
                                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                </div>
                                                <div>
                                                    <p class="font-semibold text-gray-700 text-xs">SF10 (Card):</p>
                                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!empty($preStoredFiles['sf10']['original_filename'])): ?>
                                                        <span class="text-green-600 text-xs font-semibold">✓ <?php echo e($preStoredFiles['sf10']['original_filename']); ?></span>
                                                    <?php elseif($sf10_file): ?>
                                                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(is_object($sf10_file) && method_exists($sf10_file, 'getClientOriginalName')): ?>
                                                            <span class="text-green-600 text-xs font-semibold">✓ <?php echo e($sf10_file->getClientOriginalName()); ?></span>
                                                        <?php elseif(is_string($sf10_file)): ?>
                                                            <span class="text-green-600 text-xs font-semibold">✓ <?php echo e(basename($sf10_file)); ?></span>
                                                        <?php else: ?>
                                                            <span class="text-green-600 text-xs font-semibold">✓ Uploaded</span>
                                                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                    <?php elseif($isEdit): ?>
                                                        <span class="text-gray-500 text-xs">Attached in application</span>
                                                    <?php else: ?>
                                                        <span class="text-gray-400 text-xs italic">Not uploaded</span>
                                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                </div>
                                                <div>
                                                    <p class="font-semibold text-gray-700 text-xs">Other Documents:</p>
                                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!empty($preStoredFiles['other']['original_filename'])): ?>
                                                        <span class="text-green-600 text-xs font-semibold">✓ <?php echo e($preStoredFiles['other']['original_filename']); ?></span>
                                                    <?php elseif($other_document_file): ?>
                                                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(is_object($other_document_file) && method_exists($other_document_file, 'getClientOriginalName')): ?>
                                                            <span class="text-green-600 text-xs font-semibold">✓ <?php echo e($other_document_file->getClientOriginalName()); ?></span>
                                                        <?php elseif(is_string($other_document_file)): ?>
                                                            <span class="text-green-600 text-xs font-semibold">✓ <?php echo e(basename($other_document_file)); ?></span>
                                                        <?php else: ?>
                                                            <span class="text-green-600 text-xs font-semibold">✓ Uploaded</span>
                                                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                    <?php elseif($isEdit): ?>
                                                        <span class="text-gray-500 text-xs">Attached in application</span>
                                                    <?php else: ?>
                                                        <span class="text-gray-400 text-xs italic">None</span>
                                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                </div>
                                            </div>
                                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                    </div>
                                </div>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                        </div>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                    
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($step === 7): ?>
                        <h3 class="text-lg font-bold text-gray-900 mb-4 bg-gray-100 p-3 rounded-lg uppercase tracking-wider text-sm">STEP 13 &mdash; Certification and Data Privacy</h3>
                        
                        <div class="space-y-6">
                            <div class="border border-gray-200 rounded-xl p-5 bg-gray-50">
                                <p class="text-sm text-gray-700 mb-4">I hereby certify that the information I have provided is true and correct to the best of my knowledge.</p>
                                <label class="inline-flex items-center">
                                    <input type="checkbox" wire:model="certify_info" class="rounded text-blue-600 border-gray-300 shadow-sm"> 
                                    <span class="ml-2 text-sm font-bold text-gray-900">I agree and certify that the information provided is true and correct.</span>
                                </label>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['certify_info'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>

                            <div class="border border-gray-200 rounded-xl p-5 bg-gray-50">
                                <h4 class="font-bold text-gray-900 mb-2">Data Privacy</h4>
                                <p class="text-sm text-gray-700 mb-5">I understand that the information provided will be collected and processed for enrollment and learner record purposes in accordance with the Data Privacy Act of 2012 and applicable school policies.</p>
                                
                                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-5">
                                    <div>
                                        <label class="block text-xs font-semibold text-gray-500 mb-1">Parent/Guardian Name:</label>
                                        <input type="text" wire:model="parent_guardian_name" class="w-full border-gray-300 rounded-lg shadow-sm">
                                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['parent_guardian_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                    </div>
                                    <div>
                                        <label class="block text-xs font-semibold text-gray-500 mb-1">Relationship to Learner:</label>
                                        <input type="text" wire:model="relationship_to_learner" class="w-full border-gray-300 rounded-lg shadow-sm">
                                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['relationship_to_learner'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                    </div>
                                </div>

                                <label class="inline-flex items-center">
                                    <input type="checkbox" wire:model="agree_data_privacy" class="rounded text-blue-600 border-gray-300 shadow-sm"> 
                                    <span class="ml-2 text-sm font-bold text-gray-900">I agree to the Data Privacy Statement</span>
                                </label>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['agree_data_privacy'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-red-500 text-xs mt-1"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                        </div>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                    
                    <div class="flex justify-between mt-8 pt-5 border-t border-gray-200">
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($step > 1): ?>
                            <button type="button" wire:click="previousStep" class="px-5 py-2 text-sm font-semibold text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition shadow-sm">
                                ← Previous
                            </button>
                        <?php else: ?>
                            <div></div>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($step < $totalSteps): ?>
                            <button type="button" wire:click="nextStep" wire:loading.attr="disabled" class="px-5 py-2 text-sm font-bold text-white rounded-lg transition shadow-sm" style="background-color: #14213d; color: #ffffff;" onmouseover="this.style.backgroundColor='#1e3160'" onmouseout="this.style.backgroundColor='#14213d'">
                                <span wire:loading.remove wire:target="nextStep">Next →</span>
                                <span wire:loading wire:target="nextStep">Loading...</span>
                            </button>
                        <?php else: ?>
                            <button type="submit" wire:loading.attr="disabled" class="px-6 py-2.5 text-sm font-bold text-white rounded-lg transition shadow-sm" style="background-color: #16a34a; color: #ffffff;" onmouseover="this.style.backgroundColor='#15803d'" onmouseout="this.style.backgroundColor='#16a34a'">
                                <span wire:loading.remove wire:target="submit">[ SUBMIT ENROLLMENT ]</span>
                                <span wire:loading wire:target="submit">Submitting...</span>
                            </button>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </div>
                </form>

            </div>
        </div>
    </div>
</div>
<?php /**PATH C:\xampp\htdocs\ASAT_REVISED\resources\views/livewire/student/application-form.blade.php ENDPATH**/ ?>