/* ============================================================
   SoulStones — Sign In / Register page
   Self-contained split-screen auth experience. Reuses design
   tokens, .btn, .hero-accent, .wordmark from styles.css. No
   site header/footer here by design (full-viewport takeover,
   the standard pattern for premium auth pages).
   ============================================================ */

html, body { height: 100%; }
.auth-body { background: var(--surface); overflow-x: hidden; }

.auth-shell {
  display: grid;
  grid-template-columns: 40% 60%;
  min-height: 100vh;
}

/* ----------------------------- Left brand panel ----------------------------- */
.auth-brand {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 100vh; overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
}
.auth-brand-media {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
}
.auth-brand-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(22, 18, 11, 0.66) 0%, rgba(22, 18, 11, 0.58) 50%, rgba(22, 18, 11, 0.82) 100%);
}

.auth-brand-logo { color: var(--on-black); font-size: 1.5rem; }
.auth-brand-logo .wordmark-stones { color: var(--gold); }

.auth-brand-copy { max-width: 30rem; }
.auth-brand-accent { color: var(--gold-soft) !important; margin-bottom: 14px !important; }
.auth-brand-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.9rem, 3vw, 2.6rem); letter-spacing: -0.02em; line-height: 1.16;
  color: var(--gold); margin: 0;
}
.auth-brand-sub {
  font-family: var(--font-body); font-size: 1rem; line-height: 1.65;
  color: var(--on-black-muted); margin: 18px 0 0; max-width: 42ch;
}

.auth-brand-switch { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.auth-brand-switch-text { margin: 0; font-size: 0.9375rem; color: var(--on-black-muted); }
.auth-brand-switch-btn {
  background: none; border: 1px solid var(--hairline-on-black); border-radius: var(--r-pill);
  padding: 9px 22px; color: var(--gold);
  font-family: var(--font-body); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.auth-brand-switch-btn:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* ----------------------------- Right form panel ----------------------------- */
.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 64px);
  background: var(--surface);
}
.auth-panel-inner { width: 100%; max-width: 440px; }

.auth-form-stage { position: relative; }

/* ----------------------------- Form swap animation ----------------------------- */
.auth-form {
  opacity: 0; transform: translateY(10px);
  transition: opacity .26s var(--ease), transform .26s var(--ease);
}
.auth-form.is-active { opacity: 1; transform: none; }
.auth-form.is-leaving { opacity: 0; transform: translateY(-10px); }

.auth-form-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.25rem); letter-spacing: -0.02em; line-height: 1.1;
  color: var(--gold-deep); margin: 0 0 8px;
}
.auth-form-sub { margin: 0 0 30px; color: var(--muted); font-size: 1rem; line-height: 1.5; }

/* ----------------------------- Fields ----------------------------- */
.auth-field { margin-bottom: 20px; }
.auth-field label {
  display: block; margin-bottom: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold-deep);
}
.auth-field input {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--hairline); border-radius: var(--r-card);
  padding: 13px 16px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.auth-field input::placeholder { color: var(--muted); }
.auth-field input:focus {
  outline: none; border-color: var(--gold); background: var(--surface);
  box-shadow: 0 0 0 3px var(--hairline-gold);
}

.auth-password-row { position: relative; }
.auth-password-row input { padding-right: 48px; }
.auth-password-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 8px; color: var(--muted);
  transition: color .16s var(--ease), background .16s var(--ease);
}
.auth-password-toggle:hover { color: var(--gold-deep); background: rgba(135, 101, 33, 0.08); }
.auth-password-toggle.is-visible { color: var(--gold-deep); }

.auth-forgot {
  display: inline-block; margin: -8px 0 24px; font-size: 0.875rem; font-weight: 500;
  color: var(--gold-deep); text-decoration: underline !important; text-underline-offset: 3px;
}
.auth-forgot:hover { color: var(--ink); }

/* ----------------------------- Buttons / submit ----------------------------- */
.auth-submit { width: 100%; }

.auth-form-msg { margin: 14px 0 0; font-size: 0.8125rem; min-height: 1.1em; color: var(--muted); text-align: center; }
.auth-form-msg[data-state="info"] { color: var(--gold-deep); }
.auth-form-msg[data-state="error"] { color: #c0392b; }

.auth-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 26px 0 20px; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }

.auth-google-btn { width: 100%; }

.auth-switch-inline { margin: 28px 0 0; text-align: center; font-size: 0.9375rem; color: var(--muted); }
.auth-switch-link {
  background: none; border: 0; padding: 0; margin-left: 4px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9375rem;
  color: var(--gold-deep); text-decoration: underline !important; text-underline-offset: 3px;
}
.auth-switch-link:hover { color: var(--ink); }

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 1100px) {
  .auth-shell { grid-template-columns: 36% 64%; }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: clamp(320px, 46vh, 420px); }
  .auth-panel { padding-block: 40px 64px; }
}

@media (max-width: 540px) {
  .auth-brand { padding: 84px 20px;height: 100% !important; }
  .auth-brand-sub { display: none; }
  .auth-brand-title { font-size: 1.6rem; }
  .auth-panel-inner { max-width: 100%; }
}
