/* 注册页面样式 - 极简扁平硬朗风格 (4px版) - 高级感优化 */
body {
  background-color: #F7F8FA; /* 更柔和的高级灰底色 */
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1F2937;
  margin: 0;
  padding: 0;
}

/* 登录页面主要内容 */
.login-container {
  width: 100%;
  padding: 60px 20px;
  min-height: calc(100vh - 342px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
}

.login-main {
  width: 100%;
  max-width: 480px; /* 收窄卡片，更显精致 */
}

/* 核心卡片 */
.login-card {
  background: #ffffff;
  border-radius: 4px; /* 统一 4px */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02); /* 极其柔和的高级阴影 */
  border: 1px solid #E5E7EB; /* 极浅的边框 */
  padding: 48px 40px;
}

/* 主标题 */
.login-title {
  font-size: 24px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  color: #03205A;
  text-align: center;
  letter-spacing: -0.01em;
}

/* 副标题提示 */
.login-title-sub {
  font-size: 14px;
  color: #667085;
  text-align: center;
  margin-bottom: 36px;
  font-weight: 400;
}

/* 错误提示 */
.login-error {
  background-color: #FFEDF0;
  border: 1px solid #FFEDF0;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
  color: #DC2626;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.login-error::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background-color: #DC2626;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
}

.login-error-title {
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 14px;
}

.login-error-message {
  margin: 0;
}

/* 表单组 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  font-size: 14px;
  color: #667085;
  line-height: 1.5;
}

#show-account-bold {
  font-weight: 600;
  color: #03205A;
}

/* 密码输入框外层结构 */
.password-wrapper {
  position: relative;
}

/* 输入框 */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  font-size: 15px;
  transition: all 0.2s ease;
  background-color: #F7F8FA; /* 浅灰底色 */
  box-sizing: border-box;
  color: #03205A;
  height: 48px;
}

.form-input::placeholder {
  color: #667085;
}

.form-input:focus {
  border-color: #2C61FE;
  background-color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 浏览器原生自动填充背景修复 */
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px white inset !important;
}

/* 密码框图标样式 */
.password-wrapper .input-icon {
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.password-wrapper .input-icon:hover {
  background-color: #F7F8FA;
}

#clear-password {
  display: none;
}

.password-wrapper .clear-icon { right: 40px; }
.password-wrapper .eye-icon { right: 4px; }

.password-wrapper .input-icon svg {
  display: block;
}

/* 密码强度/要求提示 */
.checkbox-group-pw {
  font-size: 12.5px;
  color: #667085;
  margin-top: 8px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* 推荐码展开切换文本 */
.form-code-switch {
  font-size: 13.5px;
  color: #2C61FE;
  margin-bottom: 16px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  display: inline-block;
  transition: color 0.2s;
}

.form-code-switch[hidden],
#form-label-code[hidden] {
  display: none !important;
}

.form-code-switch:hover {
  color: #2C61FE;
  text-decoration: underline;
}

/* 推荐码表单行 (改造成精致的上下结构，适应卡片宽度) */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.form-label-column {
  font-size: 14px;
  font-weight: 500;
  color: #667085;
}

.form-input-column {
  width: 100%;
}

/* 推荐码输入动画 */
#form-label-code {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease-out, opacity 0.2s ease-out, margin 0.2s ease-out;
}

#form-label-code.open {
  max-height: 100px;
  opacity: 1;
  margin-bottom: 24px;
}

/* 提交按钮 */
.login-button {
  width: 100%;
  height: 48px;
  background-color: #2C61FE;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  letter-spacing: 0.5px;
}

.login-button:hover {
  background-color: #2C61FE;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* 返回按钮 */
.login-button-back {
  width: 100%;
  height: 48px;
  background-color: #F7F8FA; /* 使用温柔灰底色 */
  color: #667085;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.login-button-back:hover {
  background-color: #E5E7EB;
  color: #03205A;
}

/* 底部声明区 */
.login-notice {
  background: none;
  padding: 24px 0 0 0;
  margin-top: 8px;
  font-size: 12px; /* 弱化声明文字 */
  color: #667085;
  line-height: 1.6;
  border: none;
  border-top: 1px solid #F7F8FA; /* 顶部加一条分割线 */
  text-align: center;
}

.login-notice a {
  color: #667085;
  text-decoration: underline;
  font-weight: 400;
}

.login-notice a:hover {
  color: #03205A;
}

/* 响应式样式 */
@media screen and (max-width: 767px) {
  .login-container {
    padding: 20px 15px;
  }
  
  .login-card {
    padding: 32px 24px;
    border-radius: 4px;
  }
  
  .login-title {
    font-size: 22px;
  }

  .login-title-sub {
    font-size: 13.5px;
    margin-bottom: 24px;
  }
  
  .form-row {
    margin-bottom: 16px;
  }
}
