<?php
// Layout para login: sin navbar ni WebSocket, tema claro.
// Variables esperadas: $title (string), $content (HTML string)
$title = isset($title) ? $title : 'Login • ESP Admin';
$content = isset($content) ? $content : '';
$CSS_VERSION = '20260522-tailwind';
$JS_VERSION = '20250827-1139';
?>
<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title><?php echo htmlspecialchars($title); ?></title>
  <link rel="stylesheet" href="/assets/css/tailwind.css?v=<?php echo $CSS_VERSION; ?>">
  <link rel="stylesheet" href="/assets/css/layout.css?v=<?php echo $CSS_VERSION; ?>">
  <link rel="icon" href="/favicon.ico" type="image/x-icon" />
  <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
  <script src="/assets/js/toast.js?v=20250915-1005"></script>
  <script src="/assets/js/apiClient.js?v=20250827-1001"></script>
  <script src="/assets/js/layout_login.js?v=<?php echo $JS_VERSION; ?>"></script>
  <script src="/assets/js/auth.js?v=20250827-1001"></script>
</head>
<body class="w-full h-screen bg-gray-50 text-gray-900" data-layout="php">
 
  <div class="w-full">
    <?php echo $content; ?>
  </div>

  <!-- Footer -->
  <footer class="border-t border-gray-200">
    <div class="max-w-7xl mx-auto px-4 py-4 text-center text-sm text-gray-500">ESP Project • v1 • <?php echo date('Y'); ?></div>
  </footer>

  <!-- Toasts container -->
  <div class="fixed bottom-0 right-0 p-3 z-50" id="toast-container"></div>

</body>
</html>
