/* 原生顶栏 + fallback + 强制顶栏 + 交互层（build:20260705） */
#crm-header-bar {
  display: none !important;
}

html.crm-native-header-ready #crm-top-bar {
  display: none !important;
}

#crm-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: #fff;
  border-bottom: 1px solid #ebebf2;
  z-index: 10040;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

#crm-top-bar .crm-top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 50px;
  padding: 0 20px;
  gap: 16px;
  font-size: 14px;
  color: #303133;
}

#crm-top-bar .crm-top-email {
  font-weight: 700;
}

#crm-top-bar .crm-top-logout {
  color: #409eff;
  text-decoration: none;
  cursor: pointer;
}

#crm-top-bar .crm-top-lang {
  position: relative;
}

#crm-top-bar .crm-top-lang-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: #606266;
}

#crm-top-bar .crm-top-lang-drop {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  min-width: 130px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  z-index: 10050;
}

#crm-top-bar .crm-top-lang-drop.open {
  display: block;
}

#crm-top-bar .crm-top-lang-drop li {
  padding: 8px 16px;
  cursor: pointer;
}

#crm-top-bar .crm-top-lang-drop li:hover {
  background: #f5f7fa;
}

.app-wrapper .nav-container .inner-nav .navbar-inner,
.navbar-inner.clearfix {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1000 !important;
}

.navbar-inner .logo-col {
  float: none !important;
  flex: 0 0 auto !important;
}

.navbar-inner .nav-col {
  float: none !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: visible !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.navbar-inner .nav-col > * {
  pointer-events: auto !important;
}

.navbar-inner .user-col {
  float: none !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
  min-width: 280px !important;
  position: relative !important;
  z-index: 200 !important;
  pointer-events: auto !important;
}

html.crm-header-interactive .navbar-inner .user-col,
html.crm-use-force-header .navbar-inner .user-col {
  pointer-events: auto !important;
}

html.crm-use-force-header .navbar-inner .user-col {
  visibility: hidden !important;
}

.app-wrapper .nav-container,
.app-wrapper .nav-container .inner-nav {
  display: block !important;
  visibility: visible !important;
  min-height: 50px !important;
  overflow: visible !important;
}

.navbar-inner {
  overflow: visible !important;
}

.navbar-inner .user-col {
  float: right;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
}

.navbar-inner .user-col .user-inner {
  display: flex;
  align-items: center;
  height: 50px;
}

.navbar-inner .user-col .notice,
.navbar-inner .user-col .uername,
.navbar-inner .user-col .avatar,
.navbar-inner .user-col .lang,
.navbar-inner .user-col .el-dropdown {
  pointer-events: auto !important;
}

.navbar-inner .user-col .notice a,
.navbar-inner .user-col .avatar a,
.navbar-inner .user-col .crm-shell-logout {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.navbar-inner .user-col .uername {
  font-weight: 700;
  padding-left: 15px;
  border-left: 1px solid #ebebf2;
}

.navbar-inner .user-col .avatar img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.navbar-inner .user-col .lang {
  position: relative;
  cursor: pointer;
  margin-left: 15px;
  white-space: nowrap;
}

.navbar-inner .user-col .crm-lang-caret {
  margin-left: 4px;
  font-size: 12px;
}

.navbar-inner .user-col .crm-lang-drop {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  list-style: none;
  margin: 4px 0 0;
  padding: 4px 0;
  min-width: 130px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  z-index: 10050;
}

.navbar-inner .user-col .crm-lang-drop.open {
  display: block;
}

.navbar-inner .user-col .crm-lang-drop li {
  padding: 8px 16px;
  cursor: pointer;
}

.navbar-inner .user-col .crm-lang-drop li:hover {
  background: #f5f7fa;
}

html:not(.crm-verify-route) #crm-verify-skeleton {
  display: none !important;
}

.navbar-inner .user-col .lang .el-dropdown-link {
  cursor: pointer;
  color: #606266;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

.navbar-inner .user-col .uername .el-dropdown-link {
  cursor: pointer;
  color: #303133;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
}

.navbar-inner .user-col .crm-user-drop-menu,
.navbar-inner .user-col .crm-lang-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 130px;
  z-index: 10050;
}

.navbar-inner .user-col .crm-user-drop-menu.is-open,
.navbar-inner .user-col .crm-lang-drop-menu.is-open,
.navbar-inner .user-col .crm-user-drop-menu.open,
.navbar-inner .user-col .crm-lang-drop-menu.open {
  display: block !important;
  pointer-events: auto !important;
}

.navbar-inner .user-col .uername,
.navbar-inner .user-col .lang {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-inner .user-col .lang .crm-shell-global-icon,
.navbar-inner .user-col .lang > img {
  width: 18px;
  height: 18px;
  margin-right: 6px;
}

.navbar-inner .user-col .notice img {
  width: 20px;
  height: 20px;
  display: block;
}

.navbar-inner .user-col .notice .el-icon-bell {
  font-size: 18px;
  color: #606266;
}

.navbar-inner .user-col .notice a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.el-dropdown-menu.el-popper {
  z-index: 10050 !important;
}

/* 强制顶栏 — 原生 user-col 不可见时显示 */
#crm-header-force {
  position: fixed;
  top: 0;
  right: 0;
  height: 50px;
  z-index: 99990;
  display: none;
  align-items: center;
  pointer-events: auto !important;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.04);
}

html.crm-use-force-header #crm-header-force {
  display: flex !important;
  pointer-events: auto !important;
}

#crm-header-force * {
  pointer-events: auto !important;
}

#crm-header-force .crm-force-inner {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 18px 0 8px;
  gap: 14px;
}

#crm-header-force .crm-force-notice a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

#crm-header-force .crm-force-notice img {
  width: 20px;
  height: 20px;
}

#crm-header-force .crm-force-user,
#crm-header-force .crm-force-lang {
  position: relative;
}

#crm-header-force .crm-force-user-btn,
#crm-header-force .crm-force-lang-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: #303133;
  display: inline-flex;
  align-items: center;
  padding: 0;
  white-space: nowrap;
}

#crm-header-force .crm-force-lang-btn {
  font-weight: 400;
  font-size: 14px;
  color: #606266;
}

#crm-header-force .crm-force-user {
  padding-left: 14px;
  border-left: 1px solid #ebebf2;
}

#crm-header-force .crm-force-lang {
  padding-left: 14px;
  border-left: 1px solid #ebebf2;
  display: flex;
  align-items: center;
  gap: 6px;
}

#crm-header-force .crm-force-global-icon {
  width: 18px;
  height: 18px;
}

#crm-header-force .crm-force-avatar a {
  display: flex;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
}

#crm-header-force .crm-force-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#crm-header-force .crm-force-user-menu,
#crm-header-force .crm-force-lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 140px;
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 100000;
}

#crm-header-force .crm-force-user-menu.open,
#crm-header-force .crm-force-lang-menu.open {
  display: block;
}

#crm-header-force .crm-force-user-menu li,
#crm-header-force .crm-force-lang-menu li {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  color: #606266;
}

#crm-header-force .crm-force-user-menu li:hover,
#crm-header-force .crm-force-lang-menu li:hover {
  background: #f5f7fa;
}

#crm-header-force .crm-force-logout {
  color: #409eff;
}

.navbar-inner .user-col {
  position: relative;
  z-index: 50;
}
