:root {
  font-family: system-ui, Segoe UI, Arial, sans-serif;
  --success-color: #00e676;
  --error-color: #b91c1c;
}

body {
  margin: 0;
  padding: 1.5rem;
  background: #f4f5f7;
  color: #1a1a1a;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
}

.app-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  flex: 1 1 480px;
  max-width: 480px;
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  position: relative;
}

.app-header h1 {
  margin: 0;
  flex: 1;
}

.app-header #settings-btn {
  position: absolute;
  right: 0;
}

.scan-mode-toggle {
  display: inline-flex;
  background: #eef0f3;
  border-radius: 999px;
  padding: 0.25rem;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.scan-mode-toggle button {
  border: none;
  background: transparent;
  color: #444;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.scan-mode-toggle button.active {
  background: #2563eb;
  color: #fff;
}

#external-scanner-panel {
  width: 100%;
  max-width: 480px;
  background: #f5f7fa;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  box-sizing: border-box;
  display: none;
  text-align: center;
}

#external-scanner-panel.visible {
  display: block;
}

#external-scanner-panel .settings-hint {
  margin: 0.25rem 0 0 0;
}

#video-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#reader {
  width: 100%;
  height: 100%;
}

#reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

#distance-indicator {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  display: none;
  z-index: 5;
  pointer-events: none;
  white-space: nowrap;
}

#distance-indicator.visible {
  display: block;
}

#distance-indicator.far {
  background: rgba(37, 99, 235, 0.85);
}

#distance-indicator.near {
  background: rgba(185, 28, 28, 0.85);
}

#distance-indicator.good {
  background: rgba(5, 150, 105, 0.85);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: background-color 0.15s ease-in-out;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease-in-out;
}

.switch input:checked+.switch-slider {
  background-color: #2563eb;
}

.switch input:checked+.switch-slider::before {
  transform: translateX(18px);
}

.switch input:disabled+.switch-slider {
  background-color: #e5e7eb;
  cursor: not-allowed;
}

.switch input:disabled+.switch-slider::before {
  background-color: #f5f5f5;
}

.switch:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.6;
}

select,
button,
input[type="text"] {
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

select {
  max-width: 180px;
}

button {
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  border: none;
  transition: background 0.15s ease-in-out;
}

button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

button.secondary {
  background: #6b7280;
}

#scan-toggle-btn.running {
  background: #dc2626;
}

#scan-toggle-btn.running:hover {
  background: #b91c1c;
}

button.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  padding: 0.5rem;
  font-size: 1.1rem;
}

#result-wrapper {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

#result-wrapper label {
  font-weight: 600;
  font-size: 0.9rem;
}

#barcode-output {
  width: 100%;
  box-sizing: border-box;
  font-size: 1.1rem;
  font-weight: 600;
  background: #fff;
}

#format-output {
  font-size: 0.85rem;
  color: #555;
}

#product-info {
  width: 100%;
  max-width: 480px;
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}

#product-info.visible {
  display: flex;
}

#product-image {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: #f4f5f7;
  flex-shrink: 0;
}

#product-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}

#product-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#product-brand {
  font-size: 0.8rem;
  color: #666;
}

#status {
  font-size: 0.9rem;
  color: #333;
  min-height: 1.2em;
  text-align: center;
}

#status.error {
  color: var(--error-color);
  font-weight: 600;
}

#product-sidebar-count {
  font-weight: 700;
  font-size: 0.85rem;
  color: #666;
}

#product-sidebar {
  width: min(380px, 100%);
  flex: 1 1 320px;
  max-width: 380px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  padding: 1rem;
  box-sizing: border-box;
  max-height: 80vh;
}

.product-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.product-sidebar-header h2 {
  font-size: 1.05rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#product-clear-all-btn {
  border: 1px solid #b91c1c;
  background: #fff;
  color: #b91c1c;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

#product-clear-all-btn.confirm-armed {
  background: #b91c1c;
  color: #fff;
}

#product-sidebar #product-list {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

#manual-add {
  width: 100%;
  max-width: 480px;
  display: flex;
  gap: 0.5rem;
}

#manual-add input {
  flex: 1;
  padding: 0.5rem 0.7rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
}

