.auth-page {
  min-height: 100vh;
  background: #f5f7fa;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
  min-height: 100vh;
}

.auth-story {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 42px clamp(38px, 5vw, 76px);
  color: #fff;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 201, 113, 0.72), transparent 25%),
    radial-gradient(circle at 84% 22%, rgba(69, 220, 236, 0.46), transparent 31%),
    linear-gradient(145deg, #7f4bd8 0%, #4639a4 46%, #102c49 100%);
}

.auth-story::after {
  position: absolute;
  right: -120px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  border: 78px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.auth-brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.auth-brand span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.auth-story-content {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 80px 0;
}

.auth-story-label {
  color: #a8eef4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.auth-story h1 {
  margin: 18px 0 0;
  color: #fff;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.06;
}

.auth-story-lead {
  margin: 22px 0 0;
  color: #d9e2ef;
  font-size: 16px;
  line-height: 1.75;
}

.auth-capabilities {
  display: grid;
  gap: 1px;
  margin-top: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.16);
}

.auth-capability {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 17px 18px;
  background: rgba(11, 31, 51, 0.46);
}

.auth-capability span {
  color: #a8eef4;
  font-size: 12px;
  font-weight: 850;
}

.auth-capability strong {
  display: block;
  color: #fff;
  font-size: 14px;
}

.auth-capability p {
  margin: 4px 0 0;
  color: #b9c6d5;
  font-size: 12px;
  line-height: 1.55;
}

.auth-story-note {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.7;
}

.auth-main {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: #fff;
}

.auth-main-top {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 clamp(28px, 5vw, 72px);
  color: var(--yp-muted);
  font-size: 13px;
}

.auth-main-top a {
  color: var(--yp-ink);
  font-weight: 750;
}

.auth-main-top a:hover { color: var(--yp-brand); }

.auth-form-wrap {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 42px 28px 80px;
}

.auth-card-new {
  width: min(460px, 100%);
}

.auth-heading h2 {
  margin: 0;
  color: var(--yp-ink);
  font-size: 32px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.auth-heading p {
  margin: 10px 0 0;
  color: var(--yp-muted);
  font-size: 14px;
  line-height: 1.7;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 30px;
  padding: 4px;
  border-radius: 10px;
  background: #f0f2f5;
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  color: var(--yp-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.auth-tab.active {
  color: var(--yp-ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(11, 31, 51, 0.08);
}

.auth-panel { margin-top: 26px; }
.auth-panel[hidden] { display: none !important; }

.auth-field { margin-bottom: 18px; }

.auth-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.auth-field label {
  color: var(--yp-ink);
  font-size: 13px;
  font-weight: 750;
}

.auth-optional {
  color: var(--yp-subtle);
  font-size: 12px;
  font-weight: 600;
}

.auth-input-wrap { position: relative; }

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--yp-border-strong);
  border-radius: 9px;
  outline: none;
  color: var(--yp-ink);
  background: #fff;
  font-size: 14px;
  transition: border-color var(--yp-ease), box-shadow var(--yp-ease);
}

.auth-input::placeholder { color: #9ba7b5; }

.auth-input:focus {
  border-color: #635bff;
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.12);
}

.auth-input.password { padding-right: 62px; }

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  color: var(--yp-muted);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  transform: translateY(-50%);
}

.auth-password-toggle:hover {
  color: #635bff;
  background: #f3f1ff;
}

/* 验证码：输入框 + 发送按钮同排。整行由 JS 按 /api/auth/config 决定是否渲染，
   短信签名报备通过前 hidden，用户看不到这一栏。 */
.auth-code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.auth-code-row .auth-input { flex: 1 1 auto; min-width: 0; }

.auth-code-send {
  flex: 0 0 auto;
  min-width: 108px;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--yp-border-strong);
  border-radius: 9px;
  color: #635bff;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--yp-ease), background var(--yp-ease), color var(--yp-ease);
}

.auth-code-send:hover:not(:disabled) { border-color: #635bff; background: #f3f1ff; }

.auth-code-send:disabled {
  color: var(--yp-muted);
  background: #f5f6f8;
  cursor: not-allowed;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  border: 1px solid var(--yp-brand);
  border-radius: 9px;
  color: #fff;
  background: var(--yp-brand);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(217, 45, 50, 0.18);
  transition: background var(--yp-ease), border-color var(--yp-ease), opacity var(--yp-ease);
}

.auth-submit:hover {
  border-color: var(--yp-brand-hover);
  background: var(--yp-brand-hover);
}

/* Login follows the same restrained control language as the workspace. */
.auth-capabilities {
  overflow: hidden;
  border-radius: 14px;
}

.auth-tabs { border-radius: 12px; }
.auth-tab { border-radius: 9px; }

.auth-input { border-radius: 10px; }

.auth-submit {
  border-radius: 999px;
  box-shadow: 0 9px 20px rgba(99, 91, 255, 0.2);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.58;
}

.auth-panel-link {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.auth-panel-link.center { justify-content: center; }

.auth-panel-link button {
  padding: 0;
  border: 0;
  color: #5b42d6;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.auth-panel-link button:hover { color: #3f2ca9; }

.auth-forgot-intro {
  margin: 0 0 22px;
  padding: 13px 14px;
  border-left: 3px solid #635bff;
  color: var(--yp-text);
  background: #f6f5ff;
  font-size: 13px;
  line-height: 1.65;
}

.auth-invite-note {
  margin: -7px 0 18px;
  color: var(--yp-muted);
  font-size: 12px;
  line-height: 1.6;
}

.auth-legal {
  margin: 26px 0 0;
  color: var(--yp-subtle);
  font-size: 12px;
  line-height: 1.75;
  text-align: center;
}

.auth-legal a {
  color: var(--yp-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-legal a:hover { color: var(--yp-brand); }

@media (max-width: 980px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story {
    min-height: auto;
    padding: 28px 32px 34px;
  }
  .auth-story-content { margin: 46px 0 12px; }
  .auth-story h1 { max-width: 680px; font-size: 44px; }
  .auth-story-lead { max-width: 680px; }
  .auth-capabilities { display: none; }
  .auth-story-note { display: none; }
  .auth-main { min-height: auto; }
  .auth-main-top { min-height: 62px; }
  .auth-form-wrap { min-height: 680px; padding-top: 34px; }
}

@media (max-width: 600px) {
  .auth-story { padding: 20px 20px 28px; }
  .auth-brand img { width: 34px; height: 34px; }
  .auth-story-content { margin: 38px 0 8px; }
  .auth-story h1 { font-size: 36px; }
  .auth-story-lead { font-size: 14px; }
  .auth-main-top { justify-content: center; padding: 0 20px; }
  .auth-form-wrap { min-height: 0; padding: 42px 20px 64px; }
  .auth-heading h2 { font-size: 28px; }
}
