:root {
  color-scheme: dark;
  --ink: #fff8ea;
  --muted: #a59c8e;
  --soft: #756f64;
  --night: #070806;
  --night-2: #0e100d;
  --panel: rgba(13, 17, 23, 0.72);
  --panel-strong: rgba(12, 16, 23, 0.86);
  --line: rgba(255, 242, 218, 0.15);
  --line-soft: rgba(255, 242, 218, 0.08);
  --line-strong: rgba(255, 180, 71, 0.72);
  --gold: #ffb447;
  --gold-2: #ffb447;
  --gold-3: #ffd78d;
  --danger: #ff867d;
  --success: #87d987;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--night);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background: url("auth-bg.png?v=20260615i") center / cover no-repeat;
}

body::after {
  z-index: -1;
  background:
    radial-gradient(circle at 18% 82%, rgba(255, 180, 71, 0.13), transparent 20rem),
    radial-gradient(circle at 76% 16%, rgba(255, 180, 71, 0.13), transparent 19rem),
    linear-gradient(90deg, rgba(7, 8, 6, 0.7) 0%, rgba(7, 8, 6, 0.38) 45%, rgba(7, 8, 6, 0.12) 100%),
    linear-gradient(180deg, rgba(7, 8, 6, 0.12), rgba(7, 8, 6, 0.24));
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

img,
svg {
  display: block;
}

svg {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 5%, 64px);
  color: var(--ink);
  background: #070806;
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  font-size: 22px;
  font-weight: 850;
}

.site-brand img {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 242, 218, 0.16);
  border-radius: 10px;
  object-fit: cover;
}

.audience-switch {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 3px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid rgba(255, 242, 218, 0.16);
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.055);
}

.switch-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  color: rgba(255, 248, 234, 0.66);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.switch-item svg {
  width: 16px;
  height: 16px;
}

.switch-item.is-active {
  color: #120d05;
  background: linear-gradient(135deg, var(--gold-3), var(--gold));
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 440px);
  gap: clamp(36px, 5vw, 68px);
  align-items: center;
  width: min(1120px, calc(100% - 64px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 34px 0;
}

.brand-side {
  min-width: 0;
  width: min(620px, 100%);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  margin: 0 auto 22px;
}

.brand-mark {
  width: 168px;
  height: 168px;
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.46));
}

.brand-word {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 8px;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.brand-word span:first-child {
  color: var(--gold-2);
}

.brand-word span:last-child {
  color: #f2f2f0;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 18px;
  padding: 0 16px;
  border: 1px solid rgba(255, 180, 71, 0.74);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(7, 8, 6, 0.4);
  box-shadow: inset 0 0 18px rgba(255, 180, 71, 0.08);
  font-size: 14px;
  font-weight: 850;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(44px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.48);
}

h1 span {
  display: block;
  color: var(--gold-2);
}

.hero-text {
  max-width: 540px;
  margin-bottom: 24px;
  color: rgba(248, 244, 236, 0.82);
  font-size: 19px;
  line-height: 1.55;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.58);
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 520px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.benefits li {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 16px 12px;
  border: 1px solid rgba(255, 242, 218, 0.1);
  border-radius: 8px;
  color: rgba(248, 244, 236, 0.94);
  background: linear-gradient(180deg, rgba(17, 19, 15, 0.62), rgba(7, 8, 6, 0.38));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 44px rgba(0, 0, 0, 0.22);
  text-align: center;
  backdrop-filter: blur(12px);
}

.benefits svg {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  color: var(--gold-2);
  filter: drop-shadow(0 0 15px rgba(240, 168, 32, 0.22));
}

.benefits span {
  font-size: 14px;
  line-height: 1.45;
}

.form-side {
  min-width: 0;
}

.auth-card {
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 30px 36px 28px;
  border: 1px solid rgba(255, 180, 71, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(21, 29, 42, 0.74), rgba(7, 8, 6, 0.76)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.auth-card::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 36px;
  left: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 219, 128, 0.96), transparent);
  box-shadow: 0 0 20px rgba(240, 168, 32, 0.7);
}

