/* 登录 / 注册页（参考 predicxion.io/login · signup，浅色现代极简适配） */

.auth-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  padding-bottom: 48px;
}

@media (min-width: 768px) {
  .auth-main {
    align-items: center;
    min-height: calc(100vh - var(--header-height));
  }
}

@media (max-width: 767px) {
  .auth-main {
    min-height: calc(100vh - 64px);
  }
}

.auth-layout {
  width: 100%;
  max-width: 553px;
  padding: 16px;
}

@media (min-width: 768px) {
  .auth-layout {
    padding: 24px;
  }
}

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px);
  padding: 28px 24px 32px;
}

@media (min-width: 1024px) {
  .auth-card {
    padding: 32px 32px 36px;
  }
}

.auth-card__title {
  margin-bottom: 32px;
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.auth-card__desc {
  margin: -20px 0 32px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-field label .optional {
  font-weight: 400;
  color: var(--text-muted);
}

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

.auth-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

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

.auth-input::placeholder {
  color: var(--text-placeholder);
}

.auth-input:focus {
  background: var(--bg-card);
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px rgba(161, 161, 170, 0.25);
}

.auth-input.is-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.auth-field__error {
  display: none;
  font-size: 12px;
  color: #dc2626;
}

.auth-field.is-invalid .auth-field__error {
  display: block;
}

.auth-toggle-pwd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: color 0.2s, background 0.2s;
}

.auth-toggle-pwd:hover {
  color: var(--text-strong);
  background: var(--bg-muted);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--text-strong);
  cursor: pointer;
}

.auth-checkbox span {
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.auth-link:hover {
  color: var(--text-primary);
}

.auth-link--accent {
  color: #15803d;
}

.auth-link--accent:hover {
  color: #166534;
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  color: var(--brand-on);
  background: var(--brand);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-button);
  transition: background 0.2s, transform 0.15s;
}

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

.auth-submit:active {
  transform: translateY(1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-default);
}

.auth-divider span {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}

.auth-divider--social {
  margin-top: 24px;
}

.auth-social-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0;
  color: var(--text-strong);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  transition: background 0.2s, border-color 0.2s;
}

.auth-social-btn:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
}

.auth-social-btn i {
  font-size: 22px;
  line-height: 1;
}

.auth-social-btn .fa-google {
  background: linear-gradient(135deg, #4285f4 0%, #ea4335 45%, #fbbc05 70%, #34a853 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-social-btn .fa-apple {
  font-size: 24px;
}

.auth-social-btn--telegram {
  color: #26a5e4;
}

.auth-social-btn__metamask {
  display: block;
}

.auth-wallet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  color: var(--text-strong);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  transition: background 0.2s, border-color 0.2s;
}

.auth-wallet-btn:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
}

.auth-wallet-btn i {
  font-size: 18px;
  color: #f6851b;
}

.auth-footer-text {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-footer-text a {
  margin-left: 4px;
  font-weight: 600;
  color: #15803d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-footer-text a:hover {
  color: #166534;
}

.auth-terms {
  align-items: flex-start;
}

.auth-terms span {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.auth-terms a {
  color: var(--text-strong);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-tagline {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-success {
  text-align: center;
  padding: 4px 0 8px;
}

.auth-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  font-size: 28px;
  color: #15803d;
  background: rgba(21, 128, 61, 0.1);
  border-radius: 50%;
}

.auth-success__title {
  margin-bottom: 12px;
  font-size: clamp(22px, 3.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.auth-success__text {
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.auth-success__text strong {
  font-weight: 600;
  color: var(--text-strong);
  word-break: break-all;
}

.auth-submit--link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-inline-btn {
  margin-left: 4px;
  font-size: inherit;
  font-weight: 600;
  color: #15803d;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.auth-inline-btn:hover {
  color: #166534;
}
