:root {
  color-scheme: light;
  --bg: #ebe7e0;
  --panel: #f8f6f1;
  --panel-strong: #fffdf9;
  --line: #d8d0c5;
  --line-strong: #b8ae9f;
  --text: #2f2a23;
  --muted: #70675d;
  --accent: #705746;
  --shadow: 0 18px 36px rgba(54, 44, 32, 0.08);
  --thumb-width: 128px;
  --file-width: 260px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Helvetica Neue", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, #f2eee8 0%, #e7e1d7 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.workspace {
  width: calc(100vw - 24px);
  margin: 12px auto;
}

.topbar,
.table-shell,
.preview-modal {
  background: rgba(248, 246, 241, 0.96);
  border: 1px solid rgba(184, 174, 159, 0.66);
  box-shadow: var(--shadow);
}

.topbar {
  padding: 12px 16px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.titleblock h1 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.statline {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.save-button,
.ghost-button,
.thumb-button {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.primary-button,
.save-button {
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #fffaf7;
  font-weight: 600;
}

.table-shell {
  margin-top: 10px;
  border-radius: 18px;
  overflow: hidden;
}

.table-scroll {
  overflow: auto;
  max-height: calc(100vh - 170px);
}

.review-table {
  width: 100%;
  min-width: 2450px;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 10px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #ece6dc;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.filter-row th {
  top: 42px;
  z-index: 30;
  padding: 8px 10px 10px;
  background: #f1ece4;
}

.filter-row input,
.filter-row select,
tbody input,
tbody select,
tbody textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
}

.filter-row input,
.filter-row select {
  height: 34px;
  padding: 7px 10px;
}

tbody td {
  padding: 10px;
  vertical-align: top;
  background: rgba(255, 253, 249, 0.94);
  border-bottom: 1px solid var(--line);
}

tbody tr:nth-child(even) td {
  background: rgba(245, 242, 236, 0.96);
}

.data-row.is-dirty td {
  background: #fff5dd;
}

.sticky-col {
  position: sticky;
  z-index: 10;
}

.sticky-thumb {
  left: 0;
  min-width: var(--thumb-width);
  width: var(--thumb-width);
}

.sticky-file {
  left: var(--thumb-width);
  min-width: var(--file-width);
  width: var(--file-width);
}

thead .sticky-col {
  z-index: 40;
}

.thumb-button {
  display: block;
  padding: 0;
  background: transparent;
}

.thumb-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f4f0ea;
}

.file-main {
  font-weight: 700;
}

.file-sub,
.file-meta,
.hint,
.dirty-indicator {
  font-size: 12px;
  color: var(--muted);
}

.file-sub,
.file-meta {
  margin-top: 4px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

tbody input,
tbody select {
  min-height: 38px;
  padding: 8px 10px;
}

tbody textarea {
  min-height: 92px;
  padding: 8px 10px;
  resize: vertical;
}

.save-cell {
  display: grid;
  gap: 8px;
}

.preview-modal {
  width: min(88vw, 1320px);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
}

.preview-modal::backdrop {
  background: rgba(34, 28, 22, 0.45);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  padding: 16px;
  background: #fbfaf7;
}

.modal-body img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
