@extends('layouts.app')

@section('content')
<div class="auth-login-page">
    <div class="auth-login-card">
        <div class="row g-0">
            <div class="col-lg-6 d-none d-lg-block">
                <div class="auth-login-left">
                    <div class="auth-login-left-content">
                        <h2 class="fw-light mb-1">Sistema,</h2>
                        <h2 class="fw-light mb-0">de gestion</h2>
                    </div>
                </div>
            </div>

            <div class="col-lg-6">
                <div class="auth-login-right">
                    <h1 class="h2 mb-2">{{ __('Crear cuenta') }}</h1>
                    <p class="text-muted mb-4">{{ __('Regístrate para continuar') }}</p>

                    <form method="POST" action="{{ route('register') }}">
                        @csrf

                        <div class="mb-3">
                            <label for="name" class="form-label">{{ __('Nombre') }}</label>
                            <input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus placeholder="Tu nombre">

                            @error('name')
                                <span class="invalid-feedback d-block" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>

                        <div class="mb-3">
                            <label for="email" class="form-label">{{ __('Correo electrónico') }}</label>
                            <input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" placeholder="tu@email.com">

                            @error('email')
                                <span class="invalid-feedback d-block" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>

                        <div class="mb-3">
                            <label for="password" class="form-label">{{ __('Contraseña') }}</label>
                            <input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password" placeholder="********">

                            @error('password')
                                <span class="invalid-feedback d-block" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                            @enderror
                        </div>

                        <div class="mb-4">
                            <label for="password-confirm" class="form-label">{{ __('Confirmar contraseña') }}</label>
                            <input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password" placeholder="********">
                        </div>

                        <button type="submit" class="btn btn-primary w-100 auth-login-submit mb-3">
                            {{ __('Crear cuenta') }}
                        </button>

                        @if (Route::has('login'))
                            <p class="mb-0 text-muted small text-center">
                                {{ __('¿Ya tienes una cuenta?') }}
                                <a href="{{ route('login') }}">{{ __('Inicia sesión') }}</a>
                            </p>
                        @endif
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
