/* 与小程序 pages/*.acss 一一对应：rpx ÷ 2 = px（按 375 宽的机型换算） */
[hidden] { display: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #e9edf0;
  color: #17232b;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* 桌面上看就是一台手机 */
.phone {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f4f6f8;
  box-shadow: 0 0 40px rgba(23, 35, 43, 0.12);
  position: relative;
  overflow: hidden;
}
.app { min-height: 100vh; position: relative; }
.view { min-height: 100vh; padding-bottom: 30px; }

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(23, 35, 43, 0.06);
}
.mono { font-family: Menlo, Consolas, "Courier New", monospace; letter-spacing: 0.5px; }
.muted { color: #6b7b85; }
.empty { color: #94a3ab; text-align: center; padding: 32px 0; font-size: 13px; }

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ---------- 首页 ---------- */
.hero {
  background: linear-gradient(160deg, #0f6f5c 0%, #128a6f 60%, #16a37f 100%);
  padding: 24px 20px 48px;
  color: #fff;
}
.hero-kicker { font-size: 11px; letter-spacing: 2px; opacity: 0.7; }
.hero-title { font-size: 22px; font-weight: 700; margin-top: 8px; }
.hero-sub { font-size: 12px; opacity: 0.82; margin-top: 6px; line-height: 18px; }

.stats {
  margin: -32px 16px 0;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.stat { flex: 1; display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 24px; font-weight: 700; color: #0f6f5c; line-height: 1.1; }
.stat-num.sold { color: #1c6fb5; }
.stat-num.warn { color: #d9480f; }
.stat-lab { font-size: 12px; color: #6b7b85; margin-top: 4px; }
.stat-div { width: 1px; height: 28px; background: #eef2f4; }

.errbar {
  margin: 12px 16px 0;
  padding: 10px 12px;
  background: #fff4e6;
  border-left: 4px solid #f08c00;
  border-radius: 6px;
  font-size: 12px;
  color: #a65100;
  line-height: 18px;
  white-space: pre-wrap;
}

.scan-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(100% - 32px);
  margin: 16px;
  padding: 24px 16px;
  background: #0f6f5c;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 5px 14px rgba(15, 111, 92, 0.28);
}
.scan-btn:active { transform: translateY(1px); }
.scan-btn.busy { opacity: 0.72; pointer-events: none; }
.scan-icon { font-size: 32px; opacity: 0.85; line-height: 1; }
.scan-main { font-size: 22px; font-weight: 700; letter-spacing: 3px; margin-top: 6px; }
.scan-sub { font-size: 12px; opacity: 0.78; margin-top: 6px; }

.manual { margin: 0 16px; padding: 14px; }
.manual-label { font-size: 12px; color: #6b7b85; margin-bottom: 8px; }
.manual-row { display: flex; align-items: center; }
.manual-input {
  flex: 1;
  height: 42px;
  background: #f4f6f8;
  border: 1px solid #e6ebee;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 15px;
  color: #17232b;
  outline: none;
}
.manual-input:focus { border-color: #0f6f5c; background: #fff; }
.manual-btn {
  width: 70px;
  height: 42px;
  margin-left: 8px;
  background: #e6f3ef;
  color: #0f6f5c;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}
.manual-tip { font-size: 11px; color: #94a3ab; margin-top: 8px; line-height: 16px; }

.section { margin: 20px 16px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.section-title { font-size: 15px; font-weight: 700; }
.section-more { font-size: 12px; color: #0f6f5c; text-decoration: none; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.row-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.row-code { font-size: 15px; font-weight: 600; }
.row-fake { font-size: 11px; color: #6b7b85; margin-top: 4px; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; margin-left: 8px; }
.row-time { font-size: 11px; color: #94a3ab; margin-top: 5px; }

.badge { font-size: 11px; padding: 2px 7px; border-radius: 10px; white-space: nowrap; }
.b-in { background: #e6f3ef; color: #0f6f5c; }
.b-sold { background: #e8f0f8; color: #1c6fb5; }
.b-warn { background: #fdecea; color: #c92a2a; }

.foot { text-align: center; font-size: 11px; color: #94a3ab; margin-top: 24px; padding: 0 16px 16px; }
.foot-link { color: #0f6f5c; margin-left: 6px; text-decoration: underline; }

/* ---------- 结果页 ---------- */
.verdict {
  border-radius: 12px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  margin: 16px;
}
.verdict.ok { background: linear-gradient(150deg, #0f6f5c, #16a37f); }
.verdict.info { background: linear-gradient(150deg, #17527f, #1c6fb5); }
.verdict.warn { background: linear-gradient(150deg, #b35c00, #e8890c); }
.verdict.bad { background: linear-gradient(150deg, #a02020, #d63939); }
.verdict-icon { font-size: 36px; opacity: 0.9; line-height: 1; }
.verdict-title { font-size: 21px; font-weight: 700; margin-top: 8px; }
.verdict-msg { font-size: 13px; opacity: 0.9; margin-top: 6px; text-align: center; line-height: 19px; }

.fake-card {
  margin: 0 16px 12px;
  padding: 16px;
  border: 1px dashed #b7d8ce;
  background: #f7fcfa;
}
.fake-head { display: flex; flex-direction: column; }
.fake-label { font-size: 13px; font-weight: 700; color: #0f6f5c; }
.fake-rule { font-size: 11px; color: #6b7b85; margin-top: 4px; }
.fake-code {
  font-size: 26px;
  font-weight: 700;
  color: #0b3d33;
  text-align: center;
  letter-spacing: 2px;
  padding: 16px 0;
  word-break: break-all;
}
.fake-ops { display: flex; gap: 8px; }
.op-btn {
  flex: 1;
  height: 40px;
  border-radius: 6px;
  background: #0f6f5c;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  line-height: 40px;
}
.op-btn.ghost { background: #fff; color: #0f6f5c; border: 1px solid #cfdedb; }
.fake-tip { font-size: 11px; color: #6b7b85; line-height: 17px; margin-top: 10px; }

.info { margin: 0 16px 12px; padding: 4px 14px; }
.info-row { display: flex; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid #f0f4f6; }
.info-row:last-child { border-bottom: 0; }
.info-k { width: 80px; flex: 0 0 80px; font-size: 13px; color: #6b7b85; }
.info-v { flex: 1; font-size: 14px; word-break: break-all; }

.ops { display: flex; gap: 8px; margin: 20px 16px 0; }
.op-main, .op-side {
  height: 46px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  line-height: 46px;
}
.op-main { flex: 2; background: #0f6f5c; color: #fff; }
.op-side { flex: 1; background: #fff; color: #0f6f5c; border: 1px solid #cfdedb; }
.hint { margin: 12px 16px 0; font-size: 11px; color: #94a3ab; text-align: center; line-height: 17px; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 12px;
  background: #0f6f5c;
  color: #fff;
}
.back { color: #fff; text-decoration: none; font-size: 24px; line-height: 1; width: 32px; }
.topbar-title { font-size: 16px; font-weight: 600; }

/* ---------- 记录页 ---------- */
.tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
  margin: 12px 16px;
  box-shadow: 0 1px 6px rgba(23, 35, 43, 0.06);
}
.tab {
  flex: 1;
  height: 34px;
  border-radius: 6px;
  font-size: 13px;
  color: #6b7b85;
}
.tab.on { background: #0f6f5c; color: #fff; font-weight: 600; }

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin: 0 16px 8px;
}
.item-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.item-code { font-size: 15px; font-weight: 600; }
.item-sub { font-size: 11px; color: #6b7b85; margin-top: 4px; }
.item-side { display: flex; align-items: center; margin-left: 8px; }
.item-time { font-size: 11px; color: #94a3ab; }
.chev { font-size: 18px; color: #c4d0d6; margin-left: 6px; }
.item[data-id] { cursor: pointer; }

/* ---------- 详情页 ---------- */
.top { margin: 12px 16px; padding: 14px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.top-code { font-size: 17px; font-weight: 700; word-break: break-all; }
.top-fake {
  margin-top: 10px;
  padding: 10px;
  background: #f7fcfa;
  border: 1px dashed #b7d8ce;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}
.top-fake .k { font-size: 11px; color: #0f6f5c; }
.top-fake .v { font-size: 17px; font-weight: 700; color: #0b3d33; margin-top: 4px; word-break: break-all; }
.copy-row { display: flex; margin-top: 10px; }
.copy-btn { flex: 1; height: 36px; background: #e6f3ef; color: #0f6f5c; border-radius: 6px; font-size: 13px; font-weight: 600; }

.block { margin: 0 16px 10px; padding: 4px 14px 10px; }
.block .row { display: flex; align-items: flex-start; padding: 10px 0; margin: 0; border-bottom: 1px solid #f0f4f6; box-shadow: none; background: none; }
.block .row:last-child { border-bottom: 0; }
.block .k { width: 85px; flex: 0 0 85px; font-size: 13px; color: #6b7b85; }
.block .v { flex: 1; font-size: 13.5px; word-break: break-all; }
.block-title { font-size: 14px; font-weight: 700; padding: 12px 0 6px; }

.tl { display: flex; padding: 8px 0; border-bottom: 1px solid #f7f9fa; }
.tl:last-child { border-bottom: 0; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; margin: 6px 8px 0 0; flex: 0 0 8px; background: #0f6f5c; }
.tl-dot.blue { background: #1c6fb5; }
.tl-dot.red { background: #d63939; }
.tl-body { flex: 1; display: flex; flex-direction: column; }
.tl-title { font-size: 13.5px; font-weight: 600; }
.tl-sub, .tl-time { font-size: 11px; color: #94a3ab; margin-top: 3px; }

/* ---------- 弹层 ---------- */
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(11, 30, 26, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.sheet-body {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; }
.sheet-close { color: #6b7b85; font-size: 13px; }
.cam-wrap { position: relative; margin: 12px 0; border-radius: 10px; overflow: hidden; background: #0b1e1a; aspect-ratio: 1 / 1; }
.cam-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-frame {
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.16);
}
.sheet-tip { font-size: 12px; color: #6b7b85; text-align: center; margin-bottom: 10px; }
.file-btn { position: relative; display: block; }

.dialog { width: 100%; max-width: 360px; background: #fff; border-radius: 14px; padding: 18px; }
.dialog-title { font-size: 16px; font-weight: 700; }
.dialog-body { font-size: 14px; margin: 12px 0 16px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.dialog-ops { display: flex; gap: 10px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  background: rgba(11, 30, 26, 0.88);
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 20px;
  z-index: 80;
  max-width: 82vw;
  text-align: center;
}
