/* =========================================================================
 * 超级问心 · 控制台皮肤（达人中心 + 管理后台）
 * 加载顺序：styles.css → logo.css → theme.css → console.css（本文件最后加载）
 * 作用域：达人中心 `.app`、管理后台 `.console`；用户端不加载本文件。
 * 规则：品牌色 / 文字 / 圆角 / 阴影 / 间距一律取 theme.css 的设计令牌
 *       （var(--brand) / var(--ink) / var(--r-l) / var(--sh-1) …），
 *       只有「叠在深绿或渐变上的半透明白」与「纯白文字」写 rgba/#fff，
 *       因为令牌里没有 alpha 变量。
 * 设计口径：奶油白底 + 白卡 + 暖灰描边 + 牛油果绿主操作 + 珊瑚粉点缀；
 *           数字一律 tabular（等宽数字），金额右对齐；表格斑马纹 + 悬停。
 * ========================================================================= */

/* =========================================================================
 * 0. 公共：数字、徽章、提示条
 * ========================================================================= */

/* 金额 / 比率 / 订单号：等宽数字，避免表格里数字左右跳动 */
.app .mono,
.console .mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: .02em;
}

.app .num,
.console .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* 徽章：统一成柔和的药丸，语义色取令牌 */
.app .badge,
.console .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.8;
  white-space: nowrap;
}

.app .badge.ok,
.console .badge.ok { background: var(--ok-soft); color: var(--ok); }

.app .badge.warn,
.console .badge.warn { background: var(--warn-soft); color: var(--warn); }

.app .badge.bad,
.console .badge.bad { background: var(--danger-soft); color: var(--danger); }

.app .badge.off,
.console .badge.off { background: var(--bg); color: var(--muted); }

/* 小号说明文字 */
.app .sc-label,
.console .sc-label {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

.app .ah-sub,
.console .ah-sub {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* 控制台页脚（theme.css 已做品牌行，这里只补上下的呼吸感） */
.console .site-footer { margin-top: var(--sp-6); }

/* 管理后台的 toast 挂在 body 上（不在 .console 内），console.css 只被两端加载，
   所以这里直接按 `body > .toast` 兜底，不会影响用户端 */
body > .toast {
  background: var(--brand-deep);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--r-m);
  font-size: 12.5px;
  letter-spacing: .02em;
  box-shadow: var(--sh-2);
}

/* =========================================================================
 * 1. 达人中心（移动端 · .app）
 * ========================================================================= */

.app .page { padding: 0 0 var(--sp-8); }

/* ---------------------------------------------------------- 1.1 达人头卡 */
.app .creator-head {
  position: relative;
  overflow: hidden;
  margin: var(--sp-4);
  padding: 20px 18px 18px;
  border-radius: var(--r-xl);
  color: #fff;
  background:
    radial-gradient(120% 120% at 108% -10%, var(--brand) 0%, transparent 58%),
    linear-gradient(150deg, var(--brand-deep) 0%, var(--brand-deep) 58%, var(--brand) 128%);
  box-shadow: var(--sh-2);
}

/* 右上角一枚珊瑚粉柔光，女性向但不抢主色 */
.app .creator-head::after {
  content: "";
  position: absolute;
  top: -46px;
  right: -38px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .24;
  pointer-events: none;
}

.app .creator-head .ch-row { position: relative; z-index: 1; gap: 12px; }

.app .creator-head .avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .26);
  font-size: 22px;
}

.app .creator-head .ch-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.35;
}

.app .creator-head .ch-sub {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--brand-mist);
}

/* 结算周期那一行比较长：做成半透明的信息胶囊，别糊成一团 */
.app .creator-head .ch-sub[data-settlement] {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: 11px;
  line-height: 1.75;
  color: var(--brand-mist);
}

.app .creator-head .level-chip {
  display: inline-block;
  margin: 0 0 0 4px;
  padding: 1px 9px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 800;
  vertical-align: 2px;
}

/* -------------------------------------------------- 1.2 区块标题（kicker） */
.app .section-title {
  position: relative;
  display: block;
  margin: var(--sp-6) var(--sp-4) 10px;
  padding-left: 14px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--ink);
}

