* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --primary:#2563eb; --primary-dark:#1d4ed8; --bg:#f4f7fb; --card:#fff; --line:#e2e8f0;
  --text:#1e293b; --muted:#64748b; --ok:#16a34a; --danger:#dc2626; --shadow:0 6px 24px rgba(15,23,42,.08); }
body { font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif; background:var(--bg); color:var(--text);
  line-height:1.6; -webkit-font-smoothing:antialiased; }
a { color:var(--primary); text-decoration:none; }
.topbar { height:60px; 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:20; }
.topbar .brand { font-weight:700; font-size:17px; color:var(--primary); }
.topbar nav { display:flex; align-items:center; gap:18px; font-size:14px; }
.topbar nav a { color:var(--text); }
.topbar nav a:hover { color:var(--primary); }
.user-chip { background:#eff6ff; color:var(--primary); padding:4px 12px; border-radius:20px; font-size:13px; }
.muted { color:var(--muted); font-size:13px; }
.container { max-width:1180px; margin:28px auto; padding:0 20px; }
h2 { font-size:22px; margin-bottom:4px; }
h3 { font-size:17px; margin-bottom:14px; }
.page-head { margin-bottom:18px; }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; border:1px solid var(--line);
  background:#fff; color:var(--text); padding:9px 16px; border-radius:9px; font-size:14px; cursor:pointer;
  font-family:inherit; transition:.15s; white-space:nowrap; }
