/* ===========================================================================
   clientes.loexa.cloud  ·  login.css
   Pantalla de acceso (cliente / admin / publicidad).
   Lienzo partido: panel de marca a la izquierda, formulario a la derecha.
   =========================================================================== */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ---- Panel de marca (izquierda) --------------------------------------- */
.login__brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--lx-ink) 0%, #15304e 55%, var(--lx-brand-dark) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 48px;
}
/* trazado de ruta animado sobre el fondo: sugiere seguimiento en vivo */
.login__brand svg.rutaart {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: .5;
  pointer-events: none;
}
.rutaart path.road {
  fill: none;
  stroke: rgba(255,255,255,.14);
  stroke-width: 2.5;
  stroke-dasharray: 10 12;
}
.rutaart path.trace {
  fill: none;
  stroke: var(--lx-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: trazar 5s ease-in-out infinite;
}
@keyframes trazar {
  0%   { stroke-dashoffset: 220; }
  55%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.rutaart circle.veh { fill: var(--lx-accent); }

.login__logo {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 13px;
  font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em;
}
.login__logo .brand__mark { width: 44px; height: 44px; border-radius: 12px; }
.login__logo .brand__mark svg { width: 25px; height: 25px; }
.login__logo small {
  display: block; font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin-top: 2px;
}

.login__pitch { position: relative; z-index: 1; max-width: 420px; }
.login__pitch h1 {
  font-size: 2.1rem; line-height: 1.12; font-weight: 800;
  letter-spacing: -.03em; margin-bottom: 14px;
}
.login__pitch p { font-size: var(--t-md); color: rgba(255,255,255,.76); line-height: 1.55; }

.login__sellos { position: relative; z-index: 1; display: flex; gap: 26px; }
.sello b { display: block; font-size: var(--t-xl); font-weight: 800; letter-spacing: -.02em; }
.sello span { font-size: var(--t-sm); color: rgba(255,255,255,.6); }

/* ---- Formulario (derecha) --------------------------------------------- */
.login__form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 24px;
  background: var(--lx-surface);
}
.formcard {
  width: 100%;
  max-width: 380px;
}
.formcard h2 {
  font-size: var(--t-xl);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.formcard__sub { color: var(--lx-ink-3); font-size: var(--t-base); margin-bottom: 26px; }

.campo { margin-bottom: 16px; }
.campo label {
  display: block;
  font-size: var(--t-sm);
  font-weight: 700;
  margin-bottom: 7px;
}
.campo__input {
  position: relative;
}
.campo__input svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--lx-ink-3);
}
.campo input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border-radius: var(--r-md);
  border: 1px solid var(--lx-line);
  background: var(--lx-card);
  font-size: var(--t-base);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.campo input:focus {
  outline: none; border-color: var(--lx-brand);
  box-shadow: 0 0 0 3px var(--lx-brand-soft);
}
.campo__ver {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--lx-ink-3);
}
.campo__ver:hover { background: var(--lx-surface-2); }
.campo__ver svg { position: static; transform: none; }

.login__row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; font-size: var(--t-sm);
}
.login__row label { display: flex; align-items: center; gap: 7px; color: var(--lx-ink-2); }
.login__row a { color: var(--lx-brand); font-weight: 700; }
.login__row a:hover { text-decoration: underline; }

/* aviso de error de credenciales */
.login__error {
  display: none;
  align-items: center; gap: 8px;
  background: var(--lx-alerta-soft);
  color: var(--lx-alerta);
  font-size: var(--t-sm); font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--r-md);
  margin-bottom: 16px;
}
.login__error.visible { display: flex; }
.login__error svg { width: 16px; height: 16px; flex: none; }

.login__pie {
  margin-top: 26px;
  text-align: center;
  font-size: var(--t-sm);
  color: var(--lx-ink-3);
}

/* responsive: una sola columna, el panel de marca pasa a cabecera */
@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; }
  .login__brand { padding: 30px 26px; gap: 26px; }
  .login__pitch h1 { font-size: 1.6rem; }
  .login__pitch p { font-size: var(--t-base); }
  .login__sellos { gap: 20px; }
}