.app .section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--brand) 0%, var(--accent) 100%);
}

.app .section-title small {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--muted);
}

/* --------------------------------------------------------- 1.3 收益看板 */
.app .stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 var(--sp-4);
}

.app .stat-card {
  order: 5;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  padding: 15px 14px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.app .stat-card .sc-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}

/* 卡片里的第二行说明：比标签更小、更淡，避免三行标签抢数字 */
.app .stat-card .sc-label ~ .sc-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.7;
  color: var(--ink-2);
}

.app .stat-card .sc-value {
  margin: 3px 0 4px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.app .stat-card .sc-value small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

/* 预估佣金：一张跨两列的头卡，数字最大 */
.app .stat-card--total {
  order: 1;
  grid-column: 1 / -1;
  padding: 18px 16px 16px;
  border-color: var(--brand-soft);
  background:
    radial-gradient(120% 130% at 100% 0%, var(--accent-soft) 0%, transparent 56%),
    linear-gradient(155deg, var(--brand-mist) 0%, var(--surface) 62%);
}

.app .stat-card--total .sc-value {
  margin: 4px 0 6px;
  font-size: 32px;
  font-weight: 800;
  color: var(--brand-deep);
  letter-spacing: -.02em;
}

.app .stat-card--total .sc-label:first-child {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--brand-deep);
}

.app .stat-card--pending { order: 2; }
.app .stat-card--frozen { order: 3; }
.app .stat-card--settled { order: 4; }
.app .stat-card--withdraw { order: 6; }
.app .stat-card--channel[data-channel="platform"] { order: 7; }
.app .stat-card--channel[data-channel="own"] { order: 8; }
.app .stat-card--local { order: 9; }

.app .stat-card--pending .sc-value { color: var(--accent-deep); }
.app .stat-card--frozen .sc-value { color: var(--warn); }
.app .stat-card--withdraw .sc-value { color: var(--ok); }

.app .stat-card--channel[data-channel="platform"] {
  border-style: dashed;
  background: var(--bg);
}

.app .stat-card--channel[data-channel="own"] {
  border-color: var(--brand-soft);
  background: linear-gradient(155deg, var(--brand-soft) 0%, var(--surface) 78%);
}

.app .stat-card--channel[data-channel="own"] .sc-value { color: var(--brand-deep); }

.app .stat-card--local {
  grid-column: 1 / -1;
  border-style: dashed;
  background: var(--bg);
}

/* --------------------------------------------------- 1.4 面板与键值行 */
.app .panel {
  margin: 0 var(--sp-4) var(--sp-4);
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.app .panel h3 {
  margin: 0 0 12px;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--ink);
}

.app .panel > h3 + .kv-row { margin-top: -2px; }

.app .kv-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
  line-height: 1.7;
}

.app .kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.app .kv-row > span { color: var(--ink-2); }
.app .kv-row > b { font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.app .kv-row .sc-label { font-size: 10.5px; }

/* 邀请钱包里那张「可提现邀请奖励」小卡 */
.app #invite-wallet .stat-card {
  margin: 8px 0 12px;
  padding: 14px;
  border-color: var(--brand-soft);
  border-radius: var(--r-m);
  background: linear-gradient(155deg, var(--brand-mist) 0%, var(--surface) 72%);
  box-shadow: none;
}

.app #invite-wallet .stat-card .sc-value { color: var(--brand-deep); }

