:root {
  color-scheme: light;
  --ink: #1f2421;
  --muted: #68706b;
  --line: #dfe3e0;
  --surface: #ffffff;
  --canvas: #f5f7f5;
  --red: #b62b35;
  --red-dark: #91202a;
  --green: #237a57;
  --amber: #a86612;
  --soft-green: #eaf5ef;
  --soft-amber: #fff4df;
  --soft-red: #fbecef;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Microsoft YaHei", "Segoe UI", sans-serif; font-size: 14px; letter-spacing: 0; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button, .button-link { cursor: pointer; }
.topbar { height: 64px; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; background: var(--red); color: white; display: grid; place-items: center; border-radius: 6px; font-weight: 700; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { color: var(--muted); margin-top: 2px; font-size: 11px; }
nav { height: 100%; display: flex; gap: 24px; }
.nav-button { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 2px 2px 0; }
.nav-button.active { border-bottom-color: var(--red); color: var(--ink); font-weight: 700; }
.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 9px; background: #ecefed; font-size: 11px; }
main { max-width: 1280px; margin: 0 auto; padding: 32px 28px 56px; }
.view { display: none; }
.view.active { display: block; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: 25px; line-height: 1.3; }
h2 { margin-bottom: 6px; font-size: 16px; }
.page-heading p, .recent-band p, .empty-state p { color: var(--muted); margin-bottom: 0; }
.task-panel, .settings-form { background: var(--surface); border: 1px solid var(--line); padding: 24px; border-radius: 8px; }
.form-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; gap: 18px; align-items: end; }
label { display: grid; gap: 8px; color: #464c48; font-weight: 600; }
input, textarea { width: 100%; border: 1px solid #cbd1cd; background: white; color: var(--ink); padding: 10px 12px; border-radius: 5px; outline: none; }
input { height: 42px; }
input:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(182,43,53,.1); }
textarea { resize: vertical; line-height: 1.6; }
button, .button-link { border: 1px solid transparent; min-height: 40px; padding: 9px 16px; border-radius: 5px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--red); color: white; border-color: var(--red); }
.primary:hover:not(:disabled) { background: var(--red-dark); }
.secondary { color: var(--ink); background: white; border-color: #cbd1cd; }
.secondary:hover:not(:disabled) { background: #f4f6f4; }
.action-button { height: 42px; min-width: 132px; }
.button-icon { font-size: 11px; }
.state-pill { padding: 7px 11px; border-radius: 14px; font-size: 12px; background: var(--soft-green); color: var(--green); }
.state-pill.muted { color: var(--muted); background: #ecefed; }
.state-pill.warning { color: var(--amber); background: var(--soft-amber); }
.job-box { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.job-box.hidden { display: none; }
.job-line { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.job-line span { color: var(--muted); }
.progress { height: 7px; overflow: hidden; background: #e7ebe8; border-radius: 4px; }
.progress div { width: 0; height: 100%; background: var(--red); transition: width .25s; }
.progress div.indeterminate { width: 35%; animation: loading 1.2s ease-in-out infinite; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0; }
.summary { background: white; border: 1px solid var(--line); border-left: 4px solid #8a928d; border-radius: 6px; padding: 18px 20px; }
.summary.good { border-left-color: var(--green); }
.summary.warning { border-left-color: var(--amber); }
.summary span { display: block; color: var(--muted); margin-bottom: 10px; }
.summary strong { font-size: 28px; }
.recent-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border: 1px solid var(--line); background: white; }
.heading-actions { display: flex; gap: 10px; }
.filterbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 18px 0; }
.selectionbar { min-height: 56px; margin: 18px 0 0; padding: 9px 12px; display: flex; align-items: center; gap: 16px; background: white; border: 1px solid var(--line); border-left: 4px solid var(--red); }
.selectionbar > span { color: var(--muted); margin-left: auto; }
.inline-check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.inline-check input { width: 17px; height: 17px; }
.segmented { display: inline-flex; border: 1px solid #cbd1cd; border-radius: 5px; overflow: hidden; background: white; }
.segmented button { min-height: 36px; border: 0; border-right: 1px solid #dfe3e0; border-radius: 0; background: white; padding: 7px 13px; color: var(--muted); }
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: #333a36; color: white; }
.filterbar input { max-width: 300px; height: 38px; }
.result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.result-card { background: white; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; min-width: 0; }
.result-card.record-selected { border-color: var(--red); box-shadow: 0 0 0 2px rgba(182,43,53,.12); }
.image-wrap { aspect-ratio: 4 / 3; background: #e8ebe9; position: relative; overflow: hidden; cursor: zoom-in; }
.image-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }
.image-state { position: absolute; top: 9px; left: 9px; padding: 5px 8px; border-radius: 4px; font-weight: 700; font-size: 12px; background: rgba(255,255,255,.92); }
.image-state.watermarked { color: var(--green); }
.image-state.missing, .image-state.error { color: #a72a33; }
.record-select { position: absolute; right: 9px; bottom: 9px; display: flex; grid-template-columns: none; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 4px; background: rgba(255,255,255,.94); color: var(--ink); font-size: 11px; cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,.16); }
.record-select input { width: 15px; height: 15px; }
.card-body { padding: 13px; }
.card-title { font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-bottom: 6px; }
.card-meta { color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-actions { display: flex; gap: 7px; margin-top: 12px; }
.card-actions button { flex: 1; min-height: 32px; padding: 5px 7px; font-size: 12px; }
.card-actions .selected-good { color: var(--green); border-color: var(--green); background: var(--soft-green); }
.card-actions .selected-bad { color: #a72a33; border-color: #c84a54; background: var(--soft-red); }
.empty-state { padding: 70px 20px; text-align: center; border: 1px dashed #c7cdc9; background: rgba(255,255,255,.6); }
.empty-state strong { display: block; font-size: 17px; margin-bottom: 8px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.icon-button { width: 38px; min-height: 38px; padding: 0; border-color: #cbd1cd; background: white; font-size: 24px; }
.page-jump { display: flex; align-items: center; gap: 8px; margin-left: 8px; color: var(--muted); }
.page-jump label { display: inline; font-weight: 400; color: inherit; }
.page-jump input { width: 76px; height: 38px; padding: 7px 9px; text-align: center; }
.page-jump button { min-height: 38px; padding: 7px 14px; }
.settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; }
.operation-job { margin: 0 0 20px; padding: 18px 20px; border: 1px solid var(--line); background: white; }
.operation-summary { grid-template-columns: repeat(4, 1fr); }
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); }
.operation-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.operation-table th, .operation-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.operation-table .select-column { width: 58px; text-align: center; }
.operation-table .select-column input { width: 17px; height: 17px; }
.operation-table th { color: var(--muted); background: #f7f8f7; font-size: 12px; }
.operation-table td small { display: block; color: var(--muted); margin-top: 3px; }
.operation-state { display: inline-block; padding: 4px 7px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.operation-state.success { color: var(--green); background: var(--soft-green); }
.operation-state.failed { color: #a72a33; background: var(--soft-red); }
.operation-state.running { color: var(--amber); background: var(--soft-amber); }
.operation-state.skipped { color: var(--muted); background: #eef0ee; }
.mono-cell { font-family: Consolas, monospace; }
.message-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-entry { min-height: 30px; padding: 4px 9px; margin-left: 8px; border-color: #c58b20; background: #fff8e8; color: #81570b; }
.review-entry:hover { background: #ffefc7; }
.review-reason { margin-top: 8px; padding: 7px 9px; border-left: 3px solid var(--amber); background: var(--soft-amber); color: #6f4c0d; font-size: 12px; line-height: 1.45; }
.table-empty { padding: 50px !important; text-align: center !important; color: var(--muted); }
.settings-form .wide { grid-column: 1 / -1; }
.field-hint { color: var(--muted); font-size: 12px; font-weight: 400; }
.toggle-label { display: flex; align-items: center; gap: 9px; align-self: end; height: 42px; }
.toggle-label input { width: 17px; height: 17px; }
details { border-top: 1px solid var(--line); padding-top: 16px; }
summary { cursor: pointer; font-weight: 700; margin-bottom: 14px; }
.form-actions { display: flex; align-items: center; gap: 13px; }
#saveMessage { color: var(--green); }
dialog { width: min(1020px, calc(100vw - 40px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 8px; box-shadow: 0 22px 70px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(26,30,27,.72); }
.dialog-close { position: absolute; right: 12px; top: 12px; width: 38px; min-height: 38px; padding: 0; z-index: 2; color: white; background: rgba(0,0,0,.65); font-size: 24px; }
.dialog-image { display: block; width: 100%; max-height: calc(100vh - 170px); object-fit: contain; background: #171a18; }
.dialog-details { padding: 16px 20px; display: flex; justify-content: space-between; gap: 20px; }
.dialog-details p { margin: 4px 0 0; color: var(--muted); }
#toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; padding: 12px 16px; border-radius: 5px; background: #242925; color: white; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; z-index: 50; }
#toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) { .result-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .summary-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px) { .topbar { height: auto; padding: 12px 16px 0; display: block; } nav { height: 48px; justify-content: flex-start; gap: 16px; margin-top: 6px; overflow-x: auto; } .nav-button { white-space: nowrap; } main { padding: 22px 14px 40px; } .page-heading, .filterbar { display: block; } .heading-actions { margin-top: 16px; } .form-row, .settings-form { grid-template-columns: 1fr; } .settings-form .wide { grid-column: auto; } .summary-grid { grid-template-columns: 1fr 1fr; } .result-grid { grid-template-columns: 1fr; } .segmented { width: 100%; overflow-x: auto; } .segmented button { flex: 1; white-space: nowrap; } .filterbar input { max-width: none; margin-top: 12px; } .recent-band { align-items: flex-start; } .selectionbar { align-items: stretch; flex-direction: column; } .selectionbar > span { margin-left: 0; } }
