/* admin-web/public/styles.css */
:root {
  --green: #2E7D32;
  --green-dark: #1B5E20;
  --green-light: #E8F5E9;
  --bg: #F5F6F7;
  --card: #FFFFFF;
  --border: #E6E8EB;
  --text: #1F2328;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --red: #D93025;
  --amber: #B7791F;
  --blue: #1A73E8;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ============ 登录 ============ */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #EAF3EB 0%, #F5F6F7 60%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: 16px;
  padding: 36px 32px 30px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  text-align: center;
}

.login-logo { font-size: 40px; }
.login-title { font-size: 20px; font-weight: 600; margin: 12px 0 4px; }
.login-sub { color: var(--text-3); font-size: 13px; margin: 0 0 26px; }

.login-form { text-align: left; }

.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field-input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.field-input:focus, .select:focus, .textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}
.textarea { resize: vertical; min-height: 72px; }

.login-error { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 10px; }
.login-hint { color: var(--text-3); font-size: 12px; margin-top: 6px; }
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .field-input { flex: 1; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.captcha-img {
  height: 42px; width: 120px; flex: none; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; background: #F3F6F4;
}
.captcha-img:hover { border-color: var(--green); }

/* ============ 按钮 ============ */
.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: #F7F8F9; }
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-danger { background: #fff; color: var(--red); border-color: #F3C9C6; }
.btn-danger:hover { background: #FDF3F2; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { background: #F7F8F9; color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-xs { padding: 3px 8px; font-size: 12px; border-radius: 5px; }
.btn-warning { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.btn-warning:hover { background: #FDE68A; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ============ 布局 ============ */
.app-view { display: flex; min-height: 100vh; }

.sidebar {
  width: 208px;
  flex-shrink: 0;
  background: #FFFFFF;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 20px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.brand-icon { font-size: 20px; }

/* 菜单项多时可滚动：nav 占满剩余高度，超出部分自己滚（否则被 100vh 的 sidebar 裁剪） */
.nav { padding: 12px 10px; flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
  margin-bottom: 4px;
  font-size: 14px;
}
.nav-item:hover { background: #F5F6F7; color: var(--text); }
.nav-item.active { background: var(--green-light); color: var(--green-dark); font-weight: 600; }

.sidebar-footer { padding: 14px; border-top: 1px solid var(--border); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.page-title { font-size: 16px; font-weight: 600; margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.current-user { color: var(--text-3); font-size: 13px; }

.content { padding: 24px; }

/* ============ 卡片 / 统计 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.stat-num { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-label { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.stat-num.green { color: var(--green); }
.stat-num.blue { color: var(--blue); }
.stat-num.amber { color: var(--amber); }
.stat-num.red { color: var(--red); }

/* ============ 趋势图 ============ */
.trend {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  height: 200px;
  padding: 10px 4px 0;
}
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.trend-count { font-size: 12px; color: var(--green-dark); font-weight: 600; }
.trend-bar { width: 60%; max-width: 34px; background: #EDF3EE; border-radius: 6px; height: 150px; display: flex; align-items: flex-end; overflow: hidden; }
.trend-fill { width: 100%; background: linear-gradient(180deg, #66BB6A, #2E7D32); min-height: 3px; border-radius: 6px; }
.trend-date { font-size: 11px; color: var(--text-3); }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { color: var(--text-2); font-weight: 600; background: #FAFBFC; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #FBFCFB; }
.table .muted { color: var(--text-3); }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #EEF0F2; object-fit: cover; flex-shrink: 0; }
.user-cell .name { font-weight: 600; }
.user-cell .sub { color: var(--text-3); font-size: 12px; }

/* ============ 标签 ============ */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  background: #F1F3F5;
  color: var(--text-2);
}
.tag-green { background: var(--green-light); color: var(--green-dark); }
.tag-amber { background: #FEF3C7; color: #92400E; }
.tag-red { background: #FEE2E2; color: #991B1B; }
.tag-blue { background: #E0EDFD; color: #1A56B4; }
.tag-gray { background: #F1F3F5; color: var(--text-3); }

.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.badge-warn { background: #FEF3C7; color: #92400E; }
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-muted { background: #F0F1F3; color: #6B7280; }

/* ============ 工具条 ============ */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.toolbar .spacer { flex: 1; min-width: 8px; }
.tabs { display: flex; gap: 6px; }
.tab {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-2);
}
.tab:hover { border-color: #D5D9DE; }
.tab.active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }

/* 用户管理：筛选功能菜单移到「用户列表」标题下方，靠左排列、窄屏自动换行 */
.user-tabs { flex-wrap: wrap; margin-bottom: 14px; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; color: var(--text-2); font-size: 13px; }
/* 用户管理页分页：左对齐，并下沉到「用户(昵称)」列正下方（2026-10-08） */
#user-pager { justify-content: flex-start; padding-left: 12px; margin-top: 14px; }
#user-pager .pager-stat { color: var(--text-2); font-size: 13px; }

/* VIP 图标与会员类型（用户列表副文） */
.vip-icon { display: inline-block; margin-right: 3px; font-size: 13px; line-height: 1; color: #E0A106; }
.vip-type { color: #B8860B; font-weight: 600; }

/* VIP 套餐筛选下拉 */
.vip-filter {
  margin: 0 0 14px 12px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

/* 各类有效会员人数统计（用户列表下方） */
.member-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px 12px;
  font-size: 13px;
  color: var(--text-2);
}
.member-stats .ms-title { color: var(--text-3); }
.member-stats .ms-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #FAF6EC;
  border: 1px solid #F0E2C0;
}
.member-stats .ms-name { color: #8A6D1B; font-weight: 600; }
.member-stats .ms-num { color: var(--text); font-weight: 700; }
.member-stats .ms-empty { color: var(--text-3); }

/* 分页页码按钮 */
#user-pager .pg-btn, #user-pager .pg-num {
  min-width: 30px;
  padding: 5px 10px;
  font-size: 13px;
}
#user-pager .pg-cur { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; cursor: default; }

/* 资料库：行内权限下拉 */
.lib-perm-sel {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

/* 数量快捷选择（生成兑换码弹层） */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: -8px; }
.chip {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--green); color: var(--green-dark); background: var(--green-light); }

.empty { text-align: center; color: var(--text-3); padding: 48px 0; }
.loading { text-align: center; color: var(--text-3); padding: 40px 0; }

/* ============ 弹层 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.2);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-close { border: none; background: transparent; font-size: 22px; line-height: 1; color: var(--text-3); cursor: pointer; }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; word-break: break-all; }

/* ============ 用户详情（分区卡片）============ */
.ud-avatar-row { display: flex; align-items: center; gap: 14px; }
.ud-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #f1f5f9; border: 1px solid var(--border); flex-shrink: 0; }
.ud-avatar-ph { width: 56px; height: 56px; border-radius: 50%; background: #f1f5f9; border: 1px dashed var(--border); flex-shrink: 0; }
.ud-name { font-size: 16px; font-weight: 600; color: var(--text); }
.ud-openid { font-size: 11px; color: var(--text-3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; margin-top: 2px; }
.ud-grid { display: grid; grid-template-columns: 72px 1fr; gap: 9px 12px; font-size: 13px; margin: 0; }
.ud-grid dt { color: var(--text-3); }
.ud-grid dd { margin: 0; word-break: break-all; }
.ud-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; line-height: 1.4; }
.ud-badge.ok { background: rgba(46,125,50,.12); color: var(--green); }
.ud-badge.dim { background: rgba(148,163,184,.16); color: var(--text-2); }
.ud-badge.warn { background: rgba(183,121,31,.14); color: var(--amber); }
.ud-badge.danger { background: rgba(217,48,37,.14); color: var(--red); }
.ud-photo-wrap { margin-top: 16px; }
.ud-photo-label { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.ud-photo { width: 100%; max-width: 280px; border-radius: var(--radius); border: 1px solid var(--border); background: #f1f5f9; display: block; }
.ud-empty { color: var(--text-3); }

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: rgba(31, 35, 40, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 100;
  max-width: 80vw;
}

/* ============ 响应式 ============ */
@media (max-width: 820px) {
  .app-view { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-brand { border-bottom: none; padding: 12px 14px; }
  .nav { display: flex; overflow-x: auto; padding: 8px; gap: 4px; }
  .nav-item { margin-bottom: 0; white-space: nowrap; }
  .sidebar-footer { border-top: none; padding: 8px 12px; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* ============ 广告管理 ============ */
.section-head { display: flex; align-items: center; margin-bottom: 14px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 160px; }
.badge-ok { background: #DCFCE7; color: #166534; }
.badge-danger { background: #FEE2E2; color: #991B1B; }

/* 报名入口：扩展字段可视化编辑 */
.schema-row { margin-bottom: 8px; padding: 8px; border: 1px solid #E5E7EB; border-radius: 8px; background: #F9FAFB; }
.schema-row-main { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.schema-row-main .sr-label { flex: 2 1 140px; min-width: 120px; }
.schema-row-main .sr-key { flex: 2 1 120px; min-width: 110px; }
.schema-row-main .sr-type { flex: 1 1 96px; min-width: 96px; }
.schema-row .sr-req { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #4B5563; white-space: nowrap; cursor: pointer; }
.schema-row .sr-options { margin-top: 6px; }
.schema-row .sr-del { flex: 0 0 auto; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.b-thumb-wrap { width: 120px; height: 48px; border-radius: 6px; overflow: hidden; background: #F3F4F6; display: flex; align-items: center; justify-content: center; }
.b-thumb { max-width: 100%; max-height: 100%; object-fit: cover; }
.b-preview { margin: 8px 0; }
.b-preview img { max-width: 100%; max-height: 140px; border-radius: 8px; border: 1px solid var(--border); display: block; }
.checkbox-field { display: flex; align-items: center; gap: 8px; flex-direction: row; }
.checkbox-field input[type=checkbox] { width: 18px; height: 18px; flex: none; cursor: pointer; }
.field-label-inline { font-size: 14px; color: var(--text); font-weight: 500; cursor: pointer; }

/* 图文详情配图（多张） */
.b-detail-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.b-detail-img { position: relative; width: 120px; height: 90px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #F3F4F6; }
.b-detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b-detail-del { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; line-height: 20px; text-align: center; border: none; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 14px; cursor: pointer; padding: 0; }
.b-detail-actions { margin: 4px 0; }

/* ============ 公告管理 ============ */
.a-content-preview {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-2);
  font-size: 13px;
}

/* ============ 积分管理 ============ */
.points-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-tab {
  padding: 9px 18px; border-radius: 8px; font-size: 14px; cursor: pointer;
  background: #F3F4F6; color: var(--text-2); border: 1px solid transparent;
}
.pt-tab.active { background: var(--primary, #1a7f37); color: #fff; }
.pt-tab:hover { opacity: 0.9; }

.rule-block { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 14px; background: #FAFBFC; }
.rule-title { font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px; }
.rule-grid label { display: flex; flex-direction: column; font-size: 12px; color: var(--text-2); gap: 4px; }
.rule-grid input { padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; }

.switch { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); font-weight: 400; cursor: pointer; }
.switch input { width: 16px; height: 16px; cursor: pointer; }

.prod-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.prod-row:last-child { border-bottom: none; }
.prod-name { font-weight: 500; min-width: 120px; }
.prod-field { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.prod-field input { width: 80px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; }
.prod-type { font-size: 12px; color: var(--text-3); background: #F0F1F3; padding: 2px 8px; border-radius: 6px; }

.stat-pill { background: #EFF6FF; color: #1E40AF; border-radius: 8px; padding: 6px 12px; font-size: 13px; }
.stat-pill b { font-size: 15px; }

.search-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-row .field-input { padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; flex: 1; min-width: 140px; }

.tx-acquire { color: #1a7f37; font-weight: 600; }
.tx-consume { color: #D32F2F; font-weight: 600; }

/* ===== 意见反馈 ===== */
.fb-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border, #EEE); }
.fb-item:last-child { border-bottom: none; }
.fb-left { flex: 0 0 auto; }
.fb-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #F0F1F3; }
.fb-avatar-empty { display: flex; align-items: center; justify-content: center; font-size: 22px; }
.fb-main { flex: 1 1 auto; min-width: 0; }
.fb-head { display: flex; align-items: baseline; gap: 10px; }
.fb-name { font-weight: 600; font-size: 14px; color: #1F2937; }
.fb-time { font-size: 12px; color: #9CA3AF; }
.fb-meta { font-size: 12px; color: #9CA3AF; margin-top: 2px; word-break: break-all; }
.fb-content { font-size: 14px; color: #374151; line-height: 1.6; margin-top: 8px; white-space: pre-wrap; word-break: break-word; }
.fb-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fb-img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--border, #EEE); }


/* 反馈列表：类型标签 / 状态 / 未读红点 / 预览 */
.fb-type { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #EEF2F7; color: #5B6B7F; margin-left: 6px; }
.fb-type-bug { background: #FDECEA; color: #C0392B; }
.fb-type-suggest { background: #EAF3FF; color: #2563EB; }
.fb-type-content { background: #FFF4E5; color: #B9770E; }
.fb-type-other { background: #EEF2F7; color: #5B6B7F; }
.fb-status { font-size: 11px; padding: 1px 8px; border-radius: 10px; margin-left: 6px; }
.fb-status-pending { background: #FFF1E0; color: #D97706; }
.fb-status-replied { background: #E7F6EC; color: #1E8E4E; }
.fb-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: #E53935; display: inline-block; margin-left: 6px; }
.fb-preview { font-size: 13px; color: #6B7280; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-item { cursor: pointer; }
.fb-item:hover { background: #FAFBFC; }

/* 对话详情 */
.fb-detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.fb-thread { max-height: 460px; overflow-y: auto; padding: 8px 0; border-top: 1px solid var(--border, #EEE); border-bottom: 1px solid var(--border, #EEE); }
.fb-msg { margin: 10px 0; max-width: 82%; }
.fb-msg-user { margin-right: auto; }
.fb-msg-admin { margin-left: auto; text-align: right; }
.fb-msg-role { font-size: 11px; color: #9CA3AF; margin-bottom: 4px; }
.fb-msg-body { display: inline-block; text-align: left; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.fb-msg-user .fb-msg-body { background: #F1F3F5; color: #1F2937; border-top-left-radius: 4px; }
.fb-msg-admin .fb-msg-body { background: #2E7D32; color: #FFF; border-top-right-radius: 4px; }
.fb-msg-imgs { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.fb-msg-img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--border, #EEE); }
.fb-msg-time { font-size: 10px; color: #B0B7C3; margin-top: 4px; }

/* 回复输入区 */
.fb-reply { margin-top: 14px; }
.fb-reply-input { width: 100%; min-height: 84px; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border, #EEE); border-radius: 10px; font-size: 14px; resize: vertical; font-family: inherit; }
.fb-reply-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 12px; }

/* 图片放大灯箱 */
.img-lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.82); display: flex; align-items: center; justify-content: center; z-index: 100000; cursor: zoom-out; padding: 24px; box-sizing: border-box; }
.img-lightbox img { max-width: 94%; max-height: 94%; border-radius: 8px; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); }

/* ============ 视频上传弹窗（分区布局） ============ */
.vm-form { padding: 2px 0 4px; }
.vm-sec {
  margin-bottom: 6px;
  padding: 16px 14px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FCFCFD;
}
.vm-sec + .vm-sec { margin-top: 14px; }
.vm-sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.vm-sec-title::before {
  content: '';
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--green);
  flex: none;
}
.vm-sec-title .vm-sec-note { font-weight: 400; font-size: 12px; color: var(--text-3); }

/* 来源卡片单选：2×2 网格 */
.src-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.src-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  user-select: none;
}
.src-card:hover { border-color: #B9C6BB; }
.src-card input { position: absolute; opacity: 0; pointer-events: none; }
.src-card .src-name { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.src-card .src-desc { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.src-card.selected {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: 0 0 0 1px var(--green);
}
.src-card.selected .src-name { color: var(--green-dark); }
.src-card.selected .src-desc { color: #4E7A52; }
.src-card .src-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  display: none;
}
.src-card.selected .src-check { display: block; }

/* 上传区：虚线框 */
.upload-zone {
  border: 1.5px dashed #C9D2CB;
  border-radius: 9px;
  background: #fff;
  padding: 14px;
  margin-bottom: 14px;
  transition: border-color .15s, background .15s;
}
.upload-zone:hover { border-color: var(--green); background: #FAFDF9; }
.upload-zone .uz-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 500;
}
.upload-zone .uz-icon { font-size: 20px; flex: none; }
.upload-zone input[type=file] {
  width: 100%;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.upload-zone input[type=file]::file-selector-button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  margin-right: 10px;
  transition: background .15s, border-color .15s;
}
.upload-zone input[type=file]::file-selector-button:hover { background: var(--green-light); border-color: var(--green); color: var(--green-dark); }
.vm-tip {
  margin-top: 10px;
  padding: 7px 10px;
  background: #F3F4F6;
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-2);
  word-break: break-all;
  line-height: 1.5;
}
.vm-tip-ok { background: var(--green-light); color: var(--green-dark); }

/* 上传进度条 */
.vm-progress {
  display: none;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.vm-progress .vp-bar {
  height: 8px;
  background: #EEF0F2;
  border-radius: 999px;
  overflow: hidden;
}
.vm-progress .vp-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2E7D32, #43A047);
  transition: width .15s;
}
.vm-progress .vp-label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-2);
}

/* 展示设置两列排布 */
.vm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.vm-grid2 .field { margin-bottom: 12px; }
.vm-sec .field:last-child { margin-bottom: 8px; }
.vm-hint { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }

@media (max-width: 560px) {
  .src-grid { grid-template-columns: 1fr; }
  .vm-grid2 { grid-template-columns: 1fr; }
}

/* ===== 积分管理（2026-10-07 统一积分管理页新增）===== */
.pts-row-card { transition: box-shadow .15s ease; }
.pts-row-card:hover { box-shadow: 0 1px 4px rgba(0,0,0,.06); }
/* 行内字段用统一的右对齐标签，保证一行内多列视觉对齐 */
.pts-row > span:first-child { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 明细区在窄屏下允许横向滚动，避免列被压扁 */
.pts-tx-slot table { min-width: 640px; }
.pts-tx-slot { overflow-x: auto; }
/* 「调整」按钮与余额之间的间距，弱化视觉权重让余额更突出 */
.pts-row [data-act="adjust"] { margin-left: 4px; }
/* 分页条居中 */
#pts-pager-top, #pts-pager-bottom { justify-content: flex-end; }

/* ===== 积分管理：表格化列表 + 调整弹窗（2026-10-07）===== */
/* 列宽固定，保证每页每行的字段纵向对齐（此前 flex 排列会因昵称长短错位） */
.pts-item { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.pts-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pts-table thead th {
  background: #F7F8FA; font-size: 12px; font-weight: 600; color: #475569;
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border, #e5e7eb);
  white-space: nowrap;
}
.pts-table td { padding: 9px 10px; border-bottom: 1px solid #F1F3F5; font-size: 13px; vertical-align: middle; }
.pts-row { cursor: pointer; }
.pts-row:hover td { background: #FAFBFC; }
.pts-row.open td { background: #F1F5FB; }
.pts-table .c-nick  { width: 22%; }
.pts-table .c-oid   { width: 16%; }
.pts-table .c-time  { width: 13%; }
.pts-table .c-src   { width: 10%; }
.pts-table .c-note  { width: 17%; }
.pts-table .c-bal   { width: 10%; text-align: right; }
.pts-table .c-act   { width: 12%; text-align: right; white-space: nowrap; }
/* 窄屏下让表格横向滚动，不要把列压扁 */
.pts-table code { font-size: 11px; color: #64748b; word-break: break-all; }
.pts-row td.c-nick, .pts-row td.c-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 表头上的「?」悬停提示 */
.th-tip {
  display: inline-block; margin-left: 4px; width: 13px; height: 13px; line-height: 13px;
  text-align: center; border-radius: 50%; background: #CBD5E1; color: #fff;
  font-size: 9px; cursor: help; vertical-align: middle;
}
.pts-vip {
  display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 4px;
  background: #DCFCE7; color: #15803D; font-size: 10px; font-weight: 600; vertical-align: middle;
}
.pts-toggle { margin-left: 6px; font-size: 12px; color: var(--primary, #1a7f37); cursor: pointer; }

/* ===== 调整弹窗 ===== */
.pts-modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 9999;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.pts-modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 520px;
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
}
.pts-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #EEF0F3;
}
.pts-modal-body { padding: 16px 18px; }
.pts-modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 18px; border-top: 1px solid #EEF0F3; background: #FAFBFC;
  border-radius: 0 0 12px 12px;
}
/* 顶部「当前余额 + openid」区 */
.pts-adj-cur {
  display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
  padding: 12px 14px; background: #F8FAFC; border-radius: 8px; margin-bottom: 16px;
}
/* 每个字段：标签 + 控件 + 说明 */
.pts-field { margin-bottom: 16px; }
.pts-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #1F2937; }
.pts-req {
  display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px;
  background: #FEE2E2; color: #B91C1C; font-size: 10px; font-weight: 600; vertical-align: middle;
}
.pts-hint { font-size: 11px; color: #64748b; margin-top: 5px; line-height: 1.6; }
.pts-preview { font-size: 12px; margin-top: 6px; min-height: 18px; }
.pts-result { font-size: 13px; min-height: 20px; }

/* ===== 表头合并为一份（2026-10-07 用户反馈「不用每个用户上面都加」） ===== */
/* 总表头：吸顶，滚动时列名始终可见 */
.pts-thead-wrap {
  position: sticky; top: 0; z-index: 5;
  background: #F7F8FA; border: 1px solid var(--border, #e5e7eb); border-radius: 8px 8px 0 0;
  margin-bottom: -1px;
}
.pts-thead-table { border-collapse: collapse; table-layout: fixed; background: #F7F8FA; }
.pts-thead-table thead th { border-bottom: 1px solid var(--border, #e5e7eb); }
/* 数据行表：去掉自身边框，与总表头连成一体 */
.pts-row-table { border-collapse: collapse; table-layout: fixed; }
.pts-row-table td { border-bottom: 1px solid #F1F3F5; }
.pts-item { margin-bottom: 0; border-left: 0; border-right: 0; border-radius: 0; }
.pts-item:last-of-type { border-bottom: 1px solid var(--border, #e5e7eb); border-radius: 0 0 8px 8px; }
/* 首行紧贴表头，不留空隙 */
#pts-list .pts-item:first-child { border-top: 0; }
#pts-list .pts-item:first-child .pts-row-table td { border-top: 0; }

.tab-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ks-edit { margin: 4px 0; }
.ks-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }


/* ===== 推广返现页（2026-10-12） ===== */
.rebate-cfg input[type="number"] { padding: 7px 10px; }
#reb-list table .muted { color: #8a94a6; }
#reb-tx { max-height: 60vh; overflow: auto; }

/* ===== 支付健康度卡片（2026-10-16） ===== */
.ph-funnel {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 14px 0 4px;
}
.ph-step {
  text-align: center;
  padding: 10px 4px;
  background: #f7f8fa;
  border: 1px solid #e8eaef;
  border-radius: 8px;
}
.ph-step-name { font-size: 12px; color: #8a94a6; margin-bottom: 4px; }
.ph-step-val { font-size: 20px; font-weight: 600; line-height: 1.2; }
.ph-step-pct { font-size: 11px; color: #8a94a6; margin-top: 2px; }

.ph-sec {
  font-size: 13px;
  font-weight: 600;
  color: #4a5163;
  margin: 16px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eef0f4;
}

.ph-dist-row {
  display: grid;
  grid-template-columns: 190px 1fr 96px;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.ph-dist-label { font-size: 12px; color: #3d4455; }
.ph-dist-errno {
  font-size: 11px;
  color: #8a94a6;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ph-dist-bar {
  height: 8px;
  background: #eef0f4;
  border-radius: 4px;
  overflow: hidden;
}
.ph-dist-fill { height: 100%; border-radius: 4px; }
.ph-dist-fill.good { background: #2e9e5b; }
.ph-dist-fill.bad  { background: #e05a4e; }
.ph-dist-num {
  font-size: 12px;
  color: #8a94a6;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ph-dist-note {
  grid-column: 1 / -1;
  font-size: 11px;
  color: #a0a7b4;
  margin: -2px 0 6px 0;
}

/* ===== 站内信群发页（2026-10-16） ===== */
.mc-t { font-size: 13px; font-weight: 500; color: #3d4455; }
.mc-sub { font-size: 11px; color: #8a94a6; margin-top: 2px; }
.mc-aud { font-size: 12px; color: #5a6172; }
.mc-ops { white-space: nowrap; }
.mc-ops .btn { margin-right: 4px; }
.mc-ops .btn:last-child { margin-right: 0; }
.mc-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.mc-row .field { flex: 1; min-width: 130px; margin-bottom: 0; }

/* ===== 百度网盘归档 · T2 扫码授权（2026-10-28） ===== */
/* 全部类名统一 .pan- 前缀：网盘 UI 独立成文件（public/pan.js），
   整块回滚只需删一个 script 标签 + 这一段样式，不影响存量样式。 */
.pan-card { margin-bottom: 16px; }
.pan-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
/* 状态点：默认灰 = 未配置/未绑定；ok = 已绑定；err = 失效/异常 */
.pan-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c3c8d2;
  flex: none;
}
.pan-dot.ok { background: #2e9e5b; }
.pan-dot.err { background: #e05a4e; }
.pan-state {
  font-size: 14px;
  font-weight: 600;
  color: #3d4455;
}
.pan-detail {
  font-size: 12px;
  color: #8a94a6;
  margin-top: 6px;
  line-height: 1.7;
  /* 昵称/错误文案可能很长，长单词会撑破卡片 */
  word-break: break-all;
}
.pan-ops {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
/* 消息区给个最小高度：状态切换时不至于整块卡片上下抖动 */
.pan-msg {
  font-size: 12px;
  color: #8a94a6;
  margin-top: 10px;
  min-height: 16px;
  line-height: 1.6;
  word-break: break-all;
}

/* ===== 扫码授权弹窗 ===== */
.pan-auth {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.pan-qr-box {
  background: #fff;
  border: 1px solid #e8eaef;
  border-radius: 10px;
  padding: 10px;
  flex: none;
}
.pan-qr {
  display: block;
  width: 180px;
  height: 180px;
  /* 二维码是位图，禁止插值模糊（否则扫码识别率下降） */
  image-rendering: pixelated;
}
.pan-auth-info {
  flex: 1;
  min-width: 220px;
}
.pan-auth-label {
  font-size: 12px;
  color: #8a94a6;
  margin-bottom: 4px;
}
.pan-usercode {
  /* 设备码要能照着输：等宽 + 大字距 */
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #2b3040;
  margin-bottom: 12px;
  user-select: all;
}
.pan-countdown {
  font-size: 18px;
  font-weight: 600;
  color: #3d4455;
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.pan-auth-tip {
  font-size: 12px;
  color: #8a94a6;
  line-height: 1.8;
}
.pan-auth-state {
  font-size: 13px;
  color: #3d4455;
  margin-top: 10px;
  min-height: 18px;
}


/* ===== 网盘文件浏览器（T4-10）===== */
.pan-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 2px;
}

.pan-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  background: #fafbfc;
  flex-wrap: wrap;
}

.pan-file-main {
  flex: 1 1 240px;
  min-width: 0;
}

.pan-file-name {
  font-size: 14px;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pan-file-meta {
  font-size: 12px;
  margin-top: 2px;
}

.pan-progress {
  flex: 1 1 100%;
  height: 6px;
  background: #eef0f3;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}

.pan-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4a90e2, #2f7de1);
  border-radius: 3px;
  transition: width .3s ease;
}

.pan-err {
  display: block;
  font-size: 12px;
  color: #d93025;
  padding: 4px 0;
}

.btn-ok {
  background: #e8f5e9 !important;
  border-color: #a5d6a7 !important;
  color: #2e7d32 !important;
}

.btn-err {
  background: #fdecea !important;
  border-color: #f5c6cb !important;
  color: #c62828 !important;
}
