@extends('layouts.auth')

@section('content')
<div class="container-fluid d-flex justify-content-center align-items-center" style="min-height: 100vh; background-color: #ffffff;">
    <div class="col-lg-4">
        <div class="card o-hidden border-0" style="
            border-radius: 15px;
            background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
            box-shadow:
                0 0 0 1px rgba(76, 175, 80, 0.1),
                0 4px 20px rgba(76, 175, 80, 0.25),
                0 8px 40px rgba(76, 175, 80, 0.1);
        ">
            <div class="card-body p-0">
                <!-- Card Body Content -->
                <div class="p-5" style="border-radius: 15px;">
                    <div class="text-center">
                        <!-- Logo -->
                        <img src="{{ asset('assets/img/logo.png') }}" alt="Logo" class="mb-4" style="max-width: 150px;">
                        <h1 class="h4 text-gray-900 mb-4" style="color: #2e7d32; font-weight: 600;">MELSOFT QUANTA</h1>
                    </div>

                <form method="POST" action="{{ route('login') }}" class="user">
                    @csrf
                    <div class="form-group mb-4">
                        <label for="email" style="color: #2e7d32;">Username</label>
                        <input type="email" class="form-control form-control-user" placeholder="Enter your username" name="email"
                            style="border-radius: 8px; padding: 12px; border: 1px solid #a5d6a7; background-color: #f1f8e9;">
                        @error('email')
                            <small class="text-danger">{{ $message }}</small>
                        @enderror
                    </div>

                    <div class="form-group mb-4">
                        <label for="password" style="color: #2e7d32;">Password</label>
                        <input type="password" class="form-control form-control-user" placeholder="Enter your password" name="password"
                            style="border-radius: 8px; padding: 12px; border: 1px solid #a5d6a7; background-color: #f1f8e9;">
                        @error('password')
                            <small class="text-danger">{{ $message }}</small>
                        @enderror
                    </div>

                     <div class="form-group mb-4">
                        <div class="custom-control custom-checkbox">
                            <input type="checkbox" class="custom-control-input" name="remember" id="customCheck">
                            <label class="custom-control-label" for="customCheck" style="color: #2e7d32;">Remember Me</label>
                        </div>
                    </div>

                    <button type="submit" class="btn btn-block" style="background-color: #4caf50; color: white;">
                        Login
                    </button>
                </form>

                    <hr style="border-color: #a5d6a7; margin: 15px 0;">
                    <div class="text-center" style="margin-bottom: 25px;">
                        <a class="small" href="{{ route('password.request') }}" style="color: #2e7d32;">Forgot Password?</a>
                    </div>

                    <div class="footer">
                        <table table style="width: 100%;">
                            <tr>
                                <td style="text-align: center;">&copy; {{ date('Y') }} Melsoft (Pvt) Ltd. All rights reserved.</td>
                            </tr>
                        </table>
                    </div>

                    <div class="auth-legal-links" style="text-align:center; margin-top:1.5rem; font-size:13px; font-weight:700; opacity:.85;">
                        By continuing, you agree to our
                        <a href="{{ route('terms') }}" target="_blank" style="color:#0d6efd; font-weight:700; text-decoration:underline;">Terms of Service</a>
                        and
                        <a href="{{ route('privacy') }}" target="_blank" style="color:#0d6efd; font-weight:700; text-decoration:underline;">Privacy Policy</a>.
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
@endsection
