.factory-view { max-width: 1400px; margin: 0 auto; padding: 28px; color: var(--ink); --factory-muted: #52665a; }
.factory-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 24px; }
.factory-heading h1 { margin: 0 0 8px; }
.factory-heading p, .factory-footnote, .factory-result, .factory-table small, .factory-file-meta { color: var(--factory-muted); }
.factory-heading p { margin: 0; line-height: 1.7; }
.factory-heading button { flex-shrink: 0; }
.factory-drop { display: flex; gap: 14px; align-items: center; justify-content: center; width: 100%; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--primary); cursor: pointer; }
.factory-drop:hover, .factory-drop.is-dragover { border-color: var(--primary); background: var(--primary-soft); }
.factory-drop small { display: block; color: var(--factory-muted); margin-top: 6px; }
.factory-search { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.factory-search input { width: min(300px, 100%); caret-color: var(--primary); }
.factory-search input::placeholder { color: var(--factory-muted); }
.factory-search input, .factory-pagination select { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 6px; padding: 10px 12px; font: inherit; }
.factory-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 10px; font-size: 13px; }
.factory-result p { margin: 0; }
.factory-table { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--surface); font-size: 13px; }
.factory-table th { text-align: left; color: var(--factory-muted); background: var(--surface-soft); font-weight: 500; }
.factory-table th, .factory-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.factory-table th:first-child { width: 36%; }
.factory-table th:nth-child(2) { width: 13%; }
.factory-table th:nth-child(3) { width: 16%; }
.factory-table th:nth-child(4) { width: 19%; }
.factory-table th:last-child { width: 16%; }
.factory-name { display: block; line-height: 1.6; }
.factory-table small { display: block; margin-top: 5px; line-height: 1.5; }
.factory-file-meta { display: flex; align-items: center; gap: 14px; margin-top: 6px; font-size: 12px; }
.factory-downloaded, .factory-urgent { color: #a33831; font-weight: 600; }
.factory-name-downloaded { color: #a33831; }
.factory-downloaded { display: inline-flex; align-items: center; gap: 4px; background: var(--danger-soft); padding: 2px 6px; border-radius: 4px; }
.factory-downloaded svg { width: 13px; height: 13px; }
.factory-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.factory-actions a { text-decoration: none; color: var(--primary); }
.factory-actions a[aria-disabled="true"] { cursor: wait; opacity: .6; }
.factory-actions .icon-text-button { min-height: 34px; padding: 6px 10px; white-space: nowrap; font-size: 12px; }
.factory-delete { color: #a33831; border-color: currentColor; }
.factory-delete-name { font-weight: 600; overflow-wrap: anywhere; }
.factory-delete-dialog p { line-height: 1.75; }
.factory-delete-dialog [role="alert"], .factory-error { color: #a33831; }
.factory-pagination, .factory-pagination > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.factory-pagination { margin-top: 20px; font-size: 13px; }
.factory-pagination select { padding: 6px; }
.factory-footnote { margin-top: 24px; font-size: 12px; line-height: 1.7; }
.factory-empty { padding: 40px 20px; text-align: center; border-block: 1px solid var(--line); background: var(--surface); }
.factory-empty h2 { font-size: 18px; margin: 0 0 10px; }
.factory-empty p { color: var(--factory-muted); line-height: 1.7; }
.factory-queue { padding: 0; margin: 12px 0; list-style: none; }
.factory-queue li { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 10px 0; }
.factory-queue li > div { flex: 1; min-width: 0; }
.factory-queue strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.factory-queue span { display: block; font-size: 12px; margin-top: 4px; }
.factory-queue progress { width: 120px; max-width: 25%; accent-color: var(--primary); }
.factory-upload-status { font-size: 13px; color: var(--primary); }
.factory-save-hint { color: var(--factory-muted); font-size: 12px; line-height: 1.7; margin: 12px 0 0; }
.factory-save { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.factory-save[hidden] { display: none; }
.factory-save p { margin: 0; flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.factory-save progress { max-width: 100%; width: 140px; accent-color: var(--primary); }
.factory-view ::selection { background: var(--primary-soft); color: var(--primary-dark); }
.factory-view time, .factory-table td[data-expiry] { font-variant-numeric: tabular-nums; }
.factory-view :focus-visible, .factory-delete-dialog :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.factory-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .factory-view { padding: 20px 14px; }
  .factory-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .factory-heading p { font-size: 13px; }
  .factory-heading button { align-self: flex-start; }
  .factory-result { align-items: start; flex-direction: column; gap: 5px; }
  .factory-search label { flex-basis: 100%; }
  .factory-search input { width: 100%; }
  .factory-table, .factory-table tbody { display: block; }
  .factory-table thead { display: none; }
  .factory-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 14px 10px; border-bottom: 1px solid var(--line-strong); }
  .factory-table td { display: block; min-width: 0; border: 0; padding: 7px 4px; }
  .factory-table td::before { content: attr(data-label); display: block; color: var(--factory-muted); font-size: 12px; margin-bottom: 5px; }
  .factory-table td:first-child, .factory-table td:nth-child(4), .factory-table td:last-child { grid-column: 1 / -1; }
  .factory-table td:first-child::before, .factory-table td:last-child::before { display: none; }
  .factory-view button, .factory-actions .icon-text-button, .factory-pagination select, .factory-delete-dialog button { min-height: 44px; }
  .factory-actions .icon-text-button { padding: 9px 14px; font-size: 13px; }
  .factory-drop { text-align: left; padding: 16px 12px; }
  .factory-pagination { gap: 16px; }
}
