<?php
require_once 'config/config.php';
$conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);

$nombre = 'Admin Test';
$email = 'admin2@demo.com';
$passwordPlano = '123456';
$negocio_id = 1;
$hash = password_hash($passwordPlano, PASSWORD_DEFAULT);

$stmt = $conn->prepare("INSERT INTO usuarios (negocio_id, nombre, email, password, rol) VALUES (?, ?, ?, ?, 'admin')");
$stmt->bind_param("isss", $negocio_id, $nombre, $email, $hash);

if ($stmt->execute()) {
    echo "✅ Usuario creado: admin2@demo.com / 123456";
} else {
    echo "❌ Error: " . $conn->error;
}
