* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #1a2233;
  --text-sub: #6b7486;
  --primary: #2f6fed;
  --primary-dark: #1e5cd7;
  --green: #16a34a;
  --orange: #ea8a00;
  --red: #dc2626;
  --border: #e4e8f0;
  --gold: #b8860b;
}

body {
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ═══════════ 登录 ═══════════ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2f6fed 55%, #6ea8ff 100%);
}
.login-card {
  background: var(--card);
  width: 360px;
  padding: 40px 36px 32px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  text-align: center;
}
.login-logo { font-size: 40px; }
.login-card h1 { font-size: 22px; margin-top: 8px; }
.login-sub { color: var(--text-sub); font-size: 13px; margin: 6px 0 24px; }
#login-password {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  margin-bottom: 14px;
}
#login-password:focus { border-color: var(--primary); }
.login-error { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ═══════════ 按钮 ═══════════ */
.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--text-sub); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: #c4cbd8; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }
.btn-sm { padding: 6px 12px; }
.btn-up { background: #eaf1ff; color: var(--primary); }
.btn-up:hover:not(:disabled) { background: #d8e6ff; }
.btn-down { background: #fff4e5; color: var(--orange); }
.btn-down:hover:not(:disabled) { background: #ffe8c7; }
.btn-ban { background: #fdeaea; color: var(--red); }
.btn-ban:hover:not(:disabled) { background: #f9d2d2; }
.btn-unban { background: #e7f7ee; color: var(--green); }
.btn-unban:hover:not(:disabled) { background: #d1f0de; }

/* ═══════════ 顶栏 ═══════════ */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); }

.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

/* ═══════════ 统计 ═══════════ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  border: 1px solid var(--border);
}
.stat-num { font-size: 28px; font-weight: 700; }
.stat-label { color: var(--text-sub); font-size: 13px; margin-top: 4px; }
.stat-member .stat-num { color: var(--gold); }
.stat-annual .stat-num { color: var(--primary); }
.stat-lifetime .stat-num { color: #7c3aed; }
.stat-free .stat-num { color: var(--text-sub); }
.stat-banned .stat-num { color: var(--red); }

/* ═══════════ 工具栏 ═══════════ */
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.tab {
  border: none;
  background: transparent;
  padding: 7px 18px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-sub);
}
.tab.active { background: var(--primary); color: #fff; }
.tab-banned.active { background: var(--red); }
#search-input {
  flex: 1;
  min-width: 200px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  background: var(--card);
}
#search-input:focus { border-color: var(--primary); }

/* ═══════════ 表格 ═══════════ */
.table-card {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow-x: auto;
}
/* 用户列表折叠头（复用 behavior-head，补内边距与分隔线） */
.table-card-head { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.table-card-head:hover h2 { color: var(--primary); }
.user-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.user-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-sub);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
}
.user-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.user-table tr:last-child td { border-bottom: none; }
.user-table tr:hover td { background: #f8faff; }
/* 紧凑排版：8 列尽量一屏放得下，减少横向滚动 */
.user-table th, .user-table td { padding-left: 10px; padding-right: 10px; }
.user-table .actions-cell .btn { padding: 6px 10px; font-size: 12px; }
.th-check { width: 34px; text-align: center; }
.td-check { text-align: center; }
.td-check input, .th-check input { cursor: pointer; accent-color: #ff7849; }
.empty-row { text-align: center; color: var(--text-sub); padding: 40px 0 !important; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f6fed, #6ea8ff);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  flex-shrink: 0;
}
.user-name { font-weight: 600; }
.openid { color: var(--text-sub); font-family: Consolas, monospace; font-size: 12px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-member { background: #fdf6e3; color: var(--gold); }
.badge-free { background: #eef1f6; color: var(--text-sub); }
.badge-banned { background: #fdeaea; color: var(--red); }
.badge-expired { background: #f4f4f5; color: #9ca3af; }

/* 封号用户整行红色高亮 */
.row-banned td { background: #fff7f7; }
.row-banned .user-name { color: var(--red); font-weight: 700; }
.row-banned:hover td { background: #fdeeee !important; }
.ban-reason { color: var(--red); font-size: 12px; margin-top: 4px; }

.plan-cell { line-height: 1.5; }
.plan-name { font-weight: 600; }
.plan-expiry { color: var(--text-sub); font-size: 12px; }

.th-actions { min-width: 300px; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }

/* ═══════════ 行为预警 ═══════════ */
.behavior-card {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 14px 20px;
  margin-bottom: 20px;
}
.behavior-head { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.behavior-head:hover h2 { color: var(--primary); }
.behavior-arrow { color: var(--text-sub); font-size: 12px; width: 14px; }
.behavior-head h2 { font-size: 15px; font-weight: 600; }
.behavior-count { background: #fdeaea; color: var(--red); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px; }
.behavior-hint { color: var(--text-sub); font-size: 12px; margin-left: auto; }
#behavior-body { margin-top: 12px; }
.behavior-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.behavior-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-sub);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
  white-space: nowrap;
}
.behavior-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.behavior-table tr:last-child td { border-bottom: none; }
.behavior-detail { line-height: 1.55; max-width: 340px; }
.behavior-period { color: var(--text-sub); font-size: 12px; margin-top: 3px; }
.behavior-note { color: var(--text-sub); line-height: 1.55; max-width: 320px; }
.row-risk-high td { background: #fff7f7; }
.row-risk-high:hover td { background: #fdeeee !important; }
.badge-risk-high { background: #fdeaea; color: var(--red); }
.badge-risk-medium { background: #fff4e5; color: var(--orange); }
.badge-risk-low { background: #eaf1ff; color: var(--primary); }

/* ═══════════ 弹窗 ═══════════ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: var(--card);
  border-radius: 14px;
  width: 400px;
  padding: 26px;
  box-shadow: 0 16px 48px rgba(0,0,0,.2);
}
.modal h3 { font-size: 16px; margin-bottom: 12px; }
.modal p { font-size: 14px; color: var(--text-sub); line-height: 1.6; margin-bottom: 12px; }
#confirm-reason {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  outline: none;
}
.modal-btns { display: flex; justify-content: flex-end; gap: 10px; }

/* ── 自定义会员弹窗 ── */
.membership-current {
  padding: 10px 12px; border-radius: 8px; background: #f7f9fc;
  border: 1px solid var(--border); font-size: 13px; color: var(--text-sub);
  margin-bottom: 12px;
}
.membership-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px; background: #f7f9fc;
  border: 1px solid var(--border); margin-bottom: 6px;
  font-size: 14px; cursor: pointer; user-select: none;
}
.membership-opt:hover { background: #f0f4fa; }
.membership-opt input[type="radio"] { accent-color: var(--primary); flex-shrink: 0; }
#membership-days {
  width: 110px; padding: 6px 8px; margin-left: 8px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; outline: none;
}

/* ═══════════ 功能开关弹窗 ═══════════ */
.btn-feat { background: #f0ecfb; color: #7c3aed; }
.btn-feat:hover:not(:disabled) { background: #e2d9f8; }
.feature-modal { width: 440px; max-height: 84vh; display: flex; flex-direction: column; }
.feature-user { color: var(--primary); font-size: 14px; }
.feature-tip { margin-bottom: 10px; }
.feature-bulk { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.feature-count { color: var(--text-sub); font-size: 12px; margin-left: auto; }
.feature-list { overflow-y: auto; margin: 4px 0 14px; padding-right: 2px; }
.feature-group { color: var(--text-sub); font-size: 12px; margin: 12px 4px 6px; }
.feature-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-radius: 10px; background: #f7f9fc;
  border: 1px solid var(--border);
  margin-bottom: 6px; cursor: pointer; user-select: none;
}
.feature-item:hover { background: #f0f4fa; }
.feature-label { font-size: 14px; color: var(--text); }
.feature-new {
  display: inline-block; margin-left: 6px; padding: 0 5px;
  font-size: 10px; line-height: 16px; border-radius: 4px;
  color: #7c3aed; background: #f1e9ff; vertical-align: 1px; cursor: help;
}
.feature-web {
  display: inline-block; margin-left: 6px; padding: 0 5px;
  font-size: 10px; line-height: 16px; border-radius: 4px;
  color: #0e7a3c; background: #e5f6ec; vertical-align: 1px; cursor: help;
}
.feature-target {
  display: inline-block; margin-left: 6px; padding: 0 5px;
  font-size: 10px; line-height: 16px; border-radius: 4px;
  color: #d48806; background: #fff4e5; vertical-align: 1px; cursor: help;
}
.feature-item.feature-locked { border-color: #f3d19e; background: #fffaf0; }
.feature-item.feature-locked .feature-switch { opacity: .85; }
.feature-item.feature-locked .feature-switch-wrap input { cursor: not-allowed; }

/* ── 动态功能（网页版） ── */
.web-feature-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.web-feature-tip { color: var(--text-sub); font-size: 12px; }
.wf-icon { font-size: 16px; }
.web-feature-modal { width: min(760px, 94vw); }
.wf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 定向推送（每功能一行） */
.push-row { padding: 14px 0; border-bottom: 1px solid var(--border); }

/* 机型定向搜索框 */
.push-search-wrap { position: relative; margin: 4px 0 10px; }
.push-search {
  width: 100%; box-sizing: border-box;
  padding: 10px 34px 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: #fafbfd; color: var(--text);
  font-size: 13px; outline: none;
}
.push-search:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(47, 111, 237, .12); }
.push-search::-webkit-search-cancel-button { display: none; }
.push-search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: none; border-radius: 50%;
  background: transparent; color: var(--text-sub);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.push-search-clear:hover { background: var(--bg); color: var(--text); }

/* 灰度发布（按比例放开） */
.gray-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.gray-row:last-child { border-bottom: none; }
.gray-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.gray-name { font-size: 14px; font-weight: 600; }
.gray-editor { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gray-slider { flex: 1; min-width: 160px; accent-color: var(--primary); cursor: pointer; }
.gray-val { font-size: 13px; font-weight: 600; color: var(--primary); min-width: 42px; text-align: right; }

/* 版本管理（强更 / 更新提示） */
.version-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.version-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.version-actions .push-detail { margin-right: auto; }
.push-row:last-child { border-bottom: none; }
.push-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.push-name { font-size: 14px; font-weight: 600; }
.push-detail { color: var(--text-sub); font-size: 12px; }
.push-dirty { color: #d48806; font-weight: 600; }
.push-editor { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.push-chips {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; min-width: 260px;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfd;
}
.push-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #e8f0ff; color: var(--primary); border-radius: 6px;
  padding: 3px 8px; font-size: 12px; font-weight: 600;
}
.push-chip.chip-region { background: #e8f8ee; color: #1d9e55; }
.push-chip i { cursor: pointer; font-style: normal; opacity: .6; font-size: 13px; line-height: 1; }
.push-chip i:hover { opacity: 1; }
.push-input { flex: 1; min-width: 150px; border: none; outline: none; background: transparent; font-size: 12px; }
.rule-empty { color: var(--text-sub); font-size: 12px; }
.rule-tip { color: var(--text-sub); font-size: 12px; margin: 0 0 10px; }

/* 更新日志（远程下发） */
.cl-items-view { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.cl-items-view .push-chip {
  background: #f0f2f7; color: var(--text); font-weight: 500;
  gap: 8px; padding: 4px 9px; border-radius: 7px; line-height: 1.5;
}
.cl-items-view .push-chip .cl-tag-icon,
.cl-items-view .push-chip .cl-tag-img { flex: 0 0 22px; }
#cl-items .rc-add-row { margin-bottom: 8px; }
#cl-add-item { margin-bottom: 6px; }
/* 标签图标徽标：彩色圆角方块 + 白色复刻图标（与 App 端系统图标一致） */
.cl-tag-slot {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 22px; width: 22px; height: 22px;
}
.cl-tag-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  color: #fff; overflow: hidden;
}
.cl-tag-icon svg { display: block; }
/* 个别标签用图片（芯片 = 黑底金色 Kirin 图，与 App 同一张图） */
.cl-tag-img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; display: block; }

/* 远程配置（key-value · 灰度） */
.rc-add-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rc-add-row select.cl-item-tag {
  flex: 0 0 110px; box-sizing: border-box;
  padding: 8px 10px; font-size: 13px; border-radius: 8px;
  border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
}
.rc-add-row .cl-item-dot {
  flex: 0 0 12px; width: 12px; height: 12px; border-radius: 50%;
}
.rc-add-row input[type="text"] {
  flex: 1; min-width: 160px; box-sizing: border-box;
  padding: 8px 10px; font-size: 13px; border-radius: 8px;
  border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
}
.rc-add-row input[type="number"] {
  width: 72px; box-sizing: border-box; padding: 8px 10px; font-size: 13px;
  border-radius: 8px; border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
}
.rc-value {
  flex: 2; min-width: 220px; box-sizing: border-box;
  padding: 8px 10px; font-size: 13px; border-radius: 8px;
  border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
}
.user-region { color: var(--text-sub); font-size: 12px; margin-top: 2px; }
/* 节日活动状态徽标 + 生效时间输入 */
.fc-status {
  flex: none; font-size: 11px; line-height: 1; padding: 4px 8px;
  border-radius: 999px; font-weight: 600; white-space: nowrap;
}
.fc-st-live { background: #dcfce7; color: #15803d; }
.fc-st-wait { background: #fef9c3; color: #a16207; }
.fc-st-end { background: #f1f5f9; color: #64748b; }
.fc-st-off { background: #fee2e2; color: #b91c1c; }
.fc-time-label { align-self: center; white-space: nowrap; cursor: help; }
/* 节日活动「每日可领」勾选 */
.fc-daily-label {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-sub); white-space: nowrap; cursor: pointer;
  align-self: center; user-select: none;
}
.fc-daily-label input { accent-color: #2563eb; margin: 0; }
/* 节日活动行删除按钮 */
.fc-del {
  flex: none; align-self: center; width: 26px; height: 26px; padding: 0;
  border-radius: 8px; border: 1px solid #fecaca; background: #fef2f2;
  color: #b91c1c; font-size: 13px; line-height: 1; cursor: pointer;
}
.fc-del:hover { background: #fee2e2; }
/* 节日活动配图：缩略图 + 上传/更换 + 移除 */
.fc-img-thumb {
  flex: none; align-self: center; width: 40px; height: 40px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border); cursor: pointer;
}
.fc-img-btn {
  flex: none; align-self: center; width: 26px; height: 26px; padding: 0;
  border-radius: 8px; border: 1px solid #bfdbfe; background: #eff6ff;
  font-size: 13px; line-height: 1; cursor: pointer;
}
.fc-img-btn:hover { background: #dbeafe; }
.fc-img-del {
  flex: none; align-self: center; width: 22px; height: 22px; padding: 0;
  border-radius: 8px; border: 1px solid #fecaca; background: #fef2f2;
  color: #b91c1c; font-size: 11px; line-height: 1; cursor: pointer;
}
.fc-img-del:hover { background: #fee2e2; }
/* 极客商店：开关/小标题/抽奖成本/删除按钮 */
.st-on-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text); cursor: pointer; user-select: none;
  margin-bottom: 10px;
}
.st-on-label input { accent-color: #2563eb; margin: 0; }
.st-sub { font-size: 13px; color: var(--text-sub); margin: 14px 0 8px; font-weight: 600; }
.st-lot-cost {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text); margin-bottom: 8px;
}
.st-lot-cost input {
  box-sizing: border-box; padding: 8px 10px; font-size: 13px;
  border-radius: 8px; border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
}
.st-life-label {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-sub); white-space: nowrap; cursor: pointer;
  align-self: center; user-select: none;
}
.st-life-label input { accent-color: #2563eb; margin: 0; }
/* 实物商品展示图上传 */
.st-img-wrap {
  flex: none; align-self: center; display: inline-flex; align-items: center; gap: 4px;
}
.st-img-thumb {
  width: 26px; height: 26px; border-radius: 6px; object-fit: cover;
  border: 1px solid var(--border); background: #f7f9fc; display: block;
}
.st-img-btn {
  flex: none; width: 26px; height: 26px; padding: 0; border-radius: 6px;
  border: 1px solid var(--border); background: #f7f9fc; font-size: 13px; line-height: 1; cursor: pointer;
}
.st-img-btn:hover { background: #eef2f8; }
.st-img-del {
  flex: none; width: 20px; height: 20px; padding: 0; border-radius: 6px;
  border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; font-size: 11px; line-height: 1; cursor: pointer;
}
.st-img-del:hover { background: #fee2e2; }
.st-del, .zt-del {
  flex: none; align-self: center; width: 26px; height: 26px; padding: 0;
  border-radius: 8px; border: 1px solid #fecaca; background: #fef2f2;
  color: #b91c1c; font-size: 13px; line-height: 1; cursor: pointer;
}
.st-del:hover, .zt-del:hover { background: #fee2e2; }
.order-badge {
  flex: none; align-self: center; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap;
}
.order-pending { background: #e67e22; }
.order-ready { background: #2563eb; }
.order-shipped { background: #16a34a; }
.rc-add-row input[type="datetime-local"] {
  box-sizing: border-box; padding: 8px 6px; font-size: 12px;
  border-radius: 8px; border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
}
.wf-field { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 10px; }
.wf-field input, .wf-field textarea {
  display: block; width: 100%; margin-top: 4px; box-sizing: border-box;
  padding: 8px 10px; font-size: 13px; border-radius: 8px;
  border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
}
.wf-field textarea { resize: vertical; line-height: 1.7; font-family: inherit; }
/* App 内公告：投放范围行 */
.ann-scope-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.ann-scope-row select {
  padding: 8px 10px; font-size: 13px; border-radius: 8px;
  border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
}
.ann-scope-row input[type="text"] {
  flex: 1; min-width: 200px; box-sizing: border-box;
  padding: 8px 10px; font-size: 13px; border-radius: 8px;
  border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
}
/* 积分详情弹窗流水列表 */
.points-detail-list {
  max-height: 320px; overflow-y: auto; margin-top: 10px;
  border: 1px solid var(--border); border-radius: 10px; background: #f7f9fc;
}
.pd-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.pd-row:last-child { border-bottom: none; }
.pd-plus, .pd-minus { flex: none; min-width: 56px; font-weight: 600; }
.pd-plus { color: #15803d; }
.pd-minus { color: #dc2626; }
.pd-reason {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pd-balance, .pd-time { flex: none; color: var(--text-sub); font-size: 12px; }
.wf-field input:disabled { opacity: 0.55; }
.wf-default { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 10px; color: var(--text); }
.wf-html {
  width: 100%; height: 260px; box-sizing: border-box; resize: vertical;
  font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.5;
  border-radius: 8px; border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
  padding: 10px;
}
.feature-switch-wrap { position: relative; flex: none; }
.feature-switch-wrap input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.feature-switch {
  display: block; width: 42px; height: 23px; border-radius: 12px;
  background: #cfd6e4; position: relative; transition: background .15s;
}
.feature-knob {
  position: absolute; top: 2px; left: 2px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; transition: left .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.feature-switch-wrap input:checked ~ .feature-switch { background: var(--green); }
.feature-switch-wrap input:checked ~ .feature-switch .feature-knob { left: 21px; }

/* ═══════════ Toast ═══════════ */
.toast {
  position: fixed;
  top: 24px; left: 50%; transform: translateX(-50%);
  background: #1a2233;
  color: #fff;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.toast.toast-error { background: var(--red); }

/* ==================== 彩蛋实时预览 ==================== */
.egg-stage {
  position: relative;
  height: 210px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #f4f7fb 0%, #e8eef7 55%, #dfe8f5 100%);
  border: 1px solid #d5dde8;
}
.egg-particles { position: absolute; inset: 0; pointer-events: none; }
.egg-particle {
  position: absolute;
  top: -24px;
  will-change: transform, opacity;
}
.egg-stage.playing .egg-particle { animation: eggFall linear forwards; }
@keyframes eggFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(240px) rotate(320deg); opacity: 0.15; }
}
.egg-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 210px;
  max-width: 86%;
  padding: 18px 24px;
  border-radius: 18px;
  text-align: center;
  border: 1.5px solid #b3ffc93c;
  background: #f2140a0a;
}
.egg-pv-icon { font-size: 34px; line-height: 1.1; }
.egg-pv-icon img { width: 54px; height: 54px; object-fit: contain; }
.egg-pv-title { margin-top: 6px; font-weight: 700; line-height: 1.25; }
.egg-pv-sub { margin-top: 6px; font-size: 12px; }

/* ═══════════ 更新日志编辑器：长内容可滚动编辑 ═══════════ */
/* 弹窗超高时内部滚动（鼠标滚轮 / 触控板拖拽均可） */
#changelog-modal .modal {
  max-height: 84vh;
  display: flex;
  flex-direction: column;
}
#cl-items {
  flex: 1 1 auto;
  min-height: 72px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 10px;
}
/* 更新条目顶部对齐（多行文本框） */
#cl-items .rc-add-row { align-items: flex-start; }
#cl-items .cl-tag-slot { margin-top: 6px; }
/* 更新内容：多行文本框，长内容可换行显示并滚动查看 */
#cl-items textarea.cl-item-text {
  flex: 1; min-width: 160px; box-sizing: border-box;
  padding: 8px 10px; font-size: 13px; border-radius: 8px;
  border: 1px solid var(--border); background: #f7f9fc; color: var(--text);
  font-family: inherit; line-height: 1.5;
  resize: vertical; min-height: 38px; max-height: 160px;
  overflow-y: auto;
}

/* ── 更新日志可视化编辑器 ── */
.cl-ver { border: 1px solid #E5E7EB; border-radius: 10px; padding: 10px; margin-bottom: 10px; background: #FBFCFE; }
.cl-ver-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.cl-ver-name { width: 130px; }
.cl-ver-date { width: 140px; }
.cl-ver-summary { width: 100%; margin-bottom: 8px; }
.cl-item { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.cl-item-tag { width: 120px; }
.cl-item-text { flex: 1; min-width: 180px; }

/* 更新日志卡片标题栏里的内联开关 */
.cl-inline-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #374151; white-space: nowrap; margin-left: 8px; cursor: pointer; }
.cl-inline-toggle input { margin: 0; }
