.diff-panel,
.draft-panel {
  margin-top: 30px;
  padding: 20px;
  border: 1px solid #e0e3e8;
  border-radius: 15px;
  background: #fff;
}
.diff-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.diff-panel-head h2,
.draft-panel h2 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: -.5px;
}
.diff-stats,
.review-item-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.diff-added,
.diff-removed,
.diff-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.diff-added,
.diff-mini.added {
  background: #eaf7ee;
  color: #27683a;
}
.diff-removed,
.diff-mini.removed {
  background: #fbeceb;
  color: #8b4038;
}
.metadata-diff {
  display: grid;
  gap: 9px;
  margin: 18px 0;
}
.metadata-change {
  padding: 12px 14px;
  border: 1px solid #e4e6ea;
  border-radius: 11px;
  background: #fafbfc;
}
.metadata-change > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}
.metadata-change > div {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  padding: 3px 0;
  color: #555c66;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.diff-prefix { font-weight: 900; }
.diff-prefix.added { color: #287044; }
.diff-prefix.removed { color: #9a443b; }
.diff-section { margin-top: 20px; }
.diff-section h3,
.diff-panel > h3 {
  margin: 0 0 9px;
  font-size: 14px;
}
.diff-lines {
  overflow: hidden;
  border: 1px solid #dfe2e7;
  border-radius: 11px;
  background: #fafbfc;
}
.diff-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 27px;
  border-bottom: 1px solid #eceef1;
}
.diff-row:last-child { border-bottom: 0; }
.diff-row .diff-sign {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9298a1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  user-select: none;
}
.diff-row code {
  padding: 5px 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #474d56;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}
.diff-row.added { background: #eef9f1; }
.diff-row.added .diff-sign { color: #26703f; }
.diff-row.removed { background: #fff0ef; }
.diff-row.removed .diff-sign { color: #95443c; }
.diff-row.same { background: #fbfcfd; }
.diff-empty {
  padding: 12px 14px;
  border: 1px dashed #dfe2e7;
  border-radius: 10px;
  color: #8a9099;
  font-size: 12px;
}
.revision-review-actions {
  margin-top: 16px;
  justify-content: flex-start;
}
.revision-diff { margin-bottom: 30px; }

.conflict-page > h1 {
  max-width: 720px;
  margin-bottom: 10px;
}
.conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.draft-panel {
  background: #fafbfc;
}
.draft-field { margin-top: 14px; }
.draft-field > strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}
.draft-field pre {
  max-height: 360px;
  margin: 0;
  padding: 12px 13px;
  overflow: auto;
  border: 1px solid #e0e3e8;
  border-radius: 10px;
  background: #fff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  user-select: text;
}

@media (max-width: 760px) {
  .diff-panel,
  .draft-panel { padding: 15px; }
  .diff-panel-head { display: grid; }
  .diff-row { grid-template-columns: 24px minmax(0, 1fr); }
  .diff-row code { padding-left: 7px; padding-right: 7px; }
  .conflict-actions { display: grid; }
}
