.item-sheet {
  --sheet-line: #d7e2e9;
  --sheet-ink: #183746;
  color: var(--sheet-ink);
  container-type: inline-size;
}
#dialog:has(.item-sheet) { width: min(940px, calc(100% - 20px)); }
.item-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--sheet-line);
  border-radius: 10px;
  background: #eef4f7;
}
.item-sheet-header > div:first-child { flex: 1 1 12rem; min-width: 0; }
.item-sheet-header h3 { margin: 0; font-size: 1.32rem; overflow-wrap: anywhere; }
.item-sheet-header p { margin: 4px 0 0; color: #496577; overflow-wrap: anywhere; }
.item-sheet-actions { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.item-sheet-actions button { min-height: 34px; }
.item-sheet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  grid-template-areas: "identity photo" "purchase storage";
  gap: 10px;
  align-items: start;
}
.item-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--sheet-line);
  border-radius: 10px;
  padding: 12px;
  overflow-wrap: anywhere;
  scroll-margin: 8px;
}
.item-card-title { margin: 0 0 9px; font-size: 1.02rem; color: #183746; }
.item-card-identity { grid-area: identity; }
.item-card-photo { grid-area: photo; }
.item-card-purchase { grid-area: purchase; }
.item-card-storage { grid-area: storage; }
.item-sheet :is(.product-photos,.editor-section,.item-purchase,.purchase-details,.storage-location-summary,.identity-editor,.item-card .detail-facts) {
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  min-width: 0;
}
.item-sheet .purchase-heading h3,.item-sheet .item-purchase > h3,
.item-sheet .photo-heading h3,.item-sheet .photo-item-name,.item-sheet .product-photos > .form-note { display: none; }
.item-sheet .photo-tools { flex-wrap: wrap; }
.item-sheet .photo-kind { margin: 5px 0; }
.item-sheet .photo-status { margin: 6px 0 0; }
.item-sheet .photo-gallery:empty { display: none; }
.item-sheet .product-photos .photo-gallery { grid-template-columns: repeat(auto-fit,minmax(min(86px,100%),1fr)); }
.item-sheet .detail-facts { row-gap: 6px; }
.item-sheet .detail-facts + .detail-facts { margin-top: 6px; }
.item-sheet .item-card .storage-location-summary h3 { margin: 8px 0 4px; font-size: .94rem; }
.item-sheet .item-card .storage-location-actions { margin-top: 6px; }
.item-sheet .item-save-actions { position: sticky; bottom: 0; z-index: 1; background: #fff; }
.approval-conversion { color: #235b50; font-size: .9rem; font-weight: 650; margin: 5px 0; }
.item-sheet .detail-facts > div { min-width: 0; }
.item-sheet .detail-facts strong small { display: block; font-weight: 400; color: #496577; }
.item-sheet .item-card .field { min-width: 0; }
.item-sheet .item-card .field :is(input,textarea,select) { max-width: 100%; }
.item-sheet .simple-sales-grid { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
.item-sheet .simple-sales-grid .sales-individual { grid-column: 1/-1; }
.item-sheet .simple-sales-grid .sales-measures > .sales-measure-row { flex-basis: 100%; }
.item-sheet .item-card :is(.identity-details,.price-audit,.shipping-conditions,.purchase-editor) { margin-top: 9px; }
.item-sheet .item-card .identity-editor .form-grid { margin-top: 7px; }
.item-sheet .identity-editor textarea { min-height: 56px; }
.item-sheet .identity-barcode-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
.item-sheet .item-sheet-extra { margin-top: 10px; }
.item-sheet .item-sheet-extra > details { margin-bottom: 6px; }
.item-sheet [data-quick-storage] { margin-top: 10px; }
.item-sheet [data-quick-storage] form { margin: 0; }
.item-sheet .item-sheet-actions:empty { display: none; }
.item-sheet [hidden] { display: none !important; }
@container (max-width: 660px) {
  .item-sheet-grid { grid-template-columns: minmax(0,1fr); grid-template-areas: "identity" "photo" "purchase" "storage"; }
  .item-card { padding: 10px; }
  .item-sheet :is(.detail-facts,.purchase-facts) > div { grid-template-columns: minmax(65px,30%) minmax(0,1fr); gap: 6px; }
}
@container (max-width: 340px) {
  .item-sheet .simple-sales-grid { grid-template-columns: minmax(0,1fr); }
  .item-sheet .identity-barcode-row { grid-template-columns: minmax(0,1fr); }
}
