:root {
  --bg-top: #fff8fb;
  --bg-mid: #ffeef5;
  --bg-bottom: #f5f0ff;
  --card: rgba(255, 255, 255, 0.95);
  --border: rgba(232, 180, 188, 0.45);
  --text: #3d2f35;
  --muted: #7d6570;
  --accent: #b76e79;
  --accent-soft: rgba(183, 110, 121, 0.15);
  --radius: 16px;
  --radius-sm: 12px;
  --font-ui: 'Nunito', system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --shadow-lg: 0 12px 40px rgba(183, 110, 121, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 228, 236, 0.9), transparent),
    linear-gradient(165deg, var(--bg-top) 0%, var(--bg-mid) 42%, var(--bg-bottom) 100%);
}
.auth-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: none;
}
.brand-mark small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-top: 2px;
}
.auth-main {
  min-height: calc(100dvh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
}
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: rgba(252, 232, 236, 0.5);
  padding: 4px;
  border-radius: var(--radius-sm);
}
.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.auth-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.auth-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  text-align: center;
  margin-bottom: 8px;
}
.auth-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
  line-height: 1.5;
}
.auth-note {
  margin: -8px 0 16px;
  padding: 12px 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  color: #065f46;
  font-size: 0.88rem;
  text-align: center;
  line-height: 1.45;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 0.82rem; font-weight: 600; }
.field input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  background: #fff;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.error {
  color: #b91c1c;
  font-size: 0.88rem;
  text-align: center;
  padding: 10px;
  background: #fef2f2;
  border-radius: var(--radius-sm);
}
.ok-msg {
  color: #15803d;
  font-size: 0.88rem;
  text-align: center;
  padding: 10px;
  background: #f0fdf4;
  border-radius: var(--radius-sm);
}
.auth-back {
  display: block;
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}
.auth-back:hover { color: var(--accent); }
.auth-shared-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .auth-main { align-items: flex-start; padding-top: 20px; }
  .auth-card { padding: 24px 18px; }
  .btn-primary { width: 100%; }
}
