<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Recuperar Senha — Breno Paiva Advocacia</title>
    <link rel="stylesheet" href="<?php echo base_url('assets/bootstrap/css/bootstrap.min.css')?>">
    <link rel="stylesheet" href="<?php echo base_url('assets/css/font-awesome.min.css')?>">
    <?php if(!empty($turnstile_key)): ?>
    <script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
    <?php endif; ?>
    <style>
        body { background:linear-gradient(135deg,#1a1a2e 0%,#16213e 50%,#0f3460 100%); min-height:100vh; display:flex; align-items:center; justify-content:center; font-family:'Segoe UI',Arial,sans-serif; }
        .card { width:100%; max-width:420px; background:#fff; border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,.4); overflow:hidden; }
        .card-header { background:linear-gradient(135deg,#1a1a2e,#0f3460); padding:30px; text-align:center; color:#fff; }
        .card-header h3 { margin:0; font-size:20px; }
        .card-header p { margin:8px 0 0; opacity:.7; font-size:13px; }
        .card-body { padding:30px; }
        .form-control { height:44px; border-radius:6px; border-color:#dee2e6; }
        .form-control:focus { border-color:#0f3460; box-shadow:0 0 0 3px rgba(15,52,96,.15); }
        .btn-primary { width:100%; height:46px; background:linear-gradient(135deg,#1a1a2e,#0f3460); border:none; font-weight:600; border-radius:6px; }
        .btn-primary:hover { background:linear-gradient(135deg,#0f3460,#e94560); }
        .alert { border-radius:6px; font-size:13px; }
        .back-link { text-align:center; margin-top:16px; font-size:13px; }
        .back-link a { color:#0f3460; text-decoration:none; }
        .cf-turnstile { display:flex; justify-content:center; margin:16px 0; }
        .card-footer { background:#f8f9fa; padding:12px; text-align:center; font-size:11px; color:#aaa; }
    </style>
</head>
<body>
<div class="card">
    <div class="card-header">
        <h3><i class="fa fa-key"></i> Recuperar Senha</h3>
        <p>Informe seu e-mail para receber o link de redefinição</p>
    </div>
    <div class="card-body">
        <?php if($this->session->flashdata('message')): ?>
        <div class="alert alert-success"><i class="fa fa-check-circle"></i> <?php echo $this->session->flashdata('message')?></div>
        <?php endif; ?>
        <?php if($this->session->flashdata('error')): ?>
        <div class="alert alert-danger"><i class="fa fa-exclamation-triangle"></i> <?php echo $this->session->flashdata('error')?></div>
        <?php endif; ?>

        <form method="post" action="<?php echo site_url('forgot/forgot_password')?>">
            <div class="form-group">
                <label><i class="fa fa-envelope"></i> E-mail cadastrado</label>
                <input type="email" name="email" class="form-control" 
                       placeholder="seu@email.com.br" required autocomplete="email">
            </div>
            <?php if(!empty($turnstile_key)): ?>
            <div class="cf-turnstile" data-sitekey="<?php echo $turnstile_key?>"></div>
            <?php endif; ?>
            <input type="hidden" name="submitted" value="1">
            <button type="submit" class="btn btn-primary">
                <i class="fa fa-paper-plane"></i> Enviar Link de Redefinição
            </button>
        </form>
        <div class="back-link">
            <a href="<?php echo site_url('admin/login')?>"><i class="fa fa-arrow-left"></i> Voltar ao login</a>
        </div>
    </div>
    <div class="card-footer">Breno Paiva Advocacia - Gerência de Tecnologia da Informação</div>
</div>
</body>
</html>
