/* 登录页样式 - 对齐小程序沃克版：绿色主题 + 单页 Tab 切换（2026-09-02 小爱） */

/* 全局背景（绿色渐变，对齐小程序 login.wxss） */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #e6f5ec 0%, #f2faf6 50%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

/* 顶部品牌卡片（白底圆角 + 阴影） */
.login-brand {
  flex: 0 0 auto;
  padding: 20px 20px 10px;
  text-align: center;
}
.brand-card {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 24px;
  box-shadow: 0 6px 20px rgba(46, 139, 87, 0.10);
}
.brand-logo {
  font-size: 22px;
  font-weight: 700;
  color: #2E8B57;
  line-height: 1.2;
}
.brand-name {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

/* 设置密码/忘记密码页品牌区（沿用白卡风格） */
.brand-content {
  display: inline-block;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.brand-title {
  font-size: 18px;
  color: #2E8B57;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

/* Tab 切换（与表单卡无缝衔接，对齐小程序 tab-bar） */
.login-tabs {
  display: flex;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: linear-gradient(180deg, #dcf0e6 0%, #e6f5ec 100%);
  border-radius: 24px 24px 0 0;
  padding: 12px 12px 0;
  box-sizing: border-box;
}
.tab-item {
  flex: 1;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 15px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 18px 18px 0 0;
  transition: all 0.2s;
  padding: 0;
  position: relative;
}
.tab-item.tab-active {
  background: #ffffff;
  color: #1f2937;
  font-weight: 600;
  box-shadow: 0 -4px 12px rgba(46, 139, 87, 0.06);
}
.tab-underline {
  width: 28px;
  height: 4px;
  background: #2E8B57;
  border-radius: 2px;
  margin-top: 6px;
  display: block;
  opacity: 0;
  transition: opacity 0.2s;
}
.tab-item.tab-active .tab-underline {
  opacity: 1;
}

/* 表单卡片（与 tab 无缝衔接） */
.login-form-area {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 20px 20px;
}
/* 设置密码/忘记密码页无 Tab，卡片需全圆角 */
#page-set-password .login-card,
#page-forgot-password .login-card {
  border-radius: 18px;
  max-width: 420px;
}
.login-card {
  background: #ffffff;
  border-radius: 0 0 18px 18px;
  padding: 20px 24px 22px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 36px rgba(46, 139, 87, 0.10);
}

/* 表单样式 */
.form-group {
  position: relative;
  margin-bottom: 14px;
}
.form-group input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  border: 1px solid #d7efe2;
  border-radius: 10px;
  font-size: 15px;
  background: #f4faf6;
  transition: all 0.3s ease;
  box-sizing: border-box;
}
.form-group input:focus {
  outline: none;
  border-color: #2E8B57;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(46, 139, 87, 0.12);
}
.form-group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
  pointer-events: none;
  transition: all 0.2s ease;
  background: transparent;
  padding: 0 4px;
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  color: #2E8B57;
  background: #fff;
}
.form-group .password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  color: #94a3b8;
}

/* 记住我行（对齐小程序） */
.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px;
  padding: 0 4px;
  cursor: pointer;
  user-select: none;
}
.remember-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffffff;
  background: #ffffff;
  transition: all 0.15s;
}
.remember-box.checked {
  background: #2E8B57;
  border-color: #2E8B57;
}
.remember-text {
  font-size: 13px;
  color: #6b7280;
}

/* 登录按钮（绿色渐变，对齐小程序） */
.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #2E8B57 0%, #2E8B57 50%, #3CA55C 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(46, 139, 87, 0.32);
  margin-top: 8px;
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(46, 139, 87, 0.38);
}
.login-btn:active {
  transform: translateY(0);
}
.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 底部链接 */
.login-footer {
  text-align: center;
  margin-top: 14px;
}
.login-footer a {
  color: #9ca3af;
  font-size: 13px;
  text-decoration: none;
}
.login-footer a:hover {
  color: #2E8B57;
}

/* 底部 slogan + 机构注册入口（对齐小程序 footer-tip） */
.login-footer-tip {
  flex: 0 0 auto;
  padding: 10px 20px 16px;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
#org-register-link {
  font-size: 14px;
  color: #2E8B57;
  text-decoration: none;
  padding: 6px 16px;
  cursor: pointer;
}
#org-register-link:hover {
  text-decoration: underline;
}

/* 邀请码提示 */
.invite-hint {
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  margin-top: 12px;
}

/* 设置密码页面 */
.set-password-info {
  background: #f0f9f4;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.set-password-info .info-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.set-password-info .info-item .label {
  color: #64748b;
}
.set-password-info .info-item .value {
  color: #1e293b;
  font-weight: 600;
}
.set-password-hint {
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  margin-top: 12px;
}

/* Toast提示 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  animation: toastIn 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.toast.success { background: #2E8B57; }
.toast.error { background: #ef4444; }
.toast.warning { background: #f59e0b; }
.toast.info { background: #2E8B57; }

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 480px) {
  .login-card {
    padding: 16px 16px 20px;
  }
  .brand-card {
    padding: 8px 20px;
  }
  .brand-logo {
    font-size: 20px;
  }
}