.btn:hover { border-color:var(--primary); color:var(--primary); }
.btn.primary { background:var(--primary); border-color:var(--primary); color:#fff; }
.btn.primary:hover { background:var(--primary-dark); }
.btn.success { background:var(--ok); border-color:var(--ok); color:#fff; }
.btn.danger { background:#fff; border-color:#fecaca; color:var(--danger); }
.btn.danger:hover { background:#fef2f2; }
.btn.ghost { background:transparent; border-color:transparent; color:var(--muted); }
.btn.big { width:100%; padding:14px; font-size:16px; margin-top:12px; }
.btn.small { padding:5px 12px; font-size:12px; }
.btn.tiny { padding:3px 9px; font-size:12px; margin-right:4px; }

.form-group { margin-bottom:15px; }
.form-group label, .manual-label { display:block; font-size:13px; color:var(--muted); margin-bottom:6px; font-weight:600; }
input, select { width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:9px; font-size:14px;
  font-family:inherit; background:#fff; color:var(--text); outline:none; }
input:focus, select:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(37,99,235,.1); }
.segment { display:flex; gap:10px; }
.segment button { flex:1; padding:11px; border:1px solid var(--line); background:#fff; border-radius:9px;
  font-size:15px; cursor:pointer; font-family:inherit; }
.segment button.active { background:var(--primary); color:#fff; border-color:var(--primary); }

.panel { background:var(--card); border-radius:14px; padding:22px; box-shadow:var(--shadow); margin-bottom:18px; }
.panel.narrow { max-width:560px; }
.inline-form { display:flex; gap:10px; align-items:center; margin-bottom:16px; }
.inline-form.wrap { flex-wrap:wrap; }
.inline-form input, .inline-form select { width:auto; flex:0 1 auto; }
.inline-form input:first-child { min-width:160px; }
.inline-check { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--muted); white-space:nowrap; }
.inline-check input { width:auto; }

.table-wrap { overflow-x:auto; }
.table { width:100%; border-collapse:collapse; font-size:13px; }
.table th { background:#f8fafc; color:var(--muted); font-weight:600; text-align:left; padding:11px 12px;
  border-bottom:2px solid var(--line); white-space:nowrap; }
.table td { padding:10px 12px; border-bottom:1px solid var(--line); white-space:nowrap; }
.table tr:hover td { background:#fafcff; }
.table .flow { white-space:normal; max-width:280px; color:var(--muted); }
.total-row td { background:#eff6ff; font-weight:700; }
.ok-text { color:var(--ok); font-weight:600; }
.bad-text { color:var(--danger); font-weight:600; }
.tag { background:#eff6ff; color:var(--primary); padding:2px 9px; border-radius:12px; font-size:12px; }
.empty { text-align:center; color:var(--muted); padding:40px 10px; }

.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:18px; }
.tabs.scroll { overflow-x:auto; }
.tab { border:0; background:transparent; padding:10px 16px; font-size:14px; color:var(--muted); cursor:pointer;
  border-bottom:2px solid transparent; font-family:inherit; white-space:nowrap; }
.tab.active { color:var(--primary); border-color:var(--primary); font-weight:600; }
.badge { background:var(--danger); color:#fff; border-radius:10px; padding:1px 7px; font-size:11px; margin-left:4px; }
.tab-panel { display:none; }
.tab-panel.active { display:block; }

.card-list { display:grid; gap:12px; }
.work-card { background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px 18px;
  display:flex; justify-content:space-between; gap:16px; align-items:center; box-shadow:var(--shadow); }
.work-title { font-size:16px; font-weight:700; margin-bottom:6px; }
.work-meta { display:flex; flex-wrap:wrap; gap:14px; font-size:13px; color:var(--muted); }
.work-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

.qr-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:14px; margin-top:12px; }
.qr-item { background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px; text-align:center; }
.qr-warn { background:#fffbeb; border:1px solid #fde68a; border-radius:10px; padding:12px 14px; font-size:13px; line-height:1.8; margin-bottom:14px; }
.qr-warn code { background:#fff; padding:2px 6px; border-radius:4px; color:var(--primary); font-size:13px; }
.qr-title { font-weight:600; font-size:14px; margin-bottom:8px; }
.qr-item img { width:150px; height:150px; display:block; margin:0 auto 10px; }

.modal { display:none; position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:50;
  align-items:center; justify-content:center; padding:20px; }
.modal.show { display:flex; }
.modal-box { background:#fff; border-radius:16px; padding:22px; width:100%; max-width:460px; }
.modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.close { border:0; background:transparent; font-size:26px; cursor:pointer; color:var(--muted); line-height:1; }

/* 录入页 */
.entry-page { max-width:480px; margin:0 auto; padding:18px 16px 40px; }
.entry-card { background:#fff; border-radius:20px; padding:26px 22px; box-shadow:var(--shadow); }
.entry-head { text-align:center; margin-bottom:22px; }
.entry-logo { width:58px; height:58px; border-radius:16px; background:linear-gradient(135deg,#2563eb,#60a5fa);
  color:#fff; font-size:17px; font-weight:700; display:flex; align-items:center; justify-content:center;
  margin:0 auto 12px; }
.entry-head h1 { font-size:21px; }
.sub { color:var(--muted); font-size:13px; margin-top:4px; }
.step { display:none; }
.step.active { display:block; }
.illustration { display:flex; justify-content:center; padding:22px 0; }
.scan-frame { width:180px; height:180px; border:2px dashed #bfdbfe; border-radius:18px; position:relative; }
.scan-frame span { position:absolute; width:26px; height:26px; border:4px solid var(--primary); }
.scan-frame span:nth-child(1){ top:-2px;left:-2px;border-right:0;border-bottom:0;border-radius:8px 0 0 0; }
.scan-frame span:nth-child(2){ top:-2px;right:-2px;border-left:0;border-bottom:0;border-radius:0 8px 0 0; }
.scan-frame span:nth-child(3){ bottom:-2px;left:-2px;border-right:0;border-top:0;border-radius:0 0 0 8px; }
.scan-frame span:nth-child(4){ bottom:-2px;right:-2px;border-left:0;border-top:0;border-radius:0 0 8px 0; }
.camera-box { width:100%; aspect-ratio:3/4; background:#0f172a; border-radius:14px; overflow:hidden;
  position:relative; display:flex; align-items:center; justify-content:center; }
.camera-box.small { aspect-ratio:4/3; }
.camera-box video { width:100%; height:100%; object-fit:cover; transform:scaleX(-1); }
.cam-hint { position:absolute; bottom:12px; left:0; right:0; text-align:center; color:#fff;
  font-size:12px; background:rgba(0,0,0,.4); padding:5px; }
.person-card { background:#eff6ff; border:1px solid #bfdbfe; border-radius:12px; padding:12px 14px;
  margin-bottom:16px; display:flex; align-items:center; gap:12px; }
.person-avatar { width:42px; height:42px; border-radius:50%; background:var(--primary); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:700; }
.person-name { font-weight:700; font-size:15px; }
.person-dept { font-size:12px; color:var(--muted); }
.manual-area { background:#fffbeb; border:1px solid #fde68a; border-radius:10px; padding:12px; margin-bottom:14px; }
.success-icon { width:70px; height:70px; border-radius:50%; background:#dcfce7; color:var(--ok); font-size:38px;
  display:flex; align-items:center; justify-content:center; margin:10px auto 16px; }
#stepDone { text-align:center; }
.privacy { font-size:11px; color:#94a3b8; text-align:center; margin-top:20px; line-height:1.5; }
.wechat-tip { font-size:11px; color:#b45309; background:#fffbeb; border:1px solid #fde68a; border-radius:8px; padding:7px 10px; margin-top:16px; text-align:center; }
.tip { font-size:12px; color:var(--muted); text-align:center; margin-top:10px; }
.frame-hint { font-size:11px; color:#b45309; text-align:center; margin:-12px 0 16px; }
.notice-box { background:#f8fafc; border:1px solid var(--line); border-radius:12px; padding:14px 16px;
  margin-bottom:18px; font-size:13px; color:var(--muted); }
.notice-box p { margin:3px 0; }
.notice-box b { color:var(--text); }
.required { color:var(--danger); }
.photo-block { background:#f8fafc; border:1px dashed #cbd5e1; border-radius:12px; padding:14px; margin-bottom:18px; }
.photo-label { display:block; font-size:13px; font-weight:600; margin-bottom:4px; }
.photo-hint { font-size:11px; color:var(--muted); margin-bottom:10px; }
.photo-preview { width:100%; aspect-ratio:4/3; background:#e2e8f0; border-radius:10px; overflow:hidden;
  display:flex; align-items:center; justify-content:center; color:#94a3b8; font-size:13px; margin-bottom:10px; }
.photo-preview img { width:100%; height:100%; object-fit:cover; }
.photo-actions { display:flex; gap:8px; }
.photo-actions .btn { flex:1; }
.photo-thumb { width:54px; height:54px; object-fit:cover; border-radius:8px; cursor:pointer; border:1px solid var(--line); margin-right:6px; }
.check-warn { background:#fef2f2; color:var(--danger); border:1px solid #fecaca; padding:2px 9px; border-radius:12px; font-size:12px; font-weight:600; }
.history-line { margin-top:10px; font-size:12px; color:var(--muted); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.photo-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,.75); z-index:80;
  align-items:center; justify-content:center; padding:20px; }
.photo-modal.show { display:flex; }
.photo-modal img { max-width:100%; max-height:85vh; border-radius:10px; }
.auth-card { max-width:420px; margin:60px auto; background:#fff; padding:30px; border-radius:16px; box-shadow:var(--shadow); }
.auth-card h2 { margin-bottom:6px; }
.auth-card .tip { text-align:left; margin-top:14px; }

.toast { position:fixed; bottom:28px; left:50%; transform:translateX(-50%) translateY(20px); background:#1e293b;
  color:#fff; padding:11px 22px; border-radius:24px; font-size:14px; opacity:0; pointer-events:none;
  transition:.25s; z-index:100; max-width:85vw; text-align:center; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

@media (max-width:720px){
  .topbar { padding:0 14px; } .topbar nav { gap:10px; font-size:12px; }
  .container { margin:16px auto; padding:0 12px; }
  .work-card { flex-direction:column; align-items:stretch; }
  .work-actions { justify-content:flex-start; }
  .page-head h2 { font-size:19px; }
}
