/* ===== 会员中心顶栏：按融合稿改（文字标签 + 数字胶囊 + 圆形头像 + 用户名）2026-10-15 =====
   效果稿里的顶栏是「购物车 1 ｜ 🇨🇳 中国站 ▾ ｜ 待办 0 ｜ ○ ojtest ▾」，
   线上原来是「图标 ｜ 国旗 ▾ ｜ ○首字母 ▾」——没有任何文字。
   这里给购物车/站点补上文字标签、把数字做成胶囊、头像改成圆形、
   账号后面补上用户名（用户名那一段在 topMenu.js 里加了一个 span）。
   只作用在 PC（>750px）；手机端仍是原来的图标版（标签隐藏）。
   位置：footer.php 引用；选择器都限定在 .el-header .header-right 下。
*/
@media screen and (min-width: 751px) {
  /* ---------- 每一项都变成 inline-flex，给标签/胶囊留位置 ---------- */
  html body .el-header .header-right > .header-right-item {
    display: inline-flex;
    align-items: center;
  }
  /* 顺序：购物车 → 中国站 → 待办（站点没开消息中心时这一项不渲染）→ 分隔线 → 账号 */
  html body .el-header .header-right > .car-item:nth-child(1) {
    order: 1;
  }
  html body .el-header .header-right > .hg-24 {
    order: 2;
  }
  html body .el-header .header-right > .car-item:nth-child(2) {
    order: 3;
  }
  html body .el-header .header-right > .cloum-line-item {
    order: 4;
  }
  html body .el-header .header-right > .header-right-item:has(.el-dropdown-header) {
    order: 5;
  }

  /* ---------- 文字标签（购物车 / 中国站） ---------- */
  html body .el-header .header-right .k8-top-label {
    font-size: 13px;
    line-height: 1;
    color: #3d4453;
    white-space: nowrap;
  }

  /* ---------- 购物车：图标收起来，只留「购物车 + 数字」 ---------- */
  html body .el-header .header-right .car-item .right-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  html body .el-header .header-right .car-item .el-badge {
    display: inline-flex;
    align-items: center;
    height: auto;
  }
  html body .el-header .header-right .car-item .el-badge img {
    display: none;
  }
  html body .el-header .header-right .car-item .el-badge .el-badge__content.is-fixed {
    position: static;
    transform: none;
    top: auto;
    right: auto;
    box-sizing: border-box;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 0;
    border-radius: 9px;
    background-color: var(--color-danger);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }

  /* ---------- 站点：国旗 + 中国站 + 箭头 ---------- */
  html body .el-header .header-right .hg-24 .el-dropdown-country {
    gap: 7px;
  }
  html body .el-header .header-right .hg-24 .el-dropdown-country img {
    width: 17px;
    height: 12px;
    border-radius: 2px;
  }
  html body .el-header .header-right .hg-24 .el-dropdown-country .right-icon {
    order: 3;
    width: 7px;
  }

  /* ---------- 账号：圆形头像 + 用户名 + 箭头 ---------- */
  html body .el-header .header-right .header-right-item .el-dropdown-header {
    gap: 8px;
  }
  html body .el-header .header-right .header-right-item .el-dropdown-header .head-box {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8f0ff !important; /* 覆盖组件里随机给的方块底色 */
    color: #1a56db;
    font-size: 13px;
    font-weight: 500;
  }
  html body .el-header .header-right .header-right-item .el-dropdown-header .k8-top-name {
    font-size: 13.5px;
    line-height: 1;
    color: #1f2430;
    white-space: nowrap;
  }

  /* ---------- 分隔线：效果稿里是 1px × 14px 的细线 ---------- */
  html body .el-header .header-right .cloum-line-item {
    margin-left: 14px;
    margin-right: 14px;
  }
  html body .el-header .header-right .header-right-item .cloum-line {
    width: 1px;
    height: 14px;
    border: 0;
    background: #eaedf4;
  }
  html body .el-header .header-right .car-item {
    margin-right: 0;
  }
  html body .el-header .header-right > .hg-24 {
    margin-right: 0;
  }
  /* 项与项之间：一条竖线（效果稿每两项之间都有） */
  html body .el-header .header-right > .car-item:nth-child(1)::after,
  html body .el-header .header-right > .hg-24::after {
    content: "";
    width: 1px;
    height: 14px;
    margin-left: 14px;
    background: #eaedf4;
  }
}

/* 手机端（≤750）：顶栏还是原来的图标版，文字标签/用户名不显示
   （topMenu.js 里那两个 span 是常驻的，这里只是不展示） */
