@font-face { font-family:"Inter"; font-style:normal; font-weight:400; font-display:swap; src:url("/fonts/inter-400.ttf") format("truetype"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:500; font-display:swap; src:url("/fonts/inter-500.ttf") format("truetype"); }
@font-face { font-family:"Inter"; font-style:normal; font-weight:600; font-display:swap; src:url("/fonts/inter-600.ttf") format("truetype"); }
@font-face { font-family:"JetBrains Mono"; font-style:normal; font-weight:500; font-display:swap; src:url("/fonts/jetbrains-mono-500.ttf") format("truetype"); }

:root {
  color-scheme: light;
  --text: #172026;
  --muted: #68737d;
  --line: #d9e1e7;
  --surface: #ffffff;
  --band: #f4f7f9;
  --accent: #1677ff;
  --accent-dark: #0f5fc9;
}

/* Single-SKU workspace visual system — intentionally scoped to this page only. */
body.single-workspace-mode {
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --text: #17202a;
  --muted: #64748b;
  --line: #e2e8f0;
  --band: #f5f7fa;
}

body.single-workspace-mode .layout {
  gap: 24px;
  padding: 24px;
}

body.single-workspace-mode .sku-layout {
  grid-template-columns: 352px minmax(0, 1fr);
}

body.single-workspace-mode .sku-sidebar section,
body.single-workspace-mode #skuDetail > .band {
  padding: 20px;
  border-color: #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.single-workspace-mode #skuDetail {
  display: grid;
  gap: 24px;
}

body.single-workspace-mode #skuDetail.hidden {
  display: none !important;
}

body.single-workspace-mode .detail-header {
  padding: 20px 24px;
  border-color: #e2e8f0;
}

body.single-workspace-mode h1 { font-size: 24px; line-height: 32px; }
body.single-workspace-mode h2 { margin-bottom: 16px; font-size: 20px; line-height: 28px; }
body.single-workspace-mode h3 { font-size: 16px; line-height: 24px; }
body.single-workspace-mode p,
body.single-workspace-mode label,
body.single-workspace-mode button,
body.single-workspace-mode input,
body.single-workspace-mode select,
body.single-workspace-mode textarea { font-size: 14px; line-height: 22px; }

body.single-workspace-mode button {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
}

body.single-workspace-mode input,
body.single-workspace-mode select,
body.single-workspace-mode textarea {
  min-height: 40px;
  border-color: #cbd5e1;
  border-radius: 8px;
}

body.single-workspace-mode input:focus,
body.single-workspace-mode select:focus,
body.single-workspace-mode textarea:focus {
  outline: 3px solid rgba(37, 99, 235, 0.14);
  border-color: #2563eb;
}

body.single-workspace-mode .section-head,
body.single-workspace-mode .detail-header { gap: 16px; }

body.single-workspace-mode .upload-grid,
body.single-workspace-mode .workflow-steps,
body.single-workspace-mode .review-grid { gap: 16px; }