/* ----------------------------------------------------------- 1.5 按钮 */
.app .btn {
  border-radius: var(--r-pill);
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .14s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.app .btn:active { transform: translateY(1px); }

.app .btn-primary,
.app .btn-sm.primary {
  border: 0;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: var(--sh-brand);
}

.app .btn-ghost,
.app .btn-sm.ghost {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
}

.app .btn-ghost:hover,
.app .btn-sm.ghost:hover {
  border-color: var(--brand);
  background: var(--brand-mist);
  color: var(--brand-deep);
}

.app .btn-sm { padding: 7px 14px; font-size: 12px; }

.app .toolbar {
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* 选品分类条：一行横向滚动，比换行更清爽 */
.app #topic-cats {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0 var(--sp-4) 12px;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}

.app #topic-cats::-webkit-scrollbar { display: none; }
.app #topic-cats .btn { flex: none; }
.app #topic-cats .ah-sub { flex: none; align-self: center; margin-right: 2px; }

/* ------------------------------------------------------ 1.6 选品卡片 */
.app #topic-list { padding: 0; }

.app #topic-list .panel { margin: 0 var(--sp-4); }

.app #topic-list .test-card {
  margin: 0 var(--sp-4) 12px;
  padding: 14px;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--sh-1);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.app #topic-list .test-card:active { transform: scale(.995); }

.app #topic-list .test-card:hover {
  border-color: var(--brand);
  box-shadow: var(--sh-2);
}

.app #topic-list .tc-cover {
  width: 54px;
  height: 54px;
  border-radius: var(--r-m);
  font-size: 26px;
  background:
    radial-gradient(120% 120% at 100% 0%, var(--accent-soft) 0%, transparent 62%),
    linear-gradient(155deg, var(--brand-soft) 0%, var(--brand-mist) 100%);
}

.app #topic-list .tc-title {
  margin-bottom: 3px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--ink);
}

.app #topic-list .tc-intro {
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-2);
}

.app #topic-list .tc-meta {
  gap: 6px 8px;
  font-size: 11px;
  color: var(--muted);
}

.app #topic-list .tc-cat {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 700;
}

/* 两条钱路：中性灰 = 平台已分成，品牌绿 = 我方要分佣 */
.app #topic-list .tc-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.app #topic-list .tc-mode {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.7;
}

.app #topic-list .tc-mode[data-mode="own"] {
  border-color: transparent;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 700;
}

/* --------------------------------------------------------- 1.7 专属链接 */
.app .link-box {
  margin: 0 var(--sp-4) var(--sp-4);
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-l);
  background: linear-gradient(160deg, var(--brand-mist) 0%, var(--surface) 72%);
}

.app .link-box .lb-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-deep);
}

.app .link-box .lb-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.app #promo-link {
  margin: 6px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.7;
  word-break: break-all;
}

/* 嵌套的「追踪参数」小块：白底实线，和虚线外壳分层 */
.app .link-box .link-box {
  margin: 12px 0 0;
  padding: 12px;
  border-style: solid;
  border-color: var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
}

.app .link-box .link-box .lb-title { font-size: 12px; }

.app .qr-holder { gap: 14px; margin-top: 12px; align-items: flex-start; }

.app .qr-holder canvas {
  width: 92px;
  height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  filter: hue-rotate(-122deg) saturate(.92);
}

/* ------------------------------------------------------ 1.8 数据表格 */
.app .table-scroll {
  margin: 4px -6px 0;
  padding: 0 6px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.app .table-scroll::-webkit-scrollbar { height: 6px; }
.app .table-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-pill); }

.app .data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
}

.app .data-table th {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--brand-mist);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.app .data-table th:first-child { border-radius: var(--r-s) 0 0 0; }
.app .data-table th:last-child { border-radius: 0 var(--r-s) 0 0; }
.app .data-table th.num { text-align: right; }

.app .data-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  line-height: 1.6;
  vertical-align: top;
  overflow-wrap: anywhere;
}

/* 四张宽表的列宽：按内容重要性分配，日期 / 金额 / 状态都完整可见 */
.app #platform-rates .data-table th:nth-child(1) { width: 24%; }
.app #platform-rates .data-table th:nth-child(2) { width: 16%; }
.app #platform-rates .data-table th:nth-child(3) { width: 14%; }
.app #platform-rates .data-table th:nth-child(4) { width: 23%; }
.app #platform-rates .data-table th:nth-child(5) { width: 12%; }
.app #platform-rates .data-table th:nth-child(6) { width: 11%; }

/* 邀请记录 7 列超过 480 宽：整表横向滑动，右缘渐隐提示「还能往右滑」，列宽按内容固定 */
.app .table-fade { position: relative; }

