/**
 * Sign-in screen — two-panel workspace layout.
 * Left: navy showcase (brand + AI agent guidance).
 * Right: light form panel with compact logo.
 * Scoped to .vs-auth-page so the admin shell is never affected.
 */
body.vs-auth-page {
  display: block;
  align-items: stretch;
  justify-content: flex-start;
  overflow-x: hidden;
}

.vs-auth-page {
  --lx-navy: #0B1220;
  --lx-navy-2: #16294A;
  --lx-yellow: #F5D000;
  --lx-surface: #FFFFFF;
  --lx-canvas: #F2F4F8;
  --lx-border: #E3E8F0;
  --lx-text: #16213A;
  --lx-text-muted: #5A6880;
  --lx-radius: 10px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--lx-canvas);
  font-family: var(--vs-font, 'Plus Jakarta Sans', system-ui, sans-serif);
  color: var(--lx-text);
  -webkit-font-smoothing: antialiased;
}

.lx-auth {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 992px) {
  .lx-auth {
    grid-template-columns: minmax(0, 1.12fr) minmax(22rem, 0.88fr);
  }
}

/* Mobile: form first so users can sign in without scrolling past marketing */
@media (max-width: 991.98px) {
  .lx-auth__form-pane {
    order: 1;
  }

  .lx-auth__showcase {
    order: 2;
  }
}

/* —— Showcase panel (left on desktop) —— */
.lx-auth__showcase {
  display: none;
  position: relative;
  overflow: hidden;
  padding: 3.25rem 3.5rem;
  background:
    radial-gradient(ellipse 70% 55% at 85% 10%, rgba(245, 208, 0, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 55% 50% at 5% 90%, rgba(96, 130, 200, 0.18) 0%, transparent 60%),
    linear-gradient(155deg, #0B1220 0%, #13233F 48%, #0E1830 100%);
  color: #FFFFFF;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 992px) {
  .lx-auth__showcase {
    display: flex;
  }
}

.lx-auth__showcase-inner {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  animation: lx-auth-rise 0.7s ease-out both;
}

@keyframes lx-auth-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lx-auth__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #E6EBF5;
}

.lx-auth__eyebrow i {
  color: var(--lx-yellow);
}

.lx-auth__headline {
  margin: 1.2rem 0 0;
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.lx-auth__lede {
  margin: 1rem 0 1.85rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(226, 232, 245, 0.78);
}

.lx-auth__steps {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.lx-auth__step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  animation: lx-auth-rise 0.65s ease-out both;
}

.lx-auth__step:nth-child(1) { animation-delay: 0.08s; }
.lx-auth__step:nth-child(2) { animation-delay: 0.16s; }
.lx-auth__step:nth-child(3) { animation-delay: 0.24s; }

.lx-auth__step-num {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(245, 208, 0, 0.14);
  border: 1px solid rgba(245, 208, 0, 0.28);
  color: var(--lx-yellow);
}

.lx-auth__step-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.3;
}

.lx-auth__step-text {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(226, 232, 245, 0.66);
  margin: 0.15rem 0 0;
}

.lx-auth__hint-line {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--lx-radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(226, 232, 245, 0.72);
}

.lx-auth__hint-line i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--lx-yellow);
}

/* —— Form panel (right on desktop) —— */
.lx-auth__form-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1.25rem;
  background: var(--lx-surface);
}

.lx-auth__form-inner {
  width: 100%;
  max-width: 23.5rem;
  animation: lx-auth-rise 0.55s ease-out 0.05s both;
}

.lx-auth__logo-wrap {
  margin-bottom: 1.5rem;
}

/* Compact logo — wide asset stays sharp without dominating the form */
.vs-auth-page .lx-auth__logo-wrap .lx-login__logo {
  display: block;
  width: auto;
  max-width: min(148px, 58vw);
  height: auto;
  max-height: 34px;
  object-fit: contain;
  object-position: left center;
}

.lx-auth__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--lx-text);
}

.lx-auth__subtitle {
  margin: 0.4rem 0 1.65rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--lx-text-muted);
}

.lx-login__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lx-text);
  margin-bottom: 0.4rem;
}

.lx-login__field {
  margin-bottom: 1.15rem;
}

.lx-login__field:last-of-type {
  margin-bottom: 1.35rem;
}

.lx-login__input {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--lx-text);
  background: var(--lx-surface);
  border: 1px solid #CFD7E3;
  border-radius: var(--lx-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lx-login__input::placeholder {
  color: #8592A6;
  opacity: 1;
}

.lx-login__input:hover {
  border-color: #B7C2D2;
}

.lx-login__input:focus {
  outline: none;
  border-color: var(--lx-navy-2);
  box-shadow: 0 0 0 3px rgba(22, 41, 74, 0.14);
}

.lx-login__password {
  position: relative;
}

.lx-login__password .lx-login__input {
  padding-right: 2.85rem;
}

.lx-login__password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #8592A6;
  cursor: pointer;
  border-radius: 6px;
}

.lx-login__password-toggle:hover,
.lx-login__password-toggle:focus {
  color: var(--lx-navy);
  background: #EDF1F7;
  outline: none;
}

.lx-login__password-toggle i {
  font-size: 1.05rem;
  line-height: 1;
}

.lx-login__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.72rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--lx-navy-2);
  border: 1px solid var(--lx-navy-2);
  border-radius: var(--lx-radius);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lx-login__submit:hover,
.lx-login__submit:focus {
  background: var(--lx-navy);
  border-color: var(--lx-navy);
  color: #FFFFFF;
  outline: none;
}

.lx-login__submit:active {
  transform: translateY(1px);
}

.lx-login__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lx-login__help {
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--lx-text-muted);
  text-align: center;
}

.lx-login__alert {
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  border-radius: var(--lx-radius);
  background: rgba(225, 29, 72, 0.07);
  border: 1px solid rgba(225, 29, 72, 0.2);
  color: #9F1239;
}

.lx-login__hint {
  font-size: 0.8125rem;
  color: var(--lx-text-muted);
  margin-bottom: 1.15rem;
}

.lx-login__link {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--lx-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
}

.lx-login__link:hover {
  color: var(--lx-navy);
}

.lx-login__input--code {
  text-align: center;
  font-size: 1.35rem;
  font-family: var(--vs-mono, ui-monospace, monospace);
  letter-spacing: 0.28em;
  padding-left: 0.5rem;
}

.lx-auth__foot {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: #8592A6;
}

@media (max-width: 575.98px) {
  .lx-auth__form-pane {
    padding: 2rem 1.15rem;
  }

  .lx-auth__logo-wrap {
    margin-bottom: 1.25rem;
  }

  .lx-auth__title {
    font-size: 1.28rem;
  }

  .vs-auth-page .lx-auth__logo-wrap .lx-login__logo {
    max-width: min(132px, 55vw);
    max-height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lx-auth__showcase-inner,
  .lx-auth__form-inner,
  .lx-auth__step {
    animation: none;
  }
}