#manual-add button {
  padding: 0.5rem 0.9rem;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}

#manual-add button:hover {
  background: #1e4fc4;
}

#product-list li {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #eee;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-item-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-item-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.product-thumb {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 6px;
  background: #f0f0f0;
  border: 1px solid #e5e7eb;
}

.product-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #b5b5b5;
}

.product-type-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
  width: 1.2rem;
  text-align: center;
}

.product-item-text {
  flex: 1;
  min-width: 0;
}

.product-item-line1 {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-item-meta {
  font-size: 0.72rem;
  color: #999;
  margin-top: 0.15rem;
}

.product-item-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.product-delete-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  border-radius: 4px;
  line-height: 1;
}

.product-delete-btn:hover {
  background: #e5e7eb;
}

.product-delete-btn.confirm-armed {
  background: #b91c1c;
  color: #fff;
}

#product-list li:last-child {
  border-bottom: none;
}

.product-item {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.product-item:hover {
  background-color: #f0f4ff;
}

.product-item.has-details {
  border-left: 3px solid #2563eb;
}

#product-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

#product-modal.visible {
  display: flex;
}

#modal-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

#modal-close-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #eee;
  color: #333;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

#modal-close-btn:hover {
  background: #ddd;
}

.detail-section {
  margin: 0 0 0.9rem 0;
}

.detail-section h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #666;
  margin: 0 0 0.25rem 0;
}

.detail-section p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.edit-field {
  margin-bottom: 0.85rem;
}

.edit-field label {
  display: block;
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 0.25rem;
}

.edit-field input,
.edit-field select,
.edit-field textarea {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
}

.edit-field input[readonly] {
  background: #f3f4f6;
  color: #666;
  cursor: default;
}

.edit-field textarea {
  resize: vertical;
}

.edit-amount-row {
  display: flex;
  gap: 0.5rem;
}

.edit-amount-row input {
  flex: 1;
  min-width: 0;
}

.edit-top-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.edit-top-fields {
  flex: 1;
  min-width: 0;
}

.edit-photo-wrap {
  position: relative;
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f4f5f7;
  transition: border-color 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

.edit-photo-wrap:hover {
  border-color: #2563eb;
  opacity: 0.9;
}

.edit-photo-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* Ohne diese Regel würde die obige "display: flex"-Deklaration das
   Standardverhalten des "hidden"-HTML-Attributs (display: none aus dem
   User-Agent-Stylesheet) überschreiben, da Autoren-Regeln immer Vorrang
   vor UA-Regeln haben, unabhängig von der Spezifität - das Menü bliebe
   sonst dauerhaft sichtbar statt nur nach einem Klick auf das Foto. */
.edit-photo-menu[hidden] {
  display: none;
}

.edit-photo-menu-item {
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.85rem;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
}

.edit-photo-menu-item:hover {
  background: #f0f4ff;
}

.edit-product-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  overflow: hidden;
}

.edit-product-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #b5b5b5;
  border-radius: 8px;
  overflow: hidden;
}

.edit-amount-row select {
  flex-shrink: 0;
  width: 130px;
  padding: 0.45rem 0.4rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;
  background: #fff;
}

.edit-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.edit-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

#edit-save-btn {
  background: #2563eb;
  color: #fff;
}

#edit-save-btn:hover {
  background: #1e4fc4;
}

.secondary-btn {
  background: #fff;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.secondary-btn:hover {
  background: #eff4ff;
}

.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.expert-mode-btn {
  display: block;
  width: 100%;
  margin: 1rem 0 0;
}

.expert-fields {
  margin-top: 0.75rem;
}

.expert-fields-subheading {
  margin: 1rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #52585f;
}

.modal-divider {
  border: none;
  border-top: 1px solid #e2e2e2;
  margin: 1.25rem 0;
}

.product-details-toggle {
  margin: 0 0 0.9rem 0;
}

.product-details-toggle summary {
  cursor: pointer;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #666;
  margin: 0 0 0.25rem 0;
  list-style: none;
  outline: none;
}

.product-details-toggle summary::-webkit-details-marker {
  display: none;
}