.app .table-fade::after {
  content: "";
  position: absolute;
  top: 0;
  right: -16px;
  bottom: 4px;
  width: 34px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--surface) 78%);
}

.app #invite-wallet .data-table {
  width: 690px;
  table-layout: fixed;
  font-size: 11px;
}

.app #invite-wallet .data-table th:nth-child(1) { width: 92px; }
.app #invite-wallet .data-table th:nth-child(2) { width: 96px; }
.app #invite-wallet .data-table th:nth-child(3) { width: 96px; }
.app #invite-wallet .data-table th:nth-child(4) { width: 96px; }
.app #invite-wallet .data-table th:nth-child(5) { width: 92px; }
.app #invite-wallet .data-table th:nth-child(6) { width: 100px; }
.app #invite-wallet .data-table th:nth-child(7) { width: auto; }

.app #invite-wallet .data-table td:nth-child(2),
.app #invite-wallet .data-table td:nth-child(3),
.app #invite-wallet .data-table td:nth-child(4) { font-size: 10.5px; white-space: nowrap; }

.app #channel-data .data-table th:nth-child(1) { width: 20%; }
.app #channel-data .data-table th:nth-child(2) { width: 18%; }
.app #channel-data .data-table th:nth-child(3) { width: 12%; }
.app #channel-data .data-table th:nth-child(4) { width: 20%; }
.app #channel-data .data-table th:nth-child(5) { width: 16%; }
.app #channel-data .data-table th:nth-child(6) { width: 14%; }

.app #order-feed .data-table { font-size: 11px; }
.app #order-feed .data-table th:nth-child(1) { width: 19%; }
.app #order-feed .data-table th:nth-child(2) { width: 19%; }
.app #order-feed .data-table th:nth-child(3) { width: 12%; }
.app #order-feed .data-table th:nth-child(4) { width: 13%; }
.app #order-feed .data-table th:nth-child(5) { width: 12%; }
.app #order-feed .data-table th:nth-child(6) { width: 11%; }
.app #order-feed .data-table th:nth-child(7) { width: 14%; }
.app #order-feed .data-table td.mono { font-size: 10px; white-space: nowrap; letter-spacing: -.2px; }
.app #order-feed .data-table td.num { font-size: 10.5px; }

.app .data-table tbody tr:nth-child(even) td { background: var(--bg); }
.app .data-table tbody tr:hover td { background: var(--brand-mist); }
.app .data-table tbody tr:last-child td { border-bottom: 0; }
.app .data-table td b { color: var(--ink); font-weight: 800; }
.app .data-table td .ah-sub { font-size: 10.5px; }
.app .data-table td .sc-label { font-size: 10.5px; }

/* 表格里的等级小标签 */
.app .data-table .level-chip {
  display: inline-block;
  margin: 0 0 0 2px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}

/* --------------------------------------------------------- 1.9 排行榜 */
.app .tabs {
  gap: 6px;
  margin: 0 var(--sp-4) 12px;
  padding: 0;
}

.app .tab {
  padding: 8px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
}

.app .tab.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--sh-brand);
}

.app .rank-row {
  margin: 0 var(--sp-4) 8px;
  padding: 12px 14px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  box-shadow: var(--sh-1);
  font-size: 12.5px;
}

.app .rank-row .rk-no {
  width: 26px;
  height: 26px;
  border-radius: var(--r-s);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 800;
}

.app .rank-row:nth-child(1) .rk-no { background: var(--accent); color: #fff; }
.app .rank-row:nth-child(2) .rk-no { background: var(--brand); color: #fff; }
.app .rank-row:nth-child(3) .rk-no { background: var(--violet-soft); color: var(--ink-2); }

.app .rank-row .rk-sub { font-size: 10.5px; color: var(--muted); }
.app .rank-row .rk-amount { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--brand-deep); }

.app .rank-row.me {
  border-color: var(--brand);
  background: linear-gradient(90deg, var(--brand-mist) 0%, var(--surface) 62%);
  box-shadow: inset 3px 0 0 var(--brand), var(--sh-1);
}

/* --------------------------------------------------------- 1.10 提现 */
.app .withdraw-form {
  margin: 0 var(--sp-4) var(--sp-4);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: linear-gradient(160deg, var(--brand-mist) 0%, var(--surface) 58%);
  box-shadow: var(--sh-1);
}

.app #invite-wallet .withdraw-form {
  margin: 14px 0 0;
  border-radius: var(--r-m);
  background: var(--bg);
  box-shadow: none;
}

