/* ============================================================
   公安检查站人员车辆信息登记系统 - 公共样式（深色科技风）
   ============================================================ */
:root {
  --bg: #0B0F1A;
  --bg-soft: #0F1626;
  --panel: #121A2B;
  --panel-2: #16203380;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.25);
  --text: #E8ECF4;
  --text-2: #93A0B5;
  --text-3: #5D6B82;
  --primary: #4F8CFF;
  --accent: #22D3EE;
  --grad: linear-gradient(135deg, #4F8CFF 0%, #22D3EE 100%);
  --gold: #F5C542;
  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}
/* 背景光晕 */
body::before {
  content: "";
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background:
    radial-gradient(600px 300px at 15% -5%, rgba(79, 140, 255, 0.16), transparent 60%),
    radial-gradient(500px 260px at 90% 0%, rgba(34, 211, 238, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.page {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom));
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 4px 16px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.brand-badge {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(34, 211, 238, 0.35);
  flex-shrink: 0;
}
.brand-badge svg { width: 22px; height: 22px; }
.brand-title { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.brand-sub { font-size: 11px; color: var(--text-3); letter-spacing: 2px; margin-top: 1px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text-2); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.2s; flex-shrink: 0;
}
.icon-btn:active { transform: scale(0.92); color: var(--text); }
/* ---------- 首页顶栏 stack 变体：品牌顶置独占一行，更宽松 ---------- */
.topbar.stack { display: block; padding: 18px 4px 12px; }
.topbar.stack .brand { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.topbar.stack .brand-badge { width: 48px; height: 48px; border-radius: 14px; }
.topbar.stack .brand-badge svg { width: 26px; height: 26px; }
.topbar.stack .brand-title { font-size: 20px; }
.topbar.stack .brand-sub { margin-top: 3px; letter-spacing: 2.5px; }
.topbar .topbar-row { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.topbar .topbar-row .push { margin-left: auto; }
/* ---------- 顶栏当前账号胶囊 ---------- */
.acct-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 7px 12px;
  color: var(--accent, #22D3EE); flex-shrink: 1; min-width: 0;
}
.acct-chip svg { flex-shrink: 0; opacity: .85; }
.acct-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.acct-txt b { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-txt i { font-style: normal; font-size: 10px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }

/* ---------- 卡片 ---------- */
.card {
  background: linear-gradient(180deg, rgba(22, 32, 51, 0.55), rgba(18, 26, 43, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(8px);
}

/* 今日统计条 */
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-item { text-align: center; padding: 12px 4px; position: relative; }
.stat-item + .stat-item::before {
  content: ""; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 1px; background: var(--border);
}
.stat-num {
  font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { font-size: 11px; color: var(--text-3); margin-top: 2px; letter-spacing: 1px; }

/* ---------- 宫格入口 ---------- */
.grid-menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.menu-item {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 16px;
  text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s, border-color 0.2s;
}
.menu-item:active { transform: scale(0.97); }
.menu-item::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.22), transparent 70%);
}
.menu-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.menu-icon.blue   { background: rgba(79, 140, 255, 0.15); }
.menu-icon.cyan   { background: rgba(34, 211, 238, 0.14); }
.menu-icon.violet { background: rgba(167, 139, 250, 0.15); }
.menu-icon.gold   { background: rgba(245, 197, 66, 0.14); }
.menu-name { font-size: 15px; font-weight: 600; }
.menu-desc { font-size: 11px; color: var(--text-3); margin-top: -6px; }

/* ---------- 表单 ---------- */
.form-card { margin-top: 4px; }
.sec-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--text-2);
  letter-spacing: 1px; margin: 18px 2px 10px;
}
.sec-title:first-child { margin-top: 2px; }
.sec-title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: var(--grad);
}
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 13px; color: var(--text-2);
  margin-bottom: 6px; font-weight: 500;
}
.field label .req { color: var(--danger); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 16px; /* 16px 防止 iOS 聚焦缩放 */
  font-family: inherit; outline: none; transition: border 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 72px; resize: vertical; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2393A0B5' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}
.field select option { background: #131B2C; color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(79, 140, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field .hint { font-size: 11px; color: var(--text-3); margin-top: 5px; }
.field .hint.ok { color: var(--success); }
.field .hint.err { color: var(--danger); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 身份证解析徽标 */
.parse-badges { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.badge {
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--text-2);
  background: rgba(148, 163, 184, 0.08);
}
.badge.gold { color: var(--gold); border-color: rgba(245, 197, 66, 0.4); background: rgba(245, 197, 66, 0.08); }
.badge.warn { color: var(--warning); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }

/* 车牌输入 */
.plate-box { display: flex; gap: 8px; align-items: stretch; }
.plate-input {
  flex: 1; text-align: center; letter-spacing: 3px;
  font-weight: 700; text-transform: uppercase;
}
.plate-color {
  width: 96px; flex-shrink: 0;
}
.plate-preview {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px; border-radius: 6px;
  border: 1px solid; font-weight: 800; letter-spacing: 2px; font-size: 14px;
}
.plate-preview .dot { width: 18px; height: 18px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 9px; letter-spacing: 0; color: #000; background: rgba(0,0,0,0.15); }

/* ---------- 按钮 ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; border: none; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 700; font-family: inherit;
  color: #fff; background: var(--grad);
  box-shadow: 0 6px 22px rgba(34, 211, 238, 0.28);
  cursor: pointer; transition: transform 0.15s, opacity 0.2s;
  letter-spacing: 2px;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; pointer-events: none; }
.btn.ghost {
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--text-2); box-shadow: none;
}
.btn.ghost:active { color: var(--text); }
.btn.small { padding: 10px; font-size: 14px; letter-spacing: 1px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  background: rgba(19, 27, 44, 0.95); border: 1px solid var(--border-strong);
  color: var(--text); padding: 11px 20px; border-radius: 12px;
  font-size: 14px; z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: 86vw; text-align: center;
  box-shadow: var(--shadow);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok { border-color: rgba(52, 211, 153, 0.5); }
#toast.err { border-color: rgba(248, 113, 113, 0.5); }
#toast.warn { border-color: rgba(251, 191, 36, 0.5); }

/* ---------- Tab ---------- */
.tabs {
  display: flex; gap: 6px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 12px; padding: 4px;
}
.tab {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 9px;
  font-size: 14px; color: var(--text-2); cursor: pointer; transition: 0.2s;
  font-weight: 500;
}
.tab.on { background: var(--grad); color: #fff; font-weight: 700; }

/* ---------- 记录列表 ---------- */
.rec-item {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
}
.rec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rec-name { font-size: 15px; font-weight: 700; }
.rec-time { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rec-sub { font-size: 12px; color: var(--text-2); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.rec-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.rec-detail {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
  display: none; font-size: 13px; color: var(--text-2); line-height: 1.9;
}
.rec-item.open .rec-detail { display: block; }
.rec-detail b { color: var(--text); font-weight: 600; }
.tag {
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  background: rgba(79, 140, 255, 0.13); color: #9DC0FF;
  border: 1px solid rgba(79, 140, 255, 0.25);
}
.tag.cyan { background: rgba(34, 211, 238, 0.1); color: #7EE4F5; border-color: rgba(34, 211, 238, 0.25); }
.tag.gold { background: rgba(245, 197, 66, 0.1); color: var(--gold); border-color: rgba(245, 197, 66, 0.3); }
.empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 48px 0; }
.empty .ico { font-size: 34px; margin-bottom: 10px; opacity: 0.6; }

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(5, 8, 16, 0.7);
  backdrop-filter: blur(4px); z-index: 100;
  display: none; align-items: flex-end; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 560px;
  background: #131B2C; border: 1px solid var(--border);
  border-radius: 20px 20px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; text-align: center; }

/* ---------- 统计页 ---------- */
.range-tabs { margin-bottom: 14px; }
.big-nums { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.big-num { padding: 16px; }
.big-num .n { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.big-num .l { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.big-num.p .n { color: var(--primary); }
.big-num.v .n { color: var(--accent); }
.chart-box { margin-top: 6px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-pair { width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; }
.bar {
  width: 9px; border-radius: 4px 4px 2px 2px; min-height: 2px;
  position: relative; transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar.p { background: linear-gradient(180deg, #4F8CFF, #4F8CFF55); }
.bar.v { background: linear-gradient(180deg, #22D3EE, #22D3EE55); }
.bar-date { font-size: 10px; color: var(--text-3); white-space: nowrap; }
.legend { display: flex; gap: 16px; justify-content: center; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbar-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.hbar-label { width: 72px; font-size: 12px; color: var(--text-2); text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; height: 14px; background: rgba(148, 163, 184, 0.08); border-radius: 7px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 7px; background: var(--grad); transition: width 0.6s ease; }
.hbar-val { width: 40px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* 搜索/筛选条 */
.filter-bar { display: flex; gap: 8px; margin: 14px 0 12px; }
.search-input {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 12px;
}
.search-input input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 15px; padding: 11px 0; font-family: inherit;
}
.search-input input::placeholder { color: var(--text-3); }
.date-chip {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-2);
  font-size: 13px; padding: 0 12px; font-family: inherit; outline: none;
}
.load-more {
  width: 100%; text-align: center; padding: 12px;
  color: var(--text-3); font-size: 13px; cursor: pointer; border: none;
  background: var(--panel); border-radius: var(--radius-sm); margin-top: 4px;
  font-family: inherit;
}

/* 登录页 */
.login-wrap { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; }
.login-logo {
  width: 74px; height: 74px; border-radius: 20px; margin: 0 auto 18px;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 40px rgba(34, 211, 238, 0.35);
}
.login-logo svg { width: 40px; height: 40px; }
.login-title { text-align: center; font-size: 19px; font-weight: 800; letter-spacing: 1px; }
.login-sub { text-align: center; font-size: 12px; color: var(--text-3); letter-spacing: 3px; margin: 6px 0 26px; }

/* 流光分隔线 */
.shine-line {
  height: 1px; margin: 16px 0;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.6), transparent);
  position: relative; overflow: hidden;
}
.shine-line::after {
  content: ""; position: absolute; top: 0; left: -30%;
  width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: shine 2.6s linear infinite;
}
@keyframes shine { to { left: 110%; } }

/* ============================================================
   自定义下拉选择器（替代原生 select，修复移动端下拉不弹出）
   ============================================================ */
.picker {
  position: relative; display: flex; align-items: center; width: 100%;
  min-width: 0; box-sizing: border-box;
  padding: 12px 38px 12px 14px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 16px; min-height: 46px; cursor: pointer; user-select: none;
}
.picker:active { border-color: rgba(79, 140, 255, .5); }
.picker .picker-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .picker-text.ph { color: var(--text-3); }
.picker .picker-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
/* 显式四边定位代替 inset:0（旧内核 WebView 不支持 inset，会导致弹层错位撑出屏幕） */
.picker-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(5, 8, 16, .72); z-index: 200; display: none; align-items: flex-end; justify-content: center; }
.picker-mask.show { display: flex; }
.picker-box {
  width: 100%; max-width: 560px; max-width: 94vw; box-sizing: border-box; background: #131B2C;
  border: 1px solid var(--border-strong); border-bottom: none;
  border-radius: 16px 16px 0 0; padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
  animation: pickerUp .22s ease;
}
@keyframes pickerUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.picker-title { font-size: 13px; color: var(--text-3); margin-bottom: 10px; text-align: center; }
.picker-list { max-height: 52vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.picker-item {
  padding: 13px 14px; border-radius: 10px; font-size: 15px; color: var(--text);
  margin-bottom: 6px; background: rgba(255, 255, 255, .035); cursor: pointer;
  border: 1px solid transparent; word-break: break-all;
}
.picker-item.on { background: rgba(79, 140, 255, .16); color: #9CC0FF; border-color: rgba(79, 140, 255, .32); }
.picker-item.custom { color: var(--gold); background: rgba(245, 197, 66, .08); }
.picker-item:active { opacity: .7; }
.picker-custom { display: flex; gap: 8px; margin-top: 8px; }
.picker-custom input {
  flex: 1; padding: 11px 12px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 16px; font-family: inherit; outline: none;
}
.picker-cancel {
  width: 100%; margin-top: 12px; padding: 12px; border: 1px solid var(--border);
  border-radius: 10px; background: transparent; color: var(--text-2); font-size: 15px;
  font-family: inherit; cursor: pointer;
}

/* ---------- 品牌 LOGO ---------- */
.brand-badge.has-logo, .login-logo.has-logo { background: #fff; padding: 3px; }
.brand-badge img, .login-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

/* ---------- 扫描相机（点击屏幕聚焦） ---------- */
.cam-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #000; z-index: 300; display: none; flex-direction: column; }
.cam-mask.show { display: flex; }
.cam-video { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 88vw; max-width: 560px; aspect-ratio: 1.586 / 1;
  border: 2px solid rgba(79, 140, 255, .9); border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); pointer-events: none;
}
.cam-frame::before, .cam-frame::after {
  content: ""; position: absolute; width: 26px; height: 26px; border: 3px solid #22D3EE;
}
.cam-frame::before { left: -2px; top: -2px; border-right: none; border-bottom: none; border-radius: 12px 0 0 0; }
.cam-frame::after { right: -2px; bottom: -2px; border-left: none; border-top: none; border-radius: 0 0 12px 0; }
.cam-tip {
  position: absolute; left: 0; right: 0; top: 8%; text-align: center;
  color: #fff; font-size: 13px; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); padding: 0 20px;
}
.cam-focus {
  position: absolute; width: 62px; height: 62px; margin: -31px 0 0 -31px;
  border: 2px solid #22D3EE; border-radius: 50%; pointer-events: none;
  animation: focusPulse .5s ease; opacity: 0;
}
@keyframes focusPulse { 0% { transform: scale(1.6); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
.cam-bar {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px calc(22px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-around; gap: 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .8), transparent);
}
.cam-btn {
  min-width: 96px; height: 40px; padding: 0 20px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .75);
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 14px; letter-spacing: 3px; text-indent: 3px; text-align: center;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cam-btn:active { transform: scale(.94); }
.cam-side { color: #fff; font-size: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); padding: 11px 16px; border-radius: 22px; cursor: pointer; }
.cam-side:active { opacity: .7; }

/* ---------- 身份证自动扫描：取景框 / 四角 / 扫描线 / 状态灯 ----------
   注意：register.html 使用 .cam-stage / .cam-guide / .cam-hud 等类名，
   这里必须全部定义，否则取景框宽高为 0，会导致自动扫描不触发、手动抓拍"取景失败"。 */
.cam-stage {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
}
.cam-guide {
  position: relative; width: 88vw; max-width: 600px;
  height: 55.5vw; max-height: 378px;          /* 身份证 85.6×54mm ≈ 1.586:1 */
  border: 2px solid rgba(255, 255, 255, .6); border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55);
  transition: border-color .18s, box-shadow .18s;
}
.cam-guide.warn { border-color: #FBBF24; }
.cam-guide.bad  { border-color: #F87171; }
.cam-guide.ok   { border-color: #34D399; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55), 0 0 24px rgba(52, 211, 153, .6); }
.cg { position: absolute; width: 28px; height: 28px; border: 3px solid #4F8CFF; }
.cg-tl { left: -2px;  top: -2px;    border-right: none; border-bottom: none; border-radius: 12px 0 0 0; }
.cg-tr { right: -2px; top: -2px;    border-left: none;  border-bottom: none; border-radius: 0 12px 0 0; }
.cg-bl { left: -2px;  bottom: -2px; border-right: none; border-top: none;    border-radius: 0 0 0 12px; }
.cg-br { right: -2px; bottom: -2px; border-left: none;  border-top: none;    border-radius: 0 0 12px 0; }
.cam-scanline {
  position: absolute; left: 5%; right: 5%; height: 2px; top: 10%;
  background: linear-gradient(90deg, transparent, #22D3EE, transparent);
  box-shadow: 0 0 10px rgba(34, 211, 238, .9);
  animation: camScan 2s linear infinite; pointer-events: none;
}
@keyframes camScan { 0% { top: 10%; } 50% { top: 88%; } 100% { top: 10%; } }
.cam-hud { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 0 10px; }
.hud {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
  color: #E7ECF5; background: rgba(0, 0, 0, .52);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 20px; padding: 4px 10px;
}
.hud i { width: 6px; height: 6px; border-radius: 50%; background: #8A97AF; display: inline-block; flex: none; }
.hud.on  i { background: #34D399; box-shadow: 0 0 6px rgba(52, 211, 153, .85); }
.hud.bad i { background: #F87171; box-shadow: 0 0 6px rgba(248, 113, 113, .85); }

/* ---------- 记录行操作 ---------- */
.rec-acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tag.self { background: rgba(52, 211, 153, .12); color: #34D399; }
.tag.reg { background: rgba(79, 140, 255, .14); color: #7EB3FF; }
.tag.noreg { background: rgba(138, 151, 175, .14); color: #8A97AF; }
.editing-tip { font-size: 11px; color: var(--gold); }
