/* 少儿研学活动管理系统 V1.0
   主题：橙黄 + 绿色，活泼可爱，圆角卡片，桌面/移动端响应式 */
:root {
  --orange: #f6a623;
  --orange-d: #e08a00;
  --orange-l: #ffe6bf;
  --green: #3fa34d;
  --green-d: #2f7d3a;
  --green-l: #dff5e1;
  --ink: #2b2b2b;
  --muted: #8a8f98;
  --bg: #fbf7ef;
  --card: #ffffff;
  --line: #eee4d3;
  --danger: #e5533d;
  --radius: 16px;
  --shadow: 0 6px 18px rgba(0,0,0,.06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.55;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--green-d); }

/* 登录页 */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--orange-l), var(--green-l));
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--card);
  border-radius: 24px; box-shadow: var(--shadow); padding: 32px 26px; text-align: center;
}
.brand-logo { width: 84px; height: 84px; margin: 0 auto 10px; }
.login-card h1 { font-size: 20px; margin: 6px 0 2px; color: var(--green-d); }
.login-card .sub { font-size: 12px; color: var(--muted); margin-bottom: 22px; }
.field { text-align: left; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; font-size: 15px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); }
.btn {
  border: none; border-radius: 12px; padding: 12px 18px; font-size: 15px; font-weight: 600;
  background: var(--orange); color: #fff; transition: .15s;
}
.btn:hover { background: var(--orange-d); }
.btn-green { background: var(--green); } .btn-green:hover { background: var(--green-d); }
.btn-block { width: 100%; }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.tips { margin-top: 14px; font-size: 12px; color: var(--muted); text-align: left; background: var(--bg); border-radius: 12px; padding: 10px 12px; }

