/* Shared controls for the local merchandise and colour-planning views. */
.merch-search,
.merch-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #d5dfd5;
  border-radius: 7px;
  background: #fff;
  color: #52675a;
}
.merch-search {
  padding-inline: 10px;
}
.merch-search input {
  width: 100%;
  min-width: 0;
  outline: 0;
  border: 0;
  background: transparent;
  font-size: 0.88rem;
  color: var(--ink);
}
.merch-search:focus-within,
.merch-select:focus-within {
  outline: 2px solid #49815c;
  outline-offset: 1px;
}
.merch-select {
  position: relative;
}
.merch-select select {
  min-height: 34px;
  appearance: none;
  width: 100%;
  border: 0;
  padding: 5px 26px 5px 10px;
  border-radius: inherit;
  background: transparent;
  color: var(--ink);
  font-size: 0.85rem;
}
.merch-select svg {
  pointer-events: none;
  position: absolute;
  right: 7px;
}
.merch-work,
.plan-work {
  padding: clamp(12px, 1.75vw, 27px);
}
.merch-work > .merch-panel,
.plan-work > .plan-params {
  max-width: none;
}
.product-page .page-head,
.planner-page .page-head {
  padding-block: 19px;
}
.page-head .btn[href],
.empty .btn[href] {
  text-decoration: none;
}
.merch-tabs {
  display: flex;
  align-items: stretch;
  gap: 5px;
  padding: 10px 15px 0;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
.merch-tabs button {
  position: relative;
  min-height: 43px;
  padding: 0 16px;
  color: #516456;
  white-space: nowrap;
  font-size: 0.93rem;
}
.merch-tabs button[aria-pressed='true'] {
  color: #1c6446;
  font-weight: 650;
}
.merch-tabs button[aria-pressed='true']:after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline: 8px;
  background: #267450;
  height: 3px;
  border-radius: 3px 3px 0 0;
}
.merch-toolbar,
.merch-toolbar > div,
.merch-toolbar search,
.merch-footer,
.merch-footer > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.merch-toolbar,
.merch-footer {
  justify-content: space-between;
  padding: 15px 17px;
  flex-wrap: wrap;
}
.merch-toolbar h2,
.plan-list h2 {
  font-size: 1.07rem;
  font-weight: 650;
}
.merch-toolbar > div > span,
.merch-footer > span {
  font-size: 0.8rem;
  color: #617466;
}
.merch-toolbar search {
  flex-wrap: wrap;
}
/* Platform listings share one header across all styles. */
.product-page .merch-work,
.product-page .merch-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.product-page .merch-panel {
  container-type: inline-size;
  flex: 1 0 auto;
  min-height: 275px;
  width: 100%;
  max-width: none;
}
.merch-panel .merch-toolbar {
  justify-content: flex-start;
  padding: 9px 15px 6px;
}
.merch-toolbar search {
  flex: 0 1 235px;
}
.merch-toolbar .catalog-actions {
  margin-inline-start: auto;
}
.merch-search {
  flex: 0 1 235px;
}
.merch-toolbar .catalog-actions {
  gap: 8px;
  flex-wrap: wrap;
}
.catalog-info [hidden],
.merch-feedback[hidden],
.merch-group-head [hidden] {
  display: none;
}
.catalog-info {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 12px;
  padding: 0 15px 8px;
  min-height: 22px;
  color: #52675a;
  font-size: 0.78rem;
}
.catalog-info .text-button {
  font-size: inherit;
}
.catalog-info [data-merch-selected]:not(:empty) {
  color: #205f46;
  font-weight: 600;
}
.catalog-info [data-sort-info] {
  color: #627268;
}
.merch-feedback {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 6px 15px;
  color: #215f43;
  border-top: 1px solid #dce9dd;
  background: #f0f7ef;
  font-size: 0.84rem;
}
.merch-feedback a {
  color: inherit;
}
.merch-table-wrap {
  min-height: 110px;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  contain: size;
  border-top: 1px solid #dce5dc;
}
.merch-table-wrap:focus-visible {
  outline: 2px solid #528169;
  outline-offset: -2px;
}
.merch-table-wrap:has(+ [data-merch-empty]:not([hidden])) {
  flex: 0 0 31px;
  min-height: 31px;
}
.merch-table,
.size-table {
  border-spacing: 0;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.merch-table {
  --pick-w: 34px;
  min-width: 895px;
  table-layout: fixed;
  font-size: 0.84rem;
}
.merch-table thead th,
.size-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f8f3;
  color: #54695a;
  font-size: 0.78rem;
  font-weight: 550;
}
.merch-table th,
.merch-table td {
  padding: 4px 9px;
  border-bottom: 1px solid #e8ede7;
  line-height: 1.35;
  text-align: start;
}
.merch-table thead th {
  height: 30px;
  white-space: nowrap;
  border-color: #dce5dc;
}
.merch-table [data-col='code'] {
  width: 22%;
}
.merch-table [data-col='price'] {
  width: 84px;
}
.merch-table [data-col='stock'] {
  width: 70px;
}
.merch-table [data-col='sales'] {
  width: 101px;
}
.merch-table [data-col='on'] {
  width: 61px;
}
.merch-table [data-col='erp'] {
  width: 75px;
}
.merch-table [data-col='presale'] {
  width: 79px;
}
.merch-table :is([data-col='erp'], [data-col='presale'], [data-value='erp'], [data-value='presale']) {
  text-align: end;
}
.merch-table [data-value='erp'] {
  color: #406953;
}
.merch-table th[data-col='price'],
.merch-table th[data-col='stock'],
.merch-table th[data-col='sales'],
.merch-table td[data-value='price'],
.merch-table td[data-value='stock'],
.merch-table td[data-value='sales'] {
  text-align: end;
}
.merch-table thead button {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  gap: 4px;
  color: inherit;
  font: inherit;
}
.merch-table th[aria-sort] {
  color: #165c44;
}
.merch-table .catalog-pick {
  width: var(--pick-w);
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: center;
  padding: 0;
  background: #fff;
}
.merch-table .catalog-pick input {
  display: block;
  margin: auto;
  width: 16px;
  height: 16px;
  accent-color: #20674c;
  cursor: pointer;
}
.merch-table input:disabled {
  cursor: default;
}
.catalog-offer > th,
.merch-table thead [data-col='code'] {
  position: sticky;
  left: var(--pick-w);
  z-index: 1;
  box-shadow: 1px 0 #e4eae3;
}
.catalog-offer > th {
  background: white;
  font-weight: 500;
}
.merch-table thead .catalog-pick,
.merch-table thead [data-col='code'] {
  background: #f5f8f3;
  z-index: 3;
}
.catalog-offer td {
  height: 28px;
}
.catalog-offer [data-value='title'] {
  overflow-wrap: anywhere;
}
.catalog-platform {
  display: flex;
  align-items: center;
  gap: 6px;
  min-inline-size: 0;
}
.catalog-platform .platform-tag {
  flex: none;
}
.catalog-short {
  color: #53675a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-offer:hover > *,
.catalog-offer:focus-within > * {
  background: #f7faf6;
}
.catalog-offer:has(input:checked) > * {
  background: #eff7ef;
}
.merch-table .merch-group-head > th,
.merch-table .merch-group-head > td {
  background: #edf3e9;
  border-color: #dce6d9;
}
.merch-group-head > th {
  padding: 2px 9px;
}
.merch-group-head > th > div {
  display: flex;
  position: sticky;
  left: calc(var(--pick-w) + 6px);
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 11px;
  min-height: 28px;
}
.merch-group-head [data-merch-group] {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  color: #294c38;
  text-align: start;
}
.merch-group-head [data-merch-group] i {
  display: inline-flex;
}
.merch-group-head [aria-expanded='true'] i {
  transform: rotate(90deg);
}
.merch-group-head [data-merch-group]:disabled {
  opacity: 0.82;
  cursor: default;
}
.merch-group-head [data-merch-group]:disabled i {
  visibility: hidden;
}
.merch-group-head small,
.merch-group-head .text-button {
  font-size: 0.76rem;
  font-weight: 500;
}
.merch-group-head small {
  color: #56695c;
}
.merch-table .platform-tag,
.merch-table .listing-state {
  padding: 2px 6px;
  line-height: 1.4;
}
.merch-panel .merch-footer {
  padding: 7px 15px;
  border-top: 1px solid var(--line);
}
.product-page .page-buttons .btn,
.tasks-page .page-buttons .btn {
  white-space: nowrap;
}
[data-pending-count] {
  border-radius: 4px;
  background: #eef3ec;
  color: #376044;
  padding: 1px 5px;
  font-variant-numeric: tabular-nums;
}
.platform-tag,
.listing-state,
.color-status,
.plan-count {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 550;
  white-space: nowrap;
}
.platform-tag.tb {
  background: #fff0e7;
  color: #994017;
}
.platform-tag.dy {
  background: #eaeef3;
  color: #253947;
}
.platform-tag.pdd {
  background: #ffeded;
  color: #a0322b;
}
.platform-tag.xhs {
  background: #fdeaf0;
  color: #9b3154;
}
.listing-state.on,
.color-status {
  color: #376647;
  background: #e7f1e2;
}
.listing-state.off {
  color: #646a67;
  background: #eef0ee;
}
.merch-footer[hidden],
.plan-list-foot[hidden] {
  display: none;
}
/* The list and the editor have independent scroll positions on wide screens. */
.plan-work {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.plan-params {
  flex: none;
  width: 100%;
  border-radius: 10px;
}
.plan-params summary,
.color-rules summary {
  display: list-item;
  cursor: pointer;
  color: #395d44;
  padding: 12px 15px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.plan-params summary span {
  color: #68796d;
  font-size: 0.78rem;
  margin-inline-start: 10px;
}
.plan-params form {
  padding: 0 15px 13px;
}
.plan-params fieldset,
#color-plan-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.plan-params fieldset,
.color-rules > div {
  display: flex;
  align-items: center;
  gap: 10px 17px;
  flex-wrap: wrap;
}
.plan-params label,
.color-rules label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
}
.planner-page input[type='number'] {
  width: 68px;
  border: 1px solid #cbd8cb;
  border-radius: 5px;
  padding: 5px 6px;
  background: #fff;
  font-size: 0.86rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.planner-page input:disabled {
  color: #66786c;
  background: #f4f6f3;
}
.plan-params p,
.color-rules p,
.plan-explain,
.plan-saved,
.fabric-box p,
.fabric-ref p {
  color: #637367;
  font-size: 0.79rem;
  line-height: 1.6;
}
.plan-params p {
  margin-top: 8px;
}
.plan-layout {
  flex: 1 0 min(430px, 65dvh);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(285px, 0.83fr) minmax(0, 1.6fr);
  gap: 13px;
  align-items: stretch;
}
.plan-list,
.plan-detail {
  min-width: 0;
  min-height: 0;
}
.plan-list {
  display: flex;
  flex-direction: column;
}
.plan-list > header {
  padding: 14px 14px 12px;
}
.plan-list > header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-count {
  color: #586c5c;
  background: #edf2e9;
}
.plan-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.plan-filters .merch-select {
  flex: 0 1 auto;
}
.plan-filters .merch-search {
  flex: 1 1 143px;
}
.plan-list-head,
.color-select {
  display: flex;
  align-items: center;
  gap: 7px;
}
.plan-list-head {
  justify-content: space-between;
  padding: 5px 11px 5px 13px;
  background: #f6f8f4;
  color: #64756a;
  border-block: 1px solid #e6ebe3;
  font-size: 0.75rem;
}
.plan-list-head .merch-select {
  justify-self: start;
  background: none;
  border: 0;
}
.plan-list-head select {
  color: #516b58;
  padding-inline-start: 0;
}
.plan-list-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior-y: contain;
  scrollbar-color: #b5c4b7 transparent;
}
.color-entry {
  border-bottom: 1px solid #e6ebe4;
  border-inline-start: 3px solid transparent;
}
.color-entry.active {
  border-inline-start-color: #5a8853;
  background: #edf4e8;
}
.color-row {
  display: flex;
  align-items: start;
}
.color-expand {
  padding: 13px 0 8px 5px;
  color: #638267;
  flex: none;
  min-width: 26px;
  min-height: 41px;
}
.color-select {
  padding: 11px 11px 11px 1px;
  flex: 1;
  min-width: 0;
  text-align: start;
}
.color-list-name {
  flex: 1;
  display: grid;
  justify-items: start;
  gap: 2px;
  min-width: 0;
}
.color-select strong,
.color-title h2 {
  overflow-wrap: anywhere;
}
.color-select strong {
  color: #2c4033;
  font-size: 0.91rem;
  line-height: 1.4;
}
.color-list-name > b {
  color: #537348;
  font-size: 0.81rem;
}
.color-select small {
  color: #66766a;
  font-size: 0.73rem;
  line-height: 1.4;
}
.color-select .color-status {
  flex: none;
  font-size: 0.69rem;
  padding: 2px 5px;
}
.color-skus,
.batch-item ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.color-skus {
  padding: 0 12px 9px 29px;
}
.color-skus li,
.batch-item li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  padding: 4px 0;
  border-top: 1px solid #e1e8de;
  overflow-wrap: anywhere;
}
.color-skus small {
  white-space: nowrap;
  color: #647568;
}
.plan-list-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: #67776b;
}
.plan-list-foot > div {
  display: flex;
  gap: 4px;
}
.plan-list-foot .btn.small {
  min-height: 26px;
  padding-inline: 7px;
}
.plan-detail {
  padding: 16px;
  overflow: auto;
  scrollbar-color: #b8c6ba transparent;
}
.plan-back {
  display: none;
}
.color-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
}
.color-title h2 {
  font-size: 1.22rem;
  color: #283d30;
  line-height: 1.35;
}
.color-title h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #557a47;
  margin-top: 5px;
}
.color-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #f1f6ed;
  border: 1px solid #e2eadf;
  border-radius: 8px;
  padding: 7px 0;
  margin: 0 0 8px;
}
.color-metrics > div {
  padding-inline: clamp(6px, 1.1vw, 16px);
}
.color-metrics dt {
  font-size: 0.76rem;
  color: #607064;
}
.color-metrics dd {
  margin: 2px 0 0;
  color: #25432e;
  font-size: clamp(1rem, 1.22vw, 1.35rem);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.plan-save {
  width: 100%;
}
.fabric-box,
.fabric-ref,
.color-rules {
  padding: 10px 11px;
  border: 1px solid #dfe7db;
  background: #f8faf6;
  border-radius: 7px;
}
.fabric-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 10px;
}
.fabric-box strong,
.fabric-ref strong {
  font-size: 0.87rem;
  color: #3d5944;
}
.fabric-box small {
  margin-left: 5px;
  font-size: 0.75rem;
  color: #647469;
}
.fabric-inputs,
.fabric-inputs label,
.batch-actions,
.color-total,
.plan-save-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.fabric-inputs label {
  font-size: 0.76rem;
  gap: 4px;
  color: #57695c;
}
.fabric-inputs input[type='number'] {
  width: 56px;
}
.fabric-box p {
  flex: 1 1 100%;
}
.fabric-ref,
.plan-save-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 9px 0;
}
.fabric-ref .btn {
  flex: none;
}
.batch-actions {
  margin: 12px 0;
}
.color-total {
  align-items: end;
  margin: 10px 0 12px;
}
.color-total label {
  display: grid;
  gap: 4px;
  font-size: 0.8rem;
  color: #596d5f;
}
.color-total label span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.color-total input[type='number'] {
  width: 122px;
}
.color-total .text-button {
  font-size: 0.77rem;
  margin-bottom: 5px;
}
.color-rules {
  padding: 0;
}
.color-rules summary {
  padding: 9px 11px;
}
.color-rules > div,
.color-rules > p {
  margin: 0 11px 8px;
}
.size-scroll {
  overflow: auto;
  width: 100%;
  max-height: 46dvh;
  border: 1px solid #e3e9e1;
  border-radius: 6px;
  margin-top: 9px;
}
.size-table {
  min-width: 595px;
  table-layout: auto;
  font-size: 0.79rem;
}
.size-table td,
.size-table th {
  padding: 8px 5px;
  text-align: end;
  border-bottom: 1px solid #e5ebe3;
  white-space: nowrap;
}
.size-table th:first-child,
.size-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  text-align: start;
  background: #fff;
  min-width: 82px;
  max-width: 120px;
  white-space: normal;
  overflow-wrap: anywhere;
  z-index: 1;
}
.size-table thead th:first-child {
  background: #f5f8f3;
  z-index: 3;
}
.size-table th small,
.size-table td small {
  display: block;
  color: #6c7c6e;
  font-size: 0.69rem;
  font-weight: 400;
  margin-top: 3px;
}
.size-table td:nth-child(2),
.size-table td:nth-child(4),
.size-table td:nth-child(6),
.size-table td:nth-child(8),
.size-table td:nth-child(10) {
  background: #f2f6ef;
}
.size-table [data-assigned],
.size-table [data-after] {
  color: #356743;
  font-weight: 650;
}
.size-table .negative {
  color: #a34736;
}
.size-table input[type='number'] {
  width: 49px;
  text-align: center;
  padding: 4px 2px;
  appearance: textfield;
}
.size-table input::-webkit-inner-spin-button {
  appearance: none;
}
.plan-explain {
  margin: 7px 0;
}
.plan-save-summary {
  padding-block-start: 8px;
  border-top: 1px solid var(--line);
}
.plan-save-summary > div {
  display: flex;
  gap: 5px 7px;
  align-items: baseline;
  flex-wrap: wrap;
}
.plan-save-summary b {
  font-size: 1.24rem;
  color: #4b713e;
}
.plan-save-summary small {
  font-size: 0.76rem;
  color: #627266;
}
.plan-saved:not(:empty) {
  margin-top: 6px;
}
.plan-dialog {
  max-width: min(95vw, 540px);
}
.plan-dialog:not([open]) {
  display: none;
}
.batch-sub {
  font-weight: 600;
  color: #395843;
  margin-bottom: 10px;
}
.batch-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  margin: 7px 0;
}
.batch-item summary {
  cursor: pointer;
  font-size: 0.87rem;
}
.batch-item summary span {
  margin-left: 7px;
  color: #607165;
}
.batch-item p,
.copy-fallback {
  margin: 8px 0;
  font-size: 0.85rem;
}
.copy-fallback {
  display: grid;
  gap: 6px;
}
.copy-fallback textarea {
  width: 100%;
  min-height: 160px;
}
@media (min-width: 1650px) {
  .plan-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .plan-layout {
    grid-template-columns: minmax(230px, 0.68fr) minmax(0, 1.45fr);
    gap: 8px;
  }
  .plan-work {
    padding: 10px;
  }
  .plan-detail {
    padding: 11px;
  }
}
@media (max-width: 760px) {
  .plan-work {
    display: block;
  }
  .plan-params {
    margin: 0 0 10px;
  }
  .plan-layout {
    display: block;
  }
  .planner-page[data-subview='list'] .plan-detail,
  .planner-page[data-subview='detail'] .plan-list {
    display: none;
  }
  .planner-page[data-subview='detail'] .plan-params {
    display: none;
  }
  .plan-back {
    display: inline-flex;
    margin-bottom: 12px;
  }
  .plan-list-scroll,
  .plan-detail {
    overflow: visible;
  }
  .plan-detail {
    padding: 12px;
  }
  .plan-list-scroll {
    overscroll-behavior: auto;
  }
  .color-expand {
    min-width: 35px;
    min-height: 44px;
  }
  .color-select strong {
    font-size: 1rem;
  }
  .color-select small {
    font-size: 0.78rem;
  }
  .merch-tabs {
    padding: 5px 5px 0;
    gap: 0;
  }
  .merch-tabs button {
    flex: 1 0 auto;
    min-height: 44px;
    padding-inline: 7px;
    font-size: 0.85rem;
  }
  .merch-toolbar {
    align-items: stretch;
    padding: 12px;
    gap: 8px;
  }
  .merch-toolbar search {
    width: 100%;
    flex-wrap: nowrap;
  }
  .merch-toolbar .merch-search {
    flex: 1;
  }
  .merch-search input,
  .merch-select select,
  .planner-page input[type='number'] {
    font-size: 1rem;
  }
  .color-metrics > div {
    padding-inline: 5px;
  }
  .color-metrics dt {
    font-size: 0.71rem;
  }
  .planner-page .page-head,
  .product-page .page-head {
    padding: 13px 15px;
  }
  .fabric-box small {
    display: block;
    margin: 3px 0;
  }
  .fabric-inputs,
  .fabric-ref,
  .plan-save-summary {
    flex-wrap: wrap;
  }
  .size-scroll {
    max-height: 55dvh;
  }
  .batch-actions .btn,
  .color-expand,
  .plan-save,
  .plan-back,
  .merch-select select,
  .merch-search {
    min-height: 44px;
  }
}
.batch-purchase {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block-start: 9px;
  border-top: 1px solid var(--line);
}
.batch-purchase label,
.batch-purchase small,
.batch-receipt {
  font-size: 0.82rem;
  color: #546c5c;
}
.batch-purchase select {
  border: 1px solid #cbd8cb;
  border-radius: 5px;
  padding: 4px 6px;
  background: #fff;
  color: var(--ink);
}
.batch-purchase small {
  flex: 1 1 100%;
}
.batch-receipt {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bulk-dialog {
  width: min(650px, calc(100vw - 24px));
  max-height: min(88dvh, 850px);
}
.bulk-scope {
  color: #2f5740;
  font-weight: 600;
  margin: 0 0 12px;
}
.bulk-inputs {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) minmax(0, 2.3fr);
  gap: 8px 12px;
}
.bulk-inputs label {
  display: grid;
  align-content: start;
  gap: 5px;
  font-size: 0.84rem;
  color: #465849;
}
.bulk-inputs input,
.bulk-inputs select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
  background: white;
  border: 1px solid #cddbcf;
  border-radius: 6px;
}
.bulk-example {
  margin-block: 6px 2px;
}
.bulk-more {
  margin: 10px 0 14px;
}
.bulk-more summary,
.todo-item details summary {
  color: #315d44;
  font-size: 0.83rem;
  cursor: pointer;
  width: fit-content;
  padding: 4px 0;
}
.bulk-more[open] summary {
  margin-bottom: 6px;
}
.bulk-more .bulk-inputs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.bulk-dialog h3 {
  font-size: 0.93rem;
  margin: 6px 0;
}
.bulk-hint,
.todo-item > small {
  color: #627066;
  font-size: 0.82rem;
}
.bulk-preview {
  width: 100%;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.84rem;
}
.bulk-preview th,
.bulk-preview td {
  text-align: start;
  vertical-align: top;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.bulk-preview thead th {
  background: #f1f5ef;
  font-weight: 550;
  color: #506454;
}
.bulk-preview thead th:first-child {
  width: 30%;
}
.bulk-preview tbody th {
  font-weight: 550;
}
.bulk-preview tbody th b {
  display: block;
  margin-bottom: 3px;
  font-weight: 550;
}
.bulk-preview td > div {
  line-height: 1.5;
}
.bulk-preview td > div + div {
  margin-top: 4px;
}
.bulk-preview td small {
  margin-right: 6px;
  color: #55665b;
  white-space: nowrap;
}
.bulk-preview del {
  color: #737e77;
}
.bulk-preview strong {
  color: #1a6143;
  font-weight: 590;
}
.bulk-error:not(:empty) {
  margin-top: 8px;
  color: #94452a;
  font-size: 0.88rem;
}
.bulk-dialog .dialog-footer {
  position: sticky;
  bottom: 0;
  padding-block: 9px;
  background: white;
  border-top: 1px solid var(--line);
}
.tasks-page .todo-panel {
  width: min(100%, 1050px);
  margin-inline: 0;
}
.todo-item {
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
}
.todo-item p {
  margin: 5px 0;
  font-size: 0.91rem;
  overflow-wrap: anywhere;
}
.todo-title,
.todo-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.todo-title h3 {
  flex: 0 1 auto;
  overflow-wrap: anywhere;
}
.todo-actions:not(:empty) {
  margin-top: 7px;
}
.todo-item details {
  margin-top: 7px;
}
.todo-item .bulk-preview {
  margin-top: 5px;
}
.tasks-page .bulk-error:not(:empty) {
  padding: 8px 17px;
  margin: 0;
}
.tasks-page [data-todo-msg]:not(.is-error) {
  color: #275d41;
}
@media (max-width: 760px) {
  .product-page .merch-work {
    padding: 6px 5px;
  }
  .product-page .merch-panel {
    border-radius: 8px;
  }
  .merch-panel .merch-toolbar {
    padding: 7px 9px 4px;
    gap: 5px;
  }
  .product-page .page-head {
    flex-wrap: nowrap;
    align-items: center;
    gap: 7px;
  }
  .product-page .page-head p {
    margin-top: 3px;
  }
  .merch-panel .merch-toolbar search {
    flex: 1 1 100%;
  }
  .merch-panel .merch-search {
    flex: 1;
    min-height: 37px;
  }
  .merch-panel .catalog-filters {
    flex-wrap: wrap;
    gap: 5px;
  }
  .merch-panel .merch-select select {
    min-height: 35px;
    font-size: 0.85rem;
  }
  .merch-panel .catalog-actions {
    margin-inline-start: auto;
  }
  .merch-panel .catalog-actions .btn {
    min-height: 35px;
  }
  .catalog-info {
    padding: 0 9px 5px;
  }
  .merch-panel .merch-footer {
    padding: 5px 9px;
  }
  .tasks-page .merch-work {
    padding: 9px;
  }
  .bulk-dialog {
    --dialog-pad: 12px;
    max-height: 92dvh;
  }
  .bulk-inputs,
  .bulk-more .bulk-inputs {
    grid-template-columns: minmax(0, 1fr);
  }
  .bulk-inputs input,
  .bulk-inputs select {
    font-size: 1rem;
  }
  .bulk-preview th,
  .bulk-preview td {
    padding: 6px;
  }
  .bulk-preview thead th:first-child {
    width: 31%;
  }
  .bulk-dialog .dialog-footer .btn {
    flex: 1 1 auto;
    min-height: 40px;
  }
}

.color-select .inv-thumb,
.color-title .inv-thumb {
  inline-size: 34px;
  min-inline-size: 33px;
}
.color-title > div {
  flex: 1;
  min-width: 0;
}
.color-title h3 {
  margin-block-start: 2px;
}
.color-title {
  align-items: center;
  margin-block-end: 8px;
}
.color-expanded > p {
  padding: 0 12px 5px 30px;
  font-size: 0.79rem;
  color: #335d43;
}
.color-expanded > p span {
  margin-inline-start: 6px;
}
.color-skus li {
  flex-wrap: wrap;
  gap: 2px 6px;
}
.plan-calc-tools {
  padding: 6px 0 9px;
  margin-block-end: 4px;
}
.plan-calc-tools .color-total {
  margin: 0 0 7px;
  align-items: end;
}
.plan-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.plan-order-actions .btn {
  min-height: 31px;
}
.order-preview {
  background: #f2f6ef;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 9px;
  margin-block: 9px;
  color: #34533e;
}
.order-preview ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 0;
  margin: 4px 0 0;
  list-style: none;
  font-size: 0.85rem;
}
@media (max-width: 760px) {
  .color-select {
    padding-block: 7px;
  }
  .color-select .color-status {
    white-space: nowrap;
  }
  .plan-order-actions .btn {
    min-height: 36px;
  }
  .plan-order-actions {
    gap: 4px;
  }
}

