.auth-page {
  --auth-accent: #b18a40;
  --auth-dark: #2d2923;
  --auth-muted: #7c7365;
  --auth-line: #e6dcc9;
  --auth-input: #fffefa;
  --auth-input-text: #342e24;
  --auth-soft: #f6f0e3;
  --auth-panel: #fffdf8f2;
  --auth-link: #8a651f;
  --auth-error: #ae3941;
  --auth-ease: cubic-bezier(.2, .72, .22, 1);
  box-sizing: border-box;
  min-height: calc(100svh - 104px);
  padding: 25px 32px 72px;
  color: var(--auth-dark);
  background: transparent;
  color-scheme: light;
}

.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-page a { color: inherit; text-decoration: none; }
.auth-page :where(button, input) { font: inherit; }
.auth-page button { cursor: pointer; }
.auth-page button:disabled { cursor: not-allowed; opacity: .58; }
.auth-page button:disabled:hover { filter: none; transform: none; }
.auth-page [hidden] { display: none; }
.auth-page :focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 3px; }
.auth-title:focus { outline: none; }

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  align-items: start;
  gap: 64px;
  width: min(100%, 1240px);
  margin: 0 auto;
}

.auth-intro { min-width: 0; padding: 56px 0 24px 8px; }
.auth-intro-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 23px; color: var(--auth-link); font-size: 13px; font-weight: 650; letter-spacing: .055em; }
.auth-intro-brand > span { width: 23px; height: 1px; background: currentColor; }
.auth-intro h2 { margin: 0; font-size: clamp(36px, 4.1vw, 54px); font-weight: 650; line-height: 1.3; letter-spacing: -.045em; }
.auth-intro h2 > span { display: block; margin-top: 6px; color: #a8833e; }
.auth-benefits { display: grid; gap: 18px; margin: 29px 0 0; padding: 0; list-style: none; }
.auth-benefits li { display: flex; align-items: center; gap: 12px; }
.auth-benefit-icon { display: grid; width: 34px; height: 34px; flex: none; place-items: center; border: 1px solid #ddc99f; border-radius: 50%; color: #9b742d; background: #fffaf0b3; }
.auth-benefit-icon svg { width: 17px; height: 17px; }
.auth-benefits li > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; }
.auth-benefits strong { font-size: 13px; font-weight: 650; }
.auth-benefits li > div > span { color: var(--auth-muted); font-size: 12px; line-height: 1.6; }
.auth-membership-card { width: min(360px, 85%); margin: 48px 0 12px 19px; transform: rotate(-7deg); transform-origin: center; filter: drop-shadow(0 19px 18px #41342220); }
.auth-membership-card .member-card { width: 100%; }

.auth-account-column { min-width: 0; }
.auth-context-nav { display: flex; width: fit-content; min-height: 44px; align-items: center; justify-content: flex-end; gap: 14px; margin: 0 0 17px auto; padding: 0 17px; border: 1px solid var(--auth-line); border-radius: 999px; background: #fffbf27a; color: var(--auth-muted); font-size: 12px; }
.auth-context-nav a { display: inline-flex; min-height: 44px; align-items: center; }
.auth-context-nav a:hover { color: var(--auth-link); }
.auth-context-nav > span { color: #bfb19a; }
.auth-panel { min-width: 0; padding: 31px 36px 29px; border: 1px solid #e7dcc7; border-radius: 24px; background: var(--auth-panel); box-shadow: 0 15px 45px #6651240b, 0 2px 7px #66512405; }
.auth-panel-brand { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 0 0 18px; color: var(--auth-link); }
.auth-panel-brand > span { font-size: 14px; font-weight: 750; letter-spacing: .08em; }
.auth-panel-brand > small { font-size: 9px; font-weight: 500; letter-spacing: .15em; }
.auth-panel-content { width: 100%; min-width: 0; }
.auth-title { margin: 0 0 9px; color: var(--auth-dark); font-size: 28px; font-weight: 650; letter-spacing: -.025em; line-height: 1.35; text-align: center; }
.auth-description { margin: 0 0 25px; color: var(--auth-muted); font-size: 12px; line-height: 1.75; text-align: center; }
.auth-preview-badge { display: table; min-height: 20px; margin: 0 auto 10px; padding: 2px 8px; border: 1px solid var(--auth-line); border-radius: 6px; color: var(--auth-link); background: var(--auth-soft); font-size: 10px; font-weight: 500; line-height: 1.5; }
.auth-form { display: grid; gap: 16px; }
.auth-field { display: grid; min-width: 0; gap: 8px; color: var(--auth-dark); font-size: 13px; font-weight: 600; }
.auth-password-row { position: relative; }
.auth-field input { display: block; width: 100%; min-width: 0; min-height: 50px; padding: 0 14px; border: 1px solid var(--auth-line); border-radius: 11px; outline: none; color: var(--auth-input-text); background: var(--auth-input); font-size: 16px; font-weight: 400; transition: border-color 160ms var(--auth-ease), box-shadow 160ms var(--auth-ease); }
.auth-field input::placeholder { color: #aaa08e; font-size: 12px; }
.auth-field input:focus { border-color: var(--auth-accent); outline: none; box-shadow: 0 0 0 3px #b18a4017; }
.auth-field input[aria-invalid] { border-color: var(--auth-error); }
.auth-password-row input { padding-right: 64px; }
.auth-show-password, .auth-code-hint button { border: 0; border-radius: 7px; color: var(--auth-link); background: transparent; font-size: 12px; font-weight: 600; line-height: 1; }
.auth-show-password { position: absolute; top: 3px; right: 3px; bottom: 3px; min-width: 49px; min-height: 44px; padding: 0 9px; }
.auth-show-password:hover, .auth-code-hint button:hover { background: var(--auth-soft); }
.auth-forgot { justify-self: end; margin: -7px 0 -5px; }
.auth-forgot a, .auth-return-login a, .auth-recipient a { display: inline-flex; min-height: 44px; align-items: center; color: var(--auth-link); font-size: 12px; font-weight: 550; }
.auth-forgot a:hover, .auth-return-login a:hover, .auth-recipient a:hover { text-decoration: underline; text-underline-offset: 3px; }

.auth-primary, .auth-page a.auth-primary { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; gap: 10px; padding: 11px 15px; border: 1px solid #c8a25b; border-radius: 11px; color: #302412; background: linear-gradient(105deg, #e4c782, #d7b368 58%, #cfa75a); box-shadow: inset 0 1px 0 #fff7d885, 0 5px 14px #b38c3f15; font-size: 14px; font-weight: 650; line-height: 1.5; text-align: center; transition: transform 160ms var(--auth-ease), filter 160ms var(--auth-ease), box-shadow 160ms var(--auth-ease); }
.auth-primary:hover { filter: brightness(1.035); box-shadow: inset 0 1px 0 #fff7d885, 0 6px 18px #b38c3f25; transform: translateY(-1px); }
.auth-primary:active { transform: translateY(0); }
.auth-preview-entry { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: center; margin-top: 11px; padding: 9px 14px; border: 1px solid var(--auth-line); border-radius: 11px; color: var(--auth-link); background: transparent; font-size: 12px; font-weight: 500; transition: background-color 160ms var(--auth-ease), border-color 160ms var(--auth-ease); }
.auth-preview-entry:hover { border-color: #c5a66d; background: var(--auth-soft); }
.auth-demo-note { display: flex; align-items: baseline; gap: 7px; margin: 17px 0 0; color: var(--auth-muted); font-size: 11px; line-height: 1.75; }
.auth-demo-note > span { width: 5px; height: 5px; flex: none; align-self: center; border-radius: 50%; background: var(--auth-accent); }
.auth-panel-content > .auth-demo-note + .auth-primary { margin-top: 23px; }
.auth-return-login { margin: 9px 0 0; text-align: center; }
.auth-account-switch { display: flex; min-height: 44px; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; color: var(--auth-muted); font-size: 12px; }
.auth-account-switch a { display: inline-flex; min-height: 44px; align-items: center; color: var(--auth-link); font-weight: 600; }
.auth-account-switch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-field-hint { margin: 0; color: var(--auth-muted); font-size: 11px; font-weight: 400; line-height: 1.6; }
.auth-field-error { color: var(--auth-error); font-size: 12px; font-weight: 450; line-height: 1.55; overflow-wrap: anywhere; }
.auth-consent { display: grid; gap: 1px; }
.auth-consent-row { display: flex; min-height: 44px; align-items: flex-start; gap: 9px; color: var(--auth-muted); font-size: 12px; line-height: 1.6; cursor: pointer; }
.auth-consent-row input { width: 19px; height: 19px; flex: none; margin: 1px 0 0; accent-color: var(--auth-accent); }
.auth-consent-row input[aria-invalid] { outline: 2px solid var(--auth-error); outline-offset: 2px; }
.auth-legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding-left: 28px; color: var(--auth-muted); font-size: 11px; }
.auth-legal-links a { display: inline-flex; min-height: 44px; align-items: center; color: var(--auth-link); text-decoration: underline; text-underline-offset: 3px; }
.auth-code-explainer { margin-top: -4px; }
.auth-code-hint, .auth-recipient { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--auth-muted); font-size: 12px; }
.auth-code-hint { padding: 9px 7px 9px 12px; border: 1px solid var(--auth-line); border-radius: 10px; background: var(--auth-soft); }
.auth-code-hint > div { display: grid; min-width: 0; gap: 5px; }
.auth-code-hint strong { margin-left: 4px; color: var(--auth-link); font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: .095em; }
.auth-code-hint button { flex: none; min-height: 44px; max-width: 135px; padding: 0 8px; line-height: 1.45; }
.auth-code-expiry { color: var(--auth-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.auth-recipient { min-width: 0; margin-bottom: 4px; }
.auth-recipient > span { display: grid; min-width: 0; gap: 4px; }
.auth-recipient strong { color: var(--auth-input-text); font-size: 14px; overflow-wrap: anywhere; }
.auth-recipient a { flex: none; }
.auth-feedback { margin: 0; color: var(--auth-link); font-size: 12px; line-height: 1.55; }
.auth-feedback--error { color: var(--auth-error); }
.auth-state-marker { display: grid; width: 51px; height: 51px; place-items: center; margin: 0 auto 20px; border: 1px solid #d8c294; border-radius: 50%; color: var(--auth-link); background: var(--auth-soft); font-size: 25px; }

html[data-theme='dark'] .auth-page {
  --auth-accent: #d0ad62;
  --auth-dark: #f3eddf;
  --auth-muted: #b7ad99;
  --auth-line: #514735;
  --auth-input: #211e18;
  --auth-input-text: #f0eadc;
  --auth-soft: #30291d;
  --auth-panel: #27221bf5;
  --auth-link: #ddbd7a;
  --auth-error: #f4a0a2;
  color-scheme: dark;
}
html[data-theme='dark'] .auth-intro h2 > span { color: #d8b671; }
html[data-theme='dark'] .auth-benefit-icon { border-color: #6c5733; color: #d9b772; background: #30291e; }
html[data-theme='dark'] .auth-context-nav { background: #2b251bc9; }
html[data-theme='dark'] .auth-context-nav > span { color: #786a52; }
html[data-theme='dark'] .auth-panel { border-color: #554834; box-shadow: 0 15px 45px #00000018; }
html[data-theme='dark'] .auth-field input::placeholder { color: #9e927e; }
html[data-theme='dark'] .auth-field input:focus { box-shadow: 0 0 0 3px #d0ad621b; }
html[data-theme='dark'] .auth-state-marker { border-color: #6c5733; }

@media (max-width: 1100px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 36px; }
  .auth-intro { padding-top: 61px; padding-left: 0; }
  .auth-intro h2 { font-size: 38px; }
  .auth-benefits li > div { display: grid; gap: 3px; }
  .auth-panel { padding-inline: 30px; }
  .auth-membership-card { margin-left: 11px; }
}

@media (max-width: 820px) {
  .auth-page { padding: 16px 22px 48px; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); width: min(100%, 520px); gap: 0; }
  .auth-intro { display: none; }
  .auth-context-nav { margin-bottom: 15px; }
}

@media (max-width: 520px) {
  .auth-page { padding: 13px 16px 34px; }
  .auth-context-nav { padding-inline: 14px; font-size: 11px; }
  .auth-panel { padding: 27px 23px 25px; border-radius: 22px; }
  .auth-panel-brand { margin-bottom: 15px; }
  .auth-title { font-size: 26px; }
  .auth-description { margin-bottom: 23px; }
}

@media (max-width: 360px) {
  .auth-page { padding-inline: 12px; }
  .auth-panel { padding-inline: 18px; }
  .auth-code-hint { gap: 5px; padding-left: 9px; }
  .auth-code-hint button { max-width: 114px; padding-inline: 5px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *, .auth-page *::before, .auth-page *::after { animation: none; transition: none; }
}
