/*
 * 会员中心 - 公共顶部导航
 * 主题色：#007bff
 * 类名前缀：jz-hd-
 */

/* ---------- 顶部条 ---------- */
header.jz-hd {
  position: sticky;
  top: 0;
  z-index: 900;
  height: 62px;
  margin-bottom: 22px;
  border-bottom: 1px solid #eef2f8;
  background: #fff;
  box-shadow: 0 2px 12px rgba(23, 58, 120, 0.07);
}
header.jz-hd .jz-hd-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  height: 62px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ---------- 左侧标识 ---------- */
header.jz-hd .jz-hd-logo {
  display: flex;
  align-items: center;
  height: 62px;
}
header.jz-hd .jz-hd-logo-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  color: #fff;
  font-size: 19px;
  border-radius: 10px;
  background: linear-gradient(135deg, #007bff, #3fa2ff);
  box-shadow: 0 6px 14px rgba(0, 123, 255, 0.28);
}
header.jz-hd .jz-hd-logo-txt {
  display: flex;
  align-items: center;
  color: #1a2b4b;
  font-size: 16px;
  font-weight: 700;
}
header.jz-hd .jz-hd-logo-txt em {
  height: 20px;
  margin-left: 8px;
  padding: 0 8px;
  color: #007bff;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  border-radius: 10px;
  background: #eaf3ff;
}

/* ---------- 右侧导航 ---------- */
header.jz-hd .user-login {
  display: flex;
  align-items: center;
  height: 62px;
}
header.jz-hd .user-login > li {
  position: relative;
  float: none;
  height: 62px;
  margin-left: 6px;
}
header.jz-hd .user-login > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 62px;
  padding: 0 10px;
  color: #4a5568;
  font-size: 13px;
  text-align: center;
}
header.jz-hd .user-login > li > a:hover {
  color: #007bff;
  background: none;
}
header.jz-hd .jz-hd-home > a i {
  margin-right: 4px;
  color: #9aa6bb;
  font-size: 16px;
}
header.jz-hd .jz-hd-home > a:hover i {
  color: #007bff;
}

/* 消息铃铛 */
header.jz-hd .user-message > a {
  position: relative;
  width: 38px;
  padding: 0;
}
header.jz-hd .user-message > a i {
  color: #6b7a90;
  font-size: 20px;
}
header.jz-hd .user-message > a:hover i {
  color: #007bff;
}
header.jz-hd .user-message > a span {
  position: absolute;
  top: 14px;
  right: 2px;
  height: 16px;
  min-width: 16px;
  padding: 0 4px;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  background: #f4523b;
  box-shadow: 0 0 0 2px #fff;
}

