/* ============================================================
   LeadXchange — Auth Stylesheet (Split-screen)
   ============================================================ */

/* ————————— 1. Tokens ————————— */
:root {
  /* Primary brand color — from Figma "Typography & Colors Style Guide" (node 4:940) */
  --lx-primary:       #3C55FD;
  --lx-primary-light: #7181ED;
  --lx-primary-dark:  #2F44E0;

  /* Kept as aliases so existing rules below don't need touching one by one */
  --lx-teal-light:   var(--lx-primary-light);
  --lx-teal:         var(--lx-primary);
  --lx-teal-dark:    var(--lx-primary-dark);
  --lx-teal-deepest: #23339E;
  --lx-teal-glow:    var(--lx-primary-light);

  --lx-bg:        #F9FAFB;
  --lx-card:      #FFFFFF;
  --lx-text:      #111827;
  --lx-text-2:    #4B5563;
  --lx-text-mute: #9CA3AF;
  --lx-border:    #E5E7EB;
  --lx-border-2:  #D1D5DB;
  --lx-field-bg:  #F9FAFB;

  --lx-error:      #EF4444;
  --lx-error-soft: #FEF2F2;

  --lx-radius-sm: 8px;
  --lx-radius:    12px;
  --lx-radius-lg: 24px;

  --lx-grad:       linear-gradient(129deg, #7181ED 8%, #3750FF 100%);
  --lx-grad-hover: linear-gradient(129deg, #3750FF 8%, #2F44E0 100%);
  --lx-grad-logo:  linear-gradient(129deg, #7181ED 8%, #3750FF 100%);

  --lx-trust-bg:   #0F1F1D;
  --lx-trust-bg-2: #142523;
  --lx-trust-fg:   #F0FAF8;
}

* { box-sizing: border-box; }

/* ————————— 2. Body & shell ————————— */
.lx-auth-body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--lx-bg);
  color: var(--lx-text);
  min-height: 100vh;
}

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

/* ————————— 3. Left column ————————— */
.lx-auth-left {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 36px 56px;
  justify-content: space-between;
  min-height: 100vh;
}

.lx-auth-bg-ellipse {
  position: absolute;
  top: -210px;
  left: -109px;
  width: 440px;
  height: 449px;
  pointer-events: none;
  z-index: 0;
}
.lx-auth-left > *:not(.lx-auth-bg-ellipse) { position: relative; z-index: 1; }

.lx-auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.lx-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--lx-grad-logo);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px -4px rgba(43, 182, 163, 0.4);
}
.lx-logo-text { color: var(--lx-text); }

/* Wordmark logo: "Lead+change" */
.lx-auth-logo-word {
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--lx-text);
  letter-spacing: -0.02em;
}
.lx-auth-logo-icon {
  width: 32px;
  max-width: 7%;
  height: auto;
  border-radius: 9px;
  flex-shrink: 0;
}
.lx-logo-plus { color: var(--lx-teal); font-weight: 800; padding: 0 1px; }

.lx-auth-form-wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  align-self: center;
  padding: 32px 0;
}

.lx-auth-footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--lx-text-mute);
}
.lx-auth-footer a { color: inherit; text-decoration: none; }
.lx-auth-footer a:hover { color: var(--lx-text-2); }
.lx-auth-footer-links { display: flex; gap: 16px; }

/* ————————— 4. Right trust panel ————————— */
.lx-auth-right {
  position: relative;
  overflow: hidden;
  color: var(--lx-trust-fg);
  padding: 64px 56px;
  display: flex;
  align-items: center;
  background: #0B1140;
}

.lx-trust-photo-overlay {
  position: absolute;
  inset: -14px -10px;
  background-image: url('/images/auth/trust-photo.png');
  background-size: cover;
  background-position: center;
  filter: blur(2px);
  pointer-events: none;
}
.lx-trust-photo-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 16, 126, 0.7);
}

.lx-trust-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 480px;
}

.lx-trust-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
  color: #fff;
}

.lx-trust-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.lx-trust-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.lx-trust-checklist .lx-check {
  flex-shrink: 0;
  margin-top: 3px;
}
.lx-trust-item-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.lx-trust-item-text {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(230,235,255,0.72);
  margin: 0;
  max-width: 400px;
}

/* ————————— 5. Inputs ————————— */
.lx-input {
  background: var(--lx-field-bg);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--lx-text-2);
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
  width: 100%;
}
.lx-input::placeholder { color: var(--lx-text-mute); }
.lx-input:hover  { border-color: var(--lx-border-2); }
.lx-input:focus  {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--lx-teal);
  background: #fff;
}
.lx-input.lx-error,
.lx-error {
  border-color: var(--lx-error) !important;
  background: var(--lx-error-soft);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* ————————— 6. Primary gradient button ————————— */
.gradient-button {
  background: var(--lx-grad);
  box-shadow: 0 8px 20px -8px rgba(43, 182, 163, 0.5);
  cursor: pointer;
  border: none;
}
.gradient-button:hover { background: var(--lx-grad-hover); }
.gradient-button:disabled { opacity: .5; cursor: not-allowed; }

/* Solid blue button (login) */
.lx-btn-blue {
  background: #3C55FD;
  box-shadow: 0 8px 20px -8px rgba(60, 85, 253, 0.45);
  cursor: pointer;
  border: none;
}
.lx-btn-blue:hover { background: #2F44E0; }
.lx-btn-blue:disabled { opacity: .5; cursor: not-allowed; }

/* ————————— 7. Animations ————————— */
@keyframes lx-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lx-fade-in { animation: lx-fade-in .3s cubic-bezier(.2,.7,.3,1) both; }

@keyframes lx-shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-4px); }
  75%     { transform: translateX(4px); }
}
.lx-shake { animation: lx-shake .35s ease-in-out; }

/* ————————— 8. Responsive ————————— */
@media (max-width: 1024px) {
  .lx-auth-shell { grid-template-columns: 1fr; }
  .lx-auth-right { display: none; }
  .lx-auth-left  { padding: 28px 32px; }
}
@media (max-width: 640px) {
  .lx-auth-left { padding: 20px 20px; }
  .lx-auth-form-wrap { padding: 24px 0; }
}

/* ————————— 9. Accessibility ————————— */
*:focus-visible { outline: 2px solid var(--lx-teal); outline-offset: 2px; }
.lx-input:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
