<?php $__env->startSection('content'); ?>
    <div class="bg-gray-100 min-h-[calc(100vh-130px)] p-4 flex flex-col">

        <div class="bg-white shadow-sm flex-1 border border-gray-200 p-6">

            <form action="<?php echo e(route('company.update', $company->id)); ?>" method="POST" class="max-w-6xl">
                <?php echo csrf_field(); ?>
                <?php echo method_field('PUT'); ?>

                <!-- Top Basic Fields matching screenshot -->
                <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
                    <div>
                        <label class="block text-xs font-bold text-gray-700 mb-1">Company Name <span class="text-red-500">*</span></label>
                        <input type="text" name="company_name" value="<?php echo e(old('company_name', $company->company_name)); ?>" placeholder="Company Name" required
                            class="w-full border border-gray-400 px-2 py-1.5 text-sm focus:outline-none focus:border-[#ff9800]">
                        <?php $__errorArgs = ['company_name'];
$__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); ?>
                    </div>
                    <div>
                        <label class="block text-xs font-bold text-gray-700 mb-1">Address <span class="text-red-500">*</span></label>
                        <input type="text" name="company_address" value="<?php echo e(old('company_address', $company->company_address)); ?>" placeholder="Address" required
                            class="w-full border border-gray-400 px-2 py-1.5 text-sm focus:outline-none focus:border-[#ff9800]">
                        <?php $__errorArgs = ['company_address'];
$__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); ?>
                    </div>
                    <div>
                        <label class="block text-xs font-bold text-gray-700 mb-1">Email Id</label>
                        <input type="email" name="email" value="<?php echo e(old('email', $company->email)); ?>" placeholder="Email Address"
                            class="w-full border border-gray-400 px-2 py-1.5 text-sm focus:outline-none focus:border-[#ff9800]">
                        <?php $__errorArgs = ['email'];
