/* 登录 / 注册页（xianfeng 主题） */

html[theme] .xf-auth-page {
  min-height: 100vh;
}

/* 左侧迷你导航 */
html[theme] .xf-auth-body {
  display: flex;
  align-items: stretch;
}

html[theme] .xf-auth-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 78px 16px 22px !important;
  background: var(--xf-card) !important;
}

html[theme] .xf-auth-aside-link {
  display: flex;
  align-items: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--xf-muted);
  text-decoration: none;
  transition: color .15s;
}

html[theme] .xf-auth-aside-link:hover {
  color: var(--xf-accent);
}

html[theme] .xf-auth-aside-link.is-active {
  color: var(--xf-accent);
  font-weight: 600;
}

/* 顶栏右侧 */
html[theme] .xf-auth-cart {
  display: flex;
  align-items: center;
  color: var(--xf-card);
}

html[theme] .xf-auth-cart img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

html[theme] .xf-auth-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
  text-decoration: none;
}

html[theme] .xf-auth-avatar svg {
  width: 16px;
  height: 16px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 1.6;
}

/* 主体 */
html[theme] .xf-auth-main {
  display: block;
  flex: 1;
  min-width: 0;
  padding-top: 104px !important;
}

/* 覆盖登录/注册旧版全屏 flex 容器 */
html[theme] .xf-auth-page #login,
html[theme] .xf-auth-page #regist {
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

html[theme] .xf-auth-panel .form-main {
  margin-top: 0;
}

html[theme] .xf-auth-main .main-card {
  max-width: 1260px;
}

/* 双列卡片 */
html[theme] .xf-auth-card {
  display: grid;
  grid-template-columns: 45% 55%;
  padding: 0 !important;
  overflow: hidden;
}

html[theme] .xf-auth-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 32px;
  text-align: center;
}

html[theme] .xf-auth-copy h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--xf-ink);
  letter-spacing: .01em;
}

html[theme] .xf-auth-copy h2 {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--xf-ink);
}

html[theme] .xf-auth-copy p {
  margin: 30px 0 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--xf-muted);
}

/* 右侧表单 */
html[theme] .xf-auth-panel {
  min-width: 0;
  padding: 16px 56px 40px;
  box-sizing: border-box;
}

html[theme] .xf-auth-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 40px;
  margin: 0 -8px 26px;
  border-bottom: 1px solid var(--xf-line);
}

html[theme] .xf-auth-tab {
  position: relative;
  padding: 8px 8px 14px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--xf-ink);
  cursor: pointer;
  white-space: nowrap;
}

html[theme] .xf-auth-tab.active {
  color: var(--xf-ink);
}

html[theme] .xf-auth-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--xf-accent);
}

html[theme] .xf-auth-field {
  margin-bottom: 16px;
}

html[theme] .xf-auth-label {
  margin-bottom: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--xf-muted);
}

html[theme] .xf-auth-field .el-input__inner,
html[theme] .xf-auth-page .form-main .el-input__inner {
  height: 38px;
  line-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--xf-line) !important;
  border-radius: 2px !important;
  background: var(--xf-card);
  box-shadow: none;
  font-size: 13px;
  color: var(--xf-text);
}

html[theme] .xf-auth-field .el-input__inner:focus,
html[theme] .xf-auth-page .form-main .el-input__inner:focus {
  border-color: #91c2ed !important;
}

html[theme] .xf-auth-field .el-input__inner::placeholder {
  color: var(--xf-placeholder);
}

/* 手机号国家区号 */
html[theme] .xf-auth-field .el-input-group__prepend {
  padding: 0 8px;
  border: 1px solid var(--xf-line);
  border-right: 0;
  border-radius: 2px 0 0 2px;
  background: var(--xf-soft);
}

html[theme] .xf-auth-field .el-select .el-input__inner {
  height: 38px;
  line-height: 38px;
  padding: 0;
  border: 0 !important;
  background: transparent;
}

/* 验证码 */
html[theme] .xf-auth-code {
  display: flex;
  align-items: center;
  gap: 8px;
}

html[theme] .xf-auth-code .el-input {
  flex: 1;
  min-width: 0;
}

html[theme] .xf-auth-code .code-btn,
html[theme] .xf-auth-code .el-button {
  flex-shrink: 0;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #91c2ed;
  border-radius: 2px;
  background: var(--xf-card);
  color: var(--xf-accent);
  font-size: 12px;
}

/* 协议 */
html[theme] .xf-auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 2px 0 8px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--xf-muted);
}

html[theme] .xf-auth-terms .el-checkbox {
  margin-right: 0;
  height: 16px;
  flex-shrink: 0;
}

