

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-tag {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.privacy-badge svg {
  width: 15px;
  height: 15px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.merchant-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.merchant-toggle:hover {
  color: var(--ink);
  border-color: #cfd2d7;
}

.merchant-toggle[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.merchant-toggle svg {
  width: 15px;
  height: 15px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 24px 28px;
  align-items: start;
}

.stage-panel,
.control-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stage-panel {
  min-width: 0;
  padding: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}





.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: #f7f8f9;
  border-color: #cfd2d7;
}



.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-light:hover {
  background: #f2f4f5;
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 540px;
  height: calc(100vh - 280px);
  max-height: 820px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
}

.stage canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.stage video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #aeb4bb;
  text-align: center;
  padding: 24px;
  pointer-events: none;
}

.drop-hint svg {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  color: #6f767e;
}

.drop-hint strong {
  color: #e6e8ea;
  font-size: 17px;
}

.drop-hint span {
  font-size: 13px;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(18, 22, 27, 0.82);
  color: #f2f4f5;
  text-align: center;
  padding: 24px;
}

.overlay p {
  max-width: 360px;
  margin: 0;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status-line {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.control-panel {
  padding: 6px 18px 14px;
}

.control-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.control-section:last-child {
  border-bottom: 0;
}

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

h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.measurement-section h2 em {
  margin-left: 5px;
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.measurement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.measurement-grid > label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.measurement-input {
  display: flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.measurement-input input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 8px;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 13px;
}

.measurement-input input.invalid {
  background: #fff1f0;
  color: #b42318;
}

.measurement-input em {
  padding-right: 8px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.measurement-help {
  margin: -2px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8faf9;
}

.measurement-help summary {
  padding: 9px 11px;
  cursor: pointer;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.measurement-help-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0 11px 11px;
}

.measurement-help-grid section {
  padding: 9px;
  border-radius: 8px;
  background: #fff;
}

.measurement-help-grid h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 12px;
}

.measurement-help-grid ol {
  margin: 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.fit-assessment {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8f9;
}

.fit-assessment strong {
  font-size: 13px;
}

.fit-assessment span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.fit-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.fit-metric {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9edf0;
  color: #59636d;
  font-size: 10px;
  font-weight: 700;
}

.fit-metric.good {
  background: #d9f3e8;
  color: #087443;
}

.fit-metric.caution {
  background: #fff0c9;
  color: #8a5a00;
}

.fit-metric.poor {
  background: #ffe1dc;
  color: #b42318;
}

.fit-assessment.good {
  border-color: #a7d9c5;
  background: #eefaf5;
}

.fit-assessment.good strong {
  color: #087443;
}

.fit-assessment.warning {
  border-color: #efd49b;
  background: #fff9eb;
}

.fit-assessment.warning strong {
  color: #9a6700;
}

.fit-assessment.poor {
  border-color: #f0b4aa;
  background: #fff3f1;
}

.fit-assessment.poor strong {
  color: #b42318;
}

.recommendation-section h2 em {
  margin-left: 5px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.recommendation-score {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.recommendation-card {
  padding: 12px;
  border: 1px solid #c9dcd8;
  border-radius: var(--radius);
  background: var(--surface);
}

.recommendation-card.pending {
  border-color: var(--line);
  background: #f7f8f9;
}

.recommendation-stars {
  margin-bottom: 5px;
  color: #e39b14;
  font-size: 22px;
  letter-spacing: 1px;
  line-height: 1;
}

.recommendation-note {
  margin: 7px 1px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.section-meta {
  color: var(--muted);
  font-size: 12px;
}

.frame-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.frame-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.frame-item:hover {
  border-color: #c9cdd2;
  background: #fafbfc;
}

.frame-item.active {
  border-color: var(--ink);
  background: var(--surface-soft);
  box-shadow: 0 0 0 2px var(--line-strong);
  color: var(--ink);
}

.frame-item .thumb {
  width: 100%;
  aspect-ratio: 10 / 4;
  object-fit: contain;
  background:
    linear-gradient(45deg, #f1f2f4 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(-45deg, #f1f2f4 25%, transparent 25%) 0 0 / 12px 12px,
    #ffffff;
  border-radius: 3px;
}

.frame-select {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 7px 5px 5px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.frame-select span {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.frame-select em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frame-item-actions {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px;
  padding: 0 5px 5px;
}

.frame-item-actions button {
  height: 25px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
}

.frame-item-actions button.active {
  border-color: var(--line-strong);
  background: #e9f8f6;
  color: var(--ink);
}

.frame-favorite {
  color: var(--ink);
  font-size: 15px;
}

.merchant-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.merchant-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.custom-frame-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.custom-frame-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.custom-frame-item img {
  width: 76px;
  height: 30px;
  object-fit: contain;
  border-radius: 3px;
  background:
    linear-gradient(45deg, #f1f2f4 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(-45deg, #f1f2f4 25%, transparent 25%) 0 0 / 12px 12px,
    #ffffff;
}

.custom-frame-item span {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-warn {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.process-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f2f4;
  color: #63676f;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.process-badge.ready {
  background: #e8f7f0;
  color: #087443;
}

.process-badge.needs_review {
  background: #fef3c7;
  color: #92400e;
}

.process-badge.missing_image {
  background: #fef3f2;
  color: #b42318;
}

.process-badge.processing {
  background: #e0f2fe;
  color: #026aa2;
}

.status-label {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.custom-frame-item button {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

.custom-frame-item button:hover {
  color: #b42318;
  border-color: #f3c4c0;
  background: #fef3f2;
}

.custom-frame-item button svg {
  width: 14px;
  height: 14px;
}

.merchant-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.merchant-actions .btn {
  flex: 1;
}

.slider-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.slider-row:last-child {
  margin-bottom: 0;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--ink);
  font-weight: 600;
}

.toggle-row em {
  margin-left: 5px;
  color: var(--warm);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.toggle-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--ink);
}

.control-hint {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.slider-row label {
  color: var(--muted);
  font-size: 13px;
}

.slider-row output {
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--ink);
}

.privacy-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.privacy-note h2 {
  margin-bottom: 8px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 26px;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  transform: translateX(-50%);
  max-width: min(90vw, 440px);
  padding: 11px 16px;
  border-radius: var(--radius);
  background: #20242a;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.24);
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 8px 14px 24px;
  }

  .topbar,
  .footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-tag {
    display: none;
  }

  .stage {
    height: auto;
    min-height: 430px;
    max-height: 70vh;
  }

  .privacy-badge {
    font-size: 12px;
    padding: 7px 10px;
  }
}

@media (max-width: 560px) {
  .toolbar {
    flex-wrap: wrap;
  }

  .btn {
    flex: 1 1 auto;
    padding: 0 10px;
  }

  .stage {
    min-height: 340px;
  }

  .frame-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .frame-item {
    padding: 0;
  }

  .privacy-badge span {
    display: none;
  }
}

.customer-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 9px;
}

.customer-filter-grid label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.customer-filter-grid label > span {
  flex: none;
  color: var(--muted);
  font-size: 10px;
}

.customer-filter-grid select {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}

.collection-filter {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.collection-filter .chip {
  flex: none;
  height: 27px;
  padding: 0 9px;
  font-size: 10px;
}

.compare-tray {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #effaf8;
  color: var(--ink);
  font-size: 11px;
}

.compare-tray > span {
  flex: 1;
}

.camera-quality {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 28px);
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(20, 24, 29, 0.76);
  color: #fff;
  font-size: 11px;
  transform: translateX(-50%);
  
}

.camera-quality > span {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #eab308;
}

.camera-quality.good > span {
  background: #22c55e;
}

.camera-quality.warning > span {
  background: #f59e0b;
}

.measurement-assist {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 10px;
}

.measurement-assist span {
  flex: 1;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.measurement-assist span[data-tone="warning"] {
  color: #b45309;
  font-weight: 650;
}

.measurement-assist span[data-tone="applied"] {
  color: var(--ink);
  font-weight: 650;
}

.customer-modal-card {
  width: min(500px, 100%);
}

.camera-permission-copy {
  color: var(--muted);
  font-size: 13px;
}

.camera-permission-copy p {
  margin: 0 0 10px;
  color: var(--ink);
}

.camera-permission-copy ul {
  margin: 0;
  padding-left: 20px;
}

.compare-modal-card {
  width: min(900px, 100%);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.compare-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.compare-card img {
  display: block;
  width: 100%;
  aspect-ratio: 10 / 4;
  object-fit: contain;
  border-radius: 5px;
  background: #f7f8f9;
}

.compare-card h3 {
  margin: 9px 0 0;
  font-size: 14px;
}

.compare-card > p {
  margin: 1px 0 8px;
  color: var(--muted);
  font-size: 11px;
}

.compare-card dl {
  margin: 0 0 10px;
}

.compare-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.compare-card dt {
  color: var(--muted);
}

.compare-card dd {
  margin: 0;
  text-align: right;
}

.compare-card-actions {
  display: grid;
  gap: 6px;
}

.workbench-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.workbench-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  text-align: left;
}

.workbench-card strong {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.15;
}

.workbench-card span {
  margin-top: 4px;
  font-size: 11px;
}

.workbench-card.good {
  border-color: #b5dfcc;
  background: #f1fbf6;
}

.workbench-card.accent {
  border-color: #abd8d3;
  background: var(--surface-soft);
}

.workbench-card.warning {
  border-color: #eed49c;
  background: #fff9eb;
}

.workbench-card.danger {
  border-color: #efb8af;
  background: #fff4f2;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 12px;
}

.workbench-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.workbench-panel h3 {
  margin: 0;
  font-size: 14px;
}

.workbench-task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.workbench-task-list button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.workbench-task-list em {
  color: var(--ink);
  font-style: normal;
}

.workbench-usage {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: baseline;
}

.workbench-usage strong {
  color: var(--ink);
  font-size: 18px;
}

.workbench-usage span {
  color: var(--muted);
  font-size: 12px;
}

.publish-check-mini {
  width: 100%;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
}

.publish-check-mini.ready {
  border-color: #b5dfcc;
  background: #f1fbf6;
}

.publish-check-mini summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.publish-check-mini ul,
.publish-checklist {
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.publish-check-mini li,
.publish-checklist li {
  margin: 3px 0;
  color: var(--muted);
  font-size: 10px;
}

.publish-check-mini li.ok,
.publish-checklist li.ok {
  color: #087443;
}

.publish-check-mini li.blocked,
.publish-checklist li.blocked {
  color: #b42318;
}

.publish-check-mini li.warning,
.publish-checklist li.warning {
  color: #946200;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.review-main {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 120px;
  gap: 14px;
  padding: 12px;
}

.review-main > img,
.review-cutout-preview {
  width: 100%;
  aspect-ratio: 10 / 4;
  align-self: start;
  border-radius: 5px;
  background: #f7f8f9;
}

.review-cutout-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
}

.review-cutout-preview span {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 3px;
}

.review-cutout-preview span + span {
  border-left: 1px solid rgba(127, 127, 127, 0.24);
}

.review-cutout-preview .light {
  background: #fff;
}

.review-cutout-preview .mid {
  background: #9aa0a6;
}

.review-cutout-preview .dark {
  background: #20252b;
}

.review-cutout-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.review-info h3,
.review-info p {
  margin: 0;
}

.review-info p {
  color: var(--muted);
  font-size: 11px;
}

.publish-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 10px;
}

.publish-checklist li {
  display: flex;
  gap: 5px;
  font-size: 11px;
}

.review-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-actions .btn {
  width: 100%;
}

.review-versions {
  padding: 0 12px 12px;
}

.version-list {
  border-top: 1px dashed var(--line);
}

.version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
}

.version-item span {
  display: flex;
  flex-direction: column;
}

.version-item strong {
  font-size: 11px;
}

.version-item em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.usage-table-wrap {
  overflow-x: auto;
}

.usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.usage-table th,
.usage-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.usage-table th {
  color: var(--muted);
  font-weight: 600;
}

.usage-table td span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 980px) {
  .workbench-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workbench-grid {
    grid-template-columns: 1fr;
  }

  .review-main {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .review-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .customer-filter-grid,
  .compare-grid,
  .publish-checklist {
    grid-template-columns: 1fr;
  }

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

  .review-main {
    grid-template-columns: 1fr;
  }

  .review-main > img,
  .review-cutout-preview {
    max-height: 120px;
  }

  .review-actions {
    grid-column: auto;
  }
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.frame-empty {
  margin: 4px 0 12px;
  padding: 16px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.frame-search {
  width: 100%;
  height: 38px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}


.chip {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.chip-count {
  margin-left: 4px;
  opacity: 0.7;
  font-size: 10px;
}

.chip:hover {
  color: var(--ink);
  border-color: #cfd2d7;
}

.chip.active {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.admin-body {
  background: #eef0f2;
}

.admin-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 24px 40px;
}

.admin-login {
  display: grid;
  place-items: center;
  min-height: 62vh;
}

.login-card {
  width: min(380px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

.login-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.login-card input,
.pin-form input,
.category-add input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}


.login-card .btn {
  width: 100%;
  margin-top: 10px;
}

.login-error {
  margin: 12px 0 0 !important;
  color: #b42318 !important;
  font-size: 13px;
}

.admin-main {
  padding-top: 8px;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab-btn {
  flex: none;
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--ink);
  border-color: #cfd2d7;
}


.tab-panel {
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.panel-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.product-list-scroll {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.batch-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.product-card {
  position: relative;
}

.sku-row {
  position: relative;
}

.batch-checkbox {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 16px;
  height: 16px;
  accent-color: var(--ink);
}

.batch-checkbox.sku-batch-check {
  position: static;
  flex: none;
  align-self: center;
}

.picker-banner {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
}

.wizard-choose-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.product-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: contain;
  background:
    linear-gradient(45deg, #f1f2f4 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(-45deg, #f1f2f4 25%, transparent 25%) 0 0 / 14px 14px,
    #ffffff;
}

.product-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 6px;
}

.product-card-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-body em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.product-card-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 0 12px 12px;
}

.product-card-actions .btn {
  width: 100%;
  padding: 0 6px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 18, 22, 0.5);
}

.fatal-error {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 16px;
  background: #b42318;
  color: #fff;
  font-size: 13px;
  text-align: center;
}

.modal-card {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.28);
}

#skuWizard .modal-card {
  width: min(900px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.image-preview-card {
  width: min(92vw, 1100px);
}

#imagePreviewImg {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  margin: 0 auto;
  border-radius: 6px;
  background: #fff;
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 16px;
}

.wizard-steps span {
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f2f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.wizard-steps span.active {
  background: var(--surface-soft);
  color: var(--ink);
}

#wizardBody {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#wizardBody label {
  color: var(--muted);
  font-size: 13px;
}

.wizard-select,
#wizardBody input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.wizard-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background:
    linear-gradient(45deg, #f1f2f4 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(-45deg, #f1f2f4 25%, transparent 25%) 0 0 / 14px 14px,
    #ffffff;
}

.wizard-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.wizard-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.wizard-size-card {
  padding: 14px;
  border: 1px solid #d9e5e3;
  border-radius: var(--radius);
  background: #f7fbfa;
}

.wizard-size-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.wizard-size-card p,
.wizard-size-card > span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.wizard-size-card .sku-size-grid {
  margin: 12px 0 8px;
}

.wizard-error {
  margin: 0;
  color: #b42318;
  font-size: 13px;
  min-height: 18px;
}

.upload-guide {
  padding: 14px;
  border: 1px solid #d9e5e3;
  border-radius: var(--radius);
  background: #f7fbfa;
}

.upload-guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.upload-guide h3 {
  margin: 0 0 3px;
  font-size: 16px;
}

.upload-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.quality-pill,
.required-mark,
.recommended-mark {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.quality-pill,
.recommended-mark {
  color: #8a4b08;
  background: #fff4df;
}

.required-mark {
  color: #b42318;
  background: #fff0ef;
}

.upload-source-policy {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #cfe3df;
  border-radius: 7px;
  color: #38504d;
  background: #f2faf8;
  font-size: 12px;
  line-height: 1.6;
}

.upload-source-policy strong {
  flex: none;
  color: var(--ink);
}

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

.upload-example {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.upload-example img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #f5f6f7;
}

.upload-example:nth-child(1) img {
  object-fit: contain;
  box-sizing: border-box;
  padding: 14px 16px;
  background: #f7f7f4;
}

.upload-example:nth-child(2) img,
.upload-example:nth-child(3) img {
  object-fit: contain;
  box-sizing: border-box;
  padding: 8px 10px;
  background: #fff;
}

.upload-guide-caption {
  margin-top: 9px !important;
  color: #7c4308 !important;
  font-size: 12px !important;
}

.upload-example.bad img {
  object-position: center;
}

.upload-example figcaption {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 9px;
}

.upload-example figcaption strong {
  font-size: 13px;
}

.upload-example.good figcaption strong {
  color: var(--ink);
}

.upload-example.bad figcaption strong {
  color: #b42318;
}

.upload-example figcaption span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.upload-requirements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 24px;
  margin: 12px 0 0;
  padding-left: 20px;
  color: #4c535c;
  font-size: 12px;
}

.source-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.source-upload-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.source-upload-card[hidden] { display: none; }
.source-upload-grid:not(:has(.source-upload-card:nth-child(3):not([hidden]))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#wizardIndependentTemples { width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 4px 0 0; accent-color: var(--ink); }
.upload-source-policy.upload-temple-option { flex-direction: row; align-items: flex-start; gap: 8px; }
.upload-requirements-details { margin-top: 12px; font-size: 12px; color: var(--muted); }
.upload-requirements-details summary { cursor: pointer; }

.source-upload-card.has-image {
  border-color: var(--line-strong);
}

.source-upload-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.source-upload-card > img,
.wizard-source-summary img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: contain;
  border: 1px solid #eef0f2;
  border-radius: 6px;
  background: #f7f8f9;
}

.source-upload-empty {
  display: grid;
  place-items: center;
  height: 160px;
  padding: 20px;
  border: 1px dashed #cfd4d8;
  border-radius: 6px;
  background: #fafbfc;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.source-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.upload-quality {
  padding: 8px 9px;
  border-radius: 6px;
  font-size: 12px;
}

.upload-quality strong,
.upload-quality span {
  display: block;
}

.upload-quality span {
  margin-top: 1px;
  color: var(--muted);
}

.upload-quality.ok {
  color: var(--ink);
  background: #effaf8;
}

.upload-quality.warning {
  color: #7c4308;
  background: #fff7e8;
}

.upload-quality ul {
  margin: 5px 0 0;
  padding-left: 17px;
}

.upload-compatibility-note {
  margin: 0;
  padding: 9px 11px;
  border-radius: 6px;
  background: #fff7e8;
  color: #7c4308;
  font-size: 12px;
}

.wizard-source-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wizard-source-summary figure {
  margin: 0;
}

.wizard-source-summary figcaption {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.wizard-missing-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 160px;
  padding: 18px;
  border: 1px dashed #d7b36f;
  border-radius: 6px;
  background: #fffaf0;
  color: #7c4308;
  text-align: center;
}

.wizard-missing-side span {
  font-size: 12px;
}

.process-detail {
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-wizard-summary {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.product-wizard-summary span {
  color: var(--muted);
  font-size: 13px;
}

.product-wizard-summary strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.wizard-library {
  margin-top: 10px;
}

.wizard-library-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.wizard-asset-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.wizard-asset-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.wizard-asset-item img {
  flex: none;
  width: 64px;
  height: 36px;
  object-fit: contain;
  border-radius: 3px;
  background:
    linear-gradient(45deg, #f1f2f4 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(-45deg, #f1f2f4 25%, transparent 25%) 0 0 / 12px 12px,
    #ffffff;
}

.wizard-asset-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wizard-asset-meta span {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wizard-asset-meta em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sku-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.sku-filters .frame-search {
  flex: 1 1 220px;
  margin: 0;
}

.sku-filters .product-category-select {
  flex: none;
  width: 150px;
}

.asset-toolbar {
  margin-bottom: 10px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-bar label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.filter-bar .product-category-select {
  flex: none;
  min-width: 132px;
  height: 36px;
}

.filter-bar .frame-search {
  flex: 1 1 220px;
  margin: 0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.page-btn.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.asset-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.batch-checkbox.asset-batch-check {
  top: 8px;
  left: 8px;
  right: auto;
}

.asset-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background:
    linear-gradient(45deg, #f1f2f4 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(-45deg, #f1f2f4 25%, transparent 25%) 0 0 / 14px 14px,
    #ffffff;
}

.asset-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 10px 6px;
}

.asset-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-type,
.asset-usage {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.asset-actions {
  display: flex;
  gap: 8px;
  padding: 0 10px 10px;
}

.asset-actions .btn {
  flex: 1;
  padding: 0 6px;
}

.admin-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-side-section {
  grid-column: 1;
}

.admin-sku-section {
  grid-column: 2;
  grid-row: 1 / span 6;
}

.admin-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
}

.category-row span {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.category-row button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 6px;
}

.category-row button:hover {
  color: var(--ink);
}

.category-add {
  display: flex;
  gap: 8px;
}

.category-add input {
  flex: 1;
  height: 36px;
}

.frame-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.frame-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.frame-row > img {
  flex: none;
  width: 96px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
  background:
    linear-gradient(45deg, #f1f2f4 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(-45deg, #f1f2f4 25%, transparent 25%) 0 0 / 12px 12px,
    #ffffff;
}

.frame-image-empty {
  display: grid;
  place-items: center;
  flex: none;
  width: 96px;
  height: 48px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: #fafbfc;
  color: var(--muted);
  font-size: 11px;
}

.frame-fields {
  flex: 1 1 280px;
  min-width: 240px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 130px;
  gap: 8px;
  min-width: 0;
}

.frame-fields input,
.frame-fields select {
  min-width: 0;
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.sku-size-editor {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.sku-size-editor summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.sku-size-editor p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 11px;
}

.sku-size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.sku-size-editor .sku-size-grid {
  margin-top: 10px;
}

.sku-size-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.sku-size-grid input {
  width: 100%;
}

.frame-meta {
  flex: none;
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.status-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.status-btn.draft {
  background: #f7f8f9;
  color: var(--muted);
}

.frame-actions {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
}

.frame-actions .btn {
  width: 100%;
}

.pin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.pin-form .btn {
  width: 100%;
}

.pin-message {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  min-height: 18px;
}

.upload-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.upload-rules span::before {
  content: "• ";
  color: var(--ink);
}

.sku-upload {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sku-upload select {
  flex: 1;
  min-width: 0;
}

.filter-label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.product-add {
  flex-wrap: wrap;
}

.product-add input {
  flex: 1 1 100%;
}

.product-category-select {
  height: 36px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.product-name-label {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

@media (max-width: 980px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .admin-sku-section {
    grid-column: auto;
    grid-row: auto;
  }

  .frame-row {
    flex-direction: column;
  }

  .frame-fields {
    grid-template-columns: 1fr;
  }

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

  .frame-meta,
  .frame-actions {
    width: 100%;
  }

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

@media (max-width: 560px) {
  .admin-layout {
    padding-left: 14px;
    padding-right: 14px;
  }

  .frame-row {
    grid-template-columns: 1fr;
  }

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

  .frame-meta,
  .frame-actions {
    flex-direction: row;
    align-items: center;
  }

  .upload-guide-head,
  .source-upload-grid,
  .source-upload-grid:not(:has(.source-upload-card:nth-child(3):not([hidden]))),
  .wizard-source-summary {
    grid-template-columns: 1fr;
  }

  .upload-guide-head {
    display: flex;
    flex-direction: column;
  }

  .upload-source-policy {
    flex-direction: column;
    gap: 2px;
  }

  .upload-example-grid,
  .upload-requirements {
    grid-template-columns: 1fr;
  }

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