.app #invite-wallet #btn-copy-invite { flex: 1 1 100%; }

.app .withdraw-form input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-m);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.app .withdraw-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-mist);
}

.app .quick-amounts { gap: 8px; margin: 10px 0; flex-wrap: wrap; }

.app .quick-amounts button {
  flex: 1 1 0;
  min-width: 64px;
  padding: 8px 0;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}

.app .quick-amounts button:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.app .withdraw-form .btn-block { margin-top: 10px; }

.app .wd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink-2);
}

.app .wd-row:last-child { border-bottom: 0; }
.app .wd-row b { font-variant-numeric: tabular-nums; color: var(--ink); }

.app .empty {
  padding: 26px 0;
  color: var(--muted);
  font-size: 12.5px;
}

/* --------------------------------------------------------- 1.11 佣金规则 */
.app #rule-list { counter-reset: rule; }

.app .rule-item {
  counter-increment: rule;
  position: relative;
  margin: 0 var(--sp-4) 10px;
  padding: 16px 16px 14px 50px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.app .rule-item::before {
  content: counter(rule, decimal-leading-zero);
  position: absolute;
  left: 15px;
  top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--r-s);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .02em;
}

.app .rule-item h4 {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.55;
  color: var(--ink);
}

.app .rule-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-2);
  word-break: break-word;
}

/* 提现 / 邀请里直接写出的说明行，压一档字号 */
.app .panel .sc-label + .sc-label { margin-top: 2px; }

/* =========================================================================
 * 2. 管理后台（桌面端 · .console）
 * ========================================================================= */

/* 内容区比默认 1180 宽 100px：12 列的订单表少一次横向滚动 */
.console { max-width: 1360px; box-shadow: var(--sh-2); }

.console .admin {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  align-items: stretch;
  max-width: none; /* styles.css 里 .admin 的 1180 上限会把控制台夹窄 */
  /* 关键：.console 是 flex 纵向容器，而 styles.css 的 .admin 带 margin: 0 auto。
     flex 子项的交叉轴 auto 外边距会把宽度退化成 fit-content 并居中 —— 内容较窄的角色
     （内容运营 / 员工本人 / 各运营视角）整块变窄、侧栏被推右、左侧露出一条白带。
     这里显式拉满并清掉 auto 外边距，保证任何角色、任何视图下列宽一致。 */
  width: 100%;
  margin: 0;
}

/* ------------------------------------------------------- 2.1 左侧栏 */
.console .admin-nav {
  padding: 22px 14px 20px;
  border-radius: 0;
}

.console .admin-nav h1 {
  margin: 0 0 6px;
  padding: 0 6px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
}

.console .admin-nav .an-sub {
  padding: 0 6px;
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: .06em;
  color: var(--brand-mist);
  opacity: .78;
}

.console .admin-nav .an-sub:first-of-type {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.console .admin-nav .an-sub:last-of-type { margin-top: 18px; }

.console .admin-nav .an-sub a {
  display: inline-block;
  padding: 3px 0;
  font-size: 11.5px;
  letter-spacing: .04em;
}

.console .admin-nav .an-item {
  position: relative;
  margin-bottom: 3px;
  padding: 10px 12px 10px 20px;
  border-radius: var(--r-m);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--brand-mist);
}

.console .admin-nav .an-item::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .3);
}

.console .admin-nav .an-item:hover {
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

.console .admin-nav .an-item.active {
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 800;
  box-shadow: 0 12px 22px -18px rgba(0, 0, 0, .85);
}

.console .admin-nav .an-item.active::before {
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  background: var(--accent);
}

/* ------------------------------------------------------- 2.2 主内容区 */
.console .admin-main {
  min-width: 0;
  padding: 24px 28px 64px;
}

.console .admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.console .admin-head > div:first-child { min-width: 0; }

.console .admin-head h2 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.3;
  color: var(--ink);
}