.auth-avatar {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  margin: 0 auto 16px;
  border: 1px solid rgba(255, 180, 71, 0.9);
  border-radius: 50%;
  color: var(--gold-2);
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 209, 107, 0.26), transparent 34%),
    rgba(7, 12, 23, 0.52);
  box-shadow: 0 0 36px rgba(240, 168, 32, 0.2), inset 0 0 22px rgba(240, 168, 32, 0.12);
}

.auth-avatar svg {
  width: 42px;
  height: 42px;
  stroke-width: 1.6;
}

.view-heading {
  min-height: 74px;
  text-align: center;
}

.view-heading[hidden],
.auth-form[hidden] {
  display: none;
}

.view-heading h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.view-heading p {
  margin: 0;
  color: rgba(214, 221, 234, 0.76);
  font-size: 15px;
  line-height: 1.4;
}

.view-heading .referral-note {
  margin-top: 14px;
  border: 1px solid rgba(255, 190, 86, 0.28);
  border-radius: 10px;
  padding: 11px 13px;
  color: #f5d79a;
  background: rgba(255, 180, 71, 0.08);
  font-size: 13px;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 9px;
  color: rgba(248, 244, 236, 0.86);
  font-size: 14px;
  font-weight: 750;
}

.field > span:first-child {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.input-shell {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(255, 242, 218, 0.17);
  border-radius: 8px;
  background: rgba(7, 8, 6, 0.42);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.password-shell {
  grid-template-columns: 28px 1fr 42px;
  padding-right: 8px;
}

.code-shell input {
  text-align: center;
  font-size: 22px;
  font-weight: 850;
}

.input-shell:focus-within {
  border-color: rgba(255, 184, 56, 0.78);
  background: rgba(4, 9, 18, 0.68);
  box-shadow: 0 0 0 3px rgba(240, 168, 32, 0.12);
}

.input-shell.is-invalid {
  border-color: rgba(255, 134, 125, 0.82);
  box-shadow: 0 0 0 3px rgba(255, 134, 125, 0.12);
}

.input-shell > svg {
  width: 21px;
  height: 21px;
  color: rgba(255, 248, 234, 0.58);
}

.input-shell input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
}

.input-shell input::placeholder {
  color: rgba(214, 221, 234, 0.5);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: rgba(214, 221, 234, 0.76);
  background: transparent;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.icon-button svg {
  width: 21px;
  height: 21px;
}

.icon-button .eye-off,
.icon-button.is-visible .eye-on {
  display: none;
}

.icon-button.is-visible .eye-off {
  display: block;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 30px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: rgba(248, 244, 236, 0.9);
  font-size: 14px;
}

.remember input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.remember > span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(255, 184, 56, 0.76);
  border-radius: 7px;
  color: #120c03;
  background: linear-gradient(145deg, var(--gold-2), var(--gold));
  box-shadow: 0 7px 16px rgba(240, 168, 32, 0.18);
}

.remember svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.remember input:not(:checked) + span {
  color: transparent;
  background: rgba(4, 9, 18, 0.58);
  box-shadow: none;
}

.remember b {
  min-width: 0;
  font-size: inherit;
  font-weight: 650;
}

.link-button {
  min-height: 32px;
  padding: 0;
  border: 0;
  color: var(--gold-2);
  background: transparent;
  font-size: 14px;
  font-weight: 750;
}

.link-button:hover,
.link-button:focus-visible {
  color: #ffe0a0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible {
  transform: translateY(-1px);
}

.primary-button {
  border: 1px solid rgba(239, 210, 142, 0.86);
  color: #120d05;
  background: linear-gradient(135deg, var(--gold-3), var(--gold));
  box-shadow: 0 18px 46px rgba(255, 180, 71, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: linear-gradient(135deg, #ffe0a2, #ffc15f);
}

.secondary-button {
  border: 1px solid rgba(255, 242, 218, 0.17);
  color: rgba(248, 244, 236, 0.96);
  background: rgba(7, 8, 6, 0.34);
}

.secondary-button svg {
  width: 21px;
  height: 21px;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: rgba(255, 184, 56, 0.58);
  background: rgba(255, 255, 255, 0.06);
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  color: rgba(214, 221, 234, 0.6);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: rgba(210, 223, 244, 0.18);
}

.form-status {
  min-height: 36px;
  margin: 14px 0 0;
  color: rgba(255, 248, 234, 0.66);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.form-status[data-tone="success"] {
  color: var(--success);
}

.form-status[data-tone="error"] {
  color: var(--danger);
}

[data-busy="true"] span {
  opacity: 0.72;
}

@media (max-width: 1180px) {
  .auth-page {
    grid-template-columns: minmax(340px, 1fr) minmax(360px, 420px);
    gap: 38px;
    width: min(1040px, calc(100% - 48px));
  }

  .brand-mark {
    width: 150px;
    height: 150px;
  }

  .brand-word {
    font-size: 34px;
  }

  h1 {
    font-size: 48px;
  }

  .hero-text {
    font-size: 18px;
  }
}

@media (max-width: 920px) {
  body::before {
    background-position: 58% center;
  }

  body::after {
    background:
      radial-gradient(circle at 50% 42%, rgba(255, 180, 71, 0.12), transparent 17rem),
      linear-gradient(180deg, rgba(7, 8, 6, 0.58) 0%, rgba(7, 8, 6, 0.24) 46%, rgba(7, 8, 6, 0.58) 100%);
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: start;
    padding: 12px 16px;
  }

  .site-brand {
    justify-self: start;
  }

  .audience-switch {
    justify-self: stretch;
    width: 100%;
  }

  .auth-page {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
    width: min(560px, calc(100% - 32px));
    min-height: 0;
    padding: 24px 0;
  }

  .brand-lockup {
    justify-content: center;
    margin: 0 auto 18px;
  }

  .brand-mark {
    width: 124px;
    height: 124px;
  }

  .brand-word {
    margin-top: 6px;
    font-size: 29px;
  }

  .hero-copy {
    text-align: center;
  }

  .eyebrow {
    margin-bottom: 14px;
    font-size: 13px;
  }

  h1 {
    font-size: 36px;
  }

  h1 span {
    display: inline;
  }

  .hero-text {
    margin-right: auto;
    margin-bottom: 18px;
    margin-left: auto;
    font-size: 16px;
  }

  .benefits {
    gap: 12px;
    max-width: none;
  }

  .benefits li {
    min-height: 102px;
    padding: 16px 10px;
  }

  .benefits svg {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
  }

  .benefits span {
    font-size: 14px;
  }

  .auth-card {
    min-height: 0;
    padding: 28px 24px 24px;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 0;
    padding: 10px 12px;
  }

  .site-brand {
    font-size: 18px;
  }

  .site-brand img {
    width: 34px;
    height: 34px;
  }

  .audience-switch {
    width: 100%;
  }

  .switch-item {
    flex: 1 1 0;
    gap: 6px;
    min-width: 0;
    padding: 0 7px;
    font-size: 12px;
  }

  .switch-item svg {
    width: 15px;
    height: 15px;
  }

  .auth-page {
    width: min(100% - 24px, 430px);
    gap: 16px;
    padding: 16px 0 22px;
  }

  .brand-lockup {
    margin: 0 auto 12px;
  }

  .brand-mark {
    width: 84px;
    height: 84px;
  }

  .brand-word {
    margin-top: 5px;
    font-size: 22px;
  }

  .eyebrow {
    min-height: 32px;
    padding: 0 13px;
    font-size: 12px;
  }

  h1 {
    margin-bottom: 12px;
    font-size: 28px;
  }

  .hero-text {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.45;
  }

  .benefits {
    display: none;
  }

  .auth-card {
    padding: 24px 18px 20px;
  }

  .auth-avatar {
    width: 72px;
    height: 72px;
    margin-bottom: 14px;
  }

  .auth-avatar svg {
    width: 36px;
    height: 36px;
  }

  .view-heading {
    min-height: 68px;
  }

  .view-heading h2 {
    font-size: 26px;
  }

  .view-heading p {
    font-size: 14px;
  }

  .auth-form {
    gap: 13px;
  }

  .input-shell {
    min-height: 52px;
    padding: 0 14px;
  }

  .password-shell {
    grid-template-columns: 24px 1fr 40px;
    padding-right: 8px;
  }

  .input-shell input {
    font-size: 15px;
  }

  .form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .primary-button,
  .secondary-button {
    min-height: 52px;
    font-size: 16px;
  }
}
