.order-staging-linked {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(226, 119, 168, 0.22);
  border-radius: 7px;
  background: #fff7fb;
  padding: 4px;
  color: var(--primary);
  text-align: left;
  cursor: pointer;
}

.order-staging-linked:hover {
  border-color: rgba(226, 119, 168, 0.44);
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08);
}

.order-staging-linked > .order-staging-linked-thumb,
.order-staging-linked > .admin-image-loading-frame.order-staging-linked-thumb {
  width: 38px;
  height: 50px;
  min-width: 38px;
  min-height: 50px;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  object-fit: cover;
  object-position: center;
  background: #edf1f6;
}

.order-staging-linked .admin-image-loading-image.order-staging-linked-thumb {
  width: 100%;
  height: 100%;
}

.order-staging-linked .admin-image-loading-state b {
  display: none;
}

.order-staging-linked-thumb-empty {
  display: grid;
  place-items: center;
  color: #7a8797;
  font-size: 9px;
  font-weight: 850;
}

.order-staging-linked-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.order-staging-linked-name,
.order-staging-linked-code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-staging-linked-name {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  color: #24384f;
  font-size: 11px !important;
  font-weight: 900;
  line-height: 1.2;
}

.order-staging-linked-code {
  color: var(--primary) !important;
  font-size: 11px !important;
  font-weight: 800;
  line-height: 1.1;
}

.order-staging-linked-count {
  position: absolute;
  right: 3px;
  bottom: 3px;
  border-radius: 999px;
  background: #ffffff;
  padding: 1px 4px;
  color: var(--primary);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.1;
}

.order-staging-picker-dialog {
  width: min(1120px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.order-staging-picker-dialog::backdrop {
  background: rgba(15, 23, 42, 0.34);
}

.order-staging-picker-frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(760px, calc(100vh - 48px));
}

.order-staging-picker-head,
.order-staging-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.order-staging-picker-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.order-staging-picker-status {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.order-staging-picker-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-staging-picker-head strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.3;
}

.order-staging-picker-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.62fr);
  gap: 0;
}

.order-staging-picker-list {
  order: 2;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border-left: 1px solid var(--line);
  background: #f8fafc;
}

.order-staging-picker-list-head { display: grid; gap: 2px; margin-bottom: 8px; }
.order-staging-picker-list-head strong { font-size: 13px; }
.order-staging-picker-list-head small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.order-staging-picker-load-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; padding: 12px; border-radius: 10px; background: #f4f7fb; color: #52627a; font-size: 13px; }
.order-staging-picker-load-state.is-error { border: 1px solid #f1b8bd; background: #fff5f5; color: #a43843; }

.order-staging-picker-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.order-staging-picker-row.is-selected {
  border-color: rgba(226, 119, 168, 0.52);
  background: #fff7fb;
}

.order-staging-picker-custom .order-staging-picker-thumb-empty {
  color: #3b74ad;
  background: linear-gradient(135deg, #eef7ff, #fff1f7);
}

.order-staging-picker-thumb {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  background: #edf1f6;
}

.order-staging-picker-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-staging-picker-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.order-staging-picker-main span,
.order-staging-picker-main small,
.order-staging-picker-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-staging-picker-main span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.order-staging-picker-main strong {
  font-size: 14px;
  line-height: 1.35;
}

.order-staging-picker-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.order-staging-picker-actions {
  display: grid;
  gap: 6px;
}

.order-staging-picker-detail {
  order: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #fff;
}

.order-staging-scene-detail {
  display: grid;
  gap: 14px;
}

.order-staging-current-badge { display: inline-flex; width: fit-content; border-radius: 999px; padding: 3px 8px; background: #eaf5ff; color: var(--primary); font-size: 12px; font-weight: 800; }

.order-staging-preview-empty.is-custom {
  display: inline-flex;
  width: fit-content;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid rgba(242, 122, 154, .28);
  border-radius: 7px;
  background: var(--pink-soft, #fff2f6);
  color: var(--pink-strong, #d9537a);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.order-staging-scene-detail-head strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.25;
}

.order-staging-scene-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.75fr);
  gap: 12px;
  align-items: start;
}

.order-staging-scene-main-image { display: grid; width: 100%; aspect-ratio: 16 / 10; place-items: center; border-radius: 8px; object-fit: cover; background: #edf1f6; color: var(--muted); font-size: 13px; font-weight: 800; }

.order-staging-scene-detail-grid {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.order-staging-scene-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-staging-scene-detail-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.order-staging-scene-detail-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.order-staging-scene-detail-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: #edf1f6;
}

.order-staging-scene-detail-images span,
.order-staging-scene-detail-empty,
.order-staging-picker-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-staging-scene-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.order-staging-internal-note {
  display: grid;
  gap: 6px;
}

.order-staging-internal-note span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.order-staging-internal-note textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  background: #fff;
  font: inherit;
  line-height: 1.5;
}

.order-staging-note-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-staging-note-actions small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .order-staging-picker-dialog {
    width: calc(100vw - 20px);
  }

  .order-staging-picker-body {
    grid-template-columns: 1fr;
  }

  .order-staging-picker-list {
    max-height: 50vh;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .order-staging-scene-hero {
    grid-template-columns: 1fr;
  }

  .order-staging-picker-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .order-staging-picker-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }
}
