/* ==========================================================================
   美姿美商城管理后台 · 主题样式
   设计来源：UL 联盟中心数据看板（墨绿设计语言）
   —— 令牌层 / 基础层 / 布局层 / 组件层
   ========================================================================== */

/* ---------------- 令牌 ---------------- */
:root {
  --sidebar-bg: #24402A; --sidebar-brand-bg: #1E3523;
  --brand: #2F5233; --brand-hover: #3A6340;
  --page-bg: #F2F3EF; --surface: #FFFFFF; --surface-2: #FAFAF7; --line: #E4E6DF;
  --fg: #1C2A1E; --fg-2: #5B6660; --fg-3: #8C968F;
  --side-fg: rgba(255,255,255,.78); --side-label: rgba(255,255,255,.42);
  --side-active-bg: rgba(255,255,255,.10); --side-indicator: #9FC3A6;
  --money: #B8912F; --gold-bg: #F7F0DC;
  --up: #C0453B; --down: #2F7D53; --warn: #C08A2E; --info: #4A6B7C;
  --series-1: #2F5233; --series-2: #6E9375; --series-3: #B8912F; --series-4: #4A6B7C; --series-5: #C9CFC4;
  --thumb-bg: #EDF1EA;
  --st-pending-fg: #C08A2E; --st-pending-bg: #FBF3E2;
  --st-paid-fg: #4A6B7C;    --st-paid-bg: #EDF1F4;
  --st-done-fg: #2F7D53;    --st-done-bg: #EAF3ED;
  --st-after-fg: #C0453B;   --st-after-bg: #FAEAE8;
  --danger: #C0453B; --stroke: var(--line);
  --sidebar-w: 232px; --sidebar-w-min: 68px; --topbar-h: 56px;
  --font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-num: "Inter", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 10px; --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(28,42,30,.04);
  --sbw: var(--sidebar-w);

  /* 兼容旧变量名（原墨绿主题） */
  --green-900: #16301F; --green-800: #24402A; --green-700: #2F5233; --green-600: #3A6340;
  --green-500: #6E9375; --green-100: #E4EBE2; --green-50: #F1F4EE;
  --bg: var(--page-bg); --card: var(--surface); --text: var(--fg);
  --text-2: var(--fg-2); --border: var(--line);
}

