/* 登录卡片居中布局（减去吸顶导航高度） */
.login-main {
  min-height: calc(100vh - 67px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  display: flex;
  overflow: hidden;
  width: 860px;
  max-width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* 左侧：平台广告图 */
.ad-section {
  flex: 1;
  min-width: 0;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #312e81, #0ea5e9);
}

.ad-section img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 中间分隔线 */
.divider {
  width: 1px;
  background: #f0f0f0;
}

/* 右侧：微信扫码区 */
.qr-section {
  width: 320px;
  flex-shrink: 0;
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #fafafa;
}

.qr-title {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-box {
  width: 200px;
  height: 200px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  gap: 8px;
  font-size: 13px;
}

/* 避免 .qr-box 的 flex 布局覆盖 hidden 属性 */
.qr-box[hidden] {
  display: none;
}

.qr-box .img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#qrBox {
  position: relative;
}

/* 二维码过期遮罩 */
.qr-expired {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
}

.qr-expired[hidden] {
  display: none;
}

.qr-expired-tip {
  color: #e5e7eb;
  font-size: 13px;
}

.qr-tip {
  font-size: 13px;
  color: #888;
  text-align: center;
  line-height: 1.6;
}

.agreement {
  font-size: 12px;
  color: #999;
  text-align: center;
  line-height: 1.8;
}

.agreement a {
  color: #4f46e5;
}

/* ================= 响应式适配 ================= */
@media (max-width: 768px) {
  .login-main {
    padding: 24px 16px;
  }

  .login-card {
    flex-direction: column;
  }

  .qr-section {
    order: -1;
    width: 100%;
    padding: 32px 20px;
  }

  .divider {
    width: 100%;
    height: 1px;
  }

  .ad-section {
    order: 1;
    flex: none;
    width: 100%;
    height: 220px;
    min-height: 0;
  }
}