$__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); ?>
                    </div>
                </div>

                <input type="hidden" name="phone" value="<?php echo e(old('phone', $company->phone)); ?>">
                <input type="hidden" name="corporate_id" value="<?php echo e(old('corporate_id', $company->corporate_id)); ?>">

                <!-- Advanced Company Details -->
                <h3 class="text-[#d84315] font-bold text-sm mt-4 mb-3">Advanced Company Details</h3>
                <div class="grid grid-cols-2 md:grid-cols-6 gap-3 mb-4">
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Registration Number</label>
                        <input type="text" name="registration_no" value="<?php echo e(old('registration_no', $company->registration_no)); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">PT Application OR Not</label>
                        <select name="pt_application" class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800] bg-white text-gray-700">
                            <option value="No" <?php echo e(old('pt_application', $company->pt_application ?? 'No') == 'No' ? 'selected' : ''); ?>>No</option>
                            <option value="Yes" <?php echo e(old('pt_application', $company->pt_application) == 'Yes' ? 'selected' : ''); ?>>Yes</option>
                        </select>
                    </div>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Company PF.Reg.No</label>
                        <input type="text" name="pf_no" value="<?php echo e(old('pf_no', $company->pf_no)); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">ESI Limit Amount</label>
                        <input type="number" step="0.01" name="esi_limit_amount" value="<?php echo e(old('esi_limit_amount', $company->esi_limit_amount ?? '0.00')); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">GST No</label>
                        <input type="text" name="gst_no" value="<?php echo e(old('gst_no', $company->gst_no)); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Account No <span class="text-red-500">*</span></label>
                        <input type="text" name="account_no" value="<?php echo e(old('account_no', $company->account_no)); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>

                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Company ESI Reg.No</label>
                        <input type="text" name="esi_no" value="<?php echo e(old('esi_no', $company->esi_no)); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Company PAN No <span class="text-red-500">*</span></label>
                        <input type="text" name="pancard_no" value="<?php echo e(old('pancard_no', $company->pancard_no)); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Employee PF Share%</label>
                        <input type="text" name="pf_percent" value="<?php echo e(old('pf_percent', $company->pf_percent ?? '0')); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Employer PF Share%</label>
                        <input type="text" name="epf_percent" value="<?php echo e(old('epf_percent', $company->epf_percent ?? '0')); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Employer ESI Share%</label>
                        <input type="text" name="esi_percent" value="<?php echo e(old('esi_percent', $company->esi_percent ?? '0')); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Employee ESI Share%</label>
                        <input type="text" name="ppf_percent" value="<?php echo e(old('ppf_percent', $company->ppf_percent ?? '0')); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                </div>

                <!-- Define Addition Heads -->
                <h3 class="text-[#d84315] font-bold text-sm mt-4 mb-3">Define Addition Heads</h3>
                <div class="grid grid-cols-2 md:grid-cols-5 gap-3 mb-4">
                    <!-- Head1 with default Basic -->
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Head1</label>
                        <input type="text" name="head1" value="<?php echo e(old('head1', $company->head1 ?? 'Basic')); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <?php for($i = 2; $i <= 8; $i++): ?>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Head<?php echo e($i); ?><?php echo e($i == 8 ? ' (Fix)' : ''); ?></label>
                        <?php $headKey = 'head' . $i; ?>
                        <input type="text" name="head<?php echo e($i); ?>" value="<?php echo e(old('head' . $i, $company->$headKey)); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <?php endfor; ?>
                    <!-- Head9 Fix - editable with placeholder hint -->
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Head9(Fix)</label>
                        <input type="text" name="head9" value="<?php echo e(old('head9', $company->head9 ?? 'Bonus')); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800] bg-gray-50">
                    </div>
                    <!-- Head10 Fix For Tour - editable with placeholder hint -->
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Head10(Fix For Tour)</label>
                        <input type="text" name="head10" value="<?php echo e(old('head10', $company->head10 ?? 'Conveyance')); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800] bg-gray-50">
                    </div>
                </div>

                <!-- Fixed Deduction Heads - 5 heads, all editable -->
                <h3 class="text-[#d84315] font-bold text-sm mt-4 mb-3">Fixed Deduction Heads</h3>
                <div class="grid grid-cols-2 md:grid-cols-5 gap-3 mb-4">
                    <?php for($i = 1; $i <= 3; $i++): ?>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Head<?php echo e($i); ?></label>
                        <?php $dedKey = 'deduction_head' . $i; ?>
                        <input type="text" name="deduction_head<?php echo e($i); ?>" value="<?php echo e(old('deduction_head' . $i, $company->$dedKey)); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <?php endfor; ?>
                    <!-- Head4 = PT default, editable -->
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Head4</label>
                        <input type="text" name="deduction_head4" value="<?php echo e(old('deduction_head4', $company->deduction_head4 ?? 'PT')); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <!-- Head5 editable -->
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Head5</label>
                        <input type="text" name="deduction_head5" value="<?php echo e(old('deduction_head5', $company->deduction_head5)); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                </div>

                <!-- Define Deduction Heads -->
                <h3 class="text-[#d84315] font-bold text-sm mt-4 mb-3">Define Deduction Heads</h3>
                <div class="grid grid-cols-2 md:grid-cols-5 gap-3 mb-6">
                    <?php for($i = 1; $i <= 5; $i++): ?>
                    <div>
                        <label class="block text-[10px] font-bold text-gray-700 mb-1">Head<?php echo e($i == 5 ? 's' : ''); ?><?php echo e($i); ?></label>
                        <?php $dedKey = 'ded_head' . $i; ?>
                        <input type="text" name="ded_head<?php echo e($i); ?>" value="<?php echo e(old('ded_head' . $i, $company->$dedKey)); ?>"
                            class="w-full border border-gray-400 px-2 py-1 text-xs focus:outline-none focus:border-[#ff9800]">
                    </div>
                    <?php endfor; ?>
                </div>

                <!-- Action Buttons -->
                <div class="flex justify-center space-x-2 pt-4 border-t border-gray-100">
                    <button type="submit" class="bg-[#4caf50] hover:bg-[#43a047] text-white px-8 py-2 rounded shadow text-sm font-bold">Update</button>
                    <a href="<?php echo e(route('company.index')); ?>" class="bg-[#f44336] hover:bg-[#e53935] text-white px-8 py-2 rounded shadow text-sm font-bold">Cancel</a>
                </div>

            </form>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\realtime\resources\views/admin/company/edit.blade.php ENDPATH**/ ?>