@extends('layouts.app')

@section('guest')
<div class="auth-shell d-flex align-items-center">
    <div class="container py-5">
        <div class="row justify-content-center">
            <div class="col-md-6 col-lg-5">
                <div class="card border-0 shadow">
                    <div class="card-body p-4 p-lg-5">
                        <h1 class="h3 mb-1">Sign in</h1>
                        <p class="text-muted mb-4">Access your microfinance workspace.</p>
                        @if(session('status'))
                            <div class="alert alert-success">{{ session('status') }}</div>
                        @endif
                        @if($errors->any())
                            <div class="alert alert-danger">{{ $errors->first() }}</div>
                        @endif
                        <form method="POST" action="{{ route('login') }}">
                            @csrf
                            <div class="mb-3">
                                <label class="form-label">Email</label>
                                <input name="email" type="email" value="{{ old('email') }}" class="form-control" required autofocus>
                            </div>
                            <div class="mb-3">
                                <label class="form-label">Password</label>
                                <input name="password" type="password" class="form-control" required>
                            </div>
                            <div class="d-flex justify-content-between align-items-center mb-4">
                                <label class="form-check">
                                    <input class="form-check-input" type="checkbox" name="remember">
                                    <span class="form-check-label">Remember me</span>
                                </label>
                                <a href="{{ route('password.request') }}">Forgot password?</a>
                            </div>
                            <button class="btn btn-primary w-100">Sign in</button>
                        </form>
                        <hr>
                        <div class="d-grid gap-2">
                            <a href="{{ route('tenant.register') }}" class="btn btn-outline-secondary">Register a company</a>
                            <a href="{{ route('merchants.register') }}" class="btn btn-outline-primary">Become a merchant</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
