.history-controls { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.history-controls label { display: grid; gap: 6px; min-width: 160px; font-weight: 600; font-size: 13px; }
.history-controls select, .history-controls input { width: 100%; min-height: 38px; }
.history-controls input { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); }
.history-controls .history-search { flex: 1; min-width: 200px; }
.history-controls .icon-button { flex: 0 0 38px; width: 38px; height: 38px; }
.history-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 18px; font-size: 12px; color: var(--muted, #59646d); }
[data-history-status] { font-size: 12px; min-height: 18px; color: var(--muted, #59646d); }
.history-table-wrap { max-height: 68vh; overflow: auto; border-block: 1px solid var(--line); }
.history-table { table-layout: fixed; width: 100%; min-width: 680px; }
.history-table th { position: sticky; top: 0; z-index: 1; background: var(--surface, #fff); }
.history-table th:nth-child(1) { width: 185px; }
.history-table th:nth-child(2) { width: 190px; }
.history-table th:nth-child(3) { width: 130px; }
.history-table td { vertical-align: top; overflow-wrap: anywhere; white-space: normal; }
.history-table td strong { display: block; font-size: 13px; }
.history-table td small { display: block; margin-top: 5px; color: var(--muted, #59646d); font-size: 12px; }
.history-table time { font-size: 12px; }
.history-empty { padding: 30px !important; text-align: center; }
.history-more { margin-top: 16px; }
#activity-history { min-width: 0; }
@media (max-width: 600px) {
  .history-controls label { min-width: 0; width: 100%; }
  .history-controls .history-search { min-width: 0; }
  .history-meta { display: grid; }
  .history-table { min-width: 0; }
  .history-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .history-table tbody { display: block; }
  .history-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .history-table td { border: 0; padding: 0; min-width: 0; }
  .history-table td:nth-child(1) { grid-column: 1; order: 0; }
  .history-table td:nth-child(3) { grid-column: 2; order: 1; font-size: 12px; text-align: right; }
  .history-table td:nth-child(2) { grid-column: 1 / -1; order: 2; }
  .history-table td:nth-child(4) { grid-column: 1 / -1; order: 3; }
  .history-table .history-empty { grid-column: 1 / -1; }
}
