/* --- anexos --------------------------------------------------------------------- */
.attachment-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.attachment-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
}
.att-kind {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-2);
  background: var(--surface-3);
  color: var(--muted);
  font: 750 var(--fs-1) var(--mono);
  overflow: hidden;
}
.attachment-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.att-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.att-info a,
.att-info > b {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.att-info a:hover {
  color: var(--accent);
}
.att-info small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.row-actions {
  display: flex;
  gap: var(--s-2);
}
.row-actions button {
  min-height: var(--h-2);
  padding: var(--s-1) var(--s-3);
}
.attachment-row.missing {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--warn) 50%, transparent);
}
.attachment-row.missing .att-kind {
  background: var(--warn-soft);
  color: var(--warn);
  font-size: var(--fs-1);
  text-align: center;
}
.att-group + .att-group {
  margin-top: var(--s-5);
}
.att-group-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.att-group-head .link {
  margin-left: auto;
}
.toolbar {
  display: flex;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.toolbar select {
  width: auto;
}
.upload-panel {
  margin-top: var(--s-5);
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface-2);
}
.upload-panel h3 {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  font-size: var(--fs-3);
}
.upload-panel .grid-2 {
  margin: var(--s-4) 0 var(--s-3);
}
.dropzone {
  position: relative;
  display: block;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-2);
  background: var(--bg);
  cursor: pointer;
}
.dropzone:hover {
  border-color: var(--accent);
}
.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  min-height: 0;
}
.dropzone > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-5);
  text-align: center;
  pointer-events: none;
}
.dropzone > span .ico {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.dropzone small {
  color: var(--muted);
}
.dropzone.compact {
  margin-top: var(--s-4);
}
.dropzone.compact > span {
  flex-direction: row;
  justify-content: flex-start;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-4);
}
.upload-progress {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-3);
  color: var(--muted);
  font-size: var(--fs-2);
}
.upload-progress[hidden] {
  display: none;
}
.upload-progress progress {
  flex: 1;
  height: 6px;
  accent-color: var(--accent);
}
