/* ============================================================
 * 中米星链工作台 · 样式 v3（商务级设计系统）
 * 深空紫品牌色 · 克制留白 · 精细层次 · 数字等宽
 * ============================================================ */
:root {
  /* 中性底色：略偏冷的高级灰白，比纯白更耐看 */
  --bg: #F5F4FA;
  --bg-2: #F0EEF7;
  --bg-1: #FFFFFF;
  --card: #ffffff;
  --card-line: rgba(20, 18, 28, .045);

  /* 品牌色：靛蓝（专业商务，沉稳可信，替代原深空紫） */
  --ink: #1E1B4B;              /* 品牌墨色，用于深色区块 */
  --primary: #4F46E5;
  --primary-2: #6366F1;
  --primary-3: #818CF8;
  --grad: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  --grad-deep: linear-gradient(140deg, #1E1B4B 0%, #312E81 45%, #4F46E5 100%);
  --grad-soft: linear-gradient(135deg, #EEF0FF 0%, #E8EDFF 100%);
  --primary-weak: #EEF0FF;
  --primary-line: #DDE2FE;

  /* 文字阶梯（v110 提亮 3/4 级以满足 WCAG AA：原 #918DA5 仅 2.93:1、#B9B6C7 仅 1.99:1） */
  --text: #14121C;
  --text-2: #5A5670;
  --text-3: #6F6B84;
  --text-4: #8B87A0;

  /* 分隔与描边 */
  --line: #EDECF2;
  --line-2: #E4E3EC;
  --hairline: rgba(20, 18, 28, .06);

  /* 语义色 */
  --green: #0E9F6E;
  --green-weak: #E6F6F0;
  --amber: #D97706;
  --amber-weak: #FDF2E3;
  --red: #DC2626;
  --red-weak: #FCEDED;

  /* 数据高亮：青色（用于 KPI 强调、趋势线、链接态） */
  --cyan: #0EA5E9;
  --cyan-weak: #E0F2FE;

  /* 形状 */
  --radius: 20px;
  --radius-sm: 13px;
  --radius-xs: 10px;

  /* 层次阴影：更柔和、带品牌微光的双层投影 */
  --shadow-sm: 0 1px 2px rgba(20,18,28,.05), 0 2px 10px rgba(79,70,229,.05);
  --shadow: 0 2px 5px rgba(20,18,28,.05), 0 10px 28px rgba(79,70,229,.08);
  --shadow-lg: 0 12px 24px rgba(79,70,229,.12), 0 28px 56px rgba(79,70,229,.16);
  --shadow-brand: 0 8px 20px rgba(79,70,229,.28);

  --nav-h: 62px;
  --header-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ============================================================
 * 深色模式（跟随系统 auto / 浅色 light / 深色 dark）
 * 仅覆盖「浅色页面表面」与「文字阶梯」；品牌渐变块上的白字保持不变
 * ============================================================ */
:root[data-theme="dark"] {
  --bg: #0F0D17;
  --card: #1C1930;
  --text: #F2F0F7;
  --text-2: #B9B6C7;
  --text-3: #8C889E;
  --text-4: #6B6880;
  --line: #2A2740;
  --line-2: #322F48;
  --primary-weak: #282552;
  --primary-line: #3B3578;
  --green-weak: #123328;
  --amber-weak: #382914;
  --red-weak: #3A1E1E;
  --grad-soft: linear-gradient(135deg, #241D3D 0%, #2A2348 100%);
  --bg-1: #26233A;
  --bg-2: #26233A;
  --hairline: rgba(255,255,255,.07);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.28);
  --shadow: 0 2px 4px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.36);
  --shadow-lg: 0 10px 20px rgba(0,0,0,.4), 0 24px 48px rgba(0,0,0,.5);
}

:root[data-theme="dark"] .card {
  background: #1E1B30;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.34);
}
:root[data-theme="dark"] .app-header { background: rgba(20,18,28,.9); }
:root[data-theme="dark"] .btn.line { background: #26233A; color: var(--text-2); border: 1px solid var(--line-2); }
:root[data-theme="dark"] .btn.ghost { background: #2A2348; color: var(--primary-2); }
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .field select { background: #171527; border: 1px solid var(--line-2); }
:root[data-theme="dark"] .field input:focus,
:root[data-theme="dark"] .field textarea:focus,
:root[data-theme="dark"] .field select:focus { background: #171527; }
:root[data-theme="dark"] .field-btn:active { background: #26233A; }
:root[data-theme="dark"] .segment { background: #171527; }
:root[data-theme="dark"] .segment button.active { background: #322F48; color: #E9E6F2; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
:root[data-theme="dark"] .chip { background: #26233A; border: 1px solid var(--line); color: var(--text-2); }
:root[data-theme="dark"] .menu-card { background: #1E1B30; }
:root[data-theme="dark"] .search { background: #171527; border: 1.5px solid var(--line); }
:root[data-theme="dark"] .dt-cell { background: #26233A; }
:root[data-theme="dark"] .calc-keys button { background: #26233A; color: var(--text); }
:root[data-theme="dark"] .modal { background: rgba(20,18,28,.97); }
:root[data-theme="dark"] .modal-hd { background: rgba(20,18,28,.97); }
:root[data-theme="dark"] .auth-card { background: rgba(30,27,48,.9); border: 1px solid rgba(255,255,255,.12); }
:root[data-theme="dark"] .stat { background: #1E1B30; }
/* v110 深色补漏：底部导航 / 图标按钮 / 标签 / 进度条 / 会员图标 / 日历单元格 / 财务卡片 */
:root[data-theme="dark"] .bottom-nav { background: rgba(15,13,23,.88); border-color: var(--line); box-shadow: 0 14px 34px rgba(0,0,0,.4), 0 3px 10px rgba(0,0,0,.3); }
:root[data-theme="dark"] .ic-btn { background: #26233A; color: var(--text-2); }
:root[data-theme="dark"] .tag.low { background: #26233A; color: var(--text-3); }
:root[data-theme="dark"] .progress-bar { background: #2A2740; }
:root[data-theme="dark"] .pt-ic { background: #26233A !important; color: var(--primary) !important; }
:root[data-theme="dark"] .pt-ic svg { stroke: var(--primary); }
:root[data-theme="dark"] .dt-cell { background: #1C1930; }
:root[data-theme="dark"] .mc-cell { background: #1C1930; }
:root[data-theme="dark"] .mood-emoji { background: #26233A; }
:root[data-theme="dark"] .dc-fn-bar,
:root[data-theme="dark"] .dc-pay-bar,
:root[data-theme="dark"] .dc-goal-bar { background: #2A2740; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; background: #F5F4FA; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; transition: transform .14s cubic-bezier(.4,0,.2,1), opacity .14s, background-color .16s, color .16s; }
input, textarea, select { font-family: inherit; font-size: 15px; color: var(--text); }
a { color: var(--primary); text-decoration: none; }
::placeholder { color: var(--text-4); }
/* 所有金额、统计数字使用等宽数字，对齐更专业 */
.amt, .mc-big, .cm-big, .grp-cm, .h-v, .ms b, .stat .v, .t-num, .pc-pct, .kpi-v, .total-bar b, .f-v { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

#app { display: flex; flex-direction: column; height: 100vh; max-width: 520px; margin: 0 auto; background: transparent; position: relative; overflow: hidden; isolation: isolate; }

/* ---------- 顶部品牌栏（子页面统一标题栏，首页/登录页隐藏保持沉浸） ---------- */
.app-header {
  display: flex; align-items: center; gap: 10px;
  height: var(--header-h); padding: 0 14px;
  background: rgba(245,244,250,.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto; z-index: 6; position: relative;
  transition: box-shadow .2s;
}
.app-header.scrolled { box-shadow: var(--shadow-sm); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 10px; flex: 0 0 30px;
  background: var(--grad-deep); box-shadow: 0 3px 10px rgba(46,16,101,.30);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.brand-mark::after { content: ''; position: absolute; inset: 0; background: linear-gradient(140deg, rgba(255,255,255,.28), transparent 55%); }
.brand-mark svg { width: 17px; height: 17px; stroke: #fff; stroke-width: 2.4; fill: none; position: relative; z-index: 1; }
.app-header h1 { font-size: 17px; font-weight: 700; letter-spacing: -.2px; margin: 0; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-header .right { color: var(--primary); font-size: 13.5px; font-weight: 600; flex: 0 0 auto; }

/* ---------- 视图容器 ---------- */
.app-view { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding: 6px 16px calc(var(--nav-h) + var(--safe-b) + 44px); position: relative; z-index: 1; }
.view-section { margin-bottom: 18px; }
.view-section:last-child { margin-bottom: 0; }
.muted { color: var(--text-2); }
.tiny { font-size: 12px; color: var(--text-3); }

/* 区块标题（页面级小标题） */
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 11px; }
.sec-hd h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.2px; color: var(--text); }
.sec-hd .more { font-size: 12.5px; font-weight: 600; color: var(--primary); flex: 0 0 auto; }
.sec-hd .note { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* ---------- 卡片 ---------- */
/* 卡片改为近实底（去除毛玻璃）：卡片数量多，避免滚动时反复模糊造成卡顿 */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin: 0 0 12px;
  border: 1px solid var(--card-line);
}
.card:last-child { margin-bottom: 0; }
.card-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; letter-spacing: -.2px; }
.card-title .sub { margin-left: auto; flex: 0 0 auto; }
.card-title { overflow: hidden; }
.card-title .sub { font-size: 12.5px; color: var(--primary); font-weight: 600; }
.card-title.bar { justify-content: flex-start; }
.card-title.bar .sub { margin-left: auto; }
.card-title.bar::before { content: ''; display: inline-block; width: 3px; height: 14px; background: var(--grad); border-radius: 2px; margin-right: 9px; vertical-align: -1px; }

/* ---------- 底部导航（悬浮岛 · 圆角 · 激活项紫色药丸） ---------- */
.bottom-nav {
  position: fixed; bottom: calc(var(--safe-b) + 12px); left: 50%; transform: translateX(-50%);
  width: min(460px, calc(100% - 28px));
  background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--hairline); border-radius: 24px; display: flex; z-index: 30; padding: 7px;
  box-shadow: 0 14px 34px rgba(46,16,101,.20), 0 3px 10px rgba(20,18,28,.08);
}
.bottom-nav button {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--text-3); font-size: 11px; font-weight: 600; position: relative;
  padding: 8px 6px; border-radius: 18px; transition: background-color .2s, color .2s;
}
/* 窄屏兜底：进一步压缩内边距与图标，确保 5 个 Tab（含「我」）始终完整可见 */
@media (max-width: 360px) {
  .bottom-nav button { padding: 7px 3px; }
  .bottom-nav button svg { width: 20px; height: 20px; }
}
.bottom-nav button .ic-wrap { display: flex; align-items: center; justify-content: center; height: 24px; transition: transform .22s cubic-bezier(.34,1.56,.64,1); }
.bottom-nav button svg { width: 22px; height: 22px; stroke: var(--text-3); stroke-width: 1.9; transition: stroke .2s; }
.bottom-nav button span { line-height: 1; transition: color .2s; letter-spacing: .1px; }
.bottom-nav button.active { color: var(--primary); background: var(--primary-weak); font-weight: 700; box-shadow: 0 6px 18px rgba(109,40,217,.22); }
.bottom-nav button.active .ic-wrap { transform: translateY(-1px) scale(1.06); }
.bottom-nav button.active::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 16px; height: 3px; border-radius: 3px; background: var(--grad); transform: translateX(-50%); box-shadow: 0 0 10px rgba(139,92,246,.75); }
.bottom-nav button.active svg { stroke: var(--primary); stroke-width: 2.3; }
.bottom-nav button:active { transform: scale(.96); }
.bottom-nav button:active svg { transform: scale(.9); }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; padding: 0 18px; border-radius: var(--radius-sm); font-size: 15.5px; font-weight: 600;
  letter-spacing: .2px; background: var(--grad); color: #fff; width: 100%; box-shadow: var(--shadow-brand);
  position: relative; overflow: hidden;
}
.btn::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 45%; background: linear-gradient(180deg, rgba(255,255,255,.22), transparent); pointer-events: none; }
.btn:active { transform: scale(.975); }
.btn.ghost { background: var(--primary-weak); color: var(--primary); box-shadow: none; }
.btn.ghost::before { display: none; }
.btn.line { background: var(--card); color: var(--text-2); border: 1px solid var(--line-2); box-shadow: none; }
.btn.line::before { display: none; }
.btn.line:active { background: var(--bg-2); }
.btn.gray { background: var(--bg-2); color: var(--text-2); box-shadow: none; }
.btn.gray::before { display: none; }
.btn.danger { background: var(--red-weak); color: var(--red); box-shadow: none; }
.btn.danger::before { display: none; }
.btn.sm { height: 34px; width: auto; padding: 0 13px; font-size: 12.5px; border-radius: 10px; box-shadow: none; }
/* FAB：fixed 浮在可视区右下角，始终可见可点；抬到悬浮导航之上 */
.btn.fab {
  position: fixed; right: 16px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 30px);
  width: 54px; height: 54px; border-radius: 18px; padding: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-deep); box-shadow: 0 8px 16px rgba(46,16,101,.24), 0 16px 32px rgba(46,16,101,.20);
}
.btn.fab svg { width: 23px; height: 23px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; letter-spacing: .1px; }
.field input, .field textarea, .field select {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--card); outline: none; transition: border-color .16s, background .16s, box-shadow .16s;
}
.field textarea { height: 88px; padding: 12px 14px; resize: none; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary-2); background: var(--card); box-shadow: 0 0 0 3px rgba(109,40,217,.10); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-4); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.backup-grid .btn { width: 100%; }
/* 现金流对账三栏 */
.recon-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.recon-cell { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: center; }
.recon-t { font-size: 11.5px; color: var(--text-4); margin-bottom: 5px; }
.recon-v { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -.3px; }
/* 记账模板列表 */
.tpl-list { display: flex; flex-direction: column; gap: 8px; }
.tpl-row { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.tpl-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.tpl-info b { font-size: 13.5px; font-weight: 700; }
.tpl-info b.in { color: var(--green); }
.tpl-info b.out { color: var(--red); }
.tpl-info span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-x { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: transparent; color: var(--text-4); font-size: 17px; line-height: 22px; text-align: center; }

/* ---- v50：预算进度 ---- */
.mini-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.bdg-row { margin-bottom: 12px; }
.bdg-row:last-of-type { margin-bottom: 0; }
.bdg-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.bdg-top b { font-size: 13.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.bdg-top b.warn { color: var(--red); }
.bdg-bar { height: 8px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.bdg-bar i { display: block; height: 100%; border-radius: 6px; transition: width .5s ease; }
.bdg-row.over .bdg-bar i { box-shadow: 0 0 0 1px var(--red); }

/* ---- v50：收支结构（按对象排行） ---- */
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.st-col { min-width: 0; }
.st-h { font-size: 12.5px; font-weight: 700; margin-bottom: 8px; padding-left: 9px; position: relative; }
.st-h::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: var(--text-4); }
.st-h.in::before { background: var(--green); }
.st-h.out::before { background: var(--red); }
.st-item { margin-bottom: 9px; }
.st-item:last-child { margin-bottom: 0; }
.st-name { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-bar { height: 6px; border-radius: 4px; background: var(--bg-2); margin: 4px 0 2px; overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 4px; }
.st-bar i.in { background: var(--green); }
.st-bar i.out { background: var(--red); }
.st-amt { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---- v50：商家佣金排行 ---- */
.rk-list { display: flex; flex-direction: column; gap: 12px; }
.rk-item { display: flex; align-items: center; gap: 11px; }
.rk-no { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-weak); color: var(--primary); font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.rk-item:nth-child(1) .rk-no { background: var(--grad); color: #fff; }
.rk-main { flex: 1; min-width: 0; }
.rk-top { display: flex; justify-content: space-between; align-items: baseline; }
.rk-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-cm { font-size: 13.5px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.rk-bar { height: 7px; border-radius: 5px; background: var(--bg-2); margin-top: 5px; overflow: hidden; }
.rk-bar i { display: block; height: 100%; border-radius: 5px; background: var(--grad); }

/* ---- v50：首页快捷记/报 ---- */
.quick-add { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.qa-btn { display: flex; align-items: center; justify-content: center; gap: 7px; height: 50px; border-radius: 15px; font-size: 15px; font-weight: 700; color: #fff; box-shadow: var(--shadow); }
.qa-btn span { font-size: 20px; line-height: 1; }
.qa-btn.in { background: linear-gradient(135deg, #0E9F6E, #34D399); }
.qa-btn.out { background: linear-gradient(135deg, #DC2626, #F87171); }

/* ---- v50：任务今天到期 ---- */
.tag.due { background: var(--amber-weak); color: var(--amber); border: 1px solid transparent; }
.item-card.due-today { border-left: 3px solid var(--amber); }
.tpl-x:active { background: var(--red-weak); color: var(--red); }

/* ---- v51：每日目标（销售动作日打卡） ---- */
.dy-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dy-ring { flex: 0 0 auto; width: 64px; height: 64px; }
.dy-ring.sm { width: 52px; height: 52px; }
.ring-svg { width: 100%; height: 100%; }
.ring-t { font-size: 14px; font-weight: 800; fill: var(--text); font-variant-numeric: tabular-nums; }
.dy-hero-main { flex: 1; min-width: 0; }
.dy-hero-h { font-size: 12.5px; color: var(--text-3); }
.dy-hero-pct { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.5px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dy-hero-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.dy-date { flex-basis: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.dy-nav { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-2); color: var(--text); font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.dy-nav:disabled { opacity: .35; }
.dy-today { font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-weak); padding: 5px 12px; border-radius: 14px; }
.dy-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.dy-item:last-child { border-bottom: none; padding-bottom: 2px; }
.dy-item.reached .dy-name { color: var(--green); }
.dy-ic { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.dy-main { flex: 1; min-width: 0; }
.dy-top { display: flex; justify-content: space-between; align-items: baseline; }
.dy-name { font-size: 14px; font-weight: 600; }
.dy-num { font-size: 13.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dy-num b { font-size: 15px; color: var(--text); font-weight: 800; }
.dy-num b.ok { color: var(--green); }
.dy-bar { height: 6px; border-radius: 4px; background: var(--bg-2); margin-top: 6px; overflow: hidden; }
.dy-bar i { display: block; height: 100%; border-radius: 4px; background: var(--grad); transition: width .35s ease; }
.dy-item.reached .dy-bar i { background: var(--green); }
.dy-ops { flex: 0 0 auto; display: flex; gap: 7px; }
.dy-ops button { width: 32px; height: 32px; border-radius: 50%; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.dy-plus { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.dy-minus { background: var(--bg-2); color: var(--text-2); }
.dy-home { display: flex; align-items: center; gap: 13px; cursor: pointer; }
.dy-home-main { flex: 1; min-width: 0; }
.dy-home-h { font-size: 13px; font-weight: 700; color: var(--text); }
.dy-home-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.dy-home-sub b { color: var(--primary); font-weight: 800; }
.dy-home-go { flex: 0 0 auto; color: var(--text-4); font-size: 18px; }
/* 深色模式：圆环底色跟随 */
:root[data-theme="dark"] .dy-nav, :root[data-theme="dark"] .dy-ic, :root[data-theme="dark"] .dy-bar, :root[data-theme="dark"] .dy-minus { background: #26233A; }
:root[data-theme="dark"] .dy-today { background: #2A2348; }

/* 屏蔽原生数字控件箭头，保证跨机型外观一致 */
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* 数字输入 + 单位 */
.num-wrap { position: relative; }
.num-wrap .num-input { padding-right: 42px !important; font-weight: 600; font-size: 17px; letter-spacing: -.2px; font-variant-numeric: tabular-nums; }
.num-unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12.5px; font-weight: 600; color: var(--text-3); pointer-events: none; }

/* 日期字段按钮（替代系统 datetime-local，全中文） */
.field-btn {
  width: 100%; height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #FBFBFD;
  font-size: 15px; color: var(--text-4); text-align: left; transition: all .16s;
}
.field-btn.has-value { color: var(--text); font-weight: 500; }
.field-btn:active { border-color: var(--primary-2); background: #fff; box-shadow: 0 0 0 3px rgba(109,40,217,.10); }
.field-btn .fb-ic { width: 18px; height: 18px; flex: 0 0 18px; color: var(--primary); display: inline-flex; }
.field-btn .fb-ic svg { width: 100%; height: 100%; }
.field-btn .fb-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-btn .fb-arrow { width: 15px; height: 15px; flex: 0 0 15px; color: var(--text-4); display: inline-flex; }
.field-btn .fb-arrow svg { width: 100%; height: 100%; }

/* 复选行 */
.check-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius-sm); background: #FBFBFD; border: 1px solid var(--line-2); font-size: 13.5px; color: var(--text-2); }
.check-line input { width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 18px; }

/* 实时计算提示 */
.calc-hint {
  margin: -2px 0 14px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--primary-weak); border: 1px solid var(--primary-line);
  color: var(--primary); font-size: 12.5px; font-weight: 600;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.calc-hint b { font-size: 17px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }

/* 弹窗底部双按钮 */
.modal-foot { display: flex; gap: 10px; padding-top: 6px; }
.modal-foot .btn { flex: 1; }
.modal-foot .btn.line { flex: 0 0 33%; }

/* 分段选择 */
.segment { display: flex; background: var(--bg-2); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.segment button { flex: 1; height: 38px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all .18s; white-space: nowrap; }
.segment button:active { transform: scale(.97); }
.segment button.active { background: var(--card); color: var(--primary); box-shadow: 0 1px 4px rgba(20,18,28,.12); }

/* ---------- 中文日历选择器 ---------- */
.picker-preview {
  display: flex; align-items: baseline; gap: 10px; padding: 16px 18px; margin-bottom: 14px;
  border-radius: var(--radius); color: #fff; background: var(--grad-deep);
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.picker-preview::after {
  content: ''; position: absolute; right: -30px; top: -60px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,.45), transparent 68%);
}
.picker-preview b { font-size: 21px; font-weight: 700; letter-spacing: -.4px; position: relative; z-index: 1; }
.picker-preview span { font-size: 12.5px; opacity: .78; position: relative; z-index: 1; }

.picker-quick { display: flex; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.chip-mini {
  padding: 7px 13px; border-radius: 9px; background: #F5F5F8; border: 1px solid transparent;
  font-size: 12.5px; font-weight: 600; color: var(--text-2); transition: all .15s;
}
.chip-mini.on, .chip-mini:active { background: var(--primary-weak); color: var(--primary); border-color: var(--primary-line); }

.cal-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-size: 15.5px; font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.cal-nav { width: 32px; height: 32px; border-radius: 10px; background: #F5F5F8; font-size: 19px; line-height: 1; color: var(--text-2); font-weight: 600; }
.cal-nav:active { background: var(--primary-weak); color: var(--primary); }

.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-bottom: 4px; }
.cal-week span { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 5px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-cell {
  height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--text); transition: all .13s;
}
.cal-cell.mute { color: #d3d6e0; font-weight: 500; }
.cal-cell.today { color: var(--primary); background: var(--primary-weak); font-weight: 800; }
.cal-cell.sel { color: #fff; font-weight: 800; background: var(--grad); box-shadow: var(--shadow-brand); }

.picker-sec { margin-top: 16px; }
.picker-sec-t { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 9px; }
.time-wrap { display: flex; align-items: center; gap: 8px; }
.time-box { width: 62px; padding: 5px 0 4px; border-radius: 14px; background: #f4f5f9; display: flex; flex-direction: column; align-items: center; }
.t-arrow { width: 100%; height: 20px; font-size: 10px; color: var(--text-3); line-height: 1; }
.t-arrow:active { color: var(--primary); }
.t-num { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.15; font-variant-numeric: tabular-nums; }
.t-cap { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.t-colon { font-size: 22px; font-weight: 800; color: var(--text-3); margin-top: -8px; }
.t-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; max-width: 152px; justify-content: flex-end; }

.picker-foot { display: flex; gap: 11px; margin-top: 18px; }
.picker-foot .btn { flex: 1; }
.picker-foot .btn.line { flex: 0 0 32%; }

/* 芯片筛选 */
.chips { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 8px 15px; border-radius: 20px; background: var(--card); border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--text-2); box-shadow: var(--shadow-sm); transition: all .18s; }
.chip:active { transform: scale(.95); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(109,40,217,.32); }

/* 筛选栏：多行 chips 统一间距 */
.filter-bar { display: flex; flex-direction: column; gap: 9px; }
/* 任务分组切换 */
.grp-seg { display: flex; align-items: center; gap: 6px; }
.grp-seg-l { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-right: 2px; }
.grp-seg button { flex: 0 0 auto; padding: 7px 13px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.grp-seg button.active { background: var(--primary-weak); color: var(--primary); border-color: transparent; }
.grp-h { display: flex; align-items: center; gap: 8px; margin: 14px 2px 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.grp-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.grp-h b { font-size: 12px; font-weight: 700; color: var(--text-4); background: var(--bg-2); border-radius: 10px; padding: 1px 9px; }
.grp-h:first-child { margin-top: 2px; }

/* 迷你统计条 */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ms {
  background: var(--card); border-radius: 16px; padding: 13px 10px; text-align: center;
  box-shadow: var(--shadow-sm); border: 1px solid var(--card-line);
}
.ms b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.4px; color: var(--primary); }
.ms b.ok { color: var(--green); }
.ms b.warn { color: var(--red); }
.ms span { font-size: 11.5px; color: var(--text-3); margin-top: 2px; display: block; }

/* 独立条目卡片（左侧优先级色条） */
.item-card {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  background: var(--card); border-radius: 18px; padding: 14px 13px 14px 17px; margin-bottom: 11px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--card-line);
  overflow: hidden; transition: transform .18s cubic-bezier(.25,.8,.25,1.2), box-shadow .2s;
  touch-action: pan-y;
}
.item-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--amber); }
.item-card.p-high::before { background: linear-gradient(180deg, #EF4444, #f97316); }
.item-card.p-normal::before { background: linear-gradient(180deg, #7C3AED, #A855F7); }
.item-card.p-low::before { background: #d7dbe3; }
.item-card.is-done { opacity: .62; }
.item-card.is-done::before { background: var(--green); }
/* 左滑容器：把卡片原内容包进 .card-inner，便于整体横移露出右侧操作 */
.card-inner { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; transition: transform .22s cubic-bezier(.25,.8,.25,1.2); will-change: transform; }
.item-card.swiped .card-inner { transform: translateX(-156px); }
/* 点击卡片背景收起（手势由 JS 控制 .swiped） */
.li-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* 图标操作按钮 */
.ic-btn {
  width: 32px; height: 32px; border-radius: 11px; background: #f4f5f9; display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: all .15s;
}
.ic-btn svg { width: 15px; height: 15px; }
.ic-btn:active { background: var(--primary-weak); color: var(--primary); }
.ic-btn.danger:active { background: var(--red-weak); color: var(--red); }
.li-actions.col { flex-direction: column; gap: 8px; }

/* ---------- 列表项 ---------- */
.list-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-size: 15px; font-weight: 600; word-break: break-word; }
.li-title.done { text-decoration: line-through; color: var(--text-3); }
.li-sub { font-size: 12.5px; color: var(--text-3); margin-top: 4px; line-height: 1.45; }
.li-actions { display: flex; gap: 7px; flex: 0 0 auto; align-items: center; }

/* 左滑快捷操作按钮（v114：复用卡片内 .li-actions，触摸横滑露出） */
.swipe-actions {
  position: absolute; right: 0; top: 0; bottom: 0;
  display: flex; align-items: stretch; gap: 0;
  width: 156px; z-index: 3; transform: translateX(100%);
  transition: transform .22s cubic-bezier(.25,.8,.25,1.2); will-change: transform;
}
.item-card.swiped .swipe-actions { transform: translateX(0); }
.sw-btn {
  flex: 1; border: none; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s, filter .15s; white-space: nowrap; padding: 0 8px;
}
.sw-btn:active { filter: brightness(.9); }
.sw-btn.sw-edit { background: #4F46E5; }
.sw-btn.sw-del { background: #DC2626; }
.sw-btn.sw-done { background: #0E9F6E; }
.sw-btn .sw-ic { width: 15px; height: 15px; margin-right: 5px; }

/* 标签 */
.tag { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 9px; border-radius: 7px; font-weight: 700; }
.tag.ops { background: var(--primary-weak); color: var(--primary); }
.tag.sales { background: var(--green-weak); color: var(--green); }
.tag.other { background: #f1f3f7; color: var(--text-2); }
.tag.high { background: var(--red-weak); color: var(--red); }
.tag.normal { background: var(--amber-weak); color: var(--amber); }
.tag.low { background: #f1f3f7; color: var(--text-3); }
.tag.done { background: var(--green-weak); color: var(--green); }
.tag.todo { background: var(--amber-weak); color: var(--amber); }
.tag.platform.dy { background: #fde8f0; color: #ec407a; }
.tag.platform.mt { background: #e6f6ec; color: #1a9e57; }
.tag.platform.ks { background: #e8f0fe; color: #3b6ef5; }
.tag.platform.sph { background: #fff3e0; color: #e08a00; }
.tag.platform.other { background: #f1f3f7; color: var(--text-2); }

/* 待报销状态标签 + 列表项左侧状态条 */
.rb-status.pending { background: var(--amber-weak); color: var(--amber); }
.rb-status.submitted { background: #e6f0fe; color: #3b6ef5; }
.rb-status.done { background: var(--green-weak); color: var(--green); }
.rb-status.rejected { background: var(--red-weak); color: var(--red); }
.item-card.rb-pending::before { background: var(--amber); }
.item-card.rb-submitted::before { background: #3b6ef5; }
.item-card.rb-done::before { background: var(--green); }
.item-card.rb-rejected::before { background: var(--red); }

/* 报销分类标签（颜色由内联 style 控制，这里只给圆角） */
.tag.rb-cat { border-radius: 7px; font-weight: 600; }

/* 报销趋势迷你图 */
.rb-trend { background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px 6px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.rb-trend-h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.rb-legend { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-3); font-weight: 500; }
.rb-legend .lg { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.rb-legend .lg.done { background: var(--primary); }
.rb-legend .lg.pend { background: #E08A00; }
.rb-trend-svg { width: 100%; height: 96px; display: block; }

/* 报销列表内票据缩略 */
.rb-photos-mini { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.rb-photos-mini img { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); }
.rb-photos-mini .more { font-size: 12px; color: var(--text-3); font-weight: 600; }

/* 报销编辑弹窗：票据照片 */
.photo-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.photo-thumb { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .pt-x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(20,18,28,.7); color: #fff; font-size: 13px; line-height: 18px; text-align: center; cursor: pointer; }
.rb-photos-add { width: 64px; height: 64px; border-radius: 12px; border: 1.5px dashed var(--primary-line); background: var(--primary-weak); color: var(--primary); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.rb-photos-add:active { background: var(--grad-soft); }

/* 复选圈 */
.check { width: 23px; height: 23px; border-radius: 50%; border: 2px solid #d7dbe3; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; margin-top: 1px; transition: all .15s; }
.check.on { background: var(--green); border-color: var(--green); }
.check.on svg { width: 13px; height: 13px; stroke: #fff; }

/* 进度条 */
.progress-bar { height: 9px; background: #eef0f4; border-radius: 6px; overflow: hidden; }
.progress-bar > i { display: block; height: 100%; background: var(--grad); border-radius: 6px; transition: width .35s ease; }
.progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-top: 7px; }

/* 统计块 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.stat { background: var(--card); border-radius: 16px; padding: 14px 12px; box-shadow: var(--shadow); border: 1px solid rgba(20,24,39,.03); }
.stat .v { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.stat .v.in { color: var(--green); }
.stat .v.out { color: var(--red); }
.stat .v.net { color: var(--primary); }
.stat .k { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* 进度项目卡 */
.proj-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--card); border-radius: 20px; padding: 15px 16px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(20,24,39,.03); cursor: pointer; transition: transform .12s, box-shadow .2s;
}
.proj-card .pc-body { flex: 1; min-width: 0; }
.proj-card:active { transform: scale(.995); box-shadow: var(--shadow); }
.pc-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pc-name { font-size: 16px; font-weight: 700; letter-spacing: -.2px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-pct { font-size: 19px; font-weight: 800; color: var(--primary); letter-spacing: -.5px; flex: 0 0 auto; }
.pc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 11px; }
.beads { display: flex; align-items: center; gap: 5px; margin-top: 10px; }
.beads i { width: 100%; height: 5px; border-radius: 3px; background: #eceef4; flex: 1; }
.beads i.on { background: var(--grad); }
.bead-more { font-size: 11px; color: var(--text-3); flex: 0 0 auto; font-weight: 600; }
.pc-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.pc-ft b { color: var(--text); font-weight: 700; }
.pc-next { color: var(--primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; }

/* 资金概览卡 */
.money-card {
  background: var(--card); border-radius: 22px; padding: 18px 18px 14px;
  box-shadow: var(--shadow); border: 1px solid rgba(20,24,39,.03); position: relative; overflow: hidden;
}
.money-card::after {
  content: ''; position: absolute; right: -40px; top: -50px; width: 150px; height: 150px; border-radius: 50%;
  background: var(--grad-soft); opacity: .8;
}
.money-card > * { position: relative; z-index: 1; }
.mc-label { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.mc-big { font-size: 32px; font-weight: 800; letter-spacing: -1px; color: var(--primary); margin: 2px 0 14px; }
.mc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mc-cell { display: flex; align-items: center; gap: 9px; background: #f7f7fb; border-radius: 14px; padding: 10px 12px; }
.mc-cell .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.mc-cell .dot.in { background: var(--green); }
.mc-cell .dot.out { background: var(--red); }
.mc-cell b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.mc-cell em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.mc-today { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--text-3); }
.mc-today b { font-weight: 800; color: var(--text); }
.mc-today b.in { color: var(--green); }
.mc-today b.out { color: var(--red); }

/* 账单条目 */
.item-card.kind-in::before { background: linear-gradient(180deg, #16A34A, #22c55e); }
.item-card.kind-out::before { background: linear-gradient(180deg, #EF4444, #f97316); }
.li-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.amt { font-size: 18px; font-weight: 800; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.amt.in { color: var(--green); }
.amt.out { color: var(--red); }

/* 佣金页头卡 */
.cm-hero .cm-big { font-size: clamp(26px, 9vw, 34px); font-weight: 800; letter-spacing: -1.2px; margin: 3px 0 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* 佣金：周期汇总条目 */
.item-card.grp { align-items: center; }
.item-card.grp::before { background: linear-gradient(180deg, #7C3AED, #ec4899); }
.grp-label { font-size: 15.5px; font-weight: 800; letter-spacing: -.2px; }
.grp-bar { height: 6px; background: #f0f1f6; border-radius: 4px; overflow: hidden; margin: 9px 0 7px; }
.grp-bar > i { display: block; height: 100%; border-radius: 4px; background: var(--grad); transition: width .4s ease; }
.grp-right { flex: 0 0 auto; text-align: right; padding-left: 6px; }
.grp-cm { font-size: 18px; font-weight: 800; color: var(--green); letter-spacing: -.4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.grp-k { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }

/* 合计条 */
.total-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 18px; color: #fff;
  background-image: linear-gradient(120deg, #2E1065, #4C1D95, #6D28D9, #2E1065);
  background-size: 300% 300%; animation: gradMove 10s ease infinite;
  box-shadow: var(--shadow-lg);
}
.total-bar span { display: block; font-size: 11.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.total-bar b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.3px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.total-bar .tb-cm { text-align: right; }

/* 佣金：明细算式行 */
.item-card.cm::before { background: linear-gradient(180deg, #A855F7, #ec4899); }
.cm-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; font-size: 12.5px; color: var(--text-2); }
.cm-line b { color: var(--text); font-weight: 700; font-size: 13.5px; }
.cm-x, .cm-eq { color: var(--text-3); font-weight: 700; }
.cm-out { font-size: 16px; font-weight: 800; color: var(--green); letter-spacing: -.3px; }

/* 首页 Hero */
.hero { background: var(--grad-deep); border-radius: 26px; padding: 22px 20px; color: #fff; box-shadow: var(--shadow-lg); margin: 0 0 16px; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.12); }
.hero .h-greet { font-size: 14.5px; opacity: .92; font-weight: 500; }
.hero .h-title { font-size: 23px; font-weight: 800; margin: 5px 0 16px; letter-spacing: .5px; }
.hero .h-row { display: flex; gap: 10px; }
.hero .h-cell { flex: 1 1 0; min-width: 0; background: rgba(255,255,255,.16); border-radius: 15px; padding: 11px 12px; overflow: hidden; }
.hero .h-v { font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hero .h-k { font-size: 12px; opacity: .88; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 首页 特色大卡（佣金管理） */
.feature { background: linear-gradient(135deg, #4C1D95 0%, #7C3AED 100%); border-radius: 22px; padding: 18px; color: #fff; box-shadow: var(--shadow-lg); margin-bottom: 16px; transition: transform .12s; text-align: left; width: 100%; display: block; }
.feature:active { transform: scale(.98); }
.feature .f-row { display: flex; align-items: center; justify-content: space-between; }
.feature .f-ic { width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; }
.feature .f-ic svg { width: 23px; height: 23px; stroke: #fff; }
.feature .f-title { font-size: 19px; font-weight: 800; margin-top: 12px; letter-spacing: .3px; }
.feature .f-sub { font-size: 12.5px; opacity: .9; margin-top: 4px; }
.feature .f-arrow { color: #fff; opacity: .9; }
.feature .f-stats { display: flex; gap: 8px; margin-top: 14px; }
.feature .f-cell { flex: 1; background: rgba(255,255,255,.16); border-radius: 12px; padding: 10px 12px; }
.feature .f-v { font-size: 17px; font-weight: 800; }
.feature .f-k { font-size: 11px; opacity: .88; margin-top: 2px; }

/* 动态渐变（Hero / 特色卡 流动效果） */
.hero, .feature {
  background-image: linear-gradient(120deg, #2E1065, #4C1D95, #6D28D9, #2E1065);
  background-size: 300% 300%;
  animation: gradMove 10s ease infinite;
}
@keyframes gradMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 页面切换入场动画（仅导航时触发） */
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.view-enter > * { animation: viewIn .32s cubic-bezier(.22,1,.36,1) both; }
.view-enter > *:nth-child(2) { animation-delay: .04s; }
.view-enter > *:nth-child(3) { animation-delay: .08s; }
.view-enter > *:nth-child(4) { animation-delay: .12s; }

/* 我的 · 个人卡片 */
.profile-card { background: var(--grad-deep); border-radius: 24px; padding: 22px 18px; color: #fff; box-shadow: var(--shadow-lg); margin-bottom: 16px; }
.pc-top { display: flex; align-items: center; gap: 14px; }
.avatar { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: #fff; border: 2px solid rgba(255,255,255,.35); }
.pc-info { flex: 1; min-width: 0; }
.pc-name { font-size: 20px; font-weight: 800; }
.pc-role { font-size: 13px; opacity: .9; margin-top: 3px; }
.pc-edit { background: rgba(255,255,255,.22); color: #fff; padding: 8px 15px; border-radius: 20px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pc-edit:active { background: rgba(255,255,255,.34); }
.pc-meta { font-size: 13px; opacity: .9; margin-top: 14px; line-height: 1.7; }

/* 我的 · 菜单 */
.menu-card { background: #fff; border-radius: 18px; padding: 6px 14px; box-shadow: var(--shadow); }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); transition: opacity .12s, transform .12s; }
.menu-item:last-child { border-bottom: none; }
.menu-item:active { opacity: .55; transform: scale(.99); }
.mi-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--primary-weak); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.mi-ic svg { width: 19px; height: 19px; stroke: var(--primary); }
.mi-t { flex: 1; font-size: 15px; font-weight: 500; }
.mi-arrow { color: var(--text-3); font-size: 20px; line-height: 1; }
.ok { color: var(--green); font-weight: 700; }
.warn { color: var(--amber); font-weight: 700; }

/* 个人中心：会员（VIP）风格 */
.vip-card { position: relative; overflow: hidden; border-radius: 24px; padding: 20px 18px 18px; color: #fff;
  background: linear-gradient(135deg, #2a0e5c 0%, #5b21b6 52%, var(--vip, #8B5CF6) 150%);
  box-shadow: 0 18px 42px rgba(76,29,149,.36); }
.vip-glow { position: absolute; right: -44px; top: -54px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, var(--vip, #8B5CF6), transparent 70%); opacity: .5; }
.vip-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.vip-avatar { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; backdrop-filter: blur(4px); flex: 0 0 auto; }
.vip-id { flex: 1; min-width: 0; }
.vip-name { font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vip-tag { display: inline-block; margin-top: 5px; font-size: 11.5px; font-weight: 700; padding: 2px 10px;
  border-radius: 20px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); }
.vip-edit { flex: 0 0 auto; font-size: 12.5px; color: #fff; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3); border-radius: 18px; padding: 6px 12px; }
.vip-edit:active { background: rgba(255,255,255,.3); }
.vip-no { position: relative; z-index: 1; font-size: 12px; letter-spacing: 1px; opacity: .82; margin: 14px 0 16px; font-variant-numeric: tabular-nums; }
.vip-stats { position: relative; z-index: 1; display: flex; gap: 10px; }
.vip-stats .vs { flex: 1; min-width: 0; background: rgba(255,255,255,.12); border-radius: 14px; padding: 10px; text-align: center; }
.vip-stats .vs b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vip-stats .vs span { display: block; font-size: 11px; opacity: .82; margin-top: 3px; }
.vip-progress { position: relative; z-index: 1; margin-top: 14px; }
.vp-bar { height: 7px; background: rgba(255,255,255,.22); border-radius: 5px; overflow: hidden; }
.vp-bar > i { display: block; height: 100%; background: #fff; border-radius: 5px; transition: width .5s ease; }
.vp-txt { font-size: 11.5px; opacity: .85; margin-top: 7px; }

/* 会员权益 */
.perks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.perk { display: flex; align-items: center; gap: 9px; background: var(--bg); border-radius: 14px; padding: 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: transform .12s, background .12s; }
.perk:active { transform: scale(.97); background: var(--primary-weak); }
.pk-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--grad-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.pk-ic svg { width: 18px; height: 18px; }
.pk-t { flex: 1; min-width: 0; }
.pk-go { color: var(--text-4); display: flex; align-items: center; }
.pk-go svg { width: 15px; height: 15px; }

/* VIP 头像可点开设置 */
.vip-avatar { cursor: pointer; overflow: hidden; position: relative; }
.vip-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 16px; }
.vip-avatar::after { content: ''; position: absolute; right: 0; bottom: 0; width: 17px; height: 17px; border-radius: 50%;
  background: rgba(255,255,255,.92) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E1065' stroke-width='3'><path d='M12 8v8M8 12h8'/></svg>") center / 11px no-repeat; }

/* 管理后台入口（小齿轮） */
.pf-gear {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: var(--shadow);
}
.pf-gear svg { width: 20px; height: 20px; }
.pf-gear:active { transform: scale(.94); background: var(--primary-weak); }

/* 常用工具：紧凑图标网格（缩小入口） */
.pf-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pf-tool { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px; border-radius: 14px;
  background: var(--bg); transition: transform .12s, background .12s; }
.pf-tool:active { transform: scale(.96); background: var(--primary-weak); }
.pt-ic { width: 40px; height: 40px; border-radius: 13px; background: var(--card); color: var(--primary);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.pt-ic svg { width: 21px; height: 21px; stroke: var(--primary); }
.pt-t { font-size: 12px; font-weight: 600; color: var(--text-2); }

/* 全部工具入口（v120 图标网格化）：标题 + 3 列图标预览 + 查看全部 */
.all-apps-entry { background: var(--card); border: 1px solid var(--card-line); border-radius: 18px;
  padding: 15px 16px 13px; box-shadow: var(--shadow); }
.all-apps-entry .aa-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.all-apps-entry .aa-head b { font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.all-apps-entry .aa-all { font-size: 12.5px; font-weight: 600; color: var(--primary); display: flex; align-items: center; }
.all-apps-entry .aa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; }
.all-apps-entry .aa-cell { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 11px 4px 9px;
  border-radius: 14px; background: transparent; color: var(--text-1); transition: background .12s, transform .12s; }
.all-apps-entry .aa-cell:active { background: var(--primary-weak); transform: scale(.96); }
.all-apps-entry .aa-cell .aa-ic { width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 2px 8px rgba(20,24,39,.10); }
.all-apps-entry .aa-cell .aa-ic svg { width: 24px; height: 24px; }
.all-apps-entry .aa-cell .aa-name { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }

/* 全部工具 · 分类目录（v116 图标化重做） */
.apps-group { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); border: 1px solid rgba(20,24,39,.04); overflow: hidden; }
.apps-ghead { display: flex; align-items: center; gap: 10px; padding: 15px 16px 11px; }
.apps-gic { width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.apps-gic svg { width: 17px; height: 17px; }
.apps-ghead b { font-size: 14.5px; font-weight: 800; letter-spacing: -.2px; flex: 1 1 auto; }
.apps-gcount { font-size: 11px; font-weight: 700; color: var(--text-3); background: var(--bg); border-radius: 20px; padding: 3px 9px; flex: 0 0 auto; }
.apps-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 6px; padding: 4px 10px 14px; }
.aa-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 14px 4px 12px; border: 0; background: transparent; border-radius: 14px; text-align: center;
  color: var(--text-1); transition: background .12s, transform .12s; }
.aa-item:active { background: var(--primary-weak); transform: scale(.96); }
.aa-ic { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 2px 8px rgba(20,24,39,.10); }
.aa-ic svg { width: 26px; height: 26px; }
.aa-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aa-arrow { display: none; }

/* 头像弹窗预览 */
.avatar-preview { width: 88px; height: 88px; border-radius: 24px; margin: 0 auto; overflow: hidden;
  background: var(--grad-soft); color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; box-shadow: var(--shadow); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

/* 首页快捷卡 */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick {
  background: var(--card); border-radius: 18px; padding: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 9px; text-align: left; border: 1px solid rgba(20,24,39,.03); transition: transform .12s;
}
.quick:active { transform: scale(.97); }
.quick .ic { width: 42px; height: 42px; border-radius: 13px; background: var(--grad-soft); display: flex; align-items: center; justify-content: center; }
.quick .ic svg { width: 23px; height: 23px; stroke: var(--primary); }
.quick .t { font-size: 15px; font-weight: 700; }
.quick .d { font-size: 12px; color: var(--text-3); }

/* section 标签 */
.section-label { font-size: 14px; font-weight: 700; color: var(--text); margin: 4px 2px 10px; display: flex; align-items: center; gap: 7px; }
.section-label::before { content: ''; width: 4px; height: 15px; background: var(--grad); border-radius: 3px; }

/* 金额展示 */
.amount-big { font-size: 26px; font-weight: 800; letter-spacing: .3px; }
.amount-big.in { color: var(--green); }
.amount-big.out { color: var(--red); }

/* 计算器 */
.calc-display { background: #15181f; border-radius: 18px; padding: 20px 18px; text-align: right; color: #fff; margin-bottom: 14px; box-shadow: var(--shadow); }
.calc-expr { font-size: 15px; color: #98a0ad; min-height: 20px; word-break: break-all; }
.calc-result { font-size: 36px; font-weight: 800; margin-top: 8px; word-break: break-all; letter-spacing: .5px; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.calc-keys button {
  height: 56px; border-radius: 15px; font-size: 21px; font-weight: 700; background: #fff; box-shadow: var(--shadow-sm); color: var(--text);
}
.calc-keys button:active { transform: scale(.94); }
.calc-keys button.op { background: var(--primary-weak); color: var(--primary); }
.calc-keys button.eq { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.calc-keys button.fn { background: #f1f3f7; color: var(--text-2); font-size: 16px; }

/* 金额大写 */
.upper-box { background: var(--grad-soft); border-radius: 16px; padding: 20px; margin: 4px 0 14px; border: 1px solid var(--primary-line); }
.upper-text { font-size: 23px; font-weight: 800; color: var(--primary); word-break: break-all; line-height: 1.45; }
.upper-hint { font-size: 12.5px; color: var(--text-2); margin-top: 10px; }

/* 空态 */
.empty { text-align: center; padding: 52px 20px; color: var(--text-3); }
.empty svg { width: 58px; height: 58px; stroke: var(--text-4); opacity: .8; margin-bottom: 14px; }
.empty p { margin: 6px 0; font-size: 14px; }
/* 空状态行动按钮（v111）：带 CTA 时居中展示，给下一步明确出口 */
.empty-cta { margin-top: 14px; }

/* 搜索框 */
.search { display: flex; align-items: center; gap: 9px; background: var(--card); border: 1.5px solid var(--line-2); border-radius: 14px; padding: 0 14px; height: 46px; box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s; }
.search:focus-within { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(109,40,217,.10); }
.search svg { width: 19px; height: 19px; stroke: var(--text-3); flex: 0 0 auto; }
.search input { border: none; outline: none; flex: 1; background: transparent; height: 100%; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(17,21,32,.5); backdrop-filter: blur(2px); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.picker-mask { z-index: 60; } /* 日期选择器叠加在表单之上 */
.modal {
  width: 100%; max-width: 520px; background: rgba(247,247,250,.92); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border-radius: 24px 24px 0 0;
  max-height: 92vh; overflow-y: auto; padding: 6px 18px calc(22px + var(--safe-b)); animation: modalSpring .42s cubic-bezier(.2,1.3,.35,1);
}
@keyframes modalSpring { 0% { transform: translateY(100%) scale(.96); opacity: .4; } 60% { transform: translateY(0) scale(1.01); opacity: 1; } 100% { transform: translateY(0) scale(1); } }
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 16px; position: sticky; top: 0; background: rgba(247,247,250,.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 2; }
.modal-hd h3 { margin: 0; font-size: 18px; font-weight: 800; }
.modal-hd .close { font-size: 26px; color: var(--text-3); line-height: 1; padding: 2px 6px; }

/* 新手引导分步卡片（v111） */
.ob-body { text-align: center; padding: 8px 6px 4px; }
.ob-art { width: 96px; height: 96px; margin: 6px auto 16px; border-radius: 28px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 12px 30px var(--primary-weak); }
.ob-art svg { width: 50px; height: 50px; color: #fff; stroke: #fff; }
.ob-step { font-size: 12px; color: var(--text-3); letter-spacing: .5px; margin-bottom: 6px; }
.ob-title { font-size: 20px; font-weight: 800; color: var(--text-1); margin-bottom: 10px; }
.ob-desc { font-size: 14px; line-height: 1.7; color: var(--text-3); max-width: 320px; margin: 0 auto 4px; }
.ob-dots { display: flex; justify-content: center; gap: 8px; padding: 16px 0 2px; }
.ob-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: all .2s; }
.ob-dot.on { width: 22px; border-radius: 4px; background: var(--primary); }
.ob-dot.done { background: var(--primary-2); }
.ob-foot { padding-top: 6px; }
.ob-foot .btn.ghost { flex: 0 0 auto; }

/* Toast */
.toast { position: fixed; left: 50%; top: 44%; transform: translate(-50%, -50%); background: rgba(17,21,32,.92); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 100; opacity: 0; transition: opacity .22s; pointer-events: none; max-width: 80%; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.toast.show { opacity: 1; }

/* 节点 */
.node { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.node:last-child { border-bottom: none; }
.node .nm { font-size: 14.5px; font-weight: 600; }
.node .nm.done { text-decoration: line-through; color: var(--text-3); }
.node .nt { font-size: 12.5px; color: var(--text-3); margin-top: 3px; word-break: break-word; }

.list-split { display: flex; justify-content: space-between; align-items: center; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.list-split:last-child { border-bottom: none; }
.list-split .l { color: var(--text-2); font-weight: 500; }
.divider { height: 1px; background: var(--line); margin: 6px 0; }
.coop-h { font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: .3px; margin: 4px 2px 2px; display: flex; align-items: center; gap: 6px; }
.coop-h::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--grad); }

/* 首页：运气抽签入口卡 */
.draw-card { display: flex; align-items: center; gap: 13px; padding: 16px; cursor: pointer; transition: transform .12s; }
.draw-card:active { transform: scale(.985); }
.dc-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--grad-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.dc-ic svg { width: 24px; height: 24px; }
.dc-main { flex: 1; min-width: 0; }
.dc-t { font-size: 15.5px; font-weight: 700; }
.dc-s { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.dc-arrow { color: var(--text-4); flex: 0 0 auto; }
.dc-arrow svg { width: 18px; height: 18px; }

/* 运气抽签弹窗 */
.draw-wrap { text-align: center; padding: 6px 2px 4px; }
.draw-lv { font-size: 30px; font-weight: 800; letter-spacing: 1px; margin: 6px 0 16px; text-shadow: 0 2px 12px rgba(124,58,237,.18); }
.draw-ticket { background: var(--grad-soft); border: 1px solid var(--primary-line); border-radius: 18px; padding: 18px 16px; text-align: left; }
.dt-line { font-size: 14px; line-height: 1.7; color: var(--text); }
.dt-row { display: flex; gap: 12px; margin: 14px 0 10px; }
.dt-cell { flex: 1; background: #fff; border-radius: 12px; padding: 10px; text-align: center; box-shadow: var(--shadow-sm); }
.dt-cell span { display: block; font-size: 11.5px; color: var(--text-3); }
.dt-cell b { font-size: 18px; font-weight: 800; }
.dt-yi { font-size: 12.5px; color: var(--primary); font-weight: 600; text-align: center; padding-top: 6px; }
.draw-wrap .btn { margin-top: 12px; }
.draw-wrap .btn.ghost { margin-top: 12px; }

/* ============================================================
 * 首页精简版组件（v3.1）：小药丸 / 双卡 / 心情 / 星座 / 灵感 / 横滑工具
 * ============================================================ */
/* Hero 统计小药丸 */
.hero .h-pill {
  flex: 1 1 0; min-width: 0; background: rgba(255,255,255,.14); border-radius: 15px; padding: 10px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; overflow: hidden;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.10);
}
.hero .h-pill b { font-size: 16px; font-weight: 800; letter-spacing: -.3px; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hero .h-pill span { font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* 今日心情 */
.mood-copy { font-size: 13px; line-height: 1.62; color: var(--text); min-height: 42px; }
.mood-emojis { display: flex; gap: 5px; margin-top: 10px; }
.mood-emoji {
  flex: 1; height: 31px; border-radius: 9px; background: #F5F5F8; font-size: 16px;
  display: flex; align-items: center; justify-content: center; border: 1px solid transparent; transition: all .15s;
}
.mood-emoji.on { background: var(--primary-weak); border-color: var(--primary-line); transform: scale(1.05); }
.mood-emoji:active { background: var(--primary-weak); }

/* 星座运势 */
.cosmo-sign { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.cosmo-stars { color: #E0A800; font-size: 13px; letter-spacing: 2px; margin: 5px 0 7px; }
.cosmo-line { font-size: 12.5px; color: var(--text-2); line-height: 1.5; min-height: 38px; }
.cosmo-luck { display: flex; gap: 8px; margin-top: 8px; }
.cosmo-luck .luck { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-2); }
.cosmo-luck .luck i { width: 9px; height: 9px; border-radius: 50%; }
.cosmo-tip { font-size: 11px; color: var(--text-3); margin-top: 7px; }
.cosmo-empty { font-size: 13px; color: var(--text-3); text-align: center; padding: 20px 0; line-height: 1.7; }

/* 灵感速记卡 */
.insp-card .insp-go { margin-top: 12px; }
.insp-prev { display: flex; gap: 10px; align-items: flex-start; }
.insp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); margin-top: 7px; flex: 0 0 8px; }
.insp-prev-main { flex: 1; min-width: 0; }
.insp-prev-text { font-size: 14.5px; line-height: 1.5; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.insp-prev-meta { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* 灵感列表 */
.item-card.insp-item { align-items: center; }
.item-card.insp-item::before { background: linear-gradient(180deg, #7C3AED, #A855F7); }
.insp-text { font-size: 14.5px; line-height: 1.5; word-break: break-word; }

/* 快捷工具横滑条 */
.quick-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.quick-strip::-webkit-scrollbar { display: none; }
.quick-chip {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 62px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 14px; padding: 11px 4px; box-shadow: var(--shadow-sm);
}
.quick-chip .qc-ic { width: 26px; height: 26px; color: var(--primary); display: flex; align-items: center; justify-content: center; }
.quick-chip .qc-ic svg { width: 23px; height: 23px; stroke: var(--primary); }
.quick-chip .qc-t { font-size: 11.5px; font-weight: 600; color: var(--text-2); }

/* 星座选择（个人资料） */
.zodiac-wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.zodiac-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px;
  border-radius: 11px; background: #F5F5F8; border: 1px solid transparent; font-size: 15px; color: var(--text-2); transition: all .15s;
}
.zodiac-btn span { font-size: 10.5px; }
.zodiac-btn.active { background: var(--primary-weak); color: var(--primary); border-color: var(--primary-line); font-weight: 700; }

/* 今日日期 + 滑动看板（仅该板块横向滑动，不影响整页滚动） */
.daily-date { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 10px; }
.daily-date b { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.daily-date span { font-size: 12.5px; color: var(--text-3); }
.daily-date .dd-right { margin-left: auto; color: var(--primary); font-weight: 700; }

.board { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.board::-webkit-scrollbar { display: none; }
.board-card { flex: 0 0 100%; scroll-snap-align: center; background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--hairline); min-height: 140px; display: flex; flex-direction: column; }
.board-card .bc-h { font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.board-card .bc-h::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--grad); }
.ov-line { font-size: 14px; font-weight: 700; color: var(--text); margin: auto 0 6px; }
.ov-yiji { font-size: 12.5px; color: var(--text-3); }
.ov-foot { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.board-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.board-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: all .2s; cursor: pointer; }
.board-dots i.on { width: 18px; border-radius: 3px; background: var(--primary); }

/* ============================================================
 * 动态效果 / 会员徽章 / 账号卡 / 签到卡 / 登录弹窗 / 庆祝纸屑 / 水波纹
 * ============================================================ */

/* 首页：日期行的登录入口（小药丸按钮） */
.daily-date .dd-right {
  margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--primary);
  background: var(--primary-weak); border: 1px solid var(--primary-line);
  border-radius: 14px; padding: 4px 11px; cursor: pointer; white-space: nowrap;
  transition: transform .12s, background-color .16s;
}
.daily-date .dd-right.on { background: var(--grad-soft); }
.daily-date .dd-right:active { transform: scale(.95); }

/* 首页 Hero 保留渐变流动，去掉整体缩放呼吸（缩放会触发整块重绘，低端机卡顿） */
.hero { animation: gradMove 14s ease infinite; }

/* 看板卡片入场（错峰） */
.board-card { animation: cardIn .5s both; }
.board-card:nth-child(2) { animation-delay: .06s; }
.board-card:nth-child(3) { animation-delay: .12s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* 抽签图标轻柔浮动 */
.dc-ic { animation: floatY 3s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* 签到打卡卡 */
.checkin-card {
  display: flex; align-items: center; gap: 13px; padding: 15px 16px;
  border-radius: 20px; color: #fff; cursor: pointer; position: relative; overflow: hidden;
  background-image: linear-gradient(120deg, #2E1065, #4C1D95, #6D28D9, #2E1065);
  background-size: 300% 300%; animation: gradMove 10s ease infinite, cardIn .5s both;
  box-shadow: var(--shadow-lg);
}
.checkin-card.done { background-image: linear-gradient(120deg, #1f1147, #3b1d7a); filter: saturate(.92); }
.ci-left { flex: 0 0 auto; }
.ci-flame { font-size: 30px; line-height: 1; animation: flameBob 2.4s ease-in-out infinite; transform-origin: bottom center; }
@keyframes flameBob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
.ci-main { flex: 1; min-width: 0; }
.ci-t { font-size: 15.5px; font-weight: 800; letter-spacing: .3px; }
.ci-sub { font-size: 12px; opacity: .9; margin-top: 2px; }
.ci-week { display: flex; gap: 4px; margin-top: 8px; }
.ci-dot { width: 20px; height: 20px; border-radius: 7px; background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; opacity: .8; }
.ci-dot.on { background: rgba(255,255,255,.92); color: var(--primary); opacity: 1; box-shadow: 0 2px 8px rgba(255,255,255,.35); }
.ci-right { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.ci-streak { text-align: center; line-height: 1; }
.ci-streak b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ci-streak span { display: block; font-size: 10px; opacity: .85; margin-top: 2px; }
.ci-btn { font-size: 13px; font-weight: 800; padding: 7px 16px; border-radius: 16px; background: #fff; color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,.18); transition: transform .12s; }
.ci-btn.ok { background: rgba(255,255,255,.22); color: #fff; box-shadow: none; }
.checkin-card:active .ci-btn { transform: scale(.93); }
.ci-btn.pulse { position: relative; }
.ci-btn.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 16px; border: 2px solid #fff; animation: pulseRing 1.6s ease-out infinite; }
@keyframes pulseRing { 0% { transform: scale(.85); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }

/* 会员徽章（VIP 卡左上角） */
.vip-badge { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 12px; font-weight: 800; letter-spacing: .5px; padding: 4px 11px; border-radius: 20px;
  background: rgba(124,58,237,.30); border: 1px solid rgba(196,181,253,.55); color: #F3ECFF; margin-bottom: 14px; backdrop-filter: blur(4px); }
.vb-ic { font-size: 14px; line-height: 1; }
.vip-ci { position: relative; z-index: 1; font-size: 12.5px; opacity: .95; margin-top: 12px; }
.vip-ci b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* 账号卡 */
.account-card .ac-flag { font-size: 11.5px; font-weight: 700; color: var(--green); background: var(--green-weak); padding: 2px 9px; border-radius: 12px; }
.account-card .ac-row { display: flex; align-items: center; gap: 12px; }
.ac-avatar { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; flex: 0 0 auto; overflow: hidden; }
.ac-avatar.guest { background: var(--primary-weak); color: var(--primary); }
.ac-avatar svg { width: 24px; height: 24px; stroke: var(--primary); }
.ac-info { flex: 1; min-width: 0; }
.ac-name { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.login-badge { width: 56px; height: 56px; border-radius: 18px; background: var(--grad-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin: 2px auto 16px; }
.login-badge svg { width: 28px; height: 28px; stroke: var(--primary); }

/* 庆祝纸屑 */
.confetti-layer { position: fixed; inset: 0; z-index: 200; pointer-events: none; overflow: hidden; }
.confetti-layer i { position: absolute; border-radius: 2px; opacity: .95; animation: confettiFly .95s cubic-bezier(.18,.7,.3,1) forwards; }
@keyframes confettiFly { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }

/* 点击水波纹（需 position:relative + overflow:hidden 的容器） */
.btn, .quick-chip, .menu-item, .vip-edit, .checkin-card, .ic-btn, .mood-emoji, .zodiac-btn, .chip { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .16;
  transform: scale(0); transform-origin: center; animation: ripple .6s ease-out forwards; pointer-events: none; z-index: 5; }
@keyframes ripple { to { transform: scale(2.4); opacity: 0; } }

/* ============================================================
 * 极光玻璃风格（Aurora Glass）· 背景 / 光效 / 入场 / 旋转辉光
 * ============================================================ */

/* 极光背景（v65 缩小）：顶部小光晕 + 纯净底色，避免大浅紫占满上半屏 */
.app-bg { display: none !important; }
.app-bg .b1, .app-bg .b2, .app-bg .b3 { position: absolute; border-radius: 50%; filter: blur(52px); }
.app-bg .b1 { width: 300px; height: 300px; left: -70px; top: -50px; background: radial-gradient(circle, #8B5CF6, transparent 70%); opacity: .40; }
.app-bg .b2 { width: 340px; height: 340px; right: -90px; top: 120px; background: radial-gradient(circle, #38BDF8, transparent 70%); opacity: .30; }
.app-bg .b3 { width: 320px; height: 320px; left: 24%; bottom: -80px; background: radial-gradient(circle, #A855F7, transparent 70%); opacity: .28; }
:root[data-theme="dark"] .app-bg { background: linear-gradient(180deg, #171226 0%, #0F0D17 60%); }
:root[data-theme="dark"] .app-bg::before { background-image: linear-gradient(rgba(168,85,247,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(168,85,247,.05) 1px, transparent 1px); }

/* Hero 漂浮光球 */
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 120px; height: 120px; right: -34px; top: -44px; background: radial-gradient(circle, rgba(255,255,255,.35), transparent 70%); animation: floatY 5s ease-in-out infinite; }
.hero::after { width: 84px; height: 84px; left: -22px; bottom: -32px; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); animation: floatY 6.4s ease-in-out infinite reverse; }

/* 渐变文字 */
.grad-text { background: linear-gradient(120deg, #8B5CF6, #22D3EE 92%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 卡片弹性入场（导航切换时） */
.view-enter .card, .view-enter .checkin-card, .view-enter .draw-card { animation: springIn .55s cubic-bezier(.2,1.15,.3,1) both; }
@keyframes springIn { 0% { opacity: 0; transform: translateY(16px) scale(.96); } 100% { opacity: 1; transform: none; } }

/* 会员卡：克制静态质感（已去除旋转辉光与流光，避免「花里胡哨」） */
.vip-badge { position: relative; }

/* 签到成功盖章弹动 */
.ci-pop { animation: stampPop .7s cubic-bezier(.2,1.5,.4,1); }
@keyframes stampPop { 0% { transform: scale(1); } 30% { transform: scale(.94); } 55% { transform: scale(1.045); } 100% { transform: scale(1); } }

/* 数字滚动（由 JS 驱动 data-count）兜底样式 */
.count { font-variant-numeric: tabular-nums; }

/* ============================================================
 * 登录页（独立全屏，模拟原生 App 登录界面）
 * ============================================================ */
.auth-screen { min-height: calc(100vh - var(--safe-b)); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 6vh 8px 44px; text-align: center; }
.auth-top { margin-bottom: 26px; }
.auth-logo { width: 66px; height: 66px; border-radius: 21px; background: var(--grad-deep); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; box-shadow: var(--shadow-lg); }
.auth-logo svg { width: 32px; height: 32px; stroke: #fff; }
.auth-h { font-size: 22px; font-weight: 800; letter-spacing: .2px; }
.auth-sub { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.auth-card { width: 100%; max-width: 360px; background: rgba(255,255,255,.78); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border: 1px solid rgba(255,255,255,.6); border-radius: 22px; padding: 20px 18px; box-shadow: 0 12px 36px rgba(46,16,101,.12); }
.auth-card .field { text-align: left; margin-bottom: 12px; }
.auth-card .field:last-of-type { margin-bottom: 14px; }
.auth-tip { font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.6; }
.auth-skip { margin-top: 18px; font-size: 13.5px; color: var(--primary); font-weight: 600; background: none; }
.auth-skip:active { opacity: .6; }

/* 无障碍：系统开启「减弱动态效果」时关闭持续动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* ============================================================
 * 健壮性：离线提示 + 渲染错误兜底（Error Boundary）
 * ============================================================ */
.net-banner {
  position: fixed; left: 8px; right: 8px; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom, 0px));
  z-index: 200; background: linear-gradient(135deg, #b45309, #f59e0b); color: #fff;
  font-size: 12.5px; text-align: center; padding: 9px 12px; border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); line-height: 1.4;
}
.fatal {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 48px 24px; min-height: 52vh;
}
.fatal-ic { font-size: 42px; }
.fatal-h { font-size: 18px; font-weight: 700; color: var(--text-1); }
.fatal-sub {
  font-size: 13px; color: var(--text-3); max-width: 320px; line-height: 1.6;
  word-break: break-word; white-space: pre-wrap;
}

/* ============================================================
 * AI 文案（routes['ai']）— 重做 UI（v40）
 * ============================================================ */

/* 类型选择条：横向胶囊，无卡片包裹，轻量 */
.ai-type-bar {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 0; scrollbar-width: none; -ms-overflow-style: none;
}
.ai-type-bar::-webkit-scrollbar { display: none; }
.ai-type-bar .seg-btn {
  flex: 0 0 auto; padding: 8px 16px; border-radius: 20px; font-size: 13px;
  font-weight: 600; color: var(--text-2); background: #f0edfa; border: 1px solid transparent;
  transition: all .18s; white-space: nowrap;
}
.ai-type-bar .seg-btn.active {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6); color: #fff;
  box-shadow: 0 4px 12px rgba(109,40,217,.26); border-color: transparent;
}

/* 风格控制卡片：紧凑双行 */
.ai-style-card { padding: 10px 14px; }
.ai-style-row { display: flex; align-items: center; gap: 10px; }
.ai-style-row + .ai-style-row { margin-top: 8px; }
.ai-style-label {
  font-size: 12.5px; font-weight: 600; color: var(--text-3); flex: 0 0 36px;
}

/* 生成按钮：渐变主 CTA，右对齐，带微光流动 */
.ai-actions { display: flex; justify-content: flex-end; padding-top: 2px; }
.ai-generate-btn {
  display: inline-flex; align-items: center; gap: 10px;
  width: auto; min-width: 188px; height: 52px; padding: 0 26px;
  border-radius: 26px; font-size: 16px; font-weight: 700; letter-spacing: .6px;
  color: #fff; border: none; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #2E1065 0%, #6D28D9 48%, #8B5CF6 100%);
  background-size: 220% 100%;
  box-shadow: 0 10px 24px rgba(109,40,217,.34), 0 3px 10px rgba(109,40,217,.22), inset 0 1px 0 rgba(255,255,255,.20);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ai-generate-btn > * { position: relative; z-index: 1; }
.ai-generate-btn .gic { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.22); align-items: center; justify-content: center; flex: 0 0 26px; }
.ai-generate-btn .gic svg { width: 15px; height: 15px; display: block; }
.ai-generate-btn .glabel { white-space: nowrap; }
.ai-generate-btn::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.42), transparent);
  transform: skewX(-16deg); animation: aiShine 2.8s ease-in-out infinite; pointer-events: none;
}
@keyframes aiShine { 0% { left: -60%; } 55% { left: 145%; } 100% { left: 145%; } }
.ai-generate-btn:active { transform: scale(.96); box-shadow: 0 4px 14px rgba(109,40,217,.30); }
.ai-hint-wrap { margin-top: -8px; }
.ai-hint { text-align: right; color: var(--text-3); opacity: .75; }

/* 结果区 */
.ai-out {
  background: linear-gradient(135deg, #faf8ff, #f5f0ff);
  border: 1px solid rgba(139,92,246,.18);
  border-radius: var(--radius-sm, 12px);
  padding: 16px; min-height: 88px;
  line-height: 1.75; font-size: 14px;
  color: var(--text-1, #1a1822); white-space: normal;
}
.ai-out-placeholder { color: var(--text-3, #a7a2b8); font-size: 13px; text-align: center; padding: 18px 0 4px; }
.ai-text { white-space: normal; word-break: break-word; }
.ai-src-badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  color: #6b6478; background: #e8e4f5; border: 1px solid #ddd8ee;
  padding: 2px 10px; border-radius: 999px; margin-bottom: 10px;
}
.ai-src-badge.ok {
  color: #fff; background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  border-color: transparent; box-shadow: 0 3px 10px rgba(109,40,217,.25);
}

/* 历史记录 */
.ai-hist {
  border: 1px solid var(--line, #eceaf3);
  border-radius: var(--radius-sm, 12px);
  padding: 10px 12px; margin-bottom: 8px;
  background: var(--bg-1, #fff);
  transition: background .15s, border-color .15s; cursor: pointer;
}
.ai-hist:active { background: #f6f3fe; border-color: var(--primary-line, #d9cffb); }
.ai-hist-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ai-hist-top .tag.low { background: var(--primary-weak, #f1ecfe); color: var(--primary, #6d28d9); border: none; }
.ai-src {
  font-size: 11px; font-weight: 700; color: #8a8398;
  background: #f2f0f7; border-radius: 6px; padding: 1px 7px;
}
.ai-src.ok { color: #fff; background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.ai-del {
  margin-left: auto; width: 22px; height: 22px; line-height: 20px; text-align: center;
  border-radius: 50%; color: #b3adbf; font-size: 16px; flex: none;
}
.ai-del:active { color: #ef4444; background: #fde8e8; }
.ai-hist-text { font-size: 12.5px; color: var(--text-3, #a7a2b8); line-height: 1.5; }

/* ---- v52：全能工具聚合页 ---- */
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-cell {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px 14px 12px; border-radius: 14px; background: var(--bg-2);
  border: 1px solid var(--line); text-align: left; position: relative; overflow: hidden;
}
.tool-cell:active { transform: scale(.97); border-color: var(--primary-2); }
.tool-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--primary-weak); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.tool-ic svg { width: 21px; height: 21px; }
.tool-t { font-size: 14.5px; font-weight: 700; color: var(--text); margin-top: 2px; }
.tool-s { font-size: 11.5px; color: var(--text-3); }
.tool-go { position: absolute; top: 12px; right: 12px; color: var(--text-4); font-size: 16px; }
:root[data-theme="dark"] .tool-cell { background: #1E1B30; }
:root[data-theme="dark"] .tool-ic { background: #2A2348; }

/* ---- v53：客户管理 CRM ---- */
.cust-hd { display: flex; align-items: center; gap: 12px; }
.cust-ava { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff; font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cust-info { flex: 1; min-width: 0; }
.cust-name { font-size: 16px; font-weight: 800; }
.cust-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.cust-stage-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 14px 0 8px; }
.cust-stages { display: flex; flex-wrap: wrap; gap: 8px; }
.cust-stages button { padding: 7px 14px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); }
.cust-stages button.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-brand); }
/* 跟进时间线 */
.fu-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.fu-item:last-child { border-bottom: none; }
.fu-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--primary-2); margin-top: 5px; }
.fu-main { flex: 1; min-width: 0; }
.fu-time { font-size: 11.5px; color: var(--text-4); }
.fu-note { font-size: 14px; color: var(--text); margin-top: 3px; line-height: 1.55; word-break: break-word; }

/* ---- v53：业绩报表 ---- */
.rp-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.rp-k-t { font-size: 12px; color: var(--text-3); }
.rp-k-v { font-size: 18px; font-weight: 800; color: var(--text); margin-top: 3px; font-variant-numeric: tabular-nums; }
.rp-stage { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rp-stage:last-child { margin-bottom: 0; }
.rp-sn { flex: 0 0 auto; width: 52px; font-size: 12.5px; color: var(--text-2); }
.rp-stage .st-bar { flex: 1; }
.rp-sv { flex: 0 0 auto; width: 30px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---- v53：全局搜索 ---- */
.go-arrow { flex: 0 0 auto; color: var(--text-4); font-size: 16px; }

/* ---- v53：首页到期提醒 ---- */
.rm-card { padding: 8px 16px; }
.rm-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.rm-item:last-child { border-bottom: none; }
.rm-ic { font-size: 16px; }
.rm-item b { font-weight: 700; color: var(--text); }
.rm-item b.warn { color: var(--red); }
.rm-go { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--primary); white-space: nowrap; }
/* 提醒规则设置 */
.rm-rules { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.rmr-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg); border-radius: 10px; font-size: 13px; }
.rmr-row span:first-child { flex: 1; color: var(--text-2); }
.rmr-row span:nth-child(2) { color: var(--text-3); font-size: 12px; min-width: 100px; text-align: right; }
.rmr-row span:nth-child(2) b { color: var(--primary); }
:root[data-theme="dark"] .cust-stages button { background: #171527; }
:root[data-theme="dark"] .rp-kpi { background: #1E1B30; }

/* ---- v54：首页「今日数据」合并卡 ---- */
.hd-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.hd-cell {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 8px; text-align: center; transition: all .15s; min-width: 0;
}
.hd-cell:active { transform: scale(.96); border-color: var(--primary-2); }
.hd-t { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.hd-v { font-size: 17px; font-weight: 800; color: var(--text); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.hd-s { font-size: 11px; color: var(--text-4); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .hd-cell { background: #171527; }

/* ============================================================
 * 桌面端「后台」布局（宽屏自动切换，手机端保持原样）
 * ============================================================ */
.side-nav { display: none; }

@media (min-width: 768px) {
  #app { max-width: none; flex-direction: row; height: 100vh; }
  /* 桌面侧边栏（完整功能菜单） */
  .side-nav {
    display: flex; flex-direction: column; width: 224px; flex: 0 0 224px;
    background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-right: 1px solid var(--line); padding: 18px 12px; overflow-y: auto;
    z-index: 20;
  }
  .side-nav .sn-brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 18px; }
  .side-nav .sn-logo { width: 32px; height: 32px; border-radius: 10px; background: var(--grad-deep); box-shadow: 0 4px 12px rgba(46,16,101,.28); display: flex; align-items: center; justify-content: center; font-size: 15px; flex: 0 0 auto; }
  .side-nav .sn-brand b { font-size: 15.5px; font-weight: 800; letter-spacing: .2px; }
  .side-nav .sn-group { margin-bottom: 4px; }
  .side-nav .sn-gt { font-size: 11px; color: var(--text-4); font-weight: 700; padding: 10px 10px 4px; letter-spacing: .8px; }
  .side-nav button { display: flex; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; font-size: 13.5px; color: var(--text-2); font-weight: 500; transition: all .15s; }
  .side-nav button:active { background: var(--bg-2); transform: scale(.99); }
  .side-nav button:hover { background: var(--bg-2); }
  .side-nav button.active { background: var(--primary-weak); color: var(--primary); font-weight: 700; }
  /* 手机底栏与手机顶栏隐藏 */
  .bottom-nav { display: none; }
  .app-header { display: flex !important; position: absolute; top: 0; right: 0; left: 224px; height: var(--header-h); background: rgba(245,244,250,.8); border-bottom: 1px solid var(--line); z-index: 15; }
  /* 内容区：顶部留出标题栏，内容居中限宽 */
  .app-view { padding: calc(var(--header-h) + 14px) 28px 32px; max-width: none; }
  .app-view > .view-section, .app-view > .card, .app-view > .rb-trend, .app-view > .money-card, .app-view > .hero,
  .app-view > .quick-add, .app-view > .quick-strip, .app-view > .mini-stats, .app-view > .filter-bar,
  .app-view > .search, .app-view > .chips, .app-view > .empty, .app-view > .hd-grid, .app-view > .rp-kpis {
    max-width: 1080px; margin-left: auto; margin-right: auto;
  }
  .btn.fab { right: 26px; bottom: 26px; }
}

/* 桌面深色模式侧边栏 */
@media (min-width: 768px) {
  :root[data-theme="dark"] .side-nav { background: rgba(20,18,28,.92); }
  :root[data-theme="dark"] .app-header { background: rgba(15,13,23,.85); }
}

/* ---- v59：登录页增强 ---- */
.auth-glow { position: fixed; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.18), transparent 70%); filter: blur(30px); top: -120px; right: -80px; pointer-events: none; z-index: 0; }
.auth-screen { position: relative; }
.auth-card { background: rgba(255,255,255,.82); border: 1px solid rgba(255,255,255,.7); box-shadow: 0 18px 50px rgba(46,16,101,.16); }

/* ---- v59：桌面顶栏账号入口 ---- */
.hd-account {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 16px;
  background: var(--primary-weak); color: var(--primary); font-size: 13px; font-weight: 700;
  white-space: nowrap;
}
.hd-account.login { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.hd-account:active { transform: scale(.96); }

/* ---- v59：桌面侧边栏版本号 ---- */
.sn-ver { margin-top: auto; padding: 12px 10px 4px; font-size: 11px; color: var(--text-4); border-top: 1px solid var(--line); }
.pf-ver { text-align: center; font-size: 11px; color: var(--text-4); padding: 6px 0 2px; letter-spacing: .3px; }
/* side-nav 的 display:flex 已在 @media(min-width:900px) 内完整定义；
   此处不可再写 .side-nav{display:flex}，否则会覆盖第 1339 行的移动端 display:none */

/* ---- v59：桌面登录页居中 ---- */
@media (min-width: 900px) {
  .auth-screen { min-height: 100vh; }
  .auth-card { max-width: 380px; }
  .auth-top .auth-h { font-size: 24px; font-weight: 800; }
}

/* ============================================================
 * P0/P1：工作台首页 KPI 仪表盘 + 分组快捷入口
 * 商务级：白卡细描边、大数字、清晰分组，解决"信息太挤/重点不清"
 * ============================================================ */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi-card {
  position: relative; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--card-line);
  border-radius: var(--radius-sm); padding: 14px 14px 13px;
  box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; flex-direction: column; gap: 5px; min-height: 94px;
  transition: transform .15s, box-shadow .2s;
}
.kpi-card:active { transform: scale(.98); box-shadow: var(--shadow); }
.kpi-card .kc-ic { position: absolute; right: 12px; top: 12px; width: 26px; height: 26px; color: var(--primary); opacity: .92; }
.kpi-card .kc-ic svg { width: 22px; height: 22px; stroke: var(--primary); }
.kpi-card .kc-t { font-size: 12.5px; color: var(--text-2); font-weight: 600; position: relative; z-index: 1; }
.kpi-card .kc-v { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.5px; line-height: 1.06; font-variant-numeric: tabular-nums; word-break: break-all; }
.kpi-card .kc-v .pre { font-size: 13px; font-weight: 700; margin-right: 1px; color: var(--text-2); }
.kpi-card .kc-s { font-size: 11.5px; color: var(--text-3); margin-top: auto; }
.kpi-card.accent-cyan { background: linear-gradient(152deg, var(--cyan-weak) 0%, var(--card) 68%); }
.kpi-card.accent-cyan .kc-ic, .kpi-card.accent-cyan .kc-ic svg { color: var(--cyan); }
.kpi-card.accent-green { background: linear-gradient(152deg, var(--green-weak) 0%, var(--card) 68%); }
.kpi-card.accent-green .kc-ic, .kpi-card.accent-green .kc-ic svg { color: var(--green); }
.kpi-card.accent-amber { background: linear-gradient(152deg, var(--amber-weak) 0%, var(--card) 68%); }
.kpi-card.accent-amber .kc-ic, .kpi-card.accent-amber .kc-ic svg { color: var(--amber); }

/* 分组快捷入口（4 列网格，图标 + 文字，≥44px 点击区） */
.sc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sc-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 4px; border-radius: var(--radius-xs);
  background: var(--bg-1); border: 1px solid var(--line);
  transition: transform .15s, box-shadow .2s; min-height: 44px;
}
.sc-item:active { transform: scale(.96); box-shadow: var(--shadow-sm); }
.sc-ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-weak); color: var(--primary);
}
.sc-ic svg { width: 21px; height: 21px; stroke: var(--primary); }
.sc-t { font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; }

/* 次级区块小标题 */
.sec-label { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 2px 2px 2px; display: flex; align-items: center; gap: 6px; }
.sec-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

/* FAB：悬浮在底部导航之上，避免遮挡 */
.btn.fab {
  position: fixed; right: 18px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 18px);
  width: 56px; height: 56px; border-radius: 18px;
  background: var(--grad); color: #fff; border: none;
  box-shadow: var(--shadow-brand); z-index: 60;
  display: flex; align-items: center; justify-content: center;
}
.btn.fab:active { transform: scale(.94); }
.btn.fab svg { width: 26px; height: 26px; stroke: #fff; }
@media (min-width: 900px) { .btn.fab { right: 26px; bottom: 26px; } }

/* P2 销售漏斗 */
.funnel { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.fn-row { display: grid; grid-template-columns: 56px 1fr 92px 72px; align-items: center; gap: 8px; }
.fn-label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.fn-bar-wrap { background: #f1f2f6; border-radius: 10px; height: 30px; overflow: hidden; position: relative; }
.fn-bar { height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--primary), #7C3AED); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; min-width: 28px; transition: width .4s ease; }
.fn-count { font-size: 12px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.fn-amt { font-size: 12.5px; font-weight: 700; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.fn-rate { font-size: 11px; color: var(--text-3); text-align: right; }
.funnel-legend { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--text-3); line-height: 1.7; }

/* 客户页快捷入口（漏斗 / 导出） */
.crm-quick { padding: 6px; }
.cq-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; }
.cq-item:active { background: var(--primary-weak); }
.cq-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-weak); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.cq-ic svg { width: 20px; height: 20px; stroke: var(--primary); }
.cq-meta { flex: 1; min-width: 0; }
.cq-t { font-size: 15px; font-weight: 700; color: var(--text); }
.cq-s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cq-go { color: var(--text-3); flex: 0 0 auto; }
.cq-go svg { width: 18px; height: 18px; stroke: var(--text-3); }

/* 跟进类型点色 */
.fu-dot.call { background: var(--primary); }
.fu-dot.wechat { background: #07C160; }
.fu-dot.visit { background: var(--green); }
.fu-dot.quote { background: var(--amber); }
.fu-dot.note { background: var(--text-3); }

/* 财务中心净利润条 */
.finance-profit { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; background: linear-gradient(90deg, var(--primary-weak), #EEF2FF); border-radius: 14px; cursor: pointer; }
.finance-profit > span:first-child { font-size: 13px; color: var(--text-2); font-weight: 600; }
.finance-profit b { font-size: 18px; font-weight: 800; letter-spacing: -.3px; flex: 1; font-variant-numeric: tabular-nums; }
.finance-profit b.in { color: var(--green); }
.finance-profit b.out { color: var(--red); }
.fp-go { color: var(--primary); }
.fp-go svg { width: 18px; height: 18px; stroke: var(--primary); }

/* 利润核算 */
.pf-line { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 14px; color: var(--text); }
.pf-line b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pf-sub { font-size: 12px; color: var(--text-3); padding: 0 0 6px; }
.pf-line.total { font-size: 15px; font-weight: 800; border: none; }
.pf-line.total b { font-size: 18px; }

/* 目标完成度 */
.goal-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.goal-line b { font-size: 14px; font-weight: 800; flex: 1; font-variant-numeric: tabular-nums; }
.goal-pct { font-size: 13px; font-weight: 800; padding: 2px 9px; border-radius: 20px; }
.goal-pct.done { background: var(--green-weak); color: var(--green); }
.goal-pct.warn { background: var(--amber-weak); color: var(--amber); }
.goal-bar { height: 8px; background: #f0f1f6; border-radius: 5px; overflow: hidden; margin-top: 6px; }
.goal-bar > i { display: block; height: 100%; border-radius: 5px; background: var(--grad); transition: width .4s ease; }
.goal-bar > i.done { background: linear-gradient(90deg, var(--green), #34d399); }
.goal-bar > i.warn { background: linear-gradient(90deg, var(--amber), #f59e0b); }

/* money-card 正/负利润着色 */
.money-card.pos .mc-big { color: var(--green); }
.money-card.neg .mc-big { color: var(--red); }

/* P4 日历视图（复用 date-picker 的 cal-* 骨架，仅调整日程页尺寸） */
.cal-page .cal-cell { height: 52px; border-radius: 10px; padding: 5px 2px 3px; flex-direction: column; gap: 3px; cursor: pointer; position: relative; }
.cal-page .cal-cell:active { background: var(--primary-weak); }
.cal-page .cal-cell.mute .cal-num { opacity: .35; }
.cal-page .cal-num { font-size: 13px; font-weight: 600; line-height: 1.2; }
.cal-dots { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 10px; flex-wrap: wrap; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.cal-dot.t-task { background: var(--primary); }
.cal-dot.t-meeting { background: var(--green); }
.cal-dot.t-follow { background: var(--cyan); }
.cal-dot.t-deal { background: var(--amber); }
.cal-dot.t-ledger { background: #7C3AED; }
.cal-more { font-size: 9px; color: var(--text-3); font-weight: 800; line-height: 1; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cal-lg { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3); }
.cal-lg .cal-dot { width: 8px; height: 8px; }

/* P4 到期提醒中心 */
.rm-main { flex: 1; min-width: 0; }
.rm-main b { font-size: 14px; font-weight: 700; color: var(--text); display: block; }
.rm-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.rm-grp-t { font-size: 13px; font-weight: 800; color: var(--text-2); padding: 12px 2px 4px; display: flex; align-items: center; gap: 6px; }
.rm-grp-t b { font-size: 12px; background: var(--primary-weak); color: var(--primary); border-radius: 20px; padding: 1px 8px; }
.rm-grp-t.warn { color: var(--red); }
.rm-grp-t.warn b { background: var(--red-weak); color: var(--red); }

/* P5 素材/话术卡片 */
.as-text { white-space: pre-wrap; font-size: 13px; color: var(--text-2); line-height: 1.7; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; max-height: 130px; overflow: hidden; }
.speech-quick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.speech-quick .chip { flex: 0 0 auto; padding: 7px 13px; }

/* 字典管理 */
.dict-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.dict-title { font-size: 15px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }
.dict-title .sub { font-size: 11px; font-weight: 600; color: var(--primary); background: var(--primary-weak); padding: 2px 8px; border-radius: 20px; }
.dict-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.dict-item:last-of-type { border-bottom: none; }
.dict-k { font-size: 11px; font-weight: 700; color: var(--text-3); background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; font-family: ui-monospace, monospace; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dict-t { flex: 1; font-size: 14.5px; font-weight: 700; color: var(--text); }
.dict-ops { display: flex; gap: 6px; flex: 0 0 auto; }
.sys-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.sys-chip { display: inline-flex; align-items: baseline; gap: 4px; font-size: 12.5px; color: var(--text-2); background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 5px 11px; }
.sys-chip b { font-size: 15px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }

/* 商用授权卡片 */
.lic-card { padding: 14px 16px; }
.lic-row { display: flex; align-items: center; gap: 12px; }
.lic-badge { font-size: 12px; font-weight: 800; letter-spacing: .5px; padding: 4px 10px; border-radius: 8px; background: var(--bg); color: var(--text-3); border: 1px solid var(--line-2); flex: 0 0 auto; }
.lic-badge.on { background: linear-gradient(135deg, #4F46E5, #7C3AED); color: #fff; border: none; box-shadow: 0 4px 14px rgba(109, 40, 217, .35); }
.lic-plans { display: flex; flex-direction: column; gap: 8px; }
.lic-plan { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.lic-plan b { font-size: 14px; color: var(--text); }
.lic-plan span { font-size: 13px; color: var(--primary); font-weight: 700; }
.lic-meta { flex: 1; min-width: 0; }
.lic-t { font-size: 14.5px; font-weight: 800; color: var(--text); }
.lic-s { font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.lic-gen-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.lic-gen-row .chip { flex: 0 0 auto; }
.lic-dim { background: var(--bg) !important; color: var(--text-3) !important; font-weight: 600 !important; cursor: default; }

/* ================= 个人中心 v79 视觉升级 ================= */
/* 会员 Hero 卡（玻璃拟态数据看板） */
.vip-hero { position: relative; border-radius: 26px; padding: 20px 18px 14px; color: #fff; overflow: hidden; box-shadow: 0 14px 34px rgba(20, 10, 45, .35); }
.vh-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 80% at 88% -12%, rgba(255, 255, 255, .38), transparent 55%), radial-gradient(90% 70% at -12% 112%, rgba(255, 255, 255, .16), transparent 55%); }
.vh-top { position: relative; display: flex; align-items: center; gap: 14px; }
.vh-avatar { position: relative; width: 60px; height: 60px; border-radius: 20px; flex: 0 0 60px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; background: rgba(255, 255, 255, .2); border: 2px solid rgba(255, 255, 255, .65); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); cursor: pointer; }
.vh-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 17px; }
.vh-online { position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; background: #22C55E; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.vh-info { flex: 1; min-width: 0; }
.vh-name { font-size: 19px; font-weight: 800; letter-spacing: -.3px; line-height: 1.25; }
.vh-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.vh-lv { font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .22); padding: 3px 10px; border-radius: 20px; }
.vh-no { font-size: 10.5px; opacity: .8; letter-spacing: .3px; }
.vh-edit { margin-left: auto; background: rgba(255, 255, 255, .24); color: #fff; border: 1px solid rgba(255, 255, 255, .35); border-radius: 12px; padding: 8px 15px; font-size: 13px; font-weight: 600; backdrop-filter: blur(4px); }
.vh-edit:active { transform: scale(.95); }
.vh-kpis { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.vh-kpi { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); border-radius: 16px; padding: 12px 14px; backdrop-filter: blur(6px); }
.vh-kpi b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.vh-kpi span { font-size: 11.5px; opacity: .85; margin-top: 2px; display: block; }
.vh-progress { position: relative; margin-top: 14px; }
.vh-bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.vh-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #FFFFFF, #FFD98A); box-shadow: 0 0 14px rgba(255, 255, 255, .55); transition: width .5s ease; }
.vh-txt { font-size: 11.5px; margin-top: 7px; opacity: .92; }
.vh-checkin { position: relative; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255, 255, 255, .38); font-size: 12.5px; opacity: .95; cursor: pointer; }
.vh-checkin b { font-weight: 800; }

/* 专业版订阅卡 */
.pro-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, var(--primary-weak), #EEF2FF); border: 1px solid var(--primary-line); }
.pro-card.active { background: linear-gradient(135deg, #F5F3FF, #FFF7ED); border: 1.5px solid #E9D5FF; }
.pro-badge { font-size: 12.5px; font-weight: 800; letter-spacing: .5px; padding: 6px 13px; border-radius: 10px; background: #fff; color: var(--text-3); border: 1px solid var(--line-2); flex: 0 0 auto; }
.pro-card.active .pro-badge { background: linear-gradient(135deg, #4F46E5, #7C3AED); color: #fff; border: none; box-shadow: 0 4px 14px rgba(109, 40, 217, .35); }
.pro-meta { flex: 1; min-width: 0; }
.pro-t { font-size: 15px; font-weight: 800; color: var(--text); }
.pro-s { font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.pro-btn { flex: 0 0 auto; background: #fff; color: var(--primary); border: 1px solid var(--primary-line); border-radius: 12px; padding: 9px 17px; font-size: 13px; font-weight: 700; }
.pro-card.active .pro-btn { background: linear-gradient(135deg, #4F46E5, #7C3AED); color: #fff; border: none; box-shadow: 0 4px 14px rgba(109, 40, 217, .3); }

/* 彩色入口图标（个人中心宫格） */
.pf-tool .pt-ic { transition: transform .15s ease; }
.pf-tool:active .pt-ic { transform: scale(.9); }

/* ================= C 效率：批量操作 / 订单 ================= */
.cbx { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line-2); background: var(--card); color: #fff; display: flex; align-items: center; justify-content: center; margin-right: 2px; }
.cbx.on { background: var(--grad); border-color: transparent; box-shadow: 0 2px 8px rgba(79, 70, 229, .3); }
.cbx svg { width: 15px; height: 15px; stroke: #fff; }
.item-card.sel { border-color: var(--primary-line); background: var(--primary-weak); }
.batch-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 10px 14px; background: var(--primary-weak); border: 1px solid var(--primary-line); border-radius: 14px; }
.batch-bar b { font-size: 13px; color: var(--primary); font-weight: 800; }
.batch-bar .row-2 { flex: 0 0 auto; margin: 0; }
@media (min-width: 900px) { .batch-bar { margin-top: 0; } }

/* ================= D 商用：自助购买页 ================= */
.buy-plans { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.buy-plan { border: 1.5px solid var(--line-2); border-radius: 16px; padding: 14px 10px; text-align: center; cursor: pointer; background: var(--card); transition: all .18s; }
.buy-plan.active { border-color: var(--primary); background: var(--primary-weak); box-shadow: 0 4px 16px rgba(79, 70, 229, .14); }
.buy-plan .bp-name { font-size: 14px; font-weight: 800; color: var(--text); }
.buy-plan .bp-price { font-size: 20px; font-weight: 800; color: var(--primary); margin: 6px 0 2px; letter-spacing: -.4px; }
.buy-plan .bp-price span { font-size: 11px; color: var(--text-3); font-weight: 600; }
.buy-plan .bp-feats { font-size: 11px; color: var(--text-3); }
.buy-pay { margin-top: 12px; padding: 12px 14px; background: var(--bg); border: 1px dashed var(--line-2); border-radius: 12px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.buy-ok { padding: 14px; background: var(--green-weak); border: 1px solid var(--green); border-radius: 12px; font-size: 13.5px; color: var(--text); line-height: 1.9; }
.buy-code { font-size: 20px; font-weight: 800; letter-spacing: 1px; text-align: center; padding: 16px; background: var(--primary-weak); border: 1px dashed var(--primary-line); border-radius: 12px; color: var(--primary); font-family: ui-monospace, monospace; }

/* ================= A 经营驾驶舱 ================= */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dash-box { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.dash-t { font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.dash-t .sub { font-size: 11px; color: var(--text-3); }
.dc-fn { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.dc-fn-t { flex: 0 0 44px; font-size: 11.5px; color: var(--text-2); }
.dc-fn-bar { flex: 1; height: 12px; background: #EEF0F6; border-radius: 6px; overflow: hidden; }
.dc-fn-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), #7C3AED); transition: width .4s ease; }
.dc-fn b { flex: 0 0 20px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.dc-pay-line, .dc-goal-line { display: flex; align-items: baseline; gap: 6px; }
.dc-pay-line b, .dc-goal-line b { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.dc-pay-line span, .dc-goal-line span { font-size: 12px; color: var(--text-3); }
.dc-pay-bar, .dc-goal-bar { height: 8px; background: #EEF0F6; border-radius: 5px; overflow: hidden; margin: 8px 0 6px; }
.dc-pay-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--green), #34D399); transition: width .4s ease; }
.dc-goal-bar i { display: block; height: 100%; border-radius: 5px; background: var(--grad); transition: width .4s ease; }
.dc-goal-bar i.done { background: linear-gradient(90deg, var(--green), #34D399); }
.dc-cm { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.dc-cm:last-child { border-bottom: none; }
.dc-cm span { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.dc-cm b { font-size: 13px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.dc-cmp { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--text-2); }
.dc-cmp b.in { color: var(--green); } .dc-cmp b.out { color: var(--red); }

/* 客户标签 / 子任务 */
.tag.cyan { background: var(--cyan-weak); color: var(--cyan); }

/* ================= 商机看板（Kanban） ================= */
.kb-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.kb-col { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; min-width: 140px; transition: background .15s, border-color .15s, box-shadow .15s; }
.kb-col-over { background: var(--primary-weak); border-color: var(--primary-line); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.kb-stage-tag { display: inline-block; margin-top: 7px; font-size: 11px; }
.kb-hd { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 4px; }
.kb-hd b { font-size: 13.5px; color: var(--text); }
.kb-hd span { font-size: 11.5px; font-weight: 800; color: var(--primary); background: var(--primary-weak); padding: 1px 8px; border-radius: 20px; }
.kb-cards { display: flex; flex-direction: column; gap: 8px; }
.kb-card { background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 10px; cursor: pointer; box-shadow: var(--shadow-sm); touch-action: none; user-select: none; -webkit-user-select: none; }
.kb-card:active { transform: scale(.98); }
.kb-card.kb-dragging { opacity: 0.3; transform: scale(.95); box-shadow: none; }
.kb-ghost { border-radius: 12px; box-shadow: 0 16px 48px rgba(20,18,28,.25), 0 4px 12px rgba(20,18,28,.15); transform: rotate(2deg) scale(1.04); transition: none; opacity: .92; }
.kb-col { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; min-width: 140px; transition: background .15s, border-color .15s, box-shadow .15s; }
.kb-col-over { background: var(--primary-weak); border-color: var(--primary-line); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.kb-stage-tag { display: inline-block; margin-top: 7px; font-size: 11px; }
.kb-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.kb-meta { font-size: 12px; font-weight: 800; color: var(--primary); margin-top: 4px; }
.kb-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
@media (max-width: 760px) { .kb-grid { grid-template-columns: repeat(5, 200px); } }

/* ================= D 日历周视图 ================= */
.cal-view-chips { display: flex; gap: 8px; margin-bottom: 10px; }
.cal-view-chips .chip { padding: 6px 16px; }
.cal-wgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-wcol { border-radius: 10px; padding: 5px 3px; min-height: 108px; background: var(--bg); border: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; }
.cal-wcol.today { background: var(--primary-weak); border-color: var(--primary-line); }
.cw-top { display: flex; flex-direction: column; align-items: center; padding: 4px 0 6px; }
.cw-dow { font-size: 10px; color: var(--text-3); }
.cal-wcol.today .cw-dow { color: var(--primary); font-weight: 700; }
.cw-num { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.2; }
.cal-wcol.today .cw-num { color: var(--primary); }
.cw-list { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 3px; }
.cw-ev { display: flex; align-items: center; gap: 4px; font-size: 9.5px; line-height: 1.25; color: var(--text-2); }
.cw-ev .cal-dot { flex: 0 0 auto; }
.cw-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-more { font-size: 9px; color: var(--text-3); padding-left: 4px; }

/* ================= D 下拉刷新提示 ================= */
.pull-refresh::before { content: '↓ 松开刷新'; position: sticky; top: 0; z-index: 5; display: block; text-align: center; font-size: 12px; color: var(--primary); padding: 12px 0; background: var(--bg); }

/* ================= 全局 UI v80 ================= */
/* ① 主题色：青碧（沉稳）/ 暖橙（活力）——浅色与深色各一套变量覆盖 */
:root[data-color="teal"] {
  --primary: #0D9488; --primary-2: #14B8A6; --primary-3: #2DD4BF;
  --grad: linear-gradient(135deg, #0F766E, #14B8A6);
  --grad-deep: linear-gradient(140deg, #134E4A, #0F766E 45%, #14B8A6 100%);
  --grad-soft: linear-gradient(135deg, #F0FDFA, #CCFBF1);
  --primary-weak: #F0FDFA; --primary-line: #99F6E4;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 2px 10px rgba(13,148,136,.06);
  --shadow: 0 2px 5px rgba(15,23,42,.05), 0 10px 28px rgba(13,148,136,.10);
  --shadow-lg: 0 12px 24px rgba(13,148,136,.14), 0 28px 56px rgba(13,148,136,.18);
}
:root[data-color="orange"] {
  --primary: #EA580C; --primary-2: #F97316; --primary-3: #FB923C;
  --grad: linear-gradient(135deg, #EA580C, #F97316);
  --grad-deep: linear-gradient(140deg, #7C2D12, #C2410C 45%, #EA580C 100%);
  --grad-soft: linear-gradient(135deg, #FFF7ED, #FFEDD5);
  --primary-weak: #FFF7ED; --primary-line: #FED7AA;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 2px 10px rgba(234,88,12,.06);
  --shadow: 0 2px 5px rgba(15,23,42,.05), 0 10px 28px rgba(234,88,12,.10);
  --shadow-lg: 0 12px 24px rgba(234,88,12,.14), 0 28px 56px rgba(234,88,12,.18);
}
/* 深色下仅重设主色与渐变（弱色/描边沿用默认深色变量） */
:root[data-theme="dark"][data-color="teal"] { --primary: #2DD4BF; --grad: linear-gradient(135deg, #0F766E, #2DD4BF); --primary-2: #14B8A6; }
:root[data-theme="dark"][data-color="orange"] { --primary: #FB923C; --grad: linear-gradient(135deg, #C2410C, #FB923C); --primary-2: #F97316; }

/* ② 字号调节（zoom 缩放整体，适配现代浏览器与 WebView） */
:root[data-font="sm"] { zoom: .95; }
:root[data-font="lg"] { zoom: 1.08; }

/* ③ 页面转场与列表渐入动效 */
@keyframes viewFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-enter > .view-section { animation: viewFade .3s ease both; }
.view-enter > .view-section:nth-child(2) { animation-delay: .04s; }
.view-enter > .view-section:nth-child(3) { animation-delay: .08s; }
.view-enter > .view-section:nth-child(n+4) { animation-delay: .12s; }
.view-enter > .hero, .view-enter > .money-card { animation: viewFade .3s ease both; }

/* ④ 桌面宽屏：两列网格（客户/记账/素材/话术/佣金明细） */
@media (min-width: 900px) {
  .lst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
  .lst-grid .pager-hint, .lst-grid .li-sub { grid-column: 1 / -1; }
}

/* ⑤ 表格视图（紧凑行）：客户/记账切换用 */
.list-view-toggle { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 8px; }
.lvt-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.lvt-btn.active { background: var(--primary-weak); color: var(--primary); border-color: var(--primary-line); }
.lvt-btn svg { width: 17px; height: 17px; stroke: currentColor; }
.table-view .item-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 0; }
.table-view .item-card::before { display: none; }
.table-view .li-main { flex: 1; min-width: 0; }
.table-view .li-tags { flex: 0 0 auto; display: flex; gap: 6px; }
.table-view .li-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-view .li-sub { font-size: 11.5px; }
.table-view .li-actions { flex: 0 0 auto; flex-direction: row; gap: 4px; }
.table-view .li-actions .ic-btn { width: 30px; height: 30px; }
@media (min-width: 900px) { .table-view.lst-grid { display: block; } }

/* ================= AI 智能助手（多轮对话） ================= */
.chat-layout { display: flex; gap: 0; min-height: calc(100vh - 120px); }
.chat-sidebar { width: 200px; background: var(--bg); border-right: 1px solid var(--line); padding: 12px; overflow-y: auto; flex-shrink: 0; }
.chat-side-item { position: relative; padding: 10px 8px; border-radius: 10px; cursor: pointer; margin-bottom: 4px; transition: background .12s; }
.chat-side-item:hover, .chat-side-item.active { background: var(--primary-weak); }
.chat-side-t { font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-side-d { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.chat-side-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-4); padding: 2px 6px; display: none; }
.chat-side-item:hover .chat-side-del { display: inline; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { display: flex; gap: 8px; max-width: 85%; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg.assistant { align-self: flex-start; }
.chat-msg-ava { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; background: var(--bg); }
.chat-msg-bub { padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.6; }
.chat-msg.user .chat-msg-bub { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.assistant .chat-msg-bub { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-empty { text-align: center; color: var(--text-3); padding: 40px 20px; font-size: 14px; line-height: 1.8; }
.chat-quick-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; border-top: 1px solid var(--line); }
.chat-input-bar { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }
.chat-input-bar input { flex: 1; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; font-size: 14px; background: var(--card); }
@media (max-width: 760px) {
  .chat-layout { flex-direction: column; }
  .chat-sidebar { width: 100%; max-height: 150px; border-right: none; border-bottom: 1px solid var(--line); }
  .chat-msg { max-width: 92%; }
}

/* ================= 用户管理（会员体系） ================= */
.user-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.us-item { background: var(--bg); border-radius: 12px; padding: 10px 6px; text-align: center; }
.us-item b { display: block; font-size: 18px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.us-item span { font-size: 11px; color: var(--text-3); }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px dashed var(--line); cursor: pointer; border-radius: 8px; }
.user-row:hover { background: var(--primary-weak); }
.user-ava { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-soft); color: var(--primary); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.user-main { flex: 1; min-width: 0; }
.user-name { font-size: 14px; font-weight: 700; color: var(--text); word-break: break-all; }
.user-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.user-detail-card { background: var(--bg); border-radius: 12px; padding: 6px 12px; }
.user-detail-card .list-split { padding: 7px 0; }
.user-ops { display: flex; flex-wrap: wrap; gap: 8px; }

/* 电话号码点击拨打链接 */
.tel-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.tel-link::before {
  content: '📞 ';
  font-size: 11px;
}
.tel-link:hover {
  text-decoration: underline;
  color: var(--primary-2);
}
.tel-link:active {
  color: var(--ink);
}

/* ============================================================
 * v97 新增：自定义看板 / 预警中心 / 自动化规则 / 微信工具 / 交叉分析 / 营销序列
 * ============================================================ */

/* 自定义看板卡片网格 */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.dash-card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--card-line);
  cursor: pointer;
  transition: box-shadow .15s, transform .1s;
  position: relative;
}
.dash-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.dash-card.dragging { opacity: .5; transform: scale(.97); }
.dash-card.drag-over { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-weak); }
.dash-card .dc-hd { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dash-card .dc-hd .dc-icon { font-size: 15px; }
.dash-card .dc-hd .dc-title { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .3px; }
.dash-card .dc-hd .dc-toggle { margin-left: auto; font-size: 14px; color: var(--text-4); cursor: pointer; padding: 2px; border-radius: 4px; display: none; }
.dash-card.editing .dc-toggle { display: block; }
.dash-card .dc-val { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.dash-card .dc-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.dash-card .dc-bar { margin-top: 6px; height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.dash-card .dc-bar-fill { height: 100%; border-radius: 3px; background: var(--grad); transition: width .4s; }
.dash-card .dc-list { margin-top: 6px; font-size: 11.5px; color: var(--text-2); }
.dash-card .dc-list .dc-li { padding: 3px 0; border-bottom: 1px solid var(--card-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-card .dc-list .dc-li:last-child { border-bottom: none; }
.dash-card .dc-svg { margin-top: 6px; max-width: 100%; }

/* 编辑看板按钮 */
.dash-edit-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; gap: 6px; }

/* 预警中心 */
.warn-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.warn-card { background: var(--card); border-radius: 10px; padding: 10px; text-align: center; border: 1px solid var(--card-line); }
.warn-card .wc-num { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.warn-card .wc-label { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.warn-card.urgent .wc-num { color: #DC2626; }
.warn-card.warn .wc-num { color: #EA580C; }
.warn-card.info .wc-num { color: #CA8A04; }
.warn-item { display: flex; align-items: center; padding: 10px 12px; border-radius: 8px; margin-bottom: 4px; cursor: pointer; transition: background .12s; }
.warn-item:hover { background: var(--bg); }
.warn-item .wi-badge { width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; flex-shrink: 0; }
.warn-item .wi-badge.urgent { background: #DC2626; }
.warn-item .wi-badge.warn { background: #EA580C; }
.warn-item .wi-badge.info { background: #CA8A04; }
.warn-item .wi-main { flex: 1; min-width: 0; }
.warn-item .wi-title { font-size: 13px; font-weight: 600; color: var(--text); }
.warn-item .wi-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.warn-item .wi-arrow { color: var(--text-4); font-size: 14px; flex-shrink: 0; }

/* 自动化规则 */
.flow-rule { display: flex; align-items: center; padding: 10px 12px; background: var(--card); border-radius: 10px; border: 1px solid var(--card-line); margin-bottom: 6px; gap: 8px; }
.flow-rule .fr-info { flex: 1; min-width: 0; }
.flow-rule .fr-name { font-size: 13px; font-weight: 600; color: var(--text); }
.flow-rule .fr-desc { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.flow-rule .fr-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* 微信工具 */
.wx-section { background: var(--card); border-radius: 12px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--card-line); }
.wx-section .wx-st { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.wx-preview { background: var(--bg); border-radius: 8px; padding: 10px; margin-top: 8px; }
.wx-preview .wp-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--card-line); }
.wx-preview .wp-row:last-child { border-bottom: none; }
.wx-preview .wp-label { font-size: 11px; color: var(--text-3); width: 40px; flex-shrink: 0; }
.wx-preview .wp-val { font-size: 13px; font-weight: 600; color: var(--text); }

/* 交叉分析 */
.ana-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ana-table th, .ana-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--card-line); }
.ana-table th { font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; }
.ana-table .ana-bar-cell { width: 120px; }
.ana-table .ana-bar { height: 14px; border-radius: 7px; background: var(--grad); min-width: 4px; transition: width .3s; }

/* 营销序列 */
.seq-card { background: var(--card); border-radius: 12px; padding: 14px; border: 1px solid var(--card-line); margin-bottom: 8px; }
.seq-card .sc-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.seq-card .sc-name { font-size: 14px; font-weight: 700; color: var(--text); }
.seq-card .sc-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.seq-card .sc-badge.on { background: #DCFCE7; color: #15803D; }
.seq-card .sc-badge.off { background: var(--bg-2); color: var(--text-3); }
.seq-step { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--card-line); font-size: 12px; }
.seq-step .ss-day { width: 40px; text-align: center; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.seq-step .ss-action { flex: 1; min-width: 0; color: var(--text); }
.seq-step .ss-tpl { color: var(--text-3); font-size: 11px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 批量触达 */
.reach-customer { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; margin-bottom: 4px; background: var(--bg); }
.reach-customer .rc-name { font-weight: 600; font-size: 13px; color: var(--text); }
.reach-customer .rc-phone { font-size: 11px; color: var(--text-3); }
.reach-batch { background: var(--card); border-radius: 10px; padding: 12px; margin-top: 10px; border: 1px solid var(--card-line); }
.reach-batch .rb-hd { font-weight: 700; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.reach-msg { background: var(--bg); border-radius: 8px; padding: 10px; margin-bottom: 6px; font-size: 12.5px; color: var(--text); line-height: 1.7; white-space: pre-wrap; }
.reach-msg .rm-name { font-weight: 700; color: var(--primary); }

/* 响应式 */
@media (min-width: 768px) {
  .dash-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .dash-grid { grid-template-columns: repeat(4, 1fr); }
}

/* PC 端：用户列表表格化 */
@media (min-width: 900px) {
  .user-summary { grid-template-columns: repeat(4, 1fr); }
}

/* ================= v101 会员中心 / 会员卡精致化 ================= */
/* --- Hero 卡增强：扫光 / 光环 / 角标 --- */
.vip-hero.lux { padding: 20px 18px 16px; box-shadow: 0 18px 44px rgba(20, 10, 45, .42); }
.vh-shine { position: absolute; top: 0; left: -60%; width: 45%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.22) 45%, transparent);
  transform: skewX(-18deg); animation: vhShine 4.5s ease-in-out infinite; }
@keyframes vhShine { 0% { left: -60%; } 55% { left: 130%; } 100% { left: 130%; } }
.vh-ring { position: absolute; right: -46px; top: -46px; width: 150px; height: 150px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); pointer-events: none; }
.vh-ring::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); }
.vh-corner { position: absolute; right: 0; top: 14px; font-size: 11px; font-weight: 800; letter-spacing: .4px;
  padding: 5px 12px 5px 14px; border-radius: 20px 0 0 20px; color: #fff; backdrop-filter: blur(6px);
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); border-right: none; }
.vh-corner.pro { background: linear-gradient(135deg,#FDE68A,#F59E0B); color: #4A2A00; border-color: rgba(255,255,255,.5); }
.vh-corner.trial { background: linear-gradient(135deg,#FED7AA,#FB923C); color: #4A2000; border-color: rgba(255,255,255,.5); }
.vh-plabel { display: flex; justify-content: space-between; font-size: 10.5px; opacity: .82; margin-bottom: 6px; font-weight: 700; letter-spacing: .3px; }
.vh-syncbar { position: relative; display: flex; align-items: center; gap: 7px; margin-top: 12px; padding: 8px 11px;
  background: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; font-size: 11.5px; }
.vh-sdot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; animation: sdotPulse 2s ease-in-out infinite; }
@keyframes sdotPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.vh-stxt { font-weight: 700; }
.vh-stime { margin-left: auto; opacity: .75; font-size: 10.5px; }
.vh-acts { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.vh-act { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28); border-radius: 13px;
  padding: 11px 8px; font-size: 12.5px; font-weight: 700; backdrop-filter: blur(6px); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.vh-act.primary { background: rgba(255,255,255,.94); color: #4C1D95; border-color: transparent; box-shadow: 0 6px 16px rgba(0,0,0,.22); }
.vh-act:active { transform: scale(.96); }
.vh-act svg { width: 14px; height: 14px; vertical-align: -2px; }

/* --- 权益 chips --- */
.perk-strip { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.perk-chip { font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 20px;
  background: var(--bg); color: var(--text-3); border: 1px solid var(--line-2); }
.perk-chip.on { background: var(--primary-weak); color: var(--primary); border-color: var(--primary-line); }
.upgrade-tip { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #FFF7ED, #FEF3C7); border: 1px solid #FDE68A; }
.upgrade-tip b { font-size: 13.5px; color: #92400E; }
.upgrade-tip span { font-size: 12px; color: #B45309; font-weight: 600; white-space: nowrap; }
[data-theme="dark"] .upgrade-tip { background: linear-gradient(135deg, rgba(180,83,9,.18), rgba(146,64,14,.14)); border-color: rgba(253,230,138,.28); }
[data-theme="dark"] .upgrade-tip b { color: #FDE68A; }
[data-theme="dark"] .upgrade-tip span { color: #FCD34D; }

/* --- 会员中心 Hero --- */
.mb-hero { position: relative; border-radius: 26px; padding: 22px 18px 18px; color: #fff; overflow: hidden;
  box-shadow: 0 18px 44px rgba(20, 10, 45, .42); }
.mb-chip { position: absolute; right: 16px; top: 16px; font-size: 11px; font-weight: 800; padding: 5px 12px;
  border-radius: 20px; background: rgba(255,255,255,.92); color: #4C1D95; letter-spacing: .3px; }
.mb-top { position: relative; display: flex; align-items: center; gap: 13px; }
.mb-avatar { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 18px; display: flex; align-items: center;
  justify-content: center; font-size: 22px; font-weight: 800; background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.6); overflow: hidden; }
.mb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mb-info { min-width: 0; }
.mb-name { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.mb-sub { font-size: 12px; opacity: .88; margin-top: 4px; }
.mb-big { position: relative; margin-top: 18px; }
.mb-big span { display: block; font-size: 11.5px; opacity: .82; letter-spacing: .5px; }
.mb-big b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1.2;
  font-variant-numeric: tabular-nums; text-shadow: 0 3px 12px rgba(0,0,0,.25); }
.mb-prog { position: relative; margin-top: 16px; }
.mb-plabel { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; opacity: .85; margin-bottom: 6px; }
.mb-ptxt { font-size: 11.5px; margin-top: 8px; opacity: .92; }
.mb-countdown { margin-top: 8px; }
.mb-cbar { height: 6px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.mb-cbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), #A78BFA); transition: width .5s ease; }

/* --- 同步状态面板 --- */
.sync-panel { border-radius: 14px; padding: 13px 14px; margin-bottom: 10px; border: 1px solid var(--line-2); background: var(--bg); }
.sync-panel.ok { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.3); }
.sync-panel.pending, .sync-panel.conflict { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.3); }
.sync-panel.error { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3); }
.sync-lead { display: flex; align-items: center; gap: 11px; }
.sync-dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 11px; animation: sdotPulse 2s ease-in-out infinite; }
.sync-t { font-size: 14.5px; font-weight: 800; color: var(--text); }
.sync-s { font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }

/* --- 权益网格 --- */
.perk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.perk-item { display: flex; align-items: center; gap: 8px; padding: 10px 11px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--text); }
.pi-ic { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 800; }

/* --- 对比表 --- */
.cmp-table { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.cmp-row { display: grid; grid-template-columns: 1.25fr 1fr 1.1fr; align-items: center; gap: 6px;
  padding: 10px 11px; font-size: 12px; border-bottom: 1px solid var(--line); }
.cmp-row:last-child { border-bottom: none; }
.cmp-row.head { background: var(--bg); font-weight: 800; font-size: 12px; color: var(--text-2); }
.cmp-f { color: var(--text); font-weight: 600; }
.cmp-a { color: var(--text-3); text-align: center; }
.cmp-b { color: var(--primary); font-weight: 700; text-align: center; }
.cmp-row.head .cmp-b { color: var(--primary); }
.cmp-ok { margin-top: 12px; padding: 11px 13px; border-radius: 12px; font-size: 12.5px; font-weight: 700;
  background: rgba(34,197,94,.1); color: #15803D; border: 1px solid rgba(34,197,94,.3); text-align: center; }
[data-theme="dark"] .cmp-ok { color: #4ADE80; }

/* --- 等级阶梯 --- */
.ladder { position: relative; padding-left: 4px; }
.lad-item { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.lad-item:last-child { padding-bottom: 0; }
.lad-item::before { content: ''; position: absolute; left: 15px; top: 30px; bottom: 0; width: 2px; background: var(--line-2); }
.lad-item:last-child::before { display: none; }
.lad-item.reached::before { background: var(--primary-line); }
.lad-dot { position: relative; z-index: 1; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff;
  background: var(--line-2); border: 2px solid var(--line-2); }
.lad-item:not(.reached) .lad-dot { background: var(--bg); color: var(--text-3); }
.lad-item.cur .lad-dot { box-shadow: 0 0 0 4px var(--primary-weak); }
.lad-body { flex: 1; min-width: 0; padding-top: 2px; }
.lad-name { font-size: 14px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 7px; }
.lad-item:not(.reached) .lad-name { color: var(--text-3); }
.lad-tag { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 10px;
  background: var(--primary); color: #fff; letter-spacing: .3px; }
.lad-req { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.lad-perks { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.lad-perks span { font-size: 11px; padding: 3px 9px; border-radius: 14px; background: var(--bg);
  color: var(--text-3); border: 1px solid var(--line); }
.lad-item.reached .lad-perks span { background: var(--primary-weak); color: var(--primary); border-color: var(--primary-line); }

/* --- 升级路径 --- */
.up-way { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.up-way:last-of-type { border-bottom: none; }
.up-way b { font-size: 13.5px; color: var(--text); }
.uw-n { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; background: var(--primary-weak);
  color: var(--primary); font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* --- 后台：用户会员卡 --- */
.adm-mcard { position: relative; border-radius: 18px; padding: 15px 15px 14px; color: #fff; overflow: hidden;
  box-shadow: 0 10px 26px rgba(20, 10, 45, .3); }
.amc-top { position: relative; display: flex; align-items: center; gap: 11px; }
.amc-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; display: flex; align-items: center;
  justify-content: center; font-size: 19px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); }
.amc-info { flex: 1; min-width: 0; }
.amc-plan { font-size: 15.5px; font-weight: 800; letter-spacing: -.2px; }
.amc-user { font-size: 11.5px; opacity: .85; margin-top: 2px; }
.amc-days { text-align: right; flex: 0 0 auto; }
.amc-days b { display: block; font-size: 22px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.amc-days span { font-size: 10.5px; opacity: .82; }
.amc-days.urgent b { color: #FEE2E2; text-shadow: 0 0 12px rgba(255,120,120,.7); }
.amc-bar { position: relative; height: 5px; border-radius: 5px; background: rgba(255,255,255,.25); overflow: hidden; margin-top: 12px; }
.amc-bar i { display: block; height: 100%; border-radius: 5px; background: rgba(255,255,255,.92); }
.amc-exp { position: relative; font-size: 11px; opacity: .82; margin-top: 6px; }
.adm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.ast { background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 8px; text-align: center; }
.ast b { display: block; font-size: 15px; font-weight: 800; color: var(--text); }
.ast span { font-size: 10.5px; color: var(--text-3); margin-top: 2px; display: block; }
.adm-custom { display: flex; gap: 7px; align-items: center; }
.adm-custom select, .adm-custom input { flex: 1; min-width: 0; height: 38px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--text); padding: 0 10px; font-size: 13px; }
.adm-custom input { flex: 0 1 90px; }
.adm-custom .btn { flex: 0 0 auto; height: 38px; }

/* --- 窄屏适配 --- */
@media (max-width: 360px) {
  .vh-acts { grid-template-columns: 1fr; }
  .perk-grid { grid-template-columns: 1fr; }
  .cmp-row { grid-template-columns: 1.1fr .9fr 1fr; font-size: 11.5px; padding: 9px 8px; }
  .mb-big b { font-size: 28px; }
}

/* --- 数据管理：历史版本列表 --- */
.dm-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.dm-row:last-child { border-bottom: none; }
.dm-row .dm-meta { display: flex; flex-direction: column; line-height: 1.5; }
.dm-row .dm-meta b { font-size: 13.5px; color: var(--text); }
.dm-row .dm-meta span { font-size: 11.5px; color: var(--text-4); }

/* 同步冲突解决卡片 */
.conflict-opts { display: flex; flex-direction: column; gap: 10px; }
.conflict-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; text-align: left; }
.conflict-opt b { font-size: 14px; }
.conflict-opt span { font-size: 12px; color: var(--text-4); line-height: 1.5; }

/* 设备与登录管理 */
.dm-dev-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.dm-dev-row:last-child { border-bottom: none; }
.dm-dev-main { min-width: 0; }
.dm-dev-name { font-size: 13.5px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.dm-dev-meta { font-size: 11.5px; color: var(--text-4); margin-top: 3px; line-height: 1.5; word-break: break-all; }
.dm-dev-cur { font-size: 10.5px; font-weight: 600; color: #16A34A; background: #DCFCE7; padding: 1px 7px; border-radius: 999px; }

/* 虚拟滚动列表（长列表只渲染可视区） */
.vlist { max-height: 60vh; -webkit-overflow-scrolling: touch; }
.vlist-spacer { width: 1px; }
.vlist-row { will-change: top; }
.users-vlist .vlist-row { height: 64px; }
.users-vlist .user-row { height: 64px; margin: 0; box-sizing: border-box; }
.users-vlist .user-row .user-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ============================================================
 * v110 · 全局搜索增强：关键词高亮 / 最近搜索 / 跳转定位闪烁
 * ============================================================ */
mark {
  background: var(--primary-weak);
  color: var(--primary);
  border-radius: 4px;
  padding: 0 2px;
  font-weight: inherit;
}
:root[data-theme="dark"] mark { background: #34306A; color: #C7C2FF; }

.sh-wrap { margin: 4px 2px 10px; }
.sh-hd { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 9px; }
.sh-clear { background: none; border: none; padding: 2px 4px; font-size: 12.5px; color: var(--text-3); }
.sh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-total { padding: 2px 2px 6px; }

/* 从搜索结果跳过来时，目标卡片闪烁两下 */
@keyframes wb-flash {
  0%, 100% { box-shadow: var(--shadow); }
  25%, 75% { box-shadow: 0 0 0 3px var(--primary-line), var(--shadow); }
  50% { box-shadow: 0 0 0 3px var(--primary), var(--shadow); }
}
.flash-focus { animation: wb-flash 1.6s ease; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) {
  .flash-focus { animation: none; box-shadow: 0 0 0 3px var(--primary-line), var(--shadow); }
}

/* ============================================================
 * v110 · 无障碍基础：键盘焦点可见
 * 只在键盘导航时出现（:focus-visible），鼠标点击不会冒出描边
 * ============================================================ */
:where(button, a, input, select, textarea, [tabindex], [role="button"]):focus-visible {
  outline: 2px solid var(--primary-2);
  outline-offset: 2px;
  border-radius: 8px;
}
/* 底部/侧边导航焦点贴边，减小 offset 避免被裁切 */
.bottom-nav button:focus-visible, .side-nav button:focus-visible { outline-offset: -2px; }
.modal-hd .close:focus-visible { outline-offset: 0; }

/* ================= 移动端 MVP 收口（v114 窄屏精修） ================= */
/* 极小屏（≤360）：看板 KPI 与表单双列改单列/双列紧凑，避免挤压与溢出 */
@media (max-width: 360px) {
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .row-2 { grid-template-columns: 1fr; }
  .ms b { font-size: 18px; }
  /* 弹窗内 segment 在极小屏允许换行，避免按钮被压扁 */
  .segment { flex-wrap: wrap; }
  .segment button { flex: 1 0 auto; min-width: 64px; }
}
/* 列表底部留白：防止固定 FAB（右下角）遮挡末条操作 */
#view .lst-grid, #view .view-section:last-child { padding-bottom: 92px; }
/* 弹窗表单底部留白，避免提交按钮被键盘/安全区遮挡 */
.modal .modal-foot { padding-bottom: max(16px, var(--safe-b)); }
