/* 登录页扫码授权：不依赖任何第三方付费开放平台。 */
.auth-qr-block {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
}

.auth-qr-block[hidden] {
  display: none !important;
}

.auth-qr-divider {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(178, 212, 232, 0.76);
  font-size: 12.5px;
  letter-spacing: 0.08em;
}

.auth-qr-divider::before,
.auth-qr-divider::after {
  height: 1px;
  flex: 1 1 auto;
  background: linear-gradient(90deg, transparent, rgba(111, 221, 255, 0.24));
  content: "";
}

.auth-qr-divider::after {
  background: linear-gradient(90deg, rgba(111, 221, 255, 0.24), transparent);
}

.auth-qr-divider span {
  color: #dffaff;
  font-weight: 800;
  white-space: nowrap;
}

.auth-qr-divider small {
  color: rgba(154, 190, 211, 0.68);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.auth-qr-card {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(111, 226, 255, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 16%, rgba(92, 226, 255, 0.13), transparent 34%),
    radial-gradient(circle at 92% 86%, rgba(132, 133, 255, 0.1), transparent 40%),
    linear-gradient(145deg, rgba(9, 24, 38, 0.84), rgba(4, 10, 19, 0.9));
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.auth-qr-card::before {
  position: absolute;
  inset: -55% -25%;
  background: linear-gradient(105deg, transparent 42%, rgba(173, 244, 255, 0.08) 48%, transparent 54%);
  content: "";
  pointer-events: none;
  transform: translateX(-46%);
  transition: transform 900ms cubic-bezier(0.22, 0.75, 0.24, 1);
}

.auth-qr-card:hover::before {
  transform: translateX(46%);
}

.auth-qr-frame {
  position: relative;
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
  padding: 8px;
  border: 1px solid rgba(137, 239, 255, 0.45);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(211, 248, 255, 0.9));
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(93, 222, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.auth-qr-frame::before,
.auth-qr-frame::after {
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  border-color: #6ce9ff;
  border-style: solid;
  content: "";
  pointer-events: none;
}

.auth-qr-frame::before {
  top: -3px;
  left: -3px;
  border-width: 2px 0 0 2px;
  border-radius: 8px 0 0;
}

.auth-qr-frame::after {
  right: -3px;
  bottom: -3px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 8px;
}

.auth-qr-code {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: #fff;
}

.auth-qr-code svg,
.auth-qr-code img {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.auth-qr-skeleton {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: 11px;
  background:
    linear-gradient(110deg, #eef8ff 20%, #ffffff 38%, #eaf8ff 56%, #eef8ff 74%) 0 0 / 220% 100%;
  color: #74a5ba;
  font-size: 12.5px;
  font-weight: 700;
  animation: authQrSweep 1.4s linear infinite;
}

.auth-qr-block.is-loading .auth-qr-frame {
  opacity: 0.78;
}

.auth-qr-block.is-scanned .auth-qr-frame {
  border-color: rgba(116, 255, 171, 0.8);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 30px rgba(88, 255, 160, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.auth-qr-block.is-success .auth-qr-frame {
  border-color: rgba(116, 255, 171, 0.9);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 34px rgba(88, 255, 160, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.auth-qr-block.is-expired .auth-qr-code {
  filter: grayscale(1) blur(1px);
  opacity: 0.35;
}

.auth-qr-side {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.auth-qr-channel-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(125, 223, 255, 0.16);
  border-radius: 999px;
  background: rgba(4, 14, 25, 0.58);
}

.auth-qr-channel {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(186, 218, 236, 0.7);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.auth-qr-channel i {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-style: normal;
  font-size: 12.5px;
  font-weight: 900;
}

.auth-qr-channel[data-qr-channel="wechat"] i {
  background: linear-gradient(145deg, #38e86f, #0db84a);
  color: #fff;
}

.auth-qr-channel[data-qr-channel="alipay"] i {
  background: linear-gradient(145deg, #69b7ff, #1677ff);
  color: #fff;
}

.auth-qr-channel.is-active {
  border-color: rgba(123, 233, 255, 0.3);
  background: linear-gradient(145deg, rgba(75, 206, 235, 0.2), rgba(79, 113, 227, 0.14));
  color: #f1fdff;
}

.auth-qr-side > strong {
  overflow: hidden;
  max-width: 100%;
  color: #f4fdff;
  font-size: 17.5px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-qr-side > p {
  margin: 0;
  color: rgba(181, 211, 230, 0.78);
  font-size: 12.5px;
  line-height: 1.55;
}

.auth-qr-expire {
  color: rgba(121, 205, 230, 0.72);
  font-size: 12.5px;
  font-weight: 700;
}

.auth-qr-refresh {
  margin-top: 1px;
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: #7ceaff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.auth-qr-refresh:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-qr-security {
  margin: 0;
  color: rgba(139, 172, 192, 0.62);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}

.auth-qr-security b {
  color: rgba(155, 238, 255, 0.8);
  font-weight: 800;
}

@keyframes authQrSweep {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

@media (max-width: 560px) {
  .auth-qr-card {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 11px;
    padding: 10px;
  }

  .auth-qr-frame {
    width: 116px;
    height: 116px;
    padding: 7px;
    border-radius: 17px;
  }

  .auth-qr-side > strong {
    font-size: 16px;
  }
}

@media (max-width: 390px) {
  .auth-qr-card {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .auth-qr-side {
    align-items: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-qr-card::before,
  .auth-qr-skeleton {
    animation: none;
    transition: none;
  }
}
