

<?php $__env->startSection('title', 'My Profile - Industrial Pump Logic'); ?>

<?php $__env->startSection('content'); ?>
<main style="background:var(--bg-main); padding:32px; overflow-y:auto; display:flex; justify-content:center;">
    <div style="width:100%; max-width:600px;">
        <div class="header-flex" style="display:flex; justify-content:space-between; align-items:center; margin-bottom:24px;">
            <div>
                <h2 style="font-size:24px; font-weight:700; color:var(--text-main)">My Profile</h2>
                <p style="font-size:14px; color:var(--text-muted)">Personalize your account settings.</p>
            </div>
        </div>

        <div class="card" style="background:white; border:1px solid var(--border); border-radius:16px; padding:32px; box-shadow:0 1px 3px rgba(0,0,0,0.05); margin-bottom:24px;">
            <h3 style="font-size:18px; font-weight:700; color:var(--text-main); margin-bottom:20px; display:flex; align-items:center; gap:8px;">
                <i data-lucide="user-cog" size="20"></i> Profile Information
            </h3>

            <?php if(session('success_profile')): ?>
                <div style="background:#dcfce7; color:#16a34a; padding:12px; border-radius:8px; margin-bottom:24px; font-size:13px; font-weight:600;">
                    <?php echo e(session('success_profile')); ?>

                </div>
            <?php endif; ?>

            <?php if($errors->profile->any()): ?>
                <div style="background:#fee2e2; color:#ef4444; padding:12px; border-radius:8px; margin-bottom:24px; font-size:13px;">
                    <?php $__currentLoopData = $errors->profile->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div><?php echo e($error); ?></div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            <?php endif; ?>

            <form action="<?php echo e(route('admin.profile.update')); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <div class="property-group" style="padding:0; gap:20px;">
                    <div class="field">
                        <label>Full Name</label>
                        <input type="text" name="name" class="input" value="<?php echo e($user->name); ?>" required>
                    </div>

                    <div style="display:flex; gap:20px;">
                        <div class="field" style="flex:1;">
                            <label>Email Address</label>
                            <input type="email" name="email" class="input" value="<?php echo e($user->email); ?>" required>
                        </div>
                        <div class="field" style="flex:1;">
                            <label>Mobile Number</label>
                            <input type="text" name="mobile_no" class="input" value="<?php echo e($user->mobile_no); ?>" placeholder="+91 XXXX XXX XXX">
                        </div>
                    </div>

                    <div class="field">
                        <label>Address</label>
                        <textarea name="address" class="textarea" style="height:80px;" placeholder="Full Address"><?php echo e($user->address); ?></textarea>
                    </div>

                    <div style="margin-top:10px;">
                        <button type="submit" class="btn btn-primary" style="width:100%; justify-content:center; height:42px;">
                            <i data-lucide="save" size="16"></i> Save Profile Details
                        </button>
                    </div>
                </div>
            </form>
        </div>

        <div class="card" style="background:white; border:1px solid var(--border); border-radius:16px; padding:32px; box-shadow:0 1px 3px rgba(0,0,0,0.05)">
            <h3 style="font-size:18px; font-weight:700; color:var(--text-main); margin-bottom:20px; display:flex; align-items:center; gap:8px;">
                <i data-lucide="shield-check" size="20"></i> Security & Password
            </h3>

            <?php if(session('success_password')): ?>
                <div style="background:#dcfce7; color:#16a34a; padding:12px; border-radius:8px; margin-bottom:24px; font-size:13px; font-weight:600;">
                    <?php echo e(session('success_password')); ?>

                </div>
            <?php endif; ?>

            <?php if($errors->password->any()): ?>
                <div style="background:#fee2e2; color:#ef4444; padding:12px; border-radius:8px; margin-bottom:24px; font-size:13px;">
                    <?php $__currentLoopData = $errors->password->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div><?php echo e($error); ?></div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            <?php endif; ?>

            <form action="<?php echo e(route('admin.profile.password.update')); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <div class="property-group" style="padding:0; gap:20px;">
                    <div class="field">
                        <label>Current (Old) Password</label>
                        <input type="password" name="old_password" class="input" placeholder="••••••••" required>
                    </div>

                    <div style="display:flex; gap:20px;">
                        <div class="field" style="flex:1;">
                            <label>New Password</label>
                            <input type="password" name="new_password" class="input" placeholder="Min 8 characters" required>
                        </div>
                        <div class="field" style="flex:1;">
                            <label>Confirm New Password</label>
                            <input type="password" name="new_password_confirmation" class="input" placeholder="Repeat new password" required>
                        </div>
                    </div>

                    <div style="margin-top:10px;">
                        <button type="submit" class="btn btn-primary" style="width:100%; justify-content:center; height:42px; background:#0f172a;">
                            <i data-lucide="lock" size="16"></i> Update Password
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</main>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\xampp\htdocs\pump-selection-backend\resources\views/auth/profile.blade.php ENDPATH**/ ?>