/* 品效宝独立页：登录弹窗 + 右上角头像下拉 */

.pxb-page-header {
  flex-shrink: 0;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #ECECF2;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.pxb-page-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
}

@media (min-width: 640px) {
  .pxb-page-header__inner {
    padding: 12px 16px;
  }
}

.pxb-page-header__left,
.pxb-page-header__right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pxb-page-header__right {
  justify-content: flex-end;
  margin-left: auto;
}

.pxb-page-header__title {
  margin: 0;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #14141F;
}

.pxb-auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 31, 0.45);
  backdrop-filter: blur(4px);
}

.pxb-auth-modal-overlay.active {
  display: flex;
}

.pxb-auth-modal-content {
  position: relative;
  width: 90%;
  max-width: 400px;
  border-radius: 18px;
  background: #fff;
  padding: 28px 32px;
  border: 1px solid #ECECF2;
  box-shadow: 0 16px 48px rgba(20,20,40,.1);
  font-family: "Manrope", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.pxb-auth-modal-title {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #14141F;
}

.pxb-auth-modal-desc {
  margin: 0 0 20px;
  font-size: 12px;
  line-height: 1.5;
  color: #9A9AAB;
}

.pxb-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pxb-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pxb-auth-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #6B6B7B;
}

.pxb-auth-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #ECECF2;
  border-radius: 12px;
  background: #fff;
  color: #14141F;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pxb-auth-input::placeholder {
  color: #9A9AAB;
}

.pxb-auth-input:hover {
  border-color: #FFD8B5;
}

.pxb-auth-input:focus {
  border-color: #E85D04;
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.16);
}

.pxb-auth-error {
  font-size: 13px;
  color: #C53030;
}

.pxb-auth-error.hidden {
  display: none;
}

.pxb-auth-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #E85D04;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pxb-auth-btn-primary:hover {
  background: #C24A00;
}

.pxb-auth-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pxb-user-menu {
  position: relative;
  flex-shrink: 0;
}

.pxb-user-avatar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #FFD8B5;
  border-radius: 9999px;
  background: #FFF4EB;
  color: #E85D04;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  overflow: hidden;
}

.pxb-user-avatar-btn:hover {
  background: #FFE8D6;
  border-color: #E85D04;
  color: #C24A00;
}

.pxb-user-avatar-btn:focus-visible {
  outline: 2px solid rgba(232, 93, 4, 0.28);
  outline-offset: 2px;
}

.pxb-user-avatar-btn--guest {
  background: #F7F8FA;
  border-color: #ECECF2;
  color: #6B6B7B;
  box-shadow: none;
}

.pxb-user-avatar-btn--guest:hover {
  background: #FFF4EB;
  border-color: #FFD8B5;
  color: #E85D04;
}

.pxb-user-avatar-btn__icon {
  display: none;
  width: 14px;
  height: 14px;
}

.pxb-user-avatar-btn--guest .pxb-user-avatar-btn__icon {
  display: block;
}

.pxb-user-avatar-btn--guest #pxbUserInitial {
  display: none;
}

.pxb-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  min-width: 220px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  font-family: "Manrope", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.pxb-user-dropdown.hidden {
  display: none;
}

.pxb-user-dropdown__head {
  padding: 10px 14px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.pxb-user-dropdown__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pxb-user-dropdown__role {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.4;
  color: #9ca3af;
}

.pxb-user-dropdown__item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  transition: background 0.12s ease;
}

.pxb-user-dropdown__item:hover {
  background: #f3f4f6;
}

.pxb-user-dropdown__item--danger {
  color: #b45353;
}

.pxb-user-dropdown__item--danger:hover {
  background: #fef2f2;
}

.pxb-user-dropdown__profile {
  padding: 10px 14px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.pxb-user-dropdown__profile.hidden {
  display: none;
}

.pxb-user-dropdown__profile-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
}

.pxb-user-dropdown__profile-row:first-child {
  margin-top: 0;
}

.pxb-user-dropdown__profile-label {
  color: #9ca3af;
  flex-shrink: 0;
}

.pxb-user-dropdown__profile-value {
  color: #374151;
  text-align: right;
  word-break: break-all;
}

.pxb-user-dropdown__hint {
  margin: 0;
  padding: 10px 14px;
  font-size: 12px;
  color: #9ca3af;
}
