/* LinkX Auth redesign — match Claude Design mocks exactly */
.lx-auth {
  --lx-a-bg: #FAF6F1;
  --lx-a-ink: #2A211C;
  --lx-a-muted: #756A60;
  --lx-a-paper: #fff;
  --lx-a-line: rgba(42, 33, 28, 0.14);
  --lx-a-coral: #FF6B4A;
  --lx-a-teal: #14806E;
  --lx-a-display: "Bricolage Grotesque", system-ui, sans-serif;
  --lx-a-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --lx-a-mono: "Space Mono", ui-monospace, monospace;
  min-height: 100vh !important;
  background: var(--lx-a-bg) !important;
  color: var(--lx-a-ink);
  font-family: var(--lx-a-sans) !important;
  -webkit-font-smoothing: antialiased;
  /* Kill legacy .auth-page flex centering */
  display: block !important;
  padding: 0 !important;
  position: relative;
  align-items: stretch !important;
  justify-content: stretch !important;
}

.lx-auth a { color: #E85535; text-decoration: none; }
.lx-auth a:hover { color: var(--lx-a-coral); }

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

.lx-auth-brand {
  position: relative;
  background: var(--lx-a-ink) !important;
  color: #fff !important;
  padding: 44px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  overflow: hidden;
}

.lx-auth-brand-glow {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  background:
    radial-gradient(520px 520px at 78% 18%, color-mix(in srgb, var(--lx-a-coral) 55%, transparent), transparent 70%),
    radial-gradient(460px 460px at 12% 92%, color-mix(in srgb, var(--lx-a-teal) 48%, transparent), transparent 70%);
}

.lx-auth-brand-copy {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Logo pinned top-left; copy stays vertically centered in the panel */
.lx-auth-brand-logo,
.lx-auth a.lx-auth-brand-logo {
  position: absolute;
  top: 44px;
  left: 56px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  background: none !important;
  line-height: 0;
}
.lx-auth-brand-logo picture,
.lx-auth a.lx-auth-brand-logo picture {
  display: block;
  width: 148px;
  height: 43px;
}
.lx-auth-brand-logo img,
.lx-auth a.lx-auth-brand-logo img {
  display: block;
  width: 148px;
  height: 43px;
  max-width: 148px;
  max-height: 43px;
  object-fit: contain;
  object-position: left center;
}

.lx-auth-brand-eyebrow,
.lx-auth-brand p.lx-auth-brand-eyebrow {
  font-family: var(--lx-a-mono) !important;
  font-size: 12px !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lx-a-coral) !important;
  font-weight: 700;
  margin: 0 0 20px;
}

.lx-auth-brand h2 {
  font-family: var(--lx-a-display) !important;
  font-weight: 800 !important;
  font-size: clamp(28px, 3.2vw, 38px) !important;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  text-wrap: pretty;
  max-width: 420px;
  color: #fff !important;
}

.lx-auth-brand p {
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  max-width: 420px;
}

.lx-auth-panel {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--lx-a-bg) !important;
}

/* Form sits on cream — NO glass card (legacy .auth-card) */
.lx-auth .auth-card,
.lx-auth .lx-auth-inner {
  width: 100%;
  max-width: 400px !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
}

.lx-auth-mobile-logo {
  display: none;
  margin-bottom: 28px;
  text-decoration: none !important;
  line-height: 0;
}
.lx-auth-mobile-logo picture {
  display: block;
  width: 132px;
  height: 38px;
}
.lx-auth-mobile-logo img {
  display: block;
  width: 132px;
  height: 38px;
  max-width: 132px;
  max-height: 38px;
  object-fit: contain;
  object-position: left center;
}

.lx-auth .auth-title,
.lx-auth h1.lx-auth-title,
.lx-auth .auth-form-container .auth-title {
  font-family: var(--lx-a-display) !important;
  font-weight: 800 !important;
  font-size: 32px !important;
  letter-spacing: -0.02em;
  margin: 0 0 8px !important;
  color: var(--lx-a-ink) !important;
  text-align: left !important;
}

.lx-auth .auth-subtitle {
  color: var(--lx-a-muted) !important;
  font-size: 15px !important;
  line-height: 1.5;
  margin: 0 0 28px !important;
  text-align: left !important;
}

.lx-auth .social-login { margin-bottom: 0; }
.lx-auth .social-login-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lx-auth .social-btn {
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--lx-a-paper) !important;
  border: 1px solid var(--lx-a-line) !important;
  border-radius: 13px !important;
  padding: 13px !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  color: var(--lx-a-ink) !important;
  text-decoration: none !important;
  box-shadow: none !important;
  height: auto !important;
  min-width: 0 !important;
}
.lx-auth .social-btn:hover { border-color: var(--lx-a-coral) !important; }
.lx-auth .social-btn i { font-size: 16px; margin: 0 !important; }

/* Google mark like the design conic chip */
.lx-auth .social-btn-google .lx-g-mark {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: conic-gradient(from -45deg, #EA4335 0 25%, #FBBC05 25% 50%, #34A853 50% 75%, #4285F4 75%);
  flex-shrink: 0;
}
.lx-auth .social-btn-google i.fab { display: none; }

.lx-auth .auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--lx-a-muted);
  font-size: 12px;
}
.lx-auth .auth-divider::before,
.lx-auth .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(42, 33, 28, 0.12);
}
.lx-auth .auth-divider span { white-space: nowrap; }

.lx-auth .auth-form .form-label,
.lx-auth .lx-auth-label {
  display: block;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--lx-a-ink) !important;
  margin-bottom: 7px !important;
}

