/* Inicio de sesión de Gamboa: noche, farola y tarjeta oscura. Solo esta página usa este archivo. */
:root {
  --noche: #04120e;
  --bosque: #0c3027;
  --lima: #a5f52b;
  --lima-oscuro: #86d10f;
  --hueso: #f2f5ef;
  --musgo: #8fa59b;
  --tarjeta: rgba(5, 20, 16, .82);
  --error: #ffb4a8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--hueso);
  background: var(--noche);
  font-size: 15px;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body.login-page { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--noche); overflow-x: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Escena de fondo: la moto a la derecha, su farola apunta a la tarjeta. */
.login-escena {
  position: fixed; inset: 0; z-index: 0;
  background:
    linear-gradient(90deg, rgba(4, 18, 14, .85) 0%, rgba(4, 18, 14, .35) 26%, rgba(4, 18, 14, 0) 40%),
    linear-gradient(0deg, rgba(4, 18, 14, .7) 0%, rgba(4, 18, 14, 0) 18%),
    url("/static/img/login-moto.svg") right center / auto 100% no-repeat,
    var(--noche);
  animation: encender 900ms ease-out both;
}
@keyframes encender { from { opacity: .35; } to { opacity: 1; } }

.login-layout {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(320px, 400px) 1fr; align-items: center;
  gap: 32px; padding: 48px clamp(20px, 7vw, 120px) 80px;
}

/* Tarjeta */
.login-card, .login-lema { min-width: 0; }
.login-card {
  background: var(--tarjeta);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(165, 245, 43, .16);
  border-radius: 20px;
  padding: 34px 30px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.login-logo { display: grid; justify-items: center; gap: 2px; margin-bottom: 26px; text-align: center; }
.logo-g { width: 64px; height: 64px; margin-bottom: 4px; }
.logo-nombre { font-size: 34px; font-weight: 900; letter-spacing: .04em; line-height: 1; }
.logo-sub { font-size: 14px; font-weight: 800; letter-spacing: .14em; color: var(--lima); }
.logo-pill { margin-top: 6px; padding: 3px 12px; border: 1px solid rgba(242, 245, 239, .5); border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .14em; }

form { display: grid; gap: 16px; }
.campo { display: grid; gap: 7px; font-size: 14px; font-weight: 600; }
.entrada { position: relative; display: block; }
.entrada input {
  width: 100%; min-height: 50px; padding: 0 48px 0 44px;
  border: 2px solid transparent; border-radius: 10px;
  background: #fff; color: #10241e; font: inherit; font-size: 16px;
}
.entrada input::placeholder { color: #8a9a93; }
.entrada input:focus { outline: none; border-color: var(--lima); box-shadow: 0 0 0 4px rgba(165, 245, 43, .25); }
.entrada-icono, .ver-clave svg { width: 20px; height: 20px; fill: none; stroke: #6c7f77; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.entrada-icono { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.ver-clave {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
}
.ver-clave[aria-pressed="true"] svg { stroke: #10241e; }
.ver-clave:focus-visible { outline: 3px solid var(--lima); outline-offset: 0; }

.login-opciones { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.recordar { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; cursor: pointer; }
.recordar input { width: 18px; height: 18px; accent-color: var(--lima); margin: 0; }
.olvido { min-height: 44px; padding: 0; border: 0; background: none; color: var(--lima); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(165, 245, 43, .4); }
.olvido:hover { text-decoration-color: var(--lima); }
.olvido:focus-visible, .recordar input:focus-visible { outline: 3px solid var(--lima); outline-offset: 3px; }
.ayuda-clave { margin: -6px 0 0; padding: 12px 14px; border-radius: 10px; background: rgba(165, 245, 43, .1); color: #dfeacf; font-size: 14px; }
.login-error { margin: 0; padding: 10px 14px; border-radius: 10px; background: rgba(165, 56, 50, .25); border: 1px solid rgba(255, 180, 168, .4); color: var(--error); font-size: 14px; }

.btn-entrar {
  min-height: 52px; margin-top: 4px; border: 0; border-radius: 10px;
  background: var(--lima); color: #0c2a1f; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
  transition: background-color .15s ease;
}
.btn-entrar:hover { background: var(--lima-oscuro); }
.btn-entrar:focus-visible { outline: 3px solid var(--hueso); outline-offset: 3px; }
.btn-entrar:disabled { opacity: .65; cursor: wait; }

/* Lema sobre la escena */
.login-lema {
  justify-self: end; align-self: end; margin: 0 0 7vh;
  font-size: clamp(32px, 4vw, 60px); font-weight: 900; font-style: italic; line-height: .98;
  text-transform: uppercase; letter-spacing: -.01em; text-align: left;
  color: var(--hueso); text-shadow: 0 4px 24px rgba(0, 0, 0, .6);
  transform: rotate(-4deg); transform-origin: right bottom;
}
.login-lema span { color: var(--lima); }

.login-pie {
  position: relative; z-index: 1;
  margin-top: -56px; padding: 0 20px 22px; text-align: center;
  font-size: 13px; color: var(--musgo);
}

/* Celular: la escena arriba, la tarjeta debajo. */
@media (max-width: 820px) {
  .login-escena {
    position: absolute; bottom: auto; height: 46vh;
    background:
      linear-gradient(0deg, var(--noche) 0%, rgba(4, 18, 14, 0) 45%),
      url("/static/img/login-moto.svg") 62% center / cover no-repeat,
      var(--noche);
  }
  .login-layout { grid-template-columns: 1fr; align-items: start; gap: 0; padding: 0 16px 24px; }
  .login-lema { order: -1; justify-self: start; align-self: end; padding-top: 25vh; margin: 0 0 18px; font-size: clamp(28px, 8.5vw, 40px); transform: rotate(-3deg); transform-origin: left bottom; }
  .login-card { padding: 28px 20px 24px; }
  .login-logo { margin-bottom: 20px; }
  .login-pie { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .login-escena { animation: none; }
  .btn-entrar { transition: none; }
}
