/* Product archive and manual state controls share the existing workbench palette. */
.topbar-inner, .main { max-width: 1480px; }
h1, h2, h3, .page-heading > div, .action-group { overflow-wrap: anywhere; min-width: 0; }
.catalog-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
  background: #fff;
  padding: 18px 0;
  border-top: 1px solid #d9dee7;
  border-bottom: 1px solid #d9dee7;
}
.catalog-filters label, .status-toolbar label { font-size: 12px; color: #475467; }
input[type="search"] {
  width: 100%; border: 1px solid #cfd6e0; border-radius: 5px;
  padding: 9px 10px; color: #1f2933; background: #fff; font: inherit;
}
.filter-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.status-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid #d9dee7;
}
.status-toolbar select { min-width: 120px; }
.status-toolbar button { align-self: center; }
.status-feedback { overflow-wrap: anywhere; color: #19714a; }
.status-feedback.failed { color: #a32920; }
.catalog-table-wrap { background: #fff; }
#product-table { min-width: 900px; table-layout: fixed; }
#product-table th, #product-table td { padding: 12px 8px; overflow-wrap: anywhere; }
.catalog-select-col { width: 34px; }
.catalog-thumb-col { width: 80px; }
.catalog-context-col { width: 20%; }
.catalog-progress-col { width: 225px; }
.catalog-manual-col { width: 150px; }
.catalog-context { line-height: 1.8; }
.catalog-material-state { margin: 6px 0; font-size: 14px; color: #536676; }
.catalog-manual-state > div { margin-bottom: 8px; }
.product-thumb {
  width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #e4e7ec; border-radius: 4px; background: #fafafa;
  color: #667085; font-size: 12px; text-align: center;
}
.product-thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-code { color: #475467; font-size: 13px; overflow-wrap: anywhere; }
.product-name { display: inline-block; margin: 3px 0; }
.internal-id { color: #667085; font-size: 11px; overflow-wrap: anywhere; }
.status-time { color: #667085; font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
.manual-value { font-size: 13px; font-weight: 600; }
.updated-flag { color: #a15b12; font-size: 12px; }
.generation-cell { color: #667085; font-size: 12px; }
.archive-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid #d9dee7; }
.archive-nav a { padding: 4px 0; font-weight: 600; }
.archive-section { border-bottom: 1px solid #d9dee7; padding: 24px 0; scroll-margin-top: 16px; }
.archive-section > h2 { margin-bottom: 18px; }
.archive-section h3 { margin: 20px 0 8px; }
.archive-body { background: #fff; padding: 0 24px 24px; }
.archive-empty { color: #667085; padding: 12px 0; }
.archive-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.archive-entry { padding: 12px 0; border-bottom: 1px solid #edf0f4; }
.archive-entry:last-child { border-bottom: 0; }
.archive-copy-blocks { display: grid; gap: 10px; margin: 12px 0; }
.archive-copy-block { border: 1px solid #dce2e8; border-radius: 6px; padding: 10px; background: #fbfcfe; }
.archive-copy-block > div:first-child { display: flex; justify-content: space-between; gap: 10px; }
.archive-copy-block .archive-text { margin: 7px 0; }
.parameter-values { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.parameter-values dt { font-size: 12px; color: #667085; }
.parameter-values dd { margin: 4px 0; overflow-wrap: anywhere; }
.version-list, .event-list { padding-left: 22px; }
.version-list li, .event-list li { padding: 8px 0; overflow-wrap: anywhere; }
.image-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 16px; }
.archive-image { min-width: 0; color: #475467; font-size: 12px; overflow-wrap: anywhere; }
.archive-image img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #fafafa; border: 1px solid #e4e7ec; }
.historical-state { color: #865110; padding: 12px 0; }
@media (max-width: 760px) {
  .catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: 1 / -1; }
  .status-toolbar { gap: 12px; }
  .status-toolbar > div { flex: 1 1 130px; min-width: 0; }
  .status-feedback { flex-basis: 100%; }
  .archive-body { padding: 0 12px 20px; }
  .parameter-values { grid-template-columns: 1fr; }
  .action-group { flex-wrap: wrap; }
  .filter-actions .button { padding: 7px 9px; }
}
