/* 鉴权页 · 对齐云贝收银台登录：实景 cover + 浅遮罩 + 居中白卡片 */
:root {
  --yp-navy: #353535;
  --yp-teal: #2d8cf0;
  --yp-btn-a: #2e9fff;
  --yp-btn-b: #3e79ff;
  --yp-muted: #999;
  --yp-line: #ddd;
}

* { box-sizing: border-box; }

html {
  height: 100%;
}

body.yp-auth {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  color: #333;
  background: #0a253a;
}

.yp-auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("../img/theme01/auth-bg-yunbei.jpg") center / cover no-repeat fixed;
  pointer-events: none;
}

.yp-auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
}

.yp-auth-wrap {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 云贝 .box-card：380px / 圆角 15 / 深阴影 / 最小高度约 400 */
.yp-auth-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  min-height: 400px;
  background: #fff;
  border-radius: 15px;
  border: 0;
  padding: 0 0 30px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
  overflow: visible;
  flex-shrink: 0;
  height: auto;
  max-height: none;
}

.yp-auth-head {
  text-align: center;
  margin: 0 0 8px;
  padding: 0 36px;
}

/* 文字标题态（商户登录等）：顶距对齐收银台 Logo 区 */
.yp-auth-card.is-alt-title .yp-auth-head {
  padding-top: 36px;
  margin-bottom: 16px;
}

/* 云贝同款圆形 Logo（图内已含蓝字「收银台」+ SHOUYINTAI） */
.yp-auth-logo {
  display: block;
  width: auto;
  height: 78px;
  margin: 30px auto 10px;
  border-radius: 50%;
  object-fit: cover;
}

/* 商户标题图：透明底、无圆形黑底裁剪（登录默认） */
.yp-auth-logo.is-text-mark {
  border-radius: 0;
  object-fit: contain;
  height: 88px;
  max-width: 300px;
  margin: 28px auto 10px;
}

/* 注册 / 找回密码标题再大一档 */
.yp-auth-logo.is-text-mark.is-text-mark-lg {
  height: 108px;
  max-width: 340px;
  margin: 26px auto 12px;
}

.yp-brand-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #2d8cf0;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.yp-brand-en {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #2d8cf0;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* 改 PIN 等非登录态：隐藏 Logo，显示文字标题 */
.yp-auth-card.is-alt-title .yp-auth-logo { display: none; }
.yp-auth-card.is-alt-title .yp-brand-title,
.yp-auth-card.is-alt-title .yp-brand-en { display: block; }
.yp-auth-card:not(.is-alt-title) .yp-brand-title,
.yp-auth-card:not(.is-alt-title) .yp-brand-en { display: none; }

.yp-auth-card h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #2d8cf0;
  letter-spacing: 0.12em;
}

.yp-auth-card .lead {
  margin: 10px 0 0;
  color: var(--yp-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* 云贝 .login-form：左右 55px */
.yp-auth-body {
  padding: 0 55px;
}

.yp-field {
  margin-bottom: 14px;
}

.yp-field label {
  display: none;
}

.yp-field label.yp-check {
  display: inline-flex;
}

.yp-field .hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #e6a23c;
}

.yp-field .hint-muted {
  color: var(--yp-muted);
}

.yp-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--yp-line);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.yp-input:focus-within {
  border-color: var(--yp-btn-a);
  box-shadow: 0 0 0 2px rgba(46, 159, 255, 0.18);
}

.yp-input .ico {
  width: 44px;
  text-align: center;
  color: #b0b0b0;
  flex-shrink: 0;
}

.yp-input input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  height: 42px;
  font-size: 14px;
  color: #333;
  padding-right: 16px;
  min-width: 0;
}

.yp-input .addon {
  padding-right: 16px;
  color: #b0b0b0;
}

.yp-input .addon a {
  color: #b0b0b0;
  text-decoration: none;
}

.yp-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 10px 0 0;
}

.yp-row-between a {
  font-size: 13px;
  color: var(--yp-teal);
  text-decoration: none;
  margin-left: auto;
}

.yp-login-extra {
  margin-top: 10px;
}

/* 含「记住密码」的字段：去掉底边距，让内容贴近登录按钮 */
.yp-field:has(.yp-login-extra) {
  margin-bottom: 0;
}

