/* ==========================================================================
   审计部U盘管理平台 · 前端样式（唯一入口，零外部依赖：不用 CDN 字体/图标库）
   场景：移动端优先的单页应用（手机浏览器 / iPhone 添加到主屏幕 / 桌面窄栏也适用）
   品牌：墨蓝 #0F2A4A + 青绿 #14B8A6；浅色主题为主。
   约定：类名由 static/app.js 生成；颜色/间距/圆角优先用第 1 节令牌。
   CSP：style-src 'self' ⇒ 不写内联 style 属性（脚本里用 CSSOM 设宽度/显示是允许的）。
   ========================================================================== */

/* ===================== 1. 设计令牌 ===================== */
:root {
  /* — 品牌 — */
  --brand: #0F2A4A;
  --brand-2: #14385F;
  --brand-3: #1D4B7A;
  --accent: #14B8A6;
  --accent-strong: #0E9384;
  --accent-ink: #ffffff;
  --accent-soft: rgba(20, 184, 166, .12);
  --accent-soft-2: rgba(20, 184, 166, .22);
  --blue: #1D5C8A;

  /* — 中性面 / 文字 — */
  --bg: #EFF4F7;
  --card: #ffffff;
  --surface-2: #F5F8FA;
  --surface-3: #E9EFF4;
  --text: #17263C;
  --muted: #5B7183;
  --muted-2: #8798A8;

  /* — 描边 — */
  --line: rgba(15, 42, 74, .12);
  --line-strong: rgba(15, 42, 74, .22);
  --line-soft: rgba(15, 42, 74, .07);

  /* — 语义色 — */
  --ok: #15803D;
  --ok-bg: #E6F6EC;
  --danger: #C0392B;
  --danger-bg: #FDEDEA;
  --warn: #B45309;
  --warn-bg: #FFF4E2;
  --info: #1D5C8A;
  --info-bg: #E8F1F8;
  --neutral: #5B7183;
  --neutral-bg: #EEF2F5;

  /* — 字号 — */
  --fs: 16px;
  --fs-sm: 14px;
  --fs-xs: 12px;
  --lh: 1.55;

  /* — 间距 — */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;

  /* — 圆角 — */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* — 阴影 / 焦点环 — */
  --shadow-1: 0 1px 2px rgba(15, 42, 74, .06), 0 1px 3px rgba(15, 42, 74, .05);
  --shadow-2: 0 6px 18px rgba(15, 42, 74, .08);
  --shadow-3: 0 16px 40px rgba(15, 42, 74, .22);
  --ring: 0 0 0 3px rgba(20, 184, 166, .3);

  /* — 布局 — */
  --nav-h: 58px;
  --tap: 44px;
  --pad: 14px;
  --app-w: 760px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ===================== 2. 基础重置与排版 ===================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-anchor: none; }
