<div class="min-h-screen grid lg:grid-cols-2">

    {{-- LEFT SIDE (BRANDING) --}}
    <div class="hidden lg:flex flex-col justify-between bg-gradient-to-br from-primary to-primary/80 text-white p-10">
        <div>
            <x-logo mode="!fill-white" class="w-40 h-16"/>
        </div>
        <div class="space-y-6 max-w-md">
            <h1 class="text-3xl font-semibold leading-tight">
                {{ t('auth.login.hero.title') }}
            </h1>
            <p class="text-sm text-white/80">
                {{ t('auth.login.hero.subtitle') }}
            </p>
        </div>
        <div class="text-xs text-white/50">
            © {{ date('Y') }} {{ config('app.name') }}. {{ t('auth.hero.copyright') }}
        </div>
    </div>

    {{-- RIGHT SIDE --}}
    <div class="flex items-center justify-center p-6">
        <div class="w-full max-w-md space-y-6">

            <div class="lg:hidden text-center">
                <x-logo class="w-40 h-16 mx-auto"/>
            </div>

            <div class="bg-surface border border-border rounded-2xl p-6 shadow-card space-y-5">

                <div>
                    <h2 class="text-xl font-semibold text-text">Neues Passwort setzen</h2>
                    <p class="text-sm text-text-muted mt-1">Gib dein neues Passwort ein.</p>
                </div>

                @if($error)
                    <div class="bg-red-50 text-red-600 rounded-xl px-4 py-3 text-sm">
                        {{ $error }}
                        <a href="/password/reset" class="underline ml-2">Neu anfordern →</a>
                    </div>
                @endif

                <form wire:submit.prevent="reset" class="space-y-4">
                    <div>
                        <label class="text-sm font-medium text-gray-700">Neues Passwort</label>
                        <input
                            type="password"
                            wire:model="password"
                            placeholder="••••••••"
                            class="mt-1 w-full border rounded-xl px-4 py-3 text-sm
                                {{ $errors->has('password') ? 'border-danger' : 'border-border' }}"
                        >
                        @error('password')
                            <p class="text-xs text-danger mt-1">{{ $message }}</p>
                        @enderror
                    </div>

                    <div>
                        <label class="text-sm font-medium text-gray-700">Passwort bestätigen</label>
                        <input
                            type="password"
                            wire:model="password_confirmation"
                            placeholder="••••••••"
                            class="mt-1 w-full border border-border rounded-xl px-4 py-3 text-sm"
                        >
                    </div>

                    <button
                        wire:click="resetPassword"
                        type="button"
                        class="w-full bg-primary text-white py-3 rounded-xl transition hover:opacity-90 text-sm font-medium"
                    >
                        <span wire:loading.remove>Passwort ändern</span>
                        <span wire:loading>Wird gespeichert…</span>
                    </button>
                </form>

            </div>
        </div>
    </div>

</div>
