<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Access Code Required - Asama</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
    <style>
        body { font-family: 'Inter', sans-serif; }
        .code-input { letter-spacing: 0.8em; text-align: center; }
    </style>
</head>
<body class="bg-gray-100 min-h-screen flex flex-col items-center justify-center p-4">
    
    <!-- Logo & Title -->
    <div class="text-center mb-6">
        <img src="https://apps.asama.co.id/images/logo.png" alt="Logo Asama" class="w-24 mx-auto mb-4">
        <h1 class="text-2xl font-bold text-emerald-600 tracking-tight uppercase">Aplikasi Asama</h1>
        <p class="text-gray-400 text-sm font-semibold tracking-widest">WELCOME BACK</p>
    </div>

    <!-- Lock Card -->
    <div class="bg-white rounded-2xl shadow-xl p-8 w-full max-w-md border border-gray-100">
        <h2 class="text-xl font-bold text-gray-800 text-center mb-1">Access Code Required</h2>
        <p class="text-gray-500 text-sm text-center mb-8">
            Please enter the 8 digit system code for <br>
            <span class="font-bold text-emerald-600"><?php echo e(strtoupper(str_replace('_', ' ', $app))); ?></span>
        </p>

        <!-- Pastikan Route Point ke Controller Verifikasi -->
        <form method="POST" action="<?php echo e(route('app.gate.verify')); ?>">
            <?php echo csrf_field(); ?>
            <!-- Input Hidden untuk tahu aplikasi mana yang sedang diakses -->
            <input type="hidden" name="app" value="<?php echo e($app); ?>">

            <div class="mb-6">
                <input type="password" name="code" maxlength="8" required autofocus
                    class="code-input w-full border-2 <?php echo e(session('error') ? 'border-red-500' : 'border-emerald-500'); ?> rounded-xl py-4 text-2xl focus:outline-none focus:ring-4 focus:ring-emerald-100 transition-all"
                    placeholder="********">
                
                <?php if(session('error')): ?>
                    <p class="text-red-500 text-xs mt-2 text-center font-semibold"><?php echo e(session('error')); ?></p>
                <?php endif; ?>
            </div>

            <button type="submit" 
                class="w-full bg-emerald-600 hover:bg-emerald-700 text-white font-bold py-4 rounded-xl transition-all shadow-lg active:scale-95">
                UNLOCK SYSTEM
            </button>
        </form>
    </div>

    <p class="mt-10 text-gray-400 text-[10px] tracking-[0.2em] font-medium uppercase text-center">
        IT Asama Indonesia MFG &copy; <?php echo e(date('Y')); ?> <br>
        <a href="/" class="hover:text-emerald-600 transition-colors mt-2 inline-block text-[9px]">← BACK TO HOME</a>
    </p>

</body>
</html><?php /**PATH D:\Hafiiz\Project\Code Magang\Finall\Apps Asama Layer Security\booking-ruangan-tamu\resources\views/auth/app_gate.blade.php ENDPATH**/ ?>