* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f6f8; color: #222; }
a { color: inherit; text-decoration: none; }
.topbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 12px 24px; display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.topbar h1 { font-size: 18px; margin: 0; }
.topbar .spacer { flex: 1; }
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.btn { display: inline-block; border: none; border-radius: 8px; padding: 9px 18px; font-size: 14px; cursor: pointer; background: #2563eb; color: #fff; }
.btn:hover { background: #1d4ed8; }
.btn.gray { background: #6b7280; } .btn.gray:hover { background: #4b5563; }
.btn.red { background: #dc2626; } .btn.red:hover { background: #b91c1c; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=password], select { padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.st-uploaded { background: #e5e7eb; color: #374151; }
.st-queued  { background: #fef3c7; color: #92400e; }
.st-ocr     { background: #dbeafe; color: #1e40af; }
.st-grading { background: #ede9fe; color: #5b21b6; }
.st-done    { background: #dcfce7; color: #166534; }
.st-failed  { background: #fee2e2; color: #991b1b; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pagecard { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; cursor: pointer; }
.pagecard:hover { border-color: #2563eb; }
.pagecard img { width: 100%; height: 150px; object-fit: cover; display: block; background: #eee; }
.pagecard .meta { padding: 8px 10px; font-size: 12px; }
.pagecard .meta .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px; }
.dropzone { border: 2px dashed #cbd5e1; border-radius: 10px; padding: 30px; text-align: center; color: #64748b; cursor: pointer; }
.dropzone.drag { border-color: #2563eb; background: #eff6ff; }
.muted { color: #6b7280; font-size: 13px; }
.projcard { display: flex; align-items: center; gap: 14px; }
.projcard .name { font-size: 16px; font-weight: 600; }
.split { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.imgcol { flex: 1 1 480px; position: sticky; top: 70px; }
.imgwrap { position: relative; display: inline-block; width: 100%; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.imgwrap img { width: 100%; display: block; }
.box { position: absolute; border: 2.5px solid; border-radius: 4px; cursor: pointer; }
.box.wrong { border-color: #dc2626; background: rgba(220, 38, 38, .12); }
.box.cross_out { border-style: dashed; border-color: #6b7280; background: rgba(107, 114, 128, .10); }
.box.note { border-color: #2563eb; background: rgba(37, 99, 235, .10); }
.box.hl { box-shadow: 0 0 0 3px rgba(250, 204, 21, .95); z-index: 5; }
.rescol { flex: 1 1 360px; }
.prob { border: 1px solid #e5e7eb; border-left: 5px solid; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: #fff; cursor: pointer; }
.prob:hover { background: #fafafa; }
.prob.correct { border-left-color: #16a34a; }
.prob.wrong   { border-left-color: #dc2626; }
.prob.partial { border-left-color: #d97706; }
.prob.blank   { border-left-color: #9ca3af; }
.prob.hl { background: #fefce8; }
.chip { font-size: 12px; padding: 1px 8px; border-radius: 999px; color: #fff; margin-right: 8px; }
.chip.correct { background: #16a34a; } .chip.wrong { background: #dc2626; }
.chip.partial { background: #d97706; } .chip.blank { background: #9ca3af; }
pre.ocr { white-space: pre-wrap; background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 8px; font-size: 12px; max-height: 60vh; overflow: auto; }
.statusline { font-size: 13px; color: #6b7280; }
