*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F9F4EB;
  --warm: #E8DBC4;
  --muted: #8A7560;
  --copper: #B66C45;
  --ink: #2D2620;
  --dark: #1A1411;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

html, body { height: 100%; }
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.55; }

/* Split layout */
.auth-split {
  display: grid;
  grid-template-columns: 0.95fr 1fr;
  min-height: 100vh;
}

/* Brand panel */
.auth-brand {
  background: linear-gradient(135deg, #2D2620 0%, #3D3328 60%, #1A1411 100%);
  color: #F0E5D2;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  top: -200px; right: -250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,160,102,0.18), transparent 65%);
  pointer-events: none;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  bottom: -180px; left: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182,108,69,0.12), transparent 65%);
  pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-brand-top { display: flex; align-items: center; gap: 0.55rem; }
.auth-logo { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.025em; color: #F9F4EB; }
.auth-badge { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(217,160,102,0.85); font-weight: 700; padding: 0.3rem 0.65rem; background: rgba(217,160,102,0.1); border: 1px solid rgba(217,160,102,0.3); border-radius: 999px; }

.auth-brand-mid { display: flex; flex-direction: column; gap: 1.2rem; }
.auth-eyebrow { font-size: 0.65rem; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(217,160,102,0.9); font-weight: 700; }
.auth-headline { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; letter-spacing: -0.03em; line-height: 1.02; color: #F9F4EB; max-width: 14ch; }
.auth-headline em { font-style: italic; color: #D9A066; font-weight: 400; }
.auth-sub { font-size: 1rem; line-height: 1.55; color: rgba(249,244,235,0.7); max-width: 30ch; }

.auth-features { display: flex; flex-direction: column; gap: 0.85rem; }
.auth-feature { display: flex; align-items: center; gap: 0.7rem; font-size: 0.85rem; color: rgba(249,244,235,0.8); }
.auth-feature-icon { width: 30px; height: 30px; border-radius: 8px; background: rgba(217,160,102,0.12); color: #D9A066; display: grid; place-items: center; flex-shrink: 0; }
.auth-feature-icon svg { width: 14px; height: 14px; }
.auth-feature b { color: #F9F4EB; font-weight: 600; }

/* Form panel */
.auth-form-panel { padding: 1.5rem 2.5rem 2.5rem; display: flex; flex-direction: column; background: #fff; }

.auth-back { display: inline-flex; align-items: center; gap: 0.4rem; align-self: flex-start; padding: 0.5rem 0.85rem; border-radius: 8px; font-size: 0.82rem; color: #5C5040; text-decoration: none; transition: background 0.12s, color 0.12s; }
.auth-back:hover { background: #FDF8EE; color: var(--copper); }
.auth-back svg { width: 13px; height: 13px; }

.auth-form-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 2rem 0; max-width: 380px; margin: 0 auto; width: 100%; }

.auth-form-title { font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 0.55rem; }
.auth-form-sub { font-size: 0.95rem; color: #5C5040; line-height: 1.55; margin-bottom: 1.8rem; }
.auth-form-sub a { color: var(--copper); font-weight: 600; text-decoration: none; }
.auth-form-sub a:hover { text-decoration: underline; }

/* Alerts */
.auth-alert { padding: 0.75rem 1rem; border-radius: 9px; font-size: 0.9rem; margin-bottom: 1.2rem; }
.auth-alert-error { background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B; }
.auth-alert-success { background: #F0FDF4; border: 1px solid #86EFAC; color: #166534; }

/* Fields */
.auth-field { margin-bottom: 1rem; }
.auth-label { font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper); font-weight: 700; display: block; margin-bottom: 0.35rem; }
.auth-optional { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.75rem; }
.auth-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.35rem; }

.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.7rem;
  background: #FDF8EE;
  border: 1px solid var(--warm);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.12s, background 0.12s;
}
.auth-input:focus { border-color: var(--copper); background: #fff; }
.auth-input-padded-right { padding-right: 2.7rem; }
.auth-input-icon { position: absolute; left: 1rem; color: var(--muted); pointer-events: none; }
.auth-input-icon svg { width: 16px; height: 16px; display: block; }
.auth-eye { position: absolute; right: 0.85rem; background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 0.3rem; display: flex; line-height: 1; }
.auth-eye:hover { color: var(--copper); }
.auth-eye svg { width: 16px; height: 16px; }

.auth-row { display: flex; align-items: center; justify-content: flex-end; margin: 0.25rem 0 1.2rem; }
.auth-link-sm { font-size: 0.85rem; color: var(--copper); text-decoration: none; font-weight: 600; }
.auth-link-sm:hover { text-decoration: underline; }

/* CTA */
.auth-cta {
  width: 100%;
  padding: 0.95rem;
  background: var(--ink);
  color: #F9F4EB;
  border: 0;
  border-radius: 11px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 8px 22px rgba(45,38,32,0.18);
  transition: transform 0.15s, box-shadow 0.15s, background 0.12s;
}
.auth-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(45,38,32,0.24); background: var(--dark); }
.auth-cta:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.auth-cta svg { width: 14px; height: 14px; }

.auth-alt { text-align: center; font-size: 0.9rem; color: #5C5040; margin-top: 1.8rem; }
.auth-alt a { color: var(--copper); text-decoration: none; font-weight: 700; }
.auth-alt a:hover { text-decoration: underline; }

/* Social login */
.auth-social { margin-top: 1.5rem; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--warm);
}

.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.auth-social-row:has(> a:only-child) {
  grid-template-columns: 1fr;
}

.auth-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--warm);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.auth-social-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.auth-social-btn:hover { border-color: #ccc; background: #FAFAFA; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* Confirm email code inputs */
.auth-code-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.auth-code-cell {
  aspect-ratio: 1;
  padding: 0;
  background: #FDF8EE;
  border: 1px solid var(--warm);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  text-align: center;
  color: var(--ink);
  outline: none;
  transition: border-color 0.12s, background 0.12s;
}
.auth-code-cell:focus, .auth-code-cell.filled { border-color: var(--copper); background: #fff; }

/* Resend */
.auth-resend { font-size: 0.85rem; color: #5C5040; text-align: center; margin-top: 1rem; }
.auth-link-btn { background: none; border: none; color: var(--copper); font-weight: 600; font-size: 0.85rem; cursor: pointer; font-family: inherit; padding: 0; text-decoration: none; }
.auth-link-btn:hover { text-decoration: underline; }

.auth-foot { font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 1rem; }
.auth-foot a { color: #5C5040; text-decoration: none; margin: 0 0.4rem; }
.auth-foot a:hover { color: var(--copper); }

/* Responsive */
@media (max-width: 768px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-panel { padding: 1.5rem; }
  .auth-form-wrap { padding: 1.5rem 0; }
}
