<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login - Task Panel</title>
    <!-- Google Fonts -->
    <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=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap" rel="stylesheet">
    
    <!-- Inline CSS Styles -->
    <style>
        /* Variables and Colors */
        :root {
            --primary-color: #3b46f1;
            --primary-hover: #2a35d8;
            --bg-main: #f8fafc;
            --bg-card: #ffffff;
            --text-main: #0f172a;
            --text-muted: #94a3b8;
            --text-label: #334155;
            --border-color: #e2e8f0;
            --border-hover: #cbd5e1;
            --error-bg: #fef2f2;
            --error-border: #ef4444;
            --error-text: #b91c1c;
            --font-family: 'Instrument Sans', sans-serif;
        }

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

        html, body {
            height: 100%;
            background-color: var(--bg-main);
            font-family: var(--font-family);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        .login-page {
            display: flex;
            align-items: stretch;
            height: 100%;
        }

        .login-container {
            width: 100%;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        @media (min-width: 768px) {
            .login-container {
                flex-direction: row;
            }
        }

        /* Left Column: Brand & Illustration */
        .illustration-panel {
            width: 100%;
            height: 20rem; /* h-80 */
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            position: relative;
            overflow: hidden;
            padding: 1.5rem;
            border-bottom: 1px solid var(--border-color);
        }

        @media (min-width: 768px) {
            .illustration-panel {
                width: 50%;
                height: auto;
                padding: 3rem;
                border-bottom: none;
                border-right: 1px solid var(--border-color);
            }
        }

        /* Subtle Decorative Glows */
        .glow-effect {
            position: absolute;
            width: 24rem;
            height: 24rem;
            background-color: rgba(255, 255, 255, 0.05);
            border-radius: 50%;
            filter: blur(64px);
            pointer-events: none;
        }

        .glow-top {
            top: 0;
            right: 0;
        }

        .glow-bottom {
            bottom: 0;
            left: 0;
        }

        /* Illustration Image & Wrapper */
        .illustration-wrapper {
            flex: 1;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
        }

        .illustration-img {
            width: 100%;
            height: 100%;
            max-height: 70vh;
            object-fit: contain;
            pointer-events: none;
            transition: transform 0.5s ease;
        }

        .illustration-img:hover {
            transform: scale(1.02);
        }

        /* Fallback SVG Styles */
        .svg-fallback-wrapper {
            display: flex;
            width: 100%;
            height: 100%;
            max-height: 70vh;
            align-items: center;
            justify-content: center;
        }

        .svg-fallback-wrapper.hidden {
            display: none;
        }

        .svg-fallback-wrapper svg {
            width: 100%;
            height: 100%;
            max-height: 50vh;
            object-fit: contain;
            pointer-events: none;
            filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.15));
            transition: transform 0.5s ease;
        }

        .svg-fallback-wrapper svg:hover {
            transform: scale(1.05);
        }

        /* Tagline */
        .tagline {
            display: none;
            font-size: 0.75rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.6);
            text-align: center;
            z-index: 20;
            margin-top: 1rem;
        }

        @media (min-width: 768px) {
            .tagline {
                display: block;
            }
        }

        /* Right Column: Form */
        .form-panel {
            width: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            background-color: var(--bg-card);
            position: relative;
            padding: 1.5rem;
        }

        @media (min-width: 640px) {
            .form-panel {
                padding: 3rem;
            }
        }

        @media (min-width: 768px) {
            .form-panel {
                width: 50%;
                padding: 4rem;
            }
        }

        .form-wrapper {
            width: 100%;
            max-width: 28rem;
            margin: 0 auto;
        }

        .form-header {
            text-align: left;
            margin-bottom: 2rem;
        }

        .form-title {
            font-size: 1.875rem;
            font-weight: 700;
            color: var(--text-main);
            letter-spacing: -0.025em;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .wave-emoji {
            display: inline-block;
            transform-origin: 70% 70%;
            animation: wave-animation 2.5s infinite;
        }

        @keyframes wave-animation {
            0% { transform: rotate( 0.0deg) }
           10% { transform: rotate(14.0deg) }
           20% { transform: rotate(-8.0deg) }
           30% { transform: rotate(14.0deg) }
           40% { transform: rotate(-4.0deg) }
           50% { transform: rotate(10.0deg) }
           60% { transform: rotate( 0.0deg) }
          100% { transform: rotate( 0.0deg) }
        }

        .form-subtitle {
            font-size: 0.875rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }

        /* Error Alert */
        .alert-error {
            background-color: var(--error-bg);
            border-left: 4px solid var(--error-border);
            padding: 1rem;
            border-radius: 0.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            display: flex;
            align-items: flex-start;
        }

        .alert-icon {
            flex-shrink: 0;
            width: 1.25rem;
            height: 1.25rem;
            color: var(--error-border);
        }

        .alert-text {
            margin-left: 0.75rem;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--error-text);
        }

        /* Form Groups and Inputs */
        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text-label);
            margin-bottom: 0.375rem;
        }

        .input-wrapper {
            position: relative;
            border-radius: 0.5rem;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        }

        .input-icon {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            left: 0.75rem;
            display: flex;
            align-items: center;
            pointer-events: none;
            color: var(--text-muted);
        }

        .input-field {
            display: block;
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 2.5rem;
            border: 1px solid var(--border-color);
            border-radius: 0.5rem;
            color: var(--text-main);
            background-color: #ffffff;
            font-size: 0.875rem;
            transition: all 0.2s ease;
        }

        .input-field::placeholder {
            color: var(--text-muted);
        }

        .input-field:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(59, 70, 241, 0.15);
        }

        /* Password Toggle Eye Button */
        .eye-toggle {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            right: 0.75rem;
            display: flex;
            align-items: center;
            color: var(--text-muted);
            cursor: pointer;
            border: none;
            background: none;
            transition: color 0.2s ease;
        }

        .eye-toggle:hover {
            color: var(--text-label);
        }

        .eye-toggle svg {
            width: 1.25rem;
            height: 1.25rem;
        }

        .hidden {
            display: none !important;
        }

        /* Submit Button */
        .submit-btn {
            width: 100%;
            display: flex;
            justify-content: center;
            padding: 0.875rem 1rem;
            border: 1px solid transparent;
            border-radius: 0.5rem;
            font-size: 0.875rem;
            font-weight: 600;
            color: #ffffff;
            background-color: var(--primary-color);
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 4px 6px -1px rgba(59, 70, 241, 0.1), 0 2px 4px -1px rgba(59, 70, 241, 0.06);
        }

        .submit-btn:hover {
            background-color: var(--primary-hover);
            box-shadow: 0 10px 15px -3px rgba(59, 70, 241, 0.2), 0 4px 6px -2px rgba(59, 70, 241, 0.1);
        }

        .submit-btn:focus {
            outline: none;
            box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--primary-color);
        }

        /* Copyright Footer */
        .footer-copyright {
            margin-top: 2rem;
            text-align: center;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
    </style>
    <!-- Favicon -->
    <link rel="icon" type="image/png" href="<?php echo e(asset('images/faviocntaskpannel.png')); ?>">
</head>
<?php
    $hexColor = '#0d1e99'; // Default fallback color
    try {
        $imgPath = public_path('images/login-illustration.jpeg');
        if (file_exists($imgPath) && function_exists('imagecreatefromjpeg')) {
            $im = @imagecreatefromjpeg($imgPath);
            if ($im) {
                $rgb = imagecolorat($im, 10, 10);
                $r = ($rgb >> 16) & 0xFF;
                $g = ($rgb >> 8) & 0xFF;
                $b = $rgb & 0xFF;
                $hexColor = sprintf('#%02x%02x%02x', $r, $g, $b);
                imagedestroy($im);
            }
        }
    } catch (\Exception $e) {
        // Fallback
    }
?>
<body>

    <div class="login-container">
        
        <!-- Left Side: Brand, Information, and Illustration -->
        <div class="illustration-panel" style="background-color: <?php echo e($hexColor); ?>;">
            <!-- Decorative Subtle Glows -->
            <div class="glow-effect glow-top"></div>
            <div class="glow-effect glow-bottom"></div>

            <!-- Top spacer/branding placeholder -->
            <div style="height: 1rem;"></div>

            <!-- Core Content: Illustration Image -->
            <div class="illustration-wrapper">
                <img id="login-ill-img" src="<?php echo e(asset('images/login-illustration.jpeg')); ?>" alt="Task Panel Illustration" class="illustration-img" onerror="this.style.display='none'; document.getElementById('svg-fallback').classList.remove('hidden')">
                
                <!-- Fallback SVG Illustration if image fails to load -->
                <div id="svg-fallback" class="svg-fallback-wrapper hidden">
                    <svg viewBox="0 0 500 500" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <!-- Tech background elements -->
                        <circle cx="250" cy="250" r="180" fill="#0f172a" fill-opacity="0.03"/>
                        <circle cx="250" cy="250" r="140" fill="#0f172a" fill-opacity="0.03"/>
                        
                        <!-- Desk / Table -->
                        <rect x="100" y="380" width="300" height="10" rx="5" fill="#3b46f1" fill-opacity="0.5"/>
                        
                        <!-- Laptop -->
                        <rect x="175" y="270" width="150" height="100" rx="8" fill="#0f172a" stroke="#3b82f6" stroke-width="3"/>
                        <rect x="185" y="280" width="130" height="80" rx="4" fill="#1e293b"/>
                        <path d="M150 380h200l-15 12H165l-15-12z" fill="#64748b"/>
                        
                        <!-- Code lines inside laptop -->
                        <rect x="195" y="295" width="50" height="6" rx="3" fill="#38bdf8"/>
                        <rect x="195" y="307" width="80" height="6" rx="3" fill="#f43f5e"/>
                        <rect x="195" y="319" width="60" height="6" rx="3" fill="#34d399"/>
                        <rect x="195" y="331" width="40" height="6" rx="3" fill="#fbbf24"/>
                        <rect x="195" y="343" width="90" height="6" rx="3" fill="#a78bfa"/>
                        
                        <!-- Developer Silhouette -->
                        <circle cx="120" cy="270" r="25" fill="#fed7aa"/>
                        <path d="M80 320c0-15 10-28 25-30h30c15 2 25 15 25 30v60H80v-60z" fill="#3b46f1"/>
                        
                        <!-- Floating UI Elements / Cards -->
                        <!-- Card 1: Checkmark -->
                        <g filter="drop-shadow(0px 8px 16px rgba(0,0,0,0.15))">
                            <rect x="60" y="140" width="90" height="60" rx="10" fill="#1e293b" fill-opacity="0.9" stroke="#3b46f1" stroke-width="1.5"/>
                            <circle cx="85" cy="170" r="12" fill="#10b981"/>
                            <path d="M80 170l3 3 6-6" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
                            <rect x="105" y="163" width="30" height="6" rx="3" fill="#94a3b8"/>
                            <rect x="105" y="173" width="20" height="4" rx="2" fill="#64748b"/>
                        </g>
                        
                        <!-- Card 2: Chart -->
                        <g filter="drop-shadow(0px 8px 16px rgba(0,0,0,0.15))">
                            <rect x="330" y="180" width="100" height="70" rx="10" fill="#1e293b" fill-opacity="0.9" stroke="#3b46f1" stroke-width="1.5"/>
                            <!-- Bar chart bars -->
                            <rect x="355" y="225" width="8" height="15" rx="2" fill="#ef4444"/>
                            <rect x="370" y="210" width="8" height="30" rx="2" fill="#3b82f6"/>
                            <rect x="385" y="200" width="8" height="40" rx="2" fill="#10b981"/>
                            <rect x="400" y="215" width="8" height="25" rx="2" fill="#f59e0b"/>
                        </g>

                        <!-- Card 3: Task List Item -->
                        <g filter="drop-shadow(0px 8px 16px rgba(0,0,0,0.15))">
                            <rect x="290" y="80" width="110" height="50" rx="10" fill="#1e293b" fill-opacity="0.9" stroke="#8b5cf6" stroke-width="1.5"/>
                            <rect x="305" y="98" width="12" height="12" rx="3" fill="none" stroke="#a78bfa" stroke-width="2"/>
                            <rect x="325" y="97" width="55" height="6" rx="3" fill="#cbd5e1"/>
                            <rect x="325" y="107" width="35" height="4" rx="2" fill="#64748b"/>
                        </g>
                        
                        <!-- Extra Decorative Nodes -->
                        <circle cx="210" cy="110" r="6" fill="#38bdf8"/>
                        <circle cx="280" cy="200" r="4" fill="#a78bfa"/>
                        <circle cx="160" cy="220" r="5" fill="#f43f5e"/>
                    </svg>
                </div>
            </div>

            <!-- Left Panel Footer Tagline -->
            <div class="tagline">
                Empowering productivity, one task at a time.
            </div>
        </div>

        <!-- Right Side: Login Credentials Input Form -->
        <div class="form-panel">

            <!-- Form Wrapper -->
            <div class="form-wrapper">
                
                <!-- Welcome Title -->
                <div class="form-header">
                    <h2 class="form-title">
                        Welcome Back!
                    </h2>
                    <p class="form-subtitle">
                        Sign in to continue
                    </p>
                </div>

                <?php if($errors->any()): ?>
                    <div class="alert-error">
                        <!-- Alert Icon -->
                        <svg class="alert-icon" fill="currentColor" viewBox="0 0 20 20">
                            <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/>
                        </svg>
                        <p class="alert-text">
                            <?php echo e($errors->first()); ?>

                        </p>
                    </div>
                <?php endif; ?>

                <!-- Login Form -->
                <form method="POST" action="<?php echo e(Route::has('login') ? route('login') : '#'); ?>">
                    <?php echo csrf_field(); ?>

                    <!-- Email Address Field -->
                    <div class="form-group">
                        <label for="email" class="form-label">
                            Email Address
                        </label>
                        <div class="input-wrapper">
                            <div class="input-icon">
                                <!-- User Icon SVG -->
                                <svg style="width: 1.25rem; height: 1.25rem;" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                    <path stroke-linecap="round" stroke-linejoin="round" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path>
                                </svg>
                            </div>
                            <input type="email" name="email" id="email" required autofocus
                                class="input-field"
                                placeholder="Email">
                        </div>
                    </div>

                    <!-- Password Field -->
                    <div class="form-group">
                        <label for="password" class="form-label">
                            Password
                        </label>
                        <div class="input-wrapper">
                            <div class="input-icon">
                                <!-- Lock Icon SVG -->
                                <svg style="width: 1.25rem; height: 1.25rem;" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                    <path stroke-linecap="round" stroke-linejoin="round" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path>
                                </svg>
                            </div>
                            <input type="password" name="password" id="password" required
                                class="input-field"
                                placeholder="Password"
                                style="letter-spacing: 0.125em;">
                            <button type="button" id="toggle-password" class="eye-toggle">
                                <!-- Eye Open Icon -->
                                <svg id="eye-open-icon" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                    <path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"></path>
                                    <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path>
                                </svg>
                                <!-- Eye Closed Icon -->
                                <svg id="eye-closed-icon" class="hidden" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
                                    <path stroke-linecap="round" stroke-linejoin="round" d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"></path>
                                </svg>
                            </button>
                        </div>
                    </div>
                    <div style="margin-top: 2rem;">
                        <button type="submit" class="submit-btn">
                            Login
                        </button>
                    </div>
                </form>

            </div>

            <!-- Footer Copyright -->
            <div class="footer-copyright">
                © 2026 Task Panel. All rights reserved.
            </div>
        </div>

    </div>

    <!-- Interactive JS logic -->
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const togglePassword = document.getElementById('toggle-password');
            const passwordInput = document.getElementById('password');
            const eyeOpen = document.getElementById('eye-open-icon');
            const eyeClosed = document.getElementById('eye-closed-icon');

            if (togglePassword && passwordInput) {
                togglePassword.addEventListener('click', function() {
                    if (passwordInput.type === 'password') {
                        passwordInput.type = 'text';
                        eyeOpen.classList.add('hidden');
                        eyeClosed.classList.remove('hidden');
                    } else {
                        passwordInput.type = 'password';
                        eyeOpen.classList.remove('hidden');
                        eyeClosed.classList.add('hidden');
                    }
                });
            }
        });
    </script>
</body>
</html>
<?php /**PATH D:\New\New\admin-panel\resources\views/auth/login.blade.php ENDPATH**/ ?>