<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Portal Alumni | Otomotif SMKN 1 Cirebon</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;800;900&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --bg-color: #040605;
            --card-bg: rgba(10, 14, 12, 0.7);
            --primary: #10b981; /* Alumni Success Emerald Green */
            --primary-light: #34d399;
            --primary-glow: rgba(16, 185, 129, 0.4);
            --primary-border: rgba(16, 185, 129, 0.2);
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --font-family: 'Inter', sans-serif;
            --font-heading: 'Outfit', sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: var(--font-family);
            background-color: var(--bg-color);
            background-image: 
                radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
                radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 45%),
                repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.005) 0px, rgba(255, 255, 255, 0.005) 1px, transparent 1px, transparent 2px),
                repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.005) 0px, rgba(255, 255, 255, 0.005) 1px, transparent 1px, transparent 2px);
            background-size: 100% 100%, 100% 100%, 20px 20px, 20px 20px;
            color: var(--text-main);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
            padding: 24px;
        }

        .glow-orb {
            position: absolute;
            width: 350px;
            height: 350px;
            background: var(--primary);
            filter: blur(150px);
            border-radius: 50%;
            opacity: 0.12;
            pointer-events: none;
            z-index: 0;
            animation: pulse 10s infinite alternate ease-in-out;
        }

        @keyframes pulse {
            0% { transform: scale(1) translate(0, 0); opacity: 0.08; }
            100% { transform: scale(1.25) translate(20px, -20px); opacity: 0.16; }
        }

        .container {
            width: 100%;
            max-width: 440px;
            z-index: 10;
        }

        .login-card {
            background: var(--card-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border: 1px solid var(--primary-border);
            border-top: 4px solid var(--primary);
            border-radius: 24px;
            padding: 45px 35px;
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(16, 185, 129, 0.04);
            position: relative;
            overflow: hidden;
            animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @keyframes slideIn {
            0% { transform: translateY(30px); opacity: 0; }
            100% { transform: translateY(0); opacity: 1; }
        }

        .brand-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .badge {
            background: rgba(16, 185, 129, 0.1);
            color: var(--primary-light);
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 2px;
            padding: 6px 14px;
            border-radius: 50px;
            text-transform: uppercase;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 16px;
            border: 1px solid rgba(16, 185, 129, 0.25);
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
        }

        .brand-header h1 {
            font-family: var(--font-heading);
            font-size: 2.2rem;
            font-weight: 900;
            letter-spacing: -0.5px;
            background: linear-gradient(135deg, #ffffff 40%, var(--primary-light) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 6px;
        }

        .brand-header p {
            font-size: 0.88rem;
            color: var(--text-muted);
        }

        .form-group {
            margin-bottom: 22px;
        }

        .form-label {
            display: block;
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-icon {
            position: absolute;
            left: 16px;
            color: var(--text-muted);
            font-size: 1rem;
            transition: color 0.3s;
            pointer-events: none;
        }

        .form-control {
            width: 100%;
            background: rgba(8, 12, 10, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
            padding: 15px 16px 15px 46px;
            color: var(--text-main);
            font-size: 0.92rem;
            font-family: var(--font-family);
            transition: all 0.3s;
            outline: none;
        }

        .form-control:focus {
            border-color: var(--primary-light);
            box-shadow: 0 0 18px var(--primary-glow);
            background: rgba(8, 12, 10, 0.98);
        }

        .form-control:focus ~ .input-icon {
            color: var(--primary-light);
            filter: drop-shadow(0 0 2px var(--primary-glow));
        }

        .form-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            font-size: 0.82rem;
        }

        .remember-me {
            display: flex;
            align-items: center;
            cursor: pointer;
            color: var(--text-muted);
            user-select: none;
        }

        .remember-me input {
            margin-right: 8px;
            accent-color: var(--primary-light);
            cursor: pointer;
            width: 16px;
            height: 16px;
        }

        .btn-submit {
            width: 100%;
            background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
            color: #ffffff;
            border: none;
            border-radius: 12px;
            padding: 16px;
            font-family: var(--font-heading);
            font-size: 0.95rem;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
            text-transform: uppercase;
            letter-spacing: 1px;
            display: inline-flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
        }

        .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(16, 185, 129, 0.45);
            filter: brightness(1.1);
        }

        .btn-submit:active {
            transform: translateY(0);
        }

        /* Alert styles */
        .alert {
            background: rgba(239, 68, 68, 0.08);
            border: 1px solid rgba(239, 68, 68, 0.25);
            color: #f87171;
            padding: 14px 16px;
            border-radius: 12px;
            font-size: 0.82rem;
            margin-bottom: 22px;
            display: flex;
            align-items: center;
            gap: 10px;
            animation: shake 0.5s ease-in-out;
        }

        .alert-success {
            background: rgba(16, 185, 129, 0.08);
            border: 1px solid rgba(16, 185, 129, 0.25);
            color: #34d399;
            padding: 14px 16px;
            border-radius: 12px;
            font-size: 0.82rem;
            margin-bottom: 22px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-6px); }
            40%, 80% { transform: translateX(6px); }
        }

        .back-link {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 30px;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.82rem;
            font-weight: 500;
            transition: all 0.3s;
        }

        .back-link:hover {
            color: #ffffff;
            transform: translateX(-3px);
        }

        @media (max-width: 480px) {
            .login-card {
                padding: 35px 25px;
                border-radius: 20px;
            }
            .brand-header h1 {
                font-size: 1.85rem;
            }
        }
    </style>
</head>
<body>
    <div class="glow-orb" style="top: 25%; left: 20%;"></div>
    
    <div class="container">
        <div class="login-card">
            
            <div class="brand-header">
                <span class="badge">
                    <i class="fa-solid fa-graduation-cap"></i> 
                    Portal Alumni
                </span>
                <h1>Alumni Hub</h1>
                <p>Pendataan karir & jejak studi lulusan</p>
            </div>

            <!-- Session & Error Alerts -->
            @if(session('error'))
                <div class="alert">
                    <i class="fa-solid fa-circle-exclamation"></i>
                    <span>{{ session('error') }}</span>
                </div>
            @endif

            @if(session('success'))
                <div class="alert-success">
                    <i class="fa-solid fa-circle-check"></i>
                    <span>{{ session('success') }}</span>
                </div>
            @endif

            @if($errors->any())
                <div class="alert">
                    <i class="fa-solid fa-circle-exclamation"></i>
                    <span>{{ $errors->first() }}</span>
                </div>
            @endif

            <!-- LOGIN FORM -->
            <form action="{{ route('alumni.login.submit') }}" method="POST">
                @csrf
                
                <div class="form-group">
                    <label class="form-label" for="login_username">Username</label>
                    <div class="input-wrapper">
                        <input type="text" id="login_username" name="username" class="form-control" placeholder="Masukkan username alumni" value="{{ old('username') }}" required autocomplete="off">
                        <i class="fa-solid fa-user-graduate input-icon"></i>
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-label" for="login_password">Password</label>
                    <div class="input-wrapper">
                        <input type="password" id="login_password" name="password" class="form-control" placeholder="Masukkan password" required>
                        <i class="fa-solid fa-key input-icon"></i>
                    </div>
                </div>

                <div class="form-options">
                    <label class="remember-me">
                        <input type="checkbox" name="remember" value="1">
                        <span>Ingat Sesi Saya</span>
                    </label>
                </div>

                <button type="submit" class="btn-submit">
                    <span>Masuk Portal Alumni</span>
                    <i class="fa-solid fa-right-to-bracket"></i>
                </button>
            </form>

            <a href="/" class="back-link">
                <i class="fa-solid fa-arrow-left"></i> 
                <span>Kembali ke Beranda</span>
            </a>

        </div>
    </div>
</body>
</html>
