:root {
  color-scheme: light;
  --color-canvas: #f5f7fb;
  --color-surface: #ffffff;
  --color-text: #1f2937;
  --color-muted: #667085;
  --color-border: #d9e0eb;
  --color-primary: #2457d6;
  --color-primary-hover: #1c46b2;
  --color-primary-soft: #edf3ff;
  --color-warning-bg: #fff8e1;
  --color-warning-text: #725600;
  --color-danger: #b42318;
  --radius: 8px;
  --shadow-card: 0 1px 2px rgb(16 24 40 / 4%), 0 8px 24px rgb(16 24 40 / 6%);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--color-text);
  background: var(--color-canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--color-canvas); }
body.auth-pending main { visibility: hidden; }
header { min-height: 64px; padding: 12px 32px; background: #172033; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.maintenance-banner { position: sticky; z-index: 12; top: 0; display: flex; align-items: center; gap: 10px; padding: 10px 24px; border-bottom: 1px solid #e6b8ae; background: #fff4f1; color: #8d2b1d; font-size: 13px; line-height: 20px; }
.maintenance-banner.hidden { display: none; }
.task-dispatch-summary { display: block; margin-top: 6px; color: var(--color-muted); font-size: 12px; font-weight: 400; line-height: 1.6; overflow-wrap: anywhere; }
#batch-worker-dispatch, #batch-result-worker-dispatch { white-space: pre-line; overflow-wrap: anywhere; }
.maintenance-banner strong { font-weight: 800; }
body.is-maintenance main { opacity: .72; pointer-events: none; user-select: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 20px; line-height: 28px; }
h2, .toolbar strong { font-size: 16px; line-height: 24px; }
main { max-width: 1440px; margin: 0 auto; padding: 32px 24px; }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-card); }
.login-card { max-width: 430px; margin: 48px auto; }
.login-card h2 { margin-bottom: 24px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: end; }
.search-control { display: grid; grid-column: span 2; min-width: 420px; gap: 8px; }
.search-control__row { display: grid; grid-template-columns: minmax(360px, 1fr) auto; gap: 8px; }
.search-control__row button { white-space: nowrap; }
.style-filter-panel { margin-top: 18px; padding: 14px 0 16px; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.style-filter-panel .section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.style-filter-grid { display: grid; grid-template-columns: minmax(480px, 1fr) repeat(4, minmax(136px, 168px)); gap: 12px; align-items: start; }
.style-filter-grid .search-control { grid-column: auto; min-width: 0; }
.style-filter-grid .search-control__row { grid-template-columns: minmax(0, 1fr) auto; }
.listing-target-grid { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(240px, 1.25fr) minmax(260px, 1.5fr); gap: 16px; align-items: end; margin-top: 16px; }
.selection-safety-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.selection-safety-note { margin: 0 0 16px; border-color: #c5ded3; background: #eff8f3; color: #31544e; }
.selection-safety-note .icon-button { flex: 0 0 32px; min-width: 32px; min-height: 32px; padding: 0; color: var(--color-primary); font-size: 22px; line-height: 1; }
.section-title { display: inline-flex; align-items: center; gap: 8px; }
.section-help-button { display: grid; place-items: center; width: 24px; min-width: 24px; min-height: 24px; padding: 0; border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-surface); color: var(--color-primary); font-size: 14px; font-weight: 800; line-height: 1; }
.section-help-button:hover:not(:disabled), .section-help-button:focus-visible { border-color: var(--color-primary); background: var(--color-primary-soft); box-shadow: none; }
.batch-progress { display: grid; gap: 12px; padding: 14px 16px; margin-top: 12px; border: 1px solid #b9c4d4; border-radius: var(--radius); background: #fbfcfe; box-shadow: 0 1px 2px rgb(16 24 40 / 3%); }
.batch-progress__header { display: flex; align-items: center; gap: 12px; min-width: 0; }
.batch-progress__heading { display: grid; gap: 2px; min-width: 0; flex: 1; color: var(--color-text); font-size: 14px; font-weight: 700; line-height: 20px; }
.batch-progress__eyebrow { color: var(--color-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 16px; }
.batch-progress__complete { display: inline-block; width: 12px; height: 7px; margin: 0 5px 2px 1px; border-bottom: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(-45deg); vertical-align: middle; }
.batch-progress__actions { display: flex; align-items: center; gap: 8px; }
.batch-progress__elapsed { color: var(--color-muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.batch-progress__error { padding: 3px 7px; border-radius: 999px; background: #fff1f0; color: var(--color-danger); font-size: 11px; font-weight: 700; line-height: 16px; white-space: nowrap; }
.batch-progress__detail { display: grid; gap: 8px; min-width: 0; }
.batch-progress progress { width: 100%; height: 8px; accent-color: var(--color-primary); }
.batch-progress__thumbnail-frame { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 64px; overflow: hidden; border: 1px solid #b9c4d4; border-radius: 6px; background: #eef4f8; color: var(--color-muted); font-size: 11px; }
.batch-progress__thumbnail { width: 100%; height: 100%; object-fit: cover; }
.batch-progress__thumbnail-label { overflow: hidden; color: var(--color-muted); font-size: 11px; font-weight: 500; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.batch-progress__ambient-rail, .batch-progress__actual-rail { height: 5px; overflow: hidden; border-radius: 999px; background: #e7ebf2; }
.batch-progress__ambient-rail span { display: block; width: 34%; height: 100%; border-radius: inherit; background: #82a9ca; animation: batch-work-breathe 2.8s ease-in-out infinite; }
.batch-progress__actual-rail span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--color-primary); transition: width 560ms cubic-bezier(.2, .7, .2, 1); }
.batch-progress progress { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
.batch-progress.has-error { border-color: #e8a9a2; background: #fffafa; }
.batch-progress.has-error .batch-progress__ambient-rail span { background: #c95b4c; animation-play-state: paused; }
.batch-progress.is-preview-ready { border-color: #9ac9ad; background: #f6fbf7; }
.batch-progress.is-preview-ready .batch-progress__eyebrow, .batch-progress.is-preview-ready #batch-progress-label { color: #176b42; }
.batch-progress.is-preview-ready .batch-progress__ambient-rail span { background: #5f9d7e; animation: none; transform: translateX(0); opacity: .72; }
.batch-progress.is-preview-ready .batch-progress__actual-rail span { background: #2b7b55; }
.batch-progress.is-paused .batch-progress__ambient-rail span { animation: none; transform: translateX(0); opacity: .72; }
.batch-progress.is-paused .batch-progress__actual-rail span { transition: none; }
.batch-progress__next-step { padding: 10px 12px; border-left: 4px solid #2b7b55; background: #eef8f1; color: #176b42; font-size: 13px; font-weight: 700; line-height: 20px; }
@media (prefers-reduced-motion: no-preference) { .batch-progress.is-preview-ready { animation: batch-preview-ready 420ms ease-out both; } }
@keyframes batch-preview-ready { from { transform: translateY(4px); opacity: .72; } to { transform: translateY(0); opacity: 1; } }
@keyframes batch-work-breathe { 0%, 100% { transform: translateX(-20%); opacity: .46; } 50% { transform: translateX(210%); opacity: .85; } }
.style-thumbnail { display: block; width: 42px; height: 56px; border: 1px solid var(--color-border); border-radius: 6px; object-fit: cover; background: #f8fafc; }
.image-fallback { display: grid; place-items: center; width: 42px; min-height: 56px; padding: 4px; border: 1px dashed #b9c4d4; border-radius: 6px; background: #f8fafc; color: var(--color-muted); font-size: 11px; line-height: 16px; text-align: center; }
label { display: grid; gap: 8px; font-size: 13px; line-height: 20px; color: #475467; font-weight: 600; }
input, select, button { min-height: 40px; font: inherit; border-radius: var(--radius); }
input, select { width: 100%; padding: 8px 12px; color: var(--color-text); background: var(--color-surface); border: 1px solid #b9c4d4; }
input:focus, select:focus, button:focus-visible { outline: 3px solid rgb(36 87 214 / 24%); outline-offset: 2px; }
button, a.button { padding: 8px 14px; cursor: pointer; border: 1px solid var(--color-primary); border-radius: var(--radius); background: var(--color-primary); color: #fff; font-weight: 600; text-decoration: none; transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
button:hover:not(:disabled) { background: var(--color-primary-hover); border-color: var(--color-primary-hover); box-shadow: 0 2px 5px rgb(36 87 214 / 20%); }
button.secondary, a.button.secondary { background: var(--color-surface); color: var(--color-primary); border-color: #afc2f5; }
button.secondary:hover:not(:disabled), a.button.secondary:hover { background: var(--color-primary-soft); border-color: var(--color-primary); }
button:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }
.notice { padding: 12px 16px; border: 1px solid #f2d996; border-radius: var(--radius); background: var(--color-warning-bg); color: var(--color-warning-text); font-size: 13px; line-height: 20px; }
.error { color: var(--color-danger); font-size: 13px; line-height: 20px; min-height: 20px; margin: 12px 0 0; }
.hidden, .modal-backdrop.hidden { display: none !important; }
.muted { color: var(--color-muted); font-size: 13px; line-height: 20px; margin-top: 4px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.toolbar > :last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.section-toolbar, .stack-space { margin-top: 16px; }
.publish-options { background: #f7fbf8; border-color: #c5ded3; color: var(--color-text); }
.publish-toggle, .risk-ack-label { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--color-text); }
.publish-execution-panel { margin-top: 16px; padding: 16px; border: 1px solid #c5ded3; border-radius: var(--radius); background: #eff8f3; color: #31544e; }
.publish-execution-panel p { margin: 8px 0 16px; line-height: 1.6; }
.publish-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 16px; }
.publish-summary div { padding: 12px; border-radius: var(--radius); background: #fff; border: 1px solid var(--color-border); }
.publish-summary dt { color: var(--color-muted); font-size: 12px; }
.publish-summary dd { margin: 4px 0 0; color: var(--color-text); font-weight: 700; }
.table-wrap { overflow: auto; max-height: 480px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #e7ebf2; vertical-align: top; }
th { position: sticky; top: 0; z-index: 1; background: #f8fafc; color: #475467; font-size: 12px; font-weight: 700; }
tbody tr:not(.table-state):hover { background: #fafbff; }
tbody tr.selected { background: var(--color-primary-soft); }
tbody tr:last-child td { border-bottom: 0; }
.table-state td { padding: 32px 16px; text-align: center; color: var(--color-muted); }
.table-state--error td { color: var(--color-danger); }
.table-wrap[aria-busy="true"] { opacity: .72; }
code { font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; background: rgb(23 32 51 / 58%); z-index: 10; }
.modal-card { width: min(520px, 100%); background: var(--color-surface); border-radius: var(--radius); padding: 24px; box-shadow: 0 20px 56px rgb(16 24 40 / 28%); }
.modal-card h2 { margin: 0 0 12px; color: var(--color-danger); font-size: 18px; line-height: 28px; }
.batch-result-modal-card h2 { color: var(--color-text); }
.personal-modal-card h2 { color: var(--color-text); }
.modal-card p { margin: 0 0 20px; line-height: 1.65; }
.modal-card label { display: grid; gap: 6px; margin: 0 0 14px; color: var(--color-text); font-weight: 700; }
.modal-card textarea { width: 100%; min-height: 88px; resize: vertical; padding: 10px 12px; color: var(--color-text); border: 1px solid #b9c4d4; border-radius: var(--radius); font: inherit; line-height: 1.5; }
.button-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.human-review-modal-card h2 { color: var(--color-warning-text); }
.modal-card__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.modal-card__header h2 { margin-bottom: 0; color: var(--color-text); }
.size-chart-image-modal { z-index: 11; }
.size-chart-image-modal__card { width: min(980px, 100%); max-height: calc(100vh - 48px); display: grid; grid-template-rows: auto minmax(0, 1fr); }
.size-chart-image-modal__image { display: block; width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border: 1px solid var(--color-border); border-radius: var(--radius); background: #f8fafc; }
.developer-feedback-fab { position:fixed; right:-70px; bottom:24px; z-index:9; display:inline-flex; align-items:center; justify-content:flex-start; gap:8px; width:112px; min-width:112px; min-height:44px; padding:0 14px 0 12px; overflow:hidden; border:1px solid rgb(255 255 255 / 28%); border-right:0; border-radius:9px 0 0 9px; background:var(--color-primary); box-shadow:0 6px 16px rgb(16 24 40 / 18%); color:#ffffff; white-space:nowrap; transition:right 180ms ease, background-color 180ms ease, box-shadow 180ms ease; }
.force-restart-button { border-color: #b42318; background: #b42318; color: #fff; }
.force-restart-button:hover:not(:disabled), .force-restart-button:focus-visible { border-color: #8f1d14; background: #8f1d14; }
.developer-feedback-fab:hover, .developer-feedback-fab:focus-visible { right:0; background:var(--color-primary-hover); box-shadow:0 9px 20px rgb(16 24 40 / 22%); }
.developer-feedback-fab:focus-visible { outline:3px solid rgb(36 87 214 / 34%); outline-offset:-3px; }
.developer-feedback-fab__icon { display:grid; flex:0 0 18px; place-items:center; width:18px; height:18px; font-size:18px; font-weight:700; line-height:1; }
.developer-feedback-fab__label { flex:0 0 auto; font-size:13px; font-weight:800; line-height:18px; }
.developer-feedback-card h2 { color: var(--color-text); }
.developer-feedback-card textarea { width: 100%; min-height: 132px; resize: vertical; padding: 10px 12px; color: var(--color-text); border: 1px solid #b9c4d4; border-radius: var(--radius); font: inherit; line-height: 1.5; }
.developer-feedback-card textarea:focus { outline: 3px solid rgb(36 87 214 / 24%); outline-offset: 2px; }
.developer-feedback-image-preview { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 14px; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius); background: #f8fafc; }
.developer-feedback-image-preview.hidden { display: none; }
.developer-feedback-image-preview img { display: block; width: min(240px, 100%); max-height: 180px; object-fit: contain; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; }
.title-review { display: grid; gap: 10px; margin: 12px 0; padding: 14px; border: 1px solid #c7d5f8; border-radius: var(--radius); background: #f7f9ff; }
.pre-recognition-progress { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 220px); align-items: center; gap: 8px; max-width: 620px; margin-top: 6px; color: #176b42; font-size: 12px; font-weight: 700; line-height: 18px; }
.pre-recognition-progress progress { width: 100%; height: 8px; accent-color: #176b42; }
.title-review__heading { color: #344b78; font-size: 14px; line-height: 20px; }
.title-review__field { display: grid; gap: 6px; margin: 0 !important; color: #344b78; font-size: 12px; font-weight: 800; line-height: 18px; }
.title-review__input { width: 100%; min-height: 40px; box-sizing: border-box; }
.title-review__confirm { display: flex !important; align-items: center; gap: 8px; min-height: 40px; margin: 0 !important; padding: 8px 10px; border: 1px solid #b7c9ee; border-radius: 7px; background: #ffffff; color: #344b78; font-size: 13px; font-weight: 700; line-height: 20px; cursor: pointer; }
.title-review__confirm:has(input:checked) { border-color: #70a68c; background: #effaf4; color: #176b42; }
.title-review__confirm input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; }
.title-review__reason { margin: 0 !important; padding-top: 2px; font-size: 12px; line-height: 18px; }
.title-review__facts { margin: 0 !important; padding: 8px 10px; border-left: 3px solid #8fb5a0; border-radius: 4px; background: #eff8f2; color: #244d38; font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.listing-review-toolbar { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 2px 0 8px; border-bottom: 1px solid var(--color-border); }
.listing-review-toolbar > strong { color: var(--color-primary); font-size: 15px; }
.listing-review-toolbar > p { grid-column: 1; margin: 0; }
.listing-review-toolbar > button { grid-column: 2; grid-row: 1 / 3; }
.listing-review-toolbar > span { grid-column: 1 / -1; }
#category-confirmations > .listing-review { box-sizing: border-box; height: auto; min-width: 0; align-content: start; gap: 14px; padding: 16px; border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
#category-confirmations > .listing-review.is-confirmed { border-color: var(--color-primary); }
.listing-review__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.listing-review__identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.listing-review__identifiers { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.listing-review .title-review__heading { color: var(--color-primary); font-size: 18px; line-height: 1.3; }
.listing-review__sku { color: var(--color-muted); font-size: 12px; line-height: 1.5; font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif; font-variant-numeric: tabular-nums; }
.listing-review__thumbnail { display: grid; place-items: center; flex: 0 0 72px; width: 72px; height: 96px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 5px; background: var(--color-canvas); }
.listing-review__thumbnail > span { padding: 6px; color: var(--color-muted); font-size: 11px; line-height: 1.5; text-align: center; }
.listing-review__thumbnail > button { display: block; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: var(--color-surface); }
.listing-review__thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
.listing-review .title-review__confirm { flex: 0 0 auto; gap: 6px; min-height: 36px; padding: 6px 9px; color: var(--color-primary); border-color: var(--color-border); font-size: 12px; white-space: nowrap; }
.listing-review .title-review__confirm:has(input:checked) { color: var(--color-primary); border-color: var(--color-primary); background: var(--color-primary-soft); }
.listing-review .title-review__confirm input { accent-color: var(--color-primary); }
.listing-review .title-review__field { color: var(--color-muted); font-weight: 600; }
.listing-review .title-review__input { display: block; width: 100%; min-height: 88px; field-sizing: content; resize: vertical; box-sizing: border-box; padding: 10px; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 5px; font: 14px/22px "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; overflow-wrap: anywhere; }
.listing-review .title-review__reason { color: var(--color-muted); line-height: 1.6; overflow-wrap: anywhere; }
.listing-review__category select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; white-space: normal; color: var(--color-text); border-color: var(--color-border); }
.listing-review__category select:disabled { opacity: 1; color: var(--color-text); background: var(--color-canvas); }
.listing-size-chart { display: grid; gap: 8px; min-width: 0; padding-top: 12px; border-top: 1px solid var(--color-border); }
.listing-review__section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--color-primary); font-size: 13px; }
.listing-size-chart__edit { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.listing-review__hint, .listing-review__status { margin: 0 !important; color: var(--color-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.listing-review__status { min-height: 38px; }
.listing-review__status.is-error { color: #a82b32; }
.listing-size-chart__scroll { min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--color-border); border-radius: 5px; }
.listing-size-chart__table { width: 100%; margin: 0; border: 0; border-collapse: collapse; font: 13px/1.5 "Segoe UI", "Microsoft YaHei UI", sans-serif; font-variant-numeric: tabular-nums; }
.listing-size-chart__table .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.listing-size-chart__table th, .listing-size-chart__table td { position: static; min-width: 62px; padding: 9px 10px; text-align: right; vertical-align: middle; border: 0; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.listing-size-chart__table thead th { background: var(--color-primary-soft); color: var(--color-primary); font-size: 12px; font-weight: 600; }
.listing-size-chart__table th:first-child { min-width: 40px; text-align: left; }
.listing-size-chart__table tbody th { color: var(--color-primary); font-weight: 600; background: var(--color-canvas); }
.listing-size-chart__table tbody tr:last-child th, .listing-size-chart__table tbody tr:last-child td { border-bottom: 0; }
.listing-size-chart__table .listing-size-chart__input { display: block; width: 76px; min-height: 32px; box-sizing: border-box; margin-left: auto; padding: 4px 5px; text-align: right; font: inherit; border: 1px solid var(--color-border); border-radius: 4px; }
.listing-size-chart__table .hidden, .listing-review__thumbnail .hidden { display: none; }
.listing-review :is(input, textarea, select, button):focus-visible, .listing-size-chart__scroll:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.listing-review > button[data-review-continue] { width: 100%; margin-top: auto; }
@media (max-width: 480px) {
  .listing-review-toolbar { grid-template-columns: minmax(0, 1fr); }
  .listing-review-toolbar > button { grid-column: 1; grid-row: auto; justify-self: start; }
  #category-confirmations > .listing-review { padding: 12px; }
  .listing-review__header, .listing-review__identity { gap: 8px; }
  .listing-review__thumbnail { flex-basis: 60px; width: 60px; height: 80px; }
  .listing-review .title-review__heading { font-size: 16px; }
  .listing-review .title-review__confirm { padding: 5px 6px; }
}
.identity { display: flex; align-items: center; gap: 8px; }
.identity.hidden { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: block; object-fit: cover; background: #dce8ff; color: #173d86; font-size: 21px; line-height: 1; }
.task-operator { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.task-operator__avatar { width: 24px; height: 24px; border-radius: 50%; display: block; object-fit: cover; background: #eef6f2; border: 1px solid #c7dfd3; font-size: 15px; line-height: 1; }
.link-button { min-height: 32px; border: 0; border-radius: var(--radius); background: transparent; color: inherit; padding: 4px 8px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; }
.link-button:hover { background: rgb(255 255 255 / 12%); border-color: transparent; box-shadow: none; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks__tools { flex-basis: 100%; }
.check-select-all { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.checks label { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.checks input, input[type="checkbox"] { width: 16px; min-height: 16px; height: 16px; padding: 0; }
hr { border: 0; border-top: 1px solid var(--color-border); margin: 24px 0; }
.header-subtitle { margin-top: 2px; color: #c7d2e6; font-size: 12px; }
.personal-main { max-width: 1120px; }
.tasks-main { max-width: 1440px; }
.task-history-table-wrap { max-height: 620px; }
.task-execution { display: grid; gap: 4px; min-width: 180px; color: var(--color-muted); font-size: 12px; line-height: 1.45; }
.task-execution__stage { color: var(--color-text); font-size: 13px; }
.task-execution__elapsed { color: #027a48; font-weight: 700; }
.task-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.timeline { display: grid; gap: 10px; margin: 0; padding-left: 24px; color: #475467; font-size: 13px; line-height: 1.5; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.section-heading .muted { margin-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.detail-grid > div { padding: 14px 16px; border: 1px solid var(--color-border); border-radius: var(--radius); background: #f8fafc; }
.detail-grid dt { color: var(--color-muted); font-size: 12px; }
.detail-grid dd { margin: 6px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.subsection { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--color-border); }
.subsection h2 { margin-bottom: 12px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 5px 10px; border-radius: 999px; background: var(--color-primary-soft); color: #173d86; font-size: 12px; font-weight: 700; }
.compact-form { margin-bottom: 16px; }
.personal-table-wrap { max-height: 420px; }
.user-account-identity { display: inline-flex; align-items: center; gap: 10px; min-width: 180px; }
.user-account-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; object-fit: cover; background: #eef2f6; border: 1px solid var(--color-border); }
.user-account-avatar, .identity .avatar { cursor: pointer; }
.user-account-avatar:focus-visible, .identity .avatar:focus-visible { outline: 3px solid rgb(36 87 214 / 34%); outline-offset: 3px; }
.avatar-preview-modal { z-index: 20; }
.avatar-preview-card { width: min(520px, 100%); }
.avatar-preview-image { display: block; width: min(420px, 100%); height: auto; aspect-ratio: 1; margin: 0 auto; object-fit: contain; border-radius: 18px; background: #f8fafc; }
.account-grid { display: grid; gap: 12px; }
.account-card { padding: 18px; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fbfcfe; }
.account-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.account-card h3 { font-size: 15px; }
.managed-worker-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 14px 0; padding: 12px; border: 1px solid #c7d5f8; border-radius: var(--radius); background: #f7f9ff; }
.managed-worker-panel strong { font-size: 13px; }
.managed-worker-panel .muted { flex-basis: 100%; margin: 0; }
.status-badge--worker-running { background: #ecfdf3; color: #027a48; }
.status-badge--worker-stopped { background: #eef2f6; color: #475467; }
.status-badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: #eef2f6; color: #475467; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-badge--verified { background: #ecfdf3; color: #027a48; }
.status-badge--check_failed, .status-badge--binding_unavailable { background: #fff1f0; color: var(--color-danger); }
.status-badge--not_checked { background: var(--color-warning-bg); color: var(--color-warning-text); }
.status-badge--authorized { background: #ecfdf3; color: #027a48; }
.status-badge--expiring { background: var(--color-warning-bg); color: var(--color-warning-text); }
.status-badge--expired, .status-badge--missing, .status-badge--disabled { background: #fff1f0; color: var(--color-danger); }
.feishu-auth-panel { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius); background: #f8fafc; }
.feishu-auth-panel .muted { margin: 0; }
.empty-panel { padding: 16px; margin-bottom: 16px; border: 1px dashed #b9c4d4; border-radius: var(--radius); background: #f8fafc; color: #475467; line-height: 1.6; }
.empty-panel p { margin: 8px 0; }
.empty-panel code { display: block; padding: 10px 12px; overflow-x: auto; border-radius: 6px; background: #172033; color: #fff; }
.error-panel { color: var(--color-danger); }
.discovered-list { display: grid; gap: 8px; margin-top: 14px; }
.discovered-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(190px, 1fr) auto; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--color-border); }
button.danger { color: var(--color-danger); border-color: #e8a9a2; }
.color-review { margin-top: 12px; padding: 12px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); }
.color-review__gallery { display: flex; gap: 8px; margin: 8px 0; overflow-x: auto; }
.color-review__gallery img { width: 112px; height: 144px; object-fit: cover; border-radius: 8px; border: 1px solid var(--color-border); }
.color-review__gallery img.size-chart-review-image { cursor: zoom-in; object-fit: contain; background: #f8fafc; }
.color-review__gallery img.size-chart-review-image:focus-visible { outline: 3px solid #2f6fed; outline-offset: 2px; }
.color-review__gallery .image-fallback { flex: 0 0 112px; min-height: 144px; }
.size-chart-review-workbench { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.3fr); gap: 14px; margin: 12px 0; align-items: start; }
.size-chart-review-inspector { position: sticky; top: 12px; display: grid; gap: 8px; padding: 10px; border: 1px solid #b9c4d4; border-radius: 8px; background: #f8fafc; }
.size-chart-review-inspector .size-chart-review-image { width: 100%; max-height: 390px; object-fit: contain; cursor: zoom-in; border: 1px solid var(--color-border); border-radius: 5px; background: white; }
.size-chart-review-inspector .size-chart-review-image:focus-visible { outline: 3px solid #2f6fed; outline-offset: 2px; }
.size-chart-zoom { justify-self: start; }
.size-chart-candidates { display: grid; gap: 8px; }
.size-chart-choice-label { margin: 0 0 2px; color: var(--color-muted); font-size: 14px; }
.size-chart-candidate { display: grid; gap: 8px; padding: 10px; border: 1px solid #b9c4d4; border-radius: 7px; background: white; cursor: pointer; }
.size-chart-candidate:hover { border-color: #2f6fed; }
.size-chart-candidate.is-selected { border-color: #096b67; box-shadow: inset 0 0 0 1px #096b67; background: #f0faf7; }
.size-chart-candidate__head { display: flex; align-items: center; gap: 8px; }
.size-chart-candidate__head input { width: auto; }
.size-chart-candidate__table { overflow-x: auto; border: 1px solid var(--color-border); border-radius: 5px; }
.size-chart-candidate__row { display: grid; min-width: 270px; border-top: 1px solid var(--color-border); }
.size-chart-candidate__row:first-child { border-top: 0; }
.size-chart-candidate__row span { padding: 6px 8px; border-left: 1px solid var(--color-border); white-space: nowrap; }
.size-chart-candidate__row span:first-child { border-left: 0; font-weight: 700; }
.size-chart-candidate__header { color: var(--color-muted); background: #f8fafc; font-size: 13px; }
.size-chart-candidate__row .is-different { background: #fff2c9; color: #7a4f00; font-weight: 700; }
.link-button { justify-self: start; padding: 0; color: #096b67; border: 0; background: transparent; font-weight: 700; }
.link-button:hover { color: #064f4c; text-decoration: underline; }
header .identity .link-button, header .identity .link-button:hover { color: #ffffff; }
.selection-risk-info { flex-basis: 100%; color: #725600; font-size: 13px; line-height: 20px; }
.manual-size-chart { display: grid; gap: 10px; padding: 12px; border: 1px solid #b9c4d4; border-radius: var(--radius); background: #f8fafc; }
.manual-size-chart__rows { display: grid; gap: 8px; overflow-x: auto; }
.manual-size-chart__header, .manual-size-chart__row { display: grid; grid-template-columns: minmax(44px, auto) repeat(2, minmax(100px, 1fr)); gap: 8px; align-items: center; }
.manual-size-chart__header { color: var(--color-muted); font-size: 13px; }
.manual-size-chart__row { display: grid; grid-template-columns: minmax(44px, auto) repeat(2, minmax(100px, 1fr)); gap: 8px; align-items: center; }
.manual-size-chart__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.manual-size-chart.hidden { display: none; }
.human-review-actions { position: sticky; top: 12px; z-index: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 12px 0; padding: 10px; border: 1px solid #b9c4d4; border-radius: 6px; background: #fff9df; box-shadow: 0 1px 2px rgb(16 24 40 / 8%); }
#category-confirmations:not(.hidden) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 12px; align-items: start; }
#category-confirmations > .human-review-actions, #category-confirmations > h3, #category-confirmations > p { grid-column: 1 / -1; }
#category-confirmations > .title-review { height: 100%; margin: 0; }

@media (min-width: 721px) and (max-width: 1120px) {
  .style-filter-grid { grid-template-columns: minmax(300px, 1fr) repeat(3, minmax(112px, 120px)); }
  .style-filter-grid > label:last-child { grid-column: 1; width: min(240px, 100%); }
}
@media (max-width: 720px) {
  header { padding: 12px 16px; align-items: flex-start; }
  h1 { font-size: 18px; }
  main { padding: 20px 16px; }
  .card { padding: 16px; margin-bottom: 16px; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar > :last-child { width: 100%; }
  .toolbar > :last-child button { flex: 1 1 auto; }
  .search-control { grid-column: 1 / -1; min-width: 0; }
  .search-control__row { grid-template-columns: minmax(0, 1fr) auto; }
  .style-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .style-filter-grid .search-control { grid-column: 1 / -1; }
  .listing-target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing-target-grid .muted { grid-column: 1 / -1; }
  th, td { padding: 10px 12px; }
  .publish-summary { grid-template-columns: 1fr; }
  .batch-progress { padding: 12px; }
  .batch-progress__actions { gap: 4px; }
  .batch-progress__thumbnail-frame { flex-basis: 42px; width: 42px; height: 56px; }
  .identity { flex-wrap: wrap; justify-content: flex-end; }
  .detail-grid { grid-template-columns: 1fr; }
  .task-detail-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .discovered-row { grid-template-columns: 1fr; }
  .manual-size-chart__header, .manual-size-chart__row { min-width: 500px; }
  .size-chart-review-workbench { grid-template-columns: 1fr; }
  .size-chart-review-inspector { position: static; }
  .developer-feedback-fab { right:0; bottom:16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .batch-progress__ambient-rail span { animation: none; transform: translateX(0); opacity: .65; }
  .batch-progress__actual-rail span { transition: none; }
}

/* Console navigation and product density controls. Presentation only: existing IDs and APIs remain unchanged. */
@media (min-width: 1001px) { body.console-nav-expanded main { max-width: 1440px; padding-left: 116px; transition: padding-left 180ms ease; } body.console-nav-collapsed main { max-width: 1440px; padding-left: 72px; transition: padding-left 180ms ease; } .console-nav { position: fixed; z-index: 8; top: 80px; bottom: 24px; left: 16px; width: 188px; display: grid; align-content: start; gap: 6px; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-card); transition: width 180ms ease; } .console-nav a { display:flex; align-items:center; gap:10px; min-height:38px; padding:8px; border-radius:6px; color:#475467; font-size:13px; font-weight:700; text-decoration:none; } .console-nav a:hover,.console-nav a:focus-visible { background:var(--color-primary-soft); color:var(--color-primary); outline:none; } .console-nav a > span:first-child { width:20px; text-align:center; font-size:16px; } .console-nav-toggle { position:fixed; z-index:9; top:90px; left:180px; width:28px; min-height:28px; padding:0; border-radius:5px; font-size:22px; line-height:1; transition:left 180ms ease,transform 180ms ease; } body.console-nav-collapsed .console-nav { width:52px; } body.console-nav-collapsed .console-nav__label { display:none; } body.console-nav-collapsed .console-nav a { justify-content:center; position:relative; } body.console-nav-collapsed .console-nav a::after { content:attr(aria-label); position:absolute; left:calc(100% + 9px); display:none; padding:6px 8px; border-radius:5px; background:#172033; color:#fff; white-space:nowrap; font-size:12px; box-shadow:var(--shadow-card); } body.console-nav-collapsed .console-nav a:hover::after,body.console-nav-collapsed .console-nav a:focus-visible::after { display:block; } body.console-nav-collapsed .console-nav-toggle { left:52px; transform:rotate(180deg); } }
.selection-workbench { display: flex; align-items: center; gap: 10px; min-width: 0; }
.style-view-switch { display: inline-flex; gap: 6px; }
.section-toolbar { align-items: center; }
.section-toolbar .selection-workbench { flex: 1 1 auto; flex-wrap: wrap; row-gap: 8px; }
.section-toolbar > #prepare-button { flex: 0 0 auto; white-space: nowrap; }
#selection-info, #select-all-filtered-styles { margin: 0; white-space: nowrap; }
.selection-multicolor { display: inline-flex; align-items: center; width: auto; gap: 6px; margin: 0; color: var(--color-text); font-weight: 700; white-space: nowrap; }
.selection-multicolor input { flex: 0 0 auto; margin: 0; }
.style-view-button { position: relative; display: grid; place-items: center; width: 44px; min-width: 44px; height: 38px; min-height: 38px; padding: 5px; border: 1px solid var(--color-border); border-radius: 6px; background: #ffffff; color: var(--color-muted); }
.style-view-button:hover, .style-view-button:focus-visible { border-color: #78ad9d; background: #f7fbf8; outline: none; }
.style-view-button.is-active { border-color: #0e5c5a; background: #dff4e7; color: #0e5c5a; }
.style-view-button::after { content: attr(data-tooltip); position: absolute; z-index: 20; bottom: calc(100% + 8px); left: 0; width: max-content; max-width: 220px; padding: 7px 9px; border-radius: 5px; background: #173d38; color: #ffffff; font-size: 12px; font-weight: 700; line-height: 18px; text-align: left; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity 120ms ease 1s, transform 120ms ease 1s; }
.style-view-button:hover::after, .style-view-button:focus-visible::after { opacity: 1; transform: translateY(0); }
.style-view-icon { display: grid; width: 28px; height: 24px; }
.style-view-icon--compact { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3px; }
.style-view-icon--compact span { border: 1px solid currentColor; border-radius: 2px; background: rgb(14 92 90 / 10%); }
.style-view-icon--detail { grid-template-columns: 10px 1fr; gap: 4px; padding: 2px; border: 1px solid currentColor; border-radius: 3px; }
.style-view-icon--detail span:first-child { border-radius: 2px; background: currentColor; opacity: .24; }
.style-view-icon--detail span:last-child { align-self: center; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
body.style-view-compact #style-pool table th:nth-child(4),body.style-view-compact #style-pool table td:nth-child(4),body.style-view-compact #style-pool table th:nth-child(6),body.style-view-compact #style-pool table td:nth-child(6),body.style-view-compact #style-pool table th:nth-child(7),body.style-view-compact #style-pool table td:nth-child(7),body.style-view-compact #style-pool table th:nth-child(8),body.style-view-compact #style-pool table td:nth-child(8),body.style-view-compact #style-pool table th:nth-child(10),body.style-view-compact #style-pool table td:nth-child(10) { display:none; } body.style-view-detail .style-thumbnail { width:100px; height:132px; }
@media (max-width:1000px) { .console-nav,.console-nav-toggle { display:none; } .style-view-switch { display:flex; flex-wrap:wrap; margin:0; } }

/* Shared pastel operational theme for control, tasks, and personal pages. */
:root { --color-canvas:#f4f7f4; --color-surface:#ffffff; --color-text:#263133; --color-muted:#657774; --color-border:#dce7df; --color-primary:#0e5c5a; --color-primary-hover:#094a49; --color-primary-soft:#dff4e7; --color-warning-bg:#fff2b8; --color-warning-text:#725600; --shadow-card:0 10px 24px rgb(45 68 58 / 8%); }
header { background:#0e5c5a; } .card { border-radius:8px; } .notice { border-color:#f0d899; } .table-wrap { border-color:var(--color-border); } th { background:#f7fbf8; } tbody tr:not(.table-state):hover { background:#fbfdfb; } .status-badge--worker-running { background:#dff4e7; color:#176b42; } .account-card { background:#fbfdfb; } .style-view-switch button.is-active { background:#dff4e7; color:#0e5c5a; border-color:#0e5c5a; }
@media (min-width:1001px) { body.console-nav-expanded:not(.console-nav-enabled) main, body.console-nav-collapsed:not(.console-nav-enabled) main { padding-left:24px; } }

/* Product workbench layout. The DOM remains a table for keyboard and selection
   semantics; the style pool alone is presented as cards to match the approved prototype. */
@media (min-width: 1001px) {
  body.console-nav-enabled header {
    min-height: 64px;
    margin-left: 236px;
    padding: 12px 28px;
    background: #eef8f5;
    color: var(--color-text);
    border-bottom: 1px solid #cfe3dc;
    box-shadow: 0 1px 0 rgb(14 92 90 / 4%);
  }
  body.console-nav-enabled header .identity .link-button,
  body.console-nav-enabled header .identity .link-button:hover {
    color: var(--color-primary);
  }
  body.console-nav-enabled header .identity .link-button:hover,
  body.console-nav-enabled header .identity .link-button:focus-visible {
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    text-decoration: none;
  }
  body.console-nav-enabled header .header-subtitle { color: var(--color-muted); }
  body.console-nav-enabled main { max-width: none; margin-left: 236px; padding: 26px 30px 40px; }
  body.console-nav-enabled .console-nav {
    inset: 0 auto 0 0;
    width: 236px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 24px 16px;
    border: 0;
    border-radius: 0;
    background: #0e5c5a;
    box-shadow: none;
    color: #effff9;
  }
  body.console-nav-enabled .console-nav::before {
    content: "TEMU\A 上款工作台";
    white-space: pre-line;
    display: block;
    margin: 0 8px 26px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
  }
  body.console-nav-enabled .console-nav a {
    min-height: 42px;
    padding: 10px 12px;
    color: #c8e4dd;
    border-radius: 7px;
  }
  body.console-nav-enabled .console-nav a:hover,
  body.console-nav-enabled .console-nav a:focus-visible {
    background: #dff4e7;
    color: #173d38;
  }
  body.console-nav-enabled .console-nav-toggle {
    position: static;
    z-index: auto;
    width: 100%;
    min-height: 40px;
    margin-top: auto;
    padding: 8px;
    border-color: rgb(255 255 255 / 34%);
    background: transparent;
    color: #effff9;
    font-size: 22px;
    transition: transform 180ms ease, background 180ms ease;
  }
  body.console-nav-enabled .console-nav-toggle:hover,
  body.console-nav-enabled .console-nav-toggle:focus-visible { background: rgb(255 255 255 / 12%); }
  body.console-nav-collapsed header { margin-left: 72px; }
  body.console-nav-collapsed main { margin-left: 72px; }
  body.console-nav-collapsed .console-nav { width: 72px; padding: 24px 10px; }
  body.console-nav-collapsed .console-nav::before {
    content: "T";
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0 auto 34px;
    border-radius: 8px;
    background: #fff2b8;
    color: #31544e;
    font-family: Georgia, serif;
    font-size: 20px;
    line-height: 1;
  }
  body.console-nav-collapsed .console-nav-toggle { left: auto; width: 52px; transform: rotate(180deg); }
  body.console-nav-collapsed .console-nav a::after { background: #173d38; }
}

#style-pool .table-wrap {
  max-height: none;
  overflow: visible;
  border: 0;
  background: transparent;
}
#style-pool table { display: block; }
#style-pool table thead { display: none; }
#style-pool #style-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
#style-pool #style-rows tr:not(.table-state) {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  grid-template-areas:
    "media title select"
    "media sku select"
    "media category select"
    "media stock stock";
  gap: 4px 11px;
  min-width: 0;
  min-height: 166px;
  height: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 2px 5px rgb(45 68 58 / 4%);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
#style-pool #style-rows tr:not(.table-state):hover {
  background: #ffffff;
  border-color: #a9d4c7;
  box-shadow: 0 9px 20px rgb(45 68 58 / 10%);
  transform: translateY(-2px);
}
#style-pool #style-rows tr.selected { background: #f1fbf4; border-color: #56a68e; }
#style-pool #style-rows tr:not(.table-state):focus-visible { outline: 3px solid rgb(14 92 90 / 32%); outline-offset: 2px; }
#style-pool #style-rows td {
  display: none;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--color-muted);
}
#style-pool #style-rows td:nth-child(1) { display: block; grid-area: select; align-self: start; }
.style-selection-control { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 3px 6px; border: 1px solid var(--color-border); border-radius: 5px; color: var(--color-muted); font-size: 12px; font-weight: 700; cursor: pointer; }
#style-pool #style-rows tr.selected .style-selection-control { border-color: #56a68e; background: #dff4e7; color: #176b42; }
.style-selection-control input { margin: 0; }
#style-pool #style-rows td:nth-child(2) { display: grid; grid-area: title; gap: 4px; overflow: hidden; color: var(--color-text); font-size: 14px; font-weight: 800; line-height: 21px; }
.style-skc-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-owner-badge { width: fit-content; max-width: 100%; padding: 1px 6px; border: 1px solid #c8d7e9; border-radius: 999px; background: #f3f7fc; color: #45627f; font-size: 11px; font-weight: 700; line-height: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-published-stores { display: block; width: fit-content; max-width: 100%; padding: 1px 6px; border: 1px solid #9acfb8; border-radius: 4px; background: #eaf8ef; color: #176b42; font-size: 11px; font-weight: 800; line-height: 17px; overflow-wrap: anywhere; }
.manual-store-button { width: fit-content; min-height: 26px; padding: 3px 8px; border-color: #b9d4cf; color: #23645d; font-size: 11px; }
.manual-store-button:hover, .manual-store-button:focus-visible { border-color: #559c90; background: #effaf6; color: #164f49; }
.manual-store-modal-card { width: min(560px, 100%); }
.manual-store-modal-card h2 { color: var(--color-text); }
.manual-store-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: min(42vh, 360px); overflow: auto; margin: 0 0 16px; padding: 4px; }
.manual-store-option { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; margin: 0 !important; padding: 10px; border: 1px solid var(--color-border); border-radius: 7px; background: #fbfdfb; cursor: pointer; }
.manual-store-option:has(input:checked) { border-color: #72b5a0; background: #effaf4; }
.manual-store-option input { grid-row: span 2; margin: 0; }
.manual-store-option small { color: var(--color-muted); font-size: 11px; font-weight: 500; }
#style-pool #style-rows td:nth-child(3) { display: block; grid-area: sku; overflow: hidden; font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
#style-pool #style-rows td:nth-child(5) { display: block; grid-area: category; color: #176b42; font-size: 12px; font-weight: 700; line-height: 18px; }
#style-pool #style-rows td:nth-child(8) { position: relative; display: block; grid-area: stock; overflow: visible; padding-top: 6px; border-top: 1px solid #edf2ee; color: #4e615d; font-size: 12px; line-height: 18px; }
.style-stock-summary { display: block; overflow: hidden; color: inherit; cursor: help; text-overflow: ellipsis; white-space: nowrap; }
.style-stock-summary:focus-visible { border-radius: 3px; outline: 2px solid rgb(14 92 90 / 38%); outline-offset: 2px; }
.style-stock-tooltip { position: absolute; z-index: 20; bottom: calc(100% + 6px); left: 0; width: max-content; max-width: min(320px, calc(100vw - 48px)); padding: 7px 9px; border-radius: 5px; background: #173d38; color: #ffffff; font-size: 12px; font-weight: 700; line-height: 18px; white-space: normal; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease; visibility: hidden; }
.style-stock-summary:hover + .style-stock-tooltip, .style-stock-summary:focus-visible + .style-stock-tooltip { opacity: 1; transform: translateY(0); visibility: visible; }
#style-pool #style-rows td:nth-child(9) { display: grid; grid-area: media; align-self: stretch; }
#style-pool .style-thumbnail,
#style-pool .image-fallback { width: 84px; height: 112px; min-height: 112px; border-radius: 5px; }
#style-pool .image-fallback { font-size: 11px; }
#style-pool #style-rows tr.table-state { display: block; border: 1px dashed var(--color-border); border-radius: 7px; background: #fbfdfb; }
#style-pool #style-rows tr.table-state td { display: block; padding: 28px 16px; }
.style-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.style-pagination__controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.style-pagination__controls label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--color-muted); font-size: 12px; font-weight: 700; }
.style-pagination__controls select { min-height: 34px; padding: 4px 26px 4px 8px; }

body.style-view-detail #style-pool #style-rows { grid-template-columns: 1fr; }
body.style-view-detail #style-pool #style-rows tr:not(.table-state) {
  grid-template-columns: 184px minmax(0, 1fr) auto;
  grid-template-areas:
    "media title select"
    "media sku select"
    "media category select"
    "media source select"
    "media color select"
    "media composition select"
    "media stock stock"
    "media synced synced";
  gap: 7px 16px;
  padding: 14px;
}
body.style-view-detail #style-pool #style-rows td:nth-child(4),
body.style-view-detail #style-pool #style-rows td:nth-child(6),
body.style-view-detail #style-pool #style-rows td:nth-child(7),
body.style-view-detail #style-pool #style-rows td:nth-child(10) { display: block; font-size: 13px; line-height: 20px; }
body.style-view-detail #style-pool #style-rows td:nth-child(4) { grid-area: source; }
body.style-view-detail #style-pool #style-rows td:nth-child(6) { grid-area: color; }
body.style-view-detail #style-pool #style-rows td:nth-child(7) { grid-area: composition; }
body.style-view-detail #style-pool #style-rows td:nth-child(10) { grid-area: synced; padding-top: 7px; border-top: 1px solid #edf2ee; font-size: 12px; }
body.style-view-detail #style-pool .style-thumbnail,
body.style-view-detail #style-pool .image-fallback { width: 184px; height: 246px; min-height: 246px; }

@media (max-width: 960px) {
  #style-pool #style-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .style-filter-panel .section-title { display: block; }
  .style-filter-panel .section-title .muted { display: block; margin-top: 4px; }
  .style-filter-grid, .listing-target-grid { grid-template-columns: 1fr; }
  .style-filter-grid .search-control, .listing-target-grid .muted { grid-column: auto; }
  #style-pool #style-rows { grid-template-columns: 1fr; }
  #style-pool #style-rows tr:not(.table-state) { grid-template-columns: 72px minmax(0, 1fr) auto; }
  #style-pool .style-thumbnail,
  #style-pool .image-fallback { width: 72px; height: 96px; min-height: 96px; }
  body.style-view-detail #style-pool #style-rows tr:not(.table-state) { grid-template-columns: 1fr auto; grid-template-areas: "media select" "title title" "sku sku" "category category" "source source" "color color" "composition composition" "stock stock" "synced synced"; }
  body.style-view-detail #style-pool .style-thumbnail,
  body.style-view-detail #style-pool .image-fallback { width: 100%; height: 260px; min-height: 260px; }
  .style-pagination { align-items: flex-start; flex-direction: column; }
  .style-pagination__controls { justify-content: flex-start; }
  .selection-workbench { gap: 8px; }
  .style-view-switch { margin: 0; }
  .section-toolbar .selection-workbench { width: 100%; }
  .section-toolbar > #prepare-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #style-pool #style-rows tr:not(.table-state) { transition: none; }
}

/* Controlled workflow additions: the mode selector is visible, while the
   checkbox remains only as the existing accessible form state. */
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.data-maintenance { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:14px 0; }
.data-maintenance.hidden { display:none; }
.selection-safety-note.hidden { display:none; }
.data-maintenance p { margin:5px 0 0; max-width:760px; }
.publish-mode-control { display:inline-flex; gap:0; overflow:hidden; border:1px solid #b9c4d4; border-radius:6px; background:#ffffff; }
.publish-mode-button { min-height:38px; margin:0; padding:7px 14px; border:0; border-radius:0; background:transparent; color:var(--color-muted); font-size:13px; font-weight:800; }
.publish-mode-button + .publish-mode-button { border-left:1px solid #b9c4d4; }
.publish-mode-button.is-active { background:#0e5c5a; color:#ffffff; }
.publish-mode-button:disabled { cursor:not-allowed; opacity:.58; }
.batch-progress__create-count { color:#176b42; font-size:12px; font-weight:800; white-space:nowrap; }
.batch-preview-metrics { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; }
.batch-preview-metrics.hidden { display:none; }
.batch-preview-metrics button { min-height:34px; padding:6px 9px; border:1px solid var(--color-border); border-radius:5px; background:#ffffff; color:#475467; font-size:12px; font-weight:800; }
.batch-preview-metrics button.is-active { border-color:#0e5c5a; background:#dff4e7; color:#0e5c5a; }
.batch-preview-metrics span { display:inline-block; min-width:18px; color:#0e5c5a; }
.developer-feedback-context { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin:0 0 14px; padding:9px 10px; border:1px solid var(--color-border); border-radius:6px; background:#f8fafc; color:var(--color-muted); font-size:12px; line-height:18px; }
.developer-feedback-context.hidden { display:none; }

@media (max-width: 480px) {
  header { min-height:56px; padding:10px 12px; gap:8px; }
  header h1 { max-width:calc(100% - 148px); font-size:17px; line-height:23px; }
  .identity { max-width:140px; gap:5px; font-size:12px; }
  .identity .avatar { flex:0 0 auto; }
  header .identity .link-button { max-width:84px; overflow:hidden; color:#ffffff; text-overflow:ellipsis; white-space:nowrap; }
  .identity .secondary { min-height:32px; padding:5px 8px; font-size:12px; }
  .data-maintenance { align-items:flex-start; flex-direction:column; }
  .publish-mode-control { width:100%; }
  .publish-mode-button { flex:1 1 50%; padding-inline:8px; }
  .batch-progress__actions { align-items:flex-start; flex-wrap:wrap; }
  .batch-progress__create-count { width:100%; }
  .batch-preview-metrics { gap:6px; }
  .batch-preview-metrics button { flex:1 1 calc(50% - 6px); min-width:0; }
  .batch-preview-metrics #batch-preview-clear-filter { flex-basis:100%; }
  .developer-feedback-fab { position:static; display:flex; justify-content:center; width:calc(100% - 32px); min-width:0; min-height:44px; margin:16px auto 20px; padding:8px 14px; border-right:1px solid rgb(255 255 255 / 28%); border-radius:6px; box-shadow:none; }
  .developer-feedback-fab:hover, .developer-feedback-fab:focus-visible { background:var(--color-primary-hover); box-shadow:none; }
  .developer-feedback-context { flex-direction:column; }
}

/* Task and account records use the same scan-friendly card rhythm as the workbench.
   They retain table markup so existing keyboard, screen-reader, and action behavior stays intact. */
.task-history-table-wrap,
.personal-table-wrap {
  max-height: none;
  overflow: visible;
  border: 0;
  background: transparent;
}
.task-history-table-wrap table,
.personal-table-wrap table { display: block; }
.task-history-table-wrap thead,
.personal-table-wrap thead { display: none; }

#task-history-rows,
#task-center #task-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
#task-center .table-wrap { max-height: none; overflow: visible; border: 0; background: transparent; }
.queue-health-alert { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #edb6aa; border-left: 4px solid var(--color-danger); border-radius: 6px; background: #fff6f4; color: #8d2b1d; font-size: 13px; font-weight: 700; line-height: 20px; overflow-wrap: anywhere; }
#task-center table { display: block; }
#task-center thead { display: none; }
#task-history-rows tr:not(.table-state),
#task-center #task-rows tr:not(.table-state) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "product action"
    "status status"
    "destination destination"
    "operator operator"
    "mode mode"
    "progress progress";
  gap: 8px 14px;
  align-items: start;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 2px 5px rgb(45 68 58 / 4%);
}
#task-history-rows tr:not(.table-state):hover,
#task-center #task-rows tr:not(.table-state):hover { background: #ffffff; border-color: #a9d4c7; box-shadow: 0 9px 20px rgb(45 68 58 / 10%); }
.task-list-row--attention { border-left: 4px solid #d7a028 !important; background: #fffdf6 !important; }
#task-history-rows td,
#task-center #task-rows td {
  display: none;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: break-word;
  word-break: normal;
}
#task-history-rows td:nth-child(1),
#task-center #task-rows td:nth-child(1) { display: block; grid-area: product; color: var(--color-text); font-size: 14px; font-weight: 800; }
.task-group-toggle { display: block; min-height: 28px; margin-top: 5px; padding: 3px 0; border: 0; border-radius: 0; background: transparent; color: var(--color-primary); font: inherit; font-size: 12px; font-weight: 800; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.task-group-toggle:hover, .task-group-toggle:focus-visible { color: var(--color-primary-hover); outline: 2px solid rgb(14 92 90 / 30%); outline-offset: 2px; }
.task-group-items { display: grid; gap: 4px; margin-top: 6px; }
.task-group-items.hidden { display: none; }
.task-group-item { width: 100%; min-height: 30px; padding: 5px 7px; border: 1px solid var(--color-border); border-radius: 5px; background: #f8fbf9; color: var(--color-text); font: inherit; font-size: 12px; font-weight: 700; line-height: 18px; text-align: left; overflow-wrap: anywhere; }
.task-group-item:hover, .task-group-item:focus-visible { border-color: #78ad9d; background: var(--color-primary-soft); outline: 2px solid rgb(14 92 90 / 20%); outline-offset: 1px; }
#task-history-rows td:nth-child(2),
#task-center #task-rows td:nth-child(2) { display: block; grid-area: destination; }
#task-history-rows td:nth-child(3),
#task-center #task-rows td:nth-child(3) { display: block; grid-area: mode; font-weight: 700; }
#task-history-rows td:nth-child(4),
#task-center #task-rows td:nth-child(4) { display: flex; grid-area: status; min-width: 0; align-items: center; justify-content: flex-start; }
.task-status { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.task-status--neutral { background: #eef2f6; color: #475467; }
.task-status--active { background: #e3f4f2; color: #0e5c5a; }
.task-status--success { background: #ecfdf3; color: #027a48; }
.task-status--warning { background: var(--color-warning-bg); color: var(--color-warning-text); }
.task-status--danger { background: #fff1f0; color: var(--color-danger); }
#task-history-rows td:nth-child(5),
#task-center #task-rows td:nth-child(5) { display: grid; grid-area: progress; gap: 2px; }
#task-history-rows td:nth-child(5) strong,
#task-center #task-rows td:nth-child(5) strong { color: var(--color-text); font-weight: 700; }
#task-history-rows td:nth-child(6),
#task-center #task-rows td:nth-child(6) { display: block; grid-area: operator; color: var(--color-muted); font-size: 12px; }
#task-history-rows td:nth-child(7),
#task-center #task-rows td:nth-child(7) { display: flex; grid-area: action; min-width: 0; align-self: start; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
#task-history-rows td:nth-child(6) button,
#task-center #task-rows td:nth-child(6) button,
#task-history-rows td:nth-child(7) button,
#task-center #task-rows td:nth-child(7) button { flex: 0 0 auto; min-height: 34px; padding: 6px 10px; font-size: 12px; white-space: nowrap; }
#task-history-rows tr.table-state,
#task-center #task-rows tr.table-state { display: block; border: 1px dashed var(--color-border); border-radius: 7px; background: #fbfdfb; }
#task-history-rows tr.table-state td,
#task-center #task-rows tr.table-state td { display: block; padding: 28px 16px; text-align: center; }
.task-failure-summary { display: block; min-width: 0; overflow-wrap: anywhere; word-break: normal; }

#admin-user-section #user-rows {
  display: grid;
  gap: 12px;
}
#admin-user-section #user-rows tr:not(.table-state) {
  display: grid;
  grid-template-columns: minmax(180px, .72fr) minmax(0, 1.7fr) auto;
  grid-template-areas: "identity stores actions";
  gap: 16px;
  align-items: start;
  padding: 15px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: #ffffff;
}
#admin-user-section #user-rows td { display: none; min-width: 0; padding: 0; border: 0; }
#admin-user-section #user-rows td:nth-child(1) { display: block; grid-area: identity; color: var(--color-text); font-weight: 800; white-space: pre-line; }
#admin-user-section #user-rows td:nth-child(2) { display: block; grid-area: identity; align-self: end; color: var(--color-muted); font-size: 12px; transform: translateY(23px); }
#admin-user-section #user-rows td:nth-child(3) { display: block; grid-area: identity; justify-self: start; margin-top: 47px; }
#admin-user-section #user-rows td:nth-child(4) { display: block; grid-area: stores; }
#admin-user-section #user-rows td:nth-child(5) { display: flex; grid-area: actions; flex-direction: column; gap: 8px; }
#admin-user-section #user-rows tr.table-state { display: block; border: 1px dashed var(--color-border); border-radius: 7px; }
#admin-user-section #user-rows tr.table-state td { display: block; padding: 22px; text-align: center; }

@media (max-width: 820px) {
  #task-history-rows, #task-center #task-rows { grid-template-columns: 1fr; }
  #admin-user-section #user-rows tr:not(.table-state) { grid-template-columns: 1fr; grid-template-areas: "identity" "stores" "actions"; }
  #admin-user-section #user-rows td:nth-child(2) { transform: none; margin-top: -15px; }
  #admin-user-section #user-rows td:nth-child(3) { margin-top: 0; }
  #admin-user-section #user-rows td:nth-child(5) { flex-direction: row; flex-wrap: wrap; }
}

/* At non-fullscreen desktop widths, keep each task card wide enough for its
   product identity and action labels. Two narrow cards make long SKC/SKU
   values unreadable and turn buttons into vertical strips. */
@media (max-width: 1100px) {
  #task-history-rows,
  #task-center #task-rows { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  #task-history-rows tr:not(.table-state), #task-center #task-rows tr:not(.table-state) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "product action" "status status" "destination destination" "operator operator" "mode mode" "progress progress"; }
  #task-history-rows td:nth-child(4), #task-center #task-rows td:nth-child(4) { justify-content: flex-start; text-align: left; }
  #task-history-rows td:nth-child(7), #task-center #task-rows td:nth-child(7) { justify-content: flex-end; }
}
