.history-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 15px; }
.history-filters label { display: grid; gap: 4px; min-width: 116px; color: var(--muted); font-size: 13px; }
.history-filters select, .history-filters input { min-width: 0; min-height: 38px; padding: 0 10px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.history-filters select { max-width: min(330px, 72vw); }
.history-admin-filters { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.history-admin-filters input { width: min(235px, 70vw); }
.history-pager { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 15px; }
.chat-history-pager { justify-content: center; margin: 0 0 8px; }
.history-focus { padding: 12px; margin-bottom: 10px; border: 1px solid #dacdf1; border-radius: 14px; background: #f5f0fc; }
.history-focus h2 { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.run-image-progress { width: min(228px,100%); height: 8px; margin: 5px 0; accent-color: var(--violet); }
.history-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.history-metrics > div, .history-metric, .history-model { background: white; border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
.history-metric:hover, .history-metric.active { border-color: var(--violet); }
.history-metric[aria-current="page"] span { text-decoration: underline; text-underline-offset: .2em; }
.history-metric small { display: block; margin-top: 5px; color: var(--muted); }
.history-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.history-metrics span { color: var(--muted); display: block; }
.history-metrics strong { display: block; margin-top: 5px; color: var(--deep-violet); font-size: 24px; }
.history-models { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.history-model h3 { font-size: 15px; margin: 0 0 9px; overflow-wrap: anywhere; }
.history-model dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.history-model dt, .history-hint, .history-admin-row p { color: var(--muted); font-size: 12px; }
.history-model dd { margin-top: 3px; font-weight: 670; }
.history-model p, .history-hint { margin: 5px 0 9px; }
.history-video-readiness .history-model dl { grid-template-columns: repeat(2, minmax(0,1fr)); }
.history-video-readiness code { overflow-wrap: anywhere; }
.history-admin-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 7px; }
.history-admin-row p { margin-top: 4px; }
.history-page dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 660px) {
  .history-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .history-models { grid-template-columns: minmax(0,1fr); }
  .history-filters label { flex: 1 1 125px; }
  .history-filters input, .history-filters select { width: 100%; max-width: 100%; }
}