.lx-auth .auth-form .mb-3,
.lx-auth .auth-form .mb-4 { margin-bottom: 16px !important; }

.lx-auth .auth-form .input-group { display: block; }
.lx-auth .auth-form .input-group-text { display: none !important; }

.lx-auth .auth-form .form-control,
.lx-auth .lx-auth-input,
.lx-auth .auth-form .form-control:not([type="checkbox"]) {
  width: 100% !important;
  border: 1px solid rgba(42, 33, 28, 0.16) !important;
  background: var(--lx-a-paper) !important;
  border-radius: 13px !important;
  padding: 14px 16px !important;
  font-family: inherit !important;
  font-size: 15px !important;
  color: var(--lx-a-ink) !important;
  outline: none !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: 0 !important;
}
.lx-auth .auth-form .form-control:focus,
.lx-auth .lx-auth-input:focus {
  border-color: var(--lx-a-coral) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lx-a-coral) 15%, transparent) !important;
}
.lx-auth .auth-form .form-control::placeholder { color: #A99E93 !important; }

.lx-auth .lx-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 8px;
  font-size: 14px;
}
.lx-auth .lx-auth-row a {
  font-weight: 600;
  font-size: 14px;
  color: #E85535 !important;
}

.lx-auth .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  min-height: 0;
}
.lx-auth .form-check-input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  accent-color: var(--lx-a-coral);
  float: none;
}
.lx-auth .form-check-label {
  color: var(--lx-a-muted) !important;
  font-size: 14px !important;
}

/* Dark coral keeps white CTA text above WCAG AA contrast. */
.lx-auth .btn-primary,
.lx-auth .lx-auth-submit,
.lx-auth button.btn-primary {
  width: 100% !important;
  margin-top: 6px !important;
  background: #C2410C !important;
  background-image: none !important;
  border: none !important;
  color: #fff !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding: 15px !important;
  border-radius: 13px !important;
  cursor: pointer;
  box-shadow: 0 14px 28px -14px #C2410C !important;
  line-height: 1.2 !important;
  height: auto !important;
}
.lx-auth .btn-primary:hover,
.lx-auth .lx-auth-submit:hover,
.lx-auth button.btn-primary:hover {
  filter: brightness(1.05);
  background: #C2410C !important;
  color: #fff !important;
}
.lx-auth .btn-primary i { display: none !important; }

.lx-auth .auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--lx-a-muted) !important;
  margin-top: 24px !important;
  padding-top: 0 !important;
  border-top: none !important;
}
.lx-auth .auth-footer a { font-weight: 700; color: #E85535 !important; }

.lx-auth-legal {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px dashed var(--lx-a-line);
}
.lx-auth-legal a,
.lx-auth .lx-auth-legal a {
  color: var(--lx-a-muted) !important;
  font-weight: 500 !important;
}
.lx-auth-legal a:hover,
.lx-auth .lx-auth-legal a:hover {
  color: var(--lx-a-ink) !important;
}
.lx-auth-copy {
  text-align: center;
  color: #A99E93 !important;
  font-size: 12px;
  margin-top: 12px;
  margin-bottom: 0;
}

.lx-auth-otp {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}
.lx-auth-otp input {
  width: 52px;
  min-width: 0;
  flex: 1 1 0;
  height: 60px;
  text-align: center;
  border: 1px solid rgba(42, 33, 28, 0.16);
  background: var(--lx-a-paper);
  border-radius: 13px;
  font-family: var(--lx-a-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--lx-a-ink);
  outline: none;
}
.lx-auth-otp input:focus {
  border-color: var(--lx-a-coral);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lx-a-coral) 15%, transparent);
}

.lx-auth .alert { border-radius: 13px; font-size: 14px; }

/* Hide legacy loading / orbs if any leak in */
.lx-auth .auth-background { display: none !important; }

/* Gates: collapse split when frame / profile */
.lx-auth-shell:has(.gate-frame-wrapper),
.lx-auth-shell:has(#profile) {
  display: block !important;
}
.lx-auth-shell:has(.gate-frame-wrapper) .lx-auth-brand,
.lx-auth-shell:has(.gate-frame-wrapper) .lx-auth-legal,
.lx-auth-shell:has(.gate-frame-wrapper) .lx-auth-copy,
.lx-auth-shell:has(.gate-frame-wrapper) .lx-auth-mobile-logo,
.lx-auth-shell:has(#profile) .lx-auth-brand,
.lx-auth-shell:has(#profile) .lx-auth-legal,
.lx-auth-shell:has(#profile) .lx-auth-copy,
.lx-auth-shell:has(#profile) .lx-auth-mobile-logo {
  display: none !important;
}
.lx-auth-shell:has(.gate-frame-wrapper) .lx-auth-panel,
.lx-auth-shell:has(#profile) .lx-auth-panel {
  padding: 0;
  display: block !important;
}
.lx-auth-shell:has(.gate-frame-wrapper) .lx-auth-inner,
.lx-auth-shell:has(#profile) .lx-auth-inner {
  max-width: none !important;
}

@media (max-width: 860px) {
  .lx-auth-shell { grid-template-columns: 1fr !important; }
  .lx-auth-brand { display: none !important; }
  .lx-auth-mobile-logo { display: block; }
  .lx-auth-panel { padding: 36px 20px; }
  .lx-auth-otp { gap: clamp(4px, 2vw, 10px); }
  .lx-auth-otp input { width: auto; max-width: 44px; height: 52px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .lx-auth * { transition: none !important; }
}
