<x-guest-layout>
    <div class="mb-10 text-center">
        <h2 class="text-3xl font-display font-black text-white tracking-tight italic uppercase">Registrasi Member</h2>
        <p class="mt-3 text-sm font-medium text-slate-400 leading-relaxed">Akses Jaringan Data Aset Leasing Nasional.</p>
    </div>

    <form method="POST" action="{{ route('register.member') }}" class="space-y-6">
        @csrf

        <!-- Name -->
        <div class="space-y-2">
            <x-input-label for="name" :value="__('Nama Lengkap Sesuai Identitas')" class="text-[10px] font-black uppercase tracking-widest text-slate-300 px-1" />
            <div class="relative group">
                <div class="absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none text-slate-500 group-focus-within:text-primary-500 transition-colors">
                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
                </div>
                <input id="name" type="text" name="name" value="{{ old('name') }}" required autofocus autocomplete="off" class="block w-full pl-11 pr-4 py-4 bg-white/5 border-white/10 rounded-2xl text-sm font-bold text-white focus:ring-primary-500 focus:border-primary-500 transition-all placeholder:text-slate-600" placeholder="Contoh: Budi Santoso" />
            </div>
            <x-input-error :messages="$errors->get('name')" class="mt-2 text-xs font-bold uppercase" />
        </div>

        <!-- Email -->
        <div class="space-y-2">
            <x-input-label for="email" :value="__('Alamat Email Aktif')" class="text-[10px] font-black uppercase tracking-widest text-slate-300 px-1" />
            <div class="relative group">
                <div class="absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none text-slate-500 group-focus-within:text-primary-500 transition-colors">
                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"></path></svg>
                </div>
                <input id="email" type="email" name="email" value="{{ old('email') }}" required autocomplete="off" class="block w-full pl-11 pr-4 py-4 bg-white/5 border-white/10 rounded-2xl text-sm font-bold text-white focus:ring-primary-500 focus:border-primary-500 transition-all placeholder:text-slate-600" placeholder="nama@email.com" />
            </div>
            <x-input-error :messages="$errors->get('email')" class="mt-2 text-xs font-bold uppercase" />
        </div>

        <!-- Phone -->
        <div class="space-y-2">
            <x-input-label for="phone" :value="__('Nomor WhatsApp (Aktif)')" class="text-[10px] font-black uppercase tracking-widest text-slate-300 px-1" />
            <div class="relative group">
                <div class="absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none text-slate-500 group-focus-within:text-primary-500 transition-colors">
                    <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.948V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"></path></svg>
                </div>
                <input id="phone" type="text" name="phone" value="{{ old('phone') }}" autocomplete="off" class="block w-full pl-11 pr-4 py-4 bg-white/5 border-white/10 rounded-2xl text-sm font-bold text-white focus:ring-primary-500 focus:border-primary-500 transition-all placeholder:text-slate-600" placeholder="0812xxxx" />
            </div>
            <x-input-error :messages="$errors->get('phone')" class="mt-2 text-xs font-bold uppercase" />
        </div>

        <!-- Passwords -->
        <div class="grid grid-cols-1 sm:grid-cols-2 gap-6">
            <div class="space-y-2">
                <x-input-label for="password" :value="__('Kata Sandi')" class="text-[10px] font-black uppercase tracking-widest text-slate-300 px-1" />
                <input id="password" type="password" name="password" required class="block w-full px-4 py-4 bg-white/5 border-white/10 rounded-2xl text-sm font-bold text-white focus:ring-primary-500 focus:border-primary-500 transition-all placeholder:text-slate-600" placeholder="••••••••" />
            </div>
            <div class="space-y-2">
                <x-input-label for="password_confirmation" :value="__('Konfirmasi')" class="text-[10px] font-black uppercase tracking-widest text-slate-300 px-1" />
                <input id="password_confirmation" type="password" name="password_confirmation" required class="block w-full px-4 py-4 bg-white/5 border-white/10 rounded-2xl text-sm font-bold text-white focus:ring-primary-500 focus:border-primary-500 transition-all placeholder:text-slate-600" placeholder="••••••••" />
            </div>
            <x-input-error :messages="$errors->get('password')" class="col-span-full mt-2 text-xs font-bold uppercase" />
        </div>

        <div class="pt-4">
            <button type="submit" class="w-full btn-primary !py-5 text-[11px] shadow-2xl shadow-primary-200">
                Buat Akun Member Sekarang
            </button>
        </div>

        <div class="text-center pt-10 border-t border-brand-50 space-y-4">
            <p class="text-[10px] font-black text-brand-300 uppercase tracking-[0.2em]">Sudah memiliki akun?</p>
            <a href="{{ route('login') }}" class="block text-[10px] font-black uppercase tracking-widest text-primary-600 hover:tracking-[0.2em] transition-all italic">Masuk Kembali</a>
            
            <div class="pt-4">
                <p class="text-[9px] font-black text-brand-200 uppercase tracking-[0.3em] mb-2 italic">Bukan Member?</p>
                <a href="{{ route('register.leasing') }}" class="text-[9px] font-black uppercase tracking-widest text-brand-400 hover:text-primary-500 transition-all italic underline underline-offset-4 decoration-brand-100">Daftar Sebagai Leasing →</a>
            </div>
        </div>
    </form>
</x-guest-layout>