html[theme] .xf-auth-terms .el-checkbox__inner {
  width: 13px;
  height: 13px;
}

html[theme] .xf-auth-terms .el-checkbox__inner::after {
  height: 6px;
  left: 3px;
  top: 0;
}

html[theme] .xf-auth-terms span {
  cursor: pointer;
}

html[theme] .xf-auth-terms a {
  color: var(--xf-accent);
  text-decoration: none;
  cursor: pointer;
}

/* 验证码登录 / 忘记密码 */
html[theme] .xf-auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 12px;
}

html[theme] .xf-auth-links a {
  color: var(--xf-accent);
  text-decoration: none;
  cursor: pointer;
}

html[theme] .xf-auth-links a:hover {
  text-decoration: underline;
}

html[theme] .xf-auth-links .xf-auth-switch {
  color: var(--xf-accent);
}

/* 主按钮 */
html[theme] .xf-auth-page .xf-auth-submit.el-button,
html[theme] .xf-auth-page .xf-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 2px;
  background: #91c2ed;
  color: var(--xf-ink);
  font-size: 14px;
  letter-spacing: .02em;
}

html[theme] .xf-auth-page .xf-auth-submit.el-button:hover,
html[theme] .xf-auth-page .xf-auth-submit:hover {
  background: #7fb2e2;
  color: var(--xf-ink);
}

html[theme] .xf-auth-page .xf-auth-register {
  margin-top: 10px;
  text-align: right;
  font-size: 12px;
}

html[theme] .xf-auth-page .xf-auth-register a {
  color: var(--xf-accent);
  text-decoration: none;
  cursor: pointer;
}

html[theme] .xf-auth-page .read-item {
  margin: 10px 0;
}

/* 二维码 */
html[theme] .xf-auth-page .qr-code {
  position: static;
  margin: 18px 0 0;
  width: 100%;
  text-align: center;
}

html[theme] .xf-auth-page .qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

html[theme] .xf-auth-page .qr-box-img {
  width: 190px;
  height: 190px;
}

html[theme] .xf-auth-page .qr-box-tips {
  font-size: 12px;
  color: var(--xf-muted);
}

/* 第三方登录 */
html[theme] .xf-auth-page .line-item {
  margin: 14px 0 8px;
}

html[theme] .xf-auth-page .login-type {
  display: flex;
  justify-content: center;
  gap: 16px;
}

html[theme] .xf-auth-page .oauth-item {
  width: 36px;
  height: 36px;
  border: 1px solid var(--xf-line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

html[theme] .xf-auth-page .oauth-img {
  width: 20px;
  height: 20px;
}

/* 注册页表单间距 */
html[theme] .xf-auth-page .custom-form {
  margin-bottom: 8px;
}

html[theme] .xf-auth-page .custom-form .el-form-item__label {
  padding-bottom: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--xf-muted);
}

html[theme] .xf-auth-page .custom-form .el-form-item {
  margin-bottom: 16px;
}

html[theme] .xf-auth-page .password-form-item {
  position: relative;
}

html[theme] .xf-auth-page .password-rule-popover {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--xf-line);
  border-radius: 2px;
  background: var(--xf-card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
  font-size: 12px;
}

html[theme] .xf-auth-page .password-rule-title {
  margin-bottom: 6px;
  color: var(--xf-ink);
}

html[theme] .xf-auth-page .password-rule-item {
  line-height: 1.8;
  color: var(--xf-muted-2);
}

html[theme] .xf-auth-page .password-rule-item.is-pass {
  color: #4caf50;
}

html[theme] .xf-auth-page .password-rule-item i {
  margin-right: 4px;
}

@media (max-width: 1100px) {
  html[theme] .xf-auth-card {
    grid-template-columns: minmax(0, 1fr);
  }

  html[theme] .xf-auth-copy {
    padding: 48px 24px;
  }

  html[theme] .xf-auth-panel {
    padding: 8px 24px 32px;
    border-top: 1px solid var(--xf-line);
  }
}

/* Element prepend selects have negative margins by default. Keep the entire control inside its cell. */
html[theme] .xf-auth-field .el-input-group__prepend { width: 80px; padding: 0; box-sizing: border-box; }
html[theme] .xf-auth-field .el-input-group__prepend .el-select { display: block; width: 100%; margin: 0; }
html[theme] .xf-auth-field .el-input-group__prepend .el-input__inner { width: 100%; padding: 0 28px 0 12px; text-align: left; }
html[theme] .xf-auth-field .el-input-group__prepend .el-input__suffix { right: 4px; }
html[theme] .xf-auth-field .el-input-group__prepend + .el-input__inner { border-radius: 0 2px 2px 0 !important; }