.catalog-group-tools {
  display: flex;
  gap: 7px 10px;
  align-items: center;
  margin-inline-start: auto;
}
.catalog-group-tools .text-button {
  min-height: 23px;
}
.catalog-select-all {
  display: none;
}
.merch-group-head [data-group-restock='false'] {
  background: #e9eee8;
  color: #53675a;
}
.bulk-dialog .bulk-stock-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  border: 1px solid #d8e3d7;
  border-radius: 7px;
  padding: 8px 10px;
  margin-block-end: 10px;
  min-width: 0;
}
.bulk-stock-options legend {
  padding-inline: 4px;
  color: #3c624a;
  font-weight: 600;
}
.bulk-stock-options label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
}
.bulk-stock-options small {
  color: #677a6c;
}
.bulk-stock-options input[type='checkbox'],
.catalog-select-all input {
  width: 15px;
  height: 15px;
  accent-color: #226346;
}
.bulk-stock-options .bulk-presale-target {
  flex: 1 1 100%;
}
.bulk-stock-options [hidden] {
  display: none;
}
.bulk-presale-target input {
  width: 100px;
  min-height: 31px;
  padding: 4px 7px;
  border: 1px solid #cddbcf;
  border-radius: 6px;
}
@container (max-width: 790px) {
  .catalog-info {
    row-gap: 3px;
  }
  .catalog-select-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 25px;
    white-space: nowrap;
  }
  .merch-table,
  .merch-table tbody {
    display: block;
    min-width: 0;
  }
  .merch-table thead {
    display: none;
  }
  .merch-table .merch-group-head {
    display: flex;
  }
  .merch-table .merch-group-head > .catalog-pick {
    display: grid;
    align-items: center;
    flex: 0 0 var(--pick-w);
  }
  .merch-table .merch-group-head > th {
    flex: 1;
    min-width: 0;
  }
  .merch-group-head > th > div {
    position: static;
    width: auto;
    flex-wrap: wrap;
    column-gap: 7px;
    row-gap: 1px;
  }
  .merch-group-head [data-merch-group] {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .merch-group-head [data-group-restock] {
    line-height: 1.2;
    padding: 2px 4px;
    font-size: 0.67rem;
  }
  .merch-group-head [data-edit-style] {
    min-height: 27px;
  }
  .merch-table .catalog-offer {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, max-content));
    justify-content: space-between;
    padding: 5px 8px;
    gap: 2px 4px;
    border-bottom: 1px solid var(--line);
  }
  .catalog-offer:has(input:checked) {
    background: #eff7ef;
  }
  .merch-table .catalog-offer > * {
    position: static;
    min-width: 0;
    height: auto;
    padding: 0;
    box-shadow: none;
    border: none;
    background: none;
    text-align: start;
  }
  .merch-table .catalog-offer .catalog-pick {
    grid-area: 1/1;
    justify-self: start;
    align-self: center;
    width: 22px;
  }
  .merch-table .catalog-offer input {
    width: 18px;
    height: 18px;
  }
  .merch-table .catalog-offer th {
    grid-area: 1/1/2/5;
    padding-inline-start: 26px;
  }
  .merch-table [data-value='on'] {
    grid-area: 1/5;
    justify-self: end;
  }
  .merch-table [data-value='title'] {
    grid-column: 1/-1;
    line-height: 1.4;
    font-weight: 600;
    padding-block-start: 2px;
  }
  .catalog-short {
    font-size: 0.77rem;
  }
  .merch-table .catalog-offer .catalog-metric {
    align-self: stretch;
    padding: 3px 4px;
    text-align: center;
    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 580;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #f2f6f1;
    border-radius: 4px;
  }
  .catalog-metric::before {
    content: attr(data-label);
    margin-inline-end: 3px;
    font-size: 0.67rem;
    font-weight: 470;
    color: #566a5c;
  }
}

