/*
 * 品牌区 + 站点切换浮层
 * 结构与交互同 lmgw_vue 门户 AppHeader 的 .hd-brand / .acs 面板，
 * 与 WordPress 主题 mirage 保持同一套标记与数据口径。
 */

/* 浮层相对头部容器定位 */
#hd .wp { position: relative; }

/* 品牌区：标识 + 名称 + 当前站点胶囊 + 副标 */
#hd .logo.hd-brand {
  float: left;
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  height: 65px;
  line-height: normal;
  margin-right: 24px;
  text-decoration: none;
  user-select: none;
}
.hd-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #c91d39, rgba(201, 29, 57, 0.8));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}
.hd-brandtext {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.hd-brandrow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hd-brandtext b {
  color: #233b5c;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
}
.hd-slogan {
  color: #8a94a6;
  font-size: 10px;
  letter-spacing: 2px;
  white-space: nowrap;
}
.hd-branch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(201, 29, 57, 0.06);
  border: 1px solid rgba(201, 29, 57, 0.28);
  color: #c91d39;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}
.hd-branch:hover,
.hd-branch.open {
  background: rgba(201, 29, 57, 0.12);
  border-color: rgba(201, 29, 57, 0.55);
}
.hd-branch svg { flex-shrink: 0; }
.hd-branch .hd-branch-pin { width: 11px; height: 11px; }
.hd-branch .hd-caret { width: 9px; height: 9px; opacity: 0.75; }

/* 品牌区变宽后，搜索区按剩余宽度自适应（lib.css 里 .hdr 固定 75%） */
#hd .hdr { width: calc(100% - 300px); }

/* 站点切换浮层：与门户 .center-pop / .acs 面板完全同构（宽 900px） */
.hd-center-pop {
  position: absolute;
  top: 68px;
  left: 24px;
  width: 900px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  box-shadow: 0 12px 32px 4px rgba(0, 0, 0, 0.04), 0 8px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 120;
  font-size: 13px;
  line-height: normal;
}
.hd-center-pop[hidden] { display: none; }

/* 当前站点 */
.acs-now {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background: #233b5c;
  color: #fff;
}
.acs-now-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.acs-now-lv {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 16px;
  padding: 0 6px;
  border-radius: 4px;
  color: #e7c67c;
  background: rgba(215, 170, 66, 0.2);
  border: 1px solid rgba(215, 170, 66, 0.45);
}
/* 当前站点行里的区划搜索：高度收窄，按钮用主题红，暗底上更清楚 */
.acs-now .acs-search {
  margin-left: auto;
  flex-shrink: 0;
}
.acs-now .acs-input {
  width: 220px;
  height: 28px;
  font-size: 12px;
}
.acs-now .acs-btn {
  height: 28px;
  padding: 0 14px;
  font-size: 12px;
  background: #c91d39;
}
.acs-now .acs-btn:hover { background: #b3162f; }

/* 区划标签行 */
.acs-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0 8px;
  border-bottom: 1px solid #e8ecf2;
  overflow-x: auto;
}
.acs-tab {
  position: relative;
  padding: 10px 14px 8px;
  font-size: 13px;
  color: #4a5568;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.acs-tab:hover { color: #c91d39; }
.acs-tab.on {
  color: #c91d39;
  font-weight: 600;
  border-bottom-color: #c91d39;
}
.acs-tab-hint {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  color: #c91d39;
  opacity: 0.75;
}
/* 标签上的创服中心数量（有搜索时即命中数） */
.acs-tab-num {
  display: inline-block;
  min-width: 16px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 8px;
  background: #eef1f6;
  color: #6b7688;
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
  vertical-align: 1px;
}
.acs-tab.on .acs-tab-num {
  background: rgba(201, 29, 57, 0.1);
  color: #c91d39;
}
.acs-tab-num.zero { opacity: 0.5; }
.acs-title-hint {
  margin-left: auto;
  font-size: 12px;
  color: #8a94a6;
}
.acs-tree-empty {
  padding: 40px 8px;
  text-align: center;
}

/* 内容区 */
.acs-body { padding: 14px 16px 16px; }
.acs-body-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.acs-body-title {
  font-size: 14px;
  font-weight: 600;
  color: #233b5c;
  padding-left: 8px;
  border-left: 3px solid #c91d39;
  line-height: 16px;
}
.acs-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.acs-input {
  width: 240px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #dbe1ea;
  border-radius: 4px;
  font-size: 13px;
  color: #33415c;
  outline: none;
  box-sizing: border-box;
  background: #fff;
}
.acs-input::placeholder { color: #a8b0bd; }
.acs-input:focus { border-color: #c91d39; }
.acs-btn {
  height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: 4px;
  background: #233b5c;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
  box-sizing: border-box;
}
.acs-btn:hover { background: #2f5078; }

/* 省级视图：头部 + 左侧区划树 + 右侧所选区划中心 */
.acs-prov { padding: 12px 16px 16px; }
.acs-prov-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.acs-prov-body {
  display: flex;
  gap: 14px;
  height: 260px;
}
.acs-tree {
  width: 240px;
  flex-shrink: 0;
  padding: 6px 4px;
  border: 1px solid #e8ecf2;
  border-radius: 6px;
  overflow-y: auto;
}
/* 自绘区划树行（替代 Element Plus el-tree 的节点行） */
.acs-tree-row {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 26px;
  padding-right: 6px;
  border-radius: 4px;
  cursor: pointer;
}
.acs-tree-row:hover { background: #f4f7fb; }
.acs-tree-caret {
  flex-shrink: 0;
  width: 14px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.acs-tree-caret::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #9aa4b2;
  transition: transform 0.15s;
}
.acs-tree-caret.empty::before { visibility: hidden; }
.acs-tree-caret.collapsed::before { transform: rotate(-90deg); }
.acs-tree-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #33415c;
}
.acs-tree-node.on .acs-tree-name {
  color: #c91d39;
  font-weight: 600;
}
.acs-tree-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acs-tree-lv {
  font-size: 11px;
  line-height: 16px;
  padding: 0 5px;
  border-radius: 4px;
  color: #8a94a6;
  background: rgba(35, 59, 92, 0.06);
}
/* 右侧详情：当前所选区划的创服中心 */
.acs-detail {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e8ecf2;
  border-radius: 6px;
  overflow-y: auto;
}
.acs-detail-label {
  font-size: 12px;
  color: #8a94a6;
  margin-bottom: 10px;
}
.acs-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid #e8ecf2;
  border-radius: 6px;
  background: #f9fbfd;
  color: #33415c;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.acs-card:hover {
  border-color: rgba(201, 29, 57, 0.45);
  background: #fff;
}
.acs-card.on {
  border-color: rgba(201, 29, 57, 0.5);
  background: rgba(201, 29, 57, 0.04);
}
.acs-pin {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  color: #c9a24a;
}
.acs-card-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acs-region {
  flex-shrink: 0;
  font-size: 12px;
  color: #9aa4b2;
}
.acs-tag {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 16px;
  padding: 0 6px;
  border-radius: 4px;
  color: #c91d39;
  background: rgba(201, 29, 57, 0.1);
}
.acs-card-state {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  color: #233b5c;
}
.acs-card.on .acs-card-state { color: #c91d39; }
.acs-empty {
  padding: 40px 0;
  text-align: center;
  color: #9aa3b2;
}

/* 窄屏：品牌区收窄，浮层贴边 */
@media only screen and (max-width: 1199px) {
  #hd .hdr { width: calc(100% - 280px); }
}
@media only screen and (max-width: 1040px) {
  #hd .logo.hd-brand {
    height: 60px;
    margin-left: 10px;
    margin-right: 0;
  }
  #hd .hdr { width: auto; }
  .hd-slogan { display: none; }
  .hd-brandtext b { font-size: 15px; }
  .hd-center-pop {
    left: 10px;
    top: 62px;
    width: calc(100vw - 20px);
  }
}

/* ===== 门户页头（结构对齐 lmgw_vue AppHeader：品牌 + 导航 + 右侧用户）===== */
#hd {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #233b5c;
  color: #fff;
  padding: 0;
  box-shadow: 0 2px 10px rgba(20, 40, 80, 0.14);
}
#hd .wp {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
#hd .logo.hd-brand { float: none; height: 64px; margin-right: 0; }
#hd .hd-main-inner { display: flex; align-items: center; gap: 20px; height: 64px; }

/* 页头搜索：分类下拉 + 输入框 + 红色搜索按钮 */
#hd .hd-search {
  display: flex;
  align-items: center;
  flex: 0 1 288px;
  height: 34px;
  padding: 0 0 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  overflow: hidden;
}
#hd .hd-search-sel {
  flex-shrink: 0;
  height: 100%;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}
#hd .hd-search-sel option { color: #233b5c; }
#hd .hd-search-inp {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  outline: none;
  box-shadow: none;
}
#hd .hd-search-inp::placeholder { color: rgba(255, 255, 255, 0.5); }
#hd .hd-search-btn {
  flex-shrink: 0;
  height: 100%;
  padding: 0 18px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: #c91d39;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s;
}
#hd .hd-search-btn:hover { background: #e0354f; }
#hd .hd-brandtext b { color: #fff; }
#hd .hd-slogan { color: rgba(255, 255, 255, 0.6); }
#hd .hd-branch {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
#hd .hd-branch:hover,
#hd .hd-branch.open {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.6);
}
.hd-nav { display: flex; align-items: center; flex: 1; min-width: 0; }
.hd-navitem {
  display: inline-block;
  padding: 0 16px;
  line-height: 64px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.hd-navitem:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.hd-navitem.hd-active { color: #fff; font-weight: 600; box-shadow: inset 0 -2px 0 #c91d39; }
.hd-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.hd-msg { color: rgba(255, 255, 255, 0.85); display: inline-flex; }
.hd-msg svg { width: 19px; height: 19px; }
.hd-msg:hover { color: #fff; }
.hd-login,
.hd-reg {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 30px;
  padding: 0 14px;
  border-radius: 6px;
  text-decoration: none;
}
.hd-login:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.hd-reg { background: #c91d39; color: #fff; }
.hd-reg:hover { background: #e0354f; color: #fff; }
.hd-user {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
}
.hd-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #c91d39;
  color: #fff;
  font-style: normal;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.hd-identity {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0 7px;
  line-height: 18px;
}
.hd-user .hd-caret { width: 10px; height: 10px; opacity: 0.8; }
.hd-user-menu {
  display: none;
  position: absolute;
  top: 56px;
  right: 0;
  min-width: 148px;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  z-index: 130;
}
.hd-user:hover .hd-user-menu { display: block; }
.hd-user-menu a {
  display: block;
  padding: 0 16px;
  line-height: 34px;
  font-size: 13px;
  color: #303133;
  text-decoration: none;
  white-space: nowrap;
}
.hd-user-menu a:hover { background: #f7f8fa; color: #c91d39; }
.hd-user-menu .hd-logout {
  border-top: 1px solid #f0f0f0;
  margin-top: 4px;
  padding-top: 4px;
  color: #909399;
}

/* 旧顶栏、二级导航条已并入页头 */
#top { display: none; }

@media (max-width: 1040px) {
  #hd .hd-main-inner { gap: 12px; }
  .hd-navitem { padding: 0 10px; font-size: 14px; }
  .hd-slogan { display: none; }
  #hd .hd-search { flex: 0 1 210px; }
  #hd .hd-search-sel { display: none; }
}
@media (max-width: 760px) {
  .hd-nav { display: none; }
  .hd-identity { display: none; }
  #hd .hd-search { display: none; }
}

/* ===== 页脚（对齐 lmgw 门户 AppFooter 的 .ft / .ft-inner / .ft-copy）===== */
#fd {
  background: #16233b;
  padding: 0;
  text-align: left;
  color: rgba(255, 255, 255, 0.6);
}
#fd .ft {
  background: linear-gradient(180deg, #233b5c, #16233b);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}
#fd .ft-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
#fd .ft-copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}


/* ===== 修改密码弹窗（头像下拉菜单） ===== */
.pwd-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwd-modal[hidden] {
  display: none;
}
.pwd-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 48, 0.45);
}
.pwd-dialog {
  position: relative;
  width: 432px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(20, 30, 48, 0.28);
  overflow: hidden;
}
.pwd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f2f6;
}
.pwd-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #1f2a3d;
}
.pwd-close {
  font-size: 24px;
  line-height: 1;
  color: #9aa3b2;
  text-decoration: none;
}
.pwd-close:hover {
  color: #c91d39;
}
.pwd-form {
  padding: 20px 24px 24px;
}
.pwd-item {
  display: block;
  margin-bottom: 16px;
}
.pwd-item span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #6b7688;
}
.pwd-item input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #dfe3ec;
  border-radius: 8px;
  background: #fff;
  color: #1f2a3d;
  font-size: 14px;
  box-sizing: border-box;
}
.pwd-item input:focus {
  border-color: #c91d39;
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 29, 57, 0.08);
}
.pwd-msg {
  margin: 0;
  min-height: 18px;
  font-size: 13px;
  line-height: 18px;
  color: #c91d39;
}
.pwd-msg-ok {
  color: #1f9d55;
}
.pwd-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.pwd-cancel {
  display: inline-block;
  height: 38px;
  padding: 0 18px;
  border: 1px solid #dfe3ec;
  border-radius: 8px;
  color: #4a5568;
  font-size: 14px;
  line-height: 36px;
  text-decoration: none;
}
.pwd-cancel:hover {
  border-color: #c91d39;
  color: #c91d39;
}
.pwd-submit {
  height: 38px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: #c91d39;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.pwd-submit:hover {
  background: #e0354f;
}
