/* ============================================================================
   竹易付 · 认证页统一设计 (assets/css/auth.css)
   覆盖：user/login.php  user/reg.php  user/findpwd.php
   说明：仅视觉层，类名与原模板保持一致，不涉及任何业务逻辑
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 基础重置
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 28px 16px 20px;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #0f172a;
  background:
    radial-gradient(900px 480px at 50% -8%, #e6fbf1 0%, rgba(230, 251, 241, 0) 62%),
    radial-gradient(700px 420px at 5% 105%, #eef7ff 0%, rgba(238, 247, 255, 0) 60%),
    #fbfdfc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; }

/* 顶部柔和光晕 */
body::before {
  content: "";
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, .16) 0%, rgba(52, 211, 153, 0) 68%);
  pointer-events: none;
  z-index: 0;
}
body::after { display: none; }

/* 浮动竹叶装饰：新版本隐藏，保持界面干净 */
.bamboo-leaf { display: none !important; }

/* --------------------------------------------------------------------------
   2. 容器
   -------------------------------------------------------------------------- */
.login-wrapper,
.register-wrapper,
.findpwd-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  margin-top: auto;
  margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   3. 品牌标识
   -------------------------------------------------------------------------- */
.brand-section {
  text-align: center;
  margin-bottom: 20px;
}

.brand-section .brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  padding: 13px;
  border-radius: 24px;
  background: linear-gradient(145deg, #34d399 0%, #059669 60%, #047857 100%);
  box-shadow: 0 14px 34px rgba(5, 150, 105, .30), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s;
}
.brand-section .brand-icon::after { display: none; }
.brand-section .brand-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(5, 150, 105, .36);
}
.brand-section .brand-icon svg { width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   4. 卡片
   -------------------------------------------------------------------------- */
.login-card,
.register-card,
.findpwd-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #ebf0f3;
  border-radius: 24px;
  padding: 30px 28px 26px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, .04),
    0 12px 32px rgba(15, 23, 42, .07),
    0 32px 64px -24px rgba(5, 150, 105, .12);
  transition: box-shadow .3s;
}
.login-card:hover,
.register-card:hover,
.findpwd-card:hover { box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 44px rgba(15, 23, 42, .09), 0 40px 74px -24px rgba(5, 150, 105, .16); }

/* --------------------------------------------------------------------------
   5. 标题
   -------------------------------------------------------------------------- */
.login-title,
.register-title,
.findpwd-title {
  text-align: center;
  margin-bottom: 22px;
}
.login-title strong,
.register-title strong,
.findpwd-title strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #0f172a;
  line-height: 1.35;
}
.login-title small,
.register-title small,
.findpwd-title small {
  display: block;
  margin-top: 7px;
  font-size: 13.5px;
  font-weight: 400;
  color: #7b8a99;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   6. 标签切换（密码登录 / 密钥登录）—— 分段控件
   -------------------------------------------------------------------------- */
.nav-tabs-custom {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 20px;
  background: #f2f6f5;
  border: none;
  border-radius: 14px;
  list-style: none;
}
.nav-tabs-custom > li {
  flex: 1 1 0;
  float: none;
  margin: 0;
  list-style: none;
}
.nav-tabs-custom li a {
  display: block;
  padding: 10px 8px;
  border: none !important;
  border-radius: 11px;
  background: transparent;
  color: #6b7c88;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
  transition: background .2s, color .2s, box-shadow .2s;
}
.nav-tabs-custom li a:hover { color: #047857; background: rgba(255, 255, 255, .6); }
.nav-tabs-custom li.active a,
.nav-tabs-custom li.active a:hover {
  background: #ffffff;
  color: #047857;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .09);
}

/* --------------------------------------------------------------------------
   7. 表单：输入框（核心）
   -------------------------------------------------------------------------- */
.form-group-custom {
  margin-bottom: 14px;
}

.form-group-custom .input-group,
.list-group-sm .input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1.5px solid #dde6ea;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-group-custom .input-group:hover,
.list-group-sm .input-group:hover { border-color: #c3d2cc; }

.form-group-custom .input-group:focus-within,
.list-group-sm .input-group:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .13);
  background: #ffffff;
}

/* 输入框左侧图标 */
.form-group-custom .input-group .input-group-addon,
.list-group-sm .input-group .input-group-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  padding: 0;
  border: none;
  background: transparent;
  color: #9aa8b4;
  font-size: 15px;
  line-height: 1;
}

