/* History is one filter card; all selectors follow the user's business sequence. */
#historyFilters{display:grid;gap:0;margin:0 0 22px}
.history-fields{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:end;gap:16px 12px}
.history-fields>label,.history-fields>.product-typeahead,.history-fields>.searchable-select{min-width:0;max-width:none}
.history-fields select,.history-fields input,.history-tools select,.history-search input{width:100%;height:42px}
.history-date-filter{grid-column:span 2;min-width:0;max-width:100%}
.history-date-range{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end;gap:8px;max-width:100%}
.history-date-range label{min-width:0}
.history-date-range input{width:100%;height:42px}
.date-separator{padding-bottom:13px;color:var(--muted)}
.history-tools{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));align-items:end;gap:14px;margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}
.history-kind,.history-translation{grid-column:span 1;min-width:0}
.history-search{grid-column:span 3;min-width:0}
.history-simulated{height:42px;white-space:nowrap;color:var(--muted);font-size:11px}
.history-actions{display:flex;grid-column:span 2;justify-content:flex-end;gap:8px;min-width:0}
.history-actions button{height:42px;border-radius:var(--radius-sm);white-space:nowrap}
.history-hint{font-size:11px;color:var(--muted);line-height:1.8;margin-top:14px}
.history-pending{font-size:11px;color:#83661b;line-height:1.8;margin-top:8px}
.history-results{padding-top:20px;border-top:1px solid var(--line)}
.history-table{min-width:1000px}
.history-table td{max-width:260px;overflow-wrap:anywhere}
.history-table .history-date-cell{white-space:nowrap}
.history-table .history-open{position:sticky;right:0;background:#fff;white-space:nowrap;box-shadow:-4px 0 8px #20294008}
.history-table th.history-open{background:#f8f9fc}
@media(max-width:1200px){
  .history-fields{grid-template-columns:repeat(4,minmax(0,1fr))}
  .history-tools{grid-template-columns:repeat(4,minmax(0,1fr))}
  .history-search{grid-column:span 2}
  .history-actions{grid-column:span 2}
}
@media(max-width:700px){
  .history-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
  .history-date-filter{grid-column:1/-1;width:100%}
  .history-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
  .history-search,.history-actions{grid-column:1/-1}
  .history-actions{width:100%;justify-content:stretch}
  .history-actions button{flex:1}
  .history-table{min-width:950px}
}
@media(max-width:420px){
  .history-fields,.history-tools{grid-template-columns:1fr}
  .history-date-filter,.history-search,.history-actions{grid-column:1}
  .history-date-range{grid-template-columns:1fr}
  .date-separator{display:none}
}
