@extends('layouts.guest')

@section('content')
<div class="w-full max-w-md bg-white rounded-xl shadow-md p-8 mx-auto">
    <div class="bg-white p-2 rounded-md shadow-md mb-6 mx-auto w-32 flex justify-center">
        <img src="{{ asset('logo.png') }}" alt="FOMAG" class="h-20 object-contain" />
    </div>

    <h2 class="text-3xl font-extrabold text-gray-900 text-center mb-8 tracking-tight">
        Iniciar Sesión
    </h2>

    <form method="POST" action="{{ route('login') }}" class="space-y-6">
        @csrf

        <div>
            <label for="email" class="block mb-2 text-sm font-medium text-gray-700">Usuario</label>
            <input
                id="email"
                name="email"
                type="email"
                required
                autofocus
                placeholder="tuemail@ejemplo.com"
                class="w-full px-4 py-3 border border-gray-300 rounded-md focus:ring-2 focus:ring-indigo-500 focus:outline-none transition"
            />
            @error('email')
            <p class="mt-2 text-sm text-red-600">{{ $message }}</p>
            @enderror
        </div>

        <div>
            <label for="password" class="block mb-2 text-sm font-medium text-gray-700">Contraseña</label>
            <input
                id="password"
                name="password"
                type="password"
                required
                placeholder="••••••••"
                class="w-full px-4 py-3 border border-gray-300 rounded-md focus:ring-2 focus:ring-indigo-500 focus:outline-none transition"
            />
            @error('password')
            <p class="mt-2 text-sm text-red-600">{{ $message }}</p>
            @enderror
        </div>

        <button
            type="submit"
            class="w-full py-3 mt-6 bg-indigo-600 text-white font-semibold rounded-md shadow-md hover:bg-indigo-700 transition"
        >
            Ingresar
        </button>
    </form>
</div>
@endsection
