<!doctype html>
<html lang="es">
<head>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <meta name="description" content="Epson">
   <meta name="author" content="Alejandro Centeno - @epscolor">
   <meta name="generator" content="epscolor_24.10">
   <title><?php if(isset($title)){echo $title;} ?></title>
   <!-- Bootstrap core CSS -->
   <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/bootstrap-5.2.3-dist/css/bootstrap.min.css">
   <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/bootstrap-icons-1.11.3/font/bootstrap-icons.css">
   <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/bootstrap-table-1.23.5/dist/bootstrap-table.min.css">
   <!-- Custom styles for this template -->
   <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/epscolor/css/epscolor25.1.css">
   <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/epscolor/css/epscolor_dashboard.css">
   <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/epscolor/css/epscolor_print.css" media="print">
   <!-- SET GLOBAL BASE URL -->
   <script>
      var base_url = '<?php echo base_url(); ?>';
   </script>
</head>
<body class="text-center">
   <main class="form-signin w-100 m-auto">
      <div class="container mt-5">
         <div class="d-flex justify-content-center">
            <div class="col-12 col-lg-5">
               <img class="mb-3" src="<?php if (isset($dataConfig['logo'])) {
                  echo base_url() ?>assets/epscolor/img/empresa/<?php echo $dataConfig['logo'] ; } ?>" width="120">
               <h5 class=" fw-normal"><?php if (isset($dataConfig['nombrecorto'])) { echo $dataConfig['nombrecorto']; } ?></h5>
               <p class="mb-4">Sistema 25.1</p>
               <?php if (session('msg')) : ?>
                  <div class="alert alert-<?= session('msg.type') ?>"><?= session('msg.body') ?></div>
               <?php endif; ?>

               <form action="<?= base_url('login/auth') ?>" method="post">
                  <!-- Token CSRF -->
                  <input type="hidden" name="csrf_test_name" value="<?= csrf_hash(); ?>">


                  <div class="form-floating">
                     <input type="email" class="form-control" name="email" placeholder="name@example.com" value="<?= set_value('email') ?>" required>
                     <label for="floatingInput">Email address</label>
                  </div>
                  <div class="form-floating">
                     <input type="password" class="form-control" name="password" id="InputForPassword" placeholder="Password" required>
                     <label for="floatingPassword">Password</label>
                  </div>
                  <div class="checkbox mb-3 mt-1">
                     <label>
                        <input type="checkbox" value="remember-me"> Remember me
                     </label>
                  </div>
                  <button class="w-100 btn btn-primary" type="submit">Sign in</button>
                  <p class="mt-5 mb-3 text-muted">© Epscolor 2025–2026</p>
               </form>
            </div>
         </div>
      </div>
   </main>
   <script src="<?php echo base_url(); ?>assets/jquery-3.3.1/jquery-3.3.1.min.js"></script>
   <script src="<?php echo base_url(); ?>assets/jquery-3.3.1/popper.min.js"></script>
   <script src="<?php echo base_url(); ?>assets/bootstrap-5.2.3-dist/js/bootstrap.bundle.min.js"></script>
   <script src="<?php echo base_url(); ?>assets/bootstrap-table-1.23.5/dist/bootstrap-table.min.js"></script>
   <script src="<?php echo base_url(); ?>assets/epscolor/js/config.js"></script>
   <?= $this->renderSection("scripts"); ?>
</body>
</html>