/* 恒链 BI 顶部栏：使用柔和深蓝灰渐变，不改变原有入口与交互。 */
.system-bar {
  --hl-header-blue: #188fdf;
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 16px !important;
  gap: 10px !important;
  background: linear-gradient(100deg, #17263b 0%, #1d314a 100%) !important;
  border-bottom: 1px solid rgba(142, 174, 208, .14) !important;
  box-shadow: 0 2px 10px rgba(8, 18, 32, .16) !important;
}

/* 原 React 竖线及历史残留分隔符全部隐藏。 */
.system-bar .divider,
.system-bar .hl-shell-old-header-slot-hidden {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle {
  order: -2 !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px !important;
  margin: 0 2px 0 0 !important;
  padding: 0 !important;
  color: #dce8f6 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease !important;
}

/* 覆盖历史展开/收起规则中的负边距，三横线始终完整留在视口内。 */
body:not(.hl-shell-sidebar-collapsed) #hl-shell-sidebar-toggle.hl-shell-sidebar-toggle,
body.hl-shell-sidebar-collapsed #hl-shell-sidebar-toggle.hl-shell-sidebar-toggle {
  margin: 0 2px 0 0 !important;
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
  border-color: rgba(255, 255, 255, .08) !important;
}

#hl-shell-sidebar-toggle.hl-shell-sidebar-toggle:focus-visible {
  outline: 2px solid rgba(61, 169, 239, .72) !important;
  outline-offset: 1px !important;
}

#hl-shell-sidebar-toggle .hl-shell-toggle-icon,
#hl-shell-sidebar-toggle .hl-shell-toggle-icon svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
}

#hl-shell-sidebar-brand.hl-shell-sidebar-brand {
  order: -3 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  align-self: center !important;
  gap: 9px !important;
  width: auto !important;
  min-width: 132px !important;
  max-width: none !important;
  height: 40px !important;
  flex: 0 0 auto !important;
  margin: 0 8px 0 0 !important;
  padding: 0 !important;
  color: #fff !important;
  white-space: nowrap !important;
}

/* 收起左侧菜单后只显示品牌标识，隐藏品牌文字。 */
body.hl-shell-sidebar-collapsed #hl-shell-sidebar-brand.hl-shell-sidebar-brand {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  flex: 0 0 40px !important;
  margin-right: 2px !important;
  justify-content: center !important;
}

body.hl-shell-sidebar-collapsed #hl-shell-sidebar-brand .hl-shell-sidebar-brand-text {
  display: none !important;
}

#hl-shell-sidebar-brand .hl-shell-sidebar-brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  min-width: 29px;
  height: 29px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #27aaf2 0%, #148fdf 48%, #0875c6 100%);
  box-shadow: 0 4px 12px rgba(9, 119, 199, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.25px;
}

#hl-shell-sidebar-brand .hl-shell-sidebar-brand-mark::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: #35c58b;
}

#hl-shell-sidebar-brand .hl-shell-sidebar-brand-text {
  display: inline-block !important;
  color: #f8fbff !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: .3px !important;
}

.system-bar .store-switch {
  height: 32px !important;
  min-width: 144px !important;
  padding: 0 11px !important;
  justify-content: center !important;
  color: #e5eef8 !important;
  background: rgba(255, 255, 255, .055) !important;
  border: 1px solid rgba(179, 204, 230, .17) !important;
  border-radius: 5px !important;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease !important;
}

.system-bar .store-switch:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .09) !important;
  border-color: rgba(95, 177, 232, .42) !important;
}

.system-bar .top-links {
  gap: 3px !important;
}

.system-bar .top-links > button {
  min-height: 32px !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  color: #c9d7e7 !important;
  transition: color .15s ease, background-color .15s ease !important;
}

.system-bar .top-links > button:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .07) !important;
}

.system-bar .top-links > .signed-user {
  color: #62baf0 !important;
  font-weight: 600 !important;
}

.system-bar .top-links > .sign-out-button {
  margin-left: 4px !important;
  padding-left: 10px !important;
  border-left: 0 !important;
  color: #d7e1ed !important;
}

@media (max-width: 760px) {
  .system-bar {
    padding: 0 9px !important;
    gap: 7px !important;
  }

  #hl-shell-sidebar-brand.hl-shell-sidebar-brand {
    min-width: 29px !important;
    margin-right: 2px !important;
  }

  #hl-shell-sidebar-brand .hl-shell-sidebar-brand-text {
    display: none !important;
  }

  .system-bar .store-switch {
    margin-left: 0 !important;
    min-width: 120px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hl-shell-sidebar-toggle.hl-shell-sidebar-toggle,
  .system-bar .store-switch,
  .system-bar .top-links > button {
    transition: none !important;
  }
}
