/* ============================================================
 * 首页「微信商户助手」风格皮肤（仅作用于用户端首页）
 * - 仅改首页内容区视觉，绝不删除/移动 Vue 已渲染的 DOM
 * - 原生看板用 CSS 折叠（保留 DOM，欢迎弹窗/告警/图表不受影响）
 * - 左上角三条杠完全沿用系统原有按钮，本皮肤不自建菜单
 * - 本轮：整块绿色头部（品牌上移与状态位平齐）、图标统一绿色（不圈起）、
 *   克制按钮、滚动保障
 * ============================================================ */
#wxhome-root {
  --wx-green: #07c160;
  --wx-green-d: #06a352;
  --wx-green-soft: #eaf9f0;
  --wx-line: #f0f1f2;
  max-width: 560px;
  margin: 0 auto 6px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: #1f2329;
  box-sizing: border-box;
  /* 滚动保障：自建节点绝不制造固定高度或裁剪，手机端下滑顺畅。
     普通 div 上不使用 -webkit-overflow-scrolling（用错元素反而拖慢 iOS 滚动）；
     flex-shrink:0 防止在 flex 内容区被压缩，导致下方内容被裁掉而滑不到。 */
  overflow: visible !important;
  max-height: none !important;
  flex-shrink: 0;
  position: relative;
}
#wxhome-root * { box-sizing: border-box; }

.wxhome-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(16, 48, 30, .08), 0 1px 3px rgba(16, 48, 30, .04);
}

