<?php require __DIR__.'/../lib/bootstrap.php'; if(user())redirect(role_home(user()['role'])); if($_SERVER['REQUEST_METHOD']==='POST'){if(!verify_csrf())$error='Your session expired. Please retry.';elseif(login_user($_POST['email'],$_POST['password']))redirect(role_home(user()['role']));else $error='Invalid email or password.';} $pageTitle='Log in';require __DIR__.'/../blocks/app-header.php';?><section class="auth-shell"><div class="auth-art"><div class="eyebrow">YOUR FUNDZ WORKSPACE</div><h1>Market intelligence built around your role.</h1><p class="hero-copy">Businesses plan and request quotes. Providers manage listings and leads. Operations validates market data. Administrators oversee everything.</p></div><div class="auth-panel"><div class="card form-card"><h2>Welcome back</h2><?php if(isset($error)):?><div class="flash danger"><?=e($error)?></div><?php endif;?><form method="post"><?=csrf_field()?><div class="form-group"><label>Email</label><input class="form-control" type="email" name="email" required></div><div class="form-group"><label>Password</label><input class="form-control" type="password" name="password" required></div><button class="dark-btn" type="submit">Log in</button></form><p class="muted small">Demo accounts are listed in README-FIRST.txt after installation.</p></div></div></section><?php require __DIR__.'/../blocks/app-footer.php';?>