.aibos-pm-page,
.aibos-pm-page * { box-sizing: border-box; }
#productManagementMount { width: 100%; min-width: 0; }

.aibos-pm-page {
  --pm-brand: var(--brand, #8d3148);
  --pm-primary: var(--brand, #8d3148);
  --pm-border: var(--line, #f0dfdc);
  --pm-muted: var(--muted, #8e7a80);
  --pm-bg: var(--bg, #fbf7f4);
  --pm-soft: var(--soft, #fff8f5);
  --pm-text: var(--text, #2d2024);
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: calc(100vh - 126px);
  min-height: 520px;
  overflow: hidden;
  color: var(--pm-text);
  background: var(--pm-bg);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
}

.aibos-pm-sheet {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.aibos-pm-toolbar {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--pm-border);
}

.aibos-pm-tabs,
.aibos-pm-actions { display: flex; gap: 7px; align-items: center; overflow-x: auto; }

.aibos-pm-page button {
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--pm-border);
  border-radius: 5px;
  background: #fff;
  color: var(--pm-brand);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.aibos-pm-page button:hover { border-color: var(--pm-primary); background: #fff6f3; color: var(--pm-primary); }
.aibos-pm-page button.aibos-pm-primary { background: var(--pm-brand); border-color: var(--pm-brand); color: #fff; }
.aibos-pm-tabs button.is-active { background: #fff6f3; border-color: #e8c9c3; color: var(--pm-brand); }

.aibos-pm-table-wrap { flex: 1; min-height: 0; overflow: auto; background: #fff; }
.aibos-pm-table { width: calc(0.36cm + 0.62cm + 1197px); min-width: calc(0.36cm + 0.62cm + 1197px); border-collapse: collapse; table-layout: fixed; background: #fff; }
.aibos-pm-table .aibos-pm-left-spacer-col { width: 0.36cm; min-width: 0.36cm; max-width: 0.36cm; }
.aibos-pm-table .aibos-pm-row-control-col { width: 0.62cm; min-width: 0.62cm; max-width: 0.62cm; }
.aibos-pm-table .aibos-pm-data-col { width: 57px; min-width: 57px; max-width: 57px; }
.aibos-pm-table th,
.aibos-pm-table td { width: 57px; min-width: 57px; max-width: 57px; padding: 0; border: 1px solid #ead9d6; overflow: hidden; text-align: center; vertical-align: middle; }
.aibos-pm-table thead tr:not(.aibos-pm-title-row),
.aibos-pm-table thead tr:not(.aibos-pm-title-row) th { height: 1cm; min-height: 1cm; max-height: 1cm; }
.aibos-pm-table th { background: #f7e9e7; overflow: hidden; text-align: center; color: #7f2942; font-size: 12px; word-break: break-word; }
.aibos-pm-table th span,
.aibos-pm-table th small { display: block; overflow: hidden; line-height: 1.1; letter-spacing: 0; white-space: nowrap; word-break: normal; overflow-wrap: normal; font-size: 8pt; font-weight: 800; }
.aibos-pm-table th small { margin-top: 0.1cm; color: #9b5267; font-family: Arial, "Microsoft YaHei", sans-serif; }
.aibos-pm-table .aibos-pm-left-spacer-head,
.aibos-pm-table .aibos-pm-left-spacer { width: 0.36cm; min-width: 0.36cm; max-width: 0.36cm; border: 0 !important; background: transparent !important; }
.aibos-pm-table .aibos-pm-control-head,
.aibos-pm-table .aibos-pm-row-tools { width: 0.62cm; min-width: 0.62cm; max-width: 0.62cm; border: 0 !important; background: transparent !important; }
.aibos-pm-table .aibos-pm-detail-column { background: #f3ddda; }
.aibos-pm-table .aibos-pm-master-column { background:#f8e2e8; color:var(--pm-brand); }
.aibos-pm-table .aibos-pm-master-column.is-master-start,
.aibos-pm-table td.aibos-pm-master-data-cell.is-master-start { border-left:3px solid var(--pm-brand); }
.aibos-pm-table td.aibos-pm-master-data-cell { background:#fff9fb; }
.aibos-pm-table td.aibos-pm-master-data-cell textarea[readonly] { background:#f7f1f3; color:#7d6870; }

.aibos-pm-title-row th { height: 64px; min-height: 64px; max-height: 64px; background: #fffdfa; border: 1px solid #ead9d6; border-top: 0; border-left: 0; border-right: 0; }
.aibos-pm-title-cell { width: auto !important; min-width: 0 !important; max-width: none !important; border-left: 0 !important; text-align: center; }
.aibos-pm-title-layout { display: flex; align-items: center; justify-content: center; gap: .75cm; height: 64px; }
.aibos-pm-title-logo { display: block; flex: 0 0 60px; width: 60px; height: 60px; object-fit: contain; }
.aibos-pm-title-copy { flex: 0 0 auto; }
.aibos-pm-table .aibos-pm-title-copy > strong,
.aibos-pm-table .aibos-pm-title-copy > span { display: block; color: #172033; font-family: Arial, "Microsoft YaHei", sans-serif; font-size: 20px; font-weight: 800; line-height: 1.15; }
.aibos-pm-table .aibos-pm-title-copy > span { margin-top: 0.22cm; font-size: 14px; }
.aibos-pm-title-blank { background: #fff !important; }
.aibos-pm-logo-cell { padding: 2px !important; border-left: 0 !important; border-right: 0 !important; }

.aibos-pm-table tbody tr { height: 57px !important; min-height: 57px; max-height: 57px; }
.aibos-pm-table tbody td { height: 57px !important; min-height: 57px; max-height: 57px; }
.aibos-pm-table tbody td { text-align: center; vertical-align: middle; }
.aibos-pm-table tbody td { background: #fffdfa; }
.aibos-pm-table tbody tr:nth-child(even) td:not(.aibos-pm-left-spacer):not(.aibos-pm-row-tools) { background: #fff9f7; }
.aibos-pm-table tbody tr:hover td:not(.aibos-pm-left-spacer):not(.aibos-pm-row-tools) { background: #fdf1ef; }
.aibos-pm-table tbody tr:last-child td:not(.aibos-pm-left-spacer):not(.aibos-pm-row-tools) { border-bottom: 1px solid #ead9d6 !important; }
.aibos-pm-table tbody tr.is-active td { background: #f9e9e7; }
.aibos-pm-page .aibos-pm-table textarea {
  display: block;
  width: calc(100% - 4px);
  height: 53px;
  min-height: 53px;
  max-height: 53px;
  margin: 2px;
  padding: 0;
  resize: none;
  border: 1px solid #dfd2d5;
  border-radius: 0;
  outline: 0;
  background: #fff;
  color: #263247;
  text-align: center;
  vertical-align: middle;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  font: 12px/1.2 Arial, "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  scrollbar-width: thin;
}
.aibos-pm-page .aibos-pm-table textarea::-webkit-scrollbar { width: 4px; }
.aibos-pm-page .aibos-pm-table textarea::-webkit-scrollbar-thumb { border-radius: 2px; background: #d8c2c8; }
.aibos-pm-page .aibos-pm-table .aibos-pm-managed-code-select {
  display: block;
  width: calc(100% - 4px);
  height: 53px;
  min-height: 53px;
  max-height: 53px;
  margin: 2px;
  padding: 0 12px 0 2px;
  border: 1px solid #dfd2d5;
  border-radius: 0;
  outline: 0;
  background-color: #fff;
  color: #263247;
  text-align: center;
  text-align-last: center;
  font: 11px/1.2 Arial, "Microsoft YaHei", sans-serif;
}
.aibos-pm-page .aibos-pm-table .aibos-pm-managed-code-select:focus { box-shadow: inset 0 0 0 2px var(--pm-brand); background-color: #fff; }
.aibos-pm-page .aibos-pm-table .aibos-pm-managed-code-select:disabled { color: #7d6870; opacity: 1; }
.aibos-pm-page .aibos-pm-table textarea:focus { box-shadow: inset 0 0 0 2px var(--pm-brand); background: #fff; }
.aibos-pm-page .aibos-pm-table select.aibos-pm-cell-select {
  display: block;
  width: calc(100% - 4px);
  height: 53px;
  min-height: 53px;
  max-height: 53px;
  margin: 2px;
  padding: 0 12px 0 2px;
  border: 1px solid #dfd2d5;
  border-radius: 0;
  outline: 0;
  background: #fff;
  color: #263247;
  text-align: center;
  text-align-last: center;
  white-space: normal;
  font: 11px/1.2 Arial, "Microsoft YaHei", sans-serif;
}
.aibos-pm-page .aibos-pm-table select.aibos-pm-cell-select:focus { box-shadow: inset 0 0 0 2px var(--pm-brand); }
.aibos-pm-page .aibos-pm-table textarea.aibos-pm-managed-code-display {
  width: calc(100% - 4px);
  color: #6f263c;
  font-weight: 750;
}
.aibos-pm-table td.is-selected { background: #f5e9e6 !important; box-shadow: inset 0 0 0 1px var(--pm-brand); }
.aibos-pm-row-tools { padding: 0 4px 0 0 !important; text-align: center; }
.aibos-pm-row-tools button { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 3px auto; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #334155; font-size: 13px; font-weight: 900; line-height: 1; }
.aibos-pm-row-tools button:last-child { border-color: #fca5a5; color: #dc2626; }
.aibos-pm-image-cell { position: relative; display: flex; align-items: center; justify-content: center; width: 55px; height: 55px; margin: 0; overflow: hidden; cursor: zoom-in; }
.aibos-pm-image-cell span { overflow-wrap: anywhere; color: #8b98a8; font-size: 12px; text-align: center; white-space: normal; word-break: break-word; }
.aibos-pm-thumb { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center center; }
.aibos-pm-image-upload { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.aibos-pm-local-image-picker { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--pm-brand); cursor: pointer; }
.aibos-pm-local-image-picker span { color: var(--pm-brand); font-size: 17px; line-height: 1; }
.aibos-pm-local-image-picker small { color: var(--pm-brand); font-size: 10px; font-weight: 700; }
.aibos-pm-local-image-picker.is-replace { position: absolute; right: 2px; bottom: 2px; width: auto; height: auto; padding: 2px 4px; border-radius: 4px; background: rgba(255,255,255,.9); }
.aibos-pm-local-image-picker.is-replace span { font-size: 9px; font-weight: 800; }
.aibos-pm-local-pending-badge { position: absolute; z-index: 2; top: 2px; left: 2px; padding: 1px 3px; border-radius: 3px; background: rgba(141,49,72,.9); color: #fff; font-size: 8px; font-style: normal; line-height: 1.25; pointer-events: none; }
.aibos-pm-page .aibos-pm-detail-cell { padding: 2px !important; }
.aibos-pm-page .aibos-pm-detail-cell button { display: flex; width: calc(100% - 4px); height: 23px; min-height: 23px; max-height: 23px; align-items: center; justify-content: center; margin: 1px 2px; padding: 1px 2px; overflow: hidden; border: 1px solid #a53a58; border-radius: 5px; background: #98334f; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.05; white-space: normal; }
.aibos-pm-page .aibos-pm-detail-cell button:hover { border-color: #7f2942; background: #7f2942; color: #fff; }
.aibos-pm-page .aibos-pm-detail-cell button.is-secondary { flex-direction: column; border-color: #d98aa0; background: #fff7f9; color: #8b2946; font-size: 9px; line-height: 1; }
.aibos-pm-page .aibos-pm-detail-cell button.is-secondary span { display: block; }
.aibos-pm-page .aibos-pm-detail-cell button.is-secondary:hover { border-color: #a53a58; background: #fbe8ed; color: #7f2942; }
.aibos-pm-page .aibos-pm-table td.is-price-cell textarea { color: #d11c1c; font-weight: 700; }

.aibos-pm-detail-rail {
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-left: 1px solid var(--pm-border);
  background: #f8fafc;
  color: #536176;
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.aibos-pm-detail-rail small { font-size: 12px; font-weight: 600; }

.aibos-pm-detail-slot {
  display: none;
}
.aibos-pm-detail-slot.is-open {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: rgba(45, 32, 36, .42);
  backdrop-filter: blur(2px);
}
.aibos-pm-page .aibos-pm-detail-resume {
  position: fixed;
  z-index: 1240;
  right: 18px;
  top: 50%;
  display: grid;
  min-width: 190px;
  min-height: 0;
  padding: 10px 13px;
  border: 1px solid var(--pm-brand);
  border-radius: 12px 0 0 12px;
  color: #fff;
  background: var(--pm-brand);
  box-shadow: 0 10px 28px rgba(100,54,61,.28);
  text-align: left;
  transform: translateY(-50%);
}
.aibos-pm-detail-resume span { color: #f8dce4; font-size: 10px; letter-spacing: .08em; }
.aibos-pm-detail-resume b { margin-top: 2px; font-size: 12px; }
.aibos-pm-detail-panel {
  width: min(760px, calc(100vw - 52px));
  height: 100%;
  min-width: 0;
  max-width: 94vw;
  display: flex;
  flex-direction: column;
  border: 1px solid #e4d8dc;
  border-radius: 0;
  background: var(--pm-bg);
  box-shadow: -18px 0 48px rgba(44, 24, 30, .22);
}
.aibos-pm-detail-head { min-height: 78px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px 14px; border-bottom: 1px solid var(--pm-border); background: linear-gradient(135deg,#fff4f7,#fffaf5); }
.aibos-pm-detail-head strong,
.aibos-pm-detail-head span { display: block; }
.aibos-pm-detail-head strong { margin-top: 4px; font-size: 20px; line-height: 1.2; }
.aibos-pm-detail-head span { color: var(--pm-brand); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.aibos-pm-detail-head small { display: block; margin-top: 5px; color: var(--pm-muted); font-size: 12px; font-weight: 400; }
.aibos-pm-detail-head-actions { display: flex; align-items: center; gap: 6px; }
.aibos-pm-detail-head-actions > button,
.aibos-pm-claim-wrap > button { min-height: 28px; padding: 4px 9px; border-radius: 5px; font-size: 12px; font-weight: 750; }
.aibos-pm-detail-head-actions > button { border-color: var(--pm-brand); background: var(--pm-brand); color: #fff; }
.aibos-pm-detail-head-actions > button.aibos-pm-detail-close { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; border-color: #e3d7da; border-radius: 8px; background: #fff; color: #765f66; font-size: 18px; }
.aibos-pm-claim-wrap { position: relative; }
.aibos-pm-claim-wrap > button { background: #fff; color: var(--pm-brand); }
.aibos-pm-claim-menu { position: absolute; z-index: 12; top: calc(100% + 5px); right: 0; display: grid; min-width: 118px; padding: 5px; border: 1px solid var(--pm-border); border-radius: 6px; background: #fff; box-shadow: 0 8px 20px rgba(28, 38, 56, .16); }
.aibos-pm-claim-menu > span { padding: 3px 5px 5px; color: var(--pm-muted); font-size: 12px; }
.aibos-pm-claim-menu button { min-height: 27px; padding: 3px 6px; border: 0; border-radius: 4px; background: transparent; color: var(--pm-text); text-align: left; font-size: 12px; }
.aibos-pm-claim-menu button:hover { background: var(--pm-soft); color: var(--pm-brand); }
.aibos-pm-detail-body { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 10px; }
.aibos-pm-detail-body section { margin-bottom: 10px; padding: 11px; background: #fff; border: 1px solid var(--pm-border); border-radius: 8px; box-shadow: 0 4px 12px rgba(100,54,61,.035); }
.aibos-pm-detail-body h3 { margin: 0 0 9px; font-size: 13px; }
.aibos-pm-detail-body section > p { margin: -5px 0 9px; color: var(--pm-muted); font-size: 12px; }
.aibos-pm-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.aibos-pm-detail-grid .is-full { grid-column: 1 / -1; }
.aibos-pm-detail-grid label,
.aibos-pm-detail-description { display: grid; gap: 5px; }
.aibos-pm-detail-grid label span,
.aibos-pm-detail-description span { color: var(--pm-muted); font-size: 12px; }
.aibos-pm-detail-grid input,
.aibos-pm-detail-grid select,
.aibos-pm-detail-description textarea { width: 100%; border: 1px solid #dfd2d5; border-radius: 7px; background: #fffafa; color: var(--pm-text); font: 12px/1.4 Arial, "Microsoft YaHei", sans-serif; outline: 0; }
.aibos-pm-detail-grid input,
.aibos-pm-detail-grid select { height: 30px; padding: 4px 7px; }
.aibos-pm-managed-code-field > span { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.aibos-pm-managed-code-field > span em { padding: 1px 4px; border-radius: 999px; background: #f8e2e8; color: var(--pm-brand); font-size: 9px; font-style: normal; font-weight: 800; }
.aibos-pm-managed-code-field select { border-color: #d8b9c2; background-color: #fff7f9; color: #6f263c; font-weight: 750; }
.aibos-pm-detail-description textarea { min-height: 76px; padding: 6px 7px; resize: vertical; }
.aibos-pm-detail-grid input:focus,
.aibos-pm-detail-grid select:focus,
.aibos-pm-detail-description textarea:focus { border-color: var(--pm-brand); box-shadow: 0 0 0 2px rgba(141, 49, 72, .12); }
.aibos-pm-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.aibos-pm-metrics div { padding: 10px; background: #f5f7fa; border-radius: 5px; }
.aibos-pm-metrics span,
.aibos-pm-metrics strong { display: block; }
.aibos-pm-metrics span { color: var(--pm-muted); font-size: 12px; }
.aibos-pm-metrics strong { margin-top: 5px; font-size: 16px; }
.aibos-pm-detail-panel footer { padding: 10px 14px; border-top: 1px solid var(--pm-border); background: #fff; text-align: right; }

.aibos-pm-detail-grid-category { grid-template-columns: minmax(120px, .8fr) minmax(0, 1.7fr); }
.aibos-pm-source-field > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 5px; }
.aibos-pm-source-field button { min-height: 30px; padding: 3px 7px; border-color: #d9dfe7; }
.aibos-pm-counted-field { position: relative; }
.aibos-pm-counted-field input { padding-right: 48px; }
.aibos-pm-counted-field > small { position: absolute; right: 8px; bottom: 10px; color: #8995a5; font-size: 12px; }
.aibos-pm-file-control { display: flex; align-items: center; gap: 8px; }
.aibos-pm-file-control input,
.aibos-pm-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.aibos-pm-file-control em { overflow: hidden; color: var(--pm-muted); font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.aibos-pm-main-image-grid { display: grid; grid-template-columns: repeat(5, minmax(54px, 1fr)); gap: 7px; }
.aibos-pm-upload-tile { position: relative; aspect-ratio: 1; min-width: 0; border: 1px dashed #d7dee8; border-radius: 7px; background: #fafbfd; overflow: hidden; }
.aibos-pm-upload-tile > label { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; color: #8c98a8; cursor: pointer; }
.aibos-pm-upload-tile > label span { font-size: 20px; font-weight: 300; }
.aibos-pm-upload-tile > label small { font-size: 12px; }
.aibos-pm-upload-tile input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.aibos-pm-upload-tile.aibos-pm-storage-offline { display:grid; place-items:center; color:#9a858b; text-align:center; font-size:11px; line-height:1.25; }
.aibos-pm-upload-tile.is-local-pending { border-color: rgba(141,49,72,.55); }
.aibos-pm-upload-tile.is-sortable { cursor: grab; }
.aibos-pm-upload-tile.is-sortable:active { cursor: grabbing; }
.aibos-pm-upload-tile.is-dragging { opacity: .45; }
.aibos-pm-upload-tile.is-drag-over { border-color: var(--pm-brand); box-shadow: 0 0 0 2px rgba(141, 49, 72, .16); }
.aibos-pm-page .aibos-pm-upload-preview { width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; }
.aibos-pm-upload-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.aibos-pm-upload-local-replace { position: absolute; z-index: 2; right: 2px; bottom: 2px; display: block !important; width: auto !important; height: auto !important; padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.92); color: var(--pm-brand) !important; font-size: 9px; font-weight: 800; cursor: pointer; }
.aibos-pm-page .aibos-pm-upload-remove { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; min-height: 18px; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .7); color: #fff; line-height: 18px; }
.aibos-pm-subheading { margin-top: 18px !important; }
.aibos-pm-inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aibos-pm-inline-actions > span { color: var(--pm-muted); font-size: 12px; }
.aibos-pm-file-button { position: relative; display: inline-flex; align-items: center; min-height: 30px; padding: 5px 11px; border: 1px solid var(--pm-border); border-radius: 5px; font-size: 12px; font-weight: 700; cursor: pointer; }

.aibos-pm-spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.aibos-pm-spec-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; margin-bottom: 8px; }
.aibos-pm-spec-row label { display: grid; gap: 5px; color: var(--pm-muted); font-size: 12px; }
.aibos-pm-spec-row input { width: 100%; min-width: 0; height: 30px; padding: 4px 7px; border: 1px solid #d9dfe7; border-radius: 7px; background: #f8fafc; }
.aibos-pm-sku-table-wrap { width: 100%; min-width: 0; margin: 9px 0; overflow-x: auto; }
.aibos-pm-sku-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.aibos-pm-sku-table th,
.aibos-pm-sku-table td { min-width: 58px; padding: 4px; border: 1px solid #e1e6ed; background: #fff; white-space: nowrap; }
.aibos-pm-sku-table th { background: #f4f6f9; }
.aibos-pm-sku-table input { width: 100%; min-width: 0; height: 28px; padding: 3px 4px; border: 1px solid #d9dfe7; border-radius: 4px; }
.aibos-pm-sku-image-cell { width: 54px; }
.aibos-pm-sku-image-control { position: relative; width: 44px; height: 36px; margin: auto; overflow: hidden; border: 1px dashed #d7dee8; border-radius: 5px; background: #fafbfd; }
.aibos-pm-sku-image-upload { display: grid; width: 100%; height: 100%; place-items: center; align-content: center; color: #7b8794; cursor: pointer; }
.aibos-pm-sku-image-upload span { font-size: 15px; line-height: 1; }
.aibos-pm-sku-image-upload small { font-size: 12px; }
.aibos-pm-sku-image-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.aibos-pm-sku-image-replace { position: absolute; left: 1px; bottom: 1px; display: grid; width: 14px; height: 14px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--pm-brand); font-size: 12px; line-height: 1; cursor: pointer; }
.aibos-pm-sku-image-replace input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.aibos-pm-page .aibos-pm-sku-image-preview { width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; }
.aibos-pm-sku-image-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.aibos-pm-page .aibos-pm-sku-image-remove { position: absolute; top: 1px; right: 1px; width: 14px; height: 14px; min-height: 14px; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .72); color: #fff; font-size: 12px; line-height: 14px; }
.aibos-pm-dashed-button { border-style: dashed !important; color: #3972b9 !important; }

.aibos-pm-attribute-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.aibos-pm-attribute-grid label { display: grid; grid-template-columns: 1fr; align-items: start; gap: 5px; }
.aibos-pm-attribute-grid label span { color: var(--pm-muted); font-size: 12px; }
.aibos-pm-attribute-grid input,
.aibos-pm-custom-attribute input { min-width: 0; height: 30px; padding: 4px 7px; border: 1px solid #d9dfe7; border-radius: 7px; background: #f8fafc; color: #172033; font: 12px/1.4 Arial, "Microsoft YaHei", sans-serif; outline: 0; }
.aibos-pm-attribute-grid input:focus,
.aibos-pm-custom-attribute input:focus { border-color: var(--pm-brand); box-shadow: 0 0 0 2px rgba(141, 49, 72, .12); }
.aibos-pm-link-button { margin-top: 10px; padding-left: 0 !important; border: 0 !important; color: #3972b9 !important; }
.aibos-pm-custom-attribute { display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; margin-top: 8px; }

.aibos-pm-package-upload-row { display: grid; grid-template-columns: repeat(4, minmax(54px, 1fr)); gap: 18px; margin-bottom: 14px; }
.aibos-pm-editor-toolbar { display: flex; align-items: center; height: 30px; padding: 2px 7px; border: 1px solid #d9dfe7; border-bottom: 0; border-radius: 7px 7px 0 0; background: #f1f4f8; }
.aibos-pm-page .aibos-pm-editor-toolbar button { width: 30px; min-height: 26px; padding: 0; border: 0; background: transparent; }
.aibos-pm-detail-description .aibos-pm-rich-textarea { border-radius: 0 0 7px 7px; }

.aibos-pm-transport-grid { display: flex; align-items: end; gap: 12px; }
.aibos-pm-transport-grid > label { display: grid; grid-template-columns: auto 82px; align-items: center; flex: 0 0 auto; gap: 6px; color: #59677a; font-size: 12px; }
.aibos-pm-transport-grid > label input { height: 28px; padding: 4px 6px; border: 1px solid #d9dfe7; border-radius: 6px; background: #f8fafc; }
.aibos-pm-size-fields { display: grid; grid-template-columns: auto 76px auto 76px auto 76px; align-items: end; gap: 5px; }
.aibos-pm-size-fields > span { align-self: center; color: #59677a; font-size: 12px; }
.aibos-pm-size-fields label { display: flex; align-items: center; gap: 4px; color: #59677a; font-size: 12px; }
.aibos-pm-size-fields input { width: 52px; min-width: 0; height: 28px; padding: 4px 5px; border: 1px solid #d9dfe7; border-radius: 6px; background: #f8fafc; }

.aibos-pm-image-preview-backdrop { position: fixed; z-index: 2000; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 23, 42, .58); }
.aibos-pm-image-preview-backdrop figure { position: relative; display: flex; align-items: center; justify-content: center; width: min(900px, 92vw); height: min(720px, 86vh); margin: 0; padding: 22px; background: #fff; border-radius: 8px; }
.aibos-pm-image-preview-backdrop img { max-width: 100%; max-height: 100%; object-fit: contain; }
.aibos-pm-image-preview-backdrop button { position: absolute; top: 7px; right: 7px; width: 30px; min-height: 30px; padding: 0; border-radius: 50%; font-size: 18px; }
.aibos-pm-image-menu { position: fixed; z-index: 2100; min-width: 96px; padding: 4px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; box-shadow: 0 8px 18px rgba(15, 23, 42, .16); }
.aibos-pm-image-menu button { width: 100%; min-height: 27px; padding: 3px 7px; border: 0; border-radius: 3px; color: #c43b2a; text-align: left; }
.aibos-pm-image-menu button:hover { background: #fff0ed; color: #c43b2a; }
.aibos-pm-table-menu { position: fixed; z-index: 2100; min-width: 132px; padding: 4px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; box-shadow: 0 8px 18px rgba(15, 23, 42, .16); }
.aibos-pm-table-menu button { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 28px; padding: 4px 8px; border: 0; border-radius: 3px; color: #263247; text-align: left; }
.aibos-pm-table-menu button:hover { background: #f8fafc; color: var(--pm-brand); }
.aibos-pm-table-menu kbd { color: #7b8794; font: 10px/1 Arial, "Microsoft YaHei", sans-serif; }

.aibos-pm-print-dialog-backdrop { position: fixed; z-index: 2200; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(45, 32, 36, .48); }
.aibos-pm-print-dialog { width: min(860px, 94vw); max-height: min(760px, 92vh); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--pm-border); border-radius: 14px; background: #fff; box-shadow: 0 22px 54px rgba(100, 54, 61, .2); }
.aibos-pm-print-dialog > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--pm-border); background: var(--pm-soft); }
.aibos-pm-print-dialog > header strong,
.aibos-pm-print-dialog > header span { display: block; }
.aibos-pm-print-dialog > header strong { color: var(--pm-text); font-size: 18px; }
.aibos-pm-print-dialog > header span { margin-top: 3px; color: var(--pm-muted); font-size: 12px; }
.aibos-pm-print-dialog > header button { width: 32px; min-height: 32px; padding: 0; border-radius: 50%; font-size: 18px; }
.aibos-pm-print-dialog-tools { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--pm-border); }
.aibos-pm-print-dialog-tools span { margin-left: auto; color: var(--pm-brand); font-size: 12px; font-weight: 800; }
.aibos-pm-print-dialog-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); overflow: hidden; }
.aibos-pm-print-series-list,
.aibos-pm-print-row-list { min-height: 0; overflow-y: auto; padding: 14px 16px; }
.aibos-pm-print-series-list { border-right: 1px solid var(--pm-border); background: #fffaf8; }
.aibos-pm-print-series-list h4,
.aibos-pm-print-row-list h4 { margin: 0 0 10px; color: var(--pm-text); font-size: 12px; }
.aibos-pm-print-series-list > label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 34px; padding: 6px 7px; border-radius: 7px; cursor: pointer; }
.aibos-pm-print-series-list > label:hover { background: #fff0ed; }
.aibos-pm-print-series-list > label.is-disabled { color: #b9aeb1; cursor: not-allowed; }
.aibos-pm-print-series-list input,
.aibos-pm-print-row-list input { accent-color: var(--pm-brand); }
.aibos-pm-print-series-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 750; }
.aibos-pm-print-series-list small { color: var(--pm-muted); font-size: 12px; }
.aibos-pm-print-row-list > section { margin-bottom: 14px; overflow: hidden; border: 1px solid var(--pm-border); border-radius: 9px; }
.aibos-pm-print-row-list h5 { display: flex; justify-content: space-between; margin: 0; padding: 8px 10px; background: var(--pm-soft); color: var(--pm-brand); font-size: 12px; }
.aibos-pm-print-row-list label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--pm-border); cursor: pointer; }
.aibos-pm-print-row-list label:hover { background: #fffaf8; }
.aibos-pm-print-row-list label span { overflow: hidden; color: var(--pm-text); text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.aibos-pm-print-empty { display: grid; min-height: 220px; place-items: center; color: var(--pm-muted); font-size: 12px; }
.aibos-pm-print-dialog > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--pm-border); background: #fff; }
.aibos-pm-print-host { display: none; }

@media (max-width: 900px) {
  .aibos-pm-page { width: 100%; max-width: 100%; min-height: 620px; overflow: hidden; }
  .aibos-pm-sheet { min-width: 0; }
  .aibos-pm-detail-panel { width: min(680px, calc(100vw - 32px)); max-width: calc(100vw - 32px); min-height: 0; }
  .aibos-pm-detail-head { align-items: flex-start; }
  .aibos-pm-detail-head-actions { flex-wrap: wrap; justify-content: flex-end; }
  .aibos-pm-detail-grid { grid-template-columns: 1fr; }
  .aibos-pm-detail-grid .is-full { grid-column: auto; }
  .aibos-pm-spec-grid { grid-template-columns: 1fr; gap: 0; }
  .aibos-pm-spec-row { grid-template-columns: minmax(0, 1fr) auto; }
  .aibos-pm-sku-table-wrap { width: 100%; }
  .aibos-pm-attribute-grid { grid-template-columns: 1fr; }
  .aibos-pm-transport-grid { flex-wrap: wrap; }
  .aibos-pm-size-fields { grid-template-columns: auto 76px auto 76px auto 76px; }
}

@media (max-width: 520px) {
  .aibos-pm-page { gap: 6px; }
  .aibos-pm-detail-panel { width: calc(100vw - 18px); max-width: calc(100vw - 18px); }
  .aibos-pm-main-image-grid { grid-template-columns: repeat(3, minmax(54px, 1fr)); }
  .aibos-pm-package-upload-row { grid-template-columns: repeat(2, minmax(54px, 1fr)); gap: 14px; }
}

@page {
  size: A4 landscape;
  margin: 1cm 1.5cm 1cm 1.5cm;
}

@media print {
  html,
  body { width: auto !important; height: auto !important; margin: 0 !important; overflow: visible !important; background: #fff !important; }
  body > *:not(.aibos-pm-print-host) { display: none !important; }
  body > .aibos-pm-print-host {
    position: static !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  .aibos-pm-print-page {
    position: relative !important;
    width: 26.7cm !important;
    height: 19cm !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    break-after: page;
    page-break-after: always;
  }
  .aibos-pm-print-page:last-child { break-after: auto; page-break-after: auto; }
  .aibos-pm-print-table {
    position: static !important;
    width: 26.7cm !important;
    min-width: 26.7cm !important;
    max-width: 26.7cm !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    color: #35282c !important;
    background: #fffdfa !important;
    font-family: Arial, "Microsoft YaHei", sans-serif !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .aibos-pm-print-table col,
  .aibos-pm-print-table th,
  .aibos-pm-print-table td {
    width: 1.4833cm !important;
    min-width: 1.4833cm !important;
    max-width: 1.4833cm !important;
  }
  .aibos-pm-print-table th,
  .aibos-pm-print-table td { height: 1.5cm !important; max-height: 1.5cm !important; padding: 0; overflow: hidden; border: 1px solid #ead9d6; background: #fffdfa !important; text-align: center; vertical-align: middle; font-size: 8pt; }
  .aibos-pm-print-table thead > tr:not(.aibos-pm-print-title) th { height: 1cm; border: 1px solid #e1c9c6; background: #f7e9e7 !important; color: #7f2942 !important; font-weight: 800; }
  .aibos-pm-print-table tbody tr:nth-child(even) td { background: #fff9f7 !important; }
  .aibos-pm-print-table th span,
  .aibos-pm-print-table th small { display: block; color: #000 !important; line-height: 1.1; white-space: nowrap; font-size: 8pt; font-weight: 800; }
  .aibos-pm-print-table th span { color: #7f2942 !important; }
  .aibos-pm-print-table th small { margin-top: .1cm; color: #9b5267 !important; }
  .aibos-pm-print-title th { width: 26.7cm !important; max-width: 26.7cm !important; height: 1.7cm; border: 0; border-bottom: 1px solid #ead9d6; background: #fffdfa !important; }
  .aibos-pm-print-title div { display: flex; align-items: center; justify-content: center; gap: .75cm; }
  .aibos-pm-print-title img { width: 1.6cm; height: 1.6cm; object-fit: contain; }
  .aibos-pm-print-title span,
  .aibos-pm-print-title strong,
  .aibos-pm-print-title small { display: block; color: #7f2942 !important; }
  .aibos-pm-print-title strong { font-size: 15pt; line-height: 1.15; }
  .aibos-pm-print-title small { margin-top: .2cm; font-size: 10.5pt; line-height: 1.15; }
  .aibos-pm-print-cell { width: 100%; height: 1.45cm; display: flex; align-items: center; justify-content: center; padding: 2px; overflow: hidden; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
  .aibos-pm-print-table td img { display: block; width: 100%; height: 1.35cm; object-fit: contain; }
  .aibos-pm-print-table thead { display: table-header-group; }
  .aibos-pm-print-table tr { break-inside: avoid; page-break-inside: avoid; }
  .aibos-pm-print-table tbody tr:last-child td { border-bottom: 1px solid #ead9d6 !important; }
  .aibos-pm-print-page-marker { position: absolute; z-index: 1; top: .28cm; right: .08cm; display: flex; align-items: center; justify-content: flex-end; min-width: 2.35cm; max-width: 4.8cm; height: .58cm; padding: 0 .06cm; overflow: hidden; color: #7f2942; background: #fffdfa; text-align: right; text-overflow: ellipsis; white-space: nowrap; font: 9pt/1.2 Arial, "Microsoft YaHei", sans-serif; font-weight: 750; }
}
