/* ==========================================================================
 * 商户后台 · 顶部壳层增强（zhc-shell）
 * 1) 深色通栏：只在 .admin-topbar 作用域覆盖 CSS 变量 —— 侧栏/内容区不受影响
 * 2) 汉堡按钮 + 高频待办标签（数字来自真实接口）
 * 3) 「全部应用」抽屉（内容从侧栏菜单实时抓取，不维护第二份菜单数据）
 * 4) 右下角悬浮：帮助 / 客服 / AI 中心 / 回到顶部
 * ★ 所有类名带 zhc- 前缀：宿主有通用类（.primary/.danger 等），不加前缀会被吞
 * ========================================================================== */

/* ---------- 1. 深色通栏 ---------- */
.admin-topbar {
  --surface: #1b1f2a;
  --surface-2: rgba(255, 255, 255, .07);
  --surface-3: rgba(255, 255, 255, .14);
  --text: #eef1f6;
  --text-2: #c8cede;
  --text-3: #949eb3;
  --border: rgba(255, 255, 255, .10);
  background: #1b1f2a;
  border-bottom-color: rgba(255, 255, 255, .10);
}
.admin-topbar h1 {
  flex: none !important;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eef1f6;
}
.admin-topbar .topbar-search { background: rgba(255, 255, 255, .07); }
.admin-topbar .topbar-search .search-input {
  background: transparent;
  border: 0;
  outline: 0;
  color: #eef1f6;
  font-size: 12px;
  width: 100%;
}
.admin-topbar .topbar-search .search-input::placeholder { color: #949eb3; }
.admin-topbar .topbar-theme,
.admin-topbar .notification-bell { color: #c8cede; cursor: pointer; }
.admin-topbar .topbar-personal { background: rgba(255, 255, 255, .07); }
.admin-topbar .topbar-personal:hover { background: rgba(255, 255, 255, .14); }

/* ---------- 2. 汉堡按钮 ---------- */
.zhc-burger {
  width: 34px;
  height: 34px;
  flex: none;
  border: 0;
  padding: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  color: #eef1f6;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}
.zhc-burger:hover { background: rgba(255, 255, 255, .18); }
.zhc-burger svg { width: 17px; height: 17px; display: block; }

/* ---------- 3. 高频待办标签 ---------- */
.zhc-quick { display: flex; align-items: center; gap: 6px; flex: none; margin-right: auto; }
.zhc-quick a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1;
  color: #c8cede;
  text-decoration: none;
  background: rgba(255, 255, 255, .05);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.zhc-quick a:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.zhc-quick a b {
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  min-width: 18px;
  padding: 0 5px;
  text-align: center;
  border-radius: 5px;
  color: #ffb37a;
  background: rgba(255, 122, 45, .18);
}
.zhc-quick a b.zhc-zero { color: #949eb3; background: rgba(255, 255, 255, .07); }

/* ---------- 4. 全部应用抽屉 ---------- */
.zhc-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 26, .45);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
}
.zhc-mask.zhc-on { opacity: 1; pointer-events: auto; }
.zhc-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(1060px, 94vw);
  background: #fff;
  z-index: 3001;
  display: flex;
  transform: translateX(-102%);
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 0 40px rgba(0, 0, 0, .18);
  border-radius: 0 14px 14px 0;
  overflow: hidden;
}
.zhc-drawer.zhc-on { transform: translateX(0); }

.zhc-rail {
  width: 148px;
  flex: none;
  background: #1b1f2a;
  padding: 22px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.zhc-rail .zhc-rail-title {
  font-size: 12px;
  color: #7c869c;
  padding: 0 10px 14px;
  letter-spacing: .3px;
}
.zhc-rail button {
  border: 0;
  background: transparent;
  color: #a8b1c4;
  font-size: 13px;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.zhc-rail button:hover { background: rgba(255, 255, 255, .07); color: #eef1f6; }
.zhc-rail button.zhc-on { background: var(--brand, #FF5A1F); color: #fff; font-weight: 600; }

.zhc-appmain { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.zhc-apphd { padding: 20px 24px 12px; display: flex; align-items: center; gap: 12px; flex: none; }
.zhc-apphd .zhc-appsearch {
  flex: 1;
  height: 38px;
  border-radius: 999px;
  background: #f3f4f7;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}
.zhc-apphd .zhc-appsearch:focus-within { border-color: var(--brand, #FF5A1F); background: #fff; }
.zhc-apphd input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  color: #1f2329;
  font-family: inherit;
}
.zhc-apphd .zhc-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #8a90a0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.zhc-apphd .zhc-close:hover { background: #f3f4f7; color: #1f2329; }

.zhc-appbody { flex: 1; overflow-y: auto; padding: 4px 24px 28px; }
.zhc-appbody::-webkit-scrollbar { width: 8px; }
.zhc-appbody::-webkit-scrollbar-thumb { background: #dcdfe6; border-radius: 4px; }

.zhc-group { margin-bottom: 22px; }
.zhc-group h5 {
  font-size: 13px;
  font-weight: 600;
  color: #1f2329;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.zhc-group h5 span { font-size: 11px; font-weight: 400; color: #a3a9b7; }
.zhc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.zhc-app {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid #eef0f4;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 12.5px;
  color: #2b303b;
  overflow: hidden;
  transition: border-color .14s, background .14s;
}
.zhc-app:hover { border-color: var(--brand, #FF5A1F); background: #fff8f4; }
.zhc-app i {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: #FF5A1F;
  background: #fff1e9;
}
.zhc-app em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zhc-isempty {
  padding: 40px 0;
  text-align: center;
  color: #a3a9b7;
  font-size: 13px;
}

.zhc-appside { width: 210px; flex: none; background: #fafbfc; border-left: 1px solid #eef0f4; padding: 22px 14px; overflow-y: auto; }
.zhc-appside h5 { font-size: 12px; font-weight: 600; color: #6b7280; margin: 0 0 10px; padding-left: 4px; }
.zhc-appside button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  color: #2b303b;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.zhc-appside button:hover { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.zhc-appside button span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand, #FF5A1F);
  flex: none;
  opacity: .55;
}

/* ---------- 5. 右下角悬浮 ---------- */
.zhc-fab {
  position: fixed;
  right: 22px;
  bottom: 30px;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.zhc-fab button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #e6e8ee;
  background: #fff;
  color: #5b6478;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(20, 25, 40, .10);
  transition: transform .15s, color .15s, border-color .15s;
  position: relative;
  padding: 0;
}
.zhc-fab button:hover { transform: translateY(-2px); color: var(--brand, #FF5A1F); border-color: #ffd2bd; }
.zhc-fab button svg { width: 18px; height: 18px; display: block; }
.zhc-fab button::after {
  content: attr(data-tip);
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: #2b303b;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 7px 9px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s;
}
.zhc-fab button:hover::after { opacity: 1; }
.zhc-fab .zhc-top { display: none; }
.zhc-fab .zhc-top.zhc-show { display: grid; }

/* ---------- 6. 帮助浮层 ---------- */
.zhc-help {
  position: fixed;
  right: 74px;
  bottom: 30px;
  width: 320px;
  max-height: 62vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eef0f4;
  box-shadow: 0 8px 30px rgba(20, 25, 40, .14);
  z-index: 2600;
  padding: 16px 16px 10px;
  display: none;
}
.zhc-help.zhc-on { display: block; }
.zhc-help h4 { font-size: 13px; font-weight: 600; color: #1f2329; margin: 0 0 10px; }
.zhc-help ul { margin: 0 0 12px; padding: 0; list-style: none; }
.zhc-help li {
  font-size: 12.5px;
  color: #4b5563;
  line-height: 1.5;
  padding: 7px 0;
  border-bottom: 1px dashed #f0f1f5;
}
.zhc-help li:last-child { border-bottom: 0; }
.zhc-help li b { color: #1f2329; font-weight: 600; }
.zhc-help .zhc-hfoot { font-size: 11.5px; color: #a3a9b7; padding: 6px 0 4px; }

@media (max-width: 1280px) {
  .zhc-quick a:nth-child(n+3) { display: none; }
  .zhc-grid { grid-template-columns: repeat(3, 1fr); }
}
