<?php
require 'app/models/conexion.php';
require 'datos.php'
?>
<!doctype html>
<html lang="es">
<head>
    <?php require 'head.php'; ?>
    <link href="assets/css/estilos.css" rel="stylesheet">
    <style>
        body.bg-dinamico {
            min-height:100vh; display:flex; align-items:center;
            justify-content:center; padding:24px 16px; background-color:#1a3a6e;
        }
        .container { max-width:440px !important; }
        .card { background:rgba(255,255,255,.95)!important; border-radius:22px!important;
                box-shadow:0 12px 50px rgba(0,0,0,.25)!important; backdrop-filter:blur(12px); }
        .form-control { border-radius:10px!important; }
        .btn-primary { border-radius:25px!important; padding:10px 0!important; }
        .row > .col-md-4 { display:none; }
        .well { margin:0!important; padding:0!important; }
        .card.mt-4 { margin-top:0!important; }
    </style>
</head>
<body class="bg-dinamico">

<div class="container">
    <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-4 well">
            <div class="card mt-4">
                <div class="card-body text-center" style="box-shadow: 0 20px 27px 0 rgb(0 252 255 / 30%);">
                    <img src="assets/images/logo.png" style="width: 60%;">
                    <h4 class="my-2" style="font-weight: 400;">Obtener Código</h4>
                    <form action="app/controllers/claveController.php" method="post" autocomplete="off">
                        <?php if (isset($_GET['error'])): ?>
                            <div class="alert alert-danger" role="alert">
                                <?php echo $_GET['error'] ?>
                            </div>
                        <?php endif; ?>
                        <div class="form-floating mb-3">
                            <input type="number" name="cedula" class="form-control" id="floatingInput"
                                   placeholder="cedula" required>
                            <label for="floatingInput">Cédula</label>
                        </div>
                        <div class="form-floating mb-3">
                            <input type="number" name="celular" class="form-control" id="celular"
                                   placeholder="celular" required>
                            <label for="celular">Celular</label>
                        </div>
                        <div class="d-grid gap-2">
                            <input type="submit" name="btnLogin" class="btn btn-primary my-2" value="RECUPERAR"
                                   style="background-color: #17c1e8; border-color: #17c1e8;"/>
                        </div>
                        <a href="https://wa.me/+57<?php echo $celular; ?>?text=<?php echo $textoWS; ?>"
                           class="whatsapp"
                           target="_blank" style="z-index: 999">
                            <i class="fab fa-whatsapp" style="margin-top: 15px;"></i>
                        </a>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
