.wm-page {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 48px;
}

.wm-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.wm-page-head h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.wm-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.wm-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 18px;
}

.wm-list-panel,
.wm-editor-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

.wm-list-panel {
  min-height: 620px;
  overflow: hidden;
}

.wm-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wm-list-head span {
  color: var(--muted);
  font-size: 12px;
}

.wm-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.wm-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.wm-card.active,
.wm-card:hover {
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(37, 99, 235, 0.14);
}

.wm-card-thumb {
  display: grid;
  place-items: center;
  width: 62px;
  height: 48px;
  overflow: hidden;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.5);
}

.wm-card-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.wm-card strong,
.wm-card span {
  display: block;
}

.wm-card strong {
  overflow: hidden;
  color: white;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.wm-chip {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  margin-right: 6px;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(34, 211, 238, 0.14);
  color: #67e8f9;
  font-size: 10px;
  font-weight: 900;
}

.wm-chip.draft {
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
}

.wm-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.wm-empty strong {
  color: white;
}

.wm-empty[hidden] {
  display: none !important;
}

.wm-editor-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 0;
  min-height: 620px;
  overflow: hidden;
}

.wm-preview-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.wm-product-preview {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 1px),
    linear-gradient(145deg, #fff7ed, #fef2f2 42%, #eff6ff);
  background-size: 28px 28px, 28px 28px, auto;
}

.wm-sample-main {
  position: absolute;
  inset: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  background:
    radial-gradient(circle at 76% 26%, rgba(251, 146, 60, 0.22), transparent 112px),
    radial-gradient(circle at 48% 72%, rgba(96, 165, 250, 0.2), transparent 136px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 237, 213, 0.78));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.wm-sample-title {
  position: absolute;
  left: 24px;
  top: 24px;
  max-width: 320px;
  color: #111827;
  font-size: 34px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.08;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.85);
}

.wm-sample-subtitle {
  position: absolute;
  left: 26px;
  top: 104px;
  border-radius: 999px;
  padding: 8px 14px;
  background: #f97316;
  color: white;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(249, 115, 22, 0.22);
}

.wm-sample-product {
  position: absolute;
  right: 44px;
  bottom: 50px;
  width: 210px;
  height: 250px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 34px 34px 28px 28px;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(160deg, #e5e7eb, #94a3b8 56%, #475569);
  box-shadow: 0 28px 55px rgba(15, 23, 42, 0.24);
}

.wm-sample-product::before {
  content: "";
  position: absolute;
  left: 42px;
  top: 34px;
  width: 118px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 86px 0 rgba(255, 255, 255, 0.22);
}

.wm-sample-product span {
  position: absolute;
  left: -22px;
  right: -22px;
  bottom: 52px;
  height: 24px;
  border-radius: 999px;
  background: #8b5cf6;
  transform: rotate(-12deg);
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.2);
}

.wm-sample-points {
  position: absolute;
  left: 24px;
  bottom: 34px;
  display: grid;
  gap: 10px;
  width: 178px;
}

.wm-sample-points span {
  border: 2px solid rgba(248, 113, 113, 0.28);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.84);
  color: #111827;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.wm-sample-badge {
  position: absolute;
  right: 22px;
  top: 22px;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 4px solid #facc15;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #92400e;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.16);
}

.wm-preview-layer {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.wm-preview-layer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.wm-preview-layer.mode-cover {
  inset: 0;
}

.wm-preview-layer.mode-cover img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.wm-preview-layer.mode-corner {
  right: 24px;
  bottom: 24px;
  width: 90px;
}

.wm-preview-layer.mode-top-left {
  left: 24px;
  top: 24px;
  width: 90px;
}

.wm-preview-layer.mode-center {
  left: 50%;
  top: 50%;
  width: 180px;
  transform: translate(-50%, -50%);
}

.wm-preview-layer.mode-tile {
  inset: -20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--wm-tile-gap, 28px);
  align-content: center;
  justify-items: center;
  transform: rotate(-18deg);
}

.wm-preview-layer.mode-tile img {
  width: var(--wm-tile-width, 82px);
}

.wm-preview-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(52, 211, 153, 0.06);
  color: #a7f3d0;
  font-size: 13px;
}

.wm-form-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
}

.wm-field {
  display: grid;
  gap: 7px;
}

.wm-field span {
  color: #dbeafe;
  font-size: 13px;
  font-weight: 750;
}

.wm-field input,
.wm-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.075);
  color: white;
}

.wm-upload-box {
  display: grid;
  gap: 7px;
  border: 1px dashed rgba(96, 165, 250, 0.35);
  border-radius: 14px;
  padding: 14px;
  background: rgba(59, 130, 246, 0.07);
  color: #dbeafe;
  cursor: pointer;
}

.wm-upload-box input {
  display: none;
}

.wm-upload-box span {
  font-size: 13px;
  font-weight: 850;
}

.wm-upload-box small {
  color: var(--muted);
}

.wm-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wm-range-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  align-items: center;
}

.wm-range-row input {
  accent-color: #22d3ee;
}

.wm-range-row b {
  color: #67e8f9;
  font-size: 13px;
  text-align: right;
}

.wm-default-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(250, 204, 21, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(250, 204, 21, 0.06);
}

.wm-default-row strong,
.wm-default-row small {
  display: block;
}

.wm-default-row small {
  margin-top: 4px;
  color: var(--muted);
}

.wm-message {
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
  font-size: 13px;
}

.wm-message.error {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.wm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.wm-primary-btn,
.wm-secondary-btn,
.wm-danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 11px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 850;
}

.wm-primary-btn {
  color: white;
  background: linear-gradient(90deg, #2563eb, #8b5cf6);
}

.wm-secondary-btn {
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
}

.wm-danger-btn {
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: #fecaca;
  background: rgba(248, 113, 113, 0.08);
}

@media (max-width: 1080px) {
  .wm-layout,
  .wm-editor-panel {
    grid-template-columns: 1fr;
  }

  .wm-form-panel {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}
