<!-- LOGIN ADMIN IZIN TAMU -->
@extends('izin_tamu.layout')

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

@section('content')

 <meta http-equiv="refresh" content="600"> 


<div class="bg-slate-800 p-8 rounded-3xl shadow-2xl w-96 mx-auto mt-20">

    <!-- 🖼️ Logo -->
    <img src="{{ asset('images/logo.png') }}" alt="Logo" class="mx-auto mb-4 w-24 h-24 object-contain">


    <h2 class="text-2xl font-bold text-center text-indigo-400 mb-6">Login Admin</h2>

    @if ($errors->any())
        <div class="bg-red-500 text-white p-3 rounded mb-4">
            {{ $errors->first() }}
        </div>
    @endif

    <form method="POST" action="{{ route('admin.login') }}">
        @csrf
        <div class="mb-4">
            <label class="block text-gray-300">Email</label>
            <input type="email" name="email" value="{{ old('email') }}" required
                   class="w-full px-4 py-2 rounded bg-slate-700 text-white border border-slate-600">
        </div>
        <div class="mb-4">
            <label class="block text-gray-300">Password</label>
            <input type="password" name="password" required
                   class="w-full px-4 py-2 rounded bg-slate-700 text-white border border-slate-600">
        </div>
        <button type="submit"
                class="w-full bg-indigo-600 hover:bg-indigo-700 text-white py-2 rounded transition">
            Login
        </button>
    </form>

    <!-- Tombol balik ke index -->
    <div class="text-center mt-6">
        <a href="{{ url('/izin_tamu') }}"
           class="px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition">
           ← Kembali ke Halaman Utama
        </a>
    </div>
</div>
@endsection
