@extends('layouts.app')

@section('title', 'Login Admin - Survey Kepuasan Masyarakat (SKM)')

@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-5">
            <div class="card card-gov shadow-sm">
                <div class="card-header text-center">
                    <h4 class="mb-0">
                        <i class="bi bi-shield-lock me-2"></i> 
                        Login Administrator
                    </h4>
                </div>
                <div class="card-body p-4">
                    <div class="alert alert-warning border-warning border-start border-4 mb-4">
                        <div class="d-flex">
                            <div class="flex-shrink-0">
                                <i class="bi bi-exclamation-triangle text-warning"></i>
                            </div>
                            <div class="flex-grow-1 ms-3">
                                <small class="d-block mb-0">
                                    <strong>Halaman ini hanya untuk administrator.</strong> 
                                    Jika Anda adalah masyarakat umum, silakan kembali ke halaman utama untuk mengisi survey.
                                </small>
                            </div>
                        </div>
                    </div>

                    <form method="POST" action="{{ route('login') }}">
                        @csrf
                        <div class="mb-3">
                            <label for="email" class="form-label fw-semibold">
                                <i class="bi bi-envelope me-1"></i> Alamat Email
                            </label>
                            <input type="email" class="form-control @error('email') is-invalid @enderror" 
                                   id="email" name="email" value="{{ old('email') }}" 
                                   required autofocus placeholder="admin@example.com">
                            @error('email')
                                <div class="invalid-feedback">{{ $message }}</div>
                            @enderror
                        </div>
                        <div class="mb-3">
                            <label for="password" class="form-label fw-semibold">
                                <i class="bi bi-key me-1"></i> Kata Sandi
                            </label>
                            <input type="password" class="form-control @error('password') is-invalid @enderror" 
                                   id="password" name="password" required placeholder="Masukkan kata sandi">
                            @error('password')
                                <div class="invalid-feedback">{{ $message }}</div>
                            @enderror
                        </div>
                        <div class="mb-4 form-check">
                            <input type="checkbox" class="form-check-input" id="remember" name="remember">
                            <label class="form-check-label" for="remember">Ingat saya di komputer ini</label>
                        </div>
                        <button type="submit" class="btn btn-gov-primary w-100 btn-lg">
                            <i class="bi bi-box-arrow-in-right me-2"></i> Masuk
                        </button>
                    </form>

                    <div class="text-center mt-4">
                        <a href="{{ route('public.index') }}" class="text-muted text-decoration-none">
                            <i class="bi bi-arrow-left me-1"></i> Kembali ke Halaman Utama
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

