:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-2: #fafbfe;
  --border: #e4e9f2;
  --border-strong: #cfd8e8;
  --text: #17202f;
  --text-2: #46536b;
  --muted: #7b879e;
  --brand: #2f5bea;
  --brand-soft: #eaf0ff;
  --s: #e5484d;
  --a: #ef7f1a;
  --b: #3b82f6;
  --c: #94a3b8;
  --ok: #15a34a;
  --shadow: 0 1px 2px rgba(20, 34, 60, .05), 0 8px 24px rgba(20, 34, 60, .06);
  --radius: 12px;
}

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

body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.app { display: flex; min-height: 100vh; }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  width: 216px; flex: 0 0 216px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  background: linear-gradient(135deg, #2f5bea, #6b8cff);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px;
}
.brand b { font-size: 14.5px; letter-spacing: .2px; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px; cursor: pointer;
  color: var(--text-2); font-weight: 500; border: none; background: none;
  width: 100%; text-align: left; transition: background .14s, color .14s;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item .ico { width: 17px; text-align: center; font-size: 15px; }
.sidebar .spacer { flex: 1; }
.sidebar .cap {
  font-size: 11.5px; color: var(--muted); padding: 10px 11px;
  border-top: 1px solid var(--border); line-height: 1.6;
}

/* ---------------- 主区 ---------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; background: rgba(255,255,255,.86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 16px; font-weight: 650; }
.topbar .sub { color: var(--muted); font-size: 12px; margin-left: 10px; font-weight: 400; }
.content { padding: 22px 26px 60px; }
.view { display: none; }
.view.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* ---------------- 卡片 / 通用 ---------------- */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
}
.card + .card { margin-top: 16px; }
.card h3 { font-size: 14px; font-weight: 650; margin-bottom: 4px; }
.card .hint { color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2,1fr); } .g2, .g3 { grid-template-columns: 1fr; } }

.stat {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-size: 27px; font-weight: 700; letter-spacing: -.5px; margin-top: 4px; }
.stat .value.small { font-size: 21px; }
.stat .foot { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ---------------- 表单 ---------------- */
label.f { display: block; margin-bottom: 13px; }
label.f > span { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 600; margin-bottom: 6px; }
/* 注意必须把 password 一并算进来：少了它，登录框的「密码」输入框
   会退回浏览器默认宽度（约 180px），和「登录名」一长一短很难看。
   checkbox 千万别加进来 —— 那种是要保持小方块的。 */
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong);
  border-radius: 9px; background: #fff; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,91,234,.12); }
