/* ==========================================================================
 * 登录 / 注册 / 忘记密码 页面样式（当云 DangYun 风格）
 * 文件：001/css/loginRegistrationForgot.css
 * 说明：仅在 login.tpl 中引用。左侧品牌区 + 右侧登录表单的左右二分大屏布局，
 *       主色 #246bfe，字体使用思源黑体（SiyuanHei）。
 * ========================================================================== */

/* --------------------------------------------------------------------------
 * 字体：思源黑体
 * -------------------------------------------------------------------------- */
@font-face {
  font-family: 'SiyuanHei';
  src: url('../font/siyuanhei.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
 * 设计变量
 * -------------------------------------------------------------------------- */
:root {
  --auth-primary: #246bfe;
  --auth-primary-hover: #1d5fff;
  --auth-bg: #eef5ff;
  --auth-fg: #111827;
  --auth-muted: #66758f;
  --auth-border: #d9e2f1;
  --auth-field-bg: #f5f8fd;
  --auth-radius: 12px;
}

/* --------------------------------------------------------------------------
 * 页面容器
 * -------------------------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--auth-fg);
  font-family: 'SiyuanHei', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--auth-bg);
}

.auth-header,
.auth-footer {
  padding: 16px 24px;
  text-align: center;
  color: var(--auth-muted);
}

.auth-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* --------------------------------------------------------------------------
 * 左侧品牌区：纯色蓝底 + 品牌 / 文案 / 特性 / 版权
 * -------------------------------------------------------------------------- */
.auth-left {
  position: relative;
  padding: 48px;
  display: flex;
  align-items: stretch;
  color: #fff;
  background: linear-gradient(160deg, #2f7bff 0%, #1d5fff 55%, #1646c4 100%);
  /* background:url(/themes/clientarea/default_001/001/img/new-background.jpg)no-repeat left top / 100% 1400px; */
  overflow: hidden;
}

/* 可选自定义背景图，叠在蓝色渐变之上，降低透明度保证文字可读 */
.auth-left-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}

.auth-left-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.auth-brand:hover {
  color: #fff;
  text-decoration: none;
}

.auth-brand img {
  height: 60px;
  max-width: 180px;
  object-fit: contain;
}

.auth-brand span {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

/* 文案区 */
.auth-copy h1 {
  max-width: 460px;
  margin: 0 0 16px;
  color: #fff;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
}

.auth-copy > p {
  max-width: 460px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.7;
}

/* 特性列表 */
.auth-highlights {
  display: grid;
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.auth-highlights li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.4;
}

.auth-highlights li > span {
  width: 36px;
  height: 36px;
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.auth-highlights svg {
  width: 18px;
  height: 18px;
}

.auth-copyright {
  margin: 48px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
 * 右侧登录区：浅色底 + 居中表单
 * -------------------------------------------------------------------------- */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-form {
  width: 100%;
  max-width: 420px;
}

.auth-card-head {
  margin-bottom: 24px;
}

.auth-card-head h2 {
  margin: 0;
  color: var(--auth-fg);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
}

.auth-card-head p {
  margin: 8px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
 * 登录方式切换 Tab
 * -------------------------------------------------------------------------- */
.auth-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--auth-border);
}

.auth-tabs .nav-item {
  margin-bottom: 0;
}

.auth-tabs .nav-link {
  position: relative;
  padding: 0 0 12px;
  border: 0;
  border-radius: 0;
  color: var(--auth-muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  background: transparent;
}

.auth-tabs .nav-link:hover {
  color: var(--auth-fg);
}

.auth-tabs .nav-link.active {
  color: var(--auth-primary);
  background: transparent;
  border: 0;
}

.auth-tabs .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: var(--auth-primary);
}

/* --------------------------------------------------------------------------
 * 表单
 * -------------------------------------------------------------------------- */
.auth-form .form-group {
  margin: 20px 0;
}

.auth-form .form-group > label {
  display: block;
  margin-bottom: 6px;
  color: var(--auth-fg);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.auth-form .form-control {
  height: 46px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  background: var(--auth-field-bg);
  color: var(--auth-fg);
  font-size: 14px;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-form .form-control:hover {
  border-color: #b9c9e6;
}

.auth-form .form-control:focus {
  border-color: var(--auth-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.12);
}

.auth-form .form-control::placeholder {
  color: #a6b2c6;
}

/* 文本域（注册自定义字段）：不固定高度，保持多行 */
.auth-form textarea.form-control {
  height: auto;
  min-height: 100px;
  padding: 10px 12px;
}

/* 手机号：区号下拉 + 输入框 */
.auth-form .input-group .form-control {
  border-radius: var(--auth-radius);
}

.auth-form .input-group-prepend {
  width: 110px;
  margin-right: 8px;
}

.auth-form .input-group-prepend .form-control,
.auth-form .input-group-prepend .select2-container--default .select2-selection--single {
  height: 46px;
  border-radius: var(--auth-radius);
  border-color: var(--auth-border);
  background: var(--auth-field-bg);
}

.auth-form .input-group-prepend .select2-container {
  width: 100% !important;
}

.auth-form .input-group-prepend .select2-selection__rendered {
  line-height: 46px;
}

.auth-form .input-group-prepend .select2-selection__arrow {
  height: 46px;
}

.auth-form .input-group-append {
  margin-left: 8px;
}

.auth-form .input-group-append .btn {
  height: 46px;
  border-radius: var(--auth-radius);
}

/* 图形验证码图片：与输入框等高，保持原始比例避免拉伸失真 */
.auth-form .input-group-append img {
  height: 46px;
  width: auto;
  border-radius: var(--auth-radius);
}

/* 功能类：默认隐藏手机验证码登录区块（由 phoneCheck 控制显隐） */
.allow_login_code_captcha {
  display: none;
}

/* 链接：忘记密码 / 切换登录方式 / 立即注册 */
.auth-form a {
  color: var(--auth-primary);
  font-weight: 600;
}

.auth-form a:hover {
  color: var(--auth-primary-hover);
  text-decoration: none;
}

.auth-form .form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 14px;
}

/* 仅右侧对齐（邮箱登录的「忘记密码」） */
.auth-form .form-foot-end {
  justify-content: flex-end;
}

/* 手机号登录方式切换（验证码 / 密码） */
.auth-form .form-foot .pointer {
  color: var(--auth-primary);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
 * 主按钮
 * -------------------------------------------------------------------------- */
.auth-form .btn-primary {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: var(--auth-radius);
  background: var(--auth-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(36, 107, 254, 0.24);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-form .btn-primary:hover,
.auth-form .btn-primary:focus {
  border: 0;
  background: var(--auth-primary-hover);
  box-shadow: 0 16px 28px rgba(36, 107, 254, 0.28);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
 * 三方登录 / 注册
 * -------------------------------------------------------------------------- */
.auth-oauth {
  margin-top: 28px;
  text-align: center;
}

.auth-oauth .auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #9aa6ba;
  font-size: 13px;
}

.auth-oauth .auth-divider::before,
.auth-oauth .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.auth-oauth .list-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.auth-oauth .list-inline-item {
  margin: 0;
}

.auth-oauth .social-list-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  background: #fff;
}

.auth-oauth .social-list-item img {
  width: 22px;
  height: 22px;
}

/* 注册：隐私协议勾选 */
.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-agree input[type="checkbox"] {
  margin-top: 3px;
  flex: 0 0 auto;
}

.auth-register {
  margin-top: 28px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
 * 响应式：小屏下品牌区在上，登录表单上移与品牌区重叠（浮于其上层）
 * -------------------------------------------------------------------------- */
@media screen and (max-width: 992px) {
  .auth-body {
    display: flex;
    flex-direction: column;
  }

  /* 品牌区在上：底部多留空间，供下方表单卡片上移重叠 */
  .auth-left {
    padding: 48px 24px 120px;
  }

  /* 品牌区内部：标题与文案自上而下正常堆叠 */
  .auth-left-inner {
    justify-content: flex-start;
    gap: 24px;
  }

  /* 移动端保留主标题与描述，隐藏特性列表与版权 */
  .auth-highlights,
  .auth-copyright {
    display: none;
  }

  /* 移动端主标题字号收敛，避免过度换行 */
  .auth-copy h1 {
    font-size: 22px;
  }

  /* 表单区在下：上移与品牌区重叠，浮于品牌区之上 */
  .auth-right {
    position: relative;
    z-index: 2;
    padding: 0 16px 32px;
    margin-top: -72px;
  }

  .auth-form {
    max-width: none;
    padding: 24px;
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(36, 107, 254, 0.08);
  }
}

@media screen and (max-width: 480px) {
  .auth-left {
    padding-right: 20px;
    padding-left: 20px;
  }
}
