.case-evidence-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.case-evidence-toolbar,
.case-attachment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.case-evidence-group + .case-evidence-group {
  margin-top: 24px;
}

.case-evidence-group h3 {
  margin: 0 0 8px;
}

.case-attachments {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.case-attachments > .case-attachment {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.case-attachment-file {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1 1 17rem;
  min-width: 0;
}

.case-attachment-thumb {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--v3-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.case-attachment-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-attachment-details {
  min-width: 0;
  overflow-wrap: anywhere;
}

.case-attachment-title,
.case-attachment-name {
  display: block;
}

.case-attachment-title {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.case-attachment-name,
.case-attachment-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.case-attachment-meta {
  margin: 3px 0 0;
}

.case-attachment-actions > :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--v3-surface);
  color: var(--v3-link);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.case-attachment-actions > :is(a, button):hover {
  background: var(--v3-soft);
}

.case-attachment-actions > button.case-attachment-delete {
  color: var(--red);
}

@media (max-width: 640px) {
  .case-attachment-actions > :is(a, button) {
    min-height: 44px;
  }
}

.case-evidence-header > h2 {
  margin: 0;
}