.console .admin-head .ah-sub {
  max-width: 780px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.console .admin-head .toolbar { margin-bottom: 0; }

/* 角色切换条：一条胶囊工具条，与内容卡分层 */
.console #role-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.console #role-bar .ah-sub {
  margin-right: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
}

.console #role-bar .btn-sm {
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
}

.console #role-bar .btn-sm.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: var(--sh-brand);
}

/* ------------------------------------------------------- 2.3 通用按钮 */
.console .btn {
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .02em;
  transition: transform .14s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.console .btn:active { transform: translateY(1px); }

.console .btn-sm { padding: 6px 13px; font-size: 12px; }

.console .btn-sm.primary,
.console .btn-primary {
  border: 0;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: var(--sh-brand);
}

.console .btn-sm.ghost,
.console .btn-ghost {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
}

.console .btn-sm.ghost:hover,
.console .btn-ghost:hover {
  border-color: var(--brand);
  background: var(--brand-mist);
  color: var(--brand-deep);
}

.console .toolbar { gap: 8px; margin-bottom: 12px; }

.console .toolbar select,
.console .toolbar input {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-head);
  font-size: 12px;
  outline: none;
}

.console .toolbar select:focus,
.console .toolbar input:focus { border-color: var(--brand); }

/* 表格 / 键值行里的数字输入框（比例、保护期、结算天数） */
.console .data-table input,
.console .kv-row input,
.console #role-bar input {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  outline: none;
}

.console .data-table input:focus,
.console .kv-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-mist); }

/* ------------------------------------------------------- 2.4 KPI 数字卡 */
.console .kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 14px;
}

.console .kpi-grid > #amount-masked { grid-column: 1 / -1 !important; }

.console .kpi {
  position: relative;
  overflow: hidden;
  padding: 16px 18px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.console .kpi::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-soft) 100%);
}

.console .kpi .k-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--muted);
}

.console .kpi .k-value {
  margin-top: 5px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.console .kpi .k-sub {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

/* ------------------------------------------------------------ 2.5 卡片 */
.console .card {
  overflow-x: auto;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--sh-1);
  scrollbar-width: thin;
}

.console .card::-webkit-scrollbar { height: 8px; }
.console .card::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-pill); }

.console .card h3 {
  position: relative;
  margin: 0 0 14px;
  padding-left: 12px;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--ink);
}

.console .card h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
}

.console .two-col { gap: 16px; align-items: start; }
.console .two-col > .card { margin-top: 0; }

/* 需要被「看出来是配置 / 提示」的卡：极淡的品牌或警示底 */
.console #cycle-card,
.console #depart-card,
.console #platform-rate-card,
.console #split-rule-card {
  background: linear-gradient(175deg, var(--brand-mist) 0%, var(--surface) 18%);
}

.console #access-card { background: linear-gradient(175deg, var(--bg) 0%, var(--surface) 20%); }

.console #amount-masked,
.console #no-permission {
  background: linear-gradient(160deg, var(--accent-soft) 0%, var(--surface) 62%);
  border-color: var(--accent-soft);
}

.console #amount-masked h3::before,
.console #no-permission h3::before {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
}

.console #self-scope {
  background: linear-gradient(160deg, var(--brand-soft) 0%, var(--surface) 62%);
  border-color: var(--brand-soft);
}

/* ------------------------------------------------------- 2.6 数据表格 */
.console .data-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.console .data-table th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--brand-mist);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: left;
  white-space: nowrap;
}

.console .data-table th:first-child { border-radius: var(--r-s) 0 0 0; }
.console .data-table th:last-child { border-radius: 0 var(--r-s) 0 0; }
.console .data-table th.num { text-align: right; }

.console .data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  line-height: 1.65;
  vertical-align: top;
}

