:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #202124;
  --muted: #667085;
  --line: #d9dee7;
  --primary: #111827;
  --primary-soft: #eef2ff;
  --danger: #b42318;
  --danger-bg: #fff3f3;
  --danger-line: #ffc9c9;
  --success: #027a48;
  --success-bg: #ecfdf3;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; }
a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #f2f4f7; border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; word-break: break-all; }
.topbar { position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { color: var(--primary); font-weight: 800; font-size: 18px; }
.topbar nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.container { width: min(1180px, 100%); margin: 0 auto; padding: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); margin-bottom: 16px; }
.narrow { max-width: 680px; margin: 40px auto; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: linear-gradient(135deg, #ffffff 0%, #f1f5ff 100%); }
h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.25; }
h2 { margin: 4px 0 12px; font-size: 22px; }
h3 { margin: 18px 0 8px; font-size: 17px; }
.lead { font-size: 17px; color: #344054; margin: 0; }
.eyebrow { margin: 0 0 6px; color: #1e3a8a; font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.muted { color: var(--muted); }
.hint { margin: -4px 0 4px; color: var(--muted); font-size: 13px; }
.notice { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 12px; padding: 12px 14px; margin: 14px 0 0; }
.form { display: grid; gap: 10px; max-width: 760px; }
.form.compact { max-width: 100%; }
label { font-weight: 700; margin-top: 8px; }
input, select, textarea, button, .button { font: inherit; border-radius: 10px; }
input, select, textarea { width: 100%; padding: 13px; border: 1px solid var(--line); background: #fff; }
input[type="file"] { padding: 10px; background: #f9fafb; }
button, .button { display: inline-block; border: 0; background: var(--primary); color: #fff; padding: 12px 16px; font-weight: 800; cursor: pointer; text-align: center; }
button:hover, .button:hover { opacity: 0.92; text-decoration: none; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.secondary, .button.secondary { background: var(--primary-soft); color: #1e3a8a; }
button.danger, .button.danger { background: var(--danger); }
.button.tiny { padding: 6px 10px; font-size: 13px; }
.photo-field { border: 1px solid var(--line); background: #fbfcfe; border-radius: 12px; padding: 12px; }
.photo-field.required { border-left: 5px solid #1d4ed8; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.steps li { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 14px; }
.steps strong { display: block; color: var(--primary); margin-bottom: 4px; }
.steps span { display: block; color: #344054; font-size: 14px; }
.steps.vertical { grid-template-columns: 1fr; }
.quick-guide { border-left: 6px solid #1d4ed8; }
.install-card { background: #f9fafb; }
.copy-url { word-break: break-all; }
.filters { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; margin: 18px 0; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.card { background: #f9fafb; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.card strong { display: block; font-size: 28px; line-height: 1.2; }
.card span { color: var(--muted); }
.admin-url-box { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 12px; padding: 14px; margin: 16px 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { background: #f9fafb; font-size: 13px; color: #344054; }
tr.flagged { background: #fff8f0; }
.status { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 12px; font-weight: 800; }
.status.approved { background: var(--success-bg); color: var(--success); }
.status.rejected { background: #fef3f2; color: var(--danger); }
.row-between { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.detail-box { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff; }
.danger-panel { background: var(--danger-bg); border-color: var(--danger-line); }
.danger-text { color: var(--danger); }
.success { border-left: 6px solid var(--success); }
dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 12px; }
dt { font-weight: 700; color: #344054; }
dd { margin: 0; }
.image-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
figcaption { padding: 10px; color: #344054; word-break: break-word; }
.inline-form { margin-bottom: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form button { padding: 8px 10px; font-size: 13px; }
.manual ul, .manual ol { padding-left: 1.3em; }
.manual li { margin: 6px 0; }
@media (max-width: 800px) {
  .hero { flex-direction: column; align-items: stretch; }
  .filters, .cards, .detail-grid, .image-grid, .steps, .admin-url-box { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .container { padding: 12px; }
  .panel { padding: 16px; border-radius: 12px; }
  h1 { font-size: 26px; }
}

.ocr-log {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow: auto;
  background: #111827;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 10px;
  font-size: 12px;
}
.soft-panel {
  background: #f8fafc;
}
