/* ============================================================
   auth.css — Authentication Pages
   Split-panel: Brand panel (left) + Form panel (right)
============================================================ */

/* ── Full-page split grid ───────────────────────────────── */
.auth-split {
  display: grid;
  grid-template-columns: 400px 1fr;
  min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════
   LEFT  —  Brand Panel
══════════════════════════════════════════════════════════ */
.auth-brand {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2.2rem;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow: hidden;
  z-index: 1;
}

/* Ambient glows inside brand panel */
.auth-brand::before {
  content: '';
  position: absolute;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: var(--gold);
  filter: blur(150px);
  opacity: .09;
  top: -140px; left: -120px;
  pointer-events: none;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: var(--teal);
  filter: blur(130px);
  opacity: .07;
  bottom: -100px; right: -90px;
  pointer-events: none;
}

/* ── Brand logo row ─── */
.auth-brand-logo {
  position: relative;
  z-index: 2;
  margin-bottom: auto;
}
.auth-brand-logo a {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--text);
}
.auth-logo-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--gold), var(--teal));
  display: flex; align-items: center; justify-content: center;
  color: #0a0a0a;
  font-size: .9rem;
  flex-shrink: 0;
}
.auth-logo-mark img {
  height: 22px; width: auto;
  border-radius: 6px;
}
.auth-logo-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.3px;
}
.auth-logo-name img {
  height: 26px; width: auto;
  display: block;
}
.auth-logo-img {
  height: 28px; width: auto;
  display: block;
}

/* ── Brand body ─── */
.auth-brand-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 2rem 0;
}

.auth-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(240,180,41,.08);
  border: 1px solid rgba(240,180,41,.18);
  border-radius: 20px;
  padding: .28rem .7rem;
  margin-bottom: 1rem;
  width: fit-content;
}
.auth-brand-pill i { font-size: .55rem; }

.auth-brand-headline {
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: .85rem;
}
.auth-brand-headline em {
  font-style: normal;
  color: var(--gold);
}

.auth-brand-desc {
  font-size: .83rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

/* Stats grid */
.auth-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-bottom: 1.6rem;
}
.auth-stat-box {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: .75rem .9rem;
}
.auth-stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: .22rem;
}
.auth-stat-lbl {
  font-size: .67rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Trust list */
.auth-trust-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.auth-trust-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .77rem;
  color: var(--text2);
}
.auth-trust-row i {
  color: var(--teal);
  font-size: .72rem;
  width: 14px;
  flex-shrink: 0;
}

/* ── Brand footer ─── */
.auth-brand-foot {
  position: relative;
  z-index: 2;
}
.auth-back-home {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  color: var(--text3);
  text-decoration: none;
  padding: .5rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  transition: color .2s, border-color .2s, background .2s;
}
.auth-back-home:hover {
  color: var(--text);
  border-color: rgba(240,180,41,.35);
  background: rgba(240,180,41,.05);
}
.auth-back-home i { font-size: .7rem; transition: transform .2s; }
.auth-back-home:hover i { transform: translateX(-2px); }

/* ══════════════════════════════════════════════════════════
   RIGHT  —  Form Panel
══════════════════════════════════════════════════════════ */
.auth-form-panel {
  position: relative;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  min-height: 100vh;
  overflow-y: auto;
}

/* Subtle ambient glow */
.auth-form-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 45% at 65% 25%,
    rgba(240,180,41,.04) 0%, transparent 65%);
  pointer-events: none;
}

/* Theme toggle button — fixed top-right */
.auth-theme-btn {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 200;
}

/* ── Form card ─── */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.4rem 2.2rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 48px rgba(0,0,0,.18);
}

/* Card top badge */
.auth-card-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(240,180,41,.07);
  border: 1px solid rgba(240,180,41,.15);
  border-radius: 20px;
  padding: .27rem .65rem;
  margin-bottom: .9rem;
}

