/*
  login.css — geonation.site
  Implementación propia e independiente (ver theme.css). Paridad visual
  con geodata.site: fondo del hero con foto aérea (genérica, sin monumentos
  reconocibles, licencia Unsplash — uso libre) + el mismo degradado oscuro
  encima que usa geodata.site (src/features/auth/login.css, solo como
  referencia de diseño), para que se lea el texto blanco sobre la foto.
*/

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--brand-font);
  color: var(--brand-text-dark);
  background: var(--brand-white);
}
/* Ver dashboard.css: los controles de formulario no heredan font-family
   solos, hay que decírselo explícito (afecta el botón de "Iniciar sesión"). */
button, input, select, textarea { font-family: inherit; }

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 440px;
}

/* ── Panel izquierdo (hero) ── */
.login-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px;
  color: #fff;
  background-color: var(--brand-navy-950);
}
.login-hero > * { position: relative; z-index: 1; }

/* Carrusel de fotos de fondo — 4 fotos aéreas genéricas, se van alternando
   con fundido cada 5s (ver el <script> al final de login.php). */
.login-hero-bg { position: absolute; inset: 0; z-index: 0; }
.login-hero-bg-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
}
.login-hero-bg-slide.active { opacity: 1; }

/* Mismo degradado oscuro que geodata.site, encima de la foto que esté activa */
.login-hero-overlay {
  position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(155deg, rgba(8,18,32,.86) 0%, rgba(11,33,52,.66) 50%, rgba(10,46,40,.78) 100%);
}

.login-hero-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.18);
  padding: 6px 12px;
  border-radius: var(--brand-radius-pill);
  width: fit-content;
}

.login-hero-main h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.8px;
  margin: 24px 0 16px;
}
.login-hero-main h1 em {
  font-style: normal;
  background: var(--brand-gradient-highlight);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-hero-main p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,.72);
  max-width: 440px;
  margin: 0 0 28px;
}
.login-hero-points { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.login-hero-points li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,.88); }
.login-hero-points .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-dot-accent); box-shadow: 0 0 10px rgba(52,211,153,.6);
  flex-shrink: 0;
}
.login-hero-foot { font-size: 12px; color: rgba(255,255,255,.45); }

/* ── Panel derecho (formulario) ── */
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.login-card { width: 100%; max-width: 372px; }

.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }
.login-logo { height: 34px; width: 34px; }
.login-brand-text { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
/* Azul sólido, igual que "Satelital" en el logo de geodata.site (no el
   degradado esmeralda-cian, que ahí solo se usa en el titular del hero). */
.login-brand-text .accent { color: var(--brand-cyan); }

.login-title { font-size: 24px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.4px; }
.login-subtitle { font-size: 14px; color: var(--brand-text-dark-muted); margin: 0 0 26px; }

.login-error {
  background: rgba(220,38,38,.08);
  border: 1px solid rgba(220,38,38,.25);
  color: var(--brand-red);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.login-error[hidden] { display: none; }

.login-field { display: block; margin-bottom: 16px; }
.login-field-label { display: block; font-size: 12px; font-weight: 600; color: var(--brand-text-dark-muted); margin-bottom: 7px; }
.login-field input {
  width: 100%; height: 46px; padding: 0 14px;
  font-size: 14px; font-family: var(--brand-font); color: var(--brand-text-dark);
  background: var(--brand-gray-50);
  border: 1px solid var(--brand-border-light);
  border-radius: var(--brand-radius-card);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.login-field input::placeholder { color: var(--brand-text-dim); }
.login-field input:focus {
  border-color: var(--brand-cyan);
  background: var(--brand-white);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.login-pw { position: relative; }
.login-pw input { padding-right: 46px; }
.login-pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--brand-text-dim); border-radius: 8px;
}
.login-pw-toggle:hover { color: var(--brand-text-dark-muted); background: var(--brand-gray-50); }

.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 24px; }

.login-switch { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.login-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.login-switch-track { width: 36px; height: 20px; border-radius: 20px; background: var(--brand-border-light); position: relative; transition: background .2s; flex-shrink: 0; }
.login-switch-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--brand-shadow-sm); transition: transform .2s; }
.login-switch input:checked + .login-switch-track { background: var(--brand-success); }
.login-switch input:checked + .login-switch-track .login-switch-thumb { transform: translateX(16px); }
.login-switch-label { font-size: 12.5px; color: var(--brand-text-dark-muted); }

/* Igual que geodata.site: enlace cian, no texto gris estático */
.login-forgot { font-size: 12.5px; color: var(--brand-cyan); text-decoration: none; white-space: nowrap; }
.login-forgot:hover { text-decoration: underline; }

.login-submit {
  width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14.5px; font-weight: 600; color: #fff;
  background: var(--brand-cta-gradient);
  border: none; border-radius: var(--brand-radius-card); cursor: pointer;
  transition: filter .18s, transform .06s, box-shadow .18s;
  box-shadow: 0 4px 14px rgba(21,101,192,.28);
}
.login-submit:hover { filter: brightness(1.06); }
.login-submit:active { transform: translateY(1px); }
.login-submit:disabled { opacity: .65; cursor: default; }

.login-secure { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 22px; font-size: 11.5px; color: var(--brand-text-dim); }

@media (max-width: 880px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { padding: 32px 20px; }
}
