/*
 * Account pages (login, ambassador login/registration, password reset, email verification,
 * two-factor, password confirmation) on the homepage design system.
 * Loaded after base.css + aurix-easings.css by layouts/auth.blade.php. Styles the existing
 * auth-* / form-* / btn-* classes, so the page templates and their forms are unchanged.
 */

/* ---------------------------------------------------------------- tokens the page templates use inline */
:root {
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1rem; --text-lg: 1.125rem; --text-xl: 1.25rem;
  --text-2xl: 1.5rem; --text-3xl: 1.875rem; --text-4xl: 2.25rem;
  --color-primary: rgb(99, 102, 241);
  --color-primary-light: rgb(129, 140, 248);
  --color-text-primary: var(--ax-text);
  --color-text-secondary: var(--ax-text-60);
  --color-text-muted: var(--ax-text-40);
  --color-error: rgb(252, 165, 165);
  --auth-input: rgb(20, 22, 26);
  --auth-input-shadow: rgba(255, 255, 255, 0.235) 0px 0.6px 3px -1.67px inset, rgba(255, 255, 255, 0.192) 0px 2.29px 11.44px -3.33px inset;
  --auth-rise: 2080ms var(--ease-intro-cta-2080);
  --auth-fade: 2050ms var(--ease-intro-spring-2050);
}

body { min-height: 100vh; line-height: 1.5; }

/* ---------------------------------------------------------------- split layout */
.auth-container { display: flex; min-height: 100vh; }
.auth-brand-section {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 64px;
  overflow: hidden;
  background: radial-gradient(60% 50% at 50% 100%, rgba(59, 68, 89, 0.35) 0%, rgba(7, 9, 14, 0) 100%), var(--ax-bg);
}
/* dot field, masked to fade out towards the top (homepage hero texture) */
.auth-brand-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(220, 220, 220, 0.22) 1.1px, transparent 1.4px);
  background-size: 10px 10px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 100%, #000 0%, transparent 100%);
  mask-image: radial-gradient(70% 60% at 50% 100%, #000 0%, transparent 100%);
  pointer-events: none;
}
.auth-brand-section::after { /* right edge hairline between the two halves */
  content: '';
  position: absolute;
  top: 10%;
  bottom: 10%;
  right: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--ax-hairline) 50%, rgba(255, 255, 255, 0) 100%);
}
.auth-form-section {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 40px;
  min-height: 100vh;
  overflow-y: auto;
  background: var(--ax-bg);
}
.auth-form-bg { display: none; }

/* glow: the homepage's blue / pink / indigo conic, blurred */
.auth-glow {
  position: absolute;
  left: 50%;
  bottom: -220px;
  width: 640px;
  height: 440px;
  transform: translateX(-50%);
  border-radius: 50%;
  background-image: conic-gradient(rgb(133, 184, 255) 36deg, rgb(255, 201, 226) 54deg, rgba(255, 255, 255, 0) 90deg, rgba(255, 255, 255, 0) 270deg, rgb(165, 180, 252) 307deg, rgb(255, 255, 255) 325deg, rgb(133, 184, 255) 360deg);
  filter: blur(80px);
  opacity: 0.35;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: auth-fade var(--auth-fade) 400ms both;
}

