@extends('layouts.auth')
@section('title', 'Login')
@section('content')
<div class="auth-card">
    <div class="auth-logo">
        <div class="logo">E</div>
        <h1>EduSmart SMS</h1>
        <p>School Management System</p>
    </div>

    @if($errors->any())
        <div class="alert alert-danger">{{ $errors->first() }}</div>
    @endif

    <form method="POST" action="{{ route('login.post') }}">
        @csrf
        <div class="form-group">
            <label>Email Address</label>
            <div class="input-wrap">
                <i class="bi bi-envelope"></i>
                <input type="email" name="email" value="{{ old('email') }}" placeholder="admin@school.ac.ke" required autofocus>
            </div>
        </div>
        <div class="form-group">
            <label>Password</label>
            <div class="input-wrap">
                <i class="bi bi-lock"></i>
                <input type="password" name="password" placeholder="••••••••" required minlength="8">
            </div>
        </div>
        <div class="form-check">
            <input type="checkbox" name="remember" id="remember">
            <label for="remember">Remember me</label>
        </div>
        <button type="submit" class="btn-login">Sign In</button>
    </form>
</div>
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
@endsection
