@extends('layouts.auth')

@section('title', 'Lupa Password')

@section('content')
    <h2 class="auth-title">LUPA PASSWORD</h2>

    @if (session('status'))
        <div class="alert alert-success">
            {{ session('status') }}
        </div>
    @endif

    @if ($errors->any())
        <div class="alert alert-danger">
            @foreach ($errors->all() as $error)
                <div>{{ $error }}</div>
            @endforeach
        </div>
    @endif

    <p class="text-muted mb-4">
        Masukkan email Anda dan kami akan mengirimkan link untuk mereset password.
    </p>

    <form method="POST" action="{{ route('password.email') }}">
        @csrf

        <div class="mb-3">
            <input type="email" class="form-control @error('email') is-invalid @enderror" 
                placeholder="Masukkan E-mail Anda" name="email" value="{{ old('email') }}" required autofocus>
            @error('email')
                <span class="invalid-feedback" role="alert">
                    <strong>{{ $message }}</strong>
                </span>
            @enderror
        </div>

        <button type="submit" class="btn btn-auth">KIRIM LINK RESET</button>
    </form>

    <div class="auth-footer">
        Ingat password Anda? <a href="{{ route('login') }}">Login</a>
    </div>
@endsection 