* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f4f5f7;
  margin: 0;
  color: #1f2430;
}
header {
  background: #1f2937;
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header a { color: #fff; text-decoration: none; font-weight: 600; }
header nav a { margin-left: 16px; color: #cbd5e1; font-weight: 400; }
main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 20px;
  margin-bottom: 20px;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #e5e7eb; }
th { color: #6b7280; font-size: 13px; text-transform: uppercase; }
tr:hover { background: #f9fafb; }
a.button, button {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}
button.secondary, a.button.secondary { background: #6b7280; }
button.danger { background: #dc2626; }
input[type=text], input[type=password], select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 4px;
}
label { font-size: 13px; color: #374151; font-weight: 600; display: block; margin-top: 12px; }
.error { color: #dc2626; margin-top: 10px; }
.status { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.status-uploaded, .status-processing { background: #fef3c7; color: #92400e; }
.status-ocr_done { background: #dbeafe; color: #1e40af; }
.status-reviewed { background: #dcfce7; color: #166534; }
.status-error { background: #fee2e2; color: #991b1b; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.review-grid .card { max-height: 80vh; overflow: auto; }
.field-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.field-source { font-size: 11px; color: #9ca3af; }
pre.ocr-text { white-space: pre-wrap; font-size: 13px; line-height: 1.5; }
img.doc-preview, iframe.doc-preview { width: 100%; border: 1px solid #e5e7eb; border-radius: 6px; }
.login-box { max-width: 360px; margin: 80px auto; }
