* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #1f2329; background: #f5f6f7; }
a { color: #1664ff; text-decoration: none; }
a:hover { text-decoration: underline; }
button, .button { font: inherit; padding: 4px 12px; border: 1px solid #c9cdd4; border-radius: 4px; background: #fff; color: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
input[type="text"], select { font: inherit; padding: 3px 6px; border: 1px solid #c9cdd4; border-radius: 4px; }
.topbar { display: flex; align-items: center; gap: 16px; height: 48px; padding: 0 20px; background: #fff; border-bottom: 1px solid #e5e6eb; }
.topbar .brand { font-weight: 600; color: #1f2329; }
.topbar .job-name { font-weight: 600; }
main { padding: 20px; }
.card { background: #fff; border: 1px solid #e5e6eb; border-radius: 6px; padding: 16px; margin-bottom: 16px; }
#drop-zone { border: 2px dashed #c9cdd4; border-radius: 6px; padding: 24px; text-align: center; color: #646a73; cursor: pointer; }
#drop-zone.over { border-color: #1664ff; background: #f0f5ff; }
#file-name { color: #1f2329; }
.upload-options { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 12px; }
.error { color: #d83931; min-height: 1.5em; margin-top: 8px; }
.hint { margin: 0 0 12px; color: #646a73; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border: 1px solid #e5e6eb; padding: 4px 8px; text-align: left; vertical-align: top; }
th { background: #f7f8fa; font-weight: 600; }
td.empty, p.empty { color: #8f959e; }
.status.failed { color: #d83931; }
.status.partial { color: #b26a00; }
.status.queued, .status.running { color: #1664ff; }
.actions { display: flex; gap: 8px; align-items: center; }

/* 核对页 */
body.review-page main { padding: 0; height: calc(100vh - 48px); }
#review { display: grid; grid-template-columns: 140px 1fr 520px; height: 100%; }
#page-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; background: #fff; border-right: 1px solid #e5e6eb; }
#page-list li { display: flex; justify-content: space-between; gap: 4px; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
#page-list li:hover { background: #f2f3f5; }
#page-list li.current { background: #e8f0ff; }
#page-list li.failed small { color: #d83931; }
#page-list li.pending small { color: #8f959e; }
#viewer { position: relative; overflow: hidden; background: #dcdee2; cursor: grab; user-select: none; }
#viewer:active { cursor: grabbing; }
#stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#page-image { display: block; width: 100%; height: 100%; }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
#overlay .box { fill: rgba(22, 100, 255, .08); stroke: #1664ff; stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; }
#overlay .box.review { fill: rgba(255, 196, 0, .25); stroke: #e6a700; }
#overlay .box.active-field { fill: rgba(216, 57, 49, .2); stroke: #d83931; stroke-width: 3; }
#side { display: flex; flex-direction: column; min-width: 0; background: #fff; border-left: 1px solid #e5e6eb; }
#warnings .warning { margin: 8px 8px 0; padding: 6px 10px; background: #fff7e8; border: 1px solid #ffd591; border-radius: 4px; }
.side-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid #e5e6eb; }
#tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab.active { background: #1664ff; border-color: #1664ff; color: #fff; }
#panel { flex: 1; overflow: auto; padding: 8px; }
#panel h3 { margin: 12px 0 6px; font-size: 14px; }
#panel td[data-fid] { cursor: pointer; }
#panel td.review { background: #fff3c2; }
#panel td.active-field { outline: 2px solid #d83931; outline-offset: -2px; }
.message { padding: 24px; color: #646a73; }
