/* Login — lockup estilo presentación Alza (logo + lema + panel de acceso) */
.login-page {
  min-height: 100vh;
  margin: 0;
  background: #d1d5db;
  font-family: "Inter", var(--font);
}

/* Mitad / mitad: identidad (como la ficha con logo) + formulario (como pantallas B2B) */
.login-split {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: #fff;
}

/* Panel izquierdo: logo grande, lema en gris (como la referencia) */
.login-hero {
  flex: 1 1 50%;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: linear-gradient(165deg, #ffffff 0%, #f7f8fa 45%, #f0f2f5 100%);
  overflow: hidden;
}

/* Lava de color suave (evoca la cinta del logotipo) */
.login-hero-blob {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 0% 100%, rgba(234, 88, 12, 0.11) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 15% 85%, rgba(185, 28, 28, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 30% 95%, rgba(253, 230, 138, 0.2) 0%, transparent 45%);
  pointer-events: none;
}

/* Forma ondulada con gradiente rojo–naranja–dorado (como el gráfico de la foto) */
.login-hero-ribbon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(38vh, 220px);
  pointer-events: none;
  opacity: 0.55;
}
.login-hero-ribbon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.login-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 26rem;
}

/* Logo: protagonista, ancho generoso */
.login-logo-img {
  display: block;
  margin: 0 auto;
  max-width: min(360px, 100%);
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(10, 37, 64, 0.06));
}

/* Lema: tipografía más fina, gris medio (como en el logotipo impreso) */
.login-slogan-hero {
  margin: 1.15rem 0 0;
  font-size: clamp(0.85rem, 2.3vw, 0.95rem);
  font-weight: 400;
  line-height: 1.45;
  color: #6b7280;
  letter-spacing: 0.01em;
}

/* Producto / sistema debajo, discreto */
.login-product-hero {
  margin: 0.9rem 0 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #0a2540;
}

/* Panel derecho: formulario sobre blanco puro */
.login-form-panel {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
}

.login-form-inner {
  width: 100%;
  max-width: 380px;
}

.login-form-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: #0a2540;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.login-form-sub {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.4;
}

.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap i {
  position: absolute;
  left: 0.9rem;
  color: #9ca3af;
  font-size: 0.9rem;
  pointer-events: none;
}
.input-wrap .has-ico { padding-left: 2.45rem; }

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fafafa;
  color: #111827;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.form-group input::placeholder { color: #9ca3af; }
.form-group input:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.form-group input:focus {
  outline: none;
  border-color: #ea580c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}

.btn-primary {
  width: 100%;
  padding: 0.82rem 1.1rem;
  border: none;
  border-radius: 8px;
  background: #0a2540;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 0.35rem;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(10, 37, 64, 0.2);
  transition: background 0.2s, transform 0.05s, box-shadow 0.2s;
}
.btn-primary:hover { background: #0f3454; box-shadow: 0 4px 14px rgba(10, 37, 64, 0.25); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}

.login-err {
  display: none;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.875rem;
  margin-bottom: 1.1rem;
  text-align: left;
}
.login-err.show { display: block; }

.login-footer {
  margin: 1.5rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid #e5e7eb;
  text-align: left;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #6b7280;
}
.login-footer kbd,
.login-footer code {
  font-size: 0.7em;
  background: #f3f4f6;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: #374151;
  font-family: ui-monospace, Consolas, monospace;
}

/* Móvil: apilado — primero identidad (como la ficha de marca), luego formulario */
@media (max-width: 800px) {
  .login-split { flex-direction: column; min-height: 100%; max-width: none; }
  .login-hero {
    min-height: auto;
    padding: 2.25rem 1.5rem 2.5rem;
  }
  .login-hero-ribbon { height: 120px; opacity: 0.45; }
  .login-form-panel {
    border-left: none;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 1.5rem 2.5rem;
  }
  .login-form-title { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary { transition: none; }
}
