:root {
  --ink: #2c211d;
  --muted: #8c7a6b;
  --canvas: #f5eee2;
  --surface: #fffaf1;
  --line: #e7d8c4;
  --crimson: #9e2b25;
  --crimson-deep: #7d1f1b;
  --green: #2d6a4f;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: radial-gradient(circle at top, #fffaf2 0, var(--canvas) 45%, #eadcc9 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  min-height: 100vh;
}
.page { max-width: 980px; margin: 0 auto; padding: 18px 14px 48px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.seal {
  width: 46px; height: 46px; border-radius: 12px; background: var(--crimson);
  color: #fff; display: grid; place-items: center; font-size: 25px; font-weight: 800;
  box-shadow: 0 8px 20px rgba(158,43,37,.22);
}
h1 { font-size: 21px; margin: 0; letter-spacing: .08em; }
h2 { font-size: 16px; margin: 0 0 4px; }
p { margin: 0; }
.muted { color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.card {
  background: rgba(255,250,241,.96); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; margin: 12px 0;
  box-shadow: 0 10px 30px rgba(80,50,30,.06);
}
.login-card { max-width: 420px; margin: 12vh auto 0; padding: 26px; }
.login-card h2 { font-size: 20px; margin-bottom: 4px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 0; }
input {
  width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px;
  background: #fffdf8; color: var(--ink); font-size: 16px; padding: 12px 12px;
  outline: none;
}
input:focus { border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(158,43,37,.08); }
button {
  border: 0; border-radius: 10px; padding: 12px 18px; font-size: 15px;
  cursor: pointer; font-family: inherit;
}
button:disabled { opacity: .55; cursor: wait; }
.primary { background: var(--crimson); color: #fff; width: 100%; margin-top: 18px; }
.primary:active { background: var(--crimson-deep); }
.ghost { background: transparent; color: var(--crimson); padding: 8px 10px; }
.error { color: var(--crimson); font-size: 13px; min-height: 20px; margin-top: 10px; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.date { width: 150px; margin: 0; padding: 8px 10px; font-size: 14px; }
.records { display: grid; gap: 8px; margin-top: 14px; }
.record {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 10px;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: #fffdf8;
}
.record .name { font-size: 16px; font-weight: 700; }
.record .meta { color: var(--muted); font-size: 12px; }
.record .state { font-size: 12px; color: var(--green); align-self: center; }
.record .state.pending { color: var(--crimson); }
.record .thumb {
  grid-column: 1 / -1; margin-top: 4px; border-radius: 8px; max-height: 160px;
  width: auto; max-width: 100%; object-fit: contain; background: #f4eadc;
}
.upload-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.upload-row input[type=file] { flex: 1; min-width: 220px; margin: 0; padding: 10px; }
.upload-row .primary { width: auto; margin: 0; white-space: nowrap; }
.results { margin-top: 12px; display: grid; gap: 6px; }
.result { font-size: 13px; padding: 8px 10px; border-radius: 8px; background: #f7efe3; }
.result.ok { background: #eaf4ec; color: #215c3c; }
.result.bad { background: #f8e9e7; color: #8f2823; }
.pending { display: grid; gap: 12px; margin-top: 12px; }
.pending-item {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fffdf8;
}
.pending-item img, .pending-item video { width: 96px; height: 120px; object-fit: cover; border-radius: 8px; background: #eee; }
.pending-item .ocr { font-size: 11px; color: var(--muted); max-height: 54px; overflow: hidden; line-height: 1.5; margin: 6px 0; }
.pending-item select { width: 100%; padding: 9px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.pending-item button { margin-top: 8px; padding: 8px 12px; font-size: 13px; width: 100%; }
@media (max-width: 620px) {
  .page { padding: 10px 10px 40px; }
  .card { padding: 13px; border-radius: 13px; }
  .top { padding: 4px 2px 10px; }
  h1 { font-size: 18px; }
  .record { grid-template-columns: 1fr; }
  .record .state { justify-self: start; }
  .upload-row input[type=file] { min-width: 100%; }
  .upload-row .primary { width: 100%; }
  .pending-item { grid-template-columns: 82px 1fr; }
  .pending-item img, .pending-item video { width: 82px; height: 106px; }
}
