<section class="space-y-8">
    <header class="space-y-2 border-l-2 border-indigo-500/30 pl-4">
        <h2 class="text-[11px] font-black text-white uppercase tracking-[0.3em] italic">
            {{ __('Keamanan Kata Sandi') }}
        </h2>
        <p class="text-[9px] font-bold text-slate-500 uppercase tracking-widest italic leading-relaxed">
            {{ __("Gunakan kata sandi yang panjang dan acak untuk menjaga keamanan akun.") }}
        </p>
    </header>

    <form method="post" action="{{ route('password.update') }}" class="space-y-8">
        @csrf
        @method('put')

        <div class="space-y-3">
            <x-input-label for="update_password_current_password" :value="__('Kata Sandi Saat Ini')" />
            <x-text-input id="update_password_current_password" name="current_password" type="password" class="block w-full" autocomplete="current-password" />
            <x-input-error :messages="$errors->updatePassword->get('current_password')" />
        </div>

        <div class="space-y-3">
            <x-input-label for="update_password_password" :value="__('Kata Sandi Baru')" />
            <x-text-input id="update_password_password" name="password" type="password" class="block w-full" autocomplete="new-password" />
            <x-input-error :messages="$errors->updatePassword->get('password')" />
        </div>

        <div class="space-y-3">
            <x-input-label for="update_password_password_confirmation" :value="__('Konfirmasi Kata Sandi')" />
            <x-text-input id="update_password_password_confirmation" name="password_confirmation" type="password" class="block w-full" autocomplete="new-password" />
            <x-input-error :messages="$errors->updatePassword->get('password_confirmation')" />
        </div>

        <div class="flex items-center gap-6 pt-4 border-t border-white/5">
            <x-primary-button>{{ __('Perbarui Sandi →') }}</x-primary-button>

            @if (session('status') === 'password-updated')
                <p
                    x-data="{ show: true }"
                    x-show="show"
                    x-transition
                    x-init="setTimeout(() => show = false, 2000)"
                    class="text-[10px] font-black text-emerald-400 uppercase tracking-widest italic animate-pulse"
                >{{ __('Berhasil Diperbarui.') }}</p>
            @endif
        </div>
    </form>
</section>
