/* 顶部导航 — 主题样式（依赖 theme-vars.css） */
@import url("/web/my2/css/theme/theme-vars.css");

:root {
  --top-accent: var(--theme-accent);
  --top-accent-dark: var(--theme-accent-dark);
  --top-accent-soft: var(--theme-accent-light-bg);
  --top-text: var(--theme-ink);
  --top-muted: var(--theme-muted);
  --top-border: #e2e8f0;
  --top-bg: #ffffff;
  --top-height: 50px;
}

/* ===== 顶栏容器 ===== */
.el-header.top-menu-modern {
  height: var(--top-height) !important;
  min-height: var(--top-height) !important;
  padding: 0 20px !important;
  background: var(--top-bg) !important;
  border-bottom: 1px solid var(--top-border);
  box-shadow: 0 1px 0 rgba(30, 27, 75, 0.04), 0 4px 16px rgba(30, 27, 75, 0.04) !important;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  z-index: 1200;
}

.userinfo-template .el-header.top-menu-modern {
  width: 100vw !important;
  left: 0;
  right: 0;
  top: 0;
  position: fixed !important;
}

.el-aside + .el-container .el-header.top-menu-modern {
  width: calc(100% - 192px);
  transition: width 0.32s ease;
}

.top-menu-modern .top-menu-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--top-height);
}

/* ===== 左侧 ===== */
.top-menu-modern .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.top-menu-modern .header-logo-link {
  margin-right: 4px;
}

.top-menu-modern .header-logo {
  height: 26px;
  max-width: 120px;
}

.top-menu-modern .top-menu-home-link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  margin-left: 4px;
  border-left: 1px solid var(--top-border);
  color: var(--top-muted) !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  border-radius: 8px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.top-menu-modern .top-menu-home-link:hover {
  color: var(--top-accent) !important;
  background: var(--top-accent-soft);
}

.top-menu-modern .menu-img {
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.75;
}

/* ===== 右侧操作区 ===== */
.top-menu-modern .header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 0;
}

.top-menu-modern .header-right-item {
  height: auto !important;
  padding: 0 !important;
}

.top-menu-modern .header-right .car-item {
  margin-right: 0;
}

.top-menu-modern .header-action-btn,
.top-menu-modern .right-item {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px;
  color: var(--top-muted) !important;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.top-menu-modern .header-action-btn:hover,
.top-menu-modern .right-item:hover:not(.head-box) {
  background: var(--top-accent-soft);
  color: var(--top-accent) !important;
}

.top-menu-modern .right-item .item {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px !important;
  color: inherit !important;
}

.top-menu-modern .topMenuIcon {
  width: 17px !important;
  height: 17px !important;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(42%) sepia(12%) saturate(700%) hue-rotate(201deg) brightness(94%) contrast(88%);
  transition: filter 0.2s;
}

.top-menu-modern .header-action-btn:hover .topMenuIcon,
.top-menu-modern .right-item:hover .topMenuIcon,
.top-menu-modern .el-dropdown:hover .topMenuIcon {
  filter: brightness(0) saturate(100%) invert(36%) sepia(85%) saturate(2500%) hue-rotate(230deg) brightness(100%) contrast(101%);
}

.top-menu-modern .header-right .car-item .el-badge .el-badge__content.is-fixed {
  top: 2px;
  right: 4px;
  background-color: var(--top-accent) !important;
  border: 2px solid #fff;
}

.top-menu-modern .el-dropdown,
.top-menu-modern .el-dropdown-country {
  height: auto !important;
  padding: 0 !important;
}

.top-menu-modern .header-right-item .el-dropdown-country {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px !important;
  border-radius: 10px;
  color: var(--top-muted) !important;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.top-menu-modern .header-right-item .el-dropdown-country.el-dropdown-country-circle {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  overflow: hidden;
  border: 1px solid var(--top-border);
  background: #fff;
  box-sizing: border-box;
}

.top-menu-modern .header-right-item .el-dropdown-country:hover {
  background: var(--top-accent-soft);
  color: var(--top-accent) !important;
}

.top-menu-modern .header-right-item .el-dropdown-country.el-dropdown-country-circle:hover {
  border-color: var(--theme-accent-light);
  box-shadow: 0 2px 8px rgba(var(--theme-accent-rgb), 0.2);
}

.top-menu-modern .header-right-item .el-dropdown-country .topMenuIcon {
  filter: none;
  border-radius: 2px;
}

.top-menu-modern .header-right-item .el-dropdown-country .lang-flag-icon {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.top-menu-modern .header-right-item .el-dropdown-country .lang-label {
  display: none;
}

.top-menu-modern .header-right-item .un-login {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 10px;
  color: var(--top-accent) !important;
  font-size: 13px;
  font-weight: 600;
  background: var(--top-accent-soft);
}

.top-menu-modern .header-right-item .un-login:hover {
  background: var(--top-accent);
  color: #fff !important;
}

.top-menu-modern .header-right-item .un-login:hover .topMenuIcon {
  filter: brightness(0) invert(1);
}

.top-menu-modern .header-right-item .el-dropdown-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
}

.top-menu-modern .header-right-item .el-dropdown-header .head-box,
.top-menu-modern .header-right-item .el-dropdown-header .head-box.right-item {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 32px !important;
  text-align: center;
  background: var(--theme-gradient) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(var(--theme-accent-rgb), 0.35);
  box-sizing: border-box;
}

.top-menu-modern .header-right-item .el-dropdown-header .head-box:hover,
.top-menu-modern .header-right-item .el-dropdown-header .head-box.right-item:hover {
  background: var(--theme-gradient) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(var(--theme-accent-rgb), 0.45);
}

/* ===== 消息弹层 ===== */
.top-menu-modern + .el-popover,
.top-msg-box .msg-top .msg-top-right {
  color: var(--top-accent) !important;
}

.top-msg-box .msg-list .msg-item:hover {
  background: var(--top-accent-soft) !important;
}

/* ===== 移动端抽屉菜单 ===== */
.drawer-menu.top-menu-drawer,
.el-drawer.drawer-menu {
  background: #fff !important;
}

.drawer-menu .drawer-menu-top {
  height: 50px;
  border-bottom: 1px solid var(--top-border);
  background: #fff;
}

.drawer-menu .drawer-menu-list-top {
  padding: 12px 16px;
}

.drawer-menu .menu-top .el-menu-item,
.drawer-menu .menu-top .el-submenu__title {
  border-radius: 10px !important;
  color: var(--top-muted) !important;
}

.drawer-menu .menu-top .el-menu-item.is-active,
.drawer-menu .menu-top .el-submenu.is-active > .el-submenu__title {
  background: var(--top-accent) !important;
  color: #fff !important;
}

.drawer-menu .menu-top .el-menu-item.is-active i,
.drawer-menu .menu-top .el-submenu.is-active > .el-submenu__title i,
.drawer-menu .menu-top .el-menu-item.is-active .aside-menu-text {
  color: #fff !important;
}

.drawer-menu .line {
  border-top: 1px solid var(--top-border);
  margin: 12px 0;
}

@media screen and (max-width: 768px) {
  .top-menu-modern {
    padding: 0 12px !important;
  }

  .top-menu-modern .showText {
    display: none;
  }

  .top-menu-modern .top-menu-home-link {
    border-left: none;
    padding: 0 8px;
  }
}
