<?php $__env->startSection('title', 'Settings'); ?>
<?php $__env->startSection('page_title', 'System Settings'); ?>

<?php $__env->startSection('content'); ?>
<div class="max-w-4xl mx-auto space-y-6">
    <!-- Profile Settings -->
    <div class="bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-sm shadow-sm overflow-hidden">
        <div class="p-4 border-b border-zinc-200 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900">
            <h3 class="text-[11px] font-bold uppercase tracking-widest text-zinc-600 dark:text-zinc-300">Profile Information</h3>
            <p class="text-[9px] text-zinc-500 mt-0.5">Update your account's profile information and phone number.</p>
        </div>
        <form action="<?php echo e(route('settings.profile.update')); ?>" method="POST" enctype="multipart/form-data" class="p-4 space-y-4">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PATCH'); ?>

            <div class="flex flex-col md:flex-row md:items-center space-y-4 md:space-y-0 md:space-x-6">
                <div class="flex-shrink-0">
                    <div class="relative group">
                        <div class="w-16 h-16 rounded-sm bg-amber-600 flex items-center justify-center text-white font-bold text-xl overflow-hidden">
                            <?php if($user->profile_photo_path): ?>
                                <img src="<?php echo e(Storage::url($user->profile_photo_path)); ?>" alt="<?php echo e($user->name); ?>" class="w-full h-full object-cover">
                            <?php else: ?>
                                <?php echo e(substr($user->name, 0, 1)); ?>

                            <?php endif; ?>
                        </div>
                        <label for="photo" class="absolute inset-0 bg-black/40 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer rounded-sm">
                            <svg class="w-4 h-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"></path></svg>
                        </label>
                        <input type="file" name="photo" id="photo" class="hidden" accept="image/*">
                    </div>
                    <?php $__errorArgs = ['photo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-[9px] text-red-500 mt-1 uppercase"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>

                <div class="flex-1 grid grid-cols-1 md:grid-cols-2 gap-4">
                    <div>
                        <label for="name" class="block text-[10px] font-bold text-zinc-500 uppercase tracking-tighter mb-1">Full Name</label>
                        <input type="text" name="name" id="name" value="<?php echo e(old('name', $user->name)); ?>" required
                            class="w-full px-3 py-1.5 bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-sm text-xs focus:outline-hidden focus:border-amber-500/50 focus:ring-1 focus:ring-amber-500/20 transition-all">
                        <?php $__errorArgs = ['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-[9px] text-red-500 mt-1 uppercase"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                    <div>
                        <label for="phone_number" class="block text-[10px] font-bold text-zinc-500 uppercase tracking-tighter mb-1">Phone Number</label>
                        <input type="text" name="phone_number" id="phone_number" value="<?php echo e(old('phone_number', $user->phone_number)); ?>"
                            class="w-full px-3 py-1.5 bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-sm text-xs focus:outline-hidden focus:border-amber-500/50 focus:ring-1 focus:ring-amber-500/20 transition-all">
                        <?php $__errorArgs = ['phone_number'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-[9px] text-red-500 mt-1 uppercase"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    </div>
                </div>
            </div>

            <div class="flex justify-end pt-2">
                <button type="submit" class="px-4 py-1.5 bg-amber-600 hover:bg-amber-500 text-white text-[10px] font-bold uppercase tracking-widest rounded-sm transition-all active:scale-[0.97]">
                    Save Profile
                </button>
            </div>
        </form>
    </div>

    <!-- Password Change -->
    <div class="bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-sm shadow-sm overflow-hidden">
        <div class="p-4 border-b border-zinc-200 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900">
            <h3 class="text-[11px] font-bold uppercase tracking-widest text-zinc-600 dark:text-zinc-300">Update Password</h3>
            <p class="text-[9px] text-zinc-500 mt-0.5">Ensure your account is using a long, random password to stay secure.</p>
        </div>
        <form action="<?php echo e(route('settings.password.update')); ?>" method="POST" class="p-4 space-y-4">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PATCH'); ?>

            <div class="max-w-md space-y-4">
                <div>
                    <label for="current_password" class="block text-[10px] font-bold text-zinc-500 uppercase tracking-tighter mb-1">Current Password</label>
                    <input type="password" name="current_password" id="current_password" required
                        class="w-full px-3 py-1.5 bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-sm text-xs focus:outline-hidden focus:border-amber-500/50 focus:ring-1 focus:ring-amber-500/20 transition-all">
                    <?php $__errorArgs = ['current_password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-[9px] text-red-500 mt-1 uppercase"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
                <div>
                    <label for="password" class="block text-[10px] font-bold text-zinc-500 uppercase tracking-tighter mb-1">New Password</label>
                    <input type="password" name="password" id="password" required
                        class="w-full px-3 py-1.5 bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-sm text-xs focus:outline-hidden focus:border-amber-500/50 focus:ring-1 focus:ring-amber-500/20 transition-all">
                    <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <p class="text-[9px] text-red-500 mt-1 uppercase"><?php echo e($message); ?></p> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                </div>
                <div>
                    <label for="password_confirmation" class="block text-[10px] font-bold text-zinc-500 uppercase tracking-tighter mb-1">Confirm New Password</label>
                    <input type="password" name="password_confirmation" id="password_confirmation" required
                        class="w-full px-3 py-1.5 bg-zinc-50 dark:bg-zinc-950 border border-zinc-200 dark:border-zinc-800 rounded-sm text-xs focus:outline-hidden focus:border-amber-500/50 focus:ring-1 focus:ring-amber-500/20 transition-all">
                </div>
            </div>

            <div class="flex justify-end pt-2">
                <button type="submit" class="px-4 py-1.5 bg-amber-600 hover:bg-amber-500 text-white text-[10px] font-bold uppercase tracking-widest rounded-sm transition-all active:scale-[0.97]">
                    Update Password
                </button>
            </div>
        </form>
    </div>

    <!-- 2FA Setup -->
    <div class="bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-sm shadow-sm overflow-hidden">
        <div class="p-4 border-b border-zinc-200 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900">
            <h3 class="text-[11px] font-bold uppercase tracking-widest text-zinc-600 dark:text-zinc-300">Two-Factor Authentication</h3>
            <p class="text-[9px] text-zinc-500 mt-0.5">Add additional security to your account using two-factor authentication.</p>
        </div>
        <div class="p-4">
            <?php if($user->two_factor_confirmed_at): ?>
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-xs font-bold text-green-500 uppercase tracking-tight">Status: Enabled</p>
                        <p class="text-[10px] text-zinc-500 mt-1">Your account is secured with two-factor authentication.</p>
                    </div>
                    <form action="<?php echo e(route('settings.2fa.disable')); ?>" method="POST">
                        <?php echo csrf_field(); ?>
                        <?php echo method_field('DELETE'); ?>
                        <button type="submit" class="px-3 py-1.5 border border-red-200 dark:border-red-900 text-red-600 text-[10px] font-bold uppercase tracking-widest rounded-sm hover:bg-red-50 dark:hover:bg-red-900/10 transition-all">
                            Disable 2FA
                        </button>
                    </form>
                </div>
            <?php else: ?>
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-xs font-bold text-zinc-400 uppercase tracking-tight">Status: Disabled</p>
                        <p class="text-[10px] text-zinc-500 mt-1">Configure your account to use 2FA for enhanced security.</p>
                    </div>
                    <form action="<?php echo e(route('settings.2fa.enable')); ?>" method="POST">
                        <?php echo csrf_field(); ?>
                        <button type="submit" class="px-3 py-1.5 bg-amber-600 hover:bg-amber-500 text-white text-[10px] font-bold uppercase tracking-widest rounded-sm transition-all active:scale-[0.97]">
                            Enable 2FA
                        </button>
                    </form>
                </div>
            <?php endif; ?>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.super-admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/sbs/Downloads/Archive 13/resources/views/super-admin/settings.blade.php ENDPATH**/ ?>