@extends('layout.auth')

@section('title', 'Atur Ulang Sandi')

@section('content')
<div class="auth-visual-side">
    <div class="visual-logo-box">
        <a href="/" style="text-decoration:none; display:flex; align-items:center; gap:15px;">
            <img src="{{ asset('assets/img/logo-pro.png') }}" alt="Logo" style="width:40px; height:40px; border-radius:10px;">
            <span style="color:white; font-weight:900; font-size:1.2rem; letter-spacing:-1px;">{{ $shop_settings['shop_name'] ?? 'PrintPro' }}</span>
        </a>
    </div>

    <div class="visual-content">
        <div class="visual-badge">Security Access</div>
        <h2>Buat Kata<br>Sandi Baru.</h2>
        <p>Pastikan kata sandi baru Anda kuat dan mudah diingat oleh Anda sendiri.</p>
    </div>

    <div class="visual-footer" style="position:relative; z-index:2; font-size:12px; color:rgba(255,255,255,0.4); font-weight:600;">
        &copy; {{ date('Y') }} {{ $shop_settings['shop_name'] ?? 'PrintPro' }} &bull; Enterprise Secure
    </div>
</div>

<div class="auth-form-side">
    <div class="form-header">
        <h1>Atur Ulang Kata Sandi</h1>
        <p>Silakan masukkan kata sandi baru untuk akun Anda</p>
    </div>

    <form action="{{ route('password.update') }}" method="POST">
        @csrf
        <input type="hidden" name="token" value="{{ $token }}">
        
        <div class="input-group-pro">
            <label class="label-pro">Alamat Email</label>
            <div class="input-box">
                <i class="lni lni-envelope"></i>
                <input type="email" name="email" class="control-pro @error('email') is-invalid @enderror" 
                    placeholder="nama@email.com" value="{{ request('email') }}" required readonly>
                @error('email')
                    <div class="invalid-feedback">{{ $message }}</div>
                @enderror
            </div>
        </div>

        <div class="input-group-pro">
            <label class="label-pro">Kata Sandi Baru</label>
            <div class="input-box">
                <i class="lni lni-lock-alt"></i>
                <input type="password" name="password" class="control-pro @error('password') is-invalid @enderror" 
                    placeholder="••••••••" required autofocus>
                @error('password')
                    <div class="invalid-feedback">{{ $message }}</div>
                @enderror
            </div>
        </div>

        <div class="input-group-pro">
            <label class="label-pro">Konfirmasi Kata Sandi Baru</label>
            <div class="input-box">
                <i class="lni lni-lock-alt"></i>
                <input type="password" name="password_confirmation" class="control-pro" 
                    placeholder="••••••••" required>
            </div>
        </div>

        <button type="submit" class="btn-pro" style="margin-top: 20px;">
            Atur Ulang Sekarang <i class="lni lni-checkmark-circle"></i>
        </button>

    </form>
</div>
@endsection
