<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Masuk Aplikasi | PRADIPA JATENG</title>
    <!-- Tailwind CSS CDN -->
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
        body { font-family: 'Plus Jakarta Sans', sans-serif; }
    </style>
</head>
<body class="bg-slate-50 text-slate-600 min-h-screen flex items-center justify-center p-4">

    <div class="bg-white w-full max-w-4xl rounded-2xl shadow-xl border border-slate-200 overflow-hidden grid grid-cols-1 md:grid-cols-12 min-h-[520px]">
        
        <!-- SEKTOR KIRI: Ilustrasi Sawah Jawa Tengah (5/12) -->
        <div class="md:col-span-5 relative bg-emerald-950 text-white p-8 flex flex-col justify-between hidden md:flex">
            <!-- Aksen Gambar Sawah Melayang -->
            <div class="absolute inset-0 bg-cover bg-center opacity-30" style="background-image: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&q=80&w=600');"></div>
            <div class="absolute inset-0 bg-gradient-to-b from-emerald-950/80 to-emerald-950 z-10"></div>
            
            <div class="z-20 flex items-center gap-3">
                <div class="bg-emerald-600 p-1.5 rounded-lg text-white">
                    <svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
                </div>
                <span class="font-extrabold tracking-wider text-sm">PRADIPA CORE</span>
            </div>

            <div class="z-20 space-y-3">
                <h3 class="text-xl font-black leading-snug">Sistem Usulan Bantuan Berjenjang Jawa Tengah</h3>
                <p class="text-[11px] text-emerald-300 leading-relaxed">Portal pemetaan geospasial, verifikasi berkas juknis jatah kuota benih, serta pupuk sarana produksi pertanian se-Jawa Tengah.</p>
            </div>

            <div class="z-20 text-[10px] text-emerald-500 font-bold tracking-wider font-mono">
                &copy; 2026 DISTANBUN PROV JATENG
            </div>
        </div>

        <!-- SEKTOR KANAN: Formulir Login Utama (7/12) -->
        <div class="md:col-span-7 p-8 md:p-12 flex flex-col justify-center gap-6">
            
            <!-- Judul Formulir -->
            <div>
                <h2 class="text-2xl font-bold text-slate-800">Masuk Portal Pradipa</h2>
                <p class="text-xs text-slate-400 mt-1 font-medium">Gunakan kredensial akun dinas pertanian terdaftar Anda untuk masuk.</p>
            </div>

            <!-- Pesan Sukses Logout / Reset password -->
            <?php if(session('success')): ?>
                <div class="bg-emerald-50 border border-emerald-200 text-emerald-800 p-3.5 rounded-xl text-xs flex items-center gap-2 font-semibold">
                    <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 text-emerald-600 shrink-0" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
                    <span><?php echo e(session('success')); ?></span>
                </div>
            <?php endif; ?>

            <!-- Tampilan Validasi Error -->
            <?php if($errors->any()): ?>
                <div class="bg-rose-50 border border-rose-200 text-rose-800 p-3.5 rounded-xl text-xs flex items-start gap-2.5 font-semibold">
                    <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 text-rose-600 shrink-0 mt-0.5" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>
                    <span><?php echo e($errors->first()); ?></span>
                </div>
            <?php endif; ?>

            <!-- Form Isian -->
            <form action="<?php echo e(route('login.proses')); ?>" method="POST" class="flex flex-col gap-4 font-sans text-xs">
                <?php echo csrf_field(); ?>
                
                <!-- Email -->
                <div class="flex flex-col gap-1.5">
                    <label class="font-bold text-slate-500 uppercase tracking-wider">Alamat Email Resmi Dinas:</label>
                    <div class="relative">
                        <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-slate-400">
                            <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><polyline points="22,6 12,13 2,6"/></svg>
                        </span>
                        <input type="email" name="email" value="<?php echo e(old('email')); ?>" placeholder="Contoh: admin.prov@jateng.go.id" required class="w-full pl-9 pr-4 py-2.5 bg-slate-50 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500 font-semibold text-slate-800 text-xs">
                    </div>
                </div>

                <!-- Password -->
                <div class="flex flex-col gap-1.5">
                    <label class="font-bold text-slate-500 uppercase tracking-wider">Kata Sandi:</label>
                    <div class="relative">
                        <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-slate-400">
                            <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
                        </span>
                        <input type="password" name="password" placeholder="Kata sandi akun..." required class="w-full pl-9 pr-4 py-2.5 bg-slate-50 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500 font-semibold text-slate-800 text-xs">
                    </div>
                </div>

                <!-- Ingat Saya & Lupa password -->
                <div class="flex justify-between items-center mt-1">
                    <label class="flex items-center gap-2 cursor-pointer font-bold text-slate-500">
                        <input type="checkbox" name="remember" class="w-4 h-4 text-emerald-600 rounded focus:ring-emerald-500 border-slate-300">
                        <span>Ingat Sesi Saya</span>
                    </label>
                    <a href="#" onclick="alert('Lupa Sandi:\\n\\nSilakan hubungi Super Admin Dinas Provinsi Jawa Tengah untuk mereset kata sandi Anda menjadi default.')" class="text-emerald-700 hover:text-emerald-800 font-bold hover:underline">Lupa Sandi?</a>
                </div>

                <!-- Tombol Submit -->
                <button type="submit" class="w-full py-3 bg-emerald-600 hover:bg-emerald-700 text-white rounded-lg font-bold shadow-md shadow-emerald-600/10 transition-all flex items-center justify-center gap-1.5 mt-2">
                    <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg>
                    Masuk Portal Dinas
                </button>
            </form>
            
            <!-- Panduan Cepat Uji Coba Sandbox -->
            <div class="border-t border-slate-100 pt-4 text-[10px] text-slate-400 font-medium leading-relaxed font-sans">
                <span class="font-bold text-slate-500 block uppercase tracking-wider mb-1">Panduan Akun Demo Sandbox:</span>
                • Admin Provinsi: <code class="bg-slate-100 px-1 py-0.5 rounded font-bold text-slate-600">admin.prov@jateng.go.id</code> (Sandi: <code class="bg-slate-100 px-1 py-0.5 rounded font-bold text-slate-600">password</code>)<br>
                • Operator Kabupaten: <code class="bg-slate-100 px-1 py-0.5 rounded font-bold text-slate-600">dinpertan.demak@demakkab.go.id</code> (Sandi: <code class="bg-slate-100 px-1 py-0.5 rounded font-bold text-slate-600">password</code>)
            </div>
        </div>

    </div>

</body>
</html><?php /**PATH D:\laragon\www\pradipa\resources\views/auth/login.blade.php ENDPATH**/ ?>