<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Daftar - Sistem Tracer Study STIAB Jinarakkhita</title>
    <!-- Tailwind CSS -->
    <script src="https://cdn.tailwindcss.com"></script>
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css">
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <style>
        body { font-family: 'Poppins', sans-serif; background-color: #f0f4f8; }
        .register-gradient { background: linear-gradient(135deg, #004080 0%, #0067b3 100%); }
        .input-focus:focus { border-color: #0067b3; box-shadow: 0 0 0 3px rgba(0, 103, 179, 0.15); }
        .btn-hover:hover { transform: translateY(-2px); }
        .card-shadow { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); }
    </style>
</head>
<body class="min-h-screen flex items-center justify-center p-4">
    <div class="container max-w-lg">
        <div class="bg-white rounded-xl card-shadow overflow-hidden">
            <div class="register-gradient p-6 text-white text-center">
                <div class="flex justify-center">
                    <!-- ganti dengan logo STIAB -->
                    <img src="{{ asset('images/logo-stiab.png') }}" alt="Logo STIAB Jinarakkhita" class="h-16 drop-shadow-lg">
                </div>
                <h1 class="text-xl font-bold mt-3">Sistem Tracer Study</h1>
                <p class="mt-1 text-blue-100 text-sm">STIAB Jinarakkhita Lampung</p>
            </div>

            <div class="p-6">
                <h2 class="text-xl font-semibold text-center text-gray-800 mb-6">Pendaftaran Alumni</h2>

                <form method="POST" action="{{ route('register') }}">
                    @csrf

                    <!-- Nama -->
                    <div class="mb-4">
                        <label for="name" class="block text-sm font-medium text-gray-700 mb-1">Nama Lengkap</label>
                        <div class="relative group">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
                                <i class="fas fa-user"></i>
                            </div>
                            <input id="name" type="text" name="name" value="{{ old('name') }}" required autofocus
                                class="pl-10 w-full h-10 border border-gray-300 rounded-md shadow-sm input-focus"
                                placeholder="Masukkan nama lengkap">
                        </div>
                    </div>

                    <!-- NPM -->
                    <div class="mb-4">
                        <label for="nim" class="block text-sm font-medium text-gray-700 mb-1">NPM</label>
                        <div class="relative group">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
                                <i class="fas fa-id-card"></i>
                            </div>
                            <input id="nim" type="text" name="nim" value="{{ old('nim') }}" required
                                class="pl-10 w-full h-10 border border-gray-300 rounded-md shadow-sm input-focus"
                                placeholder="Masukkan NPM Anda">
                        </div>
                    </div>

                    <!-- Email -->
                    <div class="mb-4">
                        <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
                        <div class="relative group">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
                                <i class="fas fa-envelope"></i>
                            </div>
                            <input id="email" type="email" name="email" value="{{ old('email') }}" required
                                class="pl-10 w-full h-10 border border-gray-300 rounded-md shadow-sm input-focus"
                                placeholder="email@stiabjinarakkhita.ac.id">
                        </div>
                    </div>

                    <!-- Password -->
                    <div class="mb-4">
                        <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
                        <div class="relative group">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
                                <i class="fas fa-lock"></i>
                            </div>
                            <input id="password" type="password" name="password" required
                                class="pl-10 w-full h-10 border border-gray-300 rounded-md shadow-sm input-focus"
                                placeholder="Minimal 8 karakter">
                            <div class="absolute inset-y-0 right-0 pr-3 flex items-center">
                                <button type="button" id="togglePassword" class="text-gray-400 hover:text-gray-600">
                                    <i class="fas fa-eye"></i>
                                </button>
                            </div>
                        </div>
                    </div>

                    <!-- Konfirmasi Password -->
                    <div class="mb-5">
                        <label for="password_confirmation" class="block text-sm font-medium text-gray-700 mb-1">Konfirmasi Password</label>
                        <div class="relative group">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
                                <i class="fas fa-lock"></i>
                            </div>
                            <input id="password_confirmation" type="password" name="password_confirmation" required
                                class="pl-10 w-full h-10 border border-gray-300 rounded-md shadow-sm input-focus"
                                placeholder="Ulangi password">
                            <div class="absolute inset-y-0 right-0 pr-3 flex items-center">
                                <button type="button" id="togglePasswordConfirm" class="text-gray-400 hover:text-gray-600">
                                    <i class="fas fa-eye"></i>
                                </button>
                            </div>
                        </div>
                    </div>

                    <div class="mb-5">
                        <div class="bg-blue-50 p-3 rounded-md border-l-4 border-blue-500">
                            <p class="text-sm text-blue-700">
                                <i class="fas fa-info-circle mr-2"></i> Setelah mendaftar, Anda perlu menghubungi administrator untuk melengkapi data alumni Anda.
                            </p>
                        </div>
                    </div>

                    <button type="submit" class="w-full py-2.5 bg-blue-600 text-white rounded-md shadow-md hover:bg-blue-700 btn-hover">
                        <i class="fas fa-user-plus mr-2"></i> Daftar
                    </button>
                </form>

                <div class="mt-6 text-center">
                    <p class="text-sm text-gray-600">Sudah memiliki akun? <a href="{{ route('login') }}" class="text-blue-600 hover:text-blue-800">Login</a></p>
                </div>
            </div>
        </div>

        <div class="mt-4 text-center">
            <p class="text-sm text-gray-500">&copy; {{ date('Y') }} Sistem Tracer Study - STIAB Jinarakkhita Lampung</p>
        </div>
    </div>

    <script>
        // Toggle password
        document.getElementById('togglePassword').addEventListener('click', function() {
            const input = document.getElementById('password');
            const icon = this.querySelector('i');
            input.type = input.type === 'password' ? 'text' : 'password';
            icon.classList.toggle('fa-eye-slash');
        });

        document.getElementById('togglePasswordConfirm').addEventListener('click', function() {
            const input = document.getElementById('password_confirmation');
            const icon = this.querySelector('i');
            input.type = input.type === 'password' ? 'text' : 'password';
            icon.classList.toggle('fa-eye-slash');
        });
    </script>
</body>
</html>
