/* ============================================
   Auth Pages — 匹配 desktop-standalone 登录/注册样式
   ============================================ */

/* -------- Auth Layout -------- */
.auth-page {
  position: fixed;
  inset: 0;
  display: flex;
  overflow: hidden;
}

.auth-bg-base {
  position: absolute;
  inset: 0;
  background-color: #0d2b18;
}

.auth-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: loginBgFadeIn 1.2s ease forwards;
}

.auth-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(4, 18, 7, 0.78) 0%, rgba(8, 28, 12, 0.62) 40%, rgba(4, 12, 6, 0.40) 70%, rgba(0, 0, 0, 0.22) 100%);
}

@keyframes loginBgFadeIn {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}

/* -------- Auth Content Layout -------- */
.auth-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 0 48px;
}

/* Left hero text */
.auth-hero {
  flex: 1;
  max-width: 560px;
  margin-right: auto;
  padding-right: 48px;
}

.auth-hero-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.28;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.auth-hero-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  margin-top: 16px;
  max-width: 28rem;
  line-height: 1.6;
}

/* Right form card */
.auth-card {
  width: 380px;
  flex-shrink: 0;
  border-radius: 16px;
  padding: 48px 40px 44px;
  background: #ffffff;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.30), 0 2px 10px rgba(0, 0, 0, 0.15);
}

.auth-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  text-align: center;
  margin-bottom: 8px;
}

.auth-card-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: 28px;
}

/* -------- Auth Form Styles -------- */
.auth-form .form-group {
  margin-bottom: 18px;
}

.auth-form .form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

/* Login-specific input */
.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .form-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: var(--font-family);
  outline: none;
  transition: all 0.2s ease;
}

.auth-input-wrap .form-input:focus {
  background: #fff;
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.auth-input-wrap .form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-input-wrap .auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.875rem;
  pointer-events: none;
}

/* SMS code row */
.auth-sms-row {
  display: flex;
  gap: 10px;
}

.auth-sms-row .form-input {
  flex: 1;
}

.auth-sms-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.auth-sms-btn:hover {
  background: #dcfce7;
}

.auth-sms-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Password strength */
.auth-password-strength {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.auth-password-strength-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

/* Submit button */
.auth-submit-btn {
  width: 100%;
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #16a34a;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-family);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
  transition: all 0.15s ease;
}

.auth-submit-btn:hover {
  background: #15803d;
}

.auth-submit-btn:active {
  transform: scale(0.98);
}

.auth-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Links */
.auth-links {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.auth-links a {
  color: #16a34a;
  font-weight: 500;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

/* Checkbox row */
.auth-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.auth-checkbox-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  accent-color: #16a34a;
  cursor: pointer;
}

/* -------- Footer -------- */
.auth-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* -------- Error / Success messages -------- */
.auth-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.8125rem;
  margin-bottom: 18px;
}

.auth-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.8125rem;
  margin-bottom: 18px;
}

/* -------- Tab Toggle (Login / Register switch) -------- */
.auth-tab-toggle {
  display: flex;
  background: #f3f4f6;
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: 24px;
}

.auth-tab-toggle .auth-tab {
  flex: 1;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.auth-tab-toggle .auth-tab.active {
  background: #fff;
  color: var(--color-text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* -------- Responsive -------- */
@media (max-width: 900px) {
  .auth-hero {
    display: none;
  }

  .auth-content {
    justify-content: center;
    padding: 0 16px;
  }

  .auth-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 24px;
  }
}
