body[data-view="sku"] .shell,
body[data-view="sku"] .global-status {
  display: none;
}

body[data-view="sku"] .sku-module {
  display: block;
}

.sku-module {
  min-height: calc(100vh - 110px);
  color: var(--ink);
}

.sku-module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 4px 4px 14px;
  border-bottom: 1px solid var(--line);
}

.sku-module-head h2 {
  margin-top: 2px;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.1;
}

.sku-module-head p:last-child {
  margin-top: 8px;
  color: var(--muted);
}

.sku-head-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.sku-head-badges span {
  padding: 6px 10px;
  border: 1px solid rgba(84, 229, 255, 0.2);
  border-radius: 999px;
  color: rgba(220, 250, 245, 0.82);
  background: rgba(25, 52, 51, 0.46);
  font-size: 11px;
  font-weight: 800;
}

.sku-workspace {
  display: grid;
  grid-template-columns: minmax(290px, 0.82fr) minmax(460px, 1.46fr) minmax(250px, 0.72fr);
  gap: 12px;
  min-height: 680px;
}

.sku-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(31, 35, 35, 0.86), rgba(8, 10, 10, 0.92));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 18px 44px rgba(0, 0, 0, 0.24);
}

.sku-config-panel,
.sku-template-panel,
.sku-export-panel {
  max-height: calc(100vh - 190px);
  overflow: auto;
}

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

.sku-panel-head.compact {
  margin-bottom: 8px;
}

.sku-panel-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sku-panel-head h3 {
  font-size: 17px;
}

.sku-panel-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sku-step {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(101, 231, 255, 0.24);
  border-radius: 7px;
  color: #77efff;
  background: rgba(49, 115, 121, 0.2);
  font-size: 11px;
  font-weight: 900;
}

.sku-upload-zone {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 16px;
  border: 1px dashed rgba(104, 231, 255, 0.34);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  background: rgba(8, 18, 18, 0.72);
  transition: border-color 160ms ease, background 160ms ease;
}

.sku-upload-zone:hover {
  border-color: rgba(104, 231, 255, 0.66);
  background: rgba(15, 34, 34, 0.76);
}

.sku-upload-zone strong {
  color: #f4fbf9;
}

.sku-upload-zone span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.sku-upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sku-upload-status {
  min-height: 24px;
  padding: 7px 2px 2px;
  color: var(--muted);
  font-size: 12px;
}

.sku-image-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.sku-image-card {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.sku-image-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 5px;
  background: #f4f4f2;
}

.sku-image-card input {
  min-width: 0;
  height: 36px;
  padding-inline: 9px;
}

.sku-image-card button {
  height: 34px;
  padding: 6px 10px;
  color: #ffaaa1;
  border-color: rgba(255, 128, 117, 0.22);
}

.sku-divider {
  height: 1px;
  margin: 15px 0;
  background: var(--line);
}

.sku-field-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.sku-field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sku-field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sku-pack-fieldset {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}

.sku-pack-fieldset legend {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sku-segmented {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.sku-segmented label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 800;
}

.sku-segmented label:has(input:checked) {
  color: #fff;
  border-color: rgba(255, 142, 109, 0.5);
  background: linear-gradient(135deg, rgba(255, 141, 114, 0.48), rgba(173, 72, 255, 0.42));
}

.sku-segmented input {
  position: absolute;
  opacity: 0;
}

.sku-check-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.sku-check-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.025);
}

.sku-check-row input {
  width: 16px;
  height: 16px;
}

.sku-custom-builder {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.sku-custom-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}

.sku-combo-summary {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(104, 231, 255, 0.18);
  border-radius: 7px;
  background: rgba(41, 91, 92, 0.12);
}

.sku-combo-summary strong {
  color: #fff;
  font-size: 18px;
}

.sku-combo-summary span {
  color: var(--muted);
  font-size: 12px;
}

.sku-custom-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.sku-custom-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.sku-custom-item button {
  min-width: 30px;
  height: 28px;
  padding: 3px 7px;
  color: #ffaaa1;
}

.sku-template-panel > label {
  margin-bottom: 10px;
}

.sku-background-card,
.sku-control-card {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(104, 231, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.sku-control-card textarea {
  min-height: 74px;
}

.sku-background-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sku-background-top label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(238, 247, 244, 0.88);
}

.sku-background-top input {
  width: 16px;
  height: 16px;
}

.sku-background-top button {
  height: 32px;
  flex: none;
}

.sku-background-top input[type="checkbox"] {
  flex: none;
}

.sku-background-upload {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px dashed rgba(104, 231, 255, 0.24);
  border-radius: 6px;
  cursor: pointer;
  background: rgba(8, 18, 18, 0.6);
}

.sku-background-upload strong {
  color: #f4fbf9;
}

.sku-background-upload span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.sku-background-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sku-control-card input[type="number"],
.sku-control-card select {
  height: 38px;
}

.sku-control-card input[type="color"] {
  height: 38px;
  padding: 4px;
  cursor: pointer;
}

.sku-canvas-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.025) 25%, transparent 25%),
    #080a0a;
  background-size: 24px 24px;
}

