<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login — LABRE-DX Contest</title>
    <link rel="stylesheet" href="{{ asset('css/app.css') }}">
</head>
<body class="login-page">
<div class="login-box">
    <div class="login-logo">
        <h1>🏆 LABRE-DX Contest</h1>
        <p>Sistema de Apuração — Acesso Restrito</p>
        @if($contestAtivo)
            <p class="contest-info">{{ $contestAtivo->name }}</p>
        @endif
    </div>
 
    @if($errors->any())
        <div class="alert alert-danger">
            @foreach($errors->all() as $erro)<div>{{ $erro }}</div>@endforeach
        </div>
    @endif
 
    <form method="POST" action="{{ route('login.post') }}">
        @csrf
        <div class="form-group">
            <label for="email">E-mail</label>
            <input type="email" id="email" name="email"
                   value="{{ old('email') }}" placeholder="seu@email.com"
                   required autofocus>
        </div>
        <div class="form-group">
            <label for="password">Senha</label>
            <input type="password" id="password" name="password"
                   placeholder="••••••••" required>
        </div>
        <div class="form-group" style="display:flex;align-items:center;gap:.5rem">
            <input type="checkbox" id="remember" name="remember">
            <label for="remember" style="font-weight:normal;margin:0">Manter conectado</label>
        </div>
        <button type="submit" class="btn btn-primary btn-block">Entrar</button>
    </form>
    <div style="text-align:center;margin-top:1.25rem;padding-top:1.25rem;border-top:1px solid #eee">
        <a href="{{ route('public.resultados.resultado') }}"
           style="color:#1B4F8C;font-size:.9rem;text-decoration:none;font-weight:600">
            🏆 Consulte aqui seu resultado
        </a>
    </div>
</div>
</body>
</html>