/* 输入框本体 */
.form-group-custom .input-group .form-control,
.list-group-sm .input-group .form-control {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 52px;
  padding: 0 16px 0 2px;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 16px;
  line-height: 52px;
  color: #0f172a;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-group-custom .input-group .form-control::placeholder,
.list-group-sm .input-group .form-control::placeholder {
  color: #a8b4be;
  opacity: 1;
  font-size: 15px;
}
/* 独立输入框（无 input-group 包裹） */
.findpwd-card > .form-control,
.register-card > .form-control,
.login-card > .form-control {
  height: 52px;
  border: 1.5px solid #dde6ea;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 16px;
  box-shadow: none;
}
.findpwd-card > .form-control:focus,
.register-card > .form-control:focus,
.login-card > .form-control:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .13);
  outline: none;
}

/* 下拉框 */
.form-group-custom select.form-control {
  height: 52px;
  width: 100%;
  border: 1.5px solid #dde6ea !important;
  border-radius: 14px !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  padding: 0 40px 0 16px;
  font-size: 16px;
  color: #0f172a;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.form-group-custom select.form-control:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .13) !important;
}

/* .select-solo 只是包裹层，不能再画边框/箭头（否则出现双层框+两个箭头） */
.select-solo {
  display: block;
  height: auto;
  padding: 0;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
}
.select-solo > select.form-control { margin: 0; }

/* 验证码按钮（获取验证码） */
.form-group-custom .input-group .sendcode-btn,
.list-group-sm .input-group .sendcode-btn,
.sendcode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  height: 100%;
  padding: 0 16px;
  border: none;
  border-left: 1px solid #eef2f4;
  background: #f6faf8;
  color: #059669;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.sendcode-btn:hover { background: #ecfdf5; color: #047857; }
