/* V4.4: keep the sales-entry workspace broad, compact and visually neutral. */
@media (min-width: 761px) {
  .content:has(#fullOrderHost) {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 18px 24px 40px;
  }
}
.full-order-host .full-order-surface {
  max-width: none;
  width: 100%;
}
.full-order-surface .draft-section {
  border-color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(24, 39, 75, .035);
}
.full-order-surface .draft-section-title {
  padding: 9px 14px;
  background: #f7f9fc;
  border-color: #e3e8f0;
}
.full-order-surface .draft-section-title b { color: #26364f; }
.full-order-surface .simple-entry .order-form-grid,
.full-order-surface .simple-entry:not(.show-order-more) .order-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px 14px;
  padding: 10px 14px 8px;
}
.full-order-surface .order-form-grid label {
  min-width: 0;
  margin-bottom: 1px;
  color: #5b677b;
}
.full-order-surface .order-form-grid .customer-picker-field,
.full-order-surface .order-form-grid .span-2 { grid-column: span 2; }
.full-order-surface .order-form-grid input,
.full-order-surface .order-form-grid select {
  min-height: 35px;
  height: 35px;
  background: #fff;
  border-color: #dfe5ee;
}
.full-order-surface .customer-link-state { margin-top: 2px; }
.full-order-surface .customer-product-history.history-expanded {
  background: #f5f8fd;
  border-color: #dce6f5;
}
.full-order-surface .customer-product-history { background: #f5f8fd; border-color: #dce6f5; }
.full-order-surface .history-sku-list article { border-color: #e0e7f1; }
.full-order-surface .history-product-thumb { background: #fff; }
.full-order-surface .draft-sheet-scroll { border-color: #e1e7ef; }
.full-order-surface .bluecloud-entry .draft-sheet,
.full-order-surface.bluecloud-entry .draft-sheet { min-width: 1440px; }
.full-order-surface.bluecloud-entry .draft-sheet-head,
.full-order-surface.bluecloud-entry .draft-sheet-row {
  grid-template-columns: 42px 150px 118px minmax(180px, 1.25fr) 124px 124px 84px 92px 80px 106px minmax(190px, 1fr) 72px !important;
}
.full-order-surface.bluecloud-entry .draft-sheet-head {
  min-height: 40px;
  background: #f3f6fb;
  border-color: #e2e8f0;
  color: #5c6a80;
}
.full-order-surface.bluecloud-entry .draft-sheet-head span { white-space: nowrap; }
.full-order-surface.bluecloud-entry .draft-sheet-row {
  min-height: 94px;
  border-color: #e9edf4 !important;
}
.full-order-surface.bluecloud-entry .draft-sheet-row:nth-child(odd) { background: #fbfcfe; }
.full-order-surface.bluecloud-entry .draft-sheet-row:hover { background: #f5f8fe; }
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-item-index {
  background: #e9f0ff;
  color: #2865d8;
}
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo-wrap {
  width: 136px;
  height: 78px;
}
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo {
  display: grid;
  place-items: center;
  flex: 0 0 78px;
  width: 136px;
  height: 78px;
  overflow: hidden;
  background: #fff;
  border: 1px dashed #c9d5e7;
  border-radius: 8px;
}
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-remove-image {
  position: absolute;
  right: -5px;
  top: -5px;
}
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo.has-image { border-style: solid; }
.full-order-surface.bluecloud-entry .draft-sheet-row [data-draft-image] { display: none !important; }
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-preview-image {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 2;
  width: 27px;
  height: 27px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #dce4f0;
  border-radius: 7px;
  background: rgba(255,255,255,.95);
  color: #245fc4;
  font-size: 21px;
  line-height: 1;
  cursor: zoom-in;
  box-shadow: 0 2px 8px rgba(20,35,65,.16);
}
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-preview-image:hover { background: #eaf1ff; }
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-item-fields input:focus,
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-item-fields select:focus {
  border-color: #7fa6ed;
  box-shadow: 0 0 0 2px rgba(48, 108, 220, .12);
}
.full-order-surface .draft-line-total { color: #285ebc !important; }
.full-order-surface .shipping-draft-section,
.full-order-surface .production-requirement-section { display: block !important; }
.sales-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 24, 42, .78);
}
.sales-image-lightbox section {
  width: min(1100px, 96vw);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.sales-image-lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sales-image-lightbox-head b { color: #22324b; font-size: 16px; }
.sales-image-lightbox-head button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: #eef2f8; color: #34425a; font-size: 23px; cursor: pointer; }
.sales-image-lightbox img { display: block; max-width: 100%; max-height: calc(94vh - 112px); margin: auto; object-fit: contain; }
.sales-image-lightbox small { color: #64748b; text-align: center; }
@media (max-width: 1100px) {
  .full-order-surface .simple-entry .order-form-grid,
  .full-order-surface .simple-entry:not(.show-order-more) .order-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .full-order-surface .simple-entry .order-form-grid,
  .full-order-surface .simple-entry:not(.show-order-more) .order-form-grid { grid-template-columns: minmax(0, 1fr); }
  .full-order-surface .order-form-grid .customer-picker-field,
  .full-order-surface .order-form-grid .span-2 { grid-column: 1; }
  .full-order-surface.bluecloud-entry .draft-sheet { min-width: 0; }
  .full-order-surface.bluecloud-entry .draft-sheet-row { grid-template-columns: 32px 116px minmax(0, 1fr) 50px !important; }
  .full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo-wrap,
  .full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo { width: 108px; height: 72px; }
}
