<!DOCTYPE html>
<html lang="id">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Portal Admin | 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: #060608;
            --card-bg: rgba(15, 15, 20, 0.7);
            --primary: #ef4444;
            /* High performance Crimson Red */
            --primary-glow: rgba(239, 68, 68, 0.4);
            --primary-border: rgba(239, 68, 68, 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(239, 68, 68, 0.08) 0%, transparent 45%),
                radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 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, 10px);
                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(239, 68, 68, 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(239, 68, 68, 0.1);
            color: var(--primary);
            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(239, 68, 68, 0.25);
            box-shadow: 0 0 10px rgba(239, 68, 68, 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%, #ff8888 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, 8, 12, 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);
            box-shadow: 0 0 18px var(--primary-glow);
            background: rgba(8, 8, 12, 0.98);
        }

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

        .password-toggle {
            position: absolute;
            right: 16px;
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 1rem;
            cursor: pointer;
            transition: color 0.3s;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .password-toggle:hover {
            color: var(--primary);
        }

        .credentials-info {
            background: rgba(239, 68, 68, 0.06);
            border: 1px solid rgba(239, 68, 68, 0.2);
            border-radius: 12px;
            padding: 14px 16px;
            margin-bottom: 25px;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .credentials-info strong {
            color: var(--primary);
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
        }

        .credentials-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 6px;
            font-family: 'Courier New', monospace;
        }

        .credentials-item span:last-child {
            color: #ffffff;
            letter-spacing: 0.5px;
        }

        .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);
            cursor: pointer;
            width: 16px;
            height: 16px;
        }

        .btn-submit {
            width: 100%;
            background: linear-gradient(135deg, var(--primary) 0%, #b91c1c 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(239, 68, 68, 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(239, 68, 68, 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-shield-halved"></i>
                    Portal Keamanan
                </span>
                <h1>Admin Area</h1>
                <p>Otorisasi super administrator sistem</p>
            </div>

            <!-- Session & Error Alerts -->
            <?php if(session('error')): ?>
                <div class="alert">
                    <i class="fa-solid fa-circle-exclamation"></i>
                    <span><?php echo e(session('error')); ?></span>
                </div>
            <?php endif; ?>

            <?php if(session('success')): ?>
                <div class="alert-success">
                    <i class="fa-solid fa-circle-check"></i>
                    <span><?php echo e(session('success')); ?></span>
                </div>
            <?php endif; ?>

            <?php if($errors->any()): ?>
                <div class="alert">
                    <i class="fa-solid fa-circle-exclamation"></i>
                    <span><?php echo e($errors->first()); ?></span>
                </div>
            <?php endif; ?>

            <!-- LOGIN FORM -->
            <form action="<?php echo e(route('admin.login.submit')); ?>" method="POST">
                <?php echo csrf_field(); ?>

                <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 admin" value="<?php echo e(old('username')); ?>" required
                            autocomplete="off">
                        <i class="fa-solid fa-user-shield 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>
                        <button type="button" class="password-toggle"
                            onclick="togglePasswordVisibility('login_password')">
                            <i class="fa-solid fa-eye"></i>
                        </button>
                    </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 Aplikasi</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>

    <script>
        function togglePasswordVisibility(fieldId) {
            const field = document.getElementById(fieldId);
            const toggle = event.target.closest('.password-toggle');

            if (field.type === 'password') {
                field.type = 'text';
                toggle.innerHTML = '<i class="fa-solid fa-eye-slash"></i>';
            } else {
                field.type = 'password';
                toggle.innerHTML = '<i class="fa-solid fa-eye"></i>';
            }
        }
    </script>
</body>

</html><?php /**PATH C:\laragon\www\otomotif\resources\views/auth/admin.blade.php ENDPATH**/ ?>