:root {
  --brand: #1e6fff;
  --brand-dark: #1557d6;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1f2733;
  --text-muted: #6b7686;
  --border: #e3e8f0;
  --danger: #e5484d;
  --warn: #d97706;
  --ok: #16a34a;
  --radius: 8px;
}
* { box-sizing: border-box; }
/* 作者样式会覆盖 UA 的 [hidden]{display:none}，必须显式补回，否则弹窗永远可见 */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
}

/* ---------- 登录 ---------- */
.login-wrap { height: 100vh; overflow: auto; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e6fff 0%, #1557d6 100%); }
.login-card { background: var(--card); border-radius: 14px; padding: 36px 32px; width: 340px;
  box-shadow: 0 18px 50px rgba(10, 30, 80, .25); }
.login-logo { width: 52px; height: 52px; border-radius: 12px; margin: 0 auto 12px;
  background: linear-gradient(135deg, #1e6fff, #1557d6); color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center; letter-spacing: 1px; }
.login-card h1 { font-size: 19px; margin: 4px 0 2px; text-align: center; }
.login-sub { text-align: center; color: var(--text-muted); font-size: 12px; margin: 0 0 22px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.field input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; outline: none; transition: border-color .15s; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,111,255,.12); }
.form-error { color: var(--danger); font-size: 13px; margin: 4px 0 10px; }

/* ---------- 按钮 ---------- */
.btn { display: inline-block; padding: 5px 11px; border: 1px solid var(--border); background: #fff;
  border-radius: var(--radius); cursor: pointer; font-size: 12.5px; color: var(--text); transition: all .15s; }
.btn:hover { border-color: #c8d2e0; background: #f7f9fc; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { color: var(--danger); border-color: #f3c2c4; }
.btn-danger:hover { background: #fef2f2; border-color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: rgba(0,0,0,.05); }
.btn-block { width: 100%; padding: 10px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 顶栏 ---------- */
.topbar { display: flex; align-items: center; gap: 20px; height: 44px; padding: 0 14px;
  background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 700; font-size: 14px; white-space: nowrap; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab { border: none; background: none; padding: 5px 12px; border-radius: var(--radius); cursor: pointer;
  font-size: 13px; color: var(--text-muted); }
.tab:hover { background: #f0f4fb; }
.tab.active { background: #e8f0ff; color: var(--brand-dark); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.whoami { color: var(--text-muted); font-size: 13px; }

/* ---------- 内容（全屏铺满，滚动只发生在表格内部） ---------- */
#app-view { height: 100vh; display: flex; flex-direction: column; }
.content { flex: 1; min-height: 0; padding: 10px 14px 8px; display: flex; flex-direction: column; }
.tab-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* 概览卡片少时也允许整页滚动 */
#tab-dashboard { display: block; overflow: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.stat-num { font-size: 28px; font-weight: 700; color: var(--brand-dark); }
.stat-warn { color: var(--warn); }
.stat-label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.toolbar { display: flex; gap: 8px; margin-bottom: 8px; flex-shrink: 0; }
.pager { flex-shrink: 0; }
/* 表格区：纵向吃满剩余高度；宽度铺满，超宽屏不出现滚动条，窄屏可横向拖动（优于直接裁切） */
.table-wrap { flex: 1; min-height: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; overflow: auto; }
.table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #c6cedb; border-radius: 8px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #a8b3c4; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
/* 紧凑行高：单屏尽量多显示行 */
th, td { padding: 4px 8px; text-align: left; font-size: 12.5px; border-bottom: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
th { background: #f8fafd; color: var(--text-muted); font-weight: 600; position: sticky; top: 0; z-index: 1; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f7faff; }
.cell-ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-wrap { white-space: normal; overflow: visible; line-height: 1.45; }
.muted { color: var(--text-muted); }
.empty-row { text-align: center; color: var(--text-muted); padding: 20px !important; }
.mono { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12px; }
/* 管理后台消息历史：钉钉原生 content 片段（非文本类型显示原始 JSON） */
.raw-content {
  margin: 0;
  padding: 6px 8px;
  background: #f7f9fc;
  border: 1px solid #e4e9f2;
  border-radius: 5px;
  font-family: ui-monospace, Consolas, Menlo, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #374151;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 消息内容折叠：文本 span 和 JSON pre 共用 */
.foldable { cursor: pointer; position: relative; transition: max-height 0.15s ease; }
/* 文本折叠：1.6em = 正好一行 */
span.foldable.folded {
  max-height: 1.6em;
  overflow: hidden;
  display: block;
}
/* JSON pre 折叠：2em = 最多一行半（含 padding） */
pre.raw-content.foldable.folded {
  max-height: 2em;
  overflow: hidden;
}
/* 展开后恢复完整滚动 */
.foldable.fold-open {
  max-height: none;
  display: block;
  overflow: auto;
}
/* pre 展开给个合理上限 */
pre.raw-content.foldable.fold-open { max-height: 400px; }
/* 折叠遮罩提示 */
.foldable.folded::after {
  content: '… 双击展开';
  position: absolute;
  right: 0; bottom: 0;
  padding-left: 24px;
  background: linear-gradient(to right, transparent, #fff 35%);
  color: var(--text-muted, #8a939e);
  font-size: 11px;
  line-height: 1.4em;
  white-space: nowrap;
  pointer-events: none;
}

/* 中转机器人展开详情：横向卡片网格（td 的 nowrap 会继承进来，必须显式复位） */
#relay-detail-box { white-space: normal; }
#relay-detail-box .kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
#relay-detail-box .kv-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; min-width: 0; }
#relay-detail-box .kv-card .k { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
#relay-detail-box .kv-card .v { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 12px; word-break: break-all; white-space: normal; }
#relay-detail-box table { table-layout: fixed; width: 100%; }
/* 消息历史 7 列固定宽度分配：时间 会话 发送者 类型 内容 服务器收取 推送状态 */
#relay-detail-box table thead + tbody,
#relay-detail-box table:nth-of-type(2) { }
#relay-detail-box table colgroup + col,
#relay-detail-box table:first-of-type:not(.subs-table) { }
/* 用 nth-child 直接给 7 列定宽 */
#relay-detail-box table tr th:nth-child(1), #relay-detail-box table tr td:nth-child(1) { width: 120px; }  /* 消息时间 */
#relay-detail-box table tr th:nth-child(2), #relay-detail-box table tr td:nth-child(2) { width: 70px; }   /* 会话 */
#relay-detail-box table tr th:nth-child(3), #relay-detail-box table tr td:nth-child(3) { width: 100px; }  /* 发送者 */
#relay-detail-box table tr th:nth-child(4), #relay-detail-box table tr td:nth-child(4) { width: 90px; }   /* 类型 */
#relay-detail-box table tr th:nth-child(5), #relay-detail-box table tr td:nth-child(5) { width: 360px; }  /* 内容 ★ */
#relay-detail-box table tr th:nth-child(6), #relay-detail-box table tr td:nth-child(6) { width: 120px; }  /* 服务器收取 */
#relay-detail-box table tr th:nth-child(7), #relay-detail-box table tr td:nth-child(7) { width: 130px; }  /* 推送状态 */
/* 内容列内部不再需要 inline max-width */
#relay-detail-box table tr td:nth-child(5) { max-width: 360px; overflow: hidden; }
#relay-detail-box td, #relay-detail-box th { white-space: normal; overflow: hidden; text-overflow: ellipsis; }

/* 中转机器人：参数栏 + 单行卡片（网格对齐，整卡点击展开） */
.relay-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; padding: 2px; }
.relay-head, .relay-card-head {
  display: grid; gap: 10px; align-items: center;
  grid-template-columns: minmax(150px, 1.3fr) minmax(130px, 1fr) minmax(120px, 1fr) minmax(96px, .8fr) minmax(140px, 1fr) minmax(95px, .8fr) minmax(150px, 1.1fr) 22px;
}
.relay-head { padding: 0 16px 2px; color: var(--text-muted); font-size: 12px; }
.relay-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 9px 16px; transition: border-color .15s, box-shadow .15s; }
.relay-card:hover { border-color: #b9c8e8; box-shadow: 0 2px 8px rgba(30, 60, 120, .06); }
.relay-card.expanded { border-color: var(--accent, #1e6fff); }
.relay-card-head { cursor: pointer; user-select: none; }
.relay-cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.relay-avatar { width: 28px; height: 28px; border-radius: 7px; background: #eef3ff; color: var(--accent, #1e6fff); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none; }
.relay-stat-cell { color: var(--text-muted); }
.relay-stat-cell b { color: var(--text, #1f2329); }
.relay-chevron { color: var(--text-muted); font-size: 13px; text-align: center; }
.relay-detail { grid-column: 1 / -1; border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 12px; cursor: default; }
/* 许可证明文保护：默认打码，点击切换显示/隐藏 */
.lic-key { cursor: pointer; border-bottom: 1px dashed var(--border-default, #d5dbe6); }
.lic-key:hover { color: var(--accent, #1e6fff); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; }
.tag-ok { background: #e8f8ee; color: var(--ok); }
.tag-danger { background: #fdecec; color: var(--danger); }
.tag-warn { background: #fef3e2; color: var(--warn); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }

/* ---------- 设备页：在线/过滤/搜索 ---------- */
.toolbar-wrap { align-items: center; flex-wrap: wrap; }
.filter-group { display: inline-flex; gap: 0; }
.filter-btn { border-radius: 0; }
.filter-group .filter-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.filter-group .filter-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.filter-group .filter-btn + .filter-btn { margin-left: -1px; }
.filter-btn.active { background: #e8f0ff; border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.search-input { padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 12.5px; outline: none; width: 200px; }
.search-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,111,255,.12); }
.auto-refresh { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.dot-on { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.dot-off { background: #c4ccd8; }
.btn-ok { color: var(--ok); border-color: #b7e4c6; }
.btn-ok:hover { background: #f0fbf4; border-color: var(--ok); }
/* 设备表：自动列宽——在线/版本/状态等短内容列按内容收窄（不再被均摊拉宽），
   宽屏剩余宽度由机器名称列吸收；机器名超长时按 max-width 截断省略 */
.tbl-dev { table-layout: auto; }
.tbl-dev th:nth-child(2), .tbl-dev td:nth-child(2) { max-width: 320px; }
/* 许可证表：同样自动列宽，备注列（含绑定机器名）吸收剩余宽度并限宽截断 */
.tbl-lic { table-layout: auto; }
.tbl-lic th:nth-child(2), .tbl-lic td:nth-child(2) { max-width: 420px; }
.seen-cell { white-space: normal; overflow: visible; line-height: 1.3; }
.seen-rel { color: var(--text-muted); font-size: 11px; display: block; }
.dev-acts { white-space: nowrap; overflow: visible; text-align: left; }
.dev-acts .btn { padding: 3px 8px; margin-right: 3px; font-size: 12px; }
.field select { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; outline: none; background: #fff; }
.field select:focus { border-color: var(--brand); }
.field textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; outline: none; background: #fff; resize: vertical; font-family: inherit; line-height: 1.6; }
.field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,111,255,.12); }
.modal-tip { font-size: 12.5px; color: var(--text-muted); margin: 0 0 14px; line-height: 1.6; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15,25,45,.45); display: flex;
  align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 400px; max-width: calc(100vw - 32px); }
.modal h2 { margin: 0 0 16px; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.gen-result { background: #f6f9ff; border: 1px solid #cfe0ff; border-radius: var(--radius);
  padding: 10px 12px; max-height: 180px; overflow: auto; margin-bottom: 10px; }
.gen-result .mono { display: block; padding: 3px 0; user-select: all; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%);
  background: #1f2733; color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 13px;
  z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }

/* ---------- 版本管理（客户端在线更新） ---------- */
#tab-update { overflow: auto; display: block; }
.upd-current { display: flex; gap: 18px; align-items: stretch; margin-bottom: 16px; }
.upd-ver-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 30px; text-align: center; min-width: 170px; }
.upd-ver-num { font-size: 26px; font-weight: 700; color: var(--brand-dark); }
.upd-ver-label { color: var(--text-muted); font-size: 12.5px; margin-top: 4px; }
.upd-hint { background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 18px; flex: 1; font-size: 13px; }
.upd-hint p { margin: 6px 0; }
.upd-uploads { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 4px; }
.upd-upload-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.upd-upload-title { width: 100%; font-weight: 600; font-size: 13.5px; }
.upd-file-name { font-size: 12.5px; color: var(--text-muted); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upd-progress { width: 100%; height: 20px; background: #eef1f6; border-radius: 999px; position: relative; overflow: hidden; }
.upd-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  border-radius: 999px; transition: width .2s; }
.upd-progress-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; color: var(--text); }

/* ---------- 支付管理 ---------- */
.pay-subtabs { margin-bottom: 12px; flex-shrink: 0; align-self: flex-start; }
.pay-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#pay-pane-config { overflow: auto; display: block; }
.pay-stat-row { grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 12px; flex-shrink: 0; }
.pay-stat { padding: 16px 20px; }
.pay-stat-title { color: var(--text-muted); font-size: 12.5px; margin-bottom: 8px; }
.pay-stat-vals { display: flex; flex-direction: column; gap: 4px; }
.pay-stat-line { display: flex; align-items: baseline; gap: 8px; }
.pay-stat-cur { display: inline-block; min-width: 40px; padding: 1px 6px; border-radius: 4px;
  background: #e8f0ff; color: var(--brand-dark); font-size: 10.5px; font-weight: 600; text-align: center; }
.pay-stat-line:nth-child(2) .pay-stat-cur { background: #fef3e2; color: #b45309; }
.pay-stat-amt { font-size: 19px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.pay-stat-count { color: var(--text-muted); font-size: 12px; margin-top: 8px; }
.pay-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.pay-badge-pending { background: #fef3e2; color: var(--warn); }
.pay-badge-paid { background: #e8f8ee; color: var(--ok); }
.pay-badge-expired { background: #eef1f6; color: var(--text-muted); }
.pay-badge-cancelled { background: #fdecec; color: var(--danger); }
.pay-tx { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-acts { white-space: nowrap; overflow: visible; }
.pay-acts .btn { padding: 6px 10px; margin-right: 4px; }
/* 套餐卡片预览（省钱对比，绿色主题，与客户端支付页同款） */
.plan-cards { display: flex; gap: 10px;
  margin-bottom: 14px; flex-shrink: 0; }
.plan-card { flex: 1 1 0; min-width: 0; position: relative; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.10), rgba(16, 185, 129, 0.02));
  transition: all 0.15s; }
.plan-card:hover { border-color: #34d399; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12); }
.plan-card.disabled { opacity: 0.55; filter: grayscale(0.5); }
.plan-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; row-gap: 4px; }
.plan-card-title { font-weight: 600; font-size: 14px; color: var(--text); }
.plan-card-badge { flex-shrink: 0; font-size: 10.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #10b981, #059669); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.plan-card-off { flex-shrink: 0; font-size: 10.5px; font-weight: 600; color: #b91c1c; background: #fee2e2;
  border-radius: 999px; padding: 2px 8px; }
.plan-card-price { margin-top: 8px; font-size: 19px; font-weight: 800; color: #059669;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.plan-card-orig { font-size: 12px; font-weight: 400; color: var(--text-muted); text-decoration: line-through; }
.plan-card-meta { margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.plan-card-desc { margin-top: 8px; font-size: 12px; color: var(--text-muted); line-height: 1.6;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* 功能特权列表（绿色 ✓，与客户端支付卡片同款） */
.plan-card-feats { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-card-feats li { position: relative; padding-left: 20px; font-size: 12.5px; color: var(--text); line-height: 1.5; }
.plan-card-feats li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #10b981; font-weight: 700; }
/* 套餐弹窗：人民币 → USDT 实时换算提示 */
.usdt-hint { display: block; font-size: 12px; margin-top: 3px; min-height: 15px; color: var(--text-muted); }
/* 续期/功能权限弹窗：功能复选行 */
.extend-feats { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.extend-feat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.extend-feat input[type="checkbox"] { width: auto; margin: 0; }
/* 功能权限弹窗：功能 + 到期时间编辑行 */
.feats-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.feats-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.feats-row .feats-name { min-width: 86px; font-weight: 600; }
.feats-row .feats-date { flex: 1; min-width: 190px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }
.feats-row .feats-date:disabled { background: #f5f5f5; color: var(--text-muted); }
/* 有效期调整弹窗：增加/减少天数分段切换 */
.ext-mode { display: flex; gap: 8px; margin-bottom: 14px; }
.ext-mode-btn { flex: 1; padding: 8px 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all 0.12s; }
.ext-mode-btn:hover { border-color: var(--brand); color: var(--brand); }
.ext-mode-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
/* 功能开关 */
.feat-list { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.feat-item { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.feat-item.off { border-color: #f59e0b; background: #fffbeb; }
.feat-name { font-size: 14px; font-weight: 600; color: var(--text); }
.feat-key { font-size: 11px; font-weight: 400; color: var(--text-muted); background: var(--bg-soft, #f3f4f6);
  border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.feat-note { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.6; }
.feat-meta { font-size: 11.5px; margin-top: 4px; }
.pay-config-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 24px; max-width: 560px; }
.pay-config-title { font-weight: 600; font-size: 15px; margin-bottom: 16px; }
.pay-config-rate { font-size: 12.5px; color: var(--text-muted); margin: 2px 0 14px; line-height: 1.6; }
.pay-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 14px; }
