<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login - KITA AKADEMIK ADIA (LLDIKTI III)</title>
    <!-- Google Fonts & Bootstrap -->
    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- FontAwesome Icons -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            color: #f8fafc;
            margin: 0;
            overflow-x: hidden;
        }

        .header-bar {
            background: rgba(15, 23, 42, 0.4);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(255,255,255,0.06);
            padding: 1rem 2rem;
        }

        .main-container {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 3rem 1.5rem;
        }

        .split-card {
            background: rgba(30, 41, 59, 0.6);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 24px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
            max-width: 1000px;
            width: 100%;
            overflow: hidden;
        }

        .form-control, .form-select {
            background: rgba(15, 23, 42, 0.6) !important;
            border: 1px solid rgba(255, 255, 255, 0.1) !important;
            border-radius: 12px !important;
            color: #fff !important;
            padding: 0.75rem 1rem 0.75rem 2.5rem !important;
            transition: all 0.2s;
        }

        .form-control::placeholder {
            color: rgba(255, 255, 255, 0.5) !important;
        }

        .form-select:invalid {
            color: rgba(255, 255, 255, 0.5) !important;
        }

        .position-relative > i.text-muted {
            color: rgba(255, 255, 255, 0.5) !important;
        }

        .form-control:focus, .form-select:focus {
            background: rgba(15, 23, 42, 0.85) !important;
            border-color: #6366f1 !important;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
        }

        .form-select option {
            background: #1e293b;
            color: #fff;
        }

        .btn-primary {
            background: #4f46e5;
            border: none;
            border-radius: 12px;
            padding: 0.75rem 1.5rem;
            font-weight: 600;
            transition: all 0.2s;
        }

        .btn-primary:hover {
            background: #4338ca;
            transform: translateY(-1px);
        }

        .quick-role-btn {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.07);
            color: #cbd5e1;
            border-radius: 10px;
            padding: 0.5rem 0.8rem;
            font-size: 0.8rem;
            font-weight: 500;
            transition: all 0.2s;
            text-align: left;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .quick-role-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            border-color: #6366f1;
        }

        .quick-role-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }

        @media (max-width: 768px) {
            .quick-role-grid {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>

    <?php if($errors->any()): ?>
        <div id="floating-alert" class="alert alert-danger border-0 p-3 shadow-lg text-center" style="position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; width: 90%; max-width: 500px; background: #ef4444; color: #fff; border-radius: 12px; font-weight: 600;">
            <i class="fa-solid fa-triangle-exclamation me-2"></i>
            <?php echo e($errors->first()); ?>

        </div>
    <?php endif; ?>

    <?php if(session('success')): ?>
        <div id="floating-success-alert" class="alert alert-success border-0 p-3 shadow-lg text-center" style="position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; width: 90%; max-width: 500px; background: #10b981; color: #fff; border-radius: 12px; font-weight: 600;">
            <i class="fa-solid fa-check-circle me-2"></i>
            <?php echo e(session('success')); ?>

        </div>
    <?php endif; ?>

    <!-- Top Header Bar -->
    <header class="header-bar">
        <div class="container d-flex justify-content-between align-items-center">
            <div class="d-flex align-items-center gap-3">
                <div class="bg-primary text-white rounded-3 p-2 d-flex align-items-center justify-content-center" style="width: 40px; height: 40px; font-size: 1.25rem;">
                    <i class="fa-solid fa-graduation-cap"></i>
                </div>
                <div>
                    <h5 class="fw-bold mb-0 text-white" style="letter-spacing: 0.5px; font-size: 1.1rem;">KITA AKADEMIK</h5>
                    <small class="text-white-50 d-block" style="font-size: 0.7rem;">Manajemen Konseling & Bimbingan Integritas Akademik</small>
                </div>
            </div>
            <div>
                <button onclick="switchTab('login')" class="btn btn-outline-light btn-sm rounded-pill px-3 fw-bold">
                    <i class="fa-regular fa-user me-1"></i> Masuk
                </button>
            </div>
        </div>
    </header>

    <!-- Main Content Container -->
    <main class="main-container">
        <div class="container d-flex flex-column align-items-center">
            
            <div class="split-card">
                <div class="row g-0">
                    <!-- Left Column (Visual & Brand Details) -->
                    <div class="col-md-6 d-flex flex-column justify-content-center p-5 text-center border-end border-secondary-subtle position-relative" style="background: url('<?php echo e(asset('images/fotogambarlldikti3.jpg')); ?>') center center / cover no-repeat;">
                        <!-- Very Light Overlay (Makes the image extremely visible) -->
                        <div style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.1); z-index: 1;"></div>
                        
                        <div class="my-auto py-5 px-4 position-relative rounded-4 mx-2" style="z-index: 2; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);">
                            <div class="bg-primary-subtle text-primary rounded-circle d-inline-flex align-items-center justify-content-center mb-4" style="width: 100px; height: 100px; font-size: 3rem; box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);">
                                <i class="fa-solid fa-book-open-reader"></i>
                            </div>
                            <h2 class="fw-extrabold text-white mb-2" style="font-size: 2.2rem; letter-spacing: -0.5px; text-shadow: 0 2px 10px rgba(0,0,0,0.6);">KITA AKADEMIK</h2>
                            <h6 class="text-warning fw-bold mb-4" style="font-size: 0.95rem; letter-spacing: 0.5px; text-shadow: 0 2px 8px rgba(0,0,0,0.6);">Manajemen Konseling & Bimbingan Integritas Akademik</h6>
                            <p class="mx-auto small mb-4" style="max-width: 380px; line-height: 1.6; color: rgba(255,255,255,0.85); text-shadow: 0 1px 4px rgba(0,0,0,0.5);">
                                Sistem informasi untuk pengelolaan konseling dan bimbingan integritas akademik secara terstruktur, efektif, dan terintegrasi di lingkungan ADIA (LLDIKTI III).
                            </p>
                            
                            <!-- Mockup items bottom representation -->
                            <div class="d-flex justify-content-center gap-4 text-white-50 opacity-75 mt-4 fs-3">
                                <i class="fa-solid fa-seedling text-success" style="filter: drop-shadow(0 0 8px rgba(25, 135, 84, 0.5));"></i>
                                <i class="fa-solid fa-book"></i>
                                <i class="fa-solid fa-laptop"></i>
                            </div>
                        </div>
                    </div>

                    <!-- Right Column (Forms) -->
                    <div class="col-md-6 p-5 d-flex flex-column justify-content-center">
                        
                        <!-- Login Section -->
                        <div id="login-section">
                            <h3 class="fw-bold text-white mb-1">Masuk</h3>
                            <p class="text-white-50 small mb-4">Silakan masuk untuk melanjutkan</p>
                            
                            <form method="POST" action="<?php echo e(route('login.perform')); ?>" id="login-form" novalidate>
                                <?php echo csrf_field(); ?>
                                <div class="mb-3">
                                    <label for="email" class="form-label text-white small fw-bold" style="letter-spacing: 0.5px;">E-mail</label>
                                    <div class="position-relative">
                                        <input type="email" class="form-control ps-5" id="email" name="email" placeholder="Masukkan e-mail" required value="<?php echo e(old('email', session('email'))); ?>">
                                        <i class="fa-regular fa-envelope position-absolute text-muted" style="left: 12px; top: 15px;"></i>
                                    </div>
                                </div>

                                <div class="mb-4">
                                    <div class="d-flex justify-content-between align-items-center mb-1">
                                        <label for="password" class="form-label text-white small fw-bold mb-0" style="letter-spacing: 0.5px;">Password</label>
                                        <a href="#" class="text-white-50 text-decoration-none small" style="font-size: 0.75rem;">Lupa password?</a>
                                    </div>
                                    <div class="position-relative">
                                        <input type="password" class="form-control ps-5" id="password" name="password" placeholder="Masukkan password" required value="<?php echo e(session('password')); ?>">
                                        <i class="fa-solid fa-lock position-absolute text-muted" style="left: 12px; top: 15px;"></i>
                                    </div>
                                </div>

                                <button type="submit" class="btn btn-primary w-100 py-2.5 mb-3 fw-bold">
                                    <i class="fa-solid fa-right-to-bracket me-2"></i> Masuk
                                </button>
                                
                                <div class="text-center text-white-50 small mb-3">atau</div>
                                
                                <button type="button" class="btn btn-outline-light w-100 py-2.5 fw-bold" onclick="switchTab('register')">
                                    <i class="fa-solid fa-user-plus me-2"></i> Buat akun
                                </button>
                            </form>
                        </div>

                        <!-- Register Section -->
                        <div id="register-section" class="d-none">
                            <h3 class="fw-bold text-white mb-1">Daftar Akun</h3>
                            <p class="text-white-50 small mb-4">Buat akun baru (Mahasiswa / Dosen / Satgas PTS)</p>
                            
                            <form method="POST" action="<?php echo e(route('register.perform')); ?>" id="register-form">
                                <?php echo csrf_field(); ?>
                                <div class="overflow-y-auto pe-1" style="max-height: 320px;">
                                    <div class="mb-3">
                                        <label class="form-label text-white small fw-bold" style="letter-spacing: 0.5px;">PERAN (ROLE)</label>
                                        <div class="position-relative">
                                            <select class="form-select ps-5" name="role" required>
                                                <option value="" disabled selected>Pilih Peran Akun...</option>
                                                <option value="mahasiswa">Mahasiswa</option>
                                                <option value="dosen">Dosen</option>
                                                <option value="satgas_kampus">Satgas PTS</option>
                                            </select>
                                            <i class="fa-solid fa-user-tag position-absolute text-muted" style="left: 12px; top: 15px;"></i>
                                        </div>
                                    </div>

                                    <div class="mb-3">
                                        <label class="form-label text-white small fw-bold" style="letter-spacing: 0.5px;">NAMA LENGKAP</label>
                                        <div class="position-relative">
                                            <input type="text" class="form-control ps-5" name="name" placeholder="Nama lengkap Anda" required>
                                            <i class="fa-regular fa-user position-absolute text-muted" style="left: 12px; top: 15px;"></i>
                                        </div>
                                    </div>

                                    <div class="mb-3">
                                        <label class="form-label text-white small fw-bold" style="letter-spacing: 0.5px;">NIM / NIDN</label>
                                        <div class="position-relative">
                                            <input type="text" class="form-control ps-5" name="nim_nidn" placeholder="Nomor Induk Mahasiswa/Dosen" required>
                                            <i class="fa-solid fa-id-card position-absolute text-muted" style="left: 12px; top: 15px;"></i>
                                        </div>
                                    </div>

                                    <div class="mb-3">
                                        <label class="form-label text-white small fw-bold" style="letter-spacing: 0.5px;">JENIS KELAMIN</label>
                                        <div class="position-relative">
                                            <select class="form-select ps-5" name="jenis_kelamin" required>
                                                <option value="" disabled selected>Pilih Jenis Kelamin...</option>
                                                <option value="Laki-laki">Laki-laki</option>
                                                <option value="Perempuan">Perempuan</option>
                                            </select>
                                            <i class="fa-solid fa-venus-mars position-absolute text-muted" style="left: 12px; top: 15px;"></i>
                                        </div>
                                    </div>

                                    <div class="mb-3">
                                        <label class="form-label text-white small fw-bold" style="letter-spacing: 0.5px;">PROGRAM STUDI</label>
                                        <div class="position-relative">
                                            <input type="text" class="form-control ps-5" name="prodi" placeholder="Misal: Teknologi Informasi" required>
                                            <i class="fa-solid fa-graduation-cap position-absolute text-muted" style="left: 12px; top: 15px;"></i>
                                        </div>
                                    </div>

                                    <div class="mb-3">
                                        <label class="form-label text-white small fw-bold" style="letter-spacing: 0.5px;">PTS / UNIVERSITAS</label>
                                        <div class="position-relative">
                                            <input type="text" class="form-control ps-5" name="pts_nama" placeholder="Nama Universitas Swasta Anda" required>
                                            <i class="fa-solid fa-building-columns position-absolute text-muted" style="left: 12px; top: 15px;"></i>
                                        </div>
                                    </div>

                                    <div class="mb-3">
                                        <label class="form-label text-white small fw-bold" style="letter-spacing: 0.5px;">ALAMAT EMAIL</label>
                                        <div class="position-relative">
                                            <input type="email" class="form-control ps-5" name="email" placeholder="nama@domain.com" required>
                                            <i class="fa-regular fa-envelope position-absolute text-muted" style="left: 12px; top: 15px;"></i>
                                        </div>
                                    </div>

                                    <div class="mb-3">
                                        <label class="form-label text-white small fw-bold" style="letter-spacing: 0.5px;">KATA SANDI</label>
                                        <div class="position-relative">
                                            <input type="password" class="form-control ps-5" name="password" placeholder="Minimal 6 karakter" required>
                                            <i class="fa-solid fa-lock position-absolute text-muted" style="left: 12px; top: 15px;"></i>
                                        </div>
                                    </div>
                                </div>

                                <button type="submit" class="btn btn-primary w-100 py-2.5 mb-3 mt-3 fw-bold">
                                    <i class="fa-solid fa-user-plus me-2"></i> Daftar Akun
                                </button>
                                
                                <div class="text-center text-white-50 small mb-2">atau</div>
                                
                                <button type="button" class="btn btn-outline-light w-100 py-2.5 fw-bold" onclick="switchTab('login')">
                                    <i class="fa-solid fa-right-to-bracket me-2"></i> Sudah Punya Akun? Masuk
                                </button>
                            </form>
                        </div>

                    </div>
                </div>
            </div>





            <!-- Footer copyright -->
            <footer class="mt-5 text-center text-white-50" style="font-size: 0.75rem;">
                © 2026 KITA ADIA (LLDIKTI III) - Manajemen Konseling & Bimbingan Integritas Akademik
            </footer>

        </div>
    </main>

<script>


    function switchTab(tab) {
        const loginSec = document.getElementById('login-section');
        const registerSec = document.getElementById('register-section');
        
        if (tab === 'login') {
            loginSec.classList.remove('d-none');
            registerSec.classList.add('d-none');
        } else {
            registerSec.classList.remove('d-none');
            loginSec.classList.add('d-none');
        }
    }

    document.addEventListener('DOMContentLoaded', function() {
        const alertEl = document.getElementById('floating-alert');
        if (alertEl) {
            setTimeout(function() {
                alertEl.style.transition = 'opacity 0.5s ease-out';
                alertEl.style.opacity = '0';
                setTimeout(function() {
                    alertEl.remove();
                }, 500);
            }, 3000); // 3 seconds
        }

        const successAlertEl = document.getElementById('floating-success-alert');
        if (successAlertEl) {
            setTimeout(function() {
                successAlertEl.style.transition = 'opacity 0.5s ease-out';
                successAlertEl.style.opacity = '0';
                setTimeout(function() {
                    successAlertEl.remove();
                }, 500);
            }, 5000); // 5 seconds
        }
    });
</script>

</body>
</html>
<?php /**PATH C:\laragon\www\SIM-KITA-LLDIKTI-3\resources\views/auth/login.blade.php ENDPATH**/ ?>