.material-layout {
  display: grid;
  grid-template-columns: minmax(250px, .78fr) minmax(0, 1.22fr);
  align-items: start;
  gap: 16px;
}
.upload-form, .material-history { padding: 20px; min-width: 0; }
.upload-form { display: grid; gap: 15px; }
.upload-form h2, .material-history h2 { font-size: 1.16rem; }
#upload-feedback[data-status="ok"] { color: var(--green); }
.retry-actions input[type="file"] { max-width: 100%; }
.file-field { border: 1px dashed #9aac99; border-radius: 11px; padding: 12px; background: #f4f7ee; min-width: 0; }
.file-field small { color: var(--muted); font-weight: 450; overflow-wrap: anywhere; }
input[type="file"] { padding: 7px; min-width: 0; font-size: .85rem; }
input::file-selector-button { border: 0; border-radius: 6px; padding: 7px 9px; font: inherit; color: #274737; background: #e9eee4; cursor: pointer; }
summary { color: var(--green); cursor: pointer; font-size: .9rem; }
details[open] label { margin-top: 9px; }
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.record-list { display: grid; gap: 10px; margin-top: 14px; }
.record { border: 1px solid var(--line); padding: 11px; border-radius: 10px; overflow-wrap: anywhere; }
.record h3 { font-size: .95rem; margin: 0; }
.record-meta, .empty-records { color: var(--muted); font-size: .85rem; }
.record-meta { margin: 3px 0 8px; }
.record .feedback { margin: 7px 0; }
.record details { margin-top: 7px; }
.file-result { white-space: pre-wrap; overflow: auto; max-height: 320px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f4f7ee; font: inherit; font-size: .88rem; }
.retry-actions { display: grid; gap: 8px; margin-top: 9px; }
.retry-actions button { justify-self: start; }
@media (max-width: 860px) {
  .material-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 660px) {
  .upload-form, .material-history { padding: 15px; }
}
