:root {
  --auth-page-bg: #f4efe6;
  --auth-page-top: #fbf8f1;
  --auth-surface: rgba(255, 255, 255, 0.78);
  --auth-surface-strong: rgba(255, 255, 255, 0.92);
  --auth-card-bg: rgba(255, 255, 255, 0.94);
  --auth-border: rgba(29, 26, 20, 0.1);
  --auth-border-strong: rgba(29, 26, 20, 0.16);
  --auth-text: #181613;
  --auth-text-soft: rgba(24, 22, 19, 0.74);
  --auth-text-muted: rgba(24, 22, 19, 0.56);
  --auth-gold: #b59a5a;
  --auth-gold-deep: #8c7440;
  --auth-gold-wash: rgba(181, 154, 90, 0.14);
  --auth-success: #2e633d;
  --auth-success-bg: rgba(46, 99, 61, 0.11);
  --auth-danger: #9a3535;
  --auth-danger-bg: rgba(154, 53, 53, 0.1);
  --auth-shadow-soft: 0 12px 40px rgba(35, 26, 16, 0.08);
  --auth-shadow-card: 0 24px 80px rgba(32, 24, 15, 0.14);
  --auth-radius-xl: 28px;
  --auth-radius-lg: 22px;
  --auth-radius-md: 16px;
  --auth-radius-sm: 12px;
  --auth-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --auth-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body.auth-page {
  margin: 0;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(181, 154, 90, 0.18), transparent 58%),
    radial-gradient(760px 420px at 100% 12%, rgba(209, 193, 151, 0.2), transparent 56%),
    linear-gradient(180deg, var(--auth-page-top) 0%, var(--auth-page-bg) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 440px);
  gap: 32px;
  align-items: center;
}

.auth-atmosphere {
  position: relative;
  padding: 40px 32px;
  border-radius: var(--auth-radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--auth-shadow-soft);
  overflow: hidden;
}

.auth-atmosphere::before {
  content: "";
  position: absolute;
  inset: auto -10% -22% auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(181, 154, 90, 0.18) 0%, rgba(181, 154, 90, 0) 72%);
  pointer-events: none;
}

.auth-brand,
.auth-brand:hover {
  text-decoration: none;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 48px;
}

.auth-brand-mark {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #cfb985 0%, var(--auth-gold) 100%);
  color: #fffdf8;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  box-shadow: 0 18px 32px rgba(181, 154, 90, 0.24);
}

.auth-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-brand-subtitle {
  font-size: 0.88rem;
  color: var(--auth-text-muted);
}

.auth-intro {
  max-width: 560px;
}

.auth-eyebrow,
.auth-card-kicker {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-gold-deep);
}

.auth-hero-title {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 10ch;
}

.auth-hero-text {
  margin: 20px 0 0;
  max-width: 54ch;
  font-size: 1.03rem;
  line-height: 1.7;
  color: var(--auth-text-soft);
}

.auth-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.auth-highlight {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--auth-radius-md);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-highlight strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.auth-highlight span {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--auth-text-soft);
}

.auth-card {
  position: relative;
  padding: 32px;
  border-radius: var(--auth-radius-xl);
  background: var(--auth-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--auth-shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(181, 154, 90, 0.18));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.auth-card > * {
  position: relative;
}

.auth-card-header {
  margin-bottom: 26px;
}

.auth-card-title {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.auth-card-text {
  margin: 12px 0 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--auth-text-soft);
}

.auth-form {
  position: relative;
  display: grid;
  gap: 18px;
}

.auth-field--honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-inline-nav {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.92rem;
}

.auth-inline-nav a {
  font-weight: 700;
  color: var(--auth-gold-deep);
  text-decoration: none;
}

.auth-inline-nav a:hover,
.auth-inline-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-text-muted);
}

.auth-field input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-sm);
  background: var(--auth-surface-strong);
  color: var(--auth-text);
  font: inherit;
  transition:
    border-color 0.18s var(--auth-ease),
    box-shadow 0.18s var(--auth-ease),
    background 0.18s var(--auth-ease),
    transform 0.18s var(--auth-ease);
}

.auth-field input::placeholder {
  color: rgba(24, 22, 19, 0.38);
}

.auth-field input:hover {
  border-color: var(--auth-border-strong);
}

.auth-field input:focus {
  outline: none;
  border-color: rgba(181, 154, 90, 0.65);
  box-shadow: 0 0 0 4px rgba(181, 154, 90, 0.18);
  background: #ffffff;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #c9b27b 0%, var(--auth-gold) 100%);
  color: #fffdf9;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(181, 154, 90, 0.24);
  transition:
    transform 0.18s var(--auth-ease),
    box-shadow 0.18s var(--auth-ease),
    filter 0.18s var(--auth-ease);
  text-decoration: none;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(181, 154, 90, 0.28);
  filter: saturate(1.05);
}

.auth-submit:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(181, 154, 90, 0.18),
    0 16px 30px rgba(181, 154, 90, 0.24);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit--secondary {
  background: rgba(24, 22, 19, 0.04);
  color: var(--auth-text);
  border: 1px solid rgba(24, 22, 19, 0.08);
  box-shadow: none;
}

.auth-submit--secondary:hover {
  box-shadow: 0 10px 24px rgba(24, 22, 19, 0.08);
  filter: none;
}

.auth-notice {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--auth-radius-sm);
  font-size: 0.94rem;
  line-height: 1.55;
  border: 1px solid transparent;
}

.auth-notice--success {
  color: var(--auth-success);
  background: var(--auth-success-bg);
  border-color: rgba(46, 99, 61, 0.18);
}

.auth-notice--error {
  color: var(--auth-danger);
  background: var(--auth-danger-bg);
  border-color: rgba(154, 53, 53, 0.18);
}

.auth-debug-panel {
  margin-top: -2px;
  padding: 14px 16px;
  border-radius: var(--auth-radius-sm);
  background: rgba(24, 22, 19, 0.05);
  border: 1px solid rgba(24, 22, 19, 0.08);
  color: var(--auth-text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
}

.auth-support {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(24, 22, 19, 0.08);
}

.auth-support-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
}

.auth-support-text {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--auth-text-soft);
}

.auth-support-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--auth-gold-deep);
  text-decoration: none;
}

.auth-support-link::after {
  content: "->";
  transition: transform 0.18s var(--auth-ease);
}

.auth-support-link:hover::after,
.auth-support-link:focus-visible::after {
  transform: translateX(2px);
}

.auth-support-link:hover,
.auth-support-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .auth-atmosphere {
    padding: 30px 24px 24px;
  }

  .auth-brand {
    margin-bottom: 28px;
  }

  .auth-hero-title {
    max-width: 13ch;
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .auth-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 18px 14px 24px;
    align-items: stretch;
  }

  .auth-layout {
    gap: 16px;
  }

  .auth-card {
    order: -1;
  }

  .auth-atmosphere,
  .auth-card {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .auth-brand {
    margin-bottom: 22px;
  }

  .auth-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .auth-hero-title {
    max-width: none;
    font-size: 2rem;
  }

  .auth-hero-text {
    margin-top: 14px;
    font-size: 0.96rem;
  }

  .auth-highlights {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 24px;
  }

  .auth-highlight {
    padding: 14px 16px;
  }

  .auth-card-title {
    font-size: 1.65rem;
  }

  .auth-field input,
  .auth-submit {
    min-height: 50px;
  }
}
