.goodsV2 {
  border-color: #d9c5c2;
  background: #fffdfc;
}

.goodsV2Title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.goodsV2Title b {
  color: var(--green);
  font-size: 16px;
}

.goodsV2Title span {
  font-weight: 700;
  white-space: nowrap;
}

.goodsRemark {
  margin: 8px 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f7f3f2;
  color: #5d4c48;
  line-height: 1.5;
}

.goodsV2Photos,
.goodsUploadPreview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.goodsV2Photos img {
  width: 100%;
  height: 112px;
  border-radius: 9px;
  object-fit: cover;
}

.goodsUploadItem {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.goodsUploadItem img {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.goodsUploadItem small {
  display: block;
  overflow: hidden;
  padding: 6px 7px 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goodsUploadItem span {
  display: block;
  padding: 2px 7px 7px;
  color: var(--muted);
  font-size: 12px;
}

.goodsUploadItem[data-upload-state="processing"] span,
.goodsUploadItem[data-upload-state="uploading"] span {
  color: #8a5b22;
}

.goodsUploadItem[data-upload-state="success"] span {
  color: #287044;
}

.goodsUploadItem[data-upload-state="failed"] {
  border-color: #c84e45;
}

.goodsUploadItem[data-upload-state="failed"] span {
  color: #b12c23;
}

@media (max-width: 520px) {
  .goodsV2Title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .goodsV2Photos,
  .goodsUploadPreview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .goodsV2Photos img,
  .goodsUploadItem img {
    height: 86px;
  }
}

.saveAlbumBtn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid #c9a89f;
  border-radius: 8px;
  background: #fbf3f1;
  color: #82453e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: normal;
}

.goodsSavePromptOption {
  display: flex;
  align-items: center;
  gap: 8px;
}

.goodsSavePromptOption input {
  width: auto;
  margin: 0;
}

.goodsSaveDialog[open] {
  position: fixed;
  inset: auto 12px 12px auto;
  z-index: 950;
  display: block;
  width: min(460px, calc(100vw - 24px));
  max-height: min(78vh, 680px);
  margin: 0;
  overflow: auto;
  border: 1px solid #d9c5c2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 42px rgba(53, 31, 28, 0.28);
}

.goodsSaveDialog h2 {
  margin: 0 34px 4px 0;
}

.goodsSaveList {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.goodsSaveItem {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid #eadbd8;
  border-radius: 10px;
  background: #fffaf9;
}

.goodsSaveItem img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: contain;
  background: #f5f1f0;
}

.goodsSaveItem div {
  min-width: 0;
}

.goodsSaveItem b,
.goodsSaveItem small {
  display: block;
}

.goodsSaveItem small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goodsSaveItem button {
  white-space: normal;
}

.goodsSaveActions {
  flex-wrap: wrap;
}

.savePreviewDialog {
  width: min(520px, calc(100vw - 24px));
  max-height: 92vh;
  overflow: auto;
  border: 0;
  border-radius: 14px;
  padding: 14px;
}

.savePreviewDialog::backdrop {
  background: rgba(20, 12, 11, 0.82);
}

.savePreviewDialog img {
  display: block;
  width: 100%;
  max-height: 68vh;
  border-radius: 10px;
  object-fit: contain;
  background: #171211;
  -webkit-touch-callout: default;
  user-select: auto;
}

.saveAlbumHint {
  margin: 12px 0 6px;
  color: #5d4c48;
  font-size: 14px;
  line-height: 1.5;
}

.photoBarActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#photoSaveHigh {
  border-color: #eed3cd;
  background: #fff;
  color: #693e3b;
}

.photoSaveHint {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: 12px;
  left: 12px;
  margin: 0;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  color: #4a3431;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

@media (max-width: 520px) {
  .goodsSaveDialog[open] {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100vw - 16px);
    max-height: 82vh;
  }

  .goodsSaveItem {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .goodsSaveItem img {
    width: 58px;
    height: 58px;
    grid-row: 1 / span 2;
  }

  .goodsSaveItem button {
    grid-column: 2;
    justify-self: start;
  }

  .photoBarActions {
    gap: 5px;
  }

  #photoSaveHigh,
  #photoClose {
    padding-right: 9px;
    padding-left: 9px;
    font-size: 13px;
  }
}

/* ===== 批量反馈（一键反馈全部货品）样式块 =====
   2026-09-08 基线追平：从本地库合回。batchFeedbackDialog 由 app.js 动态创建，
   生产端此前缺失本块，导致线上批量反馈弹窗使用浏览器默认样式。 */
.goodsBatchToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 10px;
  padding: 12px 14px;
  border: 1px solid #dfcfcb;
  border-radius: 11px;
  background: #fbf7f6;
}

.batchGoodsChoice input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #82453e;
}

#batchFeedbackDialog {
  width: min(720px, calc(100vw - 28px));
  max-height: 90vh;
}

#batchFeedbackForm {
  overflow: visible;
  max-height: none;
}

.batchModeChoices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.batchModeChoices label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid #e3d5d2;
  border-radius: 9px;
  background: #fffaf9;
}

.batchGoodsChoices,
.batchCustomGoods {
  display: grid;
  gap: 9px;
  margin: 10px 0 16px;
  padding: 4px;
}

.batchGoodsChoice {
  display: grid;
  grid-template-columns: auto 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border: 1px solid #eadfdd;
  border-radius: 9px;
  background: #fff;
}

.batchGoodsChoice:not(:has(input)) {
  grid-template-columns: 52px minmax(0, 1fr);
}

.batchGoodsChoice img {
  width: 52px;
  height: 52px;
  border-radius: 7px;
  object-fit: cover;
}

.batchGoodsChoice span,
.batchGoodsChoice small {
  display: block;
  min-width: 0;
}

.batchGoodsChoice b {
  overflow-wrap: anywhere;
}

.batchGoodsChoice small {
  margin-top: 4px;
  color: #81716d;
}

.batchCustomRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 10px;
}

.privateFeedback {
  color: #766b67;
  background: #f5f1f0;
}

@media (max-width: 520px) {
  .goodsBatchToolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .batchModeChoices {
    grid-template-columns: 1fr;
  }

  .batchCustomRow {
    grid-template-columns: 1fr;
  }

  .goodsV2Photos img,
  .goodsGroupPhotos img {
    object-fit: contain;
    background: #f5f1f0;
  }

  .goodsFeedback {
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}