@container (max-width: 365px) {
  .merch-panel .catalog-filters {
    flex: 1;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .merch-panel .catalog-filters .merch-select:has(#product-sort) {
    flex: 1;
  }
  .merch-panel .catalog-filters #product-sort {
    padding-inline-start: 7px;
  }
  .merch-table .catalog-offer .catalog-metric {
    font-size: 0.72rem;
    padding-inline: 2px;
  }
  .catalog-metric::before {
    font-size: 0.63rem;
    margin-inline-end: 2px;
  }
  .merch-group-head [data-merch-group] b {
    font-size: 0.8rem;
  }
}

@media (max-width: 760px) {
  .planner-page .page-head {
    flex-wrap: nowrap;
    align-items: center;
  }
  .planner-page .page-head .btn {
    white-space: nowrap;
  }
  .color-metrics {
    align-items: end;
  }
  .color-metrics dt {
    line-height: 1.25;
    text-wrap: balance;
  }
}

/* Taobao V1 Live Products Board */
.tb-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid #d6e1d3;
  border-radius: 12px;
  background: #f1f6ed;
  padding: 14px 0;
  color: #214333;
}
.tb-kpi-strip[hidden] {
  display: none;
}
.tb-kpi-strip > div {
  padding: 0 20px;
}
.tb-kpi-strip > div + div {
  border-inline-start: 1px solid #d0decd;
}
.tb-kpi-strip dt {
  font-size: 0.78rem;
  color: #556c5b;
}
.tb-kpi-strip dd {
  margin-top: 4px;
  font-size: 1.45rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tb-kpi-strip dd.is-ok {
  color: #1f6845;
}
.tb-kpi-strip dd.is-warn {
  color: #b4531b;
}
.tb-v1-table {
  width: 100%;
  border-collapse: collapse;
}
.tb-v1-table thead th {
  padding: 11px 12px;
  background: #f6f8f4;
  color: #516559;
  font-size: 0.79rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #e2e9e0;
  white-space: nowrap;
}
.tb-v1-table tbody td,
.tb-v1-table tbody th {
  padding: 11px 12px;
  border-bottom: 1px solid #ebefe9;
  vertical-align: middle;
  font-size: 0.85rem;
}
.tb-v1-table tbody tr:hover {
  background: #f9fbf8;
}
.tb-prod-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 240px;
}
.tb-prod-copy {
  min-width: 0;
  flex: 1;
}
.tb-title-link,
.tb-title-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 560;
  color: var(--ink);
  line-height: 1.38;
  font-size: 0.86rem;
}
.tb-title-link:hover {
  color: var(--pine);
  text-decoration: underline;
}
.tb-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tb-num strong {
  display: block;
  font-weight: 650;
  color: #20372b;
}
.tb-num strong.tb-num-warn {
  color: #b8421f;
}
.tb-sub-num {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  color: #6b7d72;
}
@media (max-width: 760px) {
  .tb-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 10px;
  }
  .tb-kpi-strip > div:nth-child(3) {
    border-inline-start: 0;
  }
}