.console .data-table tbody tr:nth-child(even) td { background: var(--bg); }
.console .data-table tbody tr:hover td { background: var(--brand-mist); }
.console .data-table tbody tr:last-child td { border-bottom: 0; }
.console .data-table td b { color: var(--ink); font-weight: 800; }
.console .data-table td .ah-sub { font-size: 10.5px; color: var(--muted); }
.console .data-table td .sc-label { font-size: 10.5px; }
.console .data-table .btn { white-space: nowrap; }
.console .data-table .btn-sm { padding: 5px 10px; font-size: 11px; }
.console .data-table .mono { font-size: 10.5px; letter-spacing: 0; }
.console .data-table td.mono { white-space: nowrap; }
.console .data-table .badge { padding: 1px 6px; font-size: 10px; letter-spacing: 0; }

/* 本机演示订单行：左侧一道品牌绿，和平台数据区分开 */
.console .data-table tr.me td { background: var(--brand-soft); }
.console .data-table tr.me:hover td { background: var(--brand-mist); }
.console .data-table tr.me td:first-child { box-shadow: inset 3px 0 0 var(--brand); }

/* 金额打码（¥ ****）不要显得像真金额 */
.console .data-table td .sc-label + b { color: var(--ink-2); }

/* ----------------------------------------------------- 2.7 键值行 / 设置 */
.console .kv-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px 18px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
  line-height: 1.75;
}

.console .kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.console .kv-row > span { flex: 1 1 auto; min-width: 0; color: var(--ink-2); }
.console .kv-row > b {
  flex: 0 1 auto;
  max-width: 62%;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.console .kv-row .sc-label { font-size: 10.5px; }
.console .kv-row > b.num { white-space: nowrap; }

.console .setting-row {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-2);
}

.console .setting-row:last-child { border-bottom: 0; }
.console .setting-row b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* 开关：品牌绿 */
.console .switch .slider { background: var(--line-strong); }
.console .switch input:checked + .slider { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); }

/* --------------------------------------------------------- 2.8 漏斗图 */
.console .funnel-row { gap: 12px; margin-bottom: 10px; font-size: 12px; }

.console .funnel-row .fn-name {
  width: 88px;
  color: var(--ink-2);
  font-size: 12px;
}

.console .funnel-row .fn-bar {
  height: 12px;
  border-radius: var(--r-pill);
  background: var(--bg);
  border: 1px solid var(--line);
}

.console .funnel-row .fn-fill {
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
}

