/* =========================================================================
   ECO — Login (rediseño de marca). Todo scopeado bajo .eco-login.
   Tokens: acento marca navy #19255a, tinta #1c1d21, Work Sans (UI) + Libre
   Baskerville (display). Ver skill eco-ux.
   ========================================================================= */

.eco-login {
  --eco-brand: #19255a;        /* navy UO — acento en panel claro + CTA */
  --eco-brand-hover: #232f72;  /* hover del CTA (un punto más claro) */
  --eco-brand-light: #9db4f0;  /* acento legible SOBRE el navy oscuro */
  --eco-ink: #1c1d21;
  --eco-muted: #6b6f76;
  --eco-line: #e6e7ea;
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: #fff;
  color: var(--eco-ink);
  font-family: "Work Sans", -apple-system, "Segoe UI", sans-serif;
  overflow: hidden;
}
.eco-login *,
.eco-login *::before,
.eco-login *::after { box-sizing: border-box; }

/* ----------------------------- Panel de marca ---------------------------- */
.eco-login__brand {
  position: relative;
  flex: 1 1 46%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3.25rem;
  color: #fff;
  background:
    radial-gradient(115% 115% at 12% 8%, rgba(120, 150, 230, .30), transparent 52%),
    radial-gradient(90% 90% at 100% 100%, rgba(120, 150, 230, .12), transparent 60%),
    linear-gradient(158deg, #24316f 0%, #19255a 55%, #0f1636 100%);
  overflow: hidden;
}
/* filete/acento geométrico sutil */
.eco-login__brand::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -22%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  border: 1px solid rgba(157, 180, 240, .20);
  box-shadow: 0 0 0 40px rgba(157, 180, 240, .05);
  pointer-events: none;
}
.eco-login__brand-inner { position: relative; z-index: 1; margin-top: auto; margin-bottom: auto; }
.eco-login__logo {
  width: 232px;
  max-width: 70%;
  height: auto;
  margin-bottom: 2.25rem;
}
.eco-login__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--eco-brand-light);
  margin-bottom: 1rem;
}
.eco-login__eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--eco-brand-light);
  border-radius: 2px;
}
.eco-login__tagline {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  line-height: 1.24;
  margin: 0 0 1rem;
  color: #fff;
}
.eco-login__tagline em { color: var(--eco-brand-light); font-style: normal; }
.eco-login__sub {
  max-width: 34ch;
  font-size: .98rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .70);
  margin: 0;
}

/* Franja de logos de las marcas del ecosistema (render en blanco sobre navy) */
.eco-login__brands { margin-top: 2.5rem; }
.eco-login__brands-label {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .42);
  margin-bottom: 1rem;
}
.eco-login__brands-row {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  flex-wrap: wrap;
}
.eco-login__brands-row img {
  height: 39px;
  width: auto;
  max-width: 152px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .82;
  transition: opacity .15s ease;
}
.eco-login__brands-row img:nth-child(3) { height: 56px; }  /* IADEU: lockup apilado (símbolo sobre wordmark), necesita más alto que los wordmarks horizontales para pesar lo mismo */
.eco-login__brands-row img:hover { opacity: 1; }
.eco-login__brand-foot {
  position: relative;
  z-index: 1;
  font-size: .8rem;
  color: rgba(255, 255, 255, .48);
}

/* --------------------------- Panel de formulario -------------------------- */
.eco-login__panel {
  flex: 1 1 54%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: #fff;
}
.eco-login__card { width: 100%; max-width: 384px; }
.eco-login__title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  font-size: 1.7rem;
  margin: 0 0 .35rem;
  color: var(--eco-ink);
}
.eco-login__lead { color: var(--eco-muted); font-size: .95rem; margin: 0 0 2rem; }

/* Campos */
.eco-field { margin-bottom: 1.15rem; }
.eco-field__label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: #3c3f45;
  margin-bottom: .45rem;
}
.eco-field__control { position: relative; }
.eco-field__icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #adb1b8;
  font-size: .95rem;
  pointer-events: none;
  transition: color .15s ease;
}
/* input real de la app (mantiene .form-control para validateJS/Bootstrap) */
.eco-login .eco-field__control .form-control {
  height: 50px;
  width: 100%;
  padding: 0 44px 0 42px;
  border: 1.5px solid var(--eco-line);
  border-radius: 11px;
  background: #fbfbfc;
  font-size: .96rem;
  color: var(--eco-ink);
  box-shadow: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.eco-login .eco-field__control .form-control::placeholder { color: #b3b7be; }
.eco-login .eco-field__control .form-control:focus {
  border-color: var(--eco-brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(25, 37, 90, .16);
  outline: none;
}
.eco-field__control:focus-within .eco-field__icon { color: var(--eco-brand); }

.eco-field__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #9aa0a8;
  border-radius: 8px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.eco-field__toggle:hover { color: var(--eco-ink); background: #f1f2f4; }
.eco-field__toggle:focus-visible { outline: 2px solid var(--eco-brand); outline-offset: 1px; }

/* Feedback de validación (Bootstrap) dentro del control */
.eco-login .valid-feedback,
.eco-login .invalid-feedback { font-size: .8rem; margin-top: .4rem; }

/* Fila de opciones */
.eco-login__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .25rem 0 1.5rem;
}
.eco-check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; user-select: none; }
.eco-check input { width: 17px; height: 17px; accent-color: var(--eco-brand); cursor: pointer; }
.eco-check label { font-size: .88rem; color: #4a4e55; margin: 0; cursor: pointer; }

/* Botón principal */
.eco-login__submit {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 11px;
  background: var(--eco-brand);
  color: #fff;
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .15s ease, transform .06s ease, box-shadow .15s ease;
  box-shadow: 0 6px 18px rgba(25, 37, 90, .26);
}
.eco-login__submit:hover { background: var(--eco-brand-hover); box-shadow: 0 8px 22px rgba(25, 37, 90, .32); }
.eco-login__submit:active { transform: translateY(1px); }
.eco-login__submit:focus-visible { outline: 3px solid rgba(25, 37, 90, .40); outline-offset: 2px; }

/* Alert de error emitido por el controller */
.eco-login .alert {
  border: 0;
  border-radius: 10px;
  font-size: .88rem;
  padding: .7rem .9rem;
  margin-bottom: 1.15rem;
}
.eco-login .alert-danger {
  background: #fdecec;
  color: #b02a2a;
  border-left: 3px solid #dc3545;
}

.eco-login__foot {
  margin-top: 2rem;
  font-size: .82rem;
  color: var(--eco-muted);
  text-align: center;
}

/* ------------------------------- Responsive ------------------------------ */
@media (max-width: 860px) {
  .eco-login { flex-direction: column; }
  .eco-login__brand {
    flex: none;
    padding: 2.25rem 1.75rem;
  }
  .eco-login__brand-inner { margin: 0; }
  .eco-login__logo { width: 170px; margin-bottom: 1.25rem; }
  .eco-login__tagline { font-size: 1.45rem; }
  .eco-login__sub { display: none; }
  .eco-login__brands { display: none; }
  .eco-login__brand-foot { display: none; }
  .eco-login__brand::after { display: none; }
  .eco-login__panel { flex: 1; padding: 2.25rem 1.5rem; align-items: flex-start; }
}
@media (max-width: 400px) {
  .eco-login__brand { padding: 1.75rem 1.35rem; }
  .eco-login__panel { padding: 1.75rem 1.35rem; }
}
