/* 登录页面样式 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 26px;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.login-header p {
  font-size: 14px;
  color: #8c8c8c;
}

/* 登录方式切换 */
.login-tabs {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: none;
  font-size: 15px;
  color: #8c8c8c;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.tab-btn.active {
  color: #1890ff;
  font-weight: 600;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #1890ff;
}

/* 表单 */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  color: #595959;
  font-weight: 500;
}

.form-group input {
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
  outline: none;
}

.form-group input:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row input {
  flex: 1;
}

/* 按钮 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: #1890ff;
  color: #fff;
}

.btn-primary:hover {
  background: #40a9ff;
}

.btn-primary:disabled {
  background: #91d5ff;
  cursor: not-allowed;
}

.btn-sms {
  background: #f0f0f0;
  color: #595959;
  font-size: 13px;
  white-space: nowrap;
  min-width: 110px;
}

.btn-sms:hover:not(:disabled) {
  background: #d9d9d9;
}

.btn-sms:disabled {
  color: #bfbfbf;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
}

/* 提示消息 */
.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #ff4d4f;
}

.alert-success {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #52c41a;
}

/* 底部链接 */
.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: #8c8c8c;
}

.login-footer a {
  color: #1890ff;
  text-decoration: none;
  margin: 0 4px;
}

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

.login-footer .divider {
  margin: 0 8px;
  color: #d9d9d9;
}

/* 微信扫码登录 */
.wechat-qr-wrapper {
  text-align: center;
  padding: 16px 0 8px;
}

.wechat-qr-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 232px;
  min-height: 232px;
  padding: 16px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  margin-bottom: 16px;
}

.wechat-qr-loading {
  color: #999;
  font-size: 14px;
  padding: 40px 16px;
}

.wechat-qr-container img,
.wechat-qr-container canvas {
  display: block;
  margin: 0 auto;
}

.wechat-qr-tip {
  color: #333;
  font-size: 14px;
  margin: 8px 0 4px;
  font-weight: 500;
}

.wechat-qr-subtip {
  color: #999;
  font-size: 12px;
  margin: 0 0 16px;
  line-height: 1.5;
}

.wechat-refresh-btn {
  margin-top: 8px;
}

.wechat-expire-tip {
  color: #ff9800;
  font-size: 13px;
  margin-top: 4px;
  margin-bottom: 4px;
}

/* 响应式 */
@media (max-width: 480px) {
  body {
    padding: 12px;
    align-items: flex-start;
    padding-top: 40px;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-header h1 {
    font-size: 22px;
  }
}

/* 步骤指示器 */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  gap: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #bfbfbf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.step.active .step-num {
  background: #1890ff;
  color: #fff;
}

.step.done .step-num {
  background: #52c41a;
  color: #fff;
}

.step-label {
  font-size: 12px;
  color: #bfbfbf;
  transition: color 0.3s;
}

.step.active .step-label {
  color: #1890ff;
}

.step.done .step-label {
  color: #52c41a;
}

.step-line {
  width: 40px;
  height: 2px;
  background: #f0f0f0;
  margin: 0 4px 20px 4px;
  transition: background 0.3s;
}
