body { font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "Microsoft YaHei", sans-serif; margin: 0; background: #f6f7fb; color: #222; }
.container { max-width: 900px; margin: 24px auto; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
h1 { margin: 0 0 16px; font-size: 22px; }
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.controls label { display: flex; align-items: center; gap: 6px; }
.controls input[type="text"], .controls select { padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; }
.controls button { padding: 8px 12px; border: none; background: #0b5ed7; color: #fff; border-radius: 4px; cursor: pointer; }
.controls button[disabled] { background: #9aa4b1; cursor: not-allowed; }
.admin-link { margin-left: auto; text-decoration: none; padding: 8px 12px; border: 1px solid #0b5ed7; color: #0b5ed7; border-radius: 4px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-nav .admin-link { margin-left: 0; }
.admin-nav span { font-size: 14px; color: #333; }
.status { margin-top: 10px; color: #0b5ed7; }
.last-scan { margin-top: 6px; color: #444; }
section { margin-top: 20px; }
h2 { font-size: 18px; margin: 10px 0; }
.message { padding: 10px; background: #e9f5ff; border: 1px solid #b6e0fe; border-radius: 4px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; }
.reader-box { width: 45%; min-width: 280px; max-width: 500px; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 8px; background: #fafbff; }
@media (max-width: 720px) { .reader-box { width: 100%; } }
/* Limit reader box to 30% of viewport height and hide overflow */
.reader-box {
  max-height: 60vh;
  overflow: hidden;
}
.reader-box video,
.reader-box canvas,
.reader-box img {
  max-height: 60vh;
  height: auto;
  width: 100%;
  object-fit: contain;
}
/* Simple modal for duplicate prompt */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 999; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 10px; width: 86vw; max-width: 420px; padding: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.2); z-index: 1000; }
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.modal-body { font-size: 14px; color: #333; }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.modal-actions .modal-ok { flex: 1; background: #0b5ed7; color: #fff; border: none; padding: 10px 12px; border-radius: 6px; }
.modal-actions .modal-cancel { flex: 1; background: #e5e7eb; color: #111827; border: none; padding: 10px 12px; border-radius: 6px; }