<x-filament-panels::page>
    <section class="overflow-hidden rounded-3xl border border-teal-100 bg-white shadow-sm">
        <div class="bg-gradient-to-br from-teal-50 via-white to-sky-50 px-6 py-7">
            <p class="text-xs font-semibold uppercase tracking-[0.22em] text-teal-700">Required security step</p>
            <h2 class="mt-3 text-2xl font-semibold tracking-tight text-slate-950">Change the default admin password</h2>
            <p class="mt-3 max-w-2xl text-sm leading-6 text-slate-600">
                Fresh marketplace installs include default admin credentials for first login only. Set a strong password before using the admin panel or sharing the application.
            </p>
        </div>

        <form wire:submit="savePassword" class="space-y-5 p-6">
            <div>
                <label for="current_password" class="text-sm font-semibold text-slate-800">Current password</label>
                <input
                    id="current_password"
                    type="password"
                    wire:model="current_password"
                    autocomplete="current-password"
                    class="mt-2 block w-full rounded-2xl border border-slate-200 bg-white px-4 py-3 text-sm text-slate-950 outline-none transition focus:border-teal-500 focus:ring-4 focus:ring-teal-100"
                >
                @error('current_password')
                    <p class="mt-2 text-sm font-medium text-rose-600">{{ $message }}</p>
                @enderror
            </div>

            <div class="grid gap-5 md:grid-cols-2">
                <div>
                    <label for="password" class="text-sm font-semibold text-slate-800">New password</label>
                    <input
                        id="password"
                        type="password"
                        wire:model="password"
                        autocomplete="new-password"
                        class="mt-2 block w-full rounded-2xl border border-slate-200 bg-white px-4 py-3 text-sm text-slate-950 outline-none transition focus:border-teal-500 focus:ring-4 focus:ring-teal-100"
                    >
                    @error('password')
                        <p class="mt-2 text-sm font-medium text-rose-600">{{ $message }}</p>
                    @enderror
                </div>

                <div>
                    <label for="password_confirmation" class="text-sm font-semibold text-slate-800">Confirm new password</label>
                    <input
                        id="password_confirmation"
                        type="password"
                        wire:model="password_confirmation"
                        autocomplete="new-password"
                        class="mt-2 block w-full rounded-2xl border border-slate-200 bg-white px-4 py-3 text-sm text-slate-950 outline-none transition focus:border-teal-500 focus:ring-4 focus:ring-teal-100"
                    >
                </div>
            </div>

            <div class="flex flex-col gap-3 border-t border-slate-100 pt-5 sm:flex-row sm:items-center sm:justify-between">
                <p class="text-sm leading-6 text-slate-500">
                    Use a unique password and store it in a password manager. Do not keep the default credentials in production.
                </p>

                <button
                    type="submit"
                    class="inline-flex min-h-11 items-center justify-center rounded-full bg-slate-950 px-6 py-3 text-sm font-semibold text-white shadow-lg shadow-slate-900/15 transition hover:-translate-y-0.5 hover:bg-teal-700 focus:outline-none focus:ring-4 focus:ring-teal-100"
                >
                    Save password
                </button>
            </div>
        </form>
    </section>
</x-filament-panels::page>