/* 头像 */
header.jz-hd .user-icon > a {
  width: auto;
  padding: 0 10px 0 6px;
  border-radius: 22px;
  transition: background 0.25s;
}
header.jz-hd .user-icon > a:hover {
  background: #f4f8ff;
}
header.jz-hd .user-icon > a img {
  width: 32px;
  height: 32px;
  margin: 0 8px 0 0;
  overflow: hidden;
  border-radius: 50%;
  background: #f0f3f8;
}
header.jz-hd .jz-hd-avatar-name {
  max-width: 120px;
  overflow: hidden;
  color: #242424;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
header.jz-hd .jz-hd-avatar-arrow {
  margin-left: 5px;
  color: #9aa6bb;
  font-size: 13px;
}

/* ---------- 下拉菜单 ---------- */
header.jz-hd .user-login li .user-menu {
  top: 62px;
  width: 320px;
  padding: 8px;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 14px 32px rgba(23, 58, 120, 0.16);
}
/* 复位 legacy 规则：user.css 里有 `header .user-login li span`
   （红底、绝对定位的消息角标样式），会被头部内所有后代 span 命中，
   导致头像昵称、下拉菜单里的等级文字被当成红色角标绝对定位，
   从而出现下拉菜单错乱 / 头像旁多出红块的问题 */
header.jz-hd .jz-hd-avatar-name,
header.jz-hd .jz-hd-menu-hd-txt span {
  position: static;
  right: auto;
  top: auto;
  height: auto;
  min-width: 0;
  line-height: inherit;
  padding: 0;
  border-radius: 0;
  background: none;
}
/* 点击展开（桌面端可直接点击头像，触屏设备无 hover 时也能用） */
header.jz-hd .user-login .user-icon.jz-open .user-menu {
  display: block;
}
header.jz-hd .user-menu li {
  float: none;
  height: auto;
  margin: 0;
}
header.jz-hd .jz-hd-menu-hd {
  display: flex;
  align-items: center;
  padding: 8px 10px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid #f0f3f8;
}
header.jz-hd .jz-hd-menu-hd img {
  width: 42px;
  height: 42px;
  margin-right: 10px;
  border-radius: 50%;
  background: #f0f3f8;
}
header.jz-hd .jz-hd-menu-hd-txt {
  flex: 1;
  min-width: 0;
}
header.jz-hd .jz-hd-menu-hd-txt b {
  display: block;
  overflow: hidden;
  color: #1a2b4b;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
header.jz-hd .jz-hd-menu-hd-txt span {
  display: block;
  margin-top: 2px;
  color: #98a2b3;
  font-size: 12px;
}
header.jz-hd .jz-hd-menu-edit {
  flex: none;
  height: 28px;
  padding: 0 12px;
  color: #007bff;
  font-size: 12px;
  line-height: 26px;
  text-align: center;
  border: 1px solid #cfe2fb;
  border-radius: 14px;
}
header.jz-hd .jz-hd-menu-edit:hover {
  color: #fff;
  border-color: #007bff;
  background: #007bff;
}
header.jz-hd .jz-hd-menu-grid {
  display: flex;
  flex-wrap: wrap;
}
header.jz-hd .jz-hd-menu-grid a {
  display: flex;
  align-items: center;
  width: 50%;
  height: 36px;
  padding: 0 10px;
  color: #4a5568;
  font-size: 13px;
  text-align: left;
  border-radius: 8px;
}
header.jz-hd .jz-hd-menu-grid a i {
  width: 20px;
  margin-right: 6px;
  color: #9aa6bb;
  font-size: 15px;
}
header.jz-hd .jz-hd-menu-grid a:hover {
  color: #007bff;
  background: #f4f8ff;
}
header.jz-hd .jz-hd-menu-grid a:hover i {
  color: #007bff;
}
header.jz-hd .jz-hd-menu-ft {
  display: flex;
  padding: 6px 0 0;
  margin-top: 6px;
  border-top: 1px solid #f0f3f8;
}
header.jz-hd .jz-hd-menu-btn {
  flex: 1;
  height: 34px;
  margin: 0 4px;
  color: #4a5568;
  font-size: 13px;
  line-height: 34px;
  text-align: center;
  border-radius: 8px;
  background: #f4f7fc;
}
header.jz-hd .jz-hd-menu-btn i {
  margin-right: 4px;
  font-size: 15px;
  vertical-align: -1px;
}
header.jz-hd .jz-hd-menu-btn:hover {
  color: #007bff;
  background: #eaf3ff;
}
header.jz-hd .jz-hd-menu-btn-out:hover {
  color: #fff;
  background: #007bff;
}

/* ---------- 自适应：平板 / 手机 ---------- */
@media screen and (max-width: 900px) {
  header.jz-hd .jz-hd-in {
    padding: 0 12px;
  }
}
@media screen and (max-width: 768px) {
  .user-message{ display: none;;}
  header.jz-hd {
    margin-bottom: 16px;
  }
  header.jz-hd .jz-hd-logo-txt {
    font-size: 15px;
  }
  header.jz-hd .jz-hd-logo-txt h4 {
    display: none;
  }
  header.jz-hd .jz-hd-avatar-name,
  header.jz-hd .jz-hd-avatar-arrow {
     
  }
  header.jz-hd .user-icon > a {
    padding: 0 6px;
  }
  header.jz-hd .user-icon > a img {
    margin-right: 0;
  }
  /* 点击展开（由 member.js 切换 jz-open） */
  header.jz-hd .user-login .user-icon:hover .user-menu {
    display: none;
  }
  header.jz-hd .user-login .user-icon.jz-open .user-menu {
    display: block;
    position: fixed;
    top: 62px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    border-radius: 0 0 14px 14px;
  }
}
@media screen and (max-width: 480px) {
  header.jz-hd {
    height: 56px;
  }
  header.jz-hd .jz-hd-in,
  header.jz-hd .jz-hd-logo,
  header.jz-hd .user-login,
  header.jz-hd .user-login > li,
  header.jz-hd .user-login > li > a {
    height: 56px;
  }
  header.jz-hd .jz-hd-logo-ic {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }
  header.jz-hd .user-login li .user-menu {
    top: 56px;
  }
  header.jz-hd .user-login .user-icon.jz-open .user-menu {
    top: 56px;
  }
  header.jz-hd .jz-hd-menu-grid a {
    width: 100%;
  }
  header.jz-hd .user-message > a span {
    top: 11px;
  }
}