/* the WiseCord logo marks floating in the brand panel */
.auth-bg-logos { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.auth-bg-logo { position: absolute; opacity: 0.05; filter: grayscale(0.2); }
.auth-bg-logo--1 { top: 8%; left: 6%; width: 100px; transform: rotate(-15deg); }
.auth-bg-logo--2 { top: 14%; right: 10%; width: 80px; transform: rotate(20deg); }
.auth-bg-logo--3 { top: 42%; left: 8%; width: 60px; transform: rotate(10deg); }
.auth-bg-logo--4 { top: 60%; right: 6%; width: 120px; transform: rotate(-25deg); }
.auth-bg-logo--5 { bottom: 16%; left: 15%; width: 70px; transform: rotate(35deg); }
.auth-bg-logo--6 { bottom: 8%; right: 20%; width: 90px; transform: rotate(-10deg); }

/* ---------------------------------------------------------------- brand content */
.auth-brand-content { position: relative; z-index: 1; max-width: 500px; margin: 0 auto; }
.auth-brand-content > * { animation: auth-rise var(--auth-rise) both; }
.auth-brand-content > :nth-child(2) { animation-delay: 100ms; }
.auth-brand-content > :nth-child(3) { animation-delay: 200ms; }
.auth-brand-content > :nth-child(4) { animation-delay: 300ms; }
.auth-brand-content > :nth-child(5) { animation-delay: 400ms; }

.auth-brand-badge { /* the homepage's glass eyebrow pill */
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px 12px;
  border-radius: var(--ax-radius-pill);
  background: var(--ax-accent-wash);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  font-size: 14px;
  line-height: 18.2px;
  color: var(--ax-accent-text);
}
.auth-brand-badge::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 1px solid var(--ax-hairline); pointer-events: none; }
.auth-brand-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ax-accent);
  box-shadow: 0 0 10px var(--ax-accent);
  animation: auth-pulse 2000ms linear infinite;
}
.auth-brand-title { margin-bottom: 16px; font-size: 48px; font-weight: 500; line-height: 52.8px; letter-spacing: -1.92px; color: var(--ax-text); text-wrap: balance; }
.text-gradient {
  background-image: linear-gradient(90deg, rgb(165, 180, 252) 0%, rgb(238, 242, 255) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-brand-description { margin-bottom: 40px; font-size: 16px; line-height: 20.8px; letter-spacing: -0.32px; color: var(--ax-text-60); }

.auth-benefits { display: flex; flex-direction: column; gap: 20px; }
.auth-benefit { display: flex; align-items: flex-start; gap: 16px; }
.auth-benefit-icon { /* homepage highlight tile */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-image: radial-gradient(50% 50% at 50% 50%, rgba(129, 140, 248, 0.15) 0%, rgb(12, 14, 19) 100%);
  box-shadow: rgba(255, 255, 255, 0.6) 0px 0.5px 2px -1px inset, rgba(255, 255, 255, 0.08) 0px 10px 10px -1px inset, rgba(0, 0, 0, 0.35) 0px 6px 12px -6px;
  color: var(--ax-accent);
}
.auth-benefit-icon svg { width: 20px; height: 20px; stroke-width: 1.6; }
/* the copy reads "<strong>Title</strong> - description", so the title stays inline with its dash */
.auth-benefit-text { padding-top: 9px; font-size: 15px; line-height: 21px; color: var(--ax-text-40); }
.auth-benefit-text strong { font-weight: 500; color: var(--ax-text); }

.auth-stats { display: flex; gap: 40px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--ax-hairline); }
.auth-stat { text-align: left; }
.auth-stat-value { font-size: 36px; font-weight: 500; line-height: 39.6px; letter-spacing: -1.44px; color: var(--ax-text); }
.auth-stat-label { margin-top: 4px; font-size: 14px; line-height: 18.2px; color: var(--ax-text-40); }

/* ---------------------------------------------------------------- form card */
.auth-form-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 40px;
  border-radius: var(--ax-radius-card);
  background-image: var(--ax-card-bg);
  box-shadow: rgba(255, 255, 255, 0.2) 0px 1px 1px 0px inset, rgba(255, 255, 255, 0.05) 0px -1px 2px 0px inset, rgba(0, 0, 0, 0.6) 0px 30px 60px -20px;
  animation: auth-rise var(--auth-rise) 150ms both;
}
.auth-logo { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 32px; text-decoration: none; }
.auth-logo img { width: 32px; height: 32px; }
.auth-logo-text { font-size: 22px; font-weight: 600; letter-spacing: -0.4px; color: var(--ax-text); }

.auth-header { margin-bottom: 32px; }
.auth-header h1 { margin-bottom: 8px; font-size: 32px; font-weight: 500; line-height: 35.2px; letter-spacing: -1.28px; color: var(--ax-text); }
.auth-header p { font-size: 16px; line-height: 20.8px; letter-spacing: -0.32px; color: var(--ax-text-60); }

/* ---------------------------------------------------------------- fields */
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 14px; font-weight: 500; line-height: 18.2px; color: var(--ax-text-75); }
.form-input {
  width: 100%;
  padding: 12px 14px;
  font: 400 16px/20px var(--ax-font);
  color: var(--ax-text);
  background: var(--auth-input);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--ax-radius-btn);
  box-shadow: var(--auth-input-shadow);
  outline: none;
  transition: border-color var(--ax-hover), box-shadow var(--ax-hover), background-color var(--ax-hover);
}
.form-input:hover { border-color: rgba(255, 255, 255, 0.12); }
.form-input:focus { border-color: rgba(129, 140, 248, 0.6); box-shadow: var(--auth-input-shadow), 0 0 0 3px rgba(129, 140, 248, 0.18); }
.form-input::placeholder { color: var(--ax-text-25); }
.form-input:-webkit-autofill { -webkit-text-fill-color: var(--ax-text); -webkit-box-shadow: 0 0 0 40px var(--auth-input) inset; caret-color: var(--ax-text); }
.form-hint { font-size: 12px; line-height: 16px; color: var(--ax-text-40); }
.form-error { font-size: 13px; line-height: 17px; color: var(--color-error); }

.form-checkbox-group { display: flex; align-items: center; gap: 8px; }
.form-checkbox { width: 16px; height: 16px; accent-color: var(--ax-accent-deep); cursor: pointer; }
.form-checkbox-label { font-size: 14px; color: var(--ax-text-60); cursor: pointer; }

