/* 弹窗整体 */
.auth-modal { position: fixed; inset: 0; display: none; z-index: 10000; }
.auth-modal.open { display: block; }
.auth-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(2px); }

/* 卡片容器 */
.auth-modal-card {
  position: relative;
  z-index: 1;
  width: min(960px, 92vw);
  margin: 6vh auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  background: #fff;
}

.auth-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border: none; border-radius: 8px;
  background: #f3f4f6; color: #333; font-size: 20px; cursor: pointer;
}
.auth-modal-close:hover { background: #e5e7eb; }

/* 左侧品牌：图片背景 + 模糊遮罩，移动端隐藏 */
.auth-card-left {
  position: relative;
  padding: 32px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;   /* 水平居中 */
  justify-content: center; /* 垂直居中 */
  gap: 16px;
  background: #000;
  background-image: url("../images/geometric-abstract.jpg");
  background-size: cover;
  background-position: center;
}
.auth-card-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
}
.auth-card-left > * { position: relative; z-index: 1; }
.auth-brand img {
  max-width: 180px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.auth-welcome h2 { margin: 24px 0 8px; font-size: 24px; text-align: center; }
.auth-welcome p { opacity: 0.95; margin: 0 0 16px; text-align: center; }
.auth-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; text-align: center; }
.auth-features li { position: relative; padding-left: 18px; }
.auth-features li::before { content: "✓"; position: absolute; left: 0; color: #a7f3d0; }

/* 右侧视图容器 */
.auth-card-right { padding: 32px; background: #fff; }
.auth-title {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  text-align: left;
  margin: 8px 0 20px;
}

/* 输入框带图标 */
.input-with-icon { position: relative; }
.input-with-icon .icon.left {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #6b7280; font-size: 16px; pointer-events: none;
}
.input-with-icon input {
  width: 100%; padding: 12px 12px 12px 40px;
  border: 1px solid #e5e7eb; border-radius: 10px; outline: none;
  background: #f9fafb;
}
.input-with-icon input::placeholder { color: #9ca3af; }
.input-with-icon input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); background: #fff; }

.form-row { margin-bottom: 14px; }
.form-row.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 辅助链接行 */
.helper-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 0 14px;
}
.helper-link.left { color: #4b5563; text-decoration: none; font-weight: 500; }
.helper-link.left .arrow { margin-left: 4px; color: #9ca3af; }
.helper-right { display: flex; align-items: center; gap: 8px; }
.helper-right .sep { color: #9ca3af; }
.lostpwd-link, .quick-register, .back-login { color: #2563eb; text-decoration: none; font-weight: 500; }
.lostpwd-link:hover, .quick-register:hover, .back-login:hover { text-decoration: underline; }

/* 提交按钮（渐变） */
.submit-btn {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: none;
  background: #111827; color: #fff; font-weight: 700; cursor: pointer;
}
.submit-btn.gradient {
  background: linear-gradient(135deg,#7c9cf5 0%, #5dd1b6 100%);
}
.submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.form-msg { min-height: 20px; margin-top: 8px; font-size: 13px; }
.form-msg.error { color: #dc2626; }
.form-msg.success { color: #16a34a; }

/* 社交登录切换区 */
.auth-social {
  display: flex; gap: 10px; margin: 16px 0; 
}
.social-tab {
  flex: 1; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px;
  background: #fff; color: #374151; font-weight: 600; cursor: pointer;
}
.social-tab.active {
  background: #f9fafb; border-color: #d1d5db;
}

/* 协议勾选 */
.agree-row { margin-top: 8px; }
.agree { display: flex; align-items: center; gap: 8px; color: #374151; font-size: 14px; }
.agree input[type="checkbox"] { width: 16px; height: 16px; accent-color: #6366f1; }
.agree a { color: #2563eb; text-decoration: none; }
.agree a:hover { text-decoration: underline; }

/* 记住我行（保留优化） */
.form-row.inline { display: flex; align-items: center; gap: 12px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #374151; }
.remember input[type="checkbox"] { width: 16px; height: 16px; accent-color: #6366f1; }
.lostpwd-link { margin-left: auto; }

/* 响应式 */
@media (max-width: 860px) {
  .auth-modal-card { grid-template-columns: 1fr; }
  .auth-card-left { display: none; }
  .form-row.inline { flex-direction: column; align-items: flex-start; gap: 8px; }
  .form-row.inline .lostpwd-link { margin-left: 0; margin-top: 4px; }
  .auth-title { text-align: center; }
}