/**
 * WebTools 登录态顶栏下拉，结构限定在 #kq-header-auth。
 * 作用域限定在 #kq-static-chrome-top，避免影响 #root 内组件。
 */
#kq-static-chrome-top #kq-header-auth .header-auth-logged {
  max-width: none !important;
}
#kq-static-chrome-top #kq-header-auth .header-user-menu {
  position: relative;
  flex: 0 0 auto;
}
#kq-static-chrome-top #kq-header-auth #auth-user-center-btn.header-login-btn {
  position: relative;
  gap: 6px;
  padding: 0 14px;
  white-space: nowrap;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 220px;
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
#kq-static-chrome-top #kq-header-auth .header-login-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
  background: #eef5ff;
}
#kq-static-chrome-top #kq-header-auth .header-login-avatar.hidden {
  display: none !important;
}
#kq-static-chrome-top #kq-header-auth .header-login-label {
  display: inline-block;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}
#kq-static-chrome-top #kq-header-auth .header-login-indicator {
  width: 16px;
  height: 16px;
  color: currentColor;
  opacity: 0.75;
  transition: transform 160ms ease, opacity 160ms ease;
  flex: 0 0 auto;
}
#kq-static-chrome-top #kq-header-auth #auth-user-center-btn[aria-expanded="true"] .header-login-indicator {
  transform: rotate(180deg);
  opacity: 1;
}
#kq-static-chrome-top #kq-header-auth #auth-user-center-btn.header-login-btn.is-logged-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 114px;
  height: 42px;
  padding: 0 12px 0 8px;
  border: 1px solid #bfd5fa;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  color: #1f74ea;
  box-shadow: 0 10px 22px rgba(30, 136, 229, 0.12);
}
#kq-static-chrome-top #kq-header-auth #auth-user-center-btn.header-login-btn.is-logged-in:hover {
  border-color: #98bef8;
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
}
#kq-static-chrome-top #kq-header-auth #auth-user-center-btn.header-login-btn.is-logged-in .header-login-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(180deg, #f4f8ff 0%, #dce9ff 100%);
  border: 1px solid #d8e5fb;
  flex: 0 0 auto;
}
#kq-static-chrome-top #kq-header-auth #auth-user-center-btn.header-login-btn.is-logged-in .header-login-label {
  max-width: 72px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #1f74ea;
  line-height: 1;
}
#kq-static-chrome-top #kq-header-auth #auth-user-center-btn.header-login-btn.is-logged-in .header-login-indicator {
  width: 12px;
  height: 12px;
  opacity: 0.76;
}
#kq-static-chrome-top #kq-header-auth .auth-user-panel {
  margin: 0 10px 8px;
  padding: 12px 14px 11px;
  border: 1px solid #e4eefc;
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef5ff 100%);
}
#kq-static-chrome-top #kq-header-auth .auth-user-panel-name {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
  color: #0f4ea6;
  margin-bottom: 3px;
}
#kq-static-chrome-top #kq-header-auth .auth-user-panel-id {
  font-size: 12px;
  color: #6b83aa;
}
#kq-static-chrome-top #kq-header-auth .auth-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  padding: 10px 0 8px;
  border: 1px solid #ddeafb;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  z-index: 100002;
}
#kq-static-chrome-top #kq-header-auth .auth-user-menu.hidden {
  display: none;
}
#kq-static-chrome-top #kq-header-auth .auth-user-menu.is-open {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
#kq-static-chrome-top #kq-header-auth .auth-user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 20px);
  min-height: 42px;
  margin: 0 10px;
  padding: 0 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #21456f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  font-family: Microsoft YaHei, PingFang SC, sans-serif;
}
#kq-static-chrome-top #kq-header-auth .auth-user-menu-item > span:last-child {
  font-weight: 700;
  color: inherit;
  line-height: 1;
  letter-spacing: 0;
}
#kq-static-chrome-top #kq-header-auth .auth-user-menu-item:hover {
  background: #f4f8ff;
  color: #1f74ea;
}
#kq-static-chrome-top #kq-header-auth .auth-user-menu-item.danger {
  color: #21456f;
}
#kq-static-chrome-top #kq-header-auth .auth-user-menu-item.danger:hover {
  background: #f4f8ff;
  color: #1f74ea;
}
#kq-static-chrome-top #kq-header-auth .auth-user-menu-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: #eef5ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4d7fc2;
  flex: 0 0 auto;
}
#kq-static-chrome-top #kq-header-auth .auth-user-menu-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}
