<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login - IBIZA CEA</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css" rel="stylesheet">
    <style>
        body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; position: relative; padding-bottom: 60px; }
        .login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
        .login-card { max-width: 400px; width: 100%; }
        .login-card .card-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; }
        footer { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.2); }
    </style>
</head>
<body>
    <div class="login-container">
        <div class="card login-card shadow">
            <div class="card-header text-center py-4">
                <h3><i class="bi bi-house-door-fill"></i> IBIZA CEA</h3>
                <p class="mb-0">Sistema de Gestión</p>
            </div>
            <div class="card-body p-4">
                <?php if (isset($error)): ?>
                    <div class="alert alert-danger"><?= htmlspecialchars($error) ?></div>
                <?php endif; ?>
                 <form method="POST">
                    <div class="mb-3">
                        <label for="username" class="form-label"><i class="bi bi-person"></i> Usuario</label>
                        <input type="text" class="form-control" id="username" name="username" required autofocus>
                    </div>
                    <div class="mb-3">
                        <label for="password" class="form-label"><i class="bi bi-lock"></i> Contraseña</label>
                        <input type="password" class="form-control" id="password" name="password" required>
                    </div>
                    <div class="d-grid">
                        <button type="submit" class="btn btn-primary">Iniciar Sesión</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <footer class="text-center text-white py-3">
        <p class="mb-0 small">Condiminio IBIZA - Derechos Reservados Miguel Pons casa 11</p>
    </footer>
</body>
</html>
