<!doctype html>
<html lang="es">
<head>
    <?php require '../head.php' ?>
    <link href="../assets/css/estilos.css" rel="stylesheet">
    <style>
        /* Centrado card login — mismo patrón index.php */
        body {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
        }
        .container {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            max-width: 100% !important;
        }
        .row {
            justify-content: center;
            width: 100%;
            margin: 0;
        }
        .col-md-4:not(.well) { display: none !important; }
        .col-md-4.well {
            flex: 0 0 auto !important;
            width: auto !important;
            padding: 0 16px;
        }
        .card {
            width: 390px;
            max-width: 92vw;
            margin: -8vh auto 0 auto !important;
            border-radius: 22px !important;
            background: #ffffff !important;
            box-shadow: 0 4px 24px rgba(0,0,0,.10) !important;
            border: none !important;
            overflow: hidden !important;
        }
    </style>
</head>
<body>
<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">
                    <img src="../assets/images/logo.png" style="width: 60%;">
                    <h4 class="my-2" style="font-weight: 400;">Administradores</h4>
                    <form action="../app/controllers/administradores/loginAdminController.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="name@example.com" required>
                            <label for="floatingInput">Cédula</label>
                        </div>
                        <div class="form-floating">
                            <input type="password" name="password" class="form-control" id="floatingPassword"
                                   placeholder="Password" required>
                            <label for="floatingPassword">Contraseña</label>
                        </div>
                        <div class="d-grid gap-2">
                            <input type="submit" name="btnLogin" class="btn btn-primary my-2" value="ENTRAR"
                                   style="background-color: #17c1e8; border-color: #17c1e8;"/>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>