@extends('layouts.guest')

@section('title', 'Sign In')

@section('content')
    <div class="card ams-auth__card">
        <div class="card-body p-4">

            <h1 class="h4 mb-1">Sign in</h1>
            <p class="text-secondary ams-text-xs mb-4">
                Use your Aumni Techworks account.
            </p>

            {{--
                Field-level errors render next to their input. A failed sign-in
                attaches its message to `email` rather than to a field-less
                summary, so it appears where the user is already looking.
            --}}
            <form method="POST" action="{{ route('login.store') }}" novalidate>
                @csrf

                <x-form.input
                    name="email"
                    label="Email Address"
                    type="email"
                    placeholder="you@aumnitechworks.com"
                    autocomplete="username"
                    autofocus
                    required />

                <x-form.input
                    name="password"
                    label="Password"
                    type="password"
                    placeholder="••••••••••"
                    autocomplete="current-password"
                    required />

                <div class="d-grid mt-4">
                    <button type="submit" class="btn btn-primary btn-lg">
                        Sign In
                        <i class="bi bi-arrow-right" aria-hidden="true"></i>
                    </button>
                </div>
            </form>

        </div>

        {{--
            There is no "forgot password" link by design: this application has no
            email-based reset. A master resets passwords directly, which removes
            a token table, a mail flow and an attack surface.
        --}}
        <div class="card-footer bg-body-tertiary text-secondary ams-text-xs d-flex align-items-start gap-2">
            <i class="bi bi-info-circle mt-1" aria-hidden="true"></i>
            <span>Forgotten your password? Contact a master user to have it reset.</span>
        </div>
    </div>
@endsection
