/* BotPanel 手机端样式 —— 浅色干净风 */
:root {
  --bg: #eef1f6; --card: #ffffff; --line: #e3e7ee;
  --text: #1c2333; --sub: #8a93a5; --brand: #335cff; --brand-weak: #eef1ff;
  --green: #17b26a; --red: #e5484d; --amber: #f5a524;
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px;
}
.hidden { display: none !important; }

/* ---------- 通用容器 ---------- */
.page { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 96px; }
/* v0.4.52：safe-area 原来加在 padding-bottom（错的一侧）——iPhone 刘海/状态栏下顶部会被压住，
   正确是加在顶部。按钮 30px→36px 更贴近手指。 */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--brand);
  color: #fff; padding: calc(12px + env(safe-area-inset-top)) 13px 12px;
  display: flex; align-items: center; gap: 9px;
}
/* 标题 + 副标题竖排，避免小屏上「机器人面板 在线 3/6」和右侧两个按钮抢一行 */
.topbar .tb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.topbar .title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 11.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar > .title { flex: 1; min-width: 0; }   /* 客户管理页的裸标题仍要撑开 */
.btn-back {
  width: 36px; height: 36px; flex: none; border: 0; background: rgba(255,255,255,.18);
  color: #fff; border-radius: 11px; font-size: 19px; line-height: 1; cursor: pointer;
}
.btn-back:active { background: rgba(255,255,255,.32); }
.icon-btn {
  border: 0; background: rgba(255,255,255,.18); color: #fff; border-radius: 11px;
  width: 36px; height: 36px; flex: none; font-size: 18px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:active { background: rgba(255,255,255,.32); }
/* 页头「指令清单」外链：复用 icon-btn 外观但改为自适应宽度文字按钮 */
.topbar a.link-cmds {
  flex: none; height: 36px; padding: 0 12px; border-radius: 11px;
  background: rgba(255,255,255,.18); color: #fff; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  white-space: nowrap; cursor: pointer;
}
.topbar a.link-cmds:active { background: rgba(255,255,255,.32); }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 360px; background: var(--card); border-radius: 22px; padding: 28px 22px; box-shadow: 0 8px 30px #22315f14; }
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card p { color: var(--sub); font-size: 13px; margin: 0 0 18px; line-height: 1.6; }
.login-card .logo { width: 46px; height: 46px; border-radius: 13px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; margin-bottom: 14px; }

/* ---------- 筛选 chips ---------- */
.chips {
  display: flex; gap: 8px; padding: 10px 12px 2px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 0; padding: 0 14px; height: 34px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: var(--card); color: var(--sub); box-shadow: 0 1px 3px #22315f0d; flex: none;
  display: inline-flex; align-items: center;
}
.chip.on { background: var(--brand); color: #fff; font-weight: 600; }
.chip .n { opacity: .8; margin-left: 4px; }

/* ---------- 搜索框（管理端客户账号） ---------- */
.search-row { display: flex; gap: 8px; padding: 6px 14px 0; align-items: center; }
/* font-size 必须 ≥16px：iOS Safari 在输入框字号 <16px 时会在聚焦瞬间自动放大整页（典型手机手感坑） */
.search-row input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 16px; background: var(--card); color: var(--text);
}
.search-row input:focus { outline: 0; border-color: var(--brand); }
.search-row input::placeholder { color: #aab2c1; }
.search-row .clear-btn {
  border: 0; background: var(--card); color: var(--sub);
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  box-shadow: 0 1px 3px #22315f0d; font-size: 16px; line-height: 1;
}

/* ---------- 客户分组折叠（管理端） ---------- */
.cust-group {
  background: var(--card); border-radius: var(--radius);
  margin: 10px 14px 4px; padding: 0 14px;
  box-shadow: 0 2px 10px #22315f0d;
}
.cust-group .ghead {
  display: flex; align-items: center; gap: 8px; padding: 12px 0;
  cursor: pointer; user-select: none;
}
.cust-group .gname { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.cust-group .gname .tag-cust {
  font-size: 10px; padding: 1px 7px; border-radius: 6px;
  background: var(--brand-weak); color: var(--brand); font-weight: 500;
}
.cust-group .gname .tag-cust.sys { background: #f2f4f8; color: var(--sub); }
.cust-group .gnote {
  font-size: 12px; color: var(--sub); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* v0.4.76 客户备注就地编辑：分组头上的备注可点（空态给个「＋备注」淡提示） */
.cust-group .gnote { cursor: pointer; border-radius: 6px; }
.cust-group .gnote:active { opacity: .7; }
.cust-group .gnote .pencil { font-size: 10px; opacity: .45; margin-left: 2px; }
.cust-group .gnote.empty { color: #b9c2d4; }
.cust-group .gcount { font-size: 12px; color: var(--sub); white-space: nowrap; }
.cust-group .gcount b { color: var(--green); font-weight: 600; }
.cust-group .gcount .all { color: var(--sub); font-weight: 400; }
.cust-group .chev { font-size: 10px; opacity: .55; margin-left: 6px; }
.cust-group .gbody { display: none; padding: 4px 0 8px; }
.cust-group .gbody.open { display: block; }
.cust-group .bot-card { margin: 6px 0; box-shadow: none; border: 1px solid var(--line); background: #fafbfd; }
.cust-group .empty-mini { color: var(--sub); font-size: 12px; padding: 8px 0; text-align: center; }

/* ---------- 机器人卡片 ---------- */
.bot-card {
  display: flex; align-items: center; gap: 11px; margin: 9px 12px;
  background: var(--card); border-radius: var(--radius); padding: 13px 11px 13px 14px;
  box-shadow: 0 2px 10px #22315f0d; cursor: pointer; position: relative; overflow: hidden;
}
.bot-card:active { background: #f7f9fc; }
.bot-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--brand)); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px #17b26a1f; }
.dot.off { background: #c3cad6; }
/* v0.9.257：进程在跑但没进游戏（连不上/滑块/被顶号）——琥珀色，区别于绿色「真在线」与灰色「已停止」 */
.dot.warn { background: #f59e0b; box-shadow: 0 0 0 4px #f59e0b1f; }
.bc-main { flex: 1; min-width: 0; }
.bc-name { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; row-gap: 4px; }
.bc-name .tag {
  font-size: 10px; font-weight: 500; color: var(--sub); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; background: #fafbfd;
}
.bc-name .tag.sup { color: var(--brand); border-color: #335cff44; background: var(--brand-weak); }
.bc-name .tag.warn { color: #b45309; border-color: #f59e0b55; background: #fef3c7; }
.banner-warn {
  margin: 8px 0 4px; padding: 8px 10px; border-radius: 10px; font-size: 12px; line-height: 1.6;
  background: #fef3c7; color: #92400e; border: 1px solid #f59e0b44;
}
.bc-sub { color: var(--sub); font-size: 12px; margin-top: 5px; line-height: 1.5; }
.bc-sub .bc-loc { color: #5a6b8c; }
/* v0.4.72：备注名把游戏名盖住时，用小灰字把「游戏里的名字」补出来 ——
   用户口径是「以备注的名字为主，但是一定要显示游戏的名字」，所以要显眼但不抢主名。 */
.bc-nick { color: #9aa3b5; font-size: 11.5px; margin-top: 3px; line-height: 1.4; }
.bc-actions { display: flex; align-items: center; flex: none; }
.bc-actions .gobtn {
  border: 0; background: var(--brand-weak); color: var(--brand); font-weight: 600;
  padding: 7px 14px; border-radius: 10px; font-size: 13px; cursor: pointer;
}
/* v0.4.52：启动/重启按钮 33px→40px（手指友好），整张卡片可点进详情，右侧只留一个 › 提示 */
.bc-actions .ctlbtn {
  border: 0; background: #f1f4f9; color: var(--text);
  min-width: 66px; height: 40px; padding: 0 14px;
  border-radius: 11px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.bc-actions .ctlbtn.primary { background: var(--brand); color: #fff; }
.bc-actions .ctlbtn:active { filter: brightness(.95); }
/* v0.4.103 异机托管（号在服务器上跑）的占位按钮：明确"不可点"，别让人以为是坏了 */
.bc-actions .ctlbtn[disabled] { opacity: .75; background: #eef1f6; color: var(--muted); cursor: default; }
.bc-actions .ctlbtn[disabled]:active { filter: none; }
.bot-card > .chev { flex: none; color: #c8cfdb; font-size: 18px; line-height: 1; margin-left: -5px; }

/* ---------- 详情 ---------- */
.detail-hero {
  background: linear-gradient(135deg, #335cff, #6a7fff); color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 14px 18px; border-radius: 0 0 22px 22px;
}
.dh-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.dh-name { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 9px; min-width: 0; }
/* v0.4.52：状态/位置/账号/主人原来糊成一行文字，改成胶囊标签，扫一眼就能读 */
.dh-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dh-pills .pill {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  background: rgba(255,255,255,.2); border-radius: 999px; padding: 5px 11px;
  font-size: 12px; line-height: 1.45;
}
.dh-pills .pill.ok { background: rgba(255,255,255,.3); font-weight: 600; }
/* v0.9.257：登录受阻（红）/ 仅进程在跑未进游戏（琥珀），在蓝色 hero 上也能一眼分辨 */
.dh-pills .pill.err { background: #ffe1e1; color: #a8201f; font-weight: 600; }
.dh-pills .pill.warn { background: #fff0d6; color: #8a5300; font-weight: 600; }
.dh-pills .pill .dot { width: 7px; height: 7px; }
.dh-meta { font-size: 11px; opacity: .82; margin-top: 9px; line-height: 1.5; }
.sec { background: var(--card); border-radius: var(--radius); margin: 12px 14px; padding: 14px; box-shadow: 0 2px 10px #22315f0a; }
.sec-title { font-size: 13px; font-weight: 600; color: var(--sub); margin: 0 0 10px; letter-spacing: .5px; }
.sec-title.foldable { display: flex; align-items: center; margin-bottom: 0; cursor: pointer; user-select: none; }
.sec-title.foldable.open { margin-bottom: 10px; }
.sec-title.foldable .chev { margin-left: auto; font-size: 10px; opacity: .6; }

/* 折叠区块（v0.4.52）：详情页太长，低频查看的「登录方式/运行信息」收起来 */
details.sec.fold > summary.sec-title { margin: 0; cursor: pointer; list-style: none; display: flex; align-items: center; }
details.sec.fold > summary.sec-title::-webkit-details-marker { display: none; }
details.sec.fold[open] > summary.sec-title { margin-bottom: 10px; }
details.sec.fold > summary.sec-title .chev {
  margin-left: auto; font-size: 14px; opacity: .5; line-height: 1;
  transform: rotate(90deg); transition: transform .15s;
}
details.sec.fold[open] > summary.sec-title .chev { transform: rotate(-90deg); }

/* v0.4.52：原来是 3 列却有 4 个按钮（链接/授权/重启/下线）→ 第 4 个被挤到第二行孤零零。
   改 4 列等分，320px 小屏也放得下；高度抬到 62px 好点。 */
.op-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.op {
  border: 0; background: #f7f9fc; border-radius: 13px; min-height: 62px; padding: 10px 2px 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--text);
}
.op:active { background: var(--brand-weak); }
.op svg { width: 20px; height: 20px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.op.danger svg { stroke: var(--red); }
.op span { font-size: 11.5px; color: var(--text); }
.op[disabled] { opacity: .4; }

/* 设置行 */
.set-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f2f4f8; }
.set-row:last-child { border-bottom: 0; }
.set-row label { flex: none; width: 74px; color: var(--sub); font-size: 13px; }
.set-row input[type=text], .set-row input[type=password], .set-row select {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; font-size: 16px; background: #fbfcfe; color: var(--text);
}
.set-row input:focus { outline: none; border-color: var(--brand); background: #fff; }
/* 转移归属下拉框 */
.inp { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 14px; background: #fbfcfe; color: var(--text); }
.btn {
  border: 0; background: var(--brand); color: #fff; border-radius: 10px; padding: 0 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; flex: none;
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
}
.btn:disabled { opacity: .5; }
.btn.ghost { background: var(--brand-weak); color: var(--brand); }
.btn.danger { background: #fdecec; color: var(--red); }
.btn.sm { padding: 0 12px; min-height: 34px; font-size: 12.5px; border-radius: 9px; }
.btn:active { filter: brightness(.96); }

/* 黑名单 */
.bl-empty { color: var(--sub); font-size: 13px; padding: 8px 2px 4px; line-height: 1.7; }
.bl-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f2f4f8; }
.bl-item:last-child { border-bottom: 0; }
.bl-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--brand-weak); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.bl-main { flex: 1; min-width: 0; }
.bl-name { font-size: 14px; font-weight: 600; }
.bl-meta { font-size: 11px; color: var(--sub); margin-top: 2px; }
.bl-pending { font-size: 10px; font-weight: 600; color: #b06a00; background: #fff4e0; border: 1px solid #ffd591; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* 权限区块提示 */
.perm-hint { color: var(--sub); font-size: 12px; padding: 8px 2px 2px; line-height: 1.7; }

/* 折叠日志 */
details.log { margin-top: 6px; }
details.log summary { cursor: pointer; color: var(--brand); font-size: 13px; }
.log-box { background: #0f1420; color: #9fe8c8; border-radius: 10px; padding: 10px 12px; font-size: 11px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; font-family: Consolas, monospace; margin-top: 8px; max-height: 240px; overflow: auto; }

/* ---------- 底部抽屉 ---------- */
.mask { position: fixed; inset: 0; background: #10141d80; z-index: 60; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #fff;
  border-radius: 20px 20px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; max-height: 86vh; overflow: auto;
  animation: up .18s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 0 0 4px; font-size: 17px; }
.sheet .hint { color: var(--sub); font-size: 12px; margin: 0 0 14px; line-height: 1.6; }
.sheet .row { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.sheet input[type=text], .sheet input[type=password], .sheet textarea,
.sheet input[type=number], .sheet select {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px;
  font-size: 16px; background: #fbfcfe; color: var(--text); font-family: inherit;
}
.sheet input:focus, .sheet textarea:focus { outline: none; border-color: var(--brand); background: #fff; }
.sheet textarea { min-height: 72px; resize: vertical; }
.sheet .btnrow { display: flex; gap: 10px; margin-top: 14px; }
.sheet .btnrow .btn { flex: 1; padding: 12px; border-radius: 12px; }
.sheet .status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 0; color: var(--text); }
.link-box {
  background: #f6f8fb; border: 1px dashed #c9d2e0; border-radius: 11px; padding: 11px;
  font-size: 12px; word-break: break-all; color: var(--text); line-height: 1.6;
}

/* ---------- 底部 Tab Bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: #ffffffe6; backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 9px 0 11px; color: var(--sub); font-size: 11px; gap: 2px;
  background: none; border: none; cursor: pointer;
}
.tabbar .tab .ico {
  width: 22px; height: 22px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.tabbar .tab.on .ico { stroke-width: 2.1; }
.tabbar .tab.on { color: var(--brand); }
.tabbar .tab:active { background: #00000008; }

/* ---------- toast / confirm ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90;
  background: #1c2333ee; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13px;
  max-width: 82vw; text-align: center; animation: up .15s ease-out;
}
.confirm {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 80;
  width: min(320px, 84vw); background: #fff; border-radius: 18px; padding: 20px 18px 14px;
  animation: pop .15s ease-out;
}
@keyframes pop { from { transform: translate(-50%, -46%) scale(.96); opacity: .5; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.confirm h4 { margin: 0 0 8px; font-size: 16px; }
.confirm p { color: var(--sub); font-size: 13px; margin: 0 0 16px; line-height: 1.7; white-space: pre-wrap; }
.confirm .btnrow { display: flex; gap: 10px; }
.confirm .btnrow .btn { flex: 1; padding: 11px; border-radius: 11px; }

.empty-tip { text-align: center; color: var(--sub); font-size: 13px; padding: 48px 20px; line-height: 1.8; }
.pulse { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- 我的/设置 ---------- */
.setting-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f2f4f8; }
.setting-row:last-child { border-bottom: 0; }
.setting-row .lbl { flex: none; width: 76px; color: var(--sub); font-size: 13px; padding-top: 1px; }
.setting-row .val { flex: 1; min-width: 0; font-size: 13px; line-height: 1.6; word-break: break-all; }

/* ---------- v0.4.0 多租户 ---------- */
/* 登录页 tab */
.ltabs { display: flex; gap: 8px; background: #f2f4f8; border-radius: 12px; padding: 4px; }
.ltabs .ltab { flex: 1; border: 0; background: transparent; padding: 9px 0; border-radius: 9px; font-size: 14px; color: var(--sub); cursor: pointer; }
.ltabs .ltab.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 4px #00000014; }
.key-login summary { cursor: pointer; outline: none; }
.key-login summary::-webkit-details-marker { color: #8a93a5; }

/* 归属/状态小标签 */
.bc-name .tag { margin-left: 6px; }
.tag.cust { background: #eef1ff; color: #335cff; }
.tag.off-tag { background: #f2f4f8; color: #8a93a5; }

/* 客户管理卡 */
.cust-card { padding: 12px 2px; border-bottom: 1px solid #f2f4f8; }
.cust-card:last-child { border-bottom: 0; }
.cust-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cust-name { font-size: 15px; font-weight: 600; }
.cust-note { font-size: 12px; color: var(--sub); flex: 1 1 100%; }
.cust-stats { display: flex; gap: 14px; font-size: 12px; color: var(--sub); padding: 7px 0; flex-wrap: wrap; }
.cust-stats b { color: var(--text); }
.cust-ops { display: flex; gap: 8px; flex-wrap: wrap; }
/* 客户名下机器人（批量转移） */
.cust-bots { margin-top: 8px; padding: 8px 10px; background: #f7f9fc; border: 1px solid #eef1f7; border-radius: 10px; }
.cust-bots-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cust-bots-head .btn { margin-left: auto; }
.cust-bot-all { font-size: 12px; color: var(--sub); display: inline-flex; align-items: center; gap: 4px; }
.cust-bots-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 12px; max-height: 220px; overflow: auto; }
.cust-bot { font-size: 13px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; padding: 3px 0; cursor: pointer; }

/* 兑换码输出 */
.code-box { background: #f7f9fc; border: 1px dashed #c9d4e8; border-radius: 12px; padding: 12px; margin-top: 10px; }
.code-line { font-family: Consolas, Menlo, monospace; font-size: 17px; letter-spacing: 2px; font-weight: 700; color: var(--brand); padding: 4px 0; word-break: break-all; }

/* 表单小标签（弹层内） */
.lab { font-size: 13px; color: var(--sub); margin: 8px 0 4px; display: block; }

/* 兑换码记录行（客户管理页） */
.crec-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid #f2f4f8; cursor: pointer; }
.crec-row:last-child { border-bottom: 0; }
.crec-code { font-family: Consolas, Menlo, monospace; font-weight: 700; font-size: 14px; letter-spacing: 1px; }
.crec-meta { font-size: 12px; color: var(--sub); }
.crec-time { font-size: 11px; color: #b6bcc9; margin-left: auto; white-space: nowrap; }
.crec-use { font-size: 12px; color: var(--sub); }
.sec-sub { font-size: 11px; color: var(--sub); font-weight: 400; margin-left: 8px; }

/* ---------- 使用时间（v0.4.68 商用授权）---------- */
/* 内联小标签：ok 绿 / soon 黄（7 天内到期）/ exp 红（已过期） */
.lic { font-weight: 600; }
.lic.ok { color: var(--green); }
.lic.soon { color: #b26a00; }
.lic.exp { color: var(--red); }
/* 详情页胶囊沿用 dh-pills 的白色半透明底（那是深色 hero 上的），所以只换文字色 */
.dh-pills .pill.lic.ok { color: #c6f6da; }
.dh-pills .pill.lic.soon { color: #ffe8bb; }
.dh-pills .pill.lic.exp { color: #ffd5d6; font-weight: 700; }
/* 已到期横幅：与「电脑未连接」的黄色区分开，这个是真的拦住了功能 */
.banner-warn.red { background: #fdecec; color: #a8201f; border-color: #f7c9c9; }
.lic-panel .lic-now { font-size: 13px; line-height: 1.7; }
.lic-now .lic { font-size: 14px; }
/* 日期选择框（设到期日弹层）：.sheet 那条选择器只覆盖了 text/password/number，date 需要单列 */
.sheet input[type=date] {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #dfe3ec; border-radius: 10px;
  font-size: 14px; background: #f8f9fc; color: var(--text); font-family: inherit;
}
.sheet input[type=date]:focus { outline: none; border-color: var(--brand); background: #fff; }

/* ---------- 事件记录（v0.4.69 踢人 / 被踢 / 权限人指令）---------- */
/* 每条一行：左边类型徽标，右边正文 + 灰字元信息。刻意不用 emoji：
   安卓 QQ/微信内置浏览器对 emoji 的字重与基线处理不一致，混排会高低不齐。 */
.rec-item { display: flex; gap: 9px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid #f2f4f8; }
.rec-item:last-child { border-bottom: 0; }
.rec-badge {
  flex: none; margin-top: 1px; padding: 2px 6px; border-radius: 6px;
  font-size: 10.5px; font-weight: 700; line-height: 1.6; white-space: nowrap;
}
.rec-badge.kick { background: #fdeceb; color: var(--red); }      /* 踢了别人 */
.rec-badge.kicked { background: #fff4e0; color: #b26a00; }        /* 自己被踢 */
/* v0.9.307：解散 / 挂机不是「被谁踢」，用中性灰 —— 橙色「被踢」会让人以为有人抢房踢机器人 */
.rec-badge.dissolve { background: #eef0f3; color: #5b6470; }      /* 房间解散 */
.rec-badge.afk { background: #eef0f3; color: #5b6470; }           /* 系统判挂机 */
.rec-badge.cmd { background: var(--brand-weak); color: var(--brand); }
.rec-badge.chat { background: #eef2f8; color: #4a6b9c; }   /* 房间发言（v0.9.260） */
.rec-badge.enter { background: #e7f6ee; color: #1f9d57; }  /* 进房（v0.9.260） */
.rec-badge.exit { background: #f0eef8; color: #7a59c7; }   /* 离房（v0.9.260） */
.rec-body { flex: 1; min-width: 0; }
.rec-text { font-size: 13px; line-height: 1.6; word-break: break-word; }
.rec-meta { font-size: 11px; color: var(--sub); margin-top: 2px; }
/* 记录区顶部那排筛选（v0.9.260 已弃用，改用下方分组折叠；保留类不报错） */
.rec-chips { padding: 2px 0 8px; }

/* ---------- 事件记录分组折叠（v0.9.260：三类分组各自可折叠，每组最多 100 条）---------- */
.rec-group { background: #fbfcfe; border: 1px solid #eef1f6; border-radius: 10px; margin: 8px 0; overflow: hidden; }
.rec-group > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 12px; font-size: 13px; font-weight: 600; color: var(--sub);
}
.rec-group > summary::-webkit-details-marker { display: none; }
.rec-group > summary .rg-label { color: var(--text); }
.rec-group > summary .rg-sub { font-size: 11px; font-weight: 400; color: var(--sub); opacity: .85; }
.rec-group > summary .rec-group-more {
  font-size: 11px; font-weight: 400; color: var(--brand);
  background: var(--brand-weak); padding: 1px 7px; border-radius: 8px; margin-left: 4px;
}
.rec-group > summary .chev {
  margin-left: auto; font-size: 13px; opacity: .5; line-height: 1;
  transform: rotate(90deg); transition: transform .15s;
}
.rec-group[open] > summary .chev { transform: rotate(-90deg); }
.rec-group > .rec-group-body { padding: 0 12px 8px; }
/* 分组内第一条记录与 summary 之间留点缝，最后一条去掉底边线 */
.rec-group-body .rec-item:first-child { padding-top: 2px; }

/* ---------- 事件记录三类横排标签（v0.4.77：三类从上到下改从左到右，列表展开仍从上到下）---------- */
.rec-tabs { display: flex; gap: 6px; margin: 8px 0 0; }
.rec-tab {
  flex: 1; min-width: 0; cursor: pointer; user-select: none; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: #fbfcfe; border: 1px solid #eef1f6; border-radius: 10px;
  padding: 7px 4px 6px; transition: border-color .12s, background .12s;
}
.rec-tab:active { opacity: .8; }
.rec-tab .rt-label { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.rec-tab .rt-sub {
  font-size: 10px; font-weight: 400; color: var(--sub); opacity: .85; line-height: 1.3;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 收起的标签：淡显 + 去色，与展开的区分 */
.rec-tab:not(.on) { opacity: .62; }
.rec-tab.on { border-color: var(--brand); background: var(--brand-weak); }
.rec-tab.on .rt-label { color: var(--brand); }
.rec-pane {
  background: #fbfcfe; border: 1px solid #eef1f6; border-radius: 10px;
  margin: 6px 0 0; padding: 4px 12px 8px;
}
.rec-pane .rec-item:first-child { padding-top: 2px; }
