.image-job-history {
  width: min(780px, calc(100vw - 24px));
  max-height: 85dvh;
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid var(--gpt-line, rgba(128, 128, 128, 0.25));
  border-radius: 20px;
  color: var(--gpt-ink, #202124);
  background: var(--gpt-surface, var(--gpt-bg, #fff));
  box-shadow: var(--gpt-shadow-menu, 0 20px 56px rgba(0, 0, 0, 0.22));
  overflow-y: auto;
}
.image-job-history::backdrop { background: rgba(0, 0, 0, 0.56); backdrop-filter: blur(4px); }
.image-job-history header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.image-job-history h3 { margin: 0; font-size: 18px; font-weight: 600; }
.image-job-history p { font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; margin: 8px 0; color: var(--gpt-muted, #5f6368); }
.image-job-history-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.image-job-history-controls label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gpt-ink, #202124); }
.image-job-history select, .image-job-history input, .image-job-history button, .image-job-history a.image-job-history-action {
  font: inherit; font-size: 14px; padding: 8px 12px; border: 1px solid var(--gpt-line, rgba(128, 128, 128, 0.25));
  border-radius: 10px; color: var(--gpt-ink, #202124); background: var(--gpt-chip, #f5f5f5); min-height: 40px;
  transition: background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}
.image-job-history select option { background: var(--gpt-surface, #fff); color: var(--gpt-ink, #202124); }
.image-job-history input { width: 100%; box-sizing: border-box; }
.image-job-history button { cursor: pointer; }
.image-job-history button:hover:not(:disabled),
.image-job-history a.image-job-history-action:hover { background: var(--gpt-hover, #eaeaea); }
.image-job-history [data-history-query] {
  background: var(--gpt-ink, #0d0d0d);
  color: var(--gpt-on-ink, #fff);
  border-color: var(--gpt-ink, #0d0d0d);
  font-weight: 600;
}
.image-job-history [data-history-query]:hover:not(:disabled) {
  background: var(--gpt-ink-hover, #2b2b2b);
}
.image-job-history button:disabled { opacity: .5; cursor: wait; }
.image-job-history-id-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.image-job-history-id-row p { margin: 4px 0; }
.image-job-history-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.image-job-history button.image-job-history-action,
.image-job-history a.image-job-history-action {
  min-height: 30px; padding: 4px 10px; font-size: 12px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center;
}
.image-job-history-item {
  border-top: 1px solid var(--gpt-line, rgba(128, 128, 128, 0.2));
  padding: 16px 0;
}
.image-job-history-item h4 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; font-size: 15px; overflow-wrap: anywhere; }
.image-job-history-item strong { font-size: 14px; color: var(--danger, #b42318); }
.history-status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 650; background: var(--gpt-chip, #f2f2f2); color: var(--gpt-ink, #202124);
}
.history-status-pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.history-status-pill.is-succeeded { color: #0c6b47; background: rgba(15, 127, 84, 0.12); }
.history-status-pill.is-running { color: #0369a1; background: rgba(2, 132, 199, 0.12); }
.history-status-pill.is-queued { color: #9a3412; background: rgba(217, 119, 6, 0.14); }
.history-status-pill.is-failed { color: #b42318; background: rgba(180, 35, 24, 0.12); }
:root[data-resolved-theme="dark"] .history-status-pill.is-succeeded { color: #34c79a; background: rgba(52, 199, 154, 0.16); }
:root[data-resolved-theme="dark"] .history-status-pill.is-running { color: #56b6ff; background: rgba(86, 182, 255, 0.16); }
:root[data-resolved-theme="dark"] .history-status-pill.is-queued { color: #fbbf24; background: rgba(251, 191, 36, 0.16); }
:root[data-resolved-theme="dark"] .history-status-pill.is-failed { color: #ff948c; background: rgba(255, 123, 114, 0.16); }
.image-job-history-thumb-wrap { display: inline-flex; align-items: flex-end; gap: 8px; margin: 8px 0; }
.image-job-history-thumb {
  display: block;
  max-width: 112px;
  max-height: 112px;
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--gpt-line, rgba(128, 128, 128, 0.2));
  object-fit: cover;
  background: var(--gpt-chip, #f5f5f5);
}
.image-job-history-thumb-count {
  font-size: 12px; font-weight: 600; color: var(--gpt-muted, #666); padding: 2px 8px;
  border-radius: 999px; background: var(--gpt-chip, #f2f2f2);
}
.image-job-history-load-more {
  display: flex;
  justify-content: center;
  padding: 14px 0 4px;
  border-top: 1px solid var(--gpt-line, rgba(128, 128, 128, 0.2));
}
.image-job-history :focus-visible { outline: 2px solid #2684ff; outline-offset: 2px; }
@media (max-width: 860px), (pointer: coarse) {
  .image-job-history button.image-job-history-action,
  .image-job-history a.image-job-history-action {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 13px;
    justify-content: center;
  }
}
@media (max-width: 540px) {
  .image-job-history { padding: 16px; }
  .image-job-history select, .image-job-history input { font-size: 16px; }
}
