/* ==========================================================
   PV Estimator — Auth Pages Add-on
   ========================================================== */

/* ── 页面基础 ────────────────────────────────────────────── */
body.auth-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--gray-50);
  color: var(--c-text);
}

/* ── 分屏布局 ────────────────────────────────────────────── */
.auth-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.auth-hero {
  flex: 1;
  display: none; /* 移动端隐藏大图 */
  position: relative;
  background-color: #0f172a;
  background-image: linear-gradient(135deg, #0c4a6e 0%, #0f172a 45%, #1e3a5f 100%);
  overflow: hidden;
}

@media (min-width: 900px) {
  .auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4rem;
  }
}

.auth-hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.8;
  z-index: 1;
}

.auth-hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.2));
  z-index: 2;
}

.auth-hero-content {
  position: relative;
  z-index: 3;
  color: var(--white);
  max-width: 500px;
}

.auth-hero-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.auth-hero-content p {
  font-size: 1.1rem;
  color: var(--gray-300);
  line-height: 1.6;
}

/* ── 右侧表单区 ──────────────────────────────────────────── */
.auth-panel {
  flex: 1;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2rem;
  background-color: var(--white);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 4;
}

@media (min-width: 900px) {
  .auth-panel {
    padding: 4rem 5rem;
  }
}

.auth-header {
  margin-bottom: 2rem;
}

.auth-header .brand-icon {
  font-size: 2.5rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.auth-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.auth-header p {
  color: var(--gray-500);
  font-size: 0.95rem;
}

/* ── 表单元素 ────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.field-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--c-border-md);
  border-radius: var(--radius-md);
  background-color: var(--gray-50);
  color: var(--gray-900);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.field-input:focus {
  outline: none;
  border-color: var(--c-primary);
  background-color: var(--white);
  box-shadow: 0 0 0 4px var(--blue-100);
}

/* 按钮 */
.auth-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dk));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* 附加链接 */
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -0.5rem;
  font-size: 0.85rem;
}

.auth-links a {
  color: var(--c-primary);
  text-decoration: none;
  font-weight: 500;
}

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

.auth-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.auth-footer a {
  color: var(--c-primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.25rem;
}

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

/* 第三方登录 */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2rem 0;
  color: var(--gray-400);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--c-border);
}

.auth-divider:not(:empty)::before { margin-right: 1rem; }
.auth-divider:not(:empty)::after { margin-left: 1rem; }

.social-btns {
  display: flex;
  gap: 1rem;
}

.social-btn {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem;
  border: 1px solid var(--c-border-md);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.social-btn:hover {
  background: var(--gray-50);
}

.social-btn svg {
  width: 18px;
  height: 18px;
}

/* ── 未激活：重发激活邮件 ─────────────────────────────────── */
.auth-inactive-extra {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--c-border, #e2e8f0);
}

.auth-btn-secondary {
  width: 100%;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--c-border-md, #cbd5e1);
  background: var(--white, #fff);
  color: var(--gray-800, #1e293b);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.auth-btn-secondary:hover:not(:disabled) {
  background: var(--gray-50, #f8fafc);
  border-color: var(--gray-400, #94a3b8);
}

.auth-btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-resend-hint {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--gray-600, #475569);
  min-height: 1.2em;
}

.auth-forgot-link {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  text-align: right;
}

.auth-forgot-link a {
  color: var(--c-primary, #2563eb);
  text-decoration: none;
}

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