.preview-history-admin {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
  color: #111827;
}

.preview-history-admin-bar,
.preview-history-admin-filters,
.preview-history-admin-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-history-admin-bar h5,
.preview-history-admin-detail h6,
.preview-history-admin-unlinked h6 {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.preview-history-admin-bar p,
.preview-history-admin-note {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}

.preview-history-admin-toggle,
.preview-history-admin-filters button,
.preview-history-admin-pager button,
.preview-history-admin-detail button {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 7px 10px;
  cursor: pointer;
}

.preview-history-admin-toggle {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.preview-history-admin-body {
  margin-top: 10px;
}

.preview-history-admin-filters {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.preview-history-admin-filters label {
  display: grid;
  gap: 4px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 650;
}

.preview-history-admin-filters select,
.preview-history-admin-filters input {
  min-width: 0;
  width: 148px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 12px;
  padding: 7px 8px;
}

.preview-history-admin-status {
  min-height: 18px;
  margin: 0 0 8px;
  color: #4b5563;
  font-size: 12px;
}

.preview-history-admin-status.is-error {
  color: #111827;
  font-weight: 700;
}

.preview-history-admin-list,
.preview-history-admin-unlinked-list {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.preview-history-admin-unlinked-list {
  max-height: 220px;
}

.preview-history-admin table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.4;
}

.preview-history-admin th,
.preview-history-admin td {
  padding: 7px 8px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.preview-history-admin th {
  position: sticky;
  top: 0;
  background: #fafafa;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}

.preview-history-admin td.is-wrap {
  white-space: normal;
  min-width: 140px;
  max-width: 240px;
}

.preview-history-admin tr.is-selected td {
  background: #f3f4f6;
}

.preview-history-admin-pager {
  justify-content: flex-start;
  margin: 8px 0;
  color: #6b7280;
  font-size: 12px;
}

.preview-history-admin-pager button:disabled {
  color: #9ca3af;
  cursor: default;
}

.preview-history-admin-detail,
.preview-history-admin-unlinked {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
}

.preview-history-admin-report {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #111827;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.preview-history-admin .is-muted {
  color: #6b7280;
}

.preview-history-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.preview-history-admin button:disabled,
.preview-history-admin-dialog button:disabled {
  color: #9ca3af;
  cursor: default;
}

.preview-history-admin-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.45);
  padding: 16px;
}

.preview-history-admin-modal[hidden] {
  display: none;
}

.preview-history-admin-dialog {
  width: min(520px, 100%);
  padding: 14px;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.18);
}

.preview-history-admin-dialog h6 {
  margin: 0 0 8px;
  font-size: 14px;
}

.preview-history-admin-confirm-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 10px 0;
  color: #111827;
  font-size: 12px;
  line-height: 1.45;
}

.preview-history-admin-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.preview-history-admin-dialog-actions button {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 7px 10px;
  cursor: pointer;
}
