:root {
  color-scheme: light;
  --auth-paper: #f7f4ec;
  --auth-card: #fffdf9;
  --auth-ink: #182231;
  --auth-muted: #6d7886;
  --auth-line: #e5ded2;
  --auth-blue: #2f5fd3;
  --auth-blue-soft: #e8efff;
  --auth-cyan: #168893;
  --auth-coral: #ef654b;
  --auth-green: #25805c;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body.auth-page {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 82% 14%, rgba(232, 239, 255, .78), transparent 27rem),
    linear-gradient(135deg, #faf8f2 0%, var(--auth-paper) 54%, #f1f8f5 100%);
  color: var(--auth-ink);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-page a { color: inherit; }

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 48px));
  min-height: 88px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(229, 222, 210, .82);
}

.auth-brand { line-height: 0; }

.auth-brand img {
  width: 150px;
  height: 48px;
  object-fit: contain;
}

.auth-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-header-actions a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.auth-header-actions a:hover { transform: translateY(-1px); }

.auth-header-actions a:focus-visible,
.auth-form input:focus-visible,
.auth-form select:focus-visible,
.auth-form button:focus-visible,
.auth-back-link:focus-visible {
  outline: 3px solid rgba(47, 95, 211, .24);
  outline-offset: 2px;
}

.auth-header-actions a:first-child { border-color: var(--auth-line); background: rgba(255, 253, 249, .68); }
.auth-header-actions a:first-child:hover { color: var(--auth-blue); border-color: #bdccef; }
.auth-header-actions a:last-child { color: #fff; background: var(--auth-blue); box-shadow: 0 7px 16px rgba(47, 95, 211, .16); }

.auth-main {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: clamp(46px, 8vw, 112px);
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100svh - 88px);
  margin: 0 auto;
  padding: 64px 0 76px;
}

.auth-intro { max-width: 510px; }

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--auth-blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
}

.auth-kicker::before {
  width: 27px;
  height: 3px;
  border-radius: 99px;
  background: var(--auth-coral);
  content: "";
}

.auth-intro h1 {
  max-width: 520px;
  margin: 0 0 21px;
  font-size: clamp(42px, 5vw, 67px);
  letter-spacing: -.075em;
  line-height: 1.03;
}

.auth-intro > p:not(.auth-kicker) {
  max-width: 470px;
  margin: 0;
  color: var(--auth-muted);
  font-size: 16px;
  line-height: 1.8;
}

.auth-principles {
  display: grid;
  gap: 0;
  margin: 41px 0 0;
  padding: 0;
  list-style: none;
}

.auth-principles li {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr);
  gap: 13px;
  padding: 15px 0;
  border-top: 1px solid var(--auth-line);
}

.auth-principles li:last-child { border-bottom: 1px solid var(--auth-line); }

.auth-principles b { color: var(--auth-coral); font-size: 11px; }
.auth-principles strong { display: block; font-size: 13px; }
.auth-principles span { display: block; margin-top: 3px; color: var(--auth-muted); font-size: 11px; line-height: 1.6; }

.auth-card {
  width: 100%;
  max-width: 560px;
  justify-self: end;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(229, 222, 210, .92);
  border-radius: 22px;
  background: rgba(255, 253, 249, .92);
  box-shadow: 0 22px 60px rgba(45, 56, 73, .10);
}

.auth-card-heading { margin-bottom: 28px; }
.auth-card-heading .auth-card-label { margin: 0 0 8px; color: var(--auth-cyan); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.auth-card-heading h2 { margin: 0 0 8px; font-size: 31px; letter-spacing: -.06em; line-height: 1.12; }
.auth-card-heading p:last-child { margin: 0; color: var(--auth-muted); font-size: 13px; line-height: 1.7; }

.auth-form { display: grid; gap: 16px; }
.auth-form label { display: grid; gap: 7px; color: #536071; font-size: 12px; font-weight: 750; }
.auth-form input,
.auth-form select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #d8d2c8;
  border-radius: 13px;
  background: #fff;
  color: var(--auth-ink);
  font: inherit;
  font-size: 14px;
}

.auth-form input::placeholder { color: #9aa1a8; }
.auth-form input:focus, .auth-form select:focus { border-color: var(--auth-blue); box-shadow: 0 0 0 3px rgba(47, 95, 211, .12); outline: 0; }
.auth-phone { display: grid; grid-template-columns: 154px minmax(0, 1fr); gap: 8px; }
.auth-phone select { min-width: 0; font-size: 12px; }
.auth-phone input { min-width: 0; }

.auth-form button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 3px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--auth-blue);
  box-shadow: 0 9px 20px rgba(47, 95, 211, .18);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: background .18s ease, transform .18s ease, opacity .18s ease;
}

.auth-form button:hover { background: #244fb9; transform: translateY(-1px); }
.auth-form button:disabled { cursor: wait; opacity: .62; transform: none; }
.auth-form-message { min-height: 20px; margin: -2px 0 -2px; color: #bd4938; font-size: 12px; line-height: 1.55; }
.auth-form-message[data-kind="success"] { color: var(--auth-green); }
.auth-form-message[data-kind="info"] { color: var(--auth-muted); }

.auth-footnote {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 22px 0 0;
  padding-top: 17px;
  border-top: 1px solid var(--auth-line);
  color: #8b918f;
  font-size: 11px;
  line-height: 1.65;
}

.auth-footnote::before { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #5cc599; box-shadow: 0 0 0 5px rgba(92, 197, 153, .14); content: ""; }
.auth-back-link { display: inline-flex; margin-top: 18px; color: var(--auth-blue); font-size: 12px; font-weight: 750; text-decoration: none; }
.auth-back-link:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 900px) {
  .auth-main { grid-template-columns: 1fr; gap: 38px; padding-top: 49px; }
  .auth-intro { max-width: 680px; }
  .auth-card { justify-self: start; max-width: 680px; }
}

@media (max-width: 640px) {
  .auth-header, .auth-main { width: min(100% - 32px, 560px); }
  .auth-header { min-height: 72px; }
  .auth-brand img { width: 126px; height: 42px; }
  .auth-header-actions { gap: 3px; font-size: 11px; }
  .auth-header-actions a { min-height: 36px; padding: 7px 10px; }
  .auth-main { min-height: auto; padding: 36px 0 52px; }
  .auth-intro h1 { font-size: 44px; }
  .auth-intro > p:not(.auth-kicker) { font-size: 14px; }
  .auth-principles { margin-top: 27px; }
  .auth-card { padding: 24px 18px; border-radius: 17px; }
  .auth-card-heading h2 { font-size: 27px; }
  .auth-phone { grid-template-columns: 128px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *, .auth-page *::before, .auth-page *::after { scroll-behavior: auto !important; transition: none !important; }
}