/* ---------------------------------------------------------------- buttons (same as the homepage's) */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  font: 700 16px/16px var(--ax-font);
  border: 0;
  border-radius: var(--ax-radius-btn);
  cursor: pointer;
  isolation: isolate;
  text-decoration: none;
  transition: color var(--ax-hover), opacity var(--ax-hover);
}
.btn-full { width: 100%; }
.btn-primary { background: rgb(255, 255, 255); color: var(--ax-accent-ink); }
.btn-primary::before { /* indigo gradient layer with the inset glow */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: linear-gradient(rgb(129, 140, 248) 0%, rgb(99, 102, 241) 100%);
  box-shadow: rgba(255, 255, 255, 0.75) 0px 0px 10px 1px inset, rgba(129, 140, 248, 0) 0px 0px 30px -10px;
  transition: box-shadow var(--ax-hover);
  z-index: -1;
}
.btn-primary:hover { color: var(--ax-accent-ink-hover); }
.btn-primary:hover::before { box-shadow: rgb(255, 255, 255) 0px 0px 10px 1px inset, rgb(129, 140, 248) 0px 0px 30px -10px; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary {
  overflow: hidden;
  background: var(--ax-surface-btn);
  color: var(--ax-text-60);
  font-weight: 500;
  box-shadow: rgba(255, 255, 255, 0.235) 0px 0.602187px 3.01094px -1.66667px inset, rgba(255, 255, 255, 0.192) 0px 2.28853px 11.4427px -3.33333px inset, rgba(255, 255, 255, 0) 0px 10px 50px -5px inset;
}
.btn-secondary:hover { color: var(--ax-text); }
.btn:focus-visible, .auth-link:focus-visible, .form-checkbox:focus-visible { outline: 2px solid rgba(129, 140, 248, 0.8); outline-offset: 2px; }

/* ---------------------------------------------------------------- links, footer, divider, alerts */
.auth-link { color: var(--ax-accent-text); font-weight: 500; text-decoration: none; transition: color var(--ax-hover); }
.auth-link:hover { color: var(--ax-text); }
.auth-footer { margin-top: 32px; text-align: center; }
.auth-footer p { font-size: 14px; line-height: 18.2px; color: var(--ax-text-60); }
.auth-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--ax-hairline); }
.auth-divider span { font-size: 14px; color: var(--ax-text-40); }

.alert { margin-bottom: 24px; padding: 14px 16px; border-radius: var(--ax-radius-btn); font-size: 14px; line-height: 19px; border: 1px solid; }
.alert-success { background: rgba(129, 140, 248, 0.08); border-color: rgba(129, 140, 248, 0.25); color: rgb(199, 210, 254); }
.alert-error { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.28); color: rgb(252, 165, 165); }
.alert-warning { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.28); color: rgb(252, 211, 77); }

/* ---------------------------------------------------------------- motion */
@keyframes auth-rise { from { opacity: 0.001; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes auth-fade { from { opacity: 0; } to { opacity: 0.35; } }
@keyframes auth-pulse { 0% { box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.7); } 100% { box-shadow: 0 0 0 8px rgba(129, 140, 248, 0); } }

/* ---------------------------------------------------------------- ≤1024: form only, glow behind the card */
@media (max-width: 1024px) {
  .auth-brand-section { display: none; }
  .auth-form-section { padding: 48px 24px; }
  .auth-form-bg { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
  .auth-form-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(220, 220, 220, 0.18) 1.1px, transparent 1.4px);
    background-size: 10px 10px;
    -webkit-mask-image: radial-gradient(70% 45% at 50% 100%, #000 0%, transparent 100%);
    mask-image: radial-gradient(70% 45% at 50% 100%, #000 0%, transparent 100%);
  }
  .auth-form-bg .auth-glow { width: 520px; height: 360px; bottom: -200px; }
  .auth-form-bg .auth-bg-logo { opacity: 0.04; }
  .auth-form-bg .auth-bg-logo--1 { top: 5%; left: 5%; width: 60px; }
  .auth-form-bg .auth-bg-logo--2 { top: 10%; right: 8%; width: 50px; }
  .auth-form-bg .auth-bg-logo--3 { bottom: 20%; left: 10%; width: 45px; }
  .auth-form-bg .auth-bg-logo--4 { bottom: 10%; right: 5%; width: 70px; }
}
@media (max-width: 480px) {
  .auth-form-section { padding: 24px 16px; }
  .auth-form-wrapper { padding: 28px 22px; }
  .auth-header h1 { font-size: 28px; line-height: 31px; letter-spacing: -1.1px; }
  .auth-logo, .auth-header { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-form-wrapper, .auth-brand-content > *, .auth-glow, .auth-brand-badge-dot { animation: none !important; }
}
