@extends('layouts.site')

@section('title', 'Bayi / Yönetici Girişi')

@section('content')
<div class="max-w-md mx-auto px-4 py-16">
    <h1 class="text-2xl font-bold mb-6">Giriş Yap</h1>

    @if ($errors->any())
        <div class="mb-4 rounded bg-red-100 text-red-800 px-4 py-2 text-sm">
            @foreach ($errors->all() as $error)
                <p>{{ $error }}</p>
            @endforeach
        </div>
    @endif

    <form method="POST" action="{{ route('login.store') }}" class="space-y-4">
        @csrf
        <div>
            <label class="block text-sm font-medium mb-1">E-posta</label>
            <input type="email" name="email" required class="w-full border rounded px-3 py-2" value="{{ old('email') }}">
        </div>
        <div>
            <label class="block text-sm font-medium mb-1">Şifre</label>
            <input type="password" name="password" required class="w-full border rounded px-3 py-2">
        </div>
        <label class="flex items-center gap-2 text-sm">
            <input type="checkbox" name="remember"> Beni hatırla
        </label>
        <button class="w-full bg-blue-600 text-white rounded py-2 font-medium hover:bg-blue-700">Giriş Yap</button>
    </form>
</div>
@endsection
