<!DOCTYPE html>
<html lang="es" data-bs-theme="<?php echo e($appConfig['tema'] === 'oscuro' ? 'dark' : 'light'); ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ingresar | <?php echo e($appConfig['empresa']); ?></title>
<link rel="icon" href="<?php echo e(asset($appConfig['favicon'])); ?>">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" rel="stylesheet">
<style>
:root { --color-primario: <?php echo e($appConfig['color_primario']); ?>; --color-secundario: <?php echo e($appConfig['color_secundario']); ?>; }
body { margin:0; min-height:100vh; display:flex; align-items:center; justify-content:center;
  background: url('<?php echo e(asset($appConfig['fondo_login'])); ?>') center/cover no-repeat fixed; }
body::before { content:''; position:fixed; inset:0; background: rgba(0,0,0,.45); z-index:0; }
.login-card { position:relative; z-index:1; max-width:420px; width:90%; background: rgba(255,255,255,.97);
  border-radius: 16px; padding: 2rem; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.login-card .logo { display:block; max-height: 80px; margin: 0 auto 1rem auto; }
.btn-primario { background: var(--color-primario); color:#fff; border: none; }
.btn-primario:hover { background: var(--color-secundario); color:#fff; }
.app-title { color: var(--color-primario); font-weight: 700; }
@media (max-width:480px) { .login-card { padding: 1.4rem; } }
</style>
</head>
<body>
<div class="login-card">
  <img class="logo" src="<?php echo e(asset($appConfig['logo_largo'])); ?>" alt="<?php echo e($appConfig['empresa']); ?>"
       onerror="this.src='<?php echo e(asset($appConfig['logo_cuadrado'])); ?>'">
  <h4 class="app-title text-center mb-1"><?php echo e($appConfig['empresa']); ?></h4>
  <p class="text-center text-muted small mb-4"><?php echo e($appConfig['nombre_sistema']); ?></p>

  <?php if(session('error')): ?>
    <div class="alert alert-danger small"><?php echo e(session('error')); ?></div>
  <?php endif; ?>
  <?php if($errors->any()): ?>
    <div class="alert alert-danger small"><ul class="mb-0"><?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $e): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><li><?php echo e($e); ?></li><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></ul></div>
  <?php endif; ?>

  <form method="POST" action="<?php echo e(route('login')); ?>" autocomplete="off"><?php echo csrf_field(); ?>
    <div class="mb-3">
      <label class="form-label small fw-bold"><i class="fa fa-user"></i> Usuario</label>
      <input name="usuario" value="<?php echo e(old('usuario')); ?>" class="form-control form-control-lg" required autofocus>
    </div>
    <div class="mb-3">
      <label class="form-label small fw-bold"><i class="fa fa-lock"></i> Contraseña</label>
      <div class="input-group">
        <input name="password" type="password" id="pwd" class="form-control form-control-lg" required>
        <button type="button" class="btn btn-outline-secondary" onclick="const p=document.getElementById('pwd');p.type=p.type==='password'?'text':'password';">
          <i class="fa fa-eye"></i>
        </button>
      </div>
    </div>
    <div class="form-check mb-3">
      <input class="form-check-input" type="checkbox" name="recordar" id="recordar">
      <label class="form-check-label small" for="recordar">Recordar sesión</label>
    </div>
    <button class="btn btn-primario btn-lg w-100"><i class="fa fa-right-to-bracket"></i> Ingresar</button>
  </form>
  <p class="text-center text-muted small mt-3 mb-0">&copy; <?php echo e(date('Y')); ?> <?php echo e($appConfig['empresa']); ?></p>
</div>
</body>
</html>
<?php /**PATH C:\xampp\htdocs\mto\resources\views/auth/login.blade.php ENDPATH**/ ?>