:root {
  --ink: #10151d;
  --navy: #0d2039;
  --paper: #fbfcfe;
  --paper-blue: #f1f6fa;
  --line: #dce4ed;
  --muted: #667281;
  --coral: #ec5a73;
  --coral-deep: #d9405e;
  --yellow: #ffd94f;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
input {
  font: inherit;
}

button,
a,
input {
  outline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--yellow);
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 10;
  padding: 10px 16px;
  background: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  top: 16px;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: rgba(251, 252, 254, 0.96);
  border-bottom: 1px solid var(--line);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.auth-brand img {
  width: 132px;
}

.brand-word {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.brand-cross {
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.back-link span {
  margin-left: 5px;
  color: var(--coral-deep);
}

.auth-shell {
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  max-width: 1180px;
  min-height: calc(100vh - 76px);
  margin: 0 auto;
}

.proof-panel {
  position: relative;
  display: flex;
  padding: 88px 72px 58px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(13, 32, 57, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 32, 57, 0.045) 1px, transparent 1px),
    var(--paper-blue);
  background-size: 42px 42px;
}

.proof-panel::after {
  position: absolute;
  right: -105px;
  bottom: 54px;
  width: 260px;
  height: 260px;
  background: var(--coral);
  border-radius: 50%;
  opacity: 0.08;
  content: "";
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--coral-deep);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.proof-panel h1 {
  max-width: 540px;
  margin: 0;
  font-size: clamp(44px, 4.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.proof-copy {
  max-width: 470px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.proof-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 470px;
  margin-top: 43px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.proof-metrics > div {
  display: grid;
  gap: 5px;
  padding: 17px;
  border-right: 1px solid var(--line);
}

.proof-metrics > div:last-child {
  border-right: 0;
}

.proof-metrics span {
  color: var(--muted);
  font-size: 8px;
}

.proof-metrics strong {
  font-family: "DIN Alternate", "SFMono-Regular", monospace;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.trust-line {
  position: relative;
  z-index: 1;
  margin: 54px 0 0;
  color: var(--muted);
  font-family: "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 8px;
}

.auth-panel {
  width: min(100%, 470px);
  padding: 64px 44px;
  align-self: center;
  justify-self: center;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(13, 32, 57, 0.12);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 43px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  position: relative;
  min-height: 42px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.auth-tabs button[aria-selected="true"] {
  color: var(--ink);
}

.auth-tabs button[aria-selected="true"]::after {
  position: absolute;
  right: 22%;
  bottom: -1px;
  left: 22%;
  height: 2px;
  background: var(--coral);
  content: "";
}

.auth-copy h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.auth-copy > p:last-child {
  margin: 12px 0 30px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.auth-alert {
  margin: -10px 0 20px;
  padding: 11px 13px;
  color: #9c253f;
  background: #fff1f4;
  border: 1px solid #f3c9d3;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.6;
}

.auth-alert.is-success {
  color: #0b6d4e;
  background: #eefaf5;
  border-color: #c4eadb;
}

form {
  display: grid;
  gap: 9px;
}

label {
  margin-top: 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  font-size: 14px;
}

input::placeholder {
  color: #9aa4af;
}

input:focus {
  border-color: var(--coral);
}

input[aria-invalid="true"] {
  border-color: var(--coral-deep);
  background: #fff8f9;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 58px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 32px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 10px;
  transform: translateY(-50%);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row > div {
  display: grid;
  gap: 9px;
}

.submit-button {
  min-height: 48px;
  margin-top: 16px;
  color: #fff;
  background: var(--coral);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: background-color 160ms ease, transform 160ms ease;
}

.submit-button:hover {
  background: var(--coral-deep);
  transform: translateY(-1px);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.form-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 620px;
    padding: 30px 20px 54px;
  }

  .proof-panel {
    min-height: 390px;
    padding: 45px 36px;
  }

  .proof-panel h1 {
    font-size: 46px;
  }

  .trust-line {
    margin-top: 34px;
  }

  .auth-panel {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .auth-topbar {
    min-height: 66px;
    padding: 0 16px;
  }

  .auth-brand img {
    width: 96px;
  }

  .auth-shell {
    padding: 0 0 34px;
  }

  .proof-panel {
    min-height: 340px;
    padding: 38px 20px;
  }

  .proof-panel h1 {
    font-size: 40px;
  }

  .proof-metrics {
    margin-top: 30px;
  }

  .proof-metrics > div {
    padding: 13px;
  }

  .proof-metrics strong {
    font-size: 22px;
  }

  .trust-line {
    margin-top: 28px;
  }

  .auth-panel {
    padding: 38px 20px;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