.product-details-toggle summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 0.7rem;
  transition: transform 0.15s ease-in-out;
}

.product-details-toggle[open] summary::before {
  transform: rotate(90deg);
}

.product-details-toggle .edit-field:first-of-type {
  margin-top: 0.6rem;
}

.nutriscore-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  vertical-align: middle;
}

.nutriscore-a { background: #038141; }
.nutriscore-b { background: #85bb2f; }
.nutriscore-c { background: #fecb02; color: #333; }
.nutriscore-d { background: #ee8100; }
.nutriscore-e { background: #e63e11; }
.nutriscore-unknown { background: #999; }

.flavor-badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.flavor-badge-off { background: #ff8714; }
.flavor-badge-opf { background: #0064c8; }
.flavor-badge-opff { background: #7c3aed; }
.flavor-badge-obf { background: #db2777; }

#unsupported {
  max-width: 480px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #7f1d1d;
  padding: 1rem;
  border-radius: 8px;
  display: none;
}

#settings-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

#settings-modal.visible {
  display: flex;
}

#settings-modal-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

#settings-modal-content h2 {
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
}

#settings-close-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #eee;
  color: #333;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

#settings-close-btn:hover {
  background: #ddd;
}

.settings-section {
  margin: 0 0 1.25rem 0;
}

.settings-section h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #666;
  margin: 0 0 0.5rem 0;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.settings-row label.settings-row-label {
  flex: 1;
  color: #333;
}

.settings-row input[type="number"],
.settings-row select {
  width: 120px;
  font-size: 0.9rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.settings-row input[type="number"]:disabled,
.settings-row select:disabled {
  background: #f0f0f0;
  color: #999;
  cursor: not-allowed;
}

.settings-hint {
  margin: -0.2rem 0 0.75rem 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #777;
}

.camera-live-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.6rem;
  background: #f5f7fa;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #444;
}

.camera-live-info-row #camera-live-info-refresh {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.1rem 0.3rem;
  line-height: 1;
}

.settings-row input[type="color"] {
  width: 44px;
  height: 32px;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
}

.camera-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #23262d;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

#camera-preview-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--success-color, #00e676);
  border-radius: 4px;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  transition: width 0.05s linear, height 0.05s linear;
}

.camera-preview-resolution-label {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  color: #ddd;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  z-index: 1;
}

.focus-box-scale-control {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.settings-row input[type="range"] {
  flex: 1;
  width: auto;
}

.focus-box-scale-control span {
  min-width: 2.6rem;
  text-align: right;
  color: #333;
  font-size: 0.85rem;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
}

.format-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.78rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.format-item:hover {
  border-color: #2563eb;
}

.format-item.checked {
  border-color: #2563eb;
  background: #eff4ff;
}

.format-item img {
  width: 100%;
  height: 40px;
  object-fit: contain;
  background: #fff;
}

.format-item span {
  font-weight: 600;
  line-height: 1.2;
}

.format-item input[type="checkbox"] {
  margin: 0;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.settings-actions button {
  padding: 0.45rem 0.9rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #6b7280;
  color: #fff;
}

.settings-actions button:hover {
  background: #52585f;
}

/* --- Toast-Benachrichtigungen ------------------------------------------ */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  left: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  max-width: 360px;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  color: #fff;
  font-size: 0.88rem;
  line-height: 1.35;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  background: #333;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: var(--success-color, #00e676);
  color: #06331b;
}

.toast.error {
  background: var(--error-color, #b91c1c);
}

.toast.info {
  background: #2563eb;
}

@media (max-width: 520px) {
  #toast-container {
    left: 0.5rem;
    right: 0.5rem;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }
}

/* --- Angezeigte Produktinformationen (Einstellungen) ------------------- */
.product-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.3rem 1.25rem;
}

.product-field-row {
  margin-bottom: 0;
}

/* --- Open Food Facts Login/Logout --------------------------------------- */
.off-login-actions {
  justify-content: flex-start;
  margin: 0.25rem 0 0.5rem 0;
}

#off-login-status.success {
  color: var(--success-color, #00e676);
}

#off-login-status.error {
  color: var(--error-color, #b91c1c);
}
