/* Keep the existing labelled controls and draft nodes; one compact grid row per item. */
#templateItems {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 3px;
}
#templateItems .template-item {
  display: grid;
  grid-template-columns: 132px 132px 76px 76px 128px repeat(4, 84px) 116px 76px;
  min-width: 1072px;
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  align-items: stretch;
}
#templateItems .template-item:first-child { border-top: 0; }
#templateItems .template-item:nth-child(even) { background: #f7fafc; }
#templateItems .template-item > label {
  min-width: 0;
  margin: 0;
  padding: 4px;
  gap: 3px;
  border-right: 1px solid var(--line);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
#templateItems .template-item input,
#templateItems .template-item select {
  min-width: 0;
  width: 100%;
  height: 28px;
  padding: 3px 5px;
  border-radius: 3px;
  font-size: 12px;
}
#templateItems .template-item > button {
  align-self: end;
  margin: 4px;
  padding: 3px;
  height: 28px;
  min-width: 0;
  font-size: 12px;
  border-radius: 3px;
}
#templateForm > .muted { font-size: 12px; margin: 6px 0; }
#templateForm .actions { margin-top: 8px; }
.standard-version { margin: 4px 0; border: 1px solid var(--line); }
.standard-version > summary { padding: 6px 8px; font-size: 12px; cursor: pointer; background: #f7fafc; }
.standard-version .product-grid { min-width: 800px; }
