<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Create account · Epelcon Hospitality</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
    <script src="https://cdn.tailwindcss.com?plugins=forms"></script>
    <script>tailwind.config = { theme: { extend: { fontFamily: { sans: ['"Plus Jakarta Sans"', 'sans-serif'], serif: ['"Playfair Display"', 'serif'] }, colors: { gold: { 400: '#d4af37', 500: '#c9a227', 600: '#a8871f' } } } } };</script>
</head>
<body class="min-h-screen bg-slate-950 font-sans text-slate-800 antialiased">
<div class="absolute inset-0 opacity-30" style="background-image: radial-gradient(circle at 15% 15%, #c9a22740 0, transparent 40%), radial-gradient(circle at 85% 80%, #4f46e540 0, transparent 40%)"></div>

<div class="relative flex min-h-screen items-center justify-center p-4">
    <div class="w-full max-w-md py-8">
        <a href="{{ route('home') }}" class="mb-8 flex flex-col items-center gap-2">
            <div class="flex h-14 w-14 items-center justify-center rounded-2xl bg-gradient-to-br from-gold-400 to-gold-600 text-2xl font-extrabold text-slate-950 shadow-xl shadow-gold-500/20">E</div>
            <span class="font-serif text-2xl font-bold text-white">Epelcon Hospitality</span>
        </a>

        <div class="rounded-3xl bg-white p-7 shadow-2xl sm:p-9">
            <h1 class="text-xl font-extrabold text-slate-900">Create your account</h1>
            <p class="mt-1 text-sm text-slate-500">Book stays, order food, earn rewards — all in one place.</p>

            @if ($errors->any())
                <div class="mt-4 rounded-2xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-800">
                    <ul class="list-inside list-disc">@foreach ($errors->all() as $error)<li>{{ $error }}</li>@endforeach</ul>
                </div>
            @endif

            <form method="POST" action="{{ route('register') }}" class="mt-5 space-y-4">
                @csrf
                <label class="block"><span class="mb-1 block text-xs font-bold uppercase tracking-wide text-slate-500">Full name</span>
                    <input name="name" value="{{ old('name') }}" required autofocus class="w-full rounded-xl border-slate-200 focus:border-gold-500 focus:ring-gold-500"></label>
                <label class="block"><span class="mb-1 block text-xs font-bold uppercase tracking-wide text-slate-500">Email</span>
                    <input type="email" name="email" value="{{ old('email') }}" required class="w-full rounded-xl border-slate-200 focus:border-gold-500 focus:ring-gold-500"></label>
                <label class="block"><span class="mb-1 block text-xs font-bold uppercase tracking-wide text-slate-500">Phone</span>
                    <input name="phone" value="{{ old('phone') }}" class="w-full rounded-xl border-slate-200 focus:border-gold-500 focus:ring-gold-500"></label>
                <div class="grid grid-cols-2 gap-4">
                    <label><span class="mb-1 block text-xs font-bold uppercase tracking-wide text-slate-500">Password</span>
                        <input type="password" name="password" required minlength="8" class="w-full rounded-xl border-slate-200 focus:border-gold-500 focus:ring-gold-500"></label>
                    <label><span class="mb-1 block text-xs font-bold uppercase tracking-wide text-slate-500">Confirm</span>
                        <input type="password" name="password_confirmation" required class="w-full rounded-xl border-slate-200 focus:border-gold-500 focus:ring-gold-500"></label>
                </div>
                <label class="block"><span class="mb-1 block text-xs font-bold uppercase tracking-wide text-slate-500">Referral code <span class="normal-case text-slate-400">(optional — your friend earns points!)</span></span>
                    <input name="referral_code" value="{{ old('referral_code', request('ref')) }}" class="w-full rounded-xl border-slate-200 font-mono uppercase focus:border-gold-500 focus:ring-gold-500" placeholder="e.g. EPELCON1"></label>
                <button class="w-full rounded-xl bg-gradient-to-r from-gold-400 to-gold-600 py-3.5 text-sm font-extrabold text-slate-950 shadow-lg shadow-gold-500/20 hover:brightness-110">Create account →</button>
            </form>

            <p class="mt-5 text-center text-sm text-slate-500">Already have an account? <a href="{{ route('login') }}" class="font-bold text-gold-600 hover:underline">Sign in</a></p>
        </div>
    </div>
</div>
</body>
</html>
