.collab-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--edge);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.collab-tabs a { gap: 6px; }
.collab-notice { margin-bottom: 16px; }
.collab-notice:last-child { margin-bottom: 0; }
.collab-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.collab-filters { margin-bottom: 16px; }
.task-list .mini-item, .file-entry { gap: 10px; flex-wrap: wrap; }
.task-list-content, .file-entry-content { flex: 1 1 155px; min-width: 0; }
.task-list-content p, .file-entry-content p { margin-top: 3px; }
.task-instructions, .timeline-note, .task-return-note, .file-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.collab-review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0 0;
  margin-top: 12px;
  border-top: 1px solid var(--edge);
}
.collab-review p { margin-top: 5px; }
.task-timeline { margin: 0; padding: 0; list-style: none; }
.task-timeline > li { display: grid; gap: 10px; grid-template-columns: 32px minmax(0, 1fr); position: relative; }
.task-timeline > li + li { margin-top: 16px; }
.task-timeline > li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: -16px;
  width: 1px;
  background: var(--edge);
}
.timeline-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--muted);
  color: var(--brand-text);
  display: grid;
  place-items: center;
}
.timeline-heading { display: flex; justify-content: space-between; gap: 4px 10px; align-items: baseline; flex-wrap: wrap; padding: 3px 0; }
.timeline-note, .task-return-note { margin-top: 6px; }
.task-return-note { background: var(--draft-tint); padding: 8px 10px; border-radius: 10px; }
.timeline-files { margin-top: 8px; }
.timeline-files .file-entry { background: var(--muted); padding: 8px 10px; border: 0; border-radius: 10px; }
.timeline-files .file-entry + .file-entry { margin-top: 6px; }
.timeline-files .file-entry > .template-mark { background: var(--card); }
.file-note { font-size: 13px; }
.upload-controls { display: grid; gap: 10px; margin-bottom: 12px; }
.drop-zone {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  border: 1px dashed var(--brand-edge);
  border-radius: var(--radius-control);
  padding: 14px;
  background: var(--brand-tint);
}
.drop-zone.dragging { border-color: var(--ring); background: var(--secondary); }
.drop-zone p { margin-top: 3px; }
.drop-zone .row-actions { margin-left: auto; }
.file-picker { position: relative; }
.file-picker > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-picker:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 3px; }
.file-picker:has(input:disabled) { opacity: .48; }
.upload-queue { display: grid; gap: 8px; }
.upload-item {
  display: grid;
  grid-template-columns: minmax(130px, .9fr) minmax(120px, 1fr) auto;
  gap: 8px 10px;
  align-items: end;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--edge);
}
.upload-item .inline { align-self: center; }
.upload-item .template-mark { width: 32px; height: 32px; border-radius: 9px; }
.materials-layout { grid-template-columns: minmax(165px, 245px) minmax(0, 1fr); }
.folder-list { display: grid; gap: 4px; }
.folder-list .btn { justify-content: flex-start; }
.file-preview-image {
  width: 100%;
  max-height: 45vh;
  object-fit: contain;
  background: var(--muted);
  border-radius: 10px;
}
@media (max-width: 767px) {
  .materials-layout { grid-template-columns: minmax(0,1fr); }
  .folder-list { display: flex; flex-wrap: wrap; }
}
@media (max-width: 580px) {
  .upload-item { grid-template-columns: minmax(0,1fr) auto; }
  .upload-item .form-field { grid-row: 2; grid-column: 1 / -1; }
  .drop-zone .row-actions { margin-left: 0; }
}