html, body, #app {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-anchor: none;
}
html, body {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: var(--fs)/var(--lh) "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body { -webkit-tap-highlight-color: rgba(20, 184, 166, .16); }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hidden { display: none !important; }
[hidden] { display: none !important; }
.muted { color: var(--muted); font-size: var(--fs-sm); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.danger-text { color: var(--danger); }
.ok-text { color: var(--ok); }

/* ===================== 3. 登录页 ===================== */
.login-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + var(--safe-b));
  background: linear-gradient(165deg, var(--brand) 0%, var(--brand-2) 58%, #14557A 100%);
}
.login-card {
  width: min(400px, 100%);
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  padding: 28px 24px 22px;
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-logo {
  width: 64px; height: 64px;
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  display: block;
  margin: 0 auto 12px;
}
.login-title { margin: 0; font-size: 21px; line-height: 1.35; font-weight: 800; color: var(--brand); letter-spacing: .01em; }
.login-sub { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.login-card .btn { width: 100%; min-height: 48px; margin-top: 6px; }
.login-foot { margin-top: 18px; text-align: center; font-size: var(--fs-xs); color: var(--muted-2); }
.login-help { margin-top: 14px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-sm); font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; }
.login-outside { margin-top: 16px; color: #B9CADB; font-size: var(--fs-xs); text-align: center; }

/* ===================== 4. 表单控件 ===================== */
.form-row { display: grid; gap: 6px; margin: 14px 0; }
.form-row > label, .form-label { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.input, .select, textarea.input {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  font-size: var(--fs);
  line-height: 1.35;
  appearance: none;
  -webkit-appearance: none;
}
.select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
textarea.input { resize: vertical; min-height: 76px; }
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
::placeholder { color: #9AAEBD; opacity: 1; }
.form-hint { font-size: var(--fs-xs); color: var(--muted-2); }
.form-error { min-height: 18px; font-size: var(--fs-sm); color: var(--danger); font-weight: 600; line-height: 1.4; }
.form-error:empty { min-height: 0; }
.field-inline { display: flex; gap: 8px; }
.field-inline > .input { flex: 1 1 auto; min-width: 0; }
/* iOS：输入控件字号 <16px 时聚焦会放大整页 */
@supports (-webkit-touch-callout: none) {
  input, select, textarea, .input, .select { font-size: 16px; }
}

/* ===================== 5. 按钮 / 徽标 / chips ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--fs);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.btn:hover { background: var(--accent-strong); }
.btn:active { background: #0B8274; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn:disabled {
  background: var(--surface-3);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
  opacity: .85;
}
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line-strong); font-weight: 600; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost[disabled] { background: var(--surface-2); color: var(--muted); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #A93226; }
.btn-warn { background: var(--warn); color: #fff; }
.btn-warn:hover { background: #92400E; }
.btn-soft { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: var(--fs-sm); border-radius: 8px; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row > .btn { flex: 1 1 auto; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.7;
  white-space: nowrap;
}
.st-pending { background: var(--warn-bg); color: var(--warn); }
.st-approved { background: var(--info-bg); color: var(--info); }
.st-returned { background: #FDEBDD; color: #B45309; }
.st-archived { background: var(--ok-bg); color: var(--ok); }
.st-rejected { background: var(--danger-bg); color: var(--danger); }
.st-cancelled { background: var(--neutral-bg); color: var(--neutral); }
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
}

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }

/* ===================== 6. 壳 / 顶栏 / 底部导航 ===================== */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  box-shadow: 0 2px 10px rgba(15, 42, 74, .18);
}
.app-header-inner {
  width: 100%;
  max-width: var(--app-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-header-main { flex: 1 1 auto; min-width: 0; }
.app-title { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.3; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sub { margin: 2px 0 0; font-size: var(--fs-xs); color: #B9CADB; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header-user {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  min-width: 0;
  max-width: 46%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  text-align: right;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.app-header-user .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--app-w);
  margin: 0 auto;
  padding: var(--pad) var(--pad) calc(var(--nav-h) + var(--safe-b) + 24px);
}
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
  box-shadow: 0 -4px 18px rgba(15, 42, 74, .08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-item {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--nav-h);
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.nav-item.active { color: var(--accent-strong); }
.nav-item.active .nav-ico { color: var(--accent); }
.nav-ico { display: block; width: 22px; height: 22px; color: var(--muted); }
.nav-ico svg { display: block; width: 100%; height: 100%; }
.nav-dot {
  position: absolute;
  top: 4px;
  left: 50%;
  margin-left: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  text-align: center;
}

/* ===================== 7. 卡片 / 分节 / 列表 ===================== */
.section { margin-bottom: var(--sp-4); }
.section-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; }
.section-title { margin: 0; font-size: 15px; font-weight: 800; color: var(--brand); letter-spacing: .01em; }
.section-count { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.section-head .spacer { flex: 1 1 auto; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.card:last-child { margin-bottom: 0; }
.card-title { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--brand); }
.card-sub { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.list { display: block; }
.empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-sm);
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
}
.loading { padding: 22px 16px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.spin {
  display: inline-block;
  width: 18px; height: 18px;
  margin-right: 6px;
  vertical-align: -3px;
  border: 2px solid var(--accent-soft-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 申请记录卡片 */
.app-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 13px 14px 12px;
  margin-bottom: 10px;
}
.app-item:last-child { margin-bottom: 0; }
.app-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.record-no { font-size: var(--fs-sm); font-weight: 800; color: var(--brand); letter-spacing: .02em; }
.app-item-top .spacer { flex: 1 1 auto; }
.app-item-purpose { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.45; word-break: break-word; }
.app-item-meta { display: grid; gap: 2px; font-size: var(--fs-xs); color: var(--muted); }
.app-item-meta span { display: block; }
.app-item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.app-item-actions .btn { flex: 1 1 auto; }
.app-item-actions .btn[data-act="detail"] { flex: 0 1 auto; }

/* ===================== 8. 统计卡 / 筛选 / 分页 ===================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: var(--sp-3);
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 10px 12px;
  box-shadow: var(--shadow-1);
}
.stat-label { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--brand); line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat-card.s-warn { border-left-color: var(--warn); }
.stat-card.s-info { border-left-color: var(--blue); }
.stat-card.s-ok { border-left-color: var(--ok); }
.stat-card.s-soft { border-left-color: var(--brand-3); }
.filter-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 12px 14px 14px;
  margin-bottom: var(--sp-3);
}
.filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.filter-grid .form-row { margin: 0; }
.filter-grid .span-2 { grid-column: 1 / -1; }
.filter-actions { display: flex; gap: 8px; margin-top: 10px; }
.filter-actions .btn { flex: 1 1 auto; }

.pager { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.pager .pager-info { flex: 1 1 auto; text-align: center; font-size: var(--fs-sm); color: var(--muted); }
.pager .btn { min-width: 74px; }

/* ===================== 9. 表格（窄屏变卡片） ===================== */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr[data-id] { cursor: pointer; }
.data-table tbody tr[data-id]:active { background: var(--surface-2); }
.data-table .col-no { font-weight: 800; color: var(--brand); white-space: nowrap; }
.data-table .col-purpose { min-width: 180px; word-break: break-word; }
.data-table .cell-sub { display: block; font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.table-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }

/* ===================== 10. 详情 / 时间线 / 视频 ===================== */
.detail-grid { display: grid; gap: 8px; }
.detail-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; font-size: var(--fs-sm); }
.detail-label { color: var(--muted); }
.detail-value { color: var(--text); word-break: break-word; }
.detail-value.pre { white-space: pre-wrap; }
.detail-sep { height: 1px; background: var(--line); margin: 12px 0; }
.video-box { margin: 4px 0 12px; }
.video-box video {
  display: block;
  width: 100%;
  max-height: 56dvh;
  border-radius: var(--r-md);
  background: #000;
}
.video-tip { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.video-empty {
  padding: 18px 14px;
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-sm);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
}
.timeline { margin: 2px 0 0; padding: 0; list-style: none; }
.tl-item { position: relative; padding: 0 0 14px 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.tl-item::after {
  content: "";
  position: absolute;
  left: 7.5px;
  top: 18px;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
}
.tl-item:last-child::after { display: none; }
.tl-title { font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.tl-meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 1px; }
.tl-detail { font-size: var(--fs-sm); color: var(--text); margin-top: 2px; white-space: pre-wrap; word-break: break-word; }

/* ===================== 11. 弹窗（移动端底部抽屉） ===================== */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 42, 74, .5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  padding: 0;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-3);
  padding: 18px 18px calc(16px + var(--safe-b));
  animation: sheet-up .18s ease-out;
}
@keyframes sheet-up { from { transform: translateY(18px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.modal-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.modal-x:hover { background: var(--surface-2); color: var(--text); }
.modal-title { margin: 0 40px 12px 0; font-size: 17px; font-weight: 800; color: var(--brand); }
.modal-body { min-width: 0; }
.modal-line { margin: 0 0 8px; font-size: var(--fs-sm); color: var(--text); line-height: 1.6; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-actions .btn { flex: 1 1 auto; }

/* ===================== 12. 录像弹窗 ===================== */
.rec-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0B1622;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 10px;
}
.rec-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0B1622;
}
.rec-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: #C7D5E3;
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.rec-timer {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rec-timer.recording { background: rgba(192, 57, 43, .9); }
.rec-timer .dot { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: #fff; vertical-align: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.rec-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  margin-bottom: 8px;
  word-break: break-all;
}
.rec-file .spacer { flex: 1 1 auto; }
.rec-tip {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: var(--fs-xs);
  line-height: 1.6;
}
.rec-tip.err { background: var(--danger-bg); color: var(--danger); }
.progress {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
  margin: 8px 0 4px;
}
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .18s ease; }
.progress-text { font-size: var(--fs-xs); color: var(--muted); text-align: right; }
.rec-divider { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--muted-2); font-size: var(--fs-xs); }
.rec-divider::before, .rec-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }

/* ===================== 13. 账号设置 ===================== */
.kv { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 6px 10px; font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); font-weight: 600; word-break: break-word; }
.steps { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative;
  padding: 0 0 12px 32px;
  counter-increment: step;
  font-size: var(--fs-sm);
  color: var(--text);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}
.steps li:last-child { padding-bottom: 0; }
.steps .step-title { font-weight: 700; color: var(--brand); }
.install-row { display: flex; align-items: center; gap: 10px; }
.install-row .muted { flex: 1 1 auto; }
.version-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); color: var(--muted); }

/* ===================== 14. 浮层提示 / 工具 ===================== */
.mt-2 { margin-top: 10px; }
.detail-top { margin-bottom: 10px; }
.btn-row[data-center] { justify-content: center; margin-top: 10px; }
#recPlayback {
  display: block;
  width: 100%;
  max-height: 50dvh;
  border-radius: var(--r-md);
  background: #000;
  margin-bottom: 10px;
}
#recPlayback.hidden { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  z-index: 120;
  transform: translateX(-50%) translateY(8px);
  max-width: min(86vw, 420px);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(15, 42, 74, .95);
  color: #fff;
  font-size: var(--fs-sm);
  line-height: 1.45;
  text-align: center;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: rgba(150, 35, 25, .96); }
.toast.ok { background: rgba(14, 110, 80, .96); }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===================== 15. 窄屏：表格转"带标签的卡片" ===================== */
@media (max-width: 560px) {
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tbody tr {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin: 10px;
    padding: 6px 10px 8px;
    background: var(--card);
    box-shadow: var(--shadow-1);
  }
  .data-table tbody tr:first-child { margin-top: 10px; }
  .data-table tbody td {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 0;
    font-size: var(--fs-sm);
  }
  .data-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 76px;
    color: var(--muted);
    font-size: var(--fs-xs);
    line-height: 1.6;
  }
  .data-table tbody td.cell-no::before { content: none; }
  .data-table tbody td.cell-no { font-size: 15px; font-weight: 800; color: var(--brand); padding-top: 6px; }
  .data-table .col-purpose { min-width: 0; }
  .detail-row { grid-template-columns: 76px minmax(0, 1fr); }
  .kv { grid-template-columns: 76px minmax(0, 1fr); }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { gap: 8px; }
  .stat-value { font-size: 20px; }
}

@media (min-width: 600px) {
  .modal-mask { align-items: center; padding: 24px; }
  .modal { border-radius: var(--r-lg); padding-bottom: 18px; }
  .stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 359px) {
  .app-title { font-size: 15px; }
  .filter-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
