/* ── Auth pages shared styles ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

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

:root {
  --bg-deep:    #080705;
  --bg-panel:   #0d0b09;
  --bg-form:    #111009;
  --border:     rgba(255,255,255,0.055);
  --border-dim: rgba(255,255,255,0.03);
  --gold:       #b89a5a;
  --gold-dim:   rgba(184,154,90,0.18);
  --text:       #ddd5c5;
  --text-muted: #6a6058;
  --text-faint: #312e28;
  --red:        #7a1810;
  --red-hover:  #9a2218;
  --input-bg:   rgba(255,255,255,0.035);
  --input-focus:#8b6a2a;
  --radius:     6px;
  --font-head:  'Cormorant Garamond', Georgia, serif;
  --font-body:  'DM Sans', system-ui, sans-serif;
}

html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  overflow: hidden;
}

/* ── Layout ──────────────────────────────────────────────────────────── */

.auth-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

@media (max-width: 820px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand  { display: none; }
  body { overflow: auto; }
}

/* ── Brand panel (left) ──────────────────────────────────────────────── */

.auth-brand {
  position: relative;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 44px;
  overflow: hidden;
}

/* Ambient glow — single, intentional */
.auth-brand::before {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122,24,16,0.22) 0%, transparent 70%);
  top: -80px; left: -80px;
  pointer-events: none;
}

/* Grain texture */
.auth-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  opacity: 0.6;
}

.auth-brand-top { position: relative; z-index: 1; }
.auth-brand-mid { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.auth-brand-bot { position: relative; z-index: 1; }

.auth-logo {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}

.auth-brand-tagline {
  font-family: var(--font-head);
  font-size: clamp(32px, 3.5vw, 46px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.auth-brand-tagline em {
  font-style: normal;
  color: var(--gold);
}

.auth-brand-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 280px;
}

.auth-brand-quote {
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ── Form panel (right) ──────────────────────────────────────────────── */

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  overflow-y: auto;
  background: var(--bg-form);
}

.auth-form-inner {
  width: 100%;
  max-width: 380px;
}

.auth-form-title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.auth-form-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.6;
}

.auth-form-hint a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity .15s;
}
.auth-form-hint a:hover { opacity: 0.75; }

/* ── Divider ─────────────────────────────────────────────────────────── */

.auth-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

/* ── Fields ──────────────────────────────────────────────────────────── */

.auth-field { margin-bottom: 18px; }

.auth-field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.auth-field input,
.auth-field select {
  width: 100%;
  padding: 11px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.auth-field input:focus {
  border-color: rgba(139,106,42,0.6);
  background: rgba(255,255,255,0.045);
  box-shadow: 0 0 0 3px rgba(139,106,42,0.08);
}

.auth-field input::placeholder { color: var(--text-faint); }

/* ── Error / Help ────────────────────────────────────────────────────── */

.auth-error {
  background: rgba(122,24,16,0.15);
  border: 1px solid rgba(122,24,16,0.35);
  border-radius: var(--radius);
  padding: 9px 13px;
  font-size: 12.5px;
  color: #d07060;
  margin-bottom: 16px;
  line-height: 1.5;
}

.auth-success {
  background: rgba(20,80,30,0.15);
  border: 1px solid rgba(40,140,60,0.2);
  border-radius: var(--radius);
  padding: 9px 13px;
  font-size: 12.5px;
  color: #70c080;
  margin-bottom: 16px;
}

.auth-help {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 5px;
  line-height: 1.5;
}

/* ── Submit button ───────────────────────────────────────────────────── */

.auth-submit {
  width: 100%;
  padding: 12px;
  background: var(--red);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  color: #f0e8d8;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  margin-top: 4px;
  transition: background .18s, transform .15s, box-shadow .18s;
}

.auth-submit:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(122,24,16,0.35);
}

.auth-submit:active { transform: translateY(0); }

/* ── Secondary / ghost button ────────────────────────────────────────── */

.auth-btn-ghost {
  display: block;
  width: 100%;
  padding: 11px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .18s, color .18s;
  margin-top: 10px;
}
.auth-btn-ghost:hover { border-color: rgba(255,255,255,0.15); color: var(--text); }

/* ── Footer links ────────────────────────────────────────────────────── */

.auth-footer {
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.auth-footer a:hover { color: var(--text); }

/* ── Code input (verify page) ────────────────────────────────────────── */

.auth-code-input {
  width: 100%;
  padding: 18px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 300;
  letter-spacing: 16px;
  text-align: center;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  margin-bottom: 20px;
}

.auth-code-input:focus {
  border-color: rgba(139,106,42,0.5);
  box-shadow: 0 0 0 3px rgba(139,106,42,0.07);
}

.auth-code-input::placeholder {
  color: var(--text-faint);
  letter-spacing: 10px;
}

/* ── Notice box ──────────────────────────────────────────────────────── */

.auth-notice {
  background: rgba(184,154,90,0.06);
  border: 1px solid rgba(184,154,90,0.12);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.auth-notice strong { color: var(--text); font-weight: 500; }

/* ── Icon card (success/complete) ────────────────────────────────────── */

.auth-icon-card {
  text-align: center;
  padding: 8px 0 24px;
}

.auth-icon-card svg {
  width: 48px; height: 48px;
  color: var(--gold);
  margin-bottom: 20px;
  opacity: 0.8;
}

.auth-icon-card h2 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 10px;
}

.auth-icon-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

/* ── Resend button ───────────────────────────────────────────────────── */

.auth-resend-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
  transition: color .15s;
}
.auth-resend-btn:hover { color: var(--text); }
.auth-resend-btn:disabled { color: var(--text-faint); cursor: default; }