.sendcode-btn.disabled,
.sendcode-btn[disabled] { color: #a3b1bd; background: #f6f8f9; cursor: not-allowed; }

/* 含验证码按钮的 addon 容器：宽度自适应，不要固定 48px（否则文字被裁） */
@supports selector(:has(*)) {
  .form-group-custom .input-group > .input-group-addon:has(.sendcode-btn),
  .list-group-sm .input-group > .input-group-addon:has(.sendcode-btn) {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
  }
  /* 紧跟其后的输入框保持圆角收尾 */
  .form-group-custom .input-group > .input-group-addon:has(.sendcode-btn) + .form-control,
  .list-group-sm .input-group > .input-group-addon:has(.sendcode-btn) + .form-control { border-radius: 0 !important; }
}

/* 复选框 */
.checkbox-custom {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 16px 0 6px;
  font-size: 13.5px;
  color: #55646f;
  line-height: 1.6;
  cursor: pointer;
  font-weight: 400;
}
.checkbox-custom input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #059669;
  cursor: pointer;
}
.checkbox-custom a { color: #047857; font-weight: 600; }

/* 价格提示 */
.price-tip {
  font-size: 13.5px;
  color: #7b8a99;
  text-align: center;
  padding: 0 4px 4px;
  line-height: 1.6;
}
.price-tip .text-danger,
.text-danger { color: #dc2626; font-weight: 600; }

/* --------------------------------------------------------------------------
   8. 按钮
   -------------------------------------------------------------------------- */
.btn-login,
.btn-register,
.btn-submit {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 54px;
  margin-top: 8px;
  padding: 0 20px;
  border: none !important;
  border-radius: 15px;
  background: linear-gradient(135deg, #34d399 0%, #059669 100%) !important;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .06em;
  box-shadow: 0 10px 26px rgba(5, 150, 105, .30);
  transition: transform .18s, box-shadow .22s, filter .22s;
  cursor: pointer;
}
.btn-login:hover,
.btn-register:hover,
.btn-submit:hover {
  filter: brightness(1.04);
  box-shadow: 0 14px 32px rgba(5, 150, 105, .38);
  transform: translateY(-1px);
  color: #fff !important;
}
.btn-login:active,
.btn-register:active,
.btn-submit:active { transform: translateY(0); box-shadow: 0 6px 16px rgba(5, 150, 105, .30); }
.btn-login i,
.btn-register i,
.btn-submit i { font-size: 15px; }

/* 返回按钮 */
.btn-back {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #e6eeeb !important;
  border-radius: 11px;
  background: #f6faf8 !important;
  color: #55646f !important;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-back:hover { background: #ecfdf5 !important; color: #047857 !important; border-color: #a7f3d0 !important; }

/* 白底次要按钮 */
.btn-white,
.btn-default {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #e2eae7 !important;
  border-radius: 13px;
  background: #ffffff !important;
  color: #47555f !important;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: none !important;
  transition: background .2s, border-color .2s, color .2s;
}
.btn-white:hover,
.btn-default:hover { background: #f6faf8 !important; border-color: #bfe8d5 !important; color: #047857 !important; }
.btn-block { display: flex !important; width: 100%; }

/* --------------------------------------------------------------------------
   9. 底部链接行 / 分割线 / 第三方登录
   -------------------------------------------------------------------------- */
.action-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.action-row .btn-link-custom {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 10px;
  border: 1px solid #e8efec;
  border-radius: 13px;
  background: #f6faf8;
  color: #55646f;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.action-row .btn-link-custom::before { display: none !important; }
.action-row .btn-link-custom:hover {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.action-row .btn-link-custom i { font-size: 13.5px; opacity: .9; }

.action-row .btn-link-custom.btn-primary-link {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 7px 18px rgba(5, 150, 105, .26);
}
.action-row .btn-link-custom.btn-primary-link:hover {
  color: #fff;
  filter: brightness(1.04);
  box-shadow: 0 10px 24px rgba(5, 150, 105, .34);
}

.line.line-dashed {
  border-top: 1px dashed #e6eeeb;
  margin: 18px 0 4px;
}

.social-section { margin-top: 16px; text-align: center; }
.social-section .social-label {
  display: block;
  font-size: 12.5px;
  color: #9aa8b4;
  margin-bottom: 12px;
  letter-spacing: .04em;
}
.social-section .social-btns {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.social-section .social-btns .btn-social {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8efec;
  border-radius: 14px;
  background: #f7fbf9;
  color: #64748b;
  font-size: 20px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.social-section .social-btns .btn-social:hover {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: #bfe8d5;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
}
.social-section .social-btns .btn-social img { width: 24px; height: 24px; border-radius: 50%; }

/* --------------------------------------------------------------------------
   10. 页脚
   -------------------------------------------------------------------------- */
.footer-copyright {
  position: relative;
  z-index: 2;
  margin-top: 2px;
  margin-bottom: auto;
  padding: 6px 0 4px;
  text-align: center;
  font-size: 12.5px;
  color: #9aa8b4;
  line-height: 1.7;
}
.footer-copyright a { color: #6b7c88; text-decoration: none; font-weight: 600; }
.footer-copyright a:hover { color: #047857; }

/* --------------------------------------------------------------------------
   11. 验证码组件
   -------------------------------------------------------------------------- */
.captcha-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  margin: 8px 0 4px;
  padding: 6px 0;
}
#captcha_text { font-size: 13px; color: #8a98a4; }

.loading { display: flex; align-items: center; gap: 5px; }
.loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7f3d0;
  animation: dotPulse 1.1s infinite ease-in-out;
}
.loading-dot:nth-child(2) { animation-delay: .15s; }
.loading-dot:nth-child(3) { animation-delay: .3s; }
.loading-dot:nth-child(4) { animation-delay: .45s; }
@keyframes dotPulse {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.15); background: #34d399; }
}

#captchaform { margin-top: 4px; }

/* 图形验证码图片 */
img#verifycode {
  height: 52px !important;
  width: auto !important;
  border-radius: 12px;
  border: 1.5px solid #dde6ea;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   12. 弹窗（注册页协议弹窗）
   -------------------------------------------------------------------------- */
.modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .22);
  overflow: hidden;
}
.modal-header { padding: 18px 22px; border-bottom: 1px solid #eef2f4; }
.modal-title { font-size: 17px; font-weight: 700; color: #0f172a; }
.modal-body { padding: 20px 22px; font-size: 14px; color: #55646f; line-height: 1.75; max-height: 60vh; overflow-y: auto; }
.modal-footer { padding: 14px 22px; border-top: 1px solid #eef2f4; }
.modal-backdrop.in { opacity: .42; }

/* --------------------------------------------------------------------------
   13. Bootstrap 覆盖
   -------------------------------------------------------------------------- */
.list-group { margin-bottom: 0; }
.list-group-item { background: transparent; border: none; padding: 0; margin-bottom: 0; }
.hide { display: none !important; }
.wrapper { padding: 0; }
.logo { text-align: center; }
.logo img { max-height: 56px; }

/* --------------------------------------------------------------------------
   14. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 520px) {
  body { padding: 20px 14px 16px; }

  .login-wrapper,
  .register-wrapper,
  .findpwd-wrapper { max-width: 100%; }

  .brand-section { margin-bottom: 16px; }
  .brand-section .brand-icon { width: 66px; height: 66px; padding: 12px; border-radius: 21px; }

  .login-card,
  .register-card,
  .findpwd-card {
    padding: 24px 18px 20px;
    border-radius: 22px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .07), 0 24px 48px -24px rgba(5, 150, 105, .14);
  }

  .login-title strong,
  .register-title strong,
  .findpwd-title strong { font-size: 20px; }
  .login-title small,
  .register-title small,
  .findpwd-title small { font-size: 13px; }

  .form-group-custom .input-group .form-control,
  .list-group-sm .input-group .form-control { height: 50px; line-height: 50px; font-size: 16px; }
  .form-group-custom .input-group .input-group-addon { flex-basis: 44px; width: 44px; min-width: 44px; }

  .btn-login, .btn-register, .btn-submit { height: 52px; font-size: 15.5px; border-radius: 14px; }

  .action-row { gap: 8px; }
  .action-row .btn-link-custom { padding: 11px 6px; font-size: 13px; }

  .social-section .social-btns .btn-social { width: 46px; height: 46px; font-size: 19px; }

  /* 返回按钮在移动端与主按钮等宽，视觉更整齐 */
  .btn-back { display: flex !important; width: 100%; justify-content: center; margin-top: 10px; }
}

@media (max-width: 340px) {
  body { padding: 14px 10px 12px; }
  .login-card,
  .register-card,
  .findpwd-card { padding: 20px 14px 18px; border-radius: 20px; }
  .brand-section .brand-icon { width: 60px; height: 60px; }
  .action-row { flex-direction: column; }
  .action-row .btn-link-custom { width: 100%; }
}

/* 横屏矮屏：避免内容被裁 */
@media (max-height: 640px) {
  body { padding-top: 16px; }
  .brand-section { margin-bottom: 12px; }
  .brand-section .brand-icon { width: 56px; height: 56px; padding: 10px; }
}
