/* auth.css — sign-in / sign-up / password-reset. Split layout: product preview (left), form (right). */

.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); min-height: 100vh; }

/* ---- left: brand + product preview ---- */
.login-side { position: relative; display: flex; flex-direction: column; gap: 36px; padding: 32px clamp(28px, 5vw, 72px); background: var(--stage); border-right: 1px solid var(--hair); overflow: hidden; }
.login-side::before { content: ''; position: absolute; width: 560px; height: 560px; right: -200px; top: -180px; border-radius: 50%; background: radial-gradient(closest-side, rgba(14, 169, 104, .16), transparent); pointer-events: none; }
.login-side > * { position: relative; }
.login-side-copy { margin-top: auto; max-width: 520px; }
.login-side-copy .eyebrow { margin: 0 0 14px; }
.login-side-copy h1 { margin: 0 0 14px; font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.06; letter-spacing: -0.035em; font-weight: 600; }
.hero-text { margin: 0; font-size: 1.02rem; line-height: 1.65; color: var(--muted); }

.preview { max-width: 520px; display: flex; flex-direction: column; gap: 14px; margin-bottom: auto; }
.preview-bubble { align-self: flex-end; max-width: 78%; background: var(--bubble); border: 1px solid var(--bubble-border); border-radius: 16px 16px 4px 16px; padding: 10px 14px; font-size: .88rem; }
.preview-reply { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: 0 24px 60px rgba(14, 169, 104, .12), 0 2px 6px rgba(19, 24, 21, .04); }
.preview-reply-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-family: var(--font-display); font-size: .88rem; }
.preview-reply-head i { font-family: var(--font-mono); font-style: normal; font-size: 10.5px; color: var(--muted); }
.preview-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--emerald) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19c0-8 5-14 14-14 0 9-6 14-14 14z'/%3E%3Cpath d='M5 19c3-5 6-8 10-10'/%3E%3C/svg%3E") center / 14px no-repeat; }
.preview-reply p { margin: 0 0 14px; font-size: .86rem; line-height: 1.6; }
.preview-bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; }
.preview-bars span { flex: 1; border-radius: 4px 4px 0 0; background: #b7e1cb; }
.preview-bars span.peak { background: var(--emerald); }
.preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); }
.preview-stats b { display: block; font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -.02em; }
.preview-stats small { color: var(--muted); font-size: .72rem; }

/* ---- right: form ---- */
.login-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px 24px; background: var(--canvas); }
.login-foot { margin: 0; font-size: .78rem; color: var(--faint); text-align: center; }
.pill .dot { width: 6px; height: 6px; }

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-kicker {
  margin: 0 0 6px;
  color: var(--emerald-deep);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--track);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}

.mode-btn {
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn.active {
  background: var(--emerald);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 169, 104, 0.3);
}

.session-state {
  display: none;
  padding: 14px;
  border-radius: 16px;
  background: var(--chip);
  border: 1px solid rgba(14, 169, 104, 0.14);
  margin-top: 16px;
}

.session-state.active {
  display: block;
}

.session-state h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--primary-dark);
}

.session-state p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--muted);
}


/* primary action buttons inside the auth forms */
.auth-form button,
.session-state button { background: var(--emerald); color: #fff; box-shadow: var(--shadow-accent); }
.auth-form button:hover,
.session-state button:hover { background: var(--emerald-deep); }
.auth-form button.secondary-link { box-shadow: none; }

/* only the active step of the flow is visible */
.auth-form { display: none; flex-direction: column; gap: 14px; }
.auth-form.active-form { display: flex; }

.auth-card { width: min(440px, 100%); }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .login-main { min-height: 100vh; }
}
