<section class="min-h-[calc(100vh-80px)] bg-cream py-10">
 <div class="mx-auto grid max-w-6xl overflow-hidden rounded-[2rem] border border-slate-100 bg-white shadow-soft lg:grid-cols-2">
  <div class="p-7 sm:p-10 lg:p-14"><a href="/" class="flex items-center gap-2"><img src="/assets/images/tibaleta-mark.svg" class="h-10 w-10"><span class="font-display text-xl font-extrabold">TibaLeta</span></a><div class="mt-12"><h1 class="font-display text-3xl font-extrabold">Welcome back</h1><p class="mt-2 text-sm text-slate-500">Sign in to manage care, visits and your account.</p></div>
  <?php if($errors=session()->getFlashdata('errors')): ?><div class="mt-5 rounded-xl border border-rose-200 bg-rose-50 p-4 text-sm text-rose-700"><?php foreach($errors as $e): ?><div><?= esc($e) ?></div><?php endforeach; ?></div><?php endif; ?>
  <form action="/login" method="post" class="mt-7 space-y-4"><?= csrf_field() ?><div><label class="mb-1.5 block text-xs font-bold text-slate-600">Email address</label><input name="email" type="email" value="<?= esc(old('email')) ?>" autocomplete="email" required class="w-full rounded-xl border border-slate-200 px-4 py-3 text-sm outline-none focus:border-teal-500" placeholder="you@example.com"></div><div><div class="mb-1.5 flex justify-between"><label class="text-xs font-bold text-slate-600">Password</label><a href="/forgot-password" class="text-xs font-semibold text-teal-600">Forgot password?</a></div><input name="password" type="password" autocomplete="current-password" required class="w-full rounded-xl border border-slate-200 px-4 py-3 text-sm outline-none focus:border-teal-500" placeholder="Enter your password"></div><button class="w-full rounded-xl bg-teal-600 px-4 py-3 text-sm font-extrabold text-white hover:bg-teal-700">Sign in</button></form>
  <p class="mt-6 text-center text-sm text-slate-500">Don't have an account? <a class="font-bold text-teal-600" href="/register">Sign up</a></p><div class="mt-7 rounded-xl bg-slate-50 p-4 text-xs leading-5 text-slate-500"><strong>Demo:</strong> patient@tibaleta.test / TibaLeta123! &nbsp; • &nbsp; doctor@tibaleta.test &nbsp; • &nbsp; admin@tibaleta.test</div></div>
  <div class="relative hidden min-h-[650px] lg:block"><img src="/assets/images/tibaleta-practitioner-tablet.png" class="absolute inset-0 h-full w-full object-cover" alt="Healthcare practitioner using TibaLeta"><div class="absolute inset-0 bg-gradient-to-t from-navy/70 via-transparent to-transparent"></div><div class="absolute bottom-10 left-10 max-w-sm text-white"><p class="font-display text-3xl font-extrabold">Quality healthcare at the comfort of your home.</p><p class="mt-3 text-sm text-white/80">One secure platform for patients, families and trusted professionals.</p></div></div>
 </div>
</section>
