/* 登录与注册共用的浮动标签。 */
.yj-float-field {
  display: block;
  position: relative;
  min-width: 0;
}

:is(.portal-auth, .yj-login-card) .yj-float-field > input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding-inline: 14px;
}

:is(.portal-auth, .yj-login-card) .yj-float-field > label {
  position: absolute;
  inset-inline-start: 10px;
  top: 50%;
  max-width: calc(100% - 20px);
  margin: 0;
  padding-inline: 4px;
  overflow: hidden;
  color: #4d6177;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  transform: translateY(-50%);
  transform-origin: left center;
  transition: top .18s ease, transform .18s ease, color .18s ease;
}

:is(.portal-auth, .yj-login-card) .yj-float-field > input:not(:focus)::placeholder {
  color: transparent;
}

:is(.portal-auth, .yj-login-card) .yj-float-field > input:is(:focus, :not(:placeholder-shown), :autofill) + label {
  top: 0;
  background: #fff;
  color: #20598d;
  transform: translateY(-50%) scale(.85);
}

.yj-auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.yj-auth-actions > .yj-float-field { flex: 1; }
.yj-auth-actions > button { flex: 0 0 auto; min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  :is(.portal-auth, .yj-login-card) .yj-float-field > label { transition: none; }
}
