* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2563eb; --primary-dark: #1d4ed8;
  --success: #16a34a; --danger: #dc2626; --warn: #d97706;
  --bg: #f1f5f9; --card: #ffffff; --line: #e2e8f0;
  --text: #1e293b; --muted: #64748b;
}
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
}
.hidden { display: none !important; }
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 13px;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.success { background: var(--success); color: #fff; border-color: var(--success); }
.btn.danger-outline { color: var(--danger); border-color: #fca5a5; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.xs { padding: 3px 8px; font-size: 11px; border-radius: 5px; }
/* 状态列：实时刷新按钮 + 取回时间 */
.st-refresh { margin-top: 6px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.st-time { color: var(--muted); font-size: 11px; }

/* ---- 登录 ---- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
}
.login-card {
  width: 380px; background: #fff; border-radius: 14px; padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo {
  width: 52px; height: 52px; border-radius: 12px; margin: 0 auto 18px;
  background: var(--primary); color: #fff; font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-card h1 { font-size: 22px; text-align: center; }
.login-sub { text-align: center; color: var(--muted); margin: 6px 0 26px; font-size: 13px; }
.login-tip { text-align: center; color: var(--muted); margin-top: 16px; font-size: 12px; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: #475569; }
.field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 16px; color: var(--text); outline: none;
  background-color: #fff; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.field input:hover { border-color: #cbd5e1; }
.field input:focus { border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13); }
/* ---- 数字输入框美化（第 18 批）：去掉 Windows Chrome 的原生上下 spinner，
   网格内（题数/每题分值）用 .num 紧凑居中，观感与第 17 批下拉框对齐 ---- */
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.num {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; text-align: center; color: var(--text); background-color: #fff;
  font-variant-numeric: tabular-nums; outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.num:hover { border-color: #cbd5e1; background-color: #fbfcfe; }
.num:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .13); }
.err-msg { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.err-msg.ok { color: var(--success); }
.hint { color: var(--muted); font-size: 12px; min-height: 18px; margin: 6px 0 14px; }
.hint.ok { color: var(--success); }
/* 验证码发送授权状态提示（发码入口防误点） */
.sms-auth-tip { font-size: 12px; line-height: 1.6; border-radius: 6px; padding: 7px 10px; margin: 6px 0 12px; }
.sms-auth-tip.off { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }
.sms-auth-tip.ok { color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; }
/* 工具栏验证码发送开关芯片 */
.sms-gate { font-weight: 600; }
.sms-gate.off { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.sms-gate.on { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
/* 不限时长开启：用琥珀色区分，提醒授权不会自动到期 */
.sms-gate.on.infinite { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.sms-auth-tip.warn { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; }
.hint.warn { color: #b45309; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 6px; padding: 7px 10px; margin: 8px 0 0; }
/* ---- 下拉框美化（第 17 批）：原生 select 在 Windows Chrome 是灰疙瘩，和卡片式设计不搭。
   保留原生元素（App.* 取值与 Playwright select_option 不受影响），只隐藏系统箭头、
   用内联 SVG 重画；展开面板仅 Chrome 135+ 支持定制（需 select 和 ::picker(select)
   双双声明 base-select，缺一不可），老浏览器整段自动忽略回退原生——纯渐进增强。 */
.field select, .sel {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  width: 100%; padding: 9px 34px 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; font-family: inherit; color: var(--text);
  background-color: #fff; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='14'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2364748b'%20stroke-width='2.4'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m6%209%206%206%206-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
}
.field select:hover, .sel:hover { border-color: #cbd5e1; background-color: #fbfcfe; }
.field select:focus, .sel:focus { border-color: var(--primary); outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13); }
.field select:active, .sel:active { border-color: var(--primary); }
@supports (appearance: base-select) {
  /* 关键：select 本体和 ::picker(select) 都要 base-select——只给本体声明的话，
     面板仍是系统渲染（hover 项实心蓝改不动）；picker 不单独 opt-in 不生效 */
  .field select, .sel,
  .field select::picker(select), .sel::picker(select) { appearance: base-select; }
  /* base-select 会自带系统箭头（::picker-icon），和本规则 background-image 画的
     SVG 箭头叠成双箭头，须隐藏 */
  .field select::picker-icon, .sel::picker-icon { display: none; }
  .field select::picker(select), .sel::picker(select) {
    border: 1px solid var(--line); border-radius: 10px; background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .16); padding: 4px;
  }
  .field select option, .sel option {
    padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--text);
  }
  .field select option:hover, .field select option:focus,
  .sel option:hover, .sel option:focus { background: #eef2ff; }
  .field select option:checked, .sel option:checked {
    background: #e0e7ff; color: var(--primary-dark); font-weight: 600;
  }
  /* 选中行右侧默认 ✔ 与底色高亮重复，去掉 */
  .field select option::checkmark, .sel option::checkmark { display: none; }
}
/* 账号密码查看行 */
.pwd-row { display: flex; gap: 6px; align-items: center; }
.pwd-row input { flex: 1; font-family: ui-monospace, Consolas, monospace; letter-spacing: .5px; }

/* ---- 顶栏 ---- */
.topbar {
  height: 58px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 10;
}
.brand { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--primary);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.admin-name { color: var(--muted); margin-right: 6px; }

.container { max-width: 1240px; margin: 24px auto; padding: 0 24px; }

/* ---- 统计 ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px;
}
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 6px; }
.stat-value.running { color: var(--success); }

/* ---- 工具栏 ---- */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
/* flex-wrap 必须有：760–900px 这段宽度里右侧三个按钮 + 开关放不下一行，
   不换行就会被 white-space:nowrap 撑出容器（手机上"变形"的直接原因）。 */
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- 勾选开关 ----
   input 仍是原生 checkbox，只是视觉隐藏（保留 .checked 与 change 事件，
   app.js 一行都不用改），外观由 .tk-track 画。原生 checkbox 在 Chrome/Safari/
   微信内置浏览器上尺寸与基线各不相同，是"丑 + 错位"的根源。 */
.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 13px; color: var(--text); line-height: 1.35; user-select: none; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0;
  pointer-events: none; }
.tk-track { flex: none; width: 36px; height: 21px; border-radius: 999px;
  background: #cbd5e1; position: relative; transition: background .18s ease, box-shadow .18s ease; }
.tk-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.3);
  transition: transform .18s ease; }
.toggle input:checked + .tk-track { background: var(--primary); }
.toggle input:checked + .tk-track::after { transform: translateX(15px); }
/* 键盘可达：input 视觉隐藏但可聚焦，焦点环画在轨道上 */
.toggle input:focus-visible + .tk-track { box-shadow: 0 0 0 3px rgba(37,99,235,.3); }
.tk-text { display: block; transition: color .15s ease; }
.tk-text i { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 5px; }
.toggle input:checked ~ .tk-text { color: var(--primary); }

/* 工具栏里做成胶囊，跟旁边按钮同高同圆角，不再是一行孤零零的小字 */
.toolbar .toggle { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); transition: border-color .15s ease, background .15s ease; }
.toolbar .toggle:hover { border-color: #cbd5e1; background: #f8fafc; }
.toolbar .toggle input:checked ~ .tk-text { font-weight: 600; }
/* :has 不支持时自动退化成"只有开关和文字变色"，不影响可用性 */
.toolbar .toggle:has(input:checked) { border-color: rgba(37,99,235,.4); background: #eff6ff; }

/* 弹窗里是纵排表单：开关独占整行、整行可点（原来 inline 只有 110x21 的热区，
   手机上很难点准），并补出自己的呼吸间距（原来紧贴上下字段）。 */
.modal-body .toggle { display: flex; width: 100%; margin: 2px 0 14px;
  padding: 10px; border-radius: 9px; transition: background .15s ease; }
.modal-body .toggle:hover { background: #f8fafc; }
.modal-body .toggle:last-of-type { margin-bottom: 4px; }

@media (prefers-reduced-motion: reduce) {
  .tk-track, .tk-track::after, .tk-text, .toolbar .toggle { transition: none; }
}

/* ---- 表格 ---- */
.table-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.acct-table { width: 100%; border-collapse: collapse; }
.acct-table th {
  background: #f8fafc; text-align: left; padding: 12px 14px;
  font-size: 12px; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.acct-table td { padding: 13px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.acct-table tr:last-child td { border-bottom: none; }
.acct-table .empty { text-align: center; color: var(--muted); padding: 48px; }
.acct-name { font-weight: 600; }
.acct-phone { color: var(--muted); font-size: 12px; margin-top: 2px; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 12px; font-size: 12px; white-space: nowrap; }
.badge.run { background: #dcfce7; color: #166534; }
.badge.idle { background: #f1f5f9; color: #64748b; }
.badge.off { background: #fee2e2; color: #991b1b; }
.badge.done { background: #dbeafe; color: #1e40af; }
.badge.face { background: #fef3c7; color: #92400e; font-weight: 600; }
tr.row-face { background: #fffbeb; }
.btn.face { background: var(--warn); color: #fff; border-color: var(--warn); }
.btn.face:hover { background: #b45309; }
.progress-bar { width: 120px; height: 7px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-top: 5px; }
.progress-bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.progress-bar i.full { background: var(--success); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.meta-sm { color: var(--muted); font-size: 12px; }

/* ---- 日志 ---- */
.log-panel { margin-top: 18px; background: #0f172a; border-radius: 10px; overflow: hidden; }
.log-head {
  padding: 10px 16px; background: #1e293b; color: #e2e8f0;
  display: flex; justify-content: space-between; align-items: center; font-size: 13px;
}
.log-content {
  color: #a5f3fc; padding: 16px; margin: 0; max-height: 360px; overflow: auto;
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.6;
}

/* ---- 弹窗 ---- */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-card { width: 460px; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-card.small { width: 400px; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 17px; }
.modal-x { border: none; background: none; font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-body { padding: 20px 22px; max-height: 70vh; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.step-tip { font-size: 12px; color: var(--primary); font-weight: 600; margin: 4px 0 12px; padding-left: 10px; border-left: 3px solid var(--primary); }

/* ---- 人脸上传 ---- */
.face-tip { font-size: 12px; color: var(--muted); background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 8px 10px; margin-bottom: 12px; }
.face-cam { position: relative; text-align: center; margin-bottom: 12px; }
.cam-stage { position: relative; }
.cam-stage video { width: 100%; max-height: 60vh; border-radius: 8px; background: #000; display: block; }
.burst-overlay {
  position: absolute; inset: 0; border-radius: 8px;
  background: rgba(15,23,42,.55); display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 6;
}
.bo-aim { color: #fff; font-size: 17px; font-weight: 600; }
.bo-num { color: #fbbf24; font-size: 96px; font-weight: 800; line-height: 1.2;
  text-shadow: 0 4px 20px rgba(0,0,0,.5); }
.bo-prog { color: #e2e8f0; font-size: 14px; margin-top: 8px; }

/* ---- 照片池管理 ---- */
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 8px; }
.pool-item { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-align: center; }
.pool-item img { width: 100%; height: 110px; object-fit: cover; display: block; background: #f1f5f9; }
.pool-item .pi-meta { font-size: 11px; color: var(--muted); padding: 4px; }
.pool-item .btn { margin: 0 auto 6px; display: block; }
.snap-fab {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 64px; border-radius: 50%; border: 4px solid #fff;
  background: var(--danger); color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.4); z-index: 5;
}
.snap-fab:active { transform: translateX(-50%) scale(.92); }
.face-preview { height: 160px; line-height: 160px; color: var(--muted); font-size: 13px; background: #f8fafc; border: 1px dashed var(--line); border-radius: 8px; }
.face-preview img { max-height: 160px; max-width: 100%; vertical-align: middle; line-height: normal; }
.face-btns { display: flex; gap: 10px; justify-content: center; }
.face-btns label.btn { display: inline-block; }
.face-btns .hidden { display: none; }

/* ---- 专属链接 ---- */
.qr-box { display: flex; justify-content: center; margin: 8px 0 12px; }
.qr-box svg { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.link-url { background: #f1f5f9; border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; font-size: 13px; word-break: break-all; user-select: all; cursor: text; }
.row2 { display: flex; gap: 10px; justify-content: center; }
.row2 .btn { flex: 1; }

/* ---- 课程详情展开 ---- */
.detail-row td { background: #f8fafc; padding: 16px 20px; }
.course-detail { font-size: 13px; }
.cd-course { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 10px; }
.cd-course:last-of-type { margin-bottom: 0; }
.cd-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cd-title { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.cd-badge { background: #eff6ff; color: var(--primary); font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 10px; }
.cd-badge.full { background: #dcfce7; color: #166534; }
.cd-sub { color: var(--muted); font-size: 12px; }
.cbar-lg { height: 8px; background: #e2e8f0; border-radius: 4px; margin: 10px 0 12px; overflow: hidden; }
.cbar-lg i { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #2563eb); border-radius: 4px; transition: width .4s; }
.cbar-lg i.full { background: linear-gradient(90deg, #22c55e, #16a34a); }
.ls-group { margin-top: 8px; }
.ls-label { font-size: 12px; color: var(--warn); font-weight: 600; margin-bottom: 6px; }
.ls-label.ok { color: var(--success); }
.ls-toggle { border: none; background: none; color: var(--primary); cursor: pointer;
  font-size: 12px; margin-left: 6px; padding: 0; }
.ls-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  border-radius: 6px; padding: 5px 10px; border: 1px solid var(--line); }
.ls-chip i { font-style: normal; font-weight: 700; font-size: 11px; }
.ls-chip.todo { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.ls-chip.todo em { font-style: normal; color: #b45309; font-size: 11px; }
.ls-chip.done { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.ls-chip.done i { color: var(--success); }
.cd-time { color: var(--muted); font-size: 11px; margin-top: 8px; }
/* 正在刷 */
.cd-now { background: linear-gradient(135deg, #eff6ff, #f0fdf4); border: 1px solid #bfdbfe;
  border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.cd-now-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cd-now-head b { font-size: 14px; }
.cd-now-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success);
  animation: pulse 1.2s infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.cd-now-time { margin-left: auto; color: var(--muted); font-size: 11px; }
.cbar-lg.now { margin: 9px 0 6px; }
.cbar-lg.now i { background: linear-gradient(90deg, #22c55e, #16a34a); transition: width 1s linear; }
.cd-now-sub { color: #166534; font-size: 12px; }
.ls-chip.now { background: #dcfce7; border-color: #4ade80; color: #14532d;
  font-weight: 600; box-shadow: 0 0 0 2px rgba(34,197,94,.25); }
.ls-chip.now i { color: var(--success); }
/* 学时报告 */
.rp-block { margin-top: 12px; background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 8px; padding: 10px 12px; }
.rp-label { font-size: 12px; color: #166534; font-weight: 600; margin-bottom: 6px; }
.rp-item { display: flex; justify-content: space-between; align-items: center;
  gap: 10px; font-size: 12px; color: #475569; padding: 4px 0; flex-wrap: wrap; }
.rp-item a.btn { text-decoration: none; display: inline-block; }
/* 证书查看浮层 */
.cert-view { position: fixed; inset: 0; z-index: 500; background: #0f172a;
  display: flex; flex-direction: column; }
.cert-topbar { display: flex; justify-content: space-between; align-items: center;
  color: #fff; padding: 14px 20px; font-size: 15px; background: rgba(15,23,42,.92); }
.cert-topbar span { cursor: pointer; color: #93c5fd; }
.cert-body { flex: 1; overflow: auto; display: flex; flex-direction: column;
  align-items: center; padding: 20px; }
.cert-body img { max-width: min(100%, 560px); border-radius: 6px;
  box-shadow: 0 6px 30px rgba(0,0,0,.5); }
.cert-tip { color: #cbd5e1; font-size: 13px; margin-top: 14px; }

/* ---- toast ---- */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 10px 20px; border-radius: 8px;
  z-index: 200; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.toast.ok { background: var(--success); }
.toast.err { background: var(--danger); }

/* ---- 课程视频下载面板 ---- */
.vid-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.vid-stat { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 10px 6px; text-align: center; }
.vid-stat-v { font-size: 17px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.vid-stat-v.ok { color: #16a34a; }
.vid-stat-v.run { color: #2563eb; }
.vid-stat-v.bad { color: #dc2626; }
.vid-stat-l { font-size: 11px; color: var(--muted); margin-top: 4px; }
.vid-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.vid-actions .btn { flex: 1 1 auto; min-width: 120px; }
.vid-list { margin-top: 12px; max-height: 46vh; overflow-y: auto;
  border: 1px solid #e2e8f0; border-radius: 10px; }
.vid-list-head, .vid-row { display: grid;
  grid-template-columns: 1.3fr 1.3fr 0.7fr 0.7fr 0.7fr; gap: 8px;
  padding: 9px 12px; align-items: center; }
.vid-list-head { background: #f1f5f9; font-size: 12px; font-weight: 600;
  color: #475569; position: sticky; top: 0; z-index: 1; }
.vid-row { border-top: 1px solid #f1f5f9; font-size: 13px; }
.vid-row:hover { background: #f8fafc; }
.vid-chap { color: #475569; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.vid-title { color: #0f172a; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.vid-res, .vid-size { color: var(--muted); font-size: 12px; }
.vid-status { font-size: 12px; font-weight: 600; }
.vid-status.ok { color: #16a34a; }
.vid-status.run { color: #2563eb; }
.vid-status.bad { color: #dc2626; }
.vid-list .empty { text-align: center; color: var(--muted); padding: 30px 12px; }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .vid-stats { grid-template-columns: repeat(3, 1fr); }
  .vid-list-head, .vid-row { grid-template-columns: 1fr 1fr; font-size: 12px; }
  .vid-list-head span:nth-child(3), .vid-list-head span:nth-child(4),
  .vid-list-head span:nth-child(5) { display: none; }
  .vid-res, .vid-status, .vid-size { display: none; }
  .container { padding: 0 12px; }
}

/* ================= 手机端：表格转卡片 ================= */
@media (max-width: 760px) {
  .topbar { padding: 0 14px; height: 52px; }
  .brand { font-size: 15px; }
  .admin-name { display: none; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .stat-card { padding: 10px 8px; text-align: center; }
  .stat-label { font-size: 11px; }
  .stat-value { font-size: 18px; margin-top: 2px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  /* 原来是 justify-content: space-between + .btn{flex:1}：按钮被强制等分，
     长文案（验证码发送）压到换行，开关因为不是 .btn 拿不到 flex 被甩到最右边。
     改成按内容伸缩 + 换行，开关单独占满一行 —— 整行都是点击热区，手机上最好按。 */
  .toolbar-left, .toolbar-right { justify-content: flex-start; gap: 8px; }
  .toolbar .btn { flex: 1 1 auto; padding: 10px 8px; font-size: 13px; }
  .toolbar .toggle { flex: 1 1 100%; justify-content: center; padding: 11px 12px; }

  /* 表格 → 卡片 */
  .table-card { border: none; background: transparent; overflow: visible; }
  .acct-table { display: block; }
  .acct-table thead { display: none; }
  .acct-table tbody { display: flex; flex-direction: column; gap: 12px; }
  .acct-table tr { display: block; background: #fff; border: 1px solid var(--line);
    border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
  .acct-table tr.row-face { border-color: #fcd34d; background: #fffdf5; }
  .acct-table td { display: flex; justify-content: space-between; align-items: center;
    gap: 12px; border: none; padding: 5px 0; text-align: right; }
  .acct-table td::before { content: attr(data-label); color: var(--muted);
    font-size: 12px; font-weight: 600; text-align: left; flex-shrink: 0; }
  .acct-table td:not([data-label]):not(.td-actions):not(.empty):not(.td-detail) { display: none; }
  /* 账号信息行：整行突出 */
  .acct-table td[data-label="账号"] { padding-bottom: 8px; border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px; }
  .acct-table td[data-label="账号"] .acct-name { font-size: 15px; }
  .acct-table td[data-label="状态"] .badge { font-size: 12px; }
  .acct-table td[data-label="状态"] .meta-sm { text-align: left; max-width: 60%; }
  /* 进度：占整行 */
  .acct-table td[data-label="进度"] { flex-direction: column; align-items: stretch;
    text-align: left; gap: 4px; }
  .acct-table td[data-label="进度"]::before { display: none; }
  .progress-bar { width: 100%; }
  /* 操作按钮区 */
  .acct-table td.td-actions { display: block; padding-top: 10px;
    border-top: 1px solid #f1f5f9; margin-top: 6px; }
  .acct-table td.td-actions::before { display: none; }
  .acct-table td.empty { display: block; text-align: center; padding: 40px 12px;
    color: var(--muted); }
  .row-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .row-actions .btn { width: 100%; padding: 9px 4px; font-size: 12px; margin: 0; }
  /* 详情展开：并入卡片流 */
  .acct-table tr.detail-row { padding: 10px 12px; }
  .acct-table tr.detail-row td, .acct-table tr.detail-row td:not([data-label]) { display: block; padding: 0; text-align: left; }
  .acct-table tr.detail-row td::before { display: none; }
  .detail-row td { background: #fff; }
  .cd-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cd-now-head { flex-wrap: wrap; }
  .ls-chip { max-width: 100%; }
  /* 弹窗全屏化 */
  .modal { align-items: flex-end; }
  .modal-card, .modal-card.small { width: 100%; max-width: 100%;
    border-radius: 16px 16px 0 0; max-height: 92vh; }
  .modal-body { max-height: 68vh; }
  .cam-stage video { max-height: 44vh; }
  .pool-grid { grid-template-columns: repeat(3, 1fr); }
  .log-content { font-size: 11px; max-height: 46vh; }
  .toast { width: 90%; text-align: center; }
}