.yp-auth-body form > .yp-btn {
  margin-top: 12px;
}

.yp-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: #666;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
}

.yp-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--yp-btn-a);
  cursor: pointer;
}

.yp-captcha,
.yp-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.yp-captcha .yp-input,
.yp-input-row .yp-input {
  flex: 1;
}

.yp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  margin-top: 20px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--yp-btn-a), var(--yp-btn-b));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.5);
  transition: filter 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.yp-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 14px rgba(0, 123, 255, 0.55);
}

.yp-btn:active {
  filter: brightness(0.96);
  box-shadow: 0 3px 8px rgba(0, 123, 255, 0.4);
}

.yp-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  filter: none;
}

.yp-btn-ghost {
  background: #fff;
  color: #333;
  border: 1px solid #e5e5e5;
  box-shadow: none;
  margin-top: 0;
  height: 40px;
  font-size: 14px;
  text-decoration: none;
}

.yp-btn-ghost:hover {
  border-color: var(--yp-btn-a);
  color: var(--yp-btn-b);
  filter: none;
  box-shadow: none;
}

.yp-btn-ghost:active {
  filter: none;
  box-shadow: none;
}

.yp-btn-ghost img {
  width: 18px;
  height: 18px;
}

.yp-btn-sm {
  width: auto;
  min-width: 108px;
  height: 42px;
  margin-top: 0;
  padding: 0 14px;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.35);
}

.yp-oauth {
  margin-top: 18px;
}

.yp-oauth-label {
  font-size: 12px;
  color: var(--yp-muted);
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}

.yp-oauth-label::before,
.yp-oauth-label::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28%;
  height: 1px;
  background: #eee;
}

.yp-oauth-label::before { left: 0; }
.yp-oauth-label::after { right: 0; }

.yp-oauth-row {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
}

.yp-oauth-btn {
  flex: 1;
}

.yp-oauth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.yp-oauth-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.yp-oauth-icon:hover {
  transform: scale(1.08);
}

.yp-oauth-icon:hover img {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.22));
}

.yp-oauth-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--yp-muted);
  text-align: center;
  line-height: 1.5;
}

.yp-agree {
  margin-top: 14px;
  font-size: 12px;
  color: var(--yp-muted);
  text-align: center;
}

.yp-agree a {
  color: var(--yp-teal);
  text-decoration: none;
  font-weight: 600;
}

.yp-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: var(--yp-muted);
  text-align: center;
}

.yp-footer a {
  color: var(--yp-teal);
  font-weight: 600;
  text-decoration: none;
}

/* 右下角圆形返回 FAB */
.yp-back-home {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yp-btn-a), var(--yp-btn-b));
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(46, 159, 255, 0.45);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 0.25s ease,
    filter 0.25s ease;
  animation: yp-fab-float 2.8s ease-in-out infinite;
}

.yp-back-home i {
  display: block;
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.yp-back-home:hover {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 28px rgba(46, 159, 255, 0.55);
  animation: none;
}

.yp-back-home:hover i {
  transform: translateX(-3px);
}

.yp-back-home:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 4px 12px rgba(46, 159, 255, 0.4);
  filter: brightness(0.96);
}

.yp-back-home:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(46, 159, 255, 0.45), 0 8px 20px rgba(46, 159, 255, 0.5);
}

@keyframes yp-fab-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
  .yp-back-home {
    animation: none;
  }
  .yp-back-home,
  .yp-back-home i {
    transition: none;
  }
}

@media (max-width: 480px) {
  .yp-auth-bg {
    background-attachment: scroll;
  }

  .yp-auth-wrap {
    padding: 16px 14px;
    align-items: flex-start;
  }

  .yp-auth-body {
    padding: 0 28px;
  }

  .yp-auth-logo {
    height: 68px;
    margin-top: 24px;
  }

  .yp-auth-logo.is-text-mark {
    height: 76px;
    max-width: 260px;
  }

  .yp-auth-logo.is-text-mark.is-text-mark-lg {
    height: 92px;
    max-width: 300px;
  }

  .yp-back-home {
    right: 18px;
    bottom: 20px;
    width: 48px;
    height: 48px;
    font-size: 16px;
  }
}
