@extends('layouts.auth')

@section('title', 'Super Admin Login')

@section('content')
    <p class="eyebrow">Secure Access</p>
    <h1>Control every remote Laravel property from one panel.</h1>
    <p class="muted">Email login, session-based access, rate limiting, device tracking, and two-factor readiness are already wired in.</p>

    @if ($emergencyLockEnabled)
        <div class="flash danger" style="margin: 1.25rem 0;">
            Emergency lock mode is enabled. Existing sessions can keep working, but new logins are paused.
        </div>
    @endif

    @if ($errors->any())
        <div class="flash danger" style="margin: 1.25rem 0;">
            {{ $errors->first() }}
        </div>
    @endif

    <form action="{{ route('login.store') }}" method="post" class="two-column" style="margin-top: 1.5rem;">
        @csrf

        <label style="grid-column: 1 / -1;">
            <span>Email Address</span>
            <input class="field" type="email" name="email" value="{{ old('email') }}" required autofocus>
        </label>

        <label style="grid-column: 1 / -1;">
            <span>Password</span>
            <input class="field" type="password" name="password" required>
        </label>

        <label style="grid-column: 1 / -1; display: flex; align-items: center; gap: 0.75rem;">
            <input type="checkbox" name="remember" value="1" @checked(old('remember'))>
            <span style="margin: 0;">Remember this device</span>
        </label>

        <div class="footer-actions" style="grid-column: 1 / -1;">
            <div class="muted">
                Configured super admin email:
                <code class="inline">arafatcontrol@gmail.com</code>
            </div>

            <button class="button primary" type="submit">Sign In</button>
        </div>
    </form>
@endsection