.sku-canvas-stage img {
  display: block;
  width: min(100%, 560px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.sku-canvas-stage img[hidden] {
  display: none !important;
}

.sku-module button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: saturate(0.35);
  box-shadow: none;
}

.sku-empty-state {
  display: grid;
  gap: 7px;
  max-width: 320px;
  text-align: center;
  color: var(--muted);
}

.sku-empty-state strong {
  color: #dff5ef;
  font-size: 18px;
}

.sku-edit-overlay {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.sku-edit-handle {
  position: absolute;
  display: grid;
  place-items: start;
  min-width: 34px;
  min-height: 28px;
  padding: 4px 6px;
  border: 1px solid rgba(103, 230, 255, 0.86);
  border-radius: 8px;
  color: #ecfffb;
  background: rgba(11, 24, 24, 0.2);
  box-shadow: 0 0 0 1px rgba(11, 24, 24, 0.55), 0 0 22px rgba(103, 230, 255, 0.18);
  cursor: move;
  pointer-events: auto;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  transform-origin: center;
  will-change: transform;
}

.sku-edit-handle.active {
  z-index: 5;
  border-color: #ff8f73;
  background: rgba(255, 126, 118, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 143, 115, 0.45), 0 0 28px rgba(185, 78, 255, 0.28);
}

.sku-edit-handle.group-active {
  border-color: rgba(185, 78, 255, 0.92);
  background: rgba(185, 78, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(185, 78, 255, 0.32), 0 0 22px rgba(185, 78, 255, 0.22);
}

.sku-edit-handle.group-box {
  z-index: 4;
  place-items: center;
  border-style: dashed;
  border-color: rgba(103, 230, 255, 0.9);
  color: #ffffff;
  background: rgba(103, 230, 255, 0.08);
}

.sku-layout-editor {
  display: grid;
  grid-template-columns: auto minmax(130px, 0.8fr) minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(104, 231, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.sku-edit-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.sku-edit-toggle input {
  width: 16px;
  height: 16px;
}

.sku-layout-editor select,
.sku-layout-editor input[type="range"] {
  width: 100%;
}

.sku-layout-editor button {
  height: 38px;
  padding: 6px 12px;
}

.sku-layout-editor p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.sku-action-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.sku-progress-card {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

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

.sku-progress-copy button {
  width: auto;
  height: 30px;
  padding: 4px 10px;
}

.sku-progress-card progress {
  width: 100%;
  height: 8px;
  accent-color: #67e6ff;
}

.sku-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.sku-preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.sku-preview-card button {
  display: grid;
  gap: 5px;
  width: 100%;
  height: auto;
  padding: 0 0 7px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.sku-preview-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #fff;
}

.sku-preview-card strong,
.sku-preview-card span {
  overflow: hidden;
  padding-inline: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.sku-preview-card span {
  color: var(--muted);
}

.sku-export-summary {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 145, 106, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 141, 114, 0.11), rgba(173, 72, 255, 0.08));
}

.sku-export-summary span,
.sku-export-summary small {
  color: var(--muted);
}

.sku-export-summary strong {
  font-size: 28px;
  line-height: 1.1;
}

.sku-export-panel > button {
  width: 100%;
  margin-bottom: 8px;
}

.sku-limit-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.sku-limit-list h4 {
  margin-bottom: 2px;
}

.sku-limit-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 12px;
}

.sku-limit-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.sku-limit-list strong {
  color: #ddf5ef;
}

@media (max-width: 1180px) {
  .sku-module {
    margin-inline: 12px;
  }

  .sku-workspace {
    grid-template-columns: minmax(280px, 0.8fr) minmax(430px, 1.2fr);
  }

  .sku-export-panel {
    grid-column: 1 / -1;
    max-height: none;
  }
}

@media (max-width: 820px) {
  .sku-module-head {
    flex-direction: column;
  }

  .sku-head-badges {
    justify-content: flex-start;
  }

  .sku-workspace {
    grid-template-columns: 1fr;
  }

  .sku-config-panel,
  .sku-template-panel,
  .sku-export-panel {
    grid-column: auto;
    max-height: none;
  }

  .sku-field-grid.two,
  .sku-field-grid.three,
  .sku-layout-editor,
  .sku-action-row {
    grid-template-columns: 1fr;
  }

  .sku-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .sku-image-list,
  .sku-check-row,
  .sku-custom-slots {
    grid-template-columns: 1fr;
  }

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