:root {
  --bg: #f2efe7;
  --card: #ffffff;
  --ink: #173d37;
  --accent: #0f766e;
  --muted: #63766f;
  --line: #d6e0db;
  --good: #15803d;
  --bad: #b91c1c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, #fff8dc 0%, var(--bg) 55%);
}
.container { max-width: 1400px; margin: 20px auto; padding: 0 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.mt { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar { margin-bottom: 10px; }
.grow { flex: 1; min-width: 240px; }
input, select, button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  font: inherit;
}
button { background: var(--accent); color: #fff; border-color: var(--accent); cursor: pointer; }
button.secondary { background: #fff; color: var(--ink); }
button.good { background: var(--good); border-color: var(--good); }
button.bad { background: var(--bad); border-color: var(--bad); }
button.mini { padding: 5px 8px; font-size: 12px; }
.hidden { display: none !important; }
h1 { margin: 0 0 4px; font-size: 27px; }
small, .hint { color: var(--muted); }
.hint { font-size: 12px; margin: 8px 0; }

table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { border: 1px solid var(--line); padding: 6px; vertical-align: top; }
th { background: #f2f8f6; position: sticky; top: 0; z-index: 1; }
.table-wrap { max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
tr.selected { background: #e8f8f1; }
.cell-input {
  width: 100%;
  border: 1px solid #e8f1ed;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
}
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.thumb-wrap { width: 72px; text-align: center; }
.thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: zoom-in;
  background: #f8f8f8;
}
.tag { font-size: 10px; color: #fff; border-radius: 999px; padding: 2px 6px; display: inline-block; margin-top: 3px; }
.tag.orig { background: #0f766e; }
.tag.edit { background: #1d4ed8; }
.approve-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.status { font-weight: 700; font-size: 11px; }
.status.pending { color: #9a6b00; }
.status.approved { color: var(--good); }
.status.rejected { color: var(--bad); }
.edited-link {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.log {
  white-space: pre-wrap;
  background: #0f172a;
  color: #d1fae5;
  padding: 12px;
  border-radius: 10px;
  min-height: 70px;
  font-family: Consolas, monospace;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-inner {
  position: relative;
  max-width: 94vw;
  max-height: 92vh;
}
.modal img {
  max-width: 94vw;
  max-height: 92vh;
  border-radius: 12px;
}
.modal-close {
  position: absolute;
  top: -10px;
  right: -10px;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: #111827;
  border-color: #111827;
}

@media (max-width: 820px) {
  th, td { min-width: 130px; }
}