body.single-workspace-mode .workflow-step {
  padding: 16px;
  border-color: #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

body.single-workspace-mode .service-status { font-size: 12px; }

body.single-workspace-mode .topbar { flex-wrap: wrap; }
body.single-workspace-mode .topbar-actions {
  min-width: 0;
  flex: 1 1 560px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.single-workspace-mode .model-select-label { max-width: min(100%, 320px); }
body.single-workspace-mode .model-select-label select { max-width: 100%; }

@media (max-width: 900px) {
  body.single-workspace-mode .layout { gap: 16px; padding: 16px; }
  body.single-workspace-mode .sku-layout { grid-template-columns: minmax(0, 1fr); }
  body.single-workspace-mode .topbar-actions { justify-content: flex-start; }
}

/* Remaining workspace pages share tokens, while layout rules stay page-scoped. */
body.review-workspace-mode,
body.style-workspace-mode,
body.outfit-workspace-mode,
body.stats-workspace-mode,
body.merchant-workspace-mode,
body.auth-workspace-mode {
  --accent:#2563eb; --accent-dark:#1d4ed8; --text:#0f172a;
  --muted:#64748b; --line:#e2e8f0; --band:#f8fafc;
}

:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) .layout { gap:24px; padding:24px; }
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) :is(.workspace,.band,.admin-stats-block,.merchant-admin-panel) { min-width:0; }
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) .topbar { flex-wrap:wrap; }
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) .topbar-actions { min-width:0; flex:1 1 560px; flex-wrap:wrap; justify-content:flex-end; }
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) h1,
body.auth-workspace-mode .login-card h1 { font-size:24px; line-height:32px; }
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) h2 { font-size:20px; line-height:28px; }
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) h3 { font-size:16px; line-height:24px; }
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode,body.auth-workspace-mode) :is(p,label,button,input,select,textarea,.meta,small) { font-size:14px; line-height:22px; }
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode,body.auth-workspace-mode) button { min-height:40px; padding:8px 16px; border-radius:8px; }
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode,body.auth-workspace-mode) :is(input,select,textarea) { min-height:40px; border-color:#cbd5e1; border-radius:8px; }
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode,body.auth-workspace-mode) :is(input,select,textarea):focus { outline:3px solid rgba(37,99,235,.14); border-color:#2563eb; }

body.review-workspace-mode #reviewSummaryPanel,
body.style-workspace-mode #styleClonePanel,
body.outfit-workspace-mode #outfitReplicatePanel,
body.stats-workspace-mode #adminStatsPanel,
body.merchant-workspace-mode #merchantAdminPanel { padding:20px; border-color:#e2e8f0; border-radius:12px; gap:16px; }
body.review-workspace-mode :is(.review-group-card,.review-card),
body.style-workspace-mode .style-clone-card,
body.outfit-workspace-mode .style-clone-card,
body.stats-workspace-mode :is(.admin-stat-card,.admin-stats-block),
body.merchant-workspace-mode :is(.merchant-admin-detail,.merchant-detail-kpis>div) { border-color:#e2e8f0; border-radius:12px; box-shadow:0 1px 2px rgba(15,23,42,.04); }
body.review-workspace-mode :is(.review-summary-toolbar,.review-grid),
body.style-workspace-mode :is(.style-clone-form,.style-clone-controls,.style-clone-result-grid),
body.outfit-workspace-mode :is(.style-clone-form,.style-clone-controls,.style-clone-result-grid),
body.stats-workspace-mode :is(.admin-stats-toolbar,.admin-stats-kpis,.admin-stats-summary-grid),
body.merchant-workspace-mode :is(.merchant-admin-toolbar,.merchant-detail-kpis,.merchant-edit-row) { gap:16px; }

body.review-workspace-mode :is(.review-card img,.review-result-image img),
body.style-workspace-mode .style-clone-card img,
body.outfit-workspace-mode .style-clone-card img { max-height:360px; width:auto; max-width:100%; object-fit:contain; cursor:zoom-in; }
body.merchant-workspace-mode :is(.danger,.merchant-status-btn[data-status="disabled"]),
:is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode) .danger { color:#b42318; border-color:#fecaca; background:#fff5f5; }
body.stats-workspace-mode :is(.admin-data-table,.admin-stats-meta),
body.merchant-workspace-mode :is(.merchant-status-badge,.merchant-contact-chip,.audit-list span,.merchant-detail-kpis span) { font-size:14px; }
body.stats-workspace-mode .stats-badge { font-size:14px; padding:3px 9px; }
body.stats-workspace-mode .admin-table-wrap,
body.merchant-workspace-mode .admin-table-wrap { width:100%; max-width:100%; overflow-x:auto; }

body.auth-workspace-mode .login-panel { padding:24px; background:#f1f5f9; }
body.auth-workspace-mode .login-card { width:min(100%,440px); padding:28px; gap:16px; border-color:#e2e8f0; border-radius:12px; box-shadow:0 18px 50px rgba(15,23,42,.12); }
body.auth-workspace-mode .register-method-tabs { gap:8px; padding:4px; border-radius:10px; background:#f1f5f9; }
body.auth-workspace-mode .register-method-tabs label { min-height:40px; padding:8px 12px; border-radius:8px; }
body.auth-workspace-mode .verification-row { gap:12px; }
body.auth-workspace-mode .text-button { color:#2563eb; background:transparent; }

@media(max-width:900px){
  :is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) .layout { gap:16px; padding:16px; }
  :is(body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) .topbar-actions { justify-content:flex-start; }
  body.stats-workspace-mode :is(.admin-stats-toolbar,.admin-stats-kpis) { grid-template-columns:1fr; }
  body.merchant-workspace-mode :is(.merchant-admin-toolbar,.merchant-edit-row,.merchant-detail-kpis) { grid-template-columns:1fr; }
}

/* Batch workspace visual system — scoped to the batch page only. */
body.batch-workspace-mode {
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --band: #f8fafc;
}

body.batch-workspace-mode .layout { gap: 24px; padding: 24px; }
body.batch-workspace-mode .workspace { min-width: 0; }
body.batch-workspace-mode .topbar { flex-wrap: wrap; }
body.batch-workspace-mode .topbar-actions {
  min-width: 0;
  flex: 1 1 560px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.batch-workspace-mode .model-select-label { max-width: min(100%, 320px); }
body.batch-workspace-mode .model-select-label select { max-width: 100%; }

body.batch-workspace-mode h1 { font-size: 24px; line-height: 32px; }
body.batch-workspace-mode h2 { margin-bottom: 16px; font-size: 20px; line-height: 28px; }
body.batch-workspace-mode h3 { font-size: 16px; line-height: 24px; }
body.batch-workspace-mode p,
body.batch-workspace-mode label,
body.batch-workspace-mode button,
body.batch-workspace-mode input,
body.batch-workspace-mode select,
body.batch-workspace-mode textarea,
body.batch-workspace-mode .meta,
body.batch-workspace-mode small { font-size: 14px; line-height: 22px; }

body.batch-workspace-mode button {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
}
body.batch-workspace-mode input,
body.batch-workspace-mode select,
body.batch-workspace-mode textarea {
  min-height: 40px;
  border-color: #cbd5e1;
  border-radius: 8px;
}
body.batch-workspace-mode input:focus,
body.batch-workspace-mode select:focus,
body.batch-workspace-mode textarea:focus {
  outline: 3px solid rgba(37, 99, 235, 0.14);
  border-color: #2563eb;
}

body.batch-workspace-mode #batchUploadPanel {
  gap: 16px;
  padding: 20px;
  border-color: #e2e8f0;
  border-radius: 12px;
}
body.batch-workspace-mode .batch-upload-toolbar { gap: 8px; }
body.batch-workspace-mode .batch-upload-list { gap: 16px; }
body.batch-workspace-mode .batch-upload-card {
  padding: 16px;
  border-color: #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
body.batch-workspace-mode .batch-upload-card.collapsed { padding: 12px 16px; }
body.batch-workspace-mode .batch-upload-card-head { gap: 16px; }
body.batch-workspace-mode .batch-upload-badges { gap: 8px; }
body.batch-workspace-mode .batch-generation-spotlight,
body.batch-workspace-mode .batch-inline-results {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
}
body.batch-workspace-mode .status {
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 22px;
}

@media (max-width: 900px) {
  body.batch-workspace-mode .layout { gap: 16px; padding: 16px; }
  body.batch-workspace-mode .topbar-actions { justify-content: flex-start; }
  body.batch-workspace-mode .batch-upload-card-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  body.batch-workspace-mode .batch-upload-badges {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--band);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

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

.wallet-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-panel input {
  width: 110px;
  min-height: 34px;
  padding: 6px 8px;
}

.service-status {
  padding: 6px 10px;
  color: var(--muted);
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.service-status.ok {
  color: #0f6848;
  background: #e9f8f1;
  border-color: #bfe8d2;
}

.service-status.error {
  color: #a61b1b;
  background: #fff0f0;
  border-color: #f3c6c6;
}

.model-select-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.model-select-label select {
  width: 240px;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-size: 22px;
}

h2 {
  margin-bottom: 12px;
  font-size: 16px;
}

h3 {
  font-size: 14px;
}

p {
  margin-top: 4px;
  color: var(--muted);
}

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

.sku-layout {
  grid-template-columns: 340px minmax(0, 1fr);
}

.workspace,
.side section,
.sku-sidebar section,
.band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sku-sidebar section,
.band {
  padding: 16px;
}

.section-head,
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.hidden {
  display: none !important;
}

.register-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
  padding: 4px;
  background: var(--band);
  border-radius: 8px;
}

.register-method-tabs label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.login-card .register-method-tabs input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

button,
select,
input,
textarea {
  font: inherit;
}

button {
  min-height: 36px;
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled,
button.is-busy {
  cursor: wait;
  opacity: 0.72;
}

.danger-button {
  min-height: 30px;
  padding: 0 10px;
  color: #b42318;
  background: #fff5f5;
  border: 1px solid #f3c6c6;
}

.danger-button:hover {
  color: #fff;
  background: #d92d20;
}

.secondary-button {
  color: var(--text);
  background: #edf2f6;
  border: 1px solid var(--line);
}

.secondary-button:hover {
  color: var(--text);
  background: #dce7ef;
}

.tab {
  color: var(--text);
  background: #edf2f6;
}

.tab.active {
  color: #fff;
  background: var(--accent);
}

.panel {
  display: none;
  padding: 16px;
}

.active-panel {
  display: block;
}

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

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

label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.optional {
  margin-left: 4px;
  color: #9aa5af;
  font-size: 12px;
}

.hint {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

select,
input,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

textarea {
  resize: vertical;
}

.file-row {
  margin-top: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preview {
  min-height: 90px;
  margin: 14px 0 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.compact-form {
  margin-top: 14px;
}

.create-sku-toggle {
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  text-align: left;
}

.create-sku-toggle > span:first-child {
  display: grid;
  gap: 3px;
}

.create-sku-toggle small {
  color: inherit;
  font-size: 12px;
  opacity: .78;
}

.create-sku-state {
  flex: 0 0 auto;
  font-size: 12px;
}

.batch-box {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.batch-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.inline-form input {
  margin: 0;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.source-upload-form {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-upload-form strong {
  font-size: 13px;
}

.material-upload-button,
.batch-upload-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.material-upload-button input,
.batch-upload-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.source-upload-form input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-status {
  color: var(--muted);
  font-size: 12px;
}

.upload-slot-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  padding: 8px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

.upload-slot-preview .zoomable-image,
.upload-slot-preview img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
}

.material-slot-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 8px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

.material-slot-preview .zoomable-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
}

.material-slot-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
}

.advanced-step-settings {
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.advanced-step-settings summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.advanced-step-settings label {
  margin-top: 8px;
}

.model-library {
  display: grid;
  gap: 10px;
}

.model-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.model-library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-lane-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-lane-tab {
  min-height: 32px;
  padding: 0 12px;
  color: var(--text);
  background: #edf2f6;
  border: 1px solid var(--line);
}

.model-lane-tab:hover,
.model-lane-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.model-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.model-card {
  display: grid;
  gap: 4px;
  min-height: auto;
  padding: 10px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.model-card img,
.model-card-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.model-card-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.model-card:hover,
.model-card.active {
  color: var(--text);
  background: #eef6ff;
  border-color: var(--accent);
}

.model-card span,
.model-card small {
  color: var(--muted);
}

.model-upload-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.model-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

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

.sku-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  width: 100%;
  min-height: auto;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
}

.sku-item-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sku-item-main:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.sku-delete-btn,
.batch-upload-delete-btn {
  padding: 5px 8px;
  color: #b42318;
  background: #fff5f5;
  border: 1px solid #fecaca;
}

.sku-delete-btn:hover,
.batch-upload-delete-btn:hover {
  color: #7f1d1d;
  background: #fee2e2;
}

.sku-item-top,
.sku-progress-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.sku-item-top strong,
.sku-progress-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sku-template-tag {
  flex: none;
  padding: 2px 6px;
  color: #55616d;
  background: #f2f6f9;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
}

.sku-template-tag.custom {
  color: #0f5fc9;
  background: #eef6ff;
  border-color: #9cc9ff;
}

.sku-step-metrics {
  display: block;
  overflow: hidden;
  color: #4f5f6d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sku-item:hover,
.sku-item.active {
  color: var(--text);
  background: #eef6ff;
  border-color: var(--accent);
}

.sku-item small {
  color: var(--muted);
}

.empty-state,
.empty-line {
  padding: 24px;
  color: var(--muted);
}

.band {
  margin: 16px;
}

.image-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 150px));
  gap: 10px;
  margin-top: 12px;
}

.thumb-card,
.review-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.review-toolbar {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
  position: sticky;
  top: 8px;
  z-index: 8;
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.model-resource-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  background: #faf9ff;
}
.model-resource-inline p { margin: 4px 0; font-weight: 600; color: #312e81; }
.model-resource-inline small { color: #64748b; }
.model-resource-inline .model-library { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .model-resource-inline { grid-template-columns: 1fr; align-items: stretch; }
  .model-resource-inline .model-library { grid-column: auto; }
}

.model-picker-card-actions {
  display: grid;
  gap: 8px;
}

.model-rename-editor {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  background: #faf8ff;
}

.model-rename-editor label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.pending-adoption-count {
  margin-right: auto;
  color: #7c3aed;
  font-size: 14px;
}

.readonly-category-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 6px 12px;
  color: #344054;
  background: #f2f4f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
}

.module-business-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.simple-toggle {
  flex-direction: row;
  align-items: center;
}

.simple-toggle input {
  width: auto;
}

.user-instruction-field {
  grid-column: 1 / -1;
}

.step-save-status {
  color: #16803c;
  font-weight: 600;
}

.review-select {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  min-height: 42px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 600;
}

.download-mode-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--text-muted, #667085);
  font-size: 13px;
}

.download-mode-control select {
  min-height: 36px;
  width: auto;
  padding: 6px 28px 6px 10px;
}

.review-select input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  flex: 0 0 20px;
}

.review-select:has(input:checked) {
  border-color: #8b5cf6;
  background: #f5f3ff;
}

.review-card-filtered { display: none; }

.thumb-card {
  position: relative;
  overflow: visible;
}

.thumb-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 30;
  display: flex;
  gap: 6px;
}

.thumb-icon-button {
  display: grid;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: rgba(23, 32, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
}

.thumb-icon-button:hover {
  background: rgba(23, 32, 38, 0.9);
}

.thumb-icon-button.danger {
  background: rgba(217, 45, 32, 0.88);
}

.thumb-icon-button.danger:hover {
  background: #b42318;
}

.thumb-placeholder {
  display: grid;
  min-height: 96px;
  padding: 10px;
  place-items: center;
  overflow-wrap: anywhere;
  color: var(--muted);
  background: #f7fafc;
  border: 1px dashed var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.thumb-card img,
.review-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.zoomable-image {
  position: relative;
  display: block;
  cursor: zoom-in;
}

.zoomable-image::after {
  content: "⌕";
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  background: rgba(23, 32, 38, 0.72);
  border-radius: 999px;
  font-size: 14px;
}

.zoomable-image:hover {
  z-index: 20;
}

.zoomable-image:hover img {
  filter: brightness(0.94);
}

.zoomable-image {
  width: 100%;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.zoomable-image:hover {
  background: transparent;
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

.zoomable-image::after {
  content: "点击放大";
  right: 8px;
  bottom: 8px;
  width: auto;
  height: auto;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.zoomable-image:hover::after {
  opacity: 1;
}

.review-image-zoom {
  position: relative;
  cursor: zoom-in;
}

.review-image-zoom img {
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.review-image-zoom:hover {
  z-index: 40;
}

.review-image-zoom:hover img {
  position: relative;
  z-index: 40;
  transform: scale(2.15);
  transform-origin: left top;
  background: #fff;
  box-shadow: 0 18px 44px rgba(23, 32, 38, 0.24);
}

.zoom-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 6px;
  color: #fff;
  background: rgba(23, 32, 38, 0.72);
  border-radius: 4px;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.review-image-zoom:hover .zoom-hint {
  opacity: 1;
}

.compact-actions button {
  min-height: 32px;
  padding: 0 10px;
}

.workflow-steps {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.workflow-line {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.workflow-line:first-child {
  padding-top: 0;
  border-top: 0;
}

.workflow-line-header {
  display: grid;
  gap: 3px;
}

.workflow-line-header strong {
  font-size: 14px;
}

.workflow-line-header span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workflow-overview {
  display: grid;
  gap: 8px;
  margin: 4px 0 14px;
}

.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  background: #edf2f6;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.2s ease;
}

.workflow-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.workflow-parallel-row .workflow-step {
  align-items: start;
}

.workflow-step-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.step-editor {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(92px, 120px) minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.step-editor label {
  margin-bottom: 0;
}

.step-editor small {
  color: var(--muted);
  font-size: 11px;
}

.step-editor textarea {
  min-height: 74px;
}

.step-override-references {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(180px, 1fr) auto minmax(240px, 2fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.step-override-references strong {
  display: block;
  font-size: 13px;
}

.step-override-references small,
.muted-text {
  color: var(--muted);
  font-size: 12px;
}

.override-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  font-weight: 600;
  background: var(--accent);
  border-radius: 6px;
  cursor: pointer;
}

.override-upload-button.busy {
  opacity: 0.65;
  pointer-events: none;
}

.override-upload-button input {
  display: none;
}

.override-reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.override-reference-chip {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  gap: 6px;
  padding: 5px 7px;
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.override-reference-chip .small-danger {
  width: 20px;
  height: 20px;
  min-height: 20px;
  color: #b42318;
  background: #fff5f5;
  border-color: #f4b4b4;
}

.detail-template-experiment {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  margin: 0 0 4px;
}

.detail-template-selected-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.model-card-select { width: 100%; margin-top: 4px; }

.template-experiment-notice {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 12px;
  color: #713f12;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 12px;
}

.template-experiment-notice strong { flex: none; font-size: 13px; }
.template-experiment-notice span { line-height: 1.45; }

.template-card {
  display: grid;
  gap: 8px;
  min-height: auto;
  padding: 10px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.template-card:hover,
.template-card.active {
  color: var(--text);
  background: #eef6ff;
  border-color: var(--accent);
}

.template-card-title {
  font-weight: 700;
  font-size: 13px;
}

.template-card-heading { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.template-card-heading em {
  flex: none;
  padding: 2px 7px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.template-card-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.template-thumb {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(18px, auto);
  gap: 5px;
  aspect-ratio: 750 / 1180;
  max-height: 250px;
  padding: 8px;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tpl-block {
  display: block;
  background: #cad8e5;
  border: 1px solid #aebfce;
  border-radius: 3px;
}

.tpl-block.hero {
  grid-column: span 4;
  grid-row: span 3;
  background: #9fc4ef;
}

.tpl-block.wide {
  grid-column: span 4;
  grid-row: span 2;
}

.tpl-block.small {
  grid-column: span 2;
  grid-row: span 2;
}

.tpl-block.text {
  grid-column: span 2;
  grid-row: span 2;
  background: repeating-linear-gradient(to bottom, #eef3f7, #eef3f7 4px, #cfdbe5 5px, #eef3f7 8px);
}

.tpl-block.taobaoHero {
  grid-column: 1;
  grid-row: span 6;
  background: #9fc4ef;
}

.tpl-block.taobaoWide {
  grid-column: 1;
  grid-row: span 3;
  background: #c5d4e1;
}

.tpl-block.taobaoText {
  grid-column: 1;
  grid-row: span 2;
  background: repeating-linear-gradient(to bottom, #eef3f7, #eef3f7 5px, #cfdbe5 6px, #eef3f7 10px);
}

.template-upload-slot {
  display: grid;
  min-height: 34px;
  place-items: center;
  color: var(--accent);
  background: #f8fbff;
  border: 1px dashed var(--accent);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.template-upload-slot input {
  display: none;
}

.template-upload-name {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.step-generation-summary,
.step-material-status {
  flex-basis: 100%;
  color: var(--muted);
  text-align: right;
}

.step-material-status.missing { color: #b42318; }

.adopt-module-button {
  background: #16a34a;
  border-color: #16a34a;
}

.error-text {
  margin-top: 4px;
  color: #b42318;
  font-size: 12px;
}

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

.review-card img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.review-card-variant {
  font-size: 15px;
  line-height: 1.35;
}

.review-card-context,
.review-card-created-at {
  color: var(--muted);
}

.review-card-technical {
  color: var(--muted);
  font-size: 12px;
}

.review-card-technical summary {
  cursor: pointer;
  width: fit-content;
}

.review-card-technical small {
  display: block;
  margin-top: 4px;
}

.review-selection-count {
  color: var(--muted);
  white-space: nowrap;
}

.review-batch-note {
  min-width: 220px;
  min-height: 36px;
}

.review-operation-status { display: block; padding: 7px 9px; border-radius: 6px; font-weight: 600; }
.review-operation-status.processing { color: #1d4ed8; background: #eff6ff; }
.review-operation-status.done { color: #166534; background: #f0fdf4; }
.review-operation-status.failed { color: #b42318; background: #fff1f2; }

.review-card .actions {
  gap: 6px;
}

.review-card button {
  min-height: 32px;
  padding: 0 10px;
}

.side section {
  padding: 16px;
}

.task-item {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.task-item:last-child {
  border-bottom: 0;
}

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

.status {
  width: max-content;
  padding: 3px 8px;
  color: #fff;
  background: #6b7280;
  border-radius: 999px;
  font-size: 12px;
}

.status.done {
  background: #16833f;
}

.status.failed {
  background: #d92d20;
}

.status.processing {
  background: #b7791f;
}

.status.waiting,
.status.pending,
.status.pending_review,
.status.not_started {
  background: #6b7280;
}

.status.approved,
.status.final,
.status.exported {
  background: #16833f;
}

.status.rejected,
.status.rework_requested,
.status.reworked {
  background: #b7791f;
}

.status.rework_processing { background: #1d4ed8; }
.status.rework_failed { background: #b42318; }

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

.result-list img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.prompt-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.52);
}

.prompt-preview-dialog {
  width: min(980px, 100%);
  max-height: min(86vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.24);
}

.prompt-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.prompt-preview-header h3 {
  margin: 0 0 4px;
}

.prompt-preview-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.prompt-preview-body {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 16px 18px 18px;
}

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

.prompt-preview-body pre,
.prompt-preview-body textarea {
  width: 100%;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: #111827;
  font: 13px/1.5 Consolas, "SFMono-Regular", monospace;
  white-space: pre-wrap;
}

.prompt-preview-body textarea {
  min-height: 220px;
  resize: vertical;
}

.template-spec-preview {
  display: grid;
  gap: 6px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.template-spec-preview span {
  color: var(--muted);
  font-size: 12px;
}

.template-spec-preview ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.6;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}

.mode-tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  padding: 8px 14px;
  cursor: pointer;
}

.mode-tab.active {
  border-color: #1a73e8;
  background: #1a73e8;
  color: #fff;
}

body.style-clone-mode .sku-sidebar {
  display: none;
}

body.style-clone-mode .sku-layout {
  grid-template-columns: minmax(0, 1fr);
}

.batch-upload-panel {
  display: grid;
  gap: 12px;
}

.review-summary-panel {
  display: grid;
  gap: 12px;
}

.review-summary-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.review-summary-toolbar label {
  display: grid;
  gap: 4px;
  min-width: min(240px, 100%);
  margin: 0;
}

.review-summary-toolbar button {
  min-height: 38px;
}

.review-summary-batch-toolbar { position: static; margin: 0; }
.review-summary-batch-toolbar .meta { margin-left: auto; }

.batch-upload-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.batch-upload-toolbar .meta {
  margin-left: 4px;
}

.batch-upload-list {
  display: grid;
  gap: 12px;
}

.batch-sku-note {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.batch-sku-note span {
  color: var(--text);
  font-weight: 700;
}

.batch-sku-note small {
  color: var(--muted);
}

.batch-upload-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.batch-upload-card.collapsed {
  padding: 10px 12px;
}

.batch-upload-card-head {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
}

.batch-upload-card.expanded .batch-upload-card-head {
  margin-bottom: 10px;
}

.batch-upload-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
}

.batch-upload-card-head strong,
.batch-upload-card-head small {
  display: block;
}

.batch-upload-card-head small {
  margin-top: 3px;
  color: var(--muted);
}

.batch-upload-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.batch-upload-expand-btn {
  white-space: nowrap;
}

.batch-upload-badges .status.done {
  background: #dcfce7;
  color: #166534;
}

.batch-upload-badges .status.waiting {
  background: #f3f4f6;
  color: #4b5563;
}

.batch-upload-badges .status.processing {
  color: #92400e;
  background: #fef3c7;
}

.batch-upload-badges .status.failed {
  color: #b42318;
  background: #fee4e2;
}

.batch-generation-spotlight {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1d4ed8;
  background: #eff6ff;
}

.batch-generation-spotlight.done {
  color: #166534;
  border-color: #86efac;
  background: #f0fdf4;
}

.batch-generation-spotlight.failed {
  color: #b42318;
  border-color: #fda29b;
  background: #fff1f0;
}

.batch-generation-spotlight-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.batch-generation-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
}

.batch-generation-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
}

.batch-generation-progress.active span {
  width: 38%;
  border-radius: inherit;
  animation: batch-generation-sweep 1.25s ease-in-out infinite;
}

@keyframes batch-generation-sweep {
  from { transform: translateX(-110%); }
  to { transform: translateX(290%); }
}

.batch-inline-results {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.batch-inline-results-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.batch-inline-results-title small {
  color: var(--muted);
}

.batch-inline-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.batch-inline-result {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.batch-inline-result img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: #f3f4f6;
}

.batch-inline-result textarea {
  min-height: 54px;
  resize: vertical;
}

.batch-generation-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  color: #b42318;
  background: #fff1f0;
  border: 1px solid #fecdca;
  border-radius: 6px;
  font-size: 12px;
}

.batch-generation-error span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.batch-generation-error button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
}

.batch-upload-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.batch-upload-slot {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.batch-upload-slot.uploaded {
  border-color: #86efac;
  background: #f0fdf4;
}

.batch-upload-slot.failed {
  border-color: #fca5a5;
  background: #fef2f2;
}

.batch-upload-slot.is-dragging,
.batch-upload-slot.is-uploading {
  border-color: #2563eb;
  background: #eff6ff;
}

.batch-upload-slot-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.batch-upload-slot-top span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.batch-upload-slot.uploaded .batch-upload-slot-top span {
  color: #15803d;
}

.batch-upload-slot.failed .batch-upload-slot-top span {
  color: #dc2626;
}

.batch-upload-slot small {
  color: var(--muted);
  line-height: 1.4;
  word-break: break-all;
}

.batch-upload-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 6px;
  background: #1a73e8;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.batch-upload-file-button input {
  display: none;
}

/* Global interaction contract: discoverable hover, immediate press feedback and explicit busy state. */
:is(button,[role="button"],.sku-item-main,.batch-upload-card-head,.material-upload-button,.batch-upload-file-button):not(:disabled) { transition:transform .1s ease,box-shadow .15s ease,background-color .15s ease,border-color .15s ease,filter .15s ease; }
:is(button,[role="button"],.sku-item-main,.batch-upload-card-head,.material-upload-button,.batch-upload-file-button):not(:disabled):hover { filter:brightness(.97); box-shadow:0 3px 10px rgb(15 23 42 / 12%); }
:is(button,[role="button"],.sku-item-main,.batch-upload-card-head,.material-upload-button,.batch-upload-file-button):not(:disabled):active { transform:translateY(1px) scale(.985); filter:brightness(.93); }
button.is-busy { cursor:wait; opacity:.78; }
button.is-busy::before { content:""; width:12px; height:12px; margin-right:7px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:ui-spin .7s linear infinite; }
@keyframes ui-spin { to { transform:rotate(360deg); } }
input[type="checkbox"] { accent-color:#2563eb; cursor:pointer; }
label:has(> input[type="checkbox"]):hover { background:#eff6ff; }
@media (prefers-reduced-motion:reduce) { :is(button,[role="button"],.sku-item-main,.batch-upload-card-head){ transition:none; } button.is-busy::before{ animation-duration:1.4s; } }
@media (max-width:700px) { .current-sku-settings-grid .settings-note { grid-column:auto; } }

.batch-model-picker-button { width: 100%; }

.batch-model-picker-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgb(15 23 42 / 28%);
}

.batch-model-picker-dialog::backdrop { background: rgb(15 23 42 / 48%); }

.batch-model-picker-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.batch-model-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.batch-model-picker-head strong,
.batch-model-picker-head small { display: block; }

.batch-model-picker-head small,
.batch-model-picker-status {
  margin-top: 4px;
  color: var(--muted);
}

.model-picker-primary-actions { justify-content: flex-end; }

.model-picker-guidance {
  margin: 0;
  padding: 10px 12px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.model-picker-card-title {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.model-selected-badge {
  padding: 3px 7px;
  color: #166534;
  background: #dcfce7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.batch-model-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  max-height: 470px;
  overflow: auto;
}

.batch-model-picker-card {
  display: grid;
  gap: 6px;
  padding: 9px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.batch-model-picker-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgb(15 23 42 / 8%);
}

.batch-model-picker-card.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgb(37 99 235 / 16%);
}

.batch-model-picker-card .model-card-placeholder {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  background: #f1f5f9;
}

.batch-model-preview {
  position: relative;
  display: grid;
  width: 100%;
  height: 132px;
  padding: 6px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  cursor: zoom-in;
}

.batch-model-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.batch-model-preview .zoom-hint {
  right: 8px;
  bottom: 8px;
}

.batch-model-preview:hover img { transform: scale(1.03); }
.batch-model-select { width: 100%; min-height: 36px; }

.image-lightbox-dialog {
  width: min(94vw, 1100px);
  max-width: none;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
}

.image-lightbox-dialog::backdrop { background: rgb(15 23 42 / 78%); }

.image-lightbox-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(88vh, 820px);
  padding: 52px 20px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgb(15 23 42 / 32%);
}

.image-lightbox-shell img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(88vh - 72px);
  object-fit: contain;
}

.image-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.batch-model-picker-card small { color: var(--muted); }

.style-clone-panel {
  margin-bottom: 16px;
}

.style-clone-form {
  display: grid;
  gap: 12px;
}

.style-clone-description textarea,
.style-clone-prompt textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
}

.style-clone-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto;
  gap: 12px;
  align-items: end;
}

.output-spec-selector {
  min-width: 220px;
}

.output-spec-selector label,
.face-change-field {
  display: grid;
  gap: 8px;
}

.output-spec-selector small,
.face-change-field small,
#outfitReplicateAudience + small {
  color: var(--text-muted, #8a8a8a);
  font-size: 12px;
  line-height: 1.5;
}

.face-change-field {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle, #ebebe9);
}

.face-change-field label > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.face-change-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  accent-color: var(--accent, #2563eb);
}

.outfit-reference-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.outfit-reference-preview figure {
  min-width: 0;
  margin: 0;
}

.outfit-reference-preview img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: contain;
  border: 1px solid var(--border-subtle, #ebebe9);
  border-radius: 6px;
  background: #fafaf9;
}

.outfit-reference-preview figcaption {
  margin-top: 6px;
  overflow: hidden;
  color: var(--text-muted, #8a8a8a);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outfit-batch-stage-note {
  margin-top: 20px;
  padding: 12px 0;
  border-block: 1px solid var(--border-subtle, #ebebe9);
  color: var(--text-muted, #8a8a8a);
  font-size: 13px;
}

.outfit-quality-review-panel { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.outfit-quality-review-list { display: grid; gap: 16px; }
.outfit-quality-review-card { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.outfit-quality-review-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle, #fbfbfb); }
.outfit-quality-review-meta div { min-width: 0; }
.outfit-quality-review-meta dt { margin-bottom: 3px; color: var(--text-muted, #75777c); font-size: 12px; font-weight: 500; }
.outfit-quality-review-meta dd { margin: 0; color: var(--text, #030303); font-family: "JetBrains Mono", monospace; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.outfit-quality-review-actions { position: sticky; top: 8px; z-index: 2; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgb(255 255 255 / 96%); box-shadow: var(--shadow-sm); }
.outfit-quality-review-images { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.outfit-quality-review-images figure { margin: 0; display: grid; gap: 6px; }
.outfit-quality-review-thumb { width: 100%; height: 260px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f7f7f7; cursor: zoom-in; }
.outfit-quality-review-thumb img { width: 100%; height: 100%; object-fit: contain; }
.outfit-quality-review-image-actions { display: flex; gap: 6px; }
.outfit-quality-review-image-actions button { flex: 1; min-width: 0; }
.outfit-quality-review-card textarea { width: 100%; min-height: 72px; }
.outfit-quality-review-reasons { color: #9a3412; }
.garment-structure-settings { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0; padding:14px; border:1px solid var(--line); border-radius:8px; background:var(--surface-subtle,#fbfbfb); }
.garment-structure-settings legend { padding:0 6px; color:var(--muted); font-size:13px; font-weight:600; }
.garment-structure-settings label { display:grid; gap:6px; min-width:0; }
@media (max-width:760px) { .garment-structure-settings { grid-template-columns:1fr; } }
@media (max-width: 1040px) { .outfit-quality-review-images { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .outfit-quality-review-meta, .outfit-quality-review-images { grid-template-columns: 1fr; } .outfit-quality-review-thumb { height: 220px; } }

.outfit-batch-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle, #ebebe9);
}

.outfit-batch-summary > div:first-child {
  display: grid;
  gap: 4px;
}

.outfit-batch-summary span,
.outfit-batch-summary small {
  color: var(--text-muted, #8a8a8a);
}

.outfit-batch-summary strong {
  font-size: 26px;
  font-weight: 500;
}

.outfit-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.outfit-task-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-subtle, #ebebe9);
  border-radius: 8px;
  background: #fff;
}

.outfit-task-image img {
  width: 104px;
  height: 132px;
  object-fit: contain;
  border-radius: 5px;
  background: #fafaf9;
}

.outfit-task-content {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.outfit-task-content p,
.outfit-task-content small {
  margin: 0;
  overflow-wrap: anywhere;
}

.outfit-task-content small {
  color: var(--text-muted, #8a8a8a);
}

.outfit-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.outfit-task-status {
  padding: 3px 6px;
  border-radius: 4px;
  color: #1a1a1a;
  background: #f0f0ee;
  font-size: 12px;
}

.outfit-task-status.failed {
  color: #b42318;
  background: #fef3f2;
}

.outfit-task-status.running_clean_base,
.outfit-task-status.running_composite {
  color: #1e40af;
  background: #f5f7ff;
}

.outfit-task-result-placeholder {
  padding: 7px;
  border: 1px dashed var(--border-subtle, #ebebe9);
  color: var(--text-muted, #8a8a8a);
  font-size: 12px;
}

.style-clone-result {
  margin-top: 14px;
}

.batch-create-box {
  margin: 0 0 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.batch-create-section {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--band);
}

.batch-create-section h3,
.batch-create-section legend {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.batch-create-section p,
.batch-create-section small {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.batch-garment-settings { margin-inline: 0; }
.batch-setting-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.batch-setting-grid label { display: grid; gap: 7px; font-weight: 600; }

@media (max-width: 760px) {
  .batch-setting-grid { grid-template-columns: 1fr; }
}

body.batch-workspace-mode .sku-sidebar {
  display: none;
}

body.batch-workspace-mode .sku-layout {
  grid-template-columns: minmax(0, 1fr);
}

body.batch-workspace-mode .batch-upload-panel {
  width: 100%;
}

.outfit-result-download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.outfit-result-download-item label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.outfit-product-result-download {
  display: grid;
  grid-template-columns: 72px minmax(160px, 1fr);
  align-items: center;
  gap: 12px;
}

.outfit-product-result-download img {
  width: 72px;
  height: 96px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--band);
}

.outfit-generator-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 6px;
  border: 1px solid var(--attio-border, #eeeff1);
  border-radius: 12px;
  background: var(--attio-bg, #fbfbfb);
}

.outfit-generator-tab {
  display: grid;
  gap: 3px;
  min-height: 68px;
  padding: 12px 16px;
  color: var(--attio-muted, #75777c);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
}

.outfit-generator-tab strong { color: inherit; font-size: 15px; font-weight: 600; }
.outfit-generator-tab span { color: inherit; font-size: 12px; font-weight: 500; }
.outfit-generator-tab:hover { color: var(--attio-text, #030303); background: #fff; }
.outfit-generator-tab.active,
body.outfit-workspace-mode .outfit-generator-tab.active {
  color: #fff;
  background: var(--attio-accent, #9b69ff);
  border-color: var(--attio-accent, #9b69ff);
  box-shadow: 0 4px 12px -4px rgba(155, 105, 255, .3);
}
.outfit-generator-tab.active strong { color: #fff; }

.outfit-generator-zone {
  display: grid;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--attio-border, #eeeff1);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--attio-shadow, 0 1px 3px rgba(0,0,0,.04));
}

.outfit-generator-zone.hidden { display: none; }
.outfit-generator-zone-head h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.outfit-generator-zone-head p { margin: 0; color: var(--attio-muted, #75777c); font-size: 13px; }
.outfit-history-toggle { width: fit-content; justify-self: end; }

.outfit-product-card-workspace {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.outfit-product-card-workspace > .section-head h3,
.outfit-product-card-workspace > .section-head p { margin: 0; }

.outfit-product-card-create {
  display: grid;
  grid-template-columns: minmax(240px, 520px) auto;
  gap: 10px;
  justify-content: start;
}

.outfit-product-card-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}

.outfit-card-select-all,
.outfit-card-select {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.outfit-product-card-toolbar .meta { margin-left: auto; }
.outfit-product-card-toolbar button { min-height: 38px; }

.outfit-product-card-preview-result {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent, #9b69ff) 35%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent, #9b69ff) 5%, #fff);
}

.outfit-product-card-preview-result small { color: var(--muted); }

.outfit-product-submission-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.outfit-product-submission-head > div { display: grid; gap: 3px; }
.outfit-product-submission-grid { display: grid; gap: 12px; margin-top: 8px; }

.outfit-product-batch-summary {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.outfit-product-batch-summary header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.outfit-product-batch-summary header > div { display: grid; gap: 2px; }
.outfit-product-batch-summary header span { color: var(--muted); font-size: 12px; }
.outfit-product-batch-summary header .status { color: #1a1a1a; background: #f0f0ee; }
.outfit-product-batch-summary header .status.done { color: #166534; background: #ecfdf3; }
.outfit-product-batch-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.outfit-product-batch-kpis span { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: #fbfbfb; color: var(--muted); font-size: 12px; }
.outfit-product-batch-kpis b { color: var(--text); font-size: 18px; font-weight: 600; }
.outfit-product-batch-tasks { display: flex; flex-wrap: wrap; gap: 6px; }
.outfit-product-batch-tasks span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; }
.outfit-product-task-row { display: flex; gap: 6px; align-items: center; }
.outfit-product-task-row button { min-height: 30px; padding: 4px 8px; font-size: 12px; }
.outfit-product-batch-summary footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.outfit-product-batch-summary footer button { min-height: 34px; }
.outfit-product-submission-history { display: grid; gap: 12px; }
.outfit-product-submission-history.hidden { display: none; }
.outfit-product-submission-history-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.outfit-product-history-item { display: grid; gap: 3px; min-height: 0; padding: 12px; color: var(--text); text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.outfit-product-history-item:hover { border-color: color-mix(in srgb, var(--accent, #9b69ff) 34%, var(--line)); background: #fbfbfb; }
.outfit-product-history-item span, .outfit-product-history-item small { color: var(--muted); font-size: 12px; }

.outfit-product-card-list { display: grid; gap: 18px; }

.outfit-product-card,
.outfit-product-card-empty {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.outfit-product-card.is-selected {
  border-color: color-mix(in srgb, var(--accent, #9b69ff) 62%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #9b69ff) 10%, transparent);
}

.outfit-product-card.is-collapsed { gap: 0; padding-block: 14px; }

.outfit-card-more-menu { position: relative; }
.outfit-card-more-menu summary {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--attio-radius-control, 8px);
  cursor: pointer;
  list-style: none;
}
.outfit-card-more-menu summary::-webkit-details-marker { display: none; }
.outfit-card-more-menu[open] > div {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  min-width: 112px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--attio-radius-control, 8px);
  background: var(--surface, #fff);
  box-shadow: var(--attio-shadow, 0 4px 12px rgba(0, 22, 62, .06));
}
.outfit-card-more-menu[open] > div button { width: 100%; }
.batch-complete-material { min-height: 32px; padding: 5px 9px; }
.is-shortcut-target {
  outline: 2px solid color-mix(in srgb, var(--accent, #9b69ff) 42%, transparent);
  outline-offset: 4px;
  transition: outline-color .2s ease;
}

.outfit-product-card-empty { color: var(--muted); text-align: center; }
.outfit-product-card-empty strong { color: var(--text); }

.outfit-product-card-head {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
}

.outfit-product-card-head > div:first-child {
  display: grid;
  flex: 1 1 360px;
  gap: 6px;
  max-width: 620px;
}

.outfit-product-card-identity {
  display: grid !important;
  grid-template-columns: auto auto minmax(180px, 1fr);
  gap: 10px !important;
  align-items: center;
  max-width: 720px !important;
}

.outfit-product-card-identity > div { display: grid; gap: 4px; }
.outfit-card-expand { min-width: 58px; background: transparent; color: var(--text); border: 1px solid var(--line); }
.outfit-card-select input { width: 18px; height: 18px; }

.outfit-product-card-settings {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr) minmax(180px, 0.8fr);
  gap: 16px;
  align-items: end;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fbfbfb;
}

.outfit-product-card-settings label { display: grid; gap: 7px; margin: 0; }
.outfit-card-face-change { display: flex !important; flex-direction: row; align-items: center; min-height: 40px; }
.outfit-card-face-change-note { align-self: center; color: var(--muted); font-size: 13px; }

.outfit-card-index { color: var(--muted); font-size: 12px; }

.outfit-product-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.outfit-product-input-slot {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 132px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fbfbfb;
}

.outfit-product-input-slot > strong { grid-column: 1 / -1; }
.outfit-product-input-slot img { width: 88px; height: 88px; object-fit: contain; border-radius: 8px; background: #fff; }
.outfit-product-input-slot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outfit-product-input-empty { grid-column: 1 / 3; color: var(--muted); }
.outfit-product-input-slot label { position: relative; display: inline-flex; justify-content: center; margin: 0; overflow: hidden; }
.outfit-product-input-slot label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.outfit-product-reference-section { display: grid; gap: 12px; }
.outfit-product-reference-section > .section-head h4,
.outfit-product-reference-section > .section-head p { margin: 0; }
.outfit-reference-add { position: relative; overflow: hidden; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.outfit-reference-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.outfit-product-reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.outfit-product-reference-item {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfb;
}

.outfit-product-reference-item img { width: 100%; aspect-ratio: 3/4; object-fit: contain; border-radius: 8px; background: #fff; }
.outfit-product-reference-item figcaption { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.outfit-product-reference-empty { padding: 24px; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; text-align: center; }

.outfit-legacy-generator { padding-top: 6px; border-top: 1px solid var(--line); }
.outfit-legacy-generator > summary { padding: 12px 0; color: var(--muted); cursor: pointer; }
.outfit-legacy-generator[open] > summary { margin-bottom: 16px; color: var(--text); }

@media (max-width: 820px) {
  body.batch-workspace-mode .mode-tabs {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  body.batch-workspace-mode .batch-upload-panel,
  body.batch-workspace-mode .batch-create-box,
  body.batch-workspace-mode .batch-upload-toolbar,
  body.batch-workspace-mode .batch-upload-list {
    min-width: 0;
  }
  body.batch-workspace-mode .batch-create-box {
    padding: 16px;
  }
  .outfit-generator-switch { grid-template-columns: 1fr; }
  .outfit-generator-zone { padding: 16px; }
  .outfit-product-card-create,
  .outfit-product-input-grid,
  .outfit-product-card-settings { grid-template-columns: 1fr; }
  .outfit-product-card-workspace { padding: 14px; }
  body.outfit-workspace-mode .mode-tabs {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .outfit-product-card-toolbar { align-items: stretch; }
  .outfit-product-card-toolbar > * { flex: 1 1 145px; }
  .outfit-product-card-toolbar .meta { margin-left: 0; align-self: center; }
  .outfit-product-submission-head,
  .outfit-product-batch-summary header { align-items: stretch; flex-direction: column; }
  .outfit-product-batch-summary footer { align-items: stretch; flex-direction: column; }
  .outfit-product-batch-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outfit-product-card-head { align-items: stretch; flex-direction: column; }
  .outfit-product-card-head > div:first-child { flex: 0 0 auto; max-width: none; }
  .outfit-product-card-head .actions { justify-content: flex-start; }
  .outfit-product-card-identity { grid-template-columns: auto minmax(58px, auto); }
  .outfit-product-card-identity > div { grid-column: 1 / -1; min-width: 0; }
  .outfit-product-card-identity input[data-product-card-title] { width: 100%; min-width: 0; }
  .outfit-product-input-slot { grid-template-columns: 72px minmax(0, 1fr); }
  .outfit-product-input-slot img { width: 72px; height: 72px; }
  .outfit-product-input-slot label,
  .outfit-product-input-slot .danger-button { grid-column: 1 / -1; }
}

.review-warning {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  background: #fff8e6;
  color: #7a4b00;
  font-size: 14px;
  line-height: 1.5;
}

.style-clone-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
  gap: 14px;
}

.style-clone-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.style-clone-card img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.style-clone-prompt {
  margin-top: 12px;
}

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

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

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

  .workflow-step {
    grid-template-columns: 1fr;
  }

  .step-editor {
    grid-template-columns: 1fr;
  }

  .batch-upload-card-head {
    grid-template-columns: auto 1fr auto;
  }

  .batch-upload-badges {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .style-clone-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .grid.two,
  .inline-form {
    grid-template-columns: 1fr;
  }
}
body:has(.login-panel:not(.hidden)) {
  overflow: hidden;
}

.login-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: #f4f6f8;
}

.login-card {
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 24px;
  background: #fff;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

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

.login-card label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.login-card input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.login-status {
  min-height: 18px;
  color: #b42318;
  font-size: 13px;
}

.text-button {
  color: var(--accent);
  background: transparent;
}

.text-button:hover {
  color: var(--accent-dark);
  background: #eef6ff;
}

.verification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.mock-code-hint {
  padding: 10px 12px;
  color: #765200;
  background: #fff8dc;
  border: 1px solid #efd071;
  border-radius: 6px;
  font-weight: 700;
}

.merchant-admin-panel {
  display: grid;
  gap: 16px;
}
.merchant-admin-toolbar { display:grid; grid-template-columns:minmax(260px,2fr) minmax(140px,1fr) auto; gap:12px; align-items:end; }
.merchant-admin-toolbar label { display:grid; gap:6px; font-size:13px; }
.merchant-admin-toolbar input,.merchant-admin-toolbar select,.merchant-edit-row input { min-height:38px; padding:8px 10px; border:1px solid #cbd5e1; border-radius:6px; }
.merchant-status-badge { display:inline-block; padding:3px 9px; border-radius:999px; font-size:12px; font-weight:700; }
.merchant-status-badge.active { color:#166534; background:#dcfce7; }.merchant-status-badge.disabled { color:#991b1b; background:#fee2e2; }
.merchant-row-actions { display:flex; gap:6px; }.merchant-row-actions .danger { color:#b42318; border-color:#f2b8b5; background:#fff5f5; }
.merchant-admin-detail { padding:18px; border:1px solid #d8dee6; border-radius:10px; background:#f8fafc; }
.merchant-detail-kpis { display:grid; grid-template-columns:repeat(4,minmax(130px,1fr)); gap:10px; }
.merchant-detail-kpis>div { padding:12px; border:1px solid #e2e8f0; border-radius:8px; background:#fff; }.merchant-detail-kpis span{display:block;color:#64748b;font-size:12px}.merchant-detail-kpis strong{display:block;margin-top:6px;font-size:18px}
.merchant-edit-row { display:grid; grid-template-columns:1fr 1fr auto; gap:10px; margin:14px 0; }.merchant-contact-chip{display:inline-block;margin:0 6px 6px 0;padding:5px 9px;border-radius:999px;background:#e8eef6;font-size:12px}.audit-list{display:grid;gap:8px}.audit-list>div{padding:9px 12px;border-left:3px solid #94a3b8;background:#fff}.audit-list span{margin-left:8px;color:#64748b;font-size:12px}.audit-list p{margin:4px 0 0}
@media(max-width:760px){.merchant-admin-toolbar,.merchant-edit-row{grid-template-columns:1fr}.merchant-detail-kpis{grid-template-columns:repeat(2,1fr)}}

.file-selection-control { display: grid; gap: 8px; margin-top: 8px; }
.version-mismatch-banner { position: sticky; top: 0; z-index: 2000; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 20px; color: #7a271a; background: #fef3f2; border-bottom: 1px solid #fecdca; }
.version-mismatch-banner strong { font-size: 14px; }
.version-mismatch-banner span { font-size: 13px; }
.file-selection-preview { display: flex; flex-wrap: wrap; gap: 8px; }
#imageUndoPanel { position: fixed; bottom: 18px; right: 18px; z-index: 1000; width: min(340px, calc(100vw - 36px)); background: white; border: 1px solid #d7d0eb; border-radius: 10px; padding: 10px; box-shadow: 0 3px 16px #0002; }
#imageUndoPanel summary { cursor: pointer; padding: 4px; }
#imageUndoPanel .image-undo-items { display: flex; flex-direction: column; gap: 6px; max-height: 28vh; overflow-y: auto; }
#imageUndoPanel button { white-space: normal; overflow-wrap: anywhere; }
#imageDeleteConfirm { border: 1px solid #d7d0eb; border-radius: 12px; padding: 24px; max-width: min(560px, 90vw); }
#imageDeleteConfirm::backdrop { background: #0005; }
#imageDeleteConfirm ul { max-height: 35vh; overflow: auto; }
#imageDeleteConfirm button { margin-right: 10px; }
.source-upload-form, .batch-upload-slot { min-width: 0; }
.source-upload-form .file-selection-control, .batch-upload-slot .file-selection-control { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.source-upload-form .file-selection-meta, .batch-upload-slot .file-selection-meta { flex-wrap: wrap; gap: 6px; }
.source-upload-form .file-selection-preview > *, .batch-upload-slot .file-selection-preview > * { min-width: 0; max-width: 100%; }
.source-upload-form .file-selection-meta small, .batch-upload-slot .file-selection-meta small { flex-basis: 100%; overflow-wrap: anywhere; }
.file-selection-preview img { width: 96px; height: 96px; object-fit: contain; background: #fafafa; border: 1px solid #e5e7eb; border-radius: 6px; }
.file-selection-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.file-selection-meta span { min-width: 0; overflow: hidden; color: #64748b; text-overflow: ellipsis; white-space: nowrap; }
.file-clear-button, .file-remove-button { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.outfit-reference-preview figure { position: relative; }
.outfit-reference-preview .file-remove-button { width: 100%; margin-top: 6px; color: #b42318; background: #fff; border: 1px solid #fecaca; }
.outfit-reference-preview .file-clear-all { grid-column: 1 / -1; justify-self: start; }

.admin-stats-panel { display: grid; gap: 18px; }
.admin-stats-toolbar { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.admin-stats-toolbar label { display: grid; gap: 6px; font-size: 13px; }
.admin-stats-kpis { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.admin-stat-card { padding: 16px; border: 1px solid #d8dee6; border-radius: 10px; background: #fff; }
.admin-stat-card span { display: block; color: #64748b; font-size: 13px; }
.admin-stat-card strong { display: block; margin-top: 8px; font-size: 24px; }
.admin-stat-card.internal-card { background: #fff8e8; border-color: #f2c66d; }
.admin-stats-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-stats-block { padding: 16px; border: 1px solid #d8dee6; border-radius: 10px; background: #fff; }
.admin-stats-block h3 { margin: 0 0 12px; }
.admin-table-wrap { overflow-x: auto; }
.admin-data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-data-table th, .admin-data-table td { padding: 9px 10px; border-bottom: 1px solid #e8edf2; text-align: left; white-space: nowrap; }
.admin-data-table th { background: #f7f9fb; color: #475569; }
.internal-summary-row { background: #fff8e8; }
.stats-badge { display: inline-block; padding: 2px 7px; border-radius: 999px; background: #f4b942; color: #563600; font-size: 11px; }
.admin-pagination { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.admin-stats-meta { color: #64748b; font-size: 13px; }
@media (max-width: 900px) {
  .admin-stats-toolbar, .admin-stats-kpis { grid-template-columns: repeat(2, 1fr); }
  .admin-stats-summary-grid { grid-template-columns: 1fr; }
}


/* ui-batch-compact-20260811 */
.password-input-wrap { position: relative; display: block; width: 100%; }
.password-input-wrap input { width: 100%; padding-right: 48px; }
.password-toggle,
body.auth-workspace-mode .password-toggle { position: absolute; top: 50%; right: 6px; display: grid; width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; place-items: center; color: #64748b; background: transparent; border: 0; border-radius: 7px; transform: translateY(-50%); box-shadow: none; }
.password-toggle:hover,
.password-toggle[aria-pressed="true"] { color: #2563eb; background: #eff6ff; }
.password-toggle:focus-visible { color: #2563eb; outline: 3px solid rgba(37, 99, 235, .18); outline-offset: 1px; }
.password-toggle svg { width: 20px; height: 20px; }
.batch-sku-note-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.batch-sku-note-actions small { flex: 1; }
.batch-sku-note-actions button { min-height: 36px; white-space: nowrap; }
.batch-action-group-grid { grid-template-columns: 1fr; }
.batch-action-group { display: grid; gap: 10px; }
.batch-action-thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.batch-action-thumb { display: grid; gap: 7px; align-content: start; min-width: 0; padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.batch-action-thumb a { display: grid; place-items: center; min-height: 0; }
.batch-action-thumb img { width: auto; max-width: 100%; height: auto; max-height: 260px; object-fit: contain; background: transparent; }
.batch-action-image-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #334155; }
.batch-action-thumb .review-select { justify-self: start; }
.batch-action-group-actions { padding-top: 10px; border-top: 1px solid #e2e8f0; }
.batch-action-thumb .batch-rework-item { min-width: 0; margin-top: 2px; padding: 7px 8px; border: 1px solid #cbd5e1; border-radius: 7px; background: #f8fafc; }
.batch-action-thumb .batch-rework-item summary { display: flex; gap: 8px; align-items: center; justify-content: space-between; cursor: pointer; font-size: 12px; font-weight: 700; }
.batch-action-thumb .batch-rework-item summary em { flex: none; font-size: 10px; font-style: normal; }
.batch-rework-note-field { display: block; margin: 10px 0 8px; color: #334155; font-size: 12px; font-weight: 600; }
.batch-rework-note-field textarea { width: 100%; margin: 5px 0 0; font-weight: 400; }
.batch-rework-submit-row { display: flex; gap: 8px; align-items: center; }
.batch-rework-submit-row span { color: #64748b; font-size: 11px; }
.merchant-identity { display: grid; gap: 3px; min-width: 210px; }
.merchant-identity strong { color: #1e293b; }
.merchant-identity span { color: #64748b; font-size: 12px; }
.merchant-identity .warning-text { color: #b45309; }
.merchant-short-id { display: block; color: #475569; font-size: 12px; }
.merchant-id-hint { display: block; margin-top: 3px; color: #94a3b8; font-size: 10px; }
@media (max-width: 720px) { .batch-sku-note-actions { align-items: stretch; flex-direction: column; } }

.toast-region { position: fixed; z-index: 10020; top: 20px; right: 20px; display: grid; width: min(380px, calc(100vw - 32px)); gap: 10px; pointer-events: none; }
.app-toast { padding: 12px 14px; color: #1a1a1a; background: #fff; border: 1px solid #d8dee6; border-left: 3px solid #64748b; border-radius: 8px; box-shadow: 0 10px 28px rgba(15, 23, 42, .13); font-size: 14px; line-height: 1.5; pointer-events: auto; }
.app-toast.error { color: #991b1b; background: #fff7f7; border-color: #fecaca; border-left-color: #b42318; }
.session-manager-dialog {
  width: min(680px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}
.session-manager-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.session-manager-shell { display: grid; gap: 18px; padding: 24px; }
.session-list { display: grid; gap: 10px; max-height: min(440px, 60vh); overflow-y: auto; }
.session-item { display: grid; gap: 6px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.session-item.current { border-color: #93c5fd; background: #eff6ff; }
.session-item > div { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.session-item small { color: #64748b; }
.session-manager-actions { display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 560px) { .session-manager-actions { align-items: stretch; flex-direction: column; } }

/* Attio-derived statistics workspace trial — scoped to statistics only. */
body.stats-workspace-mode {
  --stats-bg: #fbfbfb;
  --stats-surface: #ffffff;
  --stats-text: #030303;
  --stats-muted: #75777c;
  --stats-border: #eeeff1;
  --stats-border-strong: #cdced2;
  --stats-accent: #9b69ff;
  --stats-accent-soft: #f5f0ff;
  --stats-shadow: 0 0 1px 1px rgba(0, 22, 62, .01), 0 4px 12px -1px rgba(0, 22, 62, .04), 0 1px 3px -1px rgba(0, 22, 62, .08);
  --text: var(--stats-text);
  --muted: var(--stats-muted);
  --line: var(--stats-border);
  --band: var(--stats-surface);
  --accent: var(--stats-accent);
  --accent-dark: #864aff;
  color: var(--stats-text);
  background: var(--stats-bg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

body.stats-workspace-mode .layout {
  gap: 24px;
  padding: 24px;
  background: var(--stats-bg);
}

body.stats-workspace-mode #adminStatsPanel {
  display: grid;
  gap: 48px;
  padding: 24px;
  color: var(--stats-text);
  background: var(--stats-surface);
  border: 1px solid var(--stats-border);
  border-radius: 12px;
  box-shadow: var(--stats-shadow);
}

body.stats-workspace-mode #adminStatsPanel > .section-head {
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--stats-border);
}

body.stats-workspace-mode #adminStatsPanel > .section-head h2 {
  margin: 0 0 8px;
  color: var(--stats-text);
  font-size: 24px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -.24px;
}

body.stats-workspace-mode #adminStatsPanel > .section-head p,
body.stats-workspace-mode #adminStatsPanel .meta {
  color: var(--stats-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

body.stats-workspace-mode #adminStatsMeta {
  padding: 6px 10px;
  background: var(--stats-bg);
  border: 1px solid var(--stats-border);
  border-radius: 8px;
}

body.stats-workspace-mode .admin-stats-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(148px, 1fr)) auto;
  gap: 24px;
  align-items: end;
  padding: 24px;
  background: var(--stats-bg);
  border: 1px solid var(--stats-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(11, 13, 24, .024);
}

body.stats-workspace-mode .admin-stats-toolbar label {
  display: grid;
  gap: 8px;
  color: var(--stats-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

body.stats-workspace-mode .admin-stats-toolbar :is(input, select) {
  min-height: 44px;
  padding: 10px 13px;
  color: var(--stats-text);
  background: var(--stats-surface);
  border: 1px solid var(--stats-border-strong);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(11, 13, 24, .024);
  font: inherit;
}

body.stats-workspace-mode .admin-stats-toolbar :is(input, select):focus {
  border-color: var(--stats-accent);
  outline: 3px solid rgba(155, 105, 255, .16);
}

body.stats-workspace-mode #adminStatsRefreshBtn {
  min-width: 96px;
  min-height: 44px;
  padding: 10px 20px;
  color: #fff;
  background: var(--stats-accent);
  border: 1px solid var(--stats-accent);
  border-radius: 8px;
  box-shadow: 0 2px 4px -2px rgba(155, 105, 255, .22), 0 3px 6px -2px rgba(155, 105, 255, .14);
  font-size: 14px;
  font-weight: 500;
}

body.stats-workspace-mode #adminStatsRefreshBtn:hover { background: #925cfb; }
body.stats-workspace-mode #adminStatsRefreshBtn:active { background: #864aff; }
body.stats-workspace-mode .mode-tab.active {
  color: #fff;
  background: var(--stats-accent);
  border-color: var(--stats-accent);
}

body.stats-workspace-mode .admin-stats-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 24px;
}

body.stats-workspace-mode .admin-stat-card,
body.stats-workspace-mode .admin-stat-card.internal-card {
  min-height: 132px;
  padding: 24px;
  color: var(--stats-text);
  background: var(--stats-surface);
  border: 1px solid var(--stats-border);
  border-radius: 12px;
  box-shadow: var(--stats-shadow);
}

body.stats-workspace-mode .admin-stat-card span {
  display: block;
  color: var(--stats-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

body.stats-workspace-mode .admin-stat-card strong {
  display: block;
  margin-top: 20px;
  color: var(--stats-text);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.64px;
}

body.stats-workspace-mode .admin-stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

body.stats-workspace-mode .admin-stats-block {
  padding: 24px;
  background: var(--stats-surface);
  border: 1px solid var(--stats-border);
  border-radius: 12px;
  box-shadow: var(--stats-shadow);
}

body.stats-workspace-mode .admin-stats-block h3 {
  margin: 0 0 24px;
  color: var(--stats-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: -.16px;
}

body.stats-workspace-mode .admin-stats-detail-head {
  align-items: center;
  margin-bottom: 24px;
}

body.stats-workspace-mode .admin-stats-detail-head h3 { margin: 0; }

body.stats-workspace-mode .admin-table-wrap {
  border: 1px solid var(--stats-border);
  border-radius: 8px;
  background: var(--stats-surface);
}

body.stats-workspace-mode .admin-data-table {
  color: var(--stats-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

body.stats-workspace-mode .admin-data-table :is(th, td) {
  height: 56px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--stats-border);
}

body.stats-workspace-mode .admin-data-table th {
  color: var(--stats-muted);
  background: var(--stats-bg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .24px;
}

body.stats-workspace-mode .admin-data-table tbody tr:last-child td { border-bottom: 0; }
body.stats-workspace-mode .admin-data-table tbody tr:hover { background: var(--stats-bg); }
body.stats-workspace-mode .admin-data-table td:nth-child(n+2) {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

body.stats-workspace-mode .internal-summary-row { background: #fbfbfb; }

body.stats-workspace-mode .stats-badge {
  padding: 3px 8px;
  color: #505155;
  background: #f4f5f6;
  border: 1px solid var(--stats-border);
  border-radius: 5px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

body.stats-workspace-mode .admin-pagination {
  gap: 12px;
  margin-top: 24px;
}

body.stats-workspace-mode .admin-pagination button {
  min-height: 40px;
  padding: 8px 14px;
  color: var(--stats-text);
  background: var(--stats-surface);
  border: 1px solid var(--stats-border-strong);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(11, 13, 24, .024);
}

body.stats-workspace-mode .admin-pagination button:hover:not(:disabled) {
  border-color: #9fa1a7;
  background: var(--stats-bg);
}

body.stats-workspace-mode .admin-pagination button:focus-visible {
  border-color: var(--stats-accent);
  outline: 3px solid rgba(155, 105, 255, .16);
}

@media (max-width: 1180px) {
  body.stats-workspace-mode .admin-stats-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.stats-workspace-mode #adminStatsRefreshBtn { width: 100%; }
  body.stats-workspace-mode .admin-stats-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body.stats-workspace-mode .layout { padding: 16px; }
  body.stats-workspace-mode #adminStatsPanel { gap: 48px; padding: 20px; }
  body.stats-workspace-mode #adminStatsPanel > .section-head { gap: 16px; }
  body.stats-workspace-mode .admin-stats-toolbar,
  body.stats-workspace-mode .admin-stats-kpis,
  body.stats-workspace-mode .admin-stats-summary-grid { grid-template-columns: minmax(0, 1fr); }
  body.stats-workspace-mode .admin-stats-toolbar,
  body.stats-workspace-mode .admin-stat-card,
  body.stats-workspace-mode .admin-stats-block { padding: 20px; }
}

/* Attio-derived application tokens and page-scoped rollout. */
:root {
  --attio-bg:#fbfbfb; --attio-surface:#fff; --attio-text:#030303; --attio-muted:#75777c;
  --attio-border:#eeeff1; --attio-border-strong:#cdced2; --attio-accent:#9b69ff;
  --attio-accent-hover:#925cfb; --attio-accent-active:#864aff; --attio-accent-soft:#f5f0ff;
  --attio-danger:#b42318; --attio-danger-soft:#fef3f2; --attio-radius-control:8px; --attio-radius-card:12px;
  --attio-shadow:0 0 1px 1px rgba(0,22,62,.01),0 4px 12px -1px rgba(0,22,62,.04),0 1px 3px -1px rgba(0,22,62,.08);
  --attio-focus:0 0 0 3px rgba(155,105,255,.16);
}

:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) {
  --text:var(--attio-text); --muted:var(--attio-muted); --line:var(--attio-border); --band:var(--attio-surface);
  --surface:var(--attio-surface); --accent:var(--attio-accent); --accent-dark:var(--attio-accent-active);
  color:var(--attio-text); background:var(--attio-bg);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:14px; font-weight:500; line-height:20px;
}
:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) .layout {
  gap:24px; padding:24px; background:var(--attio-bg);
}
:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.merchant-workspace-mode) :is(input,select,textarea) {
  min-height:44px; padding:10px 13px; color:var(--attio-text); background:var(--attio-surface);
  border:1px solid var(--attio-border-strong); border-radius:var(--attio-radius-control);
  box-shadow:0 1px 2px rgba(11,13,24,.024); font:500 14px/20px "Inter",sans-serif;
}
:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.merchant-workspace-mode) :is(input,select,textarea):focus {
  border-color:var(--attio-accent); outline:0; box-shadow:var(--attio-focus);
}
:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) button {
  border-radius:var(--attio-radius-control); font-family:inherit; font-size:14px; font-weight:500;
}
:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) button:not(.danger):not(.secondary):not(.text-button):not(:disabled):hover { filter:brightness(.985); transform:translateY(-1px); }
:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) button:not(:disabled):active { transform:translateY(0); }
:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) :is(.mode-tab.active,.active-tab,[aria-selected="true"]) {
  color:#fff; background:var(--attio-accent); border-color:var(--attio-accent);
}
:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.merchant-workspace-mode) :is(h1,h2,h3,strong) { color:var(--attio-text); }
:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.merchant-workspace-mode) :is(.meta,small,.hint,.muted) { color:var(--attio-muted); }
:is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.merchant-workspace-mode) :is(.balance,.price,.amount,.points,[data-mono],.merchant-detail-kpis strong) {
  font-family:"JetBrains Mono","SFMono-Regular",Consolas,monospace; font-weight:500;
}

body.single-workspace-mode #skuDetail { gap:48px; }
body.single-workspace-mode :is(.sku-sidebar section,#skuDetail>.band,.detail-header,.workflow-step) {
  color:var(--attio-text); background:var(--attio-surface); border-color:var(--attio-border);
  border-radius:var(--attio-radius-card); box-shadow:var(--attio-shadow);
}
body.single-workspace-mode :is(.sku-sidebar section,#skuDetail>.band) { padding:24px; }
body.single-workspace-mode .workflow-steps { gap:24px; }

body.batch-workspace-mode :is(.batch-sidebar,.batch-card,.batch-sku-card,.batch-result-card,.band) {
  color:var(--attio-text); background:var(--attio-surface); border-color:var(--attio-border);
  border-radius:var(--attio-radius-card); box-shadow:var(--attio-shadow);
}
body.batch-workspace-mode :is(.batch-list,.batch-results,.batch-workspace) { gap:24px; }
body.batch-workspace-mode .batch-section { margin-top:48px; }

body.review-workspace-mode #reviewSummaryPanel {
  gap:48px; padding:24px; background:var(--attio-surface); border-color:var(--attio-border);
  border-radius:var(--attio-radius-card); box-shadow:var(--attio-shadow);
}
body.review-workspace-mode :is(.review-group-card,.review-card) {
  padding:24px; background:var(--attio-surface); border-color:var(--attio-border);
  border-radius:var(--attio-radius-card); box-shadow:var(--attio-shadow);
}
body.review-workspace-mode :is(.review-summary-toolbar,.review-grid) { gap:24px; }

:is(body.style-workspace-mode,body.outfit-workspace-mode) :is(#styleClonePanel,#outfitReplicatePanel) {
  gap:48px; padding:24px; color:var(--attio-text); background:var(--attio-surface);
  border-color:var(--attio-border); border-radius:var(--attio-radius-card); box-shadow:var(--attio-shadow);
}
:is(body.style-workspace-mode,body.outfit-workspace-mode) :is(.style-clone-card,.outfit-batch-card,.outfit-task-card,.upload-preview-item) {
  background:var(--attio-surface); border-color:var(--attio-border);
  border-radius:var(--attio-radius-card); box-shadow:var(--attio-shadow);
}
:is(body.style-workspace-mode,body.outfit-workspace-mode) :is(.style-clone-form,.style-clone-controls,.style-clone-result-grid,.outfit-batch-list,.outfit-task-list) { gap:24px; }

body.merchant-workspace-mode #merchantAdminPanel {
  gap:48px; padding:24px; color:var(--attio-text); background:var(--attio-surface);
  border-color:var(--attio-border); border-radius:var(--attio-radius-card); box-shadow:var(--attio-shadow);
}
body.merchant-workspace-mode :is(.merchant-admin-detail,.merchant-detail-kpis>div,.admin-table-wrap,.audit-list) {
  background:var(--attio-surface); border-color:var(--attio-border);
  border-radius:var(--attio-radius-card); box-shadow:var(--attio-shadow);
}
body.merchant-workspace-mode :is(.merchant-admin-toolbar,.merchant-detail-kpis,.merchant-edit-row) { gap:24px; }
body.merchant-workspace-mode :is(.merchant-status-badge,.merchant-contact-chip) { color:#505155; background:#f4f5f6; border-color:var(--attio-border); }
body.merchant-workspace-mode :is(.danger,.merchant-status-btn[data-status="disabled"]) { color:var(--attio-danger); background:var(--attio-danger-soft); border-color:#fecdca; }

/* Pending upload uses the same fixed preview frame as its saved image. */
:is(.material-slot-preview,.upload-slot-preview) > .file-selection-preview {
  width:100%; height:100%; min-width:0; padding:0; margin:0;
}
:is(.material-slot-preview,.upload-slot-preview) > .file-selection-preview .zoomable-image {
  width:100%; height:100%; min-width:0;
}
:is(.material-slot-preview,.upload-slot-preview) > .file-selection-preview img {
  width:100%; height:100%; object-fit:contain;
}

@media (max-width:900px) {
  :is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.stats-workspace-mode,body.merchant-workspace-mode) .layout { padding:16px; }
  :is(body.single-workspace-mode,body.batch-workspace-mode,body.review-workspace-mode,body.style-workspace-mode,body.outfit-workspace-mode,body.merchant-workspace-mode) :is(#skuDetail,#reviewSummaryPanel,#styleClonePanel,#outfitReplicatePanel,#merchantAdminPanel) { gap:32px; }
}
