.ingredient-fields {
  grid-template-columns: minmax(7rem, 1fr) minmax(5.5rem, .7fr) minmax(8rem, 1fr) minmax(5.5rem, .7fr) minmax(8rem, 1fr) minmax(12rem, 2fr) minmax(9rem, 1.3fr);
}
.ingredient-fields select { min-width: 0; width: 100%; }
.ingredient-unit-select { background-color: #fff; }
.source-fields { margin-top: 1rem; }
.inline-recipe-upload input[type="file"] { padding: .7rem; background: #fff; }
.measurement-conversion-note { margin: .35rem 0 1rem; color: var(--muted); font-size: .86rem; }
.ingredient-quantity.is-auto-converted::after { content: "*"; margin-left: .12rem; color: var(--gold-dark); font-size: .75em; vertical-align: super; }
.category-admin-thumb { width: 76px; height: 54px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #f5efe5; }
.category-table th:first-child, .category-table td:first-child { width: 88px; }
[data-category-image-recipe][hidden], [data-category-image-custom][hidden] { display: none !important; }
.package-history-panel { margin-top: 1rem; }
.package-history-list { display: grid; }
.package-history-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.package-history-row > div:first-child { display: grid; gap: .25rem; }
.package-history-row strong span { color: var(--gold-dark); }
.package-history-row small { color: var(--muted); }
.package-history-status { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; text-align: right; }
.status-pill { display: inline-flex; border-radius: 999px; padding: .35rem .65rem; font-size: .76rem; font-weight: 800; background: #ece7dd; }
.status-installed { background: #e1eee2; color: #275833; }
.status-rolled_back { background: #eee7dc; color: #6e5431; }
.status-failed { background: #f8dfdc; color: #8a2b20; }

@media (max-width: 1180px) {
  .ingredient-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ingredient-fields .ingredient-item { grid-column: span 2; }
}
@media (max-width: 720px) {
  .ingredient-fields { grid-template-columns: 1fr; }
  .ingredient-fields .ingredient-item { grid-column: auto; }
  .package-history-row, .package-history-status { align-items: flex-start; flex-direction: column; text-align: left; }
}