.auth-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: .3rem;
  line-height: 1.2;
}
.auth-card-sub {
  font-size: .82rem;
  color: var(--text2);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

/* Referral banner */
.auth-ref-banner {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: linear-gradient(135deg,
    rgba(240,180,41,.07) 0%, rgba(0,212,180,.04) 100%);
  border: 1px solid rgba(240,180,41,.2);
  border-radius: 10px;
  padding: .7rem .9rem;
  font-size: .79rem;
  color: var(--text2);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}
.auth-ref-banner i { color: var(--gold); font-size: .9rem; flex-shrink: 0; }
.auth-ref-banner strong { color: var(--gold); }

/* ── Form fields ─── */
.auth-fields {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.auth-field {}

.auth-lbl {
  display: block;
  font-size: .73rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: .32rem;
  letter-spacing: .02em;
}
.auth-lbl span {
  color: var(--text3);
  font-weight: 400;
  font-size: .7rem;
}

.auth-input-wrap { position: relative; }

.auth-input-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: .82rem;
  pointer-events: none;
  transition: color .2s;
  z-index: 1;
}
.auth-input-wrap:focus-within .auth-input-icon { color: var(--gold); }

.auth-input {
  width: 100%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .73rem 1rem .73rem 2.45rem;
  font-size: .875rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.auth-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,180,41,.1);
}
.auth-input::placeholder { color: var(--text3); }
.auth-input.has-toggle { padding-right: 2.8rem; }

/* Password eye toggle */
.auth-eye {
  position: absolute;
  right: .85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: .85rem;
  padding: 0;
  transition: color .2s;
  z-index: 1;
}
.auth-eye:hover { color: var(--gold); }

/* Forgot password link */
.auth-forgot {
  text-align: right;
  margin-top: -.45rem;
}
.auth-forgot a {
  font-size: .73rem;
  color: var(--text3);
  text-decoration: none;
  transition: color .2s;
}
.auth-forgot a:hover { color: var(--gold); }

/* ── Password strength meter ─── */
.pwd-meter {
  display: flex;
  gap: .25rem;
  margin-top: .42rem;
}
.pwd-meter-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background .35s;
}
.pwd-meter-bar.weak   { background: var(--red); }
.pwd-meter-bar.fair   { background: #f59e0b; }
.pwd-meter-bar.good   { background: var(--teal); }
.pwd-meter-bar.strong { background: var(--green); }
.pwd-strength-label {
  font-size: .68rem;
  color: var(--text3);
  margin-top: .25rem;
  min-height: .9rem;
  transition: color .2s;
}

/* ── Terms checkbox ─── */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text2);
  line-height: 1.55;
}
.auth-terms input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--gold);
  flex-shrink: 0;
  cursor: pointer;
  width: 14px;
  height: 14px;
}
.auth-terms a { color: var(--gold); text-decoration: none; }
.auth-terms a:hover { text-decoration: underline; }

/* ── Submit button ─── */
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .84rem 1rem;
  border-radius: 10px;
  background: var(--gold);
  color: #0a0a0a;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(240,180,41,.22);
  margin-top: .3rem;
}
.auth-submit:hover {
  background: var(--gold2);
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(240,180,41,.32);
}
.auth-submit:active { transform: translateY(0); }
.auth-submit i { font-size: .85rem; }

/* ── reCAPTCHA note ─── */
.auth-captcha-note {
  font-size: .7rem;
  color: var(--text3);
  text-align: center;
  margin-top: .65rem;
  line-height: 1.5;
}
.auth-captcha-note a { color: var(--text3); text-decoration: underline; }

/* ── Card footer / switch link ─── */
.auth-card-foot {
  text-align: center;
  font-size: .81rem;
  color: var(--text2);
  margin-top: 1.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.auth-card-foot a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}
.auth-card-foot a:hover { text-decoration: underline; }

/* ── Divider ─── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .72rem;
  color: var(--text3);
  margin: .25rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */

/* ── Tablet / small desktop ≤ 900px ── */
@media (max-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .auth-brand {
    position: relative;
    height: auto;
    padding: 1rem 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
  .auth-brand::before { opacity: .05; top: -60px; }
  .auth-brand::after  { opacity: .04; bottom: -40px; }
  .auth-brand-body    { display: none; }
  .auth-brand-foot    { margin: 0; flex-shrink: 0; }

  .auth-form-panel {
    min-height: calc(100vh - 66px);
    justify-content: flex-start;
    padding: 2.5rem 1.5rem 3rem;
    align-items: center;
  }
}

/* ── Mobile ≤ 480px ── */
@media (max-width: 480px) {
  .auth-brand { padding: .85rem 1.2rem; }
  .auth-card  { padding: 1.8rem 1.4rem; border-radius: 16px; }
  .auth-field-row { grid-template-columns: 1fr; gap: .85rem; }
  .auth-form-panel { padding: 2rem 1rem 3rem; }
  .auth-theme-btn  { top: .75rem; right: .75rem; }
}
