.wechat-qr-canvas {
  aspect-ratio: 1 / 1;
  display: block;
  height: 100%;
  image-rendering: pixelated;
  object-fit: fill;
  width: 100%;
}

.wechat-qr-loading,
.wechat-qr-expired {
  align-items: center;
  background: rgba(19, 30, 48, 0.42);
  backdrop-filter: blur(1.2px);
  color: #fff;
  display: flex;
  inset: 0;
  justify-content: center;
  position: absolute;
  text-align: center;
}

.wechat-qr-loading-card,
.wechat-qr-expired-card {
  align-items: center;
  background: rgba(8, 18, 35, 0.76);
  border: 1px solid rgba(222, 234, 255, 0.32);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(7, 19, 39, 0.42);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100% - 20px);
  padding: 10px 12px;
}

.wechat-qr-loading[hidden],
.wechat-qr-expired[hidden] {
  display: none;
}

.wechat-qr-loading-spinner {
  animation: wechat-qr-spin 0.9s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: #ffffff;
  display: inline-flex;
  height: 22px;
  width: 22px;
}

.wechat-qr-loading-text,
.wechat-qr-expired-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

@keyframes wechat-qr-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.wechat-qr-refresh-btn {
  align-items: center;
  background: linear-gradient(135deg, #1f89ff, #0864eb);
  border: 1px solid rgba(214, 231, 255, 0.5);
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 86, 208, 0.4);
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 6px;
  height: 34px;
  justify-content: center;
  min-width: 108px;
  padding: 0 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.wechat-qr-refresh-btn .refresh-icon {
  display: inline-flex;
  font-size: 16px;
  line-height: 1;
}

.wechat-qr-refresh-btn:hover {
  box-shadow: 0 12px 24px rgba(0, 86, 208, 0.44);
  transform: translateY(-1px);
}

.wechat-qr-subtip {
  color: #5f7395;
  font-size: 12px;
  line-height: 1.55;
  margin: 8px 0 0;
  text-align: center;
}

.login-panel-phone {
  border: 1px solid #e2e9f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f6faff);
  padding: 10px 12px;
}

.login-panel-phone .login-submit-btn {
  margin-top: 8px;
}

.login-field {
  display: block;
  margin-bottom: 8px;
}

.login-field > span {
  color: #2a3957;
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  height: 44px;
  border: 1px solid #d6deed;
  border-radius: 10px;
  background: #fff;
  color: #1f2b46;
  font-size: 14px;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-field input:focus {
  border-color: #4d8dff;
  box-shadow: 0 0 0 4px rgba(77, 141, 255, 0.16);
}

.login-code-row {
  align-items: center;
  display: flex;
  gap: 8px;
}

.send-code-btn {
  flex-shrink: 0;
  height: 44px;
  border: 1px solid #c8d8ff;
  border-radius: 10px;
  background: #edf3ff;
  color: #135ed8;
  font-size: 13px;
  font-weight: 600;
  min-width: 112px;
  padding: 0 12px;
}

.send-code-btn:disabled {
  background: #f3f5fa;
  border-color: #dfe4ee;
  color: #97a2b7;
  cursor: not-allowed;
}

.login-error {
  color: #d72f3f;
  font-size: 13px;
  line-height: 1.5;
  min-height: 20px;
  margin-bottom: 6px;
}

.login-submit-btn {
  margin-top: 4px;
  width: 100%;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d76ff, #0052d9);
  box-shadow: 0 10px 24px rgba(0, 82, 217, 0.24);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.login-submit-btn:hover {
  box-shadow: 0 12px 26px rgba(0, 82, 217, 0.32);
  transform: translateY(-1px);
}

.agreement-row {
  align-items: flex-start;
  color: #60708f;
  display: flex;
  font-size: 12px;
  gap: 8px;
  line-height: 1.55;
  margin-top: 6px;
}

.agreement-row input {
  margin-top: 2px;
}

.agreement-row a {
  color: #0d5fd9;
  font-weight: 600;
}

.agreement-row a:hover {
  text-decoration: underline;
}

.login-cancel-btn {
  margin-top: 8px;
  width: 100%;
  height: 36px;
  border-radius: 10px;
  background: #f3f6fb;
  color: #3a4d72;
  font-size: 13px;
  font-weight: 600;
}

.login-cancel-btn:hover {
  background: #e9eef7;
}

/* === LOC: AUTH-TOAST === */
.auth-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translate(-50%, -16px);
  background: rgba(17, 28, 47, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  max-width: min(640px, calc(100vw - 24px));
  opacity: 0;
  padding: 9px 12px;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2100;
}

.auth-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

