@extends('layout')
@section('title', 'Log in')
@section('content')
<div class="auth-wrapper">
    <div class="auth-card">
        <h1>AI Vision Attendance</h1>
        <p class="muted">Sign in to continue</p>

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

        <form method="POST" action="{{ route('login.attempt') }}">
            @csrf
            <label for="email">Email</label>
            <input type="email" id="email" name="email" value="{{ old('email') }}" required autofocus>

            <label for="password">Password</label>
            <input type="password" id="password" name="password" required>

            <button type="submit" class="btn btn-primary btn-block">Log in</button>
        </form>
    </div>
</div>
@endsection
