@page "/login2"
@{
    ViewData["Title"] = "Login 2";
}
@{
    ViewData["SidebarVariant"] = "2";
    ViewData["HideChrome"] = true;
    ViewData["Css:auth2.css"] = "css/auth2.css";

}

<section class="min-h-screen flex" x-data="{ loading: false, notification: { show: false, message: '' } }">
    <div class="hidden lg:flex w-1/2 bg-gradient-to-br from-blue-50/30 to-white items-center justify-center p-12">
        <div class="max-w-md">
            <div class="flex items-center gap-3 mb-8">
                <div class="w-14 h-14 bg-blue-600 rounded-xl flex items-center justify-center shadow-lg shadow-blue-200">
                    <svg class="w-8 h-8 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>
                </div>
                <div>
                    <div class="text-2xl font-bold text-gray-900">EnterpriseKit</div>
                    <div class="text-sm text-gray-500">Enterprise Application Platform</div>
                </div>
            </div>
            <h2 class="text-3xl font-bold text-gray-900 leading-tight mb-4">Welcome Back to<br/>Your Enterprise Hub</h2>
            <p class="text-gray-500 leading-relaxed mb-8">Sign in to access your dashboard, manage your applications, and collaborate with your team across all your enterprise modules.</p>
            <div class="space-y-4">
                <div class="flex items-start gap-3">
                    <div class="w-5 h-5 rounded bg-blue-100 flex items-center justify-center flex-shrink-0 mt-0.5"><svg class="w-3 h-3 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg></div>
                    <div><span class="font-semibold text-gray-900 text-sm">Multi-Module Access</span><p class="text-xs text-gray-400 mt-0.5">CRM, HRM, WMS, TMS, ITSM and more</p></div>
                </div>
                <div class="flex items-start gap-3">
                    <div class="w-5 h-5 rounded bg-blue-100 flex items-center justify-center flex-shrink-0 mt-0.5"><svg class="w-3 h-3 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg></div>
                    <div><span class="font-semibold text-gray-900 text-sm">Real-Time Analytics</span><p class="text-xs text-gray-400 mt-0.5">Live dashboards with ChartJS visualization</p></div>
                </div>
                <div class="flex items-start gap-3">
                    <div class="w-5 h-5 rounded bg-blue-100 flex items-center justify-center flex-shrink-0 mt-0.5"><svg class="w-3 h-3 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg></div>
                    <div><span class="font-semibold text-gray-900 text-sm">Enterprise Security</span><p class="text-xs text-gray-400 mt-0.5">SSO, MFA, and role-based access control</p></div>
                </div>
            </div>
            <div class="mt-10 p-4 bg-white border border-blue-100 rounded-xl shadow-sm">
                <div class="flex items-center gap-3">
                    <div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center flex-shrink-0">
                        <svg class="w-5 h-5 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"/></svg>
                    </div>
                    <div>
                        <div class="text-sm font-semibold text-gray-900">24/7 Enterprise Support</div>
                        <div class="text-xs text-gray-400">Dedicated support team available around the clock</div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="w-full lg:w-1/2 flex items-center justify-center p-6 sm:p-10 lg:p-16">
        <div class="w-full max-w-md">
            <div class="mb-8">
                <h2 class="text-2xl font-bold text-gray-900">Sign In</h2>
                <p class="text-gray-500 text-sm mt-1">Enter your credentials to access your account</p>
            </div>

            <form @@submit.prevent="
                loading = true;
                setTimeout(() => {
                    loading = false;
                    notification = { show: true, message: 'Welcome back! You have been signed in successfully.' };
                    setTimeout(() => { notification.show = false; }, 4000);
                }, 3000);
            ">
                <div class="space-y-4">
                    <div>
                        <label class="form-label" for="email">Email Address</label>
                        <input class="input-field" id="email" type="email" placeholder="you@company.com" required>
                    </div>
                    <div>
                        <div class="flex items-center justify-between mb-1">
                            <label class="form-label mb-0" for="password">Password</label>
                            <a class="text-link text-xs" href="/forgotpassword2">Forgot password?</a>
                        </div>
                        <input class="input-field" id="password" type="password" placeholder="Enter your password" required>
                    </div>
                    <div class="flex items-center gap-2">
                        <input class="checkbox-custom" id="remember" type="checkbox">
                        <label class="text-sm text-gray-600 cursor-pointer select-none" for="remember">Remember me</label>
                    </div>
                    <button class="btn-primary" type="submit" :disabled="loading">
                        <template x-if="!loading">
                            <span class="flex items-center gap-2">
                                Sign In
                                <svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 7l5 5m0 0l-5 5m5-5H6"/></svg>
                            </span>
                        </template>
                        <template x-if="loading">
                            <span class="flex items-center gap-2">
                                <svg class="animate-spin w-4 h-4" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"/><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"/></svg>
                                Signing in...
                            </span>
                        </template>
                    </button>
                </div>
            </form>

            <div class="divider"><span>Or continue with</span></div>

            <div class="space-y-3">
                <button class="btn-outline" type="button">
                    <svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/></svg>
                    Sign in with Google
                </button>
                <button class="btn-outline" type="button">
                    <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24"><path d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z"/></svg>
                    Sign in with Facebook
                </button>
            </div>

            <p class="mt-6 text-center text-sm text-gray-500">
                Don't have an account?
                <a class="auth-link ml-1" href="/register2">Create one</a>
            </p>
        </div>
    </div>
<div class="fixed top-4 right-4 z-[200] transition-all duration-300"
     x-show="notification.show"
     x-transition:enter="transform ease-out duration-300"
     x-transition:enter-start="translate-x-full opacity-0"
     x-transition:enter-end="translate-x-0 opacity-100"
     x-transition:leave="transform ease-in duration-200"
     x-transition:leave-start="translate-x-0 opacity-100"
     x-transition:leave-end="translate-x-full opacity-0"
     x-cloak>
    <div class="flex items-center gap-3 bg-white border border-blue-100 shadow-lg rounded-xl px-5 py-4 min-w-[320px]">
        <div class="w-8 h-8 rounded-full bg-green-100 flex items-center justify-center flex-shrink-0">
            <svg class="w-4 h-4 text-green-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg>
        </div>
        <div class="flex-1">
            <p class="text-sm font-semibold text-gray-900">Success</p>
            <p class="text-xs text-gray-500" x-text="notification.message"></p>
        </div>
        <button class="text-gray-400 hover:text-gray-600" @@click="notification.show = false">
            <svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/></svg>
        </button>
    </div>
</div>

</section>
