<!doctype html>
<html lang="id">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>@yield('title', 'Authentikasi') | Jasa Printer Pro</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=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.lineicons.com/4.0/lineicons.css">

    <style>
        :root {
            --primary: #2563eb;
            --primary-dark: #1d4ed8;
            --primary-glow: rgba(37, 99, 235, 0.2);
            --text-dark: #0f172a;
            --text-muted: #64748b;
            --glass-white: rgba(255, 255, 255, 0.7);
            --glass-border: rgba(255, 255, 255, 0.4);
            --radius: 28px;
        }

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

        body, html {
            height: 100%;
            font-family: 'Plus Jakarta Sans', sans-serif;
            overflow: hidden;
            background: #0f172a;
        }

        /* Animated Mesh Gradient Background */
        .auth-master-bg {
            position: fixed;
            inset: 0;
            z-index: -2;
            background-color: #0f172a;
            overflow: hidden;
        }

        .mesh-sphere {
            position: absolute;
            width: clamp(300px, 60vw, 800px); 
            height: clamp(300px, 60vw, 800px);
            border-radius: 50%;
            filter: blur(120px);
            opacity: 0.4;
            animation: moveSlow 20s infinite alternate ease-in-out;
        }

        @media (max-width: 768px) {
            .mesh-3 { display: none; }
            .mesh-sphere { opacity: 0.2; filter: blur(80px); }
        }

        @keyframes moveSlow {
            0% { transform: translate(0, 0) scale(1); }
            100% { transform: translate(50px, 20px) scale(1.1); }
        }

        .auth-bg-img {
            position: fixed;
            inset: 0;
            z-index: -1;
            background: url('{{ asset("assets/img/auth-full-bg.jpg") }}') no-repeat center center;
            background-size: cover;
            opacity: 0.25;
            mix-blend-mode: overlay;
        }

        /* Container & Card */
        .auth-master {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: clamp(30px, 8vw, 100px);
            backdrop-filter: saturate(180%) blur(5px);
            overflow-y: auto;
        }

        .auth-card {
            width: 100%;
            max-width: 1100px;
            background: var(--glass-white);
            backdrop-filter: blur(40px) saturate(200%);
            -webkit-backdrop-filter: blur(40px) saturate(200%);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            box-shadow: 
                0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 30px 60px -12px rgba(0, 0, 0, 0.3);
            display: flex;
            overflow: hidden;
            animation: cardFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            min-height: 650px;
            margin: auto;
        }

        @keyframes cardFadeIn {
            from { opacity: 0; transform: scale(0.98) translateY(20px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        /* Split Components */
        .auth-visual-side {
            flex: 1.2;
            background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
            position: relative;
            padding: 50px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            color: white;
            overflow: hidden;
        }

        .auth-visual-side::before {
            content: '';
            position: absolute;
            inset: 0;
            background: url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format') center;
            background-size: cover;
            opacity: 0.15;
            mix-blend-mode: luminosity;
        }

        .visual-content { position: relative; z-index: 2; h2 { font-weight: 900; font-size: 2.5rem; letter-spacing: -2px; margin-bottom: 20px; line-height: 1.1; } p { font-size: 1.1rem; color: rgba(255,255,255,0.6); line-height: 1.6; max-width: 340px; } }
        .visual-badge { padding: 8px 16px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1); border-radius: 100px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; display: inline-block; margin-bottom: 25px; }

        .auth-form-side {
            flex: 1;
            padding: 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            background: rgba(255,255,255,0.4);
        }

        @media (max-width: 900px) {
            .auth-card { max-width: 500px; }
            .auth-visual-side { display: none; }
        }

        .form-header { text-align: left; margin-bottom: clamp(20px, 5vw, 35px); }
        .form-header h1 { 
            font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 800; color: var(--text-dark); 
            letter-spacing: -1.5px; margin-bottom: 10px;
        }
        .form-header p { color: var(--text-muted); font-size: clamp(0.85rem, 2vw, 1rem); font-weight: 500; }

        /* Form Styling */
        .input-group-pro { margin-bottom: clamp(15px, 4vw, 22px); }
        .label-pro { 
            display: block; font-size: 13px; font-weight: 700; 
            color: var(--text-dark); margin-bottom: 8px;
            text-transform: uppercase; letter-spacing: 0.5px;
        }

        .input-box { position: relative; }
        .input-box i {
            position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
            color: var(--text-muted); font-size: clamp(16px, 4vw, 20px); transition: 0.3s;
        }

        .control-pro {
            width: 100%;
            padding: clamp(12px, 3vw, 16px) 20px clamp(12px, 3vw, 16px) clamp(44px, 10vw, 54px);
            background: rgba(255, 255, 255, 0.5);
            border: 1.5px solid rgba(0,0,0,0.05);
            border-radius: 18px;
            font-size: clamp(13px, 3vw, 15px); font-weight: 600; color: var(--text-dark);
            transition: all 0.3s;
            outline: none;
        }

        .control-pro:focus {
            background: #fff;
            border-color: var(--primary);
            box-shadow: 0 0 0 4px var(--primary-glow);
        }

        .control-pro:focus + i { color: var(--primary); }

        .pass-toggle {
            position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
            cursor: pointer; color: var(--text-muted); transition: 0.3s;
            font-size: clamp(16px, 4vw, 18px);
        }
        .pass-toggle:hover { color: var(--primary); }

        /* Secondary Row (Remember me etc) */
        .auth-extra { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
        
        /* Custom Checkbox */
        .custom-check { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
        .custom-check input { display: none; }
        .check-box { width: 18px; height: 18px; border: 2px solid #cbd5e1; border-radius: 6px; position: relative; transition: 0.3s; }
        .custom-check input:checked + .check-box { background: var(--primary); border-color: var(--primary); }
        .custom-check input:checked + .check-box::after { content: '✓'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: white; font-size: 11px; font-weight: 900; }
        .check-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }

        /* Primary Button */
        .btn-pro {
            width: 100%;
            padding: clamp(12px, 3vw, 16px);
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 18px;
            font-size: clamp(15px, 4vw, 17px); font-weight: 800;
            display: flex; align-items: center; justify-content: center; gap: 12px;
            margin-top: 10px;
            transition: all 0.3s;
            box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
        }

        .btn-pro:hover {
            background: var(--primary-dark);
            transform: translateY(-3px);
            box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5);
        }

        /* Footer */
        .auth-footer { margin-top: clamp(24px, 6vw, 35px); text-align: center; color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .auth-link { color: var(--primary); text-decoration: none; font-weight: 800; }
        .auth-link:hover { text-decoration: underline; }

        /* Back Button */
        .back-home {
            position: absolute; top: clamp(16px, 4vw, 32px); left: clamp(16px, 4vw, 32px);
            color: rgba(255,255,255,0.7); text-decoration: none;
            display: flex; align-items: center; gap: 8px;
            font-size: clamp(12px, 3vw, 15px); font-weight: 700; transition: 0.3s;
            z-index: 10;
            padding: 8px clamp(12px, 3vw, 20px);
            background: rgba(255,255,255,0.1);
            border-radius: 100px;
            backdrop-filter: blur(10px);
        }
        .back-home:hover { color: white; background: rgba(255,255,255,0.2); transform: translateX(-5px); }

        /* Validation */
        .invalid-feedback { font-size: 11px; font-weight: 700; color: #ef4444; margin-top: 6px; }
        .is-invalid { border-color: #fca5a5 !important; background: rgba(254, 226, 226, 0.5) !important; }

        @media (max-width: 576px) {
            .auth-card { padding: 32px 20px; border-radius: 24px; }
            .logo-img { border-radius: 16px; }
            .btn-pro { border-radius: 14px; }
            .control-pro { border-radius: 14px; }
        }
    </style>
</head>
<body>

    <div class="auth-master-bg">
        <div class="mesh-sphere mesh-1"></div>
        <div class="mesh-sphere mesh-2"></div>
        <div class="mesh-sphere mesh-3"></div>
        <div class="auth-bg-img"></div>
    </div>

    @include('partials.splash-screen')
    @include('partials.notifications')

    <a href="/" class="back-home">
        <i class="lni lni-arrow-left"></i> Beranda
    </a>

    <div class="auth-master">
        <div class="auth-card">
            @yield('content')
        </div>
    </div>

    <!-- Scripts -->
    <script src="{{ asset('assets/libs/jquery/dist/jquery.min.js') }}"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // Universal Password Toggle Logic
        $(document).on('click', '.pass-toggle', function() {
            const box = $(this).closest('.input-box');
            const input = box.find('input');
            const icon = $(this);
            
            if (input.attr('type') === 'password') {
                input.attr('type', 'text');
                icon.removeClass('lni-eye').addClass('lni-eye-slash');
            } else {
                input.attr('type', 'password');
                icon.removeClass('lni-eye-slash').addClass('lni-eye');
            }
        });
    </script>
</body>
</html>