@extends('layouts.app')

@section('page-title', 'Login')

@section('content')
<style>
/* From Uiverse.io by SyedShahzaib7 */
.wrapper {
  width: 500px;
  background: rgb(2, 0, 36);
  background: linear-gradient(
    90deg,
    rgba(2, 0, 36, 1) 9%,
    rgba(9, 9, 121, 1) 68%,
    rgba(0, 91, 255, 1) 97%
  );
  backdrop-filter: blur(9px);
  color: #fff;
  border-radius: 40px;
  padding: 30px 40px;
  height: 500px;
  margin-top: 100px;
}
.form-login {
  font-size: 36px;
  text-align: center;
  margin-top: 50px;
}
.wrapper .input-box {
  position: relative;
  width: 100%;
  height: 50px;
  margin: 30px 0;
}
.input-box input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 40px;
  font-size: 16px;
  color: #fff;
  padding: 20px 45px 20px 20px;
}
.input-box input::placeholder {
  color: #fff;
}
.wrapper .remember-forgot {
  display: flex;
  justify-content: space-between;
  font-size: 14.5px;
  margin: -15px 0 15px;
}
.remember-forgot label input {
  accent-color: #fff;
  margin-right: 3px;
}
.remember-forgot a {
  color: #fff;
  text-decoration: none;
}
.remember-forgot a:hover {
  text-decoration: underline;
}
.wrapper .btn {
  width: 150px;
  height: 45px;
  background: #fff;
  border: none;
  outline: none;
  border-radius: 40px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 16px;
  color: #333;
  font-weight: 600;
  margin-left: 140px;
  margin-top: 10px;
}
.wrapper .register-link {
  font-size: 14.5px;
  text-align: center;
  margin: 20px 0 15px;
}
.register-link p a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.register-link p a:hover {
  text-decoration: underline;
}
</style>

<div class="d-flex justify-content-center align-items-center" style="min-height:60vh;">
    <div class="wrapper">
        @if($errors->any())
            <div class="alert alert-danger">{{ $errors->first() }}</div>
        @endif

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

            <h1 class="form-login">Login</h1>

            <div class="input-box">
                <input id="email" type="email" name="email" placeholder="Email" value="{{ old('email') }}" required autofocus>
            </div>

            <div class="input-box">
                <input id="password" type="password" name="password" placeholder="Password" required>
            </div>

            <div class="remember-forgot">
                <label>
                    <input type="checkbox" name="remember" id="remember"> Remember me
                </label>
                <a href="/">Back</a>  {{-- replaces "Forgot password?" with the original "Back" link --}}
            </div>

            <button type="submit" class="btn">Login</button>

            {{-- The original design had a register link here, but we omit it to keep only the "Back" link --}}
        </form>
    </div>
</div>
@endsection