/* ---------- 顶部整块绿色：品牌与「经营概况」状态位平齐 ---------- */
.wxhome-toprow {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.wxhome-toprow .nb-tag {
  flex: none;
  font-size: 11.5px; font-weight: 500; color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .40);
  padding: 3px 11px; border-radius: 999px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.wxhome-toprow .nb-tag.is-danger {
  color: #fff; background: rgba(214, 59, 71, .94);
  border-color: rgba(255, 255, 255, .55);
}

/* ---------- 绿色头部大卡（从卡片顶部开始，与状态位连成一体） ---------- */
.wxhome-hero {
  position: relative;
  padding: 15px 22px 24px;
  color: #fff;
  background: linear-gradient(160deg, #22c96d 0%, #0fbe64 48%, #06a352 100%);
  overflow: hidden;
}
.wxhome-hero::before,
.wxhome-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.wxhome-hero::before {
  width: 260px; height: 260px; right: -96px; top: -128px;
  background: rgba(255, 255, 255, .09);
}
.wxhome-hero::after {
  width: 190px; height: 190px; left: -80px; bottom: -112px;
  background: rgba(255, 255, 255, .06);
}
.wxhome-hero-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: .10;
  background-image:
    linear-gradient(115deg, transparent 46%, #fff 46%, #fff 47%, transparent 47%),
    linear-gradient(115deg, transparent 62%, #fff 62%, #fff 63%, transparent 63%),
    radial-gradient(circle at 88% 78%, transparent 32px, #fff 32px, #fff 33px, transparent 33px);
}
.wxhome-brand {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 600; letter-spacing: .6px; opacity: .99;
  min-width: 0;
}
.wxhome-brand .bt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wxhome-brand .brand-ico {
  width: 20px; height: 20px; stroke: #fff; fill: none; flex: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.wxhome-hero-label {
  position: relative; z-index: 2; text-align: center;
  font-size: 13px; letter-spacing: 1.5px; opacity: .94; margin-top: 22px;
}
.wxhome-hero-money {
  position: relative; z-index: 2; text-align: center;
  font-size: 45px; font-weight: 300; letter-spacing: .5px;
  line-height: 1.18; margin: 5px 0 20px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 70, 30, .12);
}
.wxhome-hero-money .cur { font-size: 24px; vertical-align: 9px; margin-right: 5px; font-weight: 300; }
.wxhome-hero-stats {
  position: relative; z-index: 2; display: flex;
  padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .24);
}
.wxhome-hero-stats .item { flex: 1; text-align: center; position: relative; }
.wxhome-hero-stats .item + .item::before {
  content: ""; position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 1px; background: rgba(255, 255, 255, .30);
}
.wxhome-hero-stats .k { font-size: 12.5px; opacity: .92; }
.wxhome-hero-stats .v { font-size: 21px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* ---------- 收款实时通知条 ---------- */
.wxhome-notice {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 18px; background: #fff; cursor: pointer;
  border-bottom: 1px solid var(--wx-line); transition: background .15s;
}
.wxhome-notice:hover { background: #f7fcf9; }
.wxhome-notice .bell { width: 21px; height: 21px; }
.wxhome-notice .txt { flex: 1; font-size: 14.5px; color: #2b2f33; font-weight: 500; line-height: 1.35; }
.wxhome-notice .txt em {
  display: block; font-style: normal; font-size: 11.5px;
  color: #9aa0a6; font-weight: 400; margin-top: 2px;
}
.wxhome-notice .go {
  flex: none; font-size: 11.5px; color: var(--wx-green-d);
  border: 1px solid #b9ebcd; background: var(--wx-green-soft);
  padding: 3px 9px; border-radius: 999px;
}
.wxhome-notice .arrow { color: #c2c6cb; font-size: 21px; line-height: 1; flex: none; }

/* ---------- 九宫格：彩色线性图标，无底色圆框 ---------- */
.wxhome-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); background: #fff;
  padding: 2px 0 0;
}
.wxhome-cell {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  padding: 18px 6px 19px; text-align: center; cursor: pointer;
  border-right: 1px solid #f2f3f4; border-bottom: 1px solid #f2f3f4;
  transition: background .15s;
}
.wxhome-cell:nth-child(3n) { border-right: none; }
.wxhome-cell:nth-last-child(-n+3) { border-bottom: none; }
.wxhome-cell:hover { background: #fafbfc; }
.wxhome-cell:active { background: #f2f4f6; }
.wxhome-cell .ico {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
}
.wxhome-cell svg {
  width: 27px; height: 27px;
  /* 九宫格图标统一绿色，不再有蓝/紫混色；无底色圆框 */
  stroke: #07c160; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.wxhome-cell .t { font-size: 13px; color: #33383d; line-height: 1.3; }

/* 封禁状态：有罚单时标红 + 红色消息角标「1」 */
.wxhome-cell.is-danger .t { color: #d63b47; font-weight: 600; }
.wxhome-cell.is-danger svg { stroke: #e34d59; }
.wxhome-cell-dot {
  position: absolute; top: 9px; left: 50%; margin-left: 8px;
  min-width: 17px; height: 17px; line-height: 17px;
  padding: 0 4px; border-radius: 999px;
  background: #e34d59; color: #fff; font-size: 11px; font-weight: 600;
  box-shadow: 0 0 0 2px #fff;
  animation: wxDotPulse 1.8s ease-in-out infinite;
}
@keyframes wxDotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ---------- 温馨提示 ---------- */
.wxhome-tips {
  margin: 12px 0 0; padding: 14px 17px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .04);
}
.wxhome-tips h4 {
  margin: 0 0 8px; font-size: 13.5px; color: var(--wx-green-d);
  display: flex; align-items: center; gap: 7px; font-weight: 600;
}
.wxhome-tips h4 svg { width: 15px; height: 15px; stroke: var(--wx-green); fill: none; stroke-width: 1.8; }
.wxhome-tips ul { margin: 0; padding-left: 19px; font-size: 12.5px; line-height: 1.9; color: #6a7178; }
.wxhome-tips b { color: #444; font-weight: 600; }

/* ---------- 「查看经营数据」：克制细条按钮（可见但不过分抢眼） ---------- */
.wxhome-raw-wrap { margin: 14px 0 8px; }
.wxhome-raw-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px;
  background: #fff;
  border: 1px solid #e6e8eb; border-radius: 10px;
  color: #5b636b; font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: border-color .18s, background .18s;
}
.wxhome-raw-btn:hover { border-color: #b9ebcd; background: #fafdfb; }
.wxhome-raw-btn.opened { background: #fafbfc; border-color: #e6e8eb; }
.wxhome-raw-btn .raw-ico {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--wx-green-soft);
}
.wxhome-raw-btn .raw-ico svg {
  width: 15px; height: 15px; stroke: var(--wx-green-d); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.wxhome-raw-btn .raw-txt { flex: 1; text-align: left; }
.wxhome-raw-btn .raw-badge {
  flex: none; font-size: 11.5px; color: #9aa0a6;
  padding: 2px 8px; border: 1px solid #eceef0; border-radius: 999px;
}
.wxhome-raw-hint {
  text-align: center; font-size: 11.5px; color: #a2a8af;
  line-height: 1.6; margin-top: 8px;
}

/* 折叠原生看板：#wxhome-root 是 .dashboard-console 的【兄弟节点】，
   完全不进入 Vue 管理的子树；DOM 与 Vue 实例全部保留，随时可还原。 */
body.wxhome-hide-raw .dashboard-console { display: none !important; }

/* ---------- 深色模式适配 ---------- */
html.dark .wxhome-card,
html.dark .wxhome-notice,
html.dark .wxhome-grid,
html.dark .wxhome-tips { background: #1b1d1f; border-color: #333; }
html.dark .wxhome-notice .txt,
html.dark .wxhome-cell .t { color: #e3e5e8; }
html.dark .wxhome-notice .txt em { color: #8b9198; }
html.dark .wxhome-notice:hover { background: #232629; }
html.dark .wxhome-cell:hover { background: #202722; }
html.dark .wxhome-tips ul { color: #9aa0a6; }
html.dark .wxhome-tips b { color: #ddd; }
html.dark .wxhome-tips h4 { color: #3ecf7e; }
html.dark .wxhome-raw-btn { background: #1b1d1f; border-color: #333; color: #9aa0a6; }
html.dark .wxhome-raw-btn .raw-ico { background: #1d3326; }
html.dark .wxhome-raw-btn .raw-badge { border-color: #3a3d40; }
/* 状态位位于绿色头部内，深色模式仍保持白色半透明胶囊，无需覆盖 */

@media (max-width: 600px) {
  #wxhome-root { max-width: 100%; }
  .wxhome-card { border-radius: 0; box-shadow: none; }
  .wxhome-tips { border-radius: 0; }
  .wxhome-raw-wrap { padding: 0 12px; }
  .wxhome-hero-money { font-size: 40px; }
}

/* ============================================================
 * 本轮升级：下方内容可发现性引导 + 滚动性能 + 更精致的层次
 * 仅作用于自建节点，不触碰系统原有样式与功能。
 * ============================================================ */

/* 滚动性能：去掉状态胶囊的 backdrop-filter（滚动时逐帧重采样背景，手机端明显掉帧）；
   红点脉冲改为有限次数，避免常驻无限动画持续唤醒合成线程。 */
.wxhome-toprow .nb-tag { -webkit-backdrop-filter: none; backdrop-filter: none; }
.wxhome-cell-dot { animation-iteration-count: 3; }

/* ---------- 温馨提示：新增「查看经营数据」引导条 ---------- */
.wxhome-tips ul { list-style: none; padding-left: 0; }
.wxhome-tips li { position: relative; padding-left: 15px; }
.wxhome-tips li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: #b9d9c7;
}
.wxhome-tip-new {
  background: linear-gradient(100deg, #f1fbf5, #f8fdfa);
  border: 1px solid #d9efe2; border-radius: 9px;
  padding: 9px 11px 9px 17px !important;
  margin-bottom: 7px; color: #3b6b53;
}
.wxhome-tip-new::before {
  top: 15px !important; left: 7px !important; background: #07c160;
}
.wxhome-tip-new b { color: #068a4b; }
html.dark .wxhome-tip-new { background: #16261d; border-color: #2b4c37; color: #9fd8b6; }
html.dark .wxhome-tip-new b { color: #5ad394; }

/* ---------- 「下方还有内容」提示：明确告知可展开 ---------- */
.wxhome-more-cue {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 11.5px; letter-spacing: .5px; color: #8b9c92;
  padding: 2px 0 9px;
}
.wxhome-more-cue span {
  color: #07c160; font-size: 15px; line-height: 1;
  animation: wxCueFloat 1.9s ease-in-out 3;
}
@keyframes wxCueFloat {
  0%, 100% { transform: translateY(-1px); opacity: .55; }
  50% { transform: translateY(2px); opacity: 1; }
}
html.dark .wxhome-more-cue { color: #7f8f86; }

/* ---------- 「查看经营数据」按钮：保持克制，但更明确可点 ---------- */
.wxhome-raw-btn {
  border-color: #dfe6e1;
  background: linear-gradient(180deg, #fff, #fbfdfc);
  box-shadow: 0 2px 10px rgba(7, 193, 96, .05);
}
.wxhome-raw-btn:hover { border-color: #9fd9b8; background: #f6fdf9; }
.wxhome-raw-btn .raw-badge {
  color: #0a9e56; border-color: #cdeedb; background: #f0fbf4;
}
html.dark .wxhome-raw-btn { background: #1b1d1f; border-color: #333; }
html.dark .wxhome-raw-btn .raw-badge { background: #173024; border-color: #2c5039; color: #5ad394; }

/* ---------- 卡片 / 九宫格更精致的层次 ---------- */
.wxhome-card { border: 1px solid #eef1ef; }
html.dark .wxhome-card { border-color: #2a2e2b; }
.wxhome-cell { border-color: #f4f6f5; }
.wxhome-tips { border: 1px solid #eef1ef; box-shadow: 0 4px 16px rgba(16, 48, 30, .045); }
html.dark .wxhome-tips { border-color: #2a2e2b; }
