<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login - Tempe Zhi</title>
    
    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
    
    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800;900&display=swap" rel="stylesheet">

    <style>
        body { font-family: 'Plus Jakarta Sans', sans-serif; background-color: #ffffff; }

        /* Card Login Flat Style */
        .brutal-card {
            background: white;
            border: 4px solid #064e3b;
            border-radius: 1.5rem;
        }

        /* Input Styling */
        .brutal-input {
            border: 2px solid #cbd5e1;
            transition: all 0.2s ease;
        }
        .brutal-input:focus {
            border-color: #064e3b;
        }

        /* Tombol Utama Login Flat */
        .btn-brutal-submit {
            background: #064e3b;
            color: white;
            border-radius: 1rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: all 0.2s ease;
        }
        .btn-brutal-submit:hover {
            background: #043427;
        }
    </style>
</head>
<body class="bg-slate-50/40">

<div class="min-h-screen flex flex-col justify-center py-16 px-4 sm:px-6 lg:px-8 relative overflow-hidden">
    {{-- Background Grid Accent --}}
    <div class="absolute inset-0 bg-[url('https://www.transparenttextures.com/patterns/cubes.png')] opacity-[0.03] pointer-events-none"></div>

    <div class="sm:mx-auto sm:w-full sm:max-w-md relative z-10">
        {{-- Logo Gambar Tempe Zhi --}}
        <div class="flex justify-center mb-6">
             <img src="{{ asset('images/tempezhi.png') }}" alt="Logo Tempe Zhi" class="h-12 w-auto object-contain">
        </div>
        
        <h2 class="text-center text-3xl font-[900] text-slate-900 uppercase tracking-tight leading-none">
            Masuk ke Sistem
        </h2>
        <p class="mt-3 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider">
            Atau 
            <a href="{{ route('register') }}" class="text-[#064e3b] hover:text-yellow-600 underline underline-offset-4 transition-colors font-bold">
                daftar mitra baru di sini
            </a>
        </p>
    </div>

    <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md relative z-10">
        <div class="brutal-card py-10 px-6 sm:px-10">
            
            @if (session('status'))
                <div class="mb-5 p-4 bg-green-50 border-2 border-[#064e3b] rounded-xl font-bold text-xs text-[#064e3b] uppercase tracking-wider">
                    {{ session('status') }}
                </div>
            @endif

            <form method="POST" action="{{ route('login') }}" class="space-y-5">
                @csrf

                {{-- Kolom Email --}}
                <div>
                    <label for="email" class="block text-[11px] font-black text-slate-700 uppercase tracking-widest mb-1.5">
                        Alamat Email
                    </label>
                    <div class="relative">
                        <input id="email" name="email" type="email" autocomplete="email" required 
                            class="brutal-input block w-full px-4 py-3.5 bg-white text-sm font-bold text-slate-800 rounded-xl outline-none focus:ring-0 placeholder:text-slate-300"
                            placeholder="nama@email.com" value="{{ old('email') }}">
                    </div>
                    @error('email')
                        <p class="mt-2 text-xs font-bold text-red-600 uppercase tracking-wide">⚠️ {{ $message }}</p>
                    @enderror
                </div>

                <div>
                    <label for="password" class="block text-[11px] font-black text-slate-700 uppercase tracking-widest mb-1.5">
                        Kata Sandi
                    </label>
                    <div class="relative">
                        <input id="password" name="password" type="password" autocomplete="current-password" required 
                            class="brutal-input block w-full px-4 py-3.5 bg-white text-sm font-bold text-slate-800 rounded-xl outline-none focus:ring-0 placeholder:text-slate-300"
                            placeholder="••••••••">
                    </div>
                    @error('password')
                        <p class="mt-2 text-xs font-bold text-red-600 uppercase tracking-wide">⚠️ {{ $message }}</p>
                    @enderror
                </div>

                <div class="flex items-center justify-between pt-1">
                    <div class="flex items-center">
                        <input id="remember_me" name="remember" type="checkbox" 
                            class="h-4 w-4 text-[#064e3b] focus:ring-0 border-2 border-[#064e3b] rounded cursor-pointer">
                        <label for="remember_me" class="ml-2 block text-xs font-bold text-slate-600 uppercase tracking-wider cursor-pointer select-none">
                            Ingat saya
                        </label>
                    </div>

                    @if (Route::has('password.request'))
                        <div class="text-xs font-bold">
                            <a href="{{ route('password.request') }}" class="text-slate-400 hover:text-[#064e3b] transition-colors uppercase tracking-wider">
                                Lupa password?
                            </a>
                        </div>
                    @endif
                </div>

                <div class="pt-2">
                    <button type="submit" class="w-full flex justify-center py-4 px-4 btn-brutal-submit text-xs tracking-widest transition-all cursor-pointer">
                        Masuk Sekarang
                    </button>
                </div>
            </form>

            <div class="mt-8">
                <div class="relative">
                    <div class="absolute inset-0 flex items-center">
                        <div class="w-full border-t-2 border-slate-100"></div>
                    </div>
                    <div class="relative flex justify-center text-xs">
                        <span class="px-3 bg-white text-slate-400 font-bold uppercase tracking-widest text-[9px]">
                            Akses Navigasi
                        </span>
                    </div>
                </div>

                <div class="mt-6 text-center">
                    <a href="/" class="text-[10px] font-black text-slate-400 hover:text-[#064e3b] transition-colors uppercase tracking-widest underline underline-offset-4">
                        Kembali ke Beranda
                    </a>
                </div>
            </div>

        </div>
    </div>
</div>

</body>
</html>