.hh-pedigree-document-manager {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.hh-pedigree-document-manager h4 {
  margin: 4px 0 0;
  color: var(--navy);
}

.hh-pedigree-template-save {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
}

.hh-pedigree-template-save input {
  min-width: 0;
}

.hh-pedigree-template-list {
  display: grid;
  gap: 8px;
}

.hh-pedigree-template-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.hh-pedigree-template-row strong,
.hh-pedigree-template-row small {
  display: block;
}

.hh-pedigree-template-row small {
  margin-top: 3px;
  color: var(--muted);
}

.hh-pedigree-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.hh-pedigree-brand-logo {
  display: grid;
  grid-template-columns: 92px minmax(0,1fr);
  gap: 12px;
  align-items: center;
}

.hh-pedigree-brand-logo-preview {
  width: 92px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: .72rem;
}

.hh-pedigree-brand-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hh-pedigree-brand-logo > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.hh-pedigree-brand-logo small {
  flex-basis: 100%;
  color: var(--muted);
}

html[data-theme="dark"] .hh-pedigree-document-manager h4 {
  color: #F1F5F7;
}

@media (max-width: 760px) {
  .hh-pedigree-template-save,
  .hh-pedigree-template-row {
    grid-template-columns: 1fr;
  }

  .hh-pedigree-template-actions {
    justify-content: stretch;
  }

  .hh-pedigree-template-actions .button {
    min-height: 44px;
    flex: 1 1 120px;
  }

  .hh-pedigree-brand-logo {
    grid-template-columns: 72px minmax(0,1fr);
  }

  .hh-pedigree-brand-logo-preview {
    width: 72px;
    height: 64px;
  }
}