/* 主体布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px; background: #fff; border-right: 1px solid var(--line);
  padding: 18px 12px; display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.sidebar .brand .logo { width: 34px; height: 34px; flex: 0 0 34px; } .sidebar .brand .logo svg { width: 34px; height: 34px; }
.sidebar .brand .name { flex: 1; min-width: 0; font-weight: 700; color: var(--green-d); font-size: 12px; line-height: 1.3; letter-spacing: 0; }
.nav { flex: 1; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
  color: var(--ink); text-decoration: none; font-size: 14.5px; margin-bottom: 3px;
}
.nav a .ic { width: 22px; text-align: center; }
.nav a:hover { background: var(--orange-l); }
.nav a.active { background: var(--green); color: #fff; font-weight: 600; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  position: sticky; top: 0; z-index: 5;
}
.topbar .title { font-size: 17px; font-weight: 700; color: var(--green-d); }
.topbar .user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.badge { background: var(--green-l); color: var(--green-d); font-size: 12px; padding: 2px 8px; border-radius: 20px; }
.content { padding: 20px; flex: 1; }

/* 卡片 & 表格 */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.search { max-width: 260px; }
.tbl-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--orange-l); color: var(--ink); font-weight: 600; }
tbody tr:hover { background: #fffaf0; }
td .op { color: var(--green-d); cursor: pointer; margin-right: 12px; }
td .op.del { color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 800; margin-top: 6px; }
.stat.o { border-left: 5px solid var(--orange); }
.stat.g { border-left: 5px solid var(--green); }
.stat .emoji { position: absolute; right: 12px; top: 12px; font-size: 26px; opacity: .5; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.tag.on { background: var(--green-l); color: var(--green-d); }
.tag.off { background: #f0f0f0; color: var(--muted); }
.tag.warn { background: #ffe9b3; color: #9a6a00; }

/* 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal h3 { margin: 0; padding: 18px 20px; font-size: 17px; color: var(--green-d); border-bottom: 1px solid var(--line); }
.modal .body { padding: 20px; }
.modal .foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 权限矩阵 */
.matrix td, .matrix th { text-align: center; }
.matrix .modname { text-align: left; font-weight: 600; }
.chk { width: 20px; height: 20px; accent-color: var(--green); cursor: pointer; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 30px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

.hamburger { display: none; background: none; border: none; font-size: 22px; }
.foot-bar { text-align: center; color: var(--muted); font-size: 12px; padding: 14px; }

/* 移动端 */
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; transform: translateX(-100%); transition: .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: block; }
  .content { padding: 14px; }
  .topbar .title { font-size: 15px; }
  .grid2 { grid-template-columns: 1fr; }
  table { min-width: 520px; }
}

.badge.demo-badge { background: #fff4e6; color: #b45309; border: 1px solid #f3c58c; }
.brand-logo { display: block; margin: 0 auto; }

/* ================= 经营仪表盘 ================= */
.dash-hero { background: linear-gradient(135deg, #fff, #f2fbf3); }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.dash-title { margin: 0 0 4px; font-size: 20px; color: var(--green-d); }
.dash-sub { font-size: 13px; color: var(--muted); }
.range-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.range-tab { border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 20px; padding: 7px 16px; font-size: 13.5px; }
.range-tab.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.range-custom { display: flex; align-items: center; gap: 8px; }
.range-custom input { width: 150px; padding: 8px 10px; font-size: 13px; }
.range-label { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; border-top: 4px solid var(--green); }
.kpi .kk { font-size: 13px; color: var(--muted); }
.kpi .kv { font-size: 27px; font-weight: 800; color: var(--green-d); margin: 6px 0 2px; }
.kpi .kd { font-size: 12px; color: var(--muted); }
.m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.mcard { background: #fcfcfa; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.mcard .mk { font-size: 13px; color: var(--muted); }
.mcard .mv { font-size: 22px; font-weight: 800; margin: 4px 0; color: var(--ink); }
.mcard .md-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mcard .md { font-size: 11.5px; color: var(--muted); }
.mcard .md.up { color: var(--green-d); }
.mcard .md.down { color: var(--danger); }
.msrc { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #eef4ff; color: #2c5aa0; }
.msrc.filled { background: var(--green-l); color: var(--green-d); }
.msrc.miss { background: #fff1ec; color: var(--danger); }
.dash-note { font-size: 12.5px; color: var(--muted); }
.chart-legend { display: flex; gap: 18px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.lg { display: inline-block; width: 12px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.lg-r { background: #2f7d3f; } .lg-o { background: rgba(246,166,35,.5); }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 200px 1fr 96px; gap: 12px; align-items: center; font-size: 13.5px; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: #f1f3f2; border-radius: 8px; height: 14px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #7ec08f, #2f7d3f); border-radius: 8px; }
.bar-val { text-align: right; font-weight: 700; color: var(--green-d); }
.pbar { display: flex; flex-direction: column; gap: 12px; }
.pbar-item { display: grid; grid-template-columns: 90px 1fr 130px; gap: 12px; align-items: center; font-size: 13.5px; }
.pbar-label { color: var(--muted); }
.miss-card { border-left: 5px solid var(--danger); }
.miss-list { display: flex; flex-wrap: wrap; gap: 8px; }
.miss-item { font-size: 12px; background: #fff1ec; color: #a4412f; padding: 4px 10px; border-radius: 12px; }
@media (max-width: 820px) {
  .bar-row { grid-template-columns: 130px 1fr 78px; }
  .pbar-item { grid-template-columns: 70px 1fr 96px; }
  .kpi .kv { font-size: 22px; }
}

/* ================= 产品详情页 ================= */
.pd-link { color: var(--green-d); font-weight: 600; text-decoration: none; }
.pd-link:hover { text-decoration: underline; }
.pd-hero { display: grid; grid-template-columns: 300px 1fr; gap: 22px; margin-top: 14px; }
.pd-poster { border-radius: 16px; overflow: hidden; background: var(--green-l); aspect-ratio: 4 / 5; }
.pd-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-poster-ph { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--green-d); font-size: 13px; }
.pd-poster-ph svg { width: 96px; height: 96px; }
.pd-meta { display: flex; flex-direction: column; gap: 10px; }
.pd-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-title { margin: 0; font-size: 26px; color: var(--green-d); }
.pd-price { font-size: 26px; font-weight: 800; color: var(--orange-d); }
.pd-price span { font-size: 13px; font-weight: 400; color: var(--muted); }
.pd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pd-facts > div { background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.pd-facts b { display: block; color: var(--muted); font-weight: 500; font-size: 12px; margin-bottom: 2px; }
.pd-points { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-point { background: var(--green-l); color: var(--green-d); border-radius: 20px; padding: 7px 14px; font-size: 13.5px; }
.pd-steps { display: flex; flex-direction: column; gap: 10px; }
.pd-step { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; background: #fcfcfa; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.pd-step-i { flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.pd-desc { font-size: 14px; color: #4a4f57; white-space: pre-wrap; }
@media (max-width: 820px) { .pd-hero { grid-template-columns: 1fr; } .pd-poster { max-width: 240px; } .pd-title { font-size: 21px; } }

/* ================= 海报上传 ================= */
.uploader { grid-column: 1 / -1; }
.up-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; }
.up-prev { width: 150px; aspect-ratio: 3 / 4; border: 1px dashed var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.up-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-empty { font-size: 12px; color: var(--muted); }
.up-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.up-side input[type="text"] { width: 100%; }
.up-side .hint { font-size: 12px; color: var(--muted); }
.btn-green[for="up-file"] { display: inline-block; cursor: pointer; }
@media (max-width: 600px) { .up-row { grid-template-columns: 1fr; } .up-prev { width: 120px; } }

/* ================= 团期工作台 ================= */
.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.wb-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; transition: box-shadow .15s, transform .15s; }
.wb-card:hover { box-shadow: 0 8px 24px rgba(24, 64, 40, .1); transform: translateY(-2px); }
.wb-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.wb-name { font-size: 16px; font-weight: 700; color: var(--green-d); margin: 10px 0 4px; }
.wb-sub { font-size: 12.5px; color: var(--muted); }
.wb-bar { position: relative; height: 18px; background: #f1f3f2; border-radius: 9px; margin: 12px 0 8px; overflow: hidden; }
.wb-bar-in { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #8ecfa1, #2f7d3f); border-radius: 9px; }
.wb-bar span { position: relative; z-index: 2; font-size: 11.5px; line-height: 18px; padding-left: 9px; color: #23402f; font-weight: 600; white-space: nowrap; }
.wb-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.wb-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-top: 12px; flex-wrap: wrap; }
.wb-head-right { min-width: 220px; }
.wb-stages { display: flex; flex-direction: column; gap: 14px; }
.wb-stage-head { display: flex; align-items: baseline; gap: 10px; }
.wb-stage-head h4 { margin: 0 0 6px; color: var(--green-d); }
.wb-no { width: 34px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wb-status { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; }
.wb-note { width: 100%; min-width: 160px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; }

/* ================= 导入结果 ================= */
.import-result { font-size: 13px; }
.import-result .ok { color: var(--green-d); background: var(--green-l); padding: 10px 12px; border-radius: 10px; }
.import-result .errlist { margin-top: 8px; color: #a4412f; background: #fff1ec; padding: 10px 12px; border-radius: 10px; max-height: 200px; overflow-y: auto; }



/* 移动端顶栏自适应：避免姓名/角色/只读标记挤成竖排 */
@media (max-width: 640px) {
  .topbar { height: auto; min-height: 56px; padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .topbar .title { font-size: 14px; line-height: 1.25; }
  .topbar .user { gap: 6px; font-size: 12px; flex-wrap: wrap; }
  .topbar .user > span:not(.demo-badge) { display: none; }
  .badge, .demo-badge { white-space: nowrap; }
  .avatar { width: 30px; height: 30px; }
  .content { padding: 12px; }
}

@media (max-width: 480px) {
  .topbar .title { display: none; }
  .topbar { min-height: 52px; }
}

/* 审批中心 */
.nav-badge { min-width: 18px; height: 18px; padding: 0 5px; margin-left: auto; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge.over { background: var(--danger); }
.nav a.active .nav-badge { background: #fff; color: var(--green-d); }
.ap-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.ap-tab { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 7px 14px; border-radius: 20px; cursor: pointer; font-size: 13.5px; }
.ap-tab.on { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }
.ap-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ap-sel { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13.5px; }
.ap-title { white-space: normal; min-width: 220px; }
.ap-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ap-over-row { background: #fff7f5; }
.ap-od { margin-left: 6px; }
.ap-bar { position: relative; width: 92px; height: 16px; background: var(--green-l); border-radius: 8px; overflow: hidden; }
.ap-bar i { display: block; height: 100%; background: var(--green); }
.ap-bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--green-d); font-weight: 600; }
.ap-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ap-h-title { font-size: 17px; font-weight: 700; color: var(--green-d); line-height: 1.35; }
.ap-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; background: var(--orange-l); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.ap-kv b { display: block; color: var(--muted); font-weight: 500; font-size: 12px; margin-bottom: 2px; }
.ap-summary { margin-top: 12px; padding: 12px 14px; border-left: 4px solid var(--green); background: #f7fbf8; border-radius: 8px; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.ap-h4 { margin: 18px 0 10px; color: var(--green-d); font-size: 15px; }
.ap-timeline { display: flex; flex-direction: column; gap: 10px; }
.ap-step { display: flex; gap: 10px; }
.ap-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: #d9d9d9; flex: 0 0 12px; }
.ap-dot.ok { background: var(--green); }
.ap-dot.no { background: var(--danger); }
.ap-dot.skip { background: #bbb; }
.ap-step.cur .ap-dot { background: var(--orange); box-shadow: 0 0 0 3px rgba(240,150,60,.18); }
.ap-step-body { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.ap-step.cur .ap-step-body { border-color: #f3c58c; background: #fffaf2; }
.ap-step-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.ap-cmt { margin-top: 6px; font-size: 13px; color: var(--ink); background: #fff; border-radius: 8px; padding: 6px 9px; border: 1px dashed var(--line); }
.ap-act { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.ap-act textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 13.5px; resize: vertical; }
.ap-act-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }
.btn-esc { color: #8a5a00; border-color: #e6c07a; background: #fffaf0; }
.btn-esc:hover { background: #fff3d9; }
.ap-esc-tip { margin-top: 8px; font-size: 12.5px; line-height: 1.7; color: #8a6a2f; background: #fffaf0; border: 1px dashed #e6c07a; border-radius: 10px; padding: 8px 10px; }
.wb-ap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 0; }
@media (max-width: 640px) {
  .ap-filters .dash-note { display: none; }
  .ap-kv { grid-template-columns: 1fr 1fr; }
  .ap-act-btns { flex-wrap: wrap; }
}

/* 仪表盘吸顶板块快捷入口 */
.dash-nav {
  position: sticky; top: var(--topbar-h, 60px); z-index: 4;
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow-x: auto;
  margin: 0 0 16px; padding: 8px 10px;
  background: rgba(255, 253, 248, .96); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.05); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  scrollbar-width: thin;
}
.dash-nav-t { flex: 0 0 auto; font-size: 12.5px; color: var(--muted); padding: 0 4px 0 2px; }
.dash-nav-a {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: var(--green-d);
  font-size: 13px; padding: 6px 12px; border-radius: 18px; cursor: pointer; white-space: nowrap;
}
.dash-nav-a:hover { background: var(--orange-l); }
.dash-nav-a.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.dash-sec { scroll-margin-top: calc(var(--topbar-h, 60px) + 58px); }
@media (max-width: 640px) {
  .dash-nav { border-radius: 12px; padding: 6px; gap: 4px; }
  .dash-nav-t { display: none; }
  .dash-nav-a { padding: 5px 7px; font-size: 12px; letter-spacing: -.2px; }
}

/* ================= 品牌设置（Logo / 名称 / 描述） ================= */
.sidebar .brand .logo img.brand-logo { width: 34px; height: 34px; object-fit: contain; }
img.brand-logo { object-fit: contain; }
.bd-grid { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: start; }
.bd-logo-box { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.bd-prev { width: 150px; height: 150px; border: 1px dashed var(--line); border-radius: 16px; display: flex; align-items: center; justify-content: center; background: #fbfdfb; overflow: hidden; }
.bd-prev img.brand-logo, .bd-prev svg.brand-logo { width: 96px; height: 96px; }
.bd-prev svg.brand-logo { margin: 0; }
.bd-tip { font-size: 12px; color: var(--muted); line-height: 1.6; }
.bd-val { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafafa; word-break: break-all; }
@media (max-width: 720px) { .bd-grid { grid-template-columns: 1fr; } .bd-prev { width: 100%; max-width: 180px; } }

/* ================= 历史数据 / 时间范围筛选条 ================= */
.flt-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; padding: 8px 10px; background: #f8fbf8; border: 1px solid var(--line); border-radius: 12px; }
.flt-lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.flt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.flt-chip { border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.flt-chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.flt-bar input[type="date"] { max-width: 140px; padding: 5px 8px; font-size: 12.5px; }
.flt-sep { color: var(--muted); font-size: 12px; }
.flt-count { margin-left: auto; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .flt-count { margin-left: 0; } }

.toolbar .search{max-width:220px}


/* ================= 用户管理（会员档案 / 画像仪表盘） ================= */
.um-dash { padding: 16px 18px; }
.um-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.um-head h3 { margin: 0 0 4px; }
.um-desc { font-size: 12.5px; color: var(--muted); max-width: 640px; line-height: 1.6; }
.um-priv { font-size: 12px; color: #6b7a72; background: #eef6ef; border: 1px solid #d7e8da; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.um-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 14px 0 12px; }
.um-kpi { background: #f7faf7; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.um-kpi-l { font-size: 12px; color: var(--muted); }
.um-kpi-v { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.um-kpi-u { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.um-k0 { background: #eef7ef; border-color: #cfe6d3; }
.um-k1 { background: #f2f7fb; border-color: #d5e4ef; }
.um-k2 { background: #fbf7ec; border-color: #eee0bf; }
.um-k3 { background: #f6f3fb; border-color: #e0d8f0; }
.um-k4 { background: #fdf3f0; border-color: #f2d8cf; }
.um-k5 { background: #f4f8f6; border-color: #cfe2da; }
.um-subgrid { display: grid; grid-template-columns: 1.1fr 1.1fr 1fr 1.1fr; gap: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.um-sub-t { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.um-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.um-bar-l { width: 72px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-bar-track { flex: 1; height: 8px; background: #edf2ee; border-radius: 99px; overflow: hidden; }
.um-bar-in { height: 100%; border-radius: 99px; background: #7fb98a; }
.um-bar-in.um-lv-1 { background: #8fb3c9; }
.um-bar-in.um-lv-2 { background: #d9b463; }
.um-bar-in.um-lv-3 { background: #9b7fd4; }
.um-bar-in.um-bar-src { background: #86b8a4; }
.um-bar-n { width: 26px; text-align: right; color: var(--ink); }
.um-tags-box { display: flex; flex-wrap: wrap; gap: 6px; }
.um-tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #eff5f0; color: #3c6b4a; border: 1px solid #dbe9de; margin: 1px 2px 1px 0; }
.um-tag-btn { cursor: pointer; background: #fff; }
.um-tag-all { background: #f7f9f7; border-color: #cfdcd2; color: #2f5a3d; font-weight: 600; }
.um-tag-btn.on { background: var(--green); color: #fff; border-color: var(--green); }
.um-tag-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.um-backup-block .um-bk { font-size: 12px; color: var(--muted); line-height: 1.6; }
.um-bk-btns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.um-tabs { display: flex; gap: 8px; margin: 12px 0 0; }
.um-tab { border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.um-tab.on { background: var(--green); color: #fff; border-color: var(--green); }
.um-toolbar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.um-flt { margin-top: 10px; }
.um-flt .search { max-width: 240px; }
.um-flt select { width: auto; min-width: 104px; max-width: 150px; }
.um-flt input[type="date"] { width: auto; max-width: 140px; }
.um-flt select, .um-flt input[type="date"] { padding: 5px 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.um-table th { white-space: nowrap; }
.um-table td { vertical-align: middle; }
.um-name { font-weight: 600; color: var(--ink); }
.um-nick { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 12px; }
.um-mini { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.um-lv { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.um-lv-0 { background: #f2f4f3; color: #59665e; border-color: #e3e8e4; }
.um-lv-1 { background: #eef4f9; color: #31627f; border-color: #d6e5f0; }
.um-lv-2 { background: #fbf3dd; color: #8a6414; border-color: #f0dfa9; }
.um-lv-3 { background: #f3edfb; color: #5d3f95; border-color: #e2d4f5; }
.um-muted { color: var(--muted); font-size: 12px; }
.um-ops { white-space: nowrap; }
.um-foot { font-size: 12px; color: var(--muted); margin: 10px 2px 0; line-height: 1.7; }
.um-stage-pill { display: inline-block; margin-left: 6px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #f4f1e8; color: #7a6a3e; }
.um-modal { padding: 18px 22px 0; }
.um-modal .foot { padding: 14px 0 16px; }
.um-modal .body { max-height: 66vh; overflow: auto; }
.um-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 4px 2px 10px; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.um-detail-name { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.um-tags-line { margin-top: 6px; }
.um-detail-money { text-align: right; }
.um-detail-amt { font-size: 24px; font-weight: 700; color: var(--ink); }
.um-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 12px 0; }
.um-detail-grid > div { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.um-detail-grid span { color: var(--muted); font-size: 11.5px; }
.um-detail-grid b { font-weight: 500; color: var(--ink); word-break: break-all; }
.um-profile { background: #f8faf8; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.7; }
.um-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.um-form-modal .field { margin-bottom: 8px; }
@media (max-width: 960px) {
  .um-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .um-subgrid { grid-template-columns: 1fr 1fr; }
  .um-detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .um-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .um-subgrid { grid-template-columns: 1fr; }
  .um-form-grid { grid-template-columns: 1fr; }
  .um-detail-grid { grid-template-columns: 1fr; }
  .um-head { flex-direction: column; }
}