.console .funnel-row .fn-val {
  width: 122px;
  text-align: right;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* 趋势图：给 canvas 一圈柔和底，避免线条浮在白卡上 */
.console .trend-chart {
  border-radius: var(--r-m);
  background: linear-gradient(180deg, var(--brand-mist) 0%, var(--surface) 42%);
}

/* 窄屏兜底：表格保持最小可读宽度，卡片横向滚动（真实浏览器有滚动条） */
@media (max-width: 1240px) {
  .console .data-table--orders,
  .console .data-table--creators,
  .console .data-table--tests { min-width: 900px; }
}

/* 固定列宽：列多也不会把中文挤成竖排；宽表按内容分配列宽 */
.console .data-table {
  width: 100%;
  table-layout: fixed;
}

.console .data-table th,
.console .data-table td { overflow-wrap: anywhere; }

.console .data-table--orders th:nth-child(1) { width: 10.5%; }
.console .data-table--orders th:nth-child(2) { width: 10.5%; }
.console .data-table--orders th:nth-child(3) { width: 6%; }
.console .data-table--orders th:nth-child(4) { width: 8.5%; }
.console .data-table--orders th:nth-child(5) { width: 7%; }
.console .data-table--orders th:nth-child(6) { width: 8.5%; }
.console .data-table--orders th:nth-child(7) { width: 7%; }
.console .data-table--orders th:nth-child(8) { width: 10.5%; }
.console .data-table--orders th:nth-child(9) { width: 8.5%; }
.console .data-table--orders th:nth-child(10) { width: 6.5%; }
.console .data-table--orders th:nth-child(11) { width: 8%; }

.console .data-table--creators th:nth-child(1) { width: 10%; }
.console .data-table--creators th:nth-child(2) { width: 6%; }
.console .data-table--creators th:nth-child(3) { width: 8%; }
.console .data-table--creators th:nth-child(4) { width: 5.5%; }
.console .data-table--creators th:nth-child(5) { width: 13%; }
.console .data-table--creators th:nth-child(6) { width: 11%; }
.console .data-table--creators th:nth-child(7) { width: 6%; }
.console .data-table--creators th:nth-child(8) { width: 12%; }
.console .data-table--creators th:nth-child(9) { width: 15%; }
.console .data-table--creators th:nth-child(10) { width: 6.5%; }

.console .data-table--roi th:nth-child(1) { width: 12%; }
.console .data-table--roi th:nth-child(2) { width: 8%; }
.console .data-table--roi th:nth-child(3) { width: 8%; }
.console .data-table--roi th:nth-child(4) { width: 8%; }
.console .data-table--roi th:nth-child(5) { width: 28%; }
.console .data-table--roi th:nth-child(6) { width: 20%; }

.console .data-table--recon th:nth-child(1) { width: 13%; }
.console .data-table--recon th:nth-child(2) { width: 10%; }
.console .data-table--recon th:nth-child(3) { width: 12%; }
.console .data-table--recon th:nth-child(4) { width: 12%; }
.console .data-table--recon th:nth-child(5) { width: 9%; }
.console .data-table--recon th:nth-child(6) { width: 9%; }

.console .data-table--tests th:nth-child(1) { width: 16%; }
.console .data-table--tests th:nth-child(2) { width: 8%; }
.console .data-table--tests th:nth-child(3) { width: 14%; }
.console .data-table--tests th:nth-child(4) { width: 6%; }
.console .data-table--tests th:nth-child(5) { width: 7.5%; }
.console .data-table--tests th:nth-child(6) { width: 8%; }
.console .data-table--tests th:nth-child(7) { width: 7%; }
.console .data-table--tests th:nth-child(8) { width: 7%; }
.console .data-table--tests th:nth-child(9) { width: 10%; }

.console .data-table--trial th:nth-child(1) { width: 11%; }
.console .data-table--trial th:nth-child(2) { width: 13%; }
.console .data-table--trial th:nth-child(3) { width: 56%; }
.console .data-table--trial th:nth-child(4) { width: 20%; }

/* --------------------------------------------------- 2.9 后台响应式 */
@media (max-width: 1180px) {
  .console .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .console .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console .two-col { grid-template-columns: 1fr; }
  .console .admin-main { padding: 20px 18px 48px; }
}

@media (max-width: 820px) {
  .console .admin {
    grid-template-columns: 1fr;
  }

  .console .admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px;
  }

  .console .admin-nav h1 { width: 100%; padding: 0; }
  .console .admin-nav .an-sub { width: 100%; padding: 0; }
  .console .admin-nav .an-sub:first-of-type { margin-bottom: 4px; padding-bottom: 8px; }
  .console .admin-nav .an-item { padding: 8px 12px; }
  .console .admin-nav .an-item::before { display: none; }
  .console .admin-nav .an-sub:last-of-type { margin-top: 4px; }
}

/* ------------------------------------------------- 2.10 达人中心窄屏收口 */
@media (max-width: 400px) {
  .app .creator-head { margin: 12px; padding: 18px 15px 16px; }
  .app .stat-grid { padding: 0 12px; gap: 10px; }
  .app .stat-card--total .sc-value { font-size: 28px; }
  .app .section-title { margin-left: 12px; margin-right: 12px; }
  .app .panel { margin-left: 12px; margin-right: 12px; }
  .app #topic-list .test-card { margin-left: 12px; margin-right: 12px; }
  .app .rank-row { margin-left: 12px; margin-right: 12px; }
  .app .rule-item { margin-left: 12px; margin-right: 12px; }
  .app .withdraw-form { margin-left: 12px; margin-right: 12px; }
  .app .link-box { margin-left: 12px; margin-right: 12px; }
  .app #topic-cats { margin-left: 12px; margin-right: 12px; }
  .app .tabs { margin-left: 12px; margin-right: 12px; }
}

/* ------------------------------------------------- 2.11 动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .app .btn,
  .app .test-card,
  .app .quick-amounts button,
  .console .btn,
  .console .switch .slider { transition: none; }
}
