<!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 PPLG</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=Outfit:wght@300;400;500;600;700;800&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: #0b0c10;
            --card-bg: rgba(22, 26, 34, 0.65);
            --primary: #ff3333;
            --primary-glow: rgba(255, 51, 51, 0.3);
            --text-main: #f3f4f6;
            --text-muted: #9ca3af;
            --border-color: rgba(255, 51, 51, 0.18);
            --font-family: '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(255, 0, 0, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(255, 0, 0, 0.05) 0%, transparent 40%),
                linear-gradient(rgba(11, 12, 16, 0.95), rgba(11, 12, 16, 0.95)),
                repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.01) 0px, rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 2px),
                repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.01) 0px, rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 2px);
            background-size: 100% 100%, 100% 100%, 100% 100%, 20px 20px, 20px 20px;
            color: var(--text-main);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow-x: hidden;
            position: relative;
            padding: 20px;
        }

        .glow-orb {
            position: absolute;
            width: 300px;
            height: 300px;
            background: var(--primary);
            filter: blur(140px);
            border-radius: 50%;
            opacity: 0.15;
            z-index: 0;
            pointer-events: none;
            animation: pulse 8s infinite alternate;
        }

        @keyframes pulse {
            0% { transform: scale(1); opacity: 0.12; }
            100% { transform: scale(1.2); opacity: 0.2; }
        }

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

        .login-card {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-color);
            border-radius: 24px;
            padding: 40px 30px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 51, 51, 0.05);
            position: relative;
            overflow: hidden;
            animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }

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

        .login-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, transparent, var(--primary), transparent);
        }

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

        .badge {
            background: rgba(255, 51, 51, 0.12);
            color: var(--primary);
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 2px;
            padding: 5px 12px;
            border-radius: 50px;
            text-transform: uppercase;
            display: inline-block;
            margin-bottom: 12px;
            border: 1px solid rgba(255, 51, 51, 0.25);
        }

        .brand-header h1 {
            font-size: 2rem;
            font-weight: 800;
            letter-spacing: -0.5px;
            background: linear-gradient(135deg, #ffffff 30%, #ff8888 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 5px;
        }

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

        /* sliding switcher tabs */
        .tab-switcher {
            display: flex;
            background: rgba(0, 0, 0, 0.25);
            padding: 4px;
            border-radius: 12px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            position: relative;
        }

        .tab-btn {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-muted);
            padding: 12px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            z-index: 2;
            transition: color 0.3s;
            font-family: var(--font-family);
        }

        .tab-btn.active {
            color: #ffffff;
        }

        .tab-backdrop {
            position: absolute;
            top: 4px;
            bottom: 4px;
            left: 4px;
            width: calc(50% - 4px);
            background: var(--primary);
            border-radius: 8px;
            z-index: 1;
            transition: transform 0.4s cubic-bezier(0.85, 0, 0.15, 1);
            box-shadow: 0 2px 10px var(--primary-glow);
        }

        /* sliding forms container */
        .form-slider-viewport {
            overflow: hidden;
            width: 100%;
        }

        .form-slider {
            display: flex;
            width: 200%;
            transition: transform 0.5s cubic-bezier(0.85, 0, 0.15, 1);
        }

        .form-box {
            width: 50%;
            padding: 0 5px;
        }

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

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

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

        .form-control:focus {
            border-color: var(--primary);
            box-shadow: 0 0 15px var(--primary-glow);
            background: rgba(17, 19, 25, 0.95);
        }

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

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

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

        .btn-submit {
            width: 100%;
            background: linear-gradient(135deg, var(--primary) 0%, #cc0000 100%);
            color: #ffffff;
            border: none;
            border-radius: 12px;
            padding: 15px;
            font-size: 0.95rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 18px var(--primary-glow);
            text-transform: uppercase;
            letter-spacing: 1px;
            font-family: var(--font-family);
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
        }

        .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 22px var(--primary-glow);
            filter: brightness(1.1);
        }

        .alert {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            color: #f87171;
            padding: 12px;
            border-radius: 10px;
            font-size: 0.8rem;
            margin-bottom: 18px;
            display: flex;
            align-items: center;
            gap: 10px;
            animation: shake 0.5s ease-in-out;
        }

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

        .alert-success {
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.3);
            color: #34d399;
            padding: 12px;
            border-radius: 10px;
            font-size: 0.8rem;
            margin-bottom: 18px;
        }

        .back-link {
            display: block;
            text-align: center;
            margin-top: 25px;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.8rem;
            transition: color 0.3s;
        }

        .back-link:hover {
            color: #ffffff;
        }

        @media (max-width: 480px) {
            .login-card {
                padding: 30px 20px;
                border-radius: 20px;
            }
            .brand-header h1 {
                font-size: 1.7rem;
            }
            .brand-header p {
                font-size: 0.8rem;
            }
            .tab-btn {
                padding: 10px;
                font-size: 0.85rem;
            }
            .form-control {
                padding: 11px 13px;
                font-size: 0.85rem;
            }
            .btn-submit {
                padding: 13px;
                font-size: 0.85rem;
            }
        }

        @media (max-width: 380px) {
            .login-card {
                padding: 24px 15px;
                border-radius: 16px;
            }
            .brand-header h1 {
                font-size: 1.5rem;
            }
        }
    </style>
</head>
<body>
    <div class="glow-orb" style="top: 20%; left: 30%;"></div>
    
    <div class="container">
        <div class="login-card">
            <div class="brand-header">
                <span class="badge">Portal Keamanan</span>
                <h1>Admin Area</h1>
                <p>Silakan masuk atau daftar sebagai admin</p>
            </div>

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

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

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

            <!-- LOGIN FORM -->
            <div style="margin-top: 20px;">
                <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>
                        <input type="text" id="login_username" name="username" class="form-control" placeholder="Masukkan username" value="<?php echo e(old('username')); ?>" required autocomplete="off">
                    </div>

                    <div class="form-group">
                        <label class="form-label" for="login_password">Password</label>
                        <input type="password" id="login_password" name="password" class="form-control" placeholder="Masukkan password" required>
                    </div>

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

                    <button type="submit" class="btn-submit">
                        <span>Masuk Aplikasi <i class="fa-solid fa-right-to-bracket" style="margin-left: 6px;"></i></span>
                    </button>
                </form>
            </div>

            <a href="/" class="back-link">
                <i class="fa-solid fa-arrow-left" style="margin-right: 6px;"></i> Kembali ke Beranda
            </a>
        </div>
    </div>
</body>
</html>
<?php /**PATH D:\laragon\www\Otomotif_by_PPLG\resources\views/auth/admin.blade.php ENDPATH**/ ?>