:root {
  --ink: #2d3142;
  --muted: #778294;
  --line: #dce7ee;
  --paper: #f5f9fb;
  --teal: #007d80;
  --blue: #2f7bb7;
  --warn: #b76a16;
  --danger: #b44141;
  --ok: #117a59;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.review-topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
}

.review-topbar p,
.review-topbar h1,
.section-heading p,
.section-heading h2,
.muted {
  margin: 0;
}

.review-topbar p,
.section-heading p {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.review-topbar h1,
.section-heading h2 {
  color: var(--ink);
  font-size: 24px;
}

.review-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
  padding: 18px;
}

.review-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(45, 49, 66, 0.08);
}

.wide-panel {
  grid-column: 1 / -1;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--teal);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.category-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.category-chip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  font-weight: 800;
}

.category-chip.missing {
  color: var(--danger);
  background: #fff7f7;
}

.category-chip.duplicate {
  color: var(--warn);
  background: #fff9f0;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.review-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.review-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #eef6f7;
}

.meta-row,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf6f6;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.badge.review {
  background: #fff2df;
  color: var(--warn);
}

.badge.ok {
  background: #e8f7f1;
  color: var(--ok);
}

.muted,
.reasoning {
  color: var(--muted);
  font-weight: 650;
}

.reasoning {
  font-size: 13px;
  line-height: 1.4;
}

.approve-row {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
}

.approve-row input {
  width: auto;
  min-height: 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

@media (max-width: 920px) {
  .review-topbar,
  .review-shell,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
