@extends('layouts.app')

@section('title','Login')

@section('content')
<div class="container" style="max-width:920px">
	<div class="row align-items-center" style="min-height:72vh">
		<div class="col-md-6">
			<div class="card-modern p-4">
				<h3 class="mb-2">Selamat datang kembali</h3>
				<p class="text-muted-sm">Masuk ke akun Anda untuk mengelola atau membeli tiket.</p>

<form method="POST" action="{{ route('login.process') }}" class="mt-4">
					@csrf

					<div class="mb-3 floating-label">
						<input id="email" type="email" name="email" value="{{ old('email') }}" required autofocus placeholder=" " class="input-rounded form-control">
						<label for="email">Email</label>
						@error('email')<div class="text-danger mt-1">{{ $message }}</div>@enderror
					</div>

					<div class="mb-3 floating-label">
						<input id="password" type="password" name="password" required placeholder=" " class="input-rounded form-control">
						<label for="password">Password</label>
						@error('password')<div class="text-danger mt-1">{{ $message }}</div>@enderror
					</div>

					<div class="d-flex align-items-center justify-content-between mb-3">
						<div class="form-check">
							<input class="form-check-input" type="checkbox" name="remember" id="remember">
							<label class="form-check-label" for="remember">Remember me</label>
						</div>
						<div>
							@if(Route::has('password.request'))
								<a href="{{ route('password.request') }}" class="text-muted-sm">Lupa password?</a>
							@endif
						</div>
					</div>

					<div class="d-grid">
						<button class="btn btn-primary">Masuk</button>
					</div>

				</form>

				<div class="mt-3 text-center text-muted-sm">Belum punya akun? <a href="{{ route('register') }}">Daftar sekarang</a></div>

			</div>
		</div>

		<div class="col-md-6 d-none d-md-block">
			<div class="card-modern p-4 text-center" style="background:linear-gradient(180deg,#f7f9ff,#eef2ff);height:420px;display:flex;flex-direction:column;align-items:center;justify-content:center;">
				<img src="{{ asset('images/placeholder.svg') }}" alt="illustration" style="width:70%"> 
				<h4 class="mt-3">KonserTix</h4>
				<p class="text-muted-sm">Kelola event & tiket dengan mudah.</p>
			</div>
		</div>
	</div>
</div>

@endsection