textarea { resize: vertical; min-height: 90px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 9px 15px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: #fff; cursor: pointer; font-weight: 550; transition: all .14s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #2449c9; color: #fff; }
.btn.danger:hover { border-color: var(--s); color: var(--s); background: #fdecec; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 10px; max-height: 640px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; background: #f7f9fd; z-index: 2;
  text-align: left; font-weight: 600; color: var(--text-2); font-size: 12px;
  padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 10px 12px; border-bottom: 1px solid #eef2f8; vertical-align: top; }
tbody tr:hover { background: #f9fbff; }
tbody tr:last-child td { border-bottom: none; }
td.content { max-width: 460px; word-break: break-word; }
.empty { text-align: center; color: var(--muted); padding: 46px 0; }

.badge {
  display: inline-block; padding: 1px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700; line-height: 19px;
}
.badge.S { background: #fdecec; color: var(--s); }
.badge.A { background: #fff2e3; color: var(--a); }
.badge.B { background: #e9f0ff; color: var(--b); }
.badge.C { background: #f1f4f9; color: var(--c); }

.tag {
  display: inline-block; padding: 1px 7px; margin: 1px 3px 1px 0; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 600;
}
.pill {
  display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
}
.pill.pending { background: #f1f4f9; color: var(--muted); }
.pill.running { background: #e9f0ff; color: var(--b); }
.pill.done    { background: #e8f7ee; color: var(--ok); }
.pill.failed  { background: #fdecec; color: var(--s); }
.pill.stopped { background: #fff2e3; color: var(--a); }

a.link { color: var(--brand); text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* ---------------- 日志 ---------------- */
.logs {
  font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  background: #fbfcfe; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; height: 260px; overflow: auto; line-height: 1.75;
}
.logs div { color: var(--text-2); }
.logs div.warn { color: var(--a); }
.logs div.error { color: var(--s); }
.logs .ts { color: var(--muted); margin-right: 8px; }

/* ---------------- 进度条 ---------------- */
.bar { height: 7px; border-radius: 6px; background: #eef2f8; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg,#2f5bea,#6b8cff); border-radius: 6px; transition: width .4s; }

.dist { display: flex; gap: 4px; height: 26px; border-radius: 8px; overflow: hidden; margin: 12px 0 10px; }
.dist div { display: grid; place-items: center; color: #fff; font-size: 11.5px; font-weight: 700; transition: flex .4s; }
.dist .dS { background: var(--s); } .dist .dA { background: var(--a); }
.dist .dB { background: var(--b); } .dist .dC { background: var(--c); }

.wordbar { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 12.5px; }
.wordbar .w { width: 92px; flex: 0 0 92px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wordbar .t { flex: 1; height: 16px; background: #eef2f8; border-radius: 5px; overflow: hidden; }
.wordbar .t > i { display: block; height: 100%; background: linear-gradient(90deg,#8aa6ff,#2f5bea); }
.wordbar .n { width: 42px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------- 抽屉 ---------------- */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(20,30,50,.36); opacity: 0;
  pointer-events: none; transition: opacity .2s; z-index: 50;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw;
  background: #fff; box-shadow: -12px 0 40px rgba(20,34,60,.16);
  transform: translateX(101%); transition: transform .26s cubic-bezier(.4,0,.2,1);
  z-index: 51; display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.drawer header h3 { font-size: 15px; }
.drawer .body { padding: 18px 20px; overflow: auto; flex: 1; }
.drawer .body dt { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 14px; }
.drawer .body dd { font-size: 13.5px; margin-top: 3px; word-break: break-word; }
.quote { background: var(--panel-2); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; padding: 12px 14px; font-size: 14px; line-height: 1.7; }

/* ---------------- Toast ----------------
   z-index 必须高过登录遮罩（300）：登录页第二步填错授权码时，
   报错提示就靠它 —— 压在遮罩下面用户会以为「点了没反应」。 */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 20px);
  background: #1d2839; color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .22s; z-index: 400;
  box-shadow: 0 10px 30px rgba(20,34,60,.3); max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #b32326; }
.toast.ok { background: #14803c; }

/* 筛选条件下面的「库里共有多少 / 当前筛出多少」提示条。
   存在的意义：默认筛选会把大部分数据挡掉，不说明白用户就会以为「采集的数据没进来」。 */
.filter-hint {
  margin-top: 12px; font-size: 12.5px; color: var(--text-2);
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 12px; line-height: 1.7;
  display: none; align-items: center; gap: 9px; flex-wrap: wrap;
}
.filter-hint.show { display: flex; }
.filter-hint b { color: var(--brand); }
.filter-hint .btn { margin-left: auto; }

/* 「已由哪个号跟进过」—— 防止两个号打扰同一个人 */
.acted-tag {
  display: inline-block; margin-top: 3px; padding: 1px 8px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
  background: #e8f7ee; color: var(--ok); white-space: nowrap;
}
.acted-tag.mine { background: #e9f0ff; color: #2f5bea; }

/* 时间单元格：日期一行、多久了一行 */
.time-cell { font-variant-numeric: tabular-nums; line-height: 1.45; }
.time-cell .aged { font-size: 11.5px; }

/* ---------------- 应用内弹窗（替代原生 prompt/confirm） ----------------
   z-index 必须高过登录遮罩（300）和 Toast（400）。
   登录页第二步的「先进入（功能受限）」就靠它确认 —— 压在遮罩下面时，
   弹窗看得见、按钮点不动，用户直接被卡死在登录页。 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 30, 50, .44);
  display: none; align-items: center; justify-content: center;
  padding: 22px; z-index: 500;
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 470px; max-width: 100%;
  max-height: 88vh; overflow: auto; padding: 20px 22px 18px;
  box-shadow: 0 24px 64px rgba(20, 34, 60, .32);
  animation: modalIn .16s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-8px) scale(.99); } }
.modal h3 { font-size: 15.5px; margin-bottom: 9px; }
.modal-body {
  font-size: 13.5px; color: var(--text-2); line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
}
.modal-body b { color: var(--text); }
.modal-body input[type=text], .modal-body input[type=number],
.modal-body select, .modal-body textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong);
  border-radius: 9px; font-size: 14px; font-family: inherit;
  background: #fff; color: var(--text); margin-top: 6px;
}
.modal-body textarea { min-height: 84px; resize: vertical; }
.modal-body .mlabel {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); margin-top: 13px;
}
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.modal-opt {
  display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  margin-top: 8px; cursor: pointer;
}
.modal-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.modal-opt input { margin-top: 3px; flex: 0 0 auto; }
.modal-opt small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.modal-check {
  display: flex; gap: 9px; align-items: flex-start; font-size: 13px;
  margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--border-strong);
  border-radius: 10px; cursor: pointer; color: var(--text-2);
}
.modal-check input { margin-top: 3px; flex: 0 0 auto; }
.modal-check.warn { border-color: #f0b9b9; background: #fff7f7; }

.kw-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.kw-tabs button {
  padding: 6px 13px; border-radius: 20px; border: 1px solid var(--border-strong);
  background: #fff; cursor: pointer; font-size: 12.5px; font-weight: 550;
}
.kw-tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.sw { position: relative; width: 38px; height: 21px; border-radius: 20px; background: #d5dbe8; transition: background .2s; cursor: pointer; border: none; flex: 0 0 38px; }
.sw::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw.on { background: var(--brand); }
.sw.on::after { transform: translateX(17px); }

.notice {
  background: #fff8e6; border: 1px solid #ffe4a3; color: #7a5300;
  border-radius: 10px; padding: 12px 15px; font-size: 12.5px; line-height: 1.7;
}
.notice b { color: #5c3d00; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------------- 获客工作台：线索卡片 ---------------- */
.lead-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 1200px) { .lead-grid { grid-template-columns: 1fr; } }

.lead-card {
  border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px;
  background: linear-gradient(180deg, #fdfeff, #fafbfe); transition: all .15s;
}
.lead-card:hover { border-color: #b9c8ea; box-shadow: 0 4px 16px rgba(47,91,234,.08); }
.lc-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.lc-score { font-size: 17px; color: var(--brand); font-variant-numeric: tabular-nums; }
.lc-name { font-weight: 600; font-size: 13.5px; }
.lc-content {
  font-size: 13.5px; line-height: 1.65; color: var(--text);
  background: #fff; border: 1px solid #eef2f8; border-radius: 8px;
  padding: 9px 12px; margin-bottom: 9px; word-break: break-word;
}
.lc-tags { margin-bottom: 7px; }
.lc-src { font-size: 11.5px; margin-bottom: 11px; }
.lc-foot { display: flex; gap: 7px; flex-wrap: wrap; }

/* 批量操作 */
.bulk-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 12px; margin-bottom: 14px;
  background: #f7f9fd; border: 1px solid var(--border); border-radius: 9px;
}
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.chk input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.lc-pick { margin-right: -2px; }
.lead-card.picked { border-color: var(--brand); background: linear-gradient(180deg, #f6f9ff, #f2f6ff); box-shadow: 0 4px 16px rgba(47,91,234,.10); }
.inp-xs { width: 74px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px; }
.vchk { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

.mini-lead {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 4px; border-bottom: 1px dashed #eef2f8; font-size: 13px;
}
.mini-lead:last-child { border-bottom: none; }

.drawer-sec {
  font-size: 11.5px; color: var(--muted); font-weight: 600;
  margin: 18px 0 7px;
}
.score-line {
  display: flex; justify-content: space-between; padding: 5px 0;
  border-bottom: 1px dashed #eef2f8; font-size: 13px;
}
.score-line.total { border-bottom: none; padding-top: 9px; font-weight: 600; }


/* 采集页的「评论时间过滤」分组 —— 和普通表单拉开层次 */
.filter-block {
  margin-top: 2px; padding: 14px 16px 12px;
  background: #f7f9fd; border: 1px solid var(--border); border-radius: 10px;
}
.filter-block .fb-title {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.filter-block .fb-title::before {
  content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--brand);
}
.filter-block .grid { margin-bottom: 8px; }
.filter-block .f { margin-bottom: 0; }

/* ---------------- 账号管理 ---------------- */
.nav-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #e5484d;
  margin-left: auto; display: none;
}
.nav-dot.show { display: block; }

.acc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 1200px) { .acc-grid { grid-template-columns: 1fr; } }

.acc-card {
  border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px;
  background: linear-gradient(180deg, #fdfeff, #fafbfe); transition: all .15s;
}
.acc-card:hover { border-color: #b9c8ea; box-shadow: 0 4px 16px rgba(47,91,234,.08); }
.acc-card.off { background: #fafbfd; opacity: .82; }
.acc-card .ac-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.acc-card .ac-name { font-weight: 650; font-size: 14px; }
.acc-card .ac-meta { font-size: 11.5px; color: var(--muted); line-height: 1.9; }
.acc-card .ac-meta b { color: var(--text-2); font-weight: 600; }
.acc-card .ac-foot { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }

.pill.logged_in { background: #e8f7ee; color: var(--ok); }
.pill.new       { background: #f1f4f9; color: var(--muted); }
.pill.expired   { background: #fdecec; color: var(--s); }
.pill.cooling   { background: #fff2e3; color: var(--a); }

/* ---------------- 错误横幅（防白屏） ---------------- */
.errbar { display: none; }
.errbar.show {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  background: #fdecec; border: 1px solid #f6c6c8; color: #a01f22;
  border-radius: 10px; padding: 11px 15px; font-size: 13px;
}
.errbar.show .btn { border-color: #f0b4b6; color: #a01f22; background: #fff; }
.errbar.show .btn:hover { background: #fbe0e1; border-color: #e08e91; color: #a01f22; }


/* ---------------- 登录遮罩 ---------------- */
.login-mask {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eef2fb 0%, #dfe7f8 100%);
}
.login-mask.show { display: flex; }
.login-box {
  width: 430px; max-width: calc(100vw - 32px);
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow); padding: 26px 26px 20px;
}
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.login-brand .logo {
  width: 40px; height: 40px; border-radius: 11px; background: var(--brand);
  color: #fff; font-weight: 700; display: flex; align-items: center;
  justify-content: center; font-size: 15px;
}
.login-brand b { display: block; font-size: 15px; }
.login-brand small { color: var(--muted); font-size: 12px; }
/* 登录页合规声明。刻意做得「像一条说明」而不是「像一条提醒」：
   中性灰、字号小一点、和表单之间用虚线分隔 —— 它是给用户看的产品归属与
   责任边界，不是吸引注意力的提示条。 */
.login-legal {
  margin-top: 16px; padding-top: 13px; border-top: 1px dashed var(--border);
  color: var(--muted); font-size: 12px; line-height: 1.75;
}
.login-legal p { margin: 0 0 7px; }
.login-legal p:last-child { margin-bottom: 0; }
.login-help {
  margin-top: 12px; text-align: center; color: var(--muted); font-size: 12px;
}
.login-lic {
  margin-top: 12px; padding: 10px 12px; border-radius: 9px;
  background: #fff6e8; border: 1px solid #f3ddb7; color: #8a5a09; font-size: 12.5px;
  line-height: 1.7;
}
.login-lic code { background: #fff; padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }

/* 登录遮罩里的两步进度条。
   激活流程是「① 登录账号 → ② 输入授权码」，得让人一眼看出走到第几步了，
   否则第二步突然多出一个输入框，用户会以为是报错弹出来的。 */
.login-steps {
  display: flex; align-items: center; gap: 8px; margin: 0 0 16px;
}
.login-steps span {
  flex: 1; text-align: center; padding: 6px 6px; border-radius: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .2px;
  background: #f2f5fa; border: 1px solid var(--border); color: var(--muted);
  transition: background .18s, color .18s, border-color .18s;
}
.login-steps span.on {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.login-steps span.done {
  background: var(--brand-soft); border-color: #c3d5ff; color: var(--brand);
}
.login-help a { color: var(--brand); text-decoration: none; }
.login-help a:hover { text-decoration: underline; }

/* 局域网入口的地址列表 */
.lan-url {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: #f7f9fd; font-size: 13px;
}
.lan-url + .lan-url { margin-top: 8px; }
.lan-url b { font-size: 13.5px; color: var(--brand); word-break: break-all; }
.lan-url small { color: var(--muted); font-size: 12px; }

/* ---------------- 未激活提示条 ---------------- */
.licbar { display: none; }
.licbar.show {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  background: #fff6e8; border: 1px solid #f3ddb7; color: #8a5a09;
  border-radius: 10px; padding: 11px 15px; font-size: 13px; flex-wrap: wrap;
}
.licbar code {
  background: #fff; border: 1px solid #eddcbd; padding: 2px 7px;
  border-radius: 6px; font-size: 12.5px;
}

/* ---------------- 侧边栏「我的账号」 ---------------- */
.me-box {
  border-top: 1px solid var(--border); padding: 12px 14px 14px;
  font-size: 13px; color: var(--text-2);
}
.role-tag {
  margin-left: 6px; font-size: 11.5px; padding: 1px 7px; border-radius: 20px;
  background: var(--brand-soft); color: #2b4bb5;
}
.role-tag.admin { background: #fdecec; color: #a01f22; }
.role-tag.customer { background: #e8f7ee; color: #1a7a3c; }

/* ---------------- 统计汇总 ---------------- */
.sum-grid {
  display: grid; gap: 12px; margin-top: 12px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.sum-card {
  border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px;
  background: var(--panel-2);
}
.sum-card .k { color: var(--muted); font-size: 12px; }
.sum-card .v { font-size: 21px; font-weight: 680; margin-top: 2px; }
.sum-card .v small { font-size: 12px; font-weight: 500; color: var(--muted); }
.sum-card.acc .v { font-size: 17px; }
.sum-acc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sum-acc-head b { font-size: 13.5px; }
.sum-acc-body { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; }
.sum-acc-body span b { font-size: 15px; }
.sum-acc-foot { margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.badge-off {
  font-size: 11px; padding: 1px 7px; border-radius: 20px;
  background: #fdecec; color: #a01f22;
}
.badge-on {
  font-size: 11px; padding: 1px 7px; border-radius: 20px;
  background: #e8f7ee; color: #1a7a3c;
}
/* 离线：不是错误，是「这会儿没人用」。所以用中性的灰，不是红色 ——
   红色会让管理员以为出故障了。 */
.badge-idle {
  font-size: 11px; padding: 1px 7px; border-radius: 20px;
  background: #eef1f6; color: #5b6b82;
}

/* ---------------- 设备与授权看板 ---------------- */
.dev-stats {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px;
}
.dev-stat {
  flex: 1 1 120px; min-width: 110px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2);
}
.dev-stat b { display: block; font-size: 22px; line-height: 1.2; color: var(--text); }
.dev-stat span { font-size: 12px; color: var(--muted); }
.dev-stat.on { background: #eaf7f0; border-color: #bfe6d0; }
.dev-stat.on b { color: #1a7a3c; }
/* 设备码 / 激活码：等宽字体 + 允许换行，一串 16 位码在窄表格里不会把列撑破 */
code.dc {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12px; letter-spacing: .3px;
  background: var(--panel-2); padding: 2px 6px; border-radius: 6px;
  white-space: nowrap;
}

/* ---------------- 表格勾选列 / 用户列表 ---------------- */
.cell-chk { width: 34px; text-align: center; }
.cell-chk input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table th, .users-table td {
  padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left;
}
.users-table th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.users-table tr:last-child td { border-bottom: 0; }
.users-table td.act { white-space: nowrap; }
.lic-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  border-bottom: 1px dashed var(--border); font-size: 12.5px;
}
.lic-item:last-child { border-bottom: 0; }
.lic-item code { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; }
