/* ============================================================
 * 首页「微信商户助手」风格皮肤（仅作用于用户端首页）
 * - 仅改首页内容区视觉，绝不删除/移动 Vue 已渲染的 DOM
 * - 原生看板用 CSS 折叠（保留 DOM，欢迎弹窗/告警/图表不受影响）
 * - 显眼的「查看经营数据」按钮可随时展开原版看板，功能零损失
 * - 左上角三条杠完全沿用系统原有按钮，本皮肤不自建菜单
 * ============================================================ */
#wxhome-root {
  --wx-green: #07c160;
  --wx-green-d: #06a352;
  --wx-green-soft: #eaf9f0;
  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;
}
#wxhome-root * { box-sizing: border-box; }

.wxhome-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(7, 120, 60, .10), 0 2px 6px rgba(16, 60, 30, .04);
}

/* ---------- 绿色头部大卡 ---------- */
.wxhome-hero {
  position: relative;
  padding: 18px 22px 26px;
  color: #fff;
  background: linear-gradient(158deg, #2ad274 0%, #0fbe64 46%, #06a352 100%);
  overflow: hidden;
}
.wxhome-hero::before,
.wxhome-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.wxhome-hero::before {
  width: 280px; height: 280px; right: -100px; top: -132px;
  background: rgba(255, 255, 255, .10);
}
.wxhome-hero::after {
  width: 200px; height: 200px; left: -84px; bottom: -118px;
  background: rgba(255, 255, 255, .07);
}
/* 极淡的线稿装饰，呼应截图背景，纯装饰不影响点击 */
.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: 14px; font-weight: 600; letter-spacing: .5px;
}
.wxhome-brand .brand-ico {
  width: 20px; height: 20px; stroke: #fff; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.wxhome-brand .bt { opacity: .98; }
.wxhome-brand .btag {
  margin-left: auto; font-size: 11.5px; font-weight: 400;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
  letter-spacing: 0;
}

.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: 46px; font-weight: 300; letter-spacing: .5px;
  line-height: 1.18; margin: 6px 0 22px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 70, 30, .12);
}
.wxhome-hero-money .cur { font-size: 25px; vertical-align: 9px; margin-right: 5px; font-weight: 300; }
.wxhome-hero-stats {
  position: relative; z-index: 2; display: flex;
  padding-top: 16px; 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: 22px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* ---------- 收款实时通知条 ---------- */
.wxhome-notice {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 18px; background: #fff; cursor: pointer;
  border-bottom: 1px solid #f0f1f2; transition: background .15s;
}
.wxhome-notice:hover { background: #f7fcf9; }
.wxhome-notice .bell { width: 22px; height: 22px; }
.wxhome-notice .txt { flex: 1; font-size: 15px; 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: 4px 0 2px;
}
.wxhome-cell {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px;
  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: #f5fcf8; }
.wxhome-cell:active { background: #e9f8ef; }
.wxhome-cell .ico {
  width: 46px; height: 46px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: var(--wx-green-soft);
}
.wxhome-cell svg {
  width: 25px; height: 25px; stroke: var(--wx-green-d); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.wxhome-cell .t { font-size: 13px; color: #33383d; line-height: 1.3; }

/* ---------- 温馨提示 ---------- */
.wxhome-tips {
  margin: 14px 0 0; padding: 15px 17px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .05);
}
.wxhome-tips h4 {
  margin: 0 0 9px; font-size: 14px; color: var(--wx-green-d);
  display: flex; align-items: center; gap: 7px; font-weight: 600;
}
.wxhome-tips h4 svg { width: 16px; height: 16px; 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.95; color: #6a7178; }
.wxhome-tips b { color: #444; font-weight: 600; }

/* ---------- 显眼的「查看经营数据」按钮 + 引导提示词 ---------- */
.wxhome-raw-wrap { margin: 18px 0 6px; }
.wxhome-raw-hint {
  text-align: center; font-size: 12.5px; color: #8a9097;
  line-height: 1.6; margin-bottom: 10px;
}
.wxhome-raw-btn {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 13px 16px;
  background: linear-gradient(135deg, #f0fbf4 0%, #e4f8ec 100%);
  border: 1.5px solid #8fdcb0; border-radius: 12px;
  color: var(--wx-green-d); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .18s;
  box-shadow: 0 3px 12px rgba(7, 160, 82, .10);
}
.wxhome-raw-btn:hover {
  border-color: var(--wx-green); background: linear-gradient(135deg, #e6f9ee, #d6f4e4);
  box-shadow: 0 6px 18px rgba(7, 160, 82, .18); transform: translateY(-1px);
}
.wxhome-raw-btn:active { transform: none; }
.wxhome-raw-btn.opened {
  background: #fff; border-color: #dcdfe3; color: #6b7178; box-shadow: none;
}
.wxhome-raw-btn .raw-ico {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .75);
}
.wxhome-raw-btn .raw-ico svg {
  width: 18px; height: 18px; stroke: currentColor; 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: 12px; font-weight: 500;
  background: rgba(255, 255, 255, .8); border: 1px solid rgba(7, 160, 82, .22);
  padding: 4px 10px; border-radius: 999px;
}
.wxhome-raw-btn.opened .raw-badge { border-color: #e2e5e9; }

/* 折叠原生看板：#wxhome-root 是 .dashboard-console 的【兄弟节点】，
   完全不进入 Vue 管理的子树；这里只把原生看板整体 display:none，
   DOM 与其 Vue 实例全部保留（欢迎弹窗为 body 级 teleport，不受影响），
   通过「查看经营数据」开关可随时完全还原，功能零损失。 */
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,
html.dark .wxhome-cell { border-color: #303336; }
html.dark .wxhome-notice:hover { background: #232629; }
html.dark .wxhome-cell:hover { background: #202722; }
html.dark .wxhome-cell .ico { background: #1d3326; }
html.dark .wxhome-cell svg { stroke: #3ecf7e; }
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-hint { color: #8a9097; }
html.dark .wxhome-raw-btn {
  background: #1c2a21; border-color: #2f6b46; color: #6fd99b;
  box-shadow: none;
}
html.dark .wxhome-raw-btn .raw-ico,
html.dark .wxhome-raw-btn .raw-badge { background: rgba(255, 255, 255, .06); }
html.dark .wxhome-raw-btn.opened { background: #1b1d1f; border-color: #3a3d40; color: #9aa0a6; }
html.dark .wxhome-notice .go { background: #1d3326; border-color: #2f6b46; color: #6fd99b; }

@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: 41px; }
}
