@extends('layouts.app')

@section('page_title', 'Login')

@section('content')
<section class="section">
    <div class="container" style="max-width: 400px; margin: 0 auto;">
        <h1>Login</h1>
        <p>Please log in to manage the gallery and blog.</p>

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

        <form action="{{ route('login') }}" method="POST" class="form-card">
            @csrf
            <div class="form-group">
                <label>Email Address</label>
                <input type="email" name="email" value="{{ old('email') }}" required autofocus>
            </div>

            <div class="form-group">
                <label>Password</label>
                <input type="password" name="password" required>
            </div>

            <button type="submit" class="button button-primary" style="width: 100%; margin-top: 20px;">Login</button>
        </form>
    </div>
</section>
@endsection