@media screen and (max-width: 750px) {
  html body .el-header .header-right .k8-top-label,
  html body .el-header .header-right .k8-top-name {
    display: none;
  }
}

/* ===== 账号浮层（点右上角头像/用户名弹出来的那块）=====
   效果稿里的「融合面板」：账号 / 权限与安全 / 费用与成本 / 待办数字 / 常用工具
   数据：/index（余额、本月消费、待支付、待续费）+ /ticket（待办工单）+ 站内信（未读消息） */
.k8-acc-pop.el-popover {
  padding: 0;
  border: 1px solid #e9edf5;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}
.k8-acc-pop .popper__arrow {
  display: none;
}
.k8-acc {
  width: 340px;
  box-sizing: border-box;
  padding: 14px 16px 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #3d4453;
  text-align: left;
}
.k8-acc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.k8-acc-head .t {
  font-size: 14.5px;
  color: #1f2430;
}
.k8-acc-head .t a {
  color: #1f2430;
}
.k8-acc-head .t i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 5px;
  border-top: 1.5px solid #a7aebb;
  border-right: 1.5px solid #a7aebb;
  transform: rotate(45deg);
  vertical-align: middle;
}
.k8-acc-head .right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.k8-acc-head .level {
  color: #1a56db;
  cursor: pointer;
}
.k8-acc-head .quit {
  height: 28px;
  line-height: 26px;
  padding: 0 12px;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
  background: #fff;
  color: #3d4453;
  font-size: 12.5px;
  cursor: pointer;
}
.k8-acc-head .quit:hover {
  border-color: #1a56db;
  color: #1a56db;
}
.k8-acc-me {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eaedf4;
}
.k8-acc-me .avatar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8f0ff;
  color: #1a56db;
  font-size: 15px;
  font-weight: 500;
}
.k8-acc-me .name {
  font-size: 14px;
  color: #1f2430;
}
.k8-acc-me .id {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 12px;
  color: #8b93a3;
}
.k8-acc-chip {
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11.5px;
  line-height: 17px;
  background: #eef4ff;
  color: #1a56db;
}
.k8-acc-chip.is-warn {
  background: #fff4e6;
  color: #e08600;
}
.k8-acc-chip.is-ok {
  background: #e9f8f1;
  color: #1a9e66;
}
.k8-acc-sec {
  padding: 12px 0;
  border-bottom: 1px solid #eaedf4;
}
.k8-acc-sec:last-child {
  border-bottom: 0;
}
.k8-acc-sec-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: #8b93a3;
}
.k8-acc-sec-head i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-top: 1.5px solid #a7aebb;
  border-right: 1.5px solid #a7aebb;
  transform: rotate(45deg);
}
.k8-acc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}
.k8-acc-links a {
  color: #1a56db;
  font-size: 13px;
}
.k8-acc-fee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}
.k8-acc-fee .lb {
  color: #8b93a3;
}
.k8-acc-fee .num {
  flex: 1 1 auto;
  text-align: right;
  font-size: 14.5px;
  font-weight: 500;
  color: #1f2430;
}
.k8-acc-fee .btn {
  flex: 0 0 auto;
  height: 26px;
  line-height: 24px;
  padding: 0 10px;
  border: 1px solid #1a56db;
  border-radius: 6px;
  background: #1a56db;
  color: #fff;
  font-size: 12.5px;
}
.k8-acc-fee .btn.is-plain {
  background: #fff;
  color: #1a56db;
}
.k8-acc-todo {
  display: flex;
  align-items: flex-start;
}
.k8-acc-todo .item {
  flex: 1 1 0;
  margin: -4px 2px;
  padding: 4px 2px;
  border-radius: 7px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.18s ease;
}
.k8-acc-todo .item:hover,
.k8-acc-todo .item:focus-visible {
  background: #f5f8ff;
  outline: none;
}
.k8-acc-todo .item:hover .num,
.k8-acc-todo .item:focus-visible .num {
  color: #1a56db;
}
.k8-acc-todo .item.is-hot:hover .num,
.k8-acc-todo .item.is-hot:focus-visible .num {
  color: #e08600;
}
.k8-acc-todo .item .num {
  font-size: 16px;
  font-weight: 500;
  color: #1f2430;
  line-height: 1.3;
}
.k8-acc-todo .item.is-hot .num {
  color: #f99600;
}
.k8-acc-todo .item .lb {
  font-size: 12px;
  color: #8b93a3;
}