/* ---------------- 基础 ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page-bg); color: var(--fg);
  font: 400 13px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
table { border-collapse: collapse; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.sec { color: var(--fg-3); }
.num { font-family: var(--font-num); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-weight: 400; font-size: 12px; }
.empty { text-align: center; color: var(--fg-3); padding: 40px 0; font-size: 13px; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- 登录页 ---------------- */
.login-body {
  height: 100vh; background: linear-gradient(135deg, #16301F, var(--sidebar-bg) 55%, var(--brand));
  display: flex; align-items: center; justify-content: center;
}
.login-card { width: 380px; background: #fff; border-radius: 16px; padding: 40px 36px 28px; box-shadow: 0 24px 60px rgba(16,40,29,.35); }
.login-logo { text-align: center; margin-bottom: 26px; }
.logo-mark {
  width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 14px;
  background: var(--brand); color: #fff; font: 700 24px/1 var(--font-num);
  display: flex; align-items: center; justify-content: center;
}
.login-logo h1 { font-size: 21px; color: var(--fg); }
.login-logo p { color: var(--fg-3); font-size: 12px; margin-top: 4px; letter-spacing: 2px; }
.login-error { color: var(--danger); font-size: 13px; min-height: 20px; margin-bottom: 4px; }
.login-tip { text-align: center; color: var(--fg-3); font-size: 12px; margin-top: 18px; }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sbw); z-index: 60;
  background: var(--sidebar-bg); color: var(--side-fg);
  display: flex; flex-direction: column; transition: width .22s ease;
}
.brand { height: var(--topbar-h); flex: none; background: var(--sidebar-brand-bg); display: flex; align-items: center; gap: 10px; padding: 0 16px; overflow: hidden; }
.brand-mark {
  width: 30px; height: 30px; flex: none; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff; border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font: 700 13px/1 var(--font-num); letter-spacing: .02em;
}
.brand > div { min-width: 0; }
.brand b { display: block; font-size: 13.5px; font-weight: 700; color: #fff; white-space: nowrap; }
.brand span { font-size: 11px; color: var(--side-label); white-space: nowrap; }
.brand-name { font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; }
#menu {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 8px 10px 10px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
#menu::-webkit-scrollbar { width: 4px; }
#menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 2px; }
.menu-group-title {
  padding: 9px 8px 3px; color: var(--side-label);
  font-size: 11px; font-weight: 500; letter-spacing: .08em; white-space: nowrap;
}
.menu-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 5px 8px; border-radius: var(--radius-sm);
  color: var(--side-fg); font-size: 13px; line-height: 1.35;
  white-space: nowrap; text-align: left; text-decoration: none;
}
.menu-item .ic { width: 16px; height: 16px; opacity: .8; }
.menu-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.menu-item:hover { background: var(--brand-hover); color: #fff; }
.menu-item:hover .ic { opacity: 1; }
.menu-item.active { background: var(--side-active-bg); color: #fff; font-weight: 500; }
.menu-item.active .ic { opacity: 1; color: var(--side-indicator); }
.menu-item.active::before {
  content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 2px;
  background: var(--side-indicator); border-radius: 1px;
}
.sidebar-foot {
  flex: none; border-top: 1px solid rgba(255,255,255,.10);
  padding: 10px 16px; font-size: 12px; color: var(--side-label);
  display: flex; align-items: center; gap: 8px;
}
.sidebar-foot a { color: var(--side-fg); text-decoration: none; }
.sidebar-foot a:hover { color: #fff; }
.sidebar-foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.nav-min { --sbw: var(--sidebar-w-min); }
body.nav-min .brand { padding: 0; justify-content: center; }
body.nav-min .brand > div, body.nav-min .brand-name { display: none; }
body.nav-min .menu-group-title { display: none; }
body.nav-min .menu-item { justify-content: center; padding: 8px 0; }
body.nav-min .menu-item .label { display: none; }
body.nav-min .sidebar-foot span { display: none; }
body.nav-min .sidebar-foot { justify-content: center; }

/* ---------------- 主区 / 顶栏 ---------------- */
.main { margin-left: var(--sbw); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .22s ease; }
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
}
.crumbs { font-size: 13px; color: var(--fg-3); display: flex; align-items: center; gap: 8px; white-space: nowrap; min-width: 0; }
.crumbs .sep { color: var(--fg-3); opacity: .7; }
.crumbs .cur { color: var(--fg); font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-sub { font-size: 12px; color: var(--fg-3); }
.search {
  width: 220px; height: 34px; display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 10px; color: var(--fg-3);
}
.search .ic { width: 15px; height: 15px; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 12px; color: var(--fg); min-width: 0; }
.search input::placeholder { color: var(--fg-3); }
.search:focus-within { border-color: var(--brand); }
.bell { position: relative; width: 34px; height: 34px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--fg-2); }
.bell:hover { background: var(--surface-2); color: var(--fg); }
.bell .dot {
  position: absolute; top: 3px; right: 2px; min-width: 14px; height: 14px; border-radius: 7px;
  background: var(--up); color: #fff; font: 600 9px/14px var(--font-num); text-align: center; padding: 0 3px;
}
.user { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; flex: none;
}
.user-meta { line-height: 1.3; }
.user-meta .name { font-size: 13px; font-weight: 500; }
.user-meta .uid { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.topbar h2 { font-size: 17px; color: var(--fg); }

/* ---------------- 内容区 ---------------- */
.content { padding: 20px 24px 32px; flex: 1; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.span4 { grid-column: span 4; } .span5 { grid-column: span 5; } .span7 { grid-column: span 7; }
.span8 { grid-column: span 8; } .span12 { grid-column: span 12; }

/* 卡片 / 面板 */
.card, .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 16px 18px; margin-bottom: 16px; }
.card h3 { font-size: 15px; color: var(--fg); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card h3 .sub { font-size: 12px; color: var(--fg-3); font-weight: 400; }
.panel { display: flex; flex-direction: column; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.panel-head .right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-foot { border-top: 1px solid var(--line); padding: 9px 18px; font-size: 12px; color: var(--fg-2); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.panel-foot .num { font-weight: 600; color: var(--fg); }

/* 旧看板统计卡（reports 等页面仍在用） */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 18px; box-shadow: var(--shadow); }
.stat-card .label { color: var(--fg-3); font-size: 12px; letter-spacing: .05em; }
.stat-card .value { font: 600 26px/1.25 var(--font-num); color: var(--fg); margin-top: 6px; font-feature-settings: "tnum"; }
.stat-card .delta { font-size: 12px; margin-top: 4px; color: var(--fg-3); }
.delta.up { color: var(--up); } .delta.down { color: var(--down); }

/* ---------------- 页头 ---------------- */
.pagehead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead h1 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.pagehead .sub { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-3); margin-top: 3px; flex-wrap: wrap; }
.pagehead .head-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo-badge { font-size: 11px; font-weight: 500; color: var(--fg-3); background: #ECEEE7; border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; }

/* 分段控件 */
.seg { display: flex; gap: 2px; background: #ECEEE7; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px; }
.seg button { padding: 5px 14px; border-radius: 4px; font-size: 12px; color: var(--fg-2); border: 1px solid transparent; line-height: 1.4; white-space: nowrap; }
.seg button:hover { color: var(--fg); }
.seg button.on { background: var(--surface); border-color: var(--line); color: var(--fg); font-weight: 500; box-shadow: var(--shadow); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; line-height: 1;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn .ic { width: 15px; height: 15px; }
.btn-icon { width: 34px; padding: 0; justify-content: center; }
.btn-icon.spin .ic { animation: spin .6s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-primary, .btn-plain, .btn-danger, .btn-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--brand); cursor: pointer; border-radius: var(--radius-sm);
  font-size: 13px; height: 34px; padding: 0 16px;
  background: var(--brand); color: #fff; transition: .15s; white-space: nowrap;
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn-plain { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-plain:hover { background: #F1F4EE; color: var(--brand); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #EBCBC7; }
.btn-danger:hover { background: #FBF1F0; color: var(--danger); }
.btn-block { width: 100%; height: 42px; font-size: 15px; letter-spacing: 4px; }
.btn-mini { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 4px; margin-right: 6px; background: var(--brand); }
.btn-mini.plain { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-mini.danger { background: var(--surface); color: var(--danger); border-color: #EBCBC7; }
.btn-mini.warn { background: var(--surface); color: var(--warn); border-color: #E8D3AE; }
.btn-mini:hover { opacity: .88; }
.link-btn { font-size: 12px; color: var(--brand); font-weight: 500; background: none; border: 0; cursor: pointer; }
.link-btn:hover { color: var(--brand-hover); text-decoration: underline; }

/* ---------------- 表格 ---------------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { font-size: 11px; font-weight: 500; letter-spacing: .06em; color: var(--fg-3); background: var(--surface-2); }
.tbl tbody tr:hover td, .tbl tr:hover td { background: var(--surface-2); }
.tbl .money { color: var(--fg); font-family: var(--font-num); font-weight: 600; font-feature-settings: "tnum"; }
.tbl .r { text-align: right; }
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); }

/* 徽标 */
.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; line-height: 1; padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.tag.g { color: var(--st-done-fg); background: var(--st-done-bg); }
.tag.o, .tag-gold { color: var(--st-pending-fg); background: var(--st-pending-bg); }
.tag.r { color: var(--st-after-fg); background: var(--st-after-bg); }
.tag.b { color: var(--st-paid-fg); background: var(--st-paid-bg); }
.tag.gray, .tag-gray { color: var(--fg-2); background: #EFF1EC; }

/* ---------------- 筛选 / 页签 / 分页 ---------------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.filter-bar input, .filter-bar select {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: none; font-size: 13px; background: var(--surface); color: var(--fg);
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--brand); }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; background: #ECEEE7; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px; width: fit-content; margin-bottom: 14px; }
.tab {
  padding: 5px 14px; border-radius: 4px; cursor: pointer; font-size: 12px; line-height: 1.5;
  color: var(--fg-2); border: 1px solid transparent; background: none; white-space: nowrap;
}
.tab:hover { color: var(--fg); }
.tab.active { background: var(--surface); border-color: var(--line); color: var(--fg); font-weight: 500; }
/* 设计稿用 button 作为页签子元素 */
.tabs button {
  padding: 5px 12px; border-radius: 4px; font-size: 12px; line-height: 1.5;
  color: var(--fg-2); border: 1px solid transparent; background: none; white-space: nowrap; cursor: pointer;
}
.tabs button:hover { color: var(--fg); }
.tabs button.active, .tabs button.on {
  background: var(--surface); border-color: var(--line); color: var(--fg); font-weight: 500;
}
.pager { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 13px; color: var(--fg-3); }
.pager button { height: 28px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; cursor: pointer; color: var(--fg-2); font-size: 12px; }
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button:disabled { opacity: .4; cursor: default; }

/* 数字分页（看板） */
.orders-head-meta { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.orders-count { font-size: 12px; color: var(--fg-3); }
.orders-count .num { font-weight: 600; color: var(--fg); }
.orders-head-meta .pager { margin: 0; gap: 4px; }
.orders-head-meta .pager button {
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 4px; border: 1px solid transparent;
  font: 500 12px var(--font-num); color: var(--fg-2); display: inline-flex; align-items: center; justify-content: center;
}
.orders-head-meta .pager button.on { background: var(--brand); color: #fff; font-weight: 600; border-color: var(--brand); }
.orders-head-meta .pager .dots { color: var(--fg-3); font-size: 12px; padding: 0 2px; }

/* ---------------- 业绩目标条 ---------------- */
.goal { flex-direction: row; align-items: stretch; height: 78px; margin-bottom: 20px; }
.goal > div { display: flex; flex-direction: column; justify-content: center; padding: 0 22px; }
.goal .g-left { flex: none; border-right: 1px solid var(--line); }
.goal .g-label { font-size: 11px; color: var(--fg-3); letter-spacing: .05em; }
.goal .g-amount { font: 600 24px/1.25 var(--font-num); color: var(--money); font-feature-settings: "tnum"; }
.goal .g-mid { flex: 1; border-right: 1px solid var(--line); gap: 5px; }
.goal .g-mid .row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--fg-2); }
.goal .g-mid .row .num { font-weight: 600; color: var(--fg); }
.goal-track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.goal-fill { height: 100%; background: var(--brand); border-radius: 4px; transition: width .5s ease; }
.goal .g-right { flex: none; flex-direction: row; align-items: center; gap: 26px; }
.goal .mini { display: flex; flex-direction: column; gap: 2px; }
.goal .mini .v { font: 600 15px/1.3 var(--font-num); color: var(--fg); font-feature-settings: "tnum"; }
.goal .mini .v .u { font: 400 11px var(--font-ui); color: var(--fg-3); margin-left: 2px; }

/* ---------------- KPI 带 ---------------- */
.kpi-band { margin-bottom: 20px; }
.kpi-cells { display: grid; grid-template-columns: repeat(5, 1fr); }
.kpi-cell { padding: 12px 16px 6px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.kpi-cell:first-child { border-left: 0; }
.kpi-label { font-size: 11px; font-weight: 500; letter-spacing: .07em; color: var(--fg-3); line-height: 1.4; white-space: nowrap; }
.kpi-value { font: 600 30px/1.15 var(--font-num); color: var(--fg); white-space: nowrap; font-feature-settings: "tnum"; }
.kpi-value .u { font: 400 13px var(--font-ui); color: var(--fg-2); margin-left: 3px; }
.kpi-meta { display: flex; align-items: center; gap: 8px; min-height: 18px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 3px; font: 600 11px/1 var(--font-num); font-feature-settings: "tnum"; padding: 3px 5px; border-radius: 4px; }
.chip .ic { width: 10px; height: 10px; stroke-width: 2; }
.chip.up { color: var(--up); background: var(--st-after-bg); }
.chip.down { color: var(--down); background: var(--st-done-bg); }
.chip.down .ic { transform: rotate(180deg); }
.kpi-note { font-size: 11px; color: var(--fg-3); line-height: 1.4; }
.kpi-note.gold { color: var(--money); background: var(--gold-bg); border-radius: 4px; padding: 2px 6px; font-weight: 500; }
.kpi-spark { height: 26px; margin-top: auto; padding-top: 2px; }
.kpi-spark svg { width: 100%; height: 26px; }

/* ---------------- 图表 ---------------- */
.chart-wrap { position: relative; flex: 1; padding: 10px 16px 8px; min-height: 230px; }
.chart-wrap svg { width: 100%; height: 100%; }
.chart-tip {
  position: absolute; z-index: 20; pointer-events: none; opacity: 0; transition: opacity .12s ease;
  background: var(--fg); color: #fff; border-radius: 6px; padding: 8px 10px;
  font-size: 11px; line-height: 1.7; white-space: nowrap; box-shadow: 0 4px 12px rgba(28,42,30,.18);
}
.chart-tip.show { opacity: 1; }
.chart-tip .t-date { color: rgba(255,255,255,.6); font-family: var(--font-num); font-feature-settings: "tnum"; }
.chart-tip .t-row { display: flex; align-items: center; gap: 6px; }
.chart-tip .t-row .sw { width: 8px; height: 8px; border-radius: 2px; }
.chart-tip .t-row .num { font-weight: 600; margin-left: auto; padding-left: 12px; }
.axis-txt { font: 500 10px var(--font-num); fill: var(--fg-3); font-feature-settings: "tnum"; }
.axis-txt.cjk { font-family: var(--font-ui); font-weight: 400; }
.gridline { stroke: var(--line); stroke-width: 1; }
.bar-grow { transform-box: fill-box; transform-origin: center bottom; animation: barGrow .55s cubic-bezier(.2,.7,.3,1) both; }
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.line-draw { animation: lineDraw .6s ease both; }
@keyframes lineDraw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
.fade-in { animation: fadeIn .6s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.legend { display: flex; align-items: center; gap: 12px; }
.legend button { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fg-2); line-height: 1; }
.legend button:hover { color: var(--fg); }
.legend button.off { opacity: .38; text-decoration: line-through; }
.legend .sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.legend .sw.line { height: 3px; border-radius: 1.5px; }
.growth-stats { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.growth-stats .gs { font-size: 12px; color: var(--fg-3); }
.growth-stats .gs .num { font-weight: 600; color: var(--fg); }

/* 环形图 */
.donut-zone { position: relative; display: flex; justify-content: center; padding: 12px 0 4px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; padding-bottom: 8px; }
.donut-center .dc-label { font-size: 11px; color: var(--fg-3); letter-spacing: .05em; }
.donut-center .dc-value { font: 600 21px/1.3 var(--font-num); color: var(--money); font-feature-settings: "tnum"; }
.donut-seg { transition: stroke-width .15s ease, opacity .15s ease; cursor: pointer; }
.donut-legend { padding: 4px 12px 8px; }
.dl-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: var(--radius-sm); font-size: 12px; }
.dl-row:hover, .dl-row.hl { background: var(--surface-2); }
.dl-row .dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.dl-row .nm { flex: 1; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-row .pct { width: 38px; text-align: right; color: var(--fg-3); font: 500 11px var(--font-num); font-feature-settings: "tnum"; }
.dl-row .amt { width: 88px; text-align: right; font: 600 12px var(--font-num); color: var(--fg); font-feature-settings: "tnum"; }
.donut-sums { border-top: 1px solid var(--line); padding: 8px 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.donut-sums .row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--fg-2); }
.donut-sums .row .num { font-weight: 600; color: var(--fg); font-family: var(--font-num); }
.donut-sums .row.pending .num { color: var(--warn); }

/* 商品排行 */
.rank-list { flex: 1; padding: 6px 14px; display: flex; flex-direction: column; justify-content: space-evenly; gap: 1px; }
.rank-row { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: var(--radius-sm); border: 0; }
.rank-row:hover { background: var(--surface-2); }
.rank-no { width: 15px; flex: none; text-align: center; font: 600 11px var(--font-num); color: var(--fg-3); }
.rank-row:nth-child(-n+3) .rank-no { color: var(--brand); }
.rank-thumb {
  width: 28px; height: 28px; flex: none; border-radius: var(--radius-sm);
  background: var(--thumb-bg); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500;
}
.rank-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rank-name { font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-bar { height: 12px; }
.rank-bar svg { width: 100%; height: 12px; overflow: visible; }
.rank-bar .bar-fill { transform-box: fill-box; transform-origin: left center; animation: barX .55s cubic-bezier(.2,.7,.3,1) both; }
@keyframes barX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.rank-bar text { font: 600 10px var(--font-num); font-feature-settings: "tnum"; }
.rank-side { flex: none; width: 78px; text-align: right; display: flex; flex-direction: column; gap: 1px; }
.rank-side .qty { font: 600 12px/1.4 var(--font-num); color: var(--fg); font-feature-settings: "tnum"; }
.rank-side .qty .u { font: 400 10px var(--font-ui); color: var(--fg-3); }
.rank-side .share { font: 500 11px/1.4 var(--font-num); color: var(--fg-3); font-feature-settings: "tnum"; }

/* 资金动态时间轴 */
.timeline { flex: 1; padding: 14px 18px 8px; }
.tl-item { position: relative; padding: 0 0 14px 20px; }
.tl-item::before { content: ""; position: absolute; left: 3.5px; top: 14px; bottom: -2px; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-item::after { content: ""; position: absolute; left: 0; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--tl-color, var(--info)); }
.tl-time { font: 500 11px/1.5 var(--font-num); color: var(--fg-3); font-feature-settings: "tnum"; }
.tl-main { font-size: 13px; font-weight: 500; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tl-main .num { font-weight: 600; font-family: var(--font-num); }
.tl-desc { font-size: 12px; color: var(--fg-3); line-height: 1.5; }
.fund-foot { border-top: 1px solid var(--line); padding: 12px 18px; }
.fund-foot .btn { width: 100%; justify-content: center; height: 36px; }

/* 待办与预警 */
.alert-list { padding: 6px 10px; }
.alert-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); }
.alert-row:hover { background: var(--surface-2); }
.alert-row .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--a-color, var(--fg-3)); }
.alert-body { flex: 1; min-width: 0; line-height: 1.45; }
.alert-body .t { font-size: 13px; font-weight: 500; }
.alert-body .t .num { font-weight: 600; font-family: var(--font-num); }
.alert-body .d { font-size: 12px; color: var(--fg-3); }
.alert-flag { font-size: 11px; font-weight: 500; color: var(--up); white-space: nowrap; }
.quick-zone { border-top: 1px solid var(--line); padding: 12px 18px 16px; margin-top: auto; }
.quick-zone .qz-title { font-size: 11px; font-weight: 500; letter-spacing: .08em; color: var(--fg-3); margin-bottom: 10px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 6px; font-size: 12px; color: var(--fg-2); background: var(--surface); cursor: pointer;
}
.quick-btn .ic { color: var(--brand); }
.quick-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--surface-2); }

/* 近期订单表 */
.table-scroll { overflow-x: auto; }
table.orders { width: 100%; border-collapse: collapse; font-size: 13px; }
.orders th { font-size: 11px; font-weight: 500; letter-spacing: .06em; color: var(--fg-3); text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.orders td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.orders tbody tr:last-child td { border-bottom: 0; }
.orders tbody tr:hover { background: var(--surface-2); }
.orders .r { text-align: right; }
.orders td.money { font: 600 13px var(--font-num); text-align: right; font-feature-settings: "tnum"; }
.orders td.comm { font: 500 13px var(--font-num); text-align: right; color: var(--fg-2); font-feature-settings: "tnum"; }
.orders td.time { font: 400 12px var(--font-num); color: var(--fg-3); font-feature-settings: "tnum"; }
.status { display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; line-height: 1; padding: 4px 8px; border-radius: 4px; }
.status.s-pending { color: var(--st-pending-fg); background: var(--st-pending-bg); }
.status.s-paid { color: var(--st-paid-fg); background: var(--st-paid-bg); }
.status.s-done { color: var(--st-done-fg); background: var(--st-done-bg); }
.status.s-after { color: var(--st-after-fg); background: var(--st-after-bg); }
.orders-empty { padding: 28px; text-align: center; color: var(--fg-3); font-size: 12px; }

/* 旧柱状图（保留兼容） */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar-col .bar { width: 62%; max-width: 34px; background: var(--series-2); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-col .bv { font-size: 11px; color: var(--fg-3); font-family: var(--font-num); }
.bar-col .bl { font-size: 11px; color: var(--fg-3); }
.rank-track { flex: 1; height: 8px; background: var(--thumb-bg); border-radius: 4px; overflow: hidden; }
.rank-fill { height: 100%; background: var(--series-1); border-radius: 4px; }
.rank-val { width: 60px; text-align: right; color: var(--fg-3); font-size: 12px; font-family: var(--font-num); }

/* ---------------- 表单 / 弹窗 ---------------- */
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 12px; color: var(--fg-2); margin-bottom: 6px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13px; outline: none; background: var(--surface); color: var(--fg);
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,82,51,.10); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: span 2; }
/* 内容弹窗底部 排序/状态 分隔行 */
.cms-meta-row { display: flex; gap: 16px; align-items: flex-end; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 14px; }
.cms-meta-row label small { color: var(--fg-3); font-weight: 400; margin-left: 4px; }
/* 图片/视频上传组件：左预览大图 + 右链接操作区 */
.imgup-wrap { display: flex; gap: 12px; align-items: stretch; }
.imgup-drop {
  position: relative; width: 200px; height: 96px; flex: none; overflow: hidden; cursor: pointer;
  border: 1.5px dashed var(--border); border-radius: 10px; background: var(--bg, #f5f8f5);
  display: flex; align-items: center; justify-content: center; transition: border-color .15s;
}
.imgup-drop:hover { border-color: var(--brand); }
.imgup-drop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgup-ph { text-align: center; color: var(--fg-3); font-size: 12px; line-height: 1.7; display: flex; flex-direction: column; gap: 2px; }
.imgup-ph small { font-size: 10px; opacity: .8; }
.imgup-ph-ico { font-size: 22px; line-height: 1; }
.imgup-video { width: 96px; }
.imgup-mask {
  position: absolute; inset: 0; background: rgba(20,40,28,.5); color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s;
}
.imgup-drop:hover .imgup-mask { opacity: 1; }
.imgup-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.imgup-acts { display: flex; gap: 8px; }
.imgup-tip { font-size: 11px; color: var(--fg-3); word-break: break-all; line-height: 1.5; min-height: 14px; }
/* 发货方式选择（邮寄 / 自提） */
.ship-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.ship-opt {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px; transition: border-color .15s, background .15s;
  background: var(--surface);
}
.ship-opt b { font-size: 13px; color: var(--fg); }
.ship-opt span { font-size: 11px; color: var(--fg-3); }
.ship-opt.on { border-color: var(--brand); background: rgba(47,82,51,.06); }
.ship-opt.on b { color: var(--brand); }
.modal-mask { position: fixed; inset: 0; background: rgba(22,48,31,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal {
  background: var(--surface); border-radius: 14px; padding: 22px 24px; width: 520px; max-width: 92vw;
  max-height: 86vh; overflow-y: auto; box-shadow: 0 18px 50px rgba(16,40,29,.28);
}
.modal.wide { width: 980px; }
/* 团队结构弹窗：整体上下左右等比放大（更宽 + 更高的绘图区 + 更大的节点卡片与连线间距） */
.modal.tree { width: 1200px; padding: 26px 30px; }
.modal.tree h3 { font-size: 18px; }
.modal.tree .tree-wrap { max-height: 66vh; min-height: 56vh; padding: 22px 10px 36px; }
.modal.tree .org-chart ul { padding: 32px 18px 0; }
.modal.tree .org-chart ul::before { height: 32px; }
.modal.tree .org-chart li { padding: 32px 18px 0; }
.modal.tree .org-chart li::before, .modal.tree .org-chart li::after { height: 32px; }
.modal.tree .node-card { min-width: 148px; padding: 12px 24px; font-size: 15px; border-radius: 12px; gap: 4px; }
.modal.tree .node-card b { font-size: 15px; }
.modal.tree .node-card .tree-meta { font-size: 12.5px; }
.modal.tree .node-card .tree-tag { font-size: 12.5px; line-height: 21px; padding: 0 8px; }
.modal.tree .node-card .tree-ops .btn-mini { font-size: 12px; padding: 3px 9px; }
.modal h3 { color: var(--fg); margin-bottom: 16px; font-size: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.setting-row label { width: 160px; flex: none; color: var(--fg-2); font-size: 13px; }
.setting-row input[type=text], .setting-row input[type=number], .setting-row input[type=password],
.setting-row select, .setting-row textarea {
  flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: none; font-size: 13px; font-family: inherit; background: var(--surface); color: var(--fg);
}
.setting-row input:focus, .setting-row select:focus, .setting-row textarea:focus { border-color: var(--brand); }
.switch { position: relative; width: 42px; height: 22px; background: #D3D8CE; border-radius: 11px; cursor: pointer; transition: .2s; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .2s; }
.switch.on { background: var(--brand); }
.switch.on::after { left: 22px; }
.img-pick {
  width: 76px; height: 76px; border: 1px dashed var(--brand); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: var(--brand);
  font-size: 22px; cursor: pointer; background: #F1F4EE; overflow: hidden;
}
.img-pick img { width: 100%; height: 100%; object-fit: cover; }
.chk { width: 15px; height: 15px; accent-color: var(--brand); }

/* Toast */
.toasts { position: fixed; top: 70px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px; background: var(--fg); color: #fff;
  font-size: 12px; line-height: 1.5; padding: 9px 14px; border-radius: var(--radius-sm);
  box-shadow: 0 6px 18px rgba(28,42,30,.22); animation: toastIn .22s ease both; max-width: 320px;
}
.toast.err { background: var(--danger); }
.toast .ic { width: 14px; height: 14px; color: var(--side-indicator); }
.toast.bye { animation: toastOut .22s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(12px); } }

/* ---------------- API 接口页 ---------------- */
.api-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 4px; }
.api-step { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.api-step > span { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.api-step b { color: var(--fg); font-size: 13px; }
.api-step p { color: var(--fg-2); font-size: 12px; margin-top: 4px; line-height: 1.6; }
.api-step code, .api-desc code, .api-params code, .api-key { background: #F1F4EE; color: var(--brand); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.api-langs { float: right; display: inline-flex; gap: 6px; font-weight: 400; }
.api-langs .btn-mini.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.api-ep { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; background: var(--surface); }
.api-ep-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.api-ep-head:hover { background: var(--surface-2); }
.api-path { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg); }
.api-name { font-size: 12px; color: var(--fg-3); }
.api-auth { margin-left: auto; font-size: 11px; color: var(--fg-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; }
.api-ep-body { display: none; padding: 0 14px 14px; border-top: 1px dashed var(--line); }
.api-ep.open .api-ep-body { display: block; }
.api-desc { font-size: 12px; color: var(--fg-2); margin: 10px 0; line-height: 1.7; }
.api-params { margin-bottom: 10px; }
.api-actions { display: flex; gap: 8px; margin: 10px 0; }
.api-resp b { font-size: 12px; color: var(--fg-2); }
.m-badge { font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; color: #fff; letter-spacing: .4px; }
.m-GET { background: var(--brand); }
.m-POST { background: #A8801F; }
.m-PUT { background: #4A6B7C; }
.m-DELETE { background: #B3453F; }
pre.code {
  background: #16301F; color: #D7E8DA; padding: 14px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.7; overflow: auto; margin-top: 10px; white-space: pre;
}
pre.code::-webkit-scrollbar { height: 8px; width: 8px; }
pre.code::-webkit-scrollbar-thumb { background: #3A6340; border-radius: 4px; }
.dbg-line { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 14px; }
.dbg-line code { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg); }
#dbg-token, #dbg-key { width: 100%; }

/* ---------------- H5 看板 ---------------- */
.cms-board { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
/* 板块快捷导航（含不在预览卡里的小程序配置 / 订单宫格等） */
.cms-sec-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cms-sec {
  border: 1px solid var(--line, #e3ece6);
  background: #fff;
  color: var(--text-2, #5b7367);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.cms-sec:hover { border-color: #1b4332; color: #1b4332; }
.cms-sec.on { background: #1b4332; border-color: #1b4332; color: #fff; font-weight: 600; }
.phone { flex: 0 0 352px; width: 352px; background: #16301F; border-radius: 46px; padding: 10px; box-shadow: 0 24px 60px rgba(16,40,29,.35), inset 0 0 0 2px var(--brand); }
.phone-screen { background: #F2F3EF; border-radius: 38px; overflow: hidden; position: relative; }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 130px; height: 24px; background: #16301F; border-radius: 0 0 16px 16px; z-index: 5; }
.phone-statusbar { display: flex; justify-content: space-between; align-items: flex-end; padding: 8px 22px 4px; height: 34px; font-size: 11px; font-weight: 700; color: #16301F; }
.phone-title { background: var(--brand); color: #fff; text-align: center; font-size: 14px; font-weight: 700; padding: 9px 0; }
.phone-body { height: 620px; overflow-y: auto; padding: 12px; }
.phone-body::-webkit-scrollbar { width: 0; }
.hz { position: relative; border-radius: 14px; cursor: pointer; transition: outline .15s; outline: 2px dashed transparent; outline-offset: 2px; }
.hz:hover { outline-color: rgba(47,82,51,.45); }
.hz.cur { outline: 2px solid var(--brand); background: rgba(47,82,51,.05); }
.hz-tag { position: absolute; top: 4px; right: 4px; z-index: 3; background: var(--brand); color: #fff; font-size: 10px; border-radius: 999px; padding: 2px 8px; opacity: 0; transition: opacity .15s; }
.hz:hover .hz-tag, .hz.cur .hz-tag { opacity: 1; }
.pv-hero { background: linear-gradient(135deg, #16301F, var(--sidebar-bg) 60%, var(--brand)); border-radius: 16px; padding: 16px; color: #fff; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pv-hero-name { font-size: 16px; font-weight: 700; }
.pv-hero-sub { font-size: 11px; opacity: .75; margin-top: 3px; }
.pv-hero-badge { margin-left: auto; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: 11px; padding: 4px 12px; }
.pv-banner { height: 118px; border-radius: 14px; overflow: hidden; background: #E4EBE2; }
.pv-banner-img { width: 100%; height: 100%; object-fit: cover; }
.pv-banner-body { width: 100%; height: 100%; background: linear-gradient(135deg, var(--sidebar-bg), var(--brand)); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 0 20px; }
.pv-banner-title { font-size: 17px; font-weight: 700; }
.pv-banner-sub { font-size: 12px; opacity: .78; margin-top: 6px; }
.pv-dots { display: flex; justify-content: center; gap: 4px; padding: 6px 0 2px; }
.pv-dots i { width: 5px; height: 5px; border-radius: 50%; background: #C3CCC0; }
.pv-dots i.on { background: var(--brand); width: 14px; border-radius: 3px; }
.pv-notice { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 9px 12px; font-size: 12px; color: var(--fg-2); }
.pv-more { font-style: normal; color: var(--fg-3); font-size: 11px; }
.pv-entries { display: flex; background: #fff; border-radius: 14px; padding: 12px 0; }
.pv-entry { flex: 1; text-align: center; }
.pv-entry-ic { font-size: 22px; line-height: 30px; }
.pv-entry-tx { font-size: 11px; color: var(--fg-2); margin-top: 4px; }
.pv-sec-title { font-size: 14px; font-weight: 700; color: var(--fg); margin: 12px 2px 8px; }
.pv-goods { display: flex; flex-wrap: wrap; gap: 10px; }
.pv-good { width: calc(50% - 5px); background: #fff; border-radius: 12px; padding: 10px; }
.pv-good-img { height: 78px; border-radius: 8px; background: linear-gradient(135deg, #E4EBE2, #C9D8CB); color: var(--brand); font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pv-good-name { font-size: 12px; color: var(--fg); margin-top: 7px; height: 34px; overflow: hidden; line-height: 1.4; }
.pv-good-price { font-size: 14px; font-weight: 700; color: var(--brand); margin-top: 4px; }
.pv-good-price em { font-style: normal; font-size: 10px; background: var(--gold-bg); color: #8A6A1F; border-radius: 999px; padding: 1px 7px; margin-left: 6px; font-weight: 600; }
.pv-page-title { font-size: 16px; font-weight: 700; color: var(--fg); margin: 4px 2px 12px; }
.pv-search { background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 12px; color: var(--fg-3); margin-bottom: 10px; }
.pv-cats { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.pv-cats::-webkit-scrollbar { display: none; }
.pv-cat { flex: 0 0 auto; background: #fff; color: var(--fg-2); border-radius: 999px; font-size: 11px; padding: 5px 12px; }
.pv-cat.on { background: var(--brand); color: #fff; }
.pv-kind { display: inline-block; font-size: 10px; border-radius: 999px; padding: 1px 7px; background: #EFF2EA; color: var(--fg-2); margin-left: 4px; vertical-align: 1px; }
.pv-kind-video { background: var(--gold-bg); color: #8A6A1F; }
.pnl-cat-add { display: flex; gap: 8px; margin-bottom: 12px; }
.pnl-cat-add input { flex: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; }
.pv-list { display: flex; flex-direction: column; gap: 10px; }
.pv-item { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 12px; }
.pv-item-cover { width: 52px; height: 52px; border-radius: 10px; flex: 0 0 52px; background: linear-gradient(135deg, #E4EBE2, #C9D8CB); color: var(--brand); font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pv-item-info { min-width: 0; }
.pv-item-title { font-size: 13px; font-weight: 700; color: var(--fg); }
.pv-item-sub { font-size: 11px; color: var(--brand); margin-top: 4px; }
.pv-card { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.pv-card-title { font-size: 13px; font-weight: 700; color: var(--fg); margin-bottom: 12px; }
.pv-order-grid { display: flex; }
.pv-o { flex: 1; text-align: center; font-size: 11px; color: var(--fg-2); }
.pv-o div:first-child { font-size: 18px; margin-bottom: 5px; }
.pv-cfg { font-size: 11px; color: var(--fg-2); line-height: 1.7; }
.pv-stats { display: flex; gap: 8px; margin-top: 10px; }
.pv-stat { flex: 1; text-align: center; background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.22); border-radius: 10px; padding: 10px 0 8px; }
.pv-stat b { display: block; font-size: 14px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.pv-stat span { font-size: 10px; color: #f6ecd8; margin-top: 3px; display: block; }

/* 订单宫格竖排开关（H5 设置看板 → 个人中心） */
.order-sw-row { align-items: center; }
.order-ic { font-size: 20px; margin-right: 4px; }
.order-sw-row .pi-main span i.pi-sub { display: block; font-style: normal; margin-top: 2px; }
.sw-state { font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.sw-state.ok { color: #2d6a4f; background: #e3efe7; }
.sw-state.off { color: #a3563f; background: #f3e4df; }
.switch.sw-show { background: var(--brand); }
.switch.sw-show::after { left: 2px; }
.switch.sw-hide { background: #c98a76; }
.switch.sw-hide::after { left: 22px; }
/* 快捷入口行（我的订单卡下方） */
.pv-quick-row { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pv-q { flex: 1; text-align: center; font-size: 10px; color: var(--fg-2); }
.pv-q div:first-child { font-size: 16px; line-height: 1.4; }
.pv-benefit { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg); }
.pv-benefit b { color: var(--brand); }
.pv-tag { background: var(--brand); color: #fff; font-size: 10px; border-radius: 999px; padding: 2px 9px; }
.pv-menu { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fg); padding: 10px 0; border-bottom: 1px solid var(--line); }
.pv-menu:last-child { border-bottom: none; }
.pv-menu .grow { flex: 1; }
.pv-foot { text-align: center; font-size: 11px; color: var(--fg-3); padding: 12px 0 4px; }
.pv-empty { color: var(--fg-3); font-size: 12px; text-align: center; padding: 18px 0; }
.cms-panel { flex: 1; min-width: 380px; }
.panel-tip { color: var(--fg-2); font-size: 12px; margin-bottom: 12px; line-height: 1.7; }
.panel-list { display: flex; flex-direction: column; gap: 8px; }
.panel-item { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--surface); }
.pi-main { flex: 1; min-width: 0; }
.pi-main b { font-size: 13px; color: var(--fg); }
.pi-sub { display: block; font-size: 12px; color: var(--fg-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-ops { display: flex; gap: 6px; flex: 0 0 auto; }

/* ---------------- 团队树（简约连线组织架构图） ---------------- */
.tree-wrap { max-height: 55vh; overflow: auto; padding: 14px 6px 26px; }
.org-chart { display: flex; flex-direction: column; align-items: center; min-width: max-content; margin: 0 auto; }
.org-chart ul { display: flex; justify-content: center; position: relative; margin: 0; padding: 22px 12px 0; }
.org-chart ul::before { content: ''; position: absolute; top: 0; left: 50%; width: 0; height: 22px; border-left: 1px solid #B9C6B4; }
.org-chart li { list-style: none; position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 12px 0; }
.org-chart li::before, .org-chart li::after { content: ''; position: absolute; top: 0; width: 50%; height: 22px; border-top: 1px solid #B9C6B4; }
.org-chart li::before { left: 0; }
.org-chart li::after { right: 0; border-left: 1px solid #B9C6B4; }
.org-chart li:first-child::before { border: 0 none; }
.org-chart li:last-child::after { border: 0 none; }
.org-chart li:last-child::before { border-right: 1px solid #B9C6B4; border-radius: 0 8px 0 0; }
.org-chart li:first-child::after { border-radius: 8px 0 0 0; }
.org-chart li:only-child::before, .org-chart li:only-child::after { display: none; }
/* 节点卡片 */
.node-card { display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 16px; font-size: 13px; position: relative; min-width: 104px; }
.node-card:hover { box-shadow: 0 3px 12px rgba(27, 67, 50, .12); }
.node-card b { font-size: 13px; color: var(--fg); }
.node-card .tree-meta { color: var(--fg-3); font-size: 11px; }
.node-card .tree-tag { font-size: 11px; border-radius: 4px; padding: 0 6px; line-height: 18px; background: #9AA89A; color: #fff; }
.node-card[data-idc="私董"] { border-color: #D9534F; }
.node-card[data-idc="私董"] .tree-tag { background: #D9534F; }
.node-card[data-idc="代言人"] { border-color: #4F86D9; }
.node-card[data-idc="代言人"] .tree-tag { background: #4F86D9; }
.node-card[data-idc="星推官"] { border-color: #E8A23A; }
.node-card[data-idc="星推官"] .tree-tag { background: #E8A23A; }
.node-card[data-idc="普通用户"] { border-color: #B9C6B4; }
.node-card[data-idc="普通用户"] .tree-tag { background: #9AA89A; }
.node-card.nc-root { background: var(--brand); border-color: var(--brand); }
.node-card.nc-root b { color: #fff; }
.node-card.nc-root .tree-tag { background: rgba(255,255,255,.2); color: #fff; }
.node-card.nc-root .tree-meta { color: rgba(255,255,255,.85); }
/* 悬停浮动操作条（不占布局空间） */
.node-card .tree-acts { display: none; position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px; box-shadow: 0 3px 10px rgba(0,0,0,.12); z-index: 5; white-space: nowrap; }
.node-card:hover .tree-acts { display: flex; gap: 3px; }
.tree-acts .btn-mini { padding: 1px 7px; font-size: 11px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1279px) {
  .span4, .span5, .span7, .span8 { grid-column: span 12; }
  .goal { height: auto; flex-wrap: wrap; }
  .goal > div { padding: 12px 22px; }
  .goal .g-mid { min-width: 240px; }
  .kpi-cells { grid-template-columns: repeat(3, 1fr); }
  .kpi-cell:nth-child(4) { border-left: 0; }
}
@media (max-width: 959px) {
  .search { width: 150px; }
  .user-meta { display: none; }
  .cms-panel { min-width: 100%; }
  .api-steps, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: span 1; }
}
@media (max-width: 719px) {
  .content { padding: 14px; }
  .topbar { padding: 0 14px; }
  .search { display: none; }
  .kpi-cells { display: flex; overflow-x: auto; }
  .kpi-cell { min-width: 190px; flex: none; }
  .orders th:nth-child(2), .orders td:nth-child(2),
  .orders th:nth-child(3), .orders td:nth-child(3) { display: none; }
  .goal .g-right { gap: 16px; flex-wrap: wrap; }
}

/* ================= 商品整页编辑器（单页滚动分区） ================= */
.pe-sec { padding: 18px 0 6px; border-top: 1px solid var(--line, #e7ebe8); margin-top: 14px; }
.pe-sec:first-of-type { border-top: none; margin-top: 4px; padding-top: 8px; }
.pe-sec-t { font-size: 15px; font-weight: 700; color: var(--fg, #22301f); margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; }
.pe-sec-t span { font-size: 12px; font-weight: 400; color: var(--fg-3, #8a9a8e); }
.radio-opt { display: flex; align-items: baseline; gap: 8px; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.radio-opt:hover { background: var(--bg, #f4f7f5); }
.radio-opt input[type="radio"] { accent-color: var(--brand, #2f5233); margin-top: 3px; }
.radio-opt b { font-size: 13px; color: var(--fg, #22301f); white-space: nowrap; }
.radio-note { font-size: 12px; color: var(--fg-3, #8a9a8e); }
.pe-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center;
  margin-top: 18px; padding: 12px 4px 6px; background: linear-gradient(to top, var(--surface, #fff) 75%, transparent); }

/* 分销设置灰色说明（对齐参考系统样式） */
.dist-note { color: var(--fg-3, #8a9a8e); font-size: 12px; line-height: 1.9; margin: 8px 0 0 26px; }

/* 订单裂变合并展示：同一客户同一时间下的多笔订单合并为一个块，商品名称×数量竖排 */
tr.og-row td { padding: 0; }
.og { display: flex; justify-content: space-between; align-items: stretch; gap: 16px;
  background: #F4F9F5; border: 1px solid #DDEBE0; border-left: 3px solid #2E5E3E; border-radius: 8px;
  padding: 12px 16px; margin: 8px; }
.og-info { flex: 1; min-width: 0; }
.og-title { font-weight: 600; font-size: 13px; color: #2E5E3E; margin-bottom: 8px; }
.og-goods { display: flex; flex-direction: column; gap: 3px; }
.og-item { font-size: 13px; color: var(--fg, #2B3A2F); line-height: 1.5; }
.og-item span { color: var(--fg-3, #8A9A8E); margin-left: 6px; font-size: 12px; }
.og-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--fg-2, #6B7B70); margin-top: 8px; }
.og-ops { display: flex; flex-direction: column; gap: 6px; justify-content: center; align-items: stretch; flex-shrink: 0; }
.og-ops .btn-mini { white-space: nowrap; }
tr.og-det td { background: #FAFCFA; font-size: 12px; }
