<!DOCTYPE html>
<html lang="es">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Login Catalogo</title>
	<link rel="preconnect" href="https://fonts.googleapis.com">
	<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
	<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&display=swap" rel="stylesheet">
	<style>
		body { margin:0; font-family:'Outfit',sans-serif; background:linear-gradient(140deg, #0f172a, #1d3557, #457b9d); min-height:100vh; display:flex; align-items:center; justify-content:center; }
		.card { width:min(420px, 92vw); background:#fff; border-radius:16px; padding:22px; box-shadow:0 18px 45px rgba(0,0,0,.28); }
		h1 { margin:0 0 10px; color:#0f172a; }
		p { margin:0 0 16px; color:#64748b; }
		label { display:block; margin-bottom:6px; font-size:13px; color:#334155; }
		input { width:100%; border:1px solid #cbd5e1; border-radius:10px; padding:10px 11px; font:inherit; margin-bottom:10px; }
		button { width:100%; background:#1d4ed8; color:#fff; border:none; border-radius:10px; padding:11px; font-weight:700; cursor:pointer; }
		.error { margin-bottom:10px; padding:9px 10px; background:#fee2e2; color:#b91c1c; border-radius:10px; font-size:14px; }
	</style>
</head>
<body>
	<div class="card">
		<h1>Catalogo Login</h1>
		<p>Usa el mismo usuario y clave de PHPPOS.</p>

		<?php if (!empty($error)): ?>
			<div class="error"><?php echo html_escape($error); ?></div>
		<?php endif; ?>

		<form method="post" action="<?php echo site_url('catalog/login/submit'); ?>">
			<label>Usuario</label>
			<input type="text" name="username" required>
			<label>Clave</label>
			<input type="password" name="password" required>
			<button type="submit">Entrar</button>
		</form>
	</div>
</body>
</html>
