.mtv2-page {
  min-width: 980px;
  padding: 18px 22px 28px;
  color: #172033;
}

.mtv2-page * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.mtv2-page-header,
.mtv2-toolbar,
.mtv2-filter-bar,
.mtv2-status-strip,
.mtv2-pagination {
  display: flex;
  align-items: center;
}

.mtv2-page-header {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.mtv2-title {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 760;
  color: #111827;
}

.mtv2-subtitle {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.mtv2-storage-warning {
  max-width: 920px;
  color: #dc2626;
  font-weight: 700;
  line-height: 1.55;
}

.mtv2-toolbar {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mtv2-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.mtv2-button:hover {
  border-color: #64748b;
  background: #f8fafc;
}

.mtv2-button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.mtv2-button-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.mtv2-button-primary:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.mtv2-button-danger {
  border-color: #dc2626;
  background: #fff;
  color: #b91c1c;
}

.mtv2-button-active {
  border-color: #1d4ed8;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.mtv2-button-sm {
  min-height: 27px;
  padding: 0 9px;
  font-size: 12px;
}

.mtv2-filter-range > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mtv2-filter-range .mtv2-input {
  width: 92px;
}

.mtv2-column-panel {
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid #dbe4ee;
  border-radius: 6px;
  background: #fff;
}

.mtv2-column-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.mtv2-column-panel > header span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

.mtv2-column-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mtv2-column-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 4px 9px;
  border: 1px solid #dbe4ee;
  border-radius: 5px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  cursor: move;
  user-select: none;
}

.mtv2-column-drag {
  color: #94a3b8;
}

.mtv2-product-cell {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 360px;
  align-items: flex-start;
  gap: 8px;
  min-width: 230px;
}

.mtv2-product-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f3f4f6;
  object-fit: cover;
}

.mtv2-product-thumb-empty {
  display: block;
}

.mtv2-product-copy {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.mtv2-product-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
  overflow: hidden;
}

.mtv2-product-group-head td { background: #f8fafc; border-top: 1px solid #dbe4ee; }
.mtv2-product-group-count { margin-left: auto; color: #475569; font-size: 12px; white-space: nowrap; }
.mtv2-table:has(.mtv2-product-group-head) th:nth-child(2), .mtv2-table:has(.mtv2-product-group-head) td:nth-child(2), .mtv2-table:has(.mtv2-product-group-head) th:nth-child(3), .mtv2-table:has(.mtv2-product-group-head) td:nth-child(3), .mtv2-table:has(.mtv2-product-group-head) th:nth-child(5), .mtv2-table:has(.mtv2-product-group-head) td:nth-child(5), .mtv2-table:has(.mtv2-product-group-head) th:nth-child(6), .mtv2-table:has(.mtv2-product-group-head) td:nth-child(6), .mtv2-table:has(.mtv2-product-group-head) th:nth-child(7), .mtv2-table:has(.mtv2-product-group-head) td:nth-child(7), .mtv2-table:has(.mtv2-product-group-head) th:nth-child(11), .mtv2-table:has(.mtv2-product-group-head) td:nth-child(11), .mtv2-table:has(.mtv2-product-group-head) th:nth-child(15), .mtv2-table:has(.mtv2-product-group-head) td:nth-child(15) { display: none; }
.mtv2-product-group-head td { padding: 14px 18px; background: #fff; }
.mtv2-inline-store-row td { padding: 0 12px 10px; background: #fbfdff; }
.mtv2-inline-store-list { margin-left: 18px; border: 1px solid #e2e8f0; border-radius: 5px; }
.mtv2-inline-store-member { display: flex; align-items: center; gap: 14px; min-height: 38px; padding: 0 10px; border-top: 1px solid #edf2f7; font-size: 12px; }
.mtv2-inline-store-member:first-child { border-top: 0; }
.mtv2-inline-store-member strong { min-width: 150px; }
.mtv2-inline-store-member span { min-width: 105px; }
.mtv2-inline-store-member button { margin-left: auto; }

.mtv2-check-link {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.mtv2-check-link-active {
  color: #dc2626;
}

.mtv2-bundle-mark {
  flex: 0 0 auto;
  color: #16a34a;
  font-weight: 800;
}

.mtv2-bundle-badge {
  justify-content: center;
  min-width: 48px;
}

.mtv2-related-popover {
  position: absolute;
  z-index: 80;
  width: 760px;
  max-width: 86vw;
  margin-top: 6px;
  padding: 9px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
  color: #475569;
  font-size: 12px;
}

.mtv2-related-popover header,
.mtv2-related-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mtv2-related-popover header {
  margin-bottom: 7px;
}

.mtv2-related-popover header button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.mtv2-related-row {
  padding: 6px 0;
  border-top: 1px solid #f1f5f9;
}

.mtv2-related-table .mtv2-related-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 78px 78px 88px 70px 82px;
  gap: 9px;
  align-items: center;
}

.mtv2-related-head {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.mtv2-related-select {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2563eb;
  cursor: pointer;
}

.mtv2-related-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid #dbeafe;
}

.mtv2-related-current {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(76px, auto));
  gap: 7px;
  align-items: center;
  margin-bottom: 7px;
  padding: 8px;
  border: 1px solid #facc15;
  border-radius: 5px;
  background: #fefce8;
  color: #713f12;
  font-weight: 700;
}

.mtv2-related-metric-highlight {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid #facc15;
  border-radius: 4px;
  background: #fef9c3;
  color: #854d0e;
  font-weight: 800;
}

.mtv2-row-related-active {
  background: #fffbeb;
}

.mtv2-status-strip {
  min-height: 40px;
  gap: 18px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid #dbe4ee;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  margin-bottom: 12px;
}

.mtv2-status-strip strong {
  color: #172033;
}

.mtv2-update-store {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.mtv2-update-store .mtv2-select {
  width: min(360px, 34vw);
  min-width: 240px;
}

.mtv2-status-strip-running {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.mtv2-offline-sync-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.mtv2-progress-panel {
  margin-bottom: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.mtv2-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
}

.mtv2-progress-summary {
  min-width: 0;
  color: #1e40af;
  font-weight: 700;
}

.mtv2-progress-message {
  margin-top: 2px;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.mtv2-progress-elapsed {
  margin-top: 3px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 650;
}

.mtv2-step-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.mtv2-step {
  position: relative;
  min-width: 0;
  min-height: 94px;
  padding: 10px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.mtv2-step:nth-child(5n) {
  border-right: 0;
}

.mtv2-step:nth-child(n+6) {
  border-bottom: 0;
}

.mtv2-step-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mtv2-step-index {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.mtv2-step-name {
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtv2-step-meta {
  margin-top: 7px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.4;
}

.mtv2-step-duration {
  margin-top: 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.mtv2-step-running {
  z-index: 1;
  background: #dbeafe;
  box-shadow: inset 4px 0 0 #2563eb, inset 0 0 0 1px #93c5fd;
}

.mtv2-step-running .mtv2-step-index {
  background: #2563eb;
  color: #fff;
}

.mtv2-step-completed .mtv2-step-index {
  background: #16a34a;
  color: #fff;
}

.mtv2-step-completed {
  background: #f0fdf4;
  box-shadow: inset 3px 0 0 #22c55e;
}

.mtv2-step-completed .mtv2-step-duration {
  color: #15803d;
}

.mtv2-step-skipped {
  background: #f8fafc;
}

.mtv2-step-skipped .mtv2-step-index {
  background: #94a3b8;
  color: #fff;
}

.mtv2-step-failed,
.mtv2-step-partial {
  background: #fff7ed;
}

.mtv2-step-failed .mtv2-step-index,
.mtv2-step-partial .mtv2-step-index {
  background: #ea580c;
  color: #fff;
}

.mtv2-update-evidence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border-top: 1px solid #dbe4ee;
  background: #f8fafc;
}

.mtv2-evidence-block {
  min-width: 0;
  border: 1px solid #dbe4ee;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}

.mtv2-evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
  font-size: 12px;
}

.mtv2-evidence-head span {
  color: #64748b;
  font-size: 11px;
}

.mtv2-reason-list,
.mtv2-failure-list {
  max-height: 260px;
  overflow: auto;
}

.mtv2-reason-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 11px;
  border-bottom: 1px solid #f1f5f9;
  color: #64748b;
  font-size: 11px;
}

.mtv2-reason-row:last-child,
.mtv2-failure-row:last-child {
  border-bottom: 0;
}

.mtv2-reason-text {
  color: #1e293b;
  line-height: 1.45;
}

.mtv2-failure-block {
  border-color: #fed7aa;
}

.mtv2-failure-row {
  display: grid;
  gap: 5px;
  padding: 9px 11px;
  border-bottom: 1px solid #ffedd5;
  font-size: 11px;
}

.mtv2-failure-row > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mtv2-failure-error {
  color: #c2410c;
  line-height: 1.45;
}

.mtv2-failure-action {
  color: #64748b;
  line-height: 1.45;
}

.mtv2-filter-bar {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 12px;
}

.mtv2-filter-fields {
  display: flex;
  flex: 1 1 100%;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.mtv2-filter-collapse {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 9px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: #edf4ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.mtv2-filter-summary {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtv2-filter-bar-collapsed {
  min-height: 48px;
  align-items: center;
  padding: 8px 12px;
}

.mtv2-filter {
  min-width: 160px;
}

.mtv2-filter-wide {
  min-width: 240px;
  flex: 1 1 260px;
}

.mtv2-filter label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.mtv2-score-filter {
  position: relative;
}

.mtv2-score-dropdown {
  position: absolute;
  z-index: 120;
  top: calc(100% + 4px);
  left: 0;
  width: 220px;
  max-height: 360px;
  padding: 7px;
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
}

.mtv2-score-dropdown > label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  margin: 0;
  padding: 4px 7px;
  border-radius: 4px;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
}

.mtv2-score-dropdown > label:hover {
  background: #f1f5f9;
}

.mtv2-score-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 2px 7px 7px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 4px;
}

.mtv2-score-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
}

.mtv2-input,
.mtv2-select {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  color: #1f2937;
  font-size: 13px;
  outline: none;
}

.mtv2-input:focus,
.mtv2-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .1);
}

.mtv2-picker-trigger {
  display: flex;
  width: 100%;
  min-width: 190px;
  height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  color: #1f2937;
  font-size: 13px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.mtv2-picker-trigger:hover {
  border-color: #64748b;
}

.mtv2-picker-trigger:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.mtv2-table-shell {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.mtv2-list-banner {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 11px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
}

.mtv2-bulk-select,
.tsv2-bulk-select {
  position: relative;
  z-index: 3;
}

.mtv2-bulk-select summary,
.tsv2-bulk-select summary {
  cursor: pointer;
  list-style: none;
}

.mtv2-bulk-select summary::-webkit-details-marker,
.tsv2-bulk-select summary::-webkit-details-marker {
  display: none;
}

.mtv2-bulk-select-menu,
.tsv2-bulk-select-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  min-width: 150px;
  overflow: hidden;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .16);
}

.mtv2-bulk-select-menu button,
.tsv2-bulk-select-menu button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  color: #1e293b;
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
}

.mtv2-bulk-select-menu button:last-child,
.tsv2-bulk-select-menu button:last-child { border-bottom: 0; }
.mtv2-bulk-select-menu button:hover,
.tsv2-bulk-select-menu button:hover { background: #f1f5f9; }
.mtv2-bulk-select-menu small,
.tsv2-bulk-select-menu small { color: #64748b; font-size: 11px; }

.mtv2-table-wrap {
  position: relative;
  max-height: calc(100vh - 308px);
  min-height: 280px;
  overflow: auto;
}

.mtv2-card-list {
  min-width: max-content;
  padding: 6px;
  background: #f6f8fc;
}

.mtv2-product-card {
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid #dce5f1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.mtv2-product-card:last-child { margin-bottom: 0; }

.mtv2-card-product-head {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #e5ebf3;
  background: #fff;
}

.mtv2-card-product-select { flex: 0 0 auto; width: 18px; height: 18px; }

.mtv2-card-product-thumb {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  object-fit: cover;
}

.mtv2-card-product-copy { min-width: 250px; max-width: 640px; flex: 1 1 auto; }
.mtv2-card-product-copy strong { display: block; overflow: hidden; color: #172033; font-size: 14px; font-weight: 750; line-height: 19px; text-overflow: ellipsis; white-space: nowrap; }
.mtv2-card-product-copy span { display: block; overflow: hidden; margin-top: 1px; color: #94a3b8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mtv2-card-product-count { flex: 0 0 auto; color: #2563eb; font-size: 12px; font-weight: 750; }

.mtv2-card-activity-head,
.mtv2-card-activity-row {
  display: grid;
  min-width: max-content;
  align-items: stretch;
}

.mtv2-card-activity-head {
  min-height: 27px;
  border-bottom: 1px solid #e8eef6;
  background: #f4f7fb;
  color: #718096;
  font-size: 11px;
  font-weight: 750;
}

.mtv2-card-activity-head > span,
.mtv2-card-metric,
.mtv2-card-action,
.mtv2-card-select {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 5px 8px;
  border-right: 1px solid #edf1f6;
}

.mtv2-card-activity-row:nth-of-type(odd) { background: #fbfcfe; }
.mtv2-card-activity-row:hover { background: #f1f6ff; }
.mtv2-card-activity-row + .mtv2-card-activity-row { border-top: 1px solid #edf1f6; }
.mtv2-card-activity-row > :last-child, .mtv2-card-activity-head > :last-child { border-right: 0; }

.mtv2-card-select { gap: 4px; color: #64748b; font-size: 11px; cursor: pointer; }
.mtv2-card-select input { width: 16px; height: 16px; }
.mtv2-card-metric { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; overflow: hidden; color: #334155; font-size: 12px; font-weight: 650; }
.mtv2-card-metric > span, .mtv2-card-metric > strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtv2-card-metric small { max-width: 100%; overflow: hidden; color: #94a3b8; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.mtv2-card-metric[data-key="estimated_profit"] > span, .mtv2-card-metric[data-key="estimated_margin"] > span { color: #d97706; font-size: 13px; font-weight: 800; }
.mtv2-card-reason { max-width: 260px; overflow: hidden; color: #64748b; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.mtv2-card-action { justify-content: center; }
.mtv2-card-store-drawer { padding: 0 16px 12px; background: #fbfdff; }
.mtv2-card-store-drawer .mtv2-inline-store-list { margin: 0; }

.mtv2-card-score { display: inline-flex; min-height: 20px; align-items: center; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 800; }
.mtv2-card-score-green { background: #dcfce7; color: #15803d; }
.mtv2-card-score-blue { background: #dbeafe; color: #1d4ed8; }
.mtv2-card-score-yellow { background: #fef3c7; color: #b45309; }
.mtv2-card-score-red { background: #fee2e2; color: #dc2626; }
.mtv2-card-score-muted { background: #f1f5f9; color: #94a3b8; }

.mtv2-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
}

.mtv2-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 36px;
  padding: 8px 10px;
  border-bottom: 1px solid #dbe4ee;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.mtv2-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.mtv2-sort-button span {
  color: #94a3b8;
}

.mtv2-sort-button-active,
.mtv2-sort-button-active span {
  color: #2563eb;
}

.mtv2-table td {
  position: relative;
  height: 43px;
  padding: 7px 10px;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
  font-size: 12px;
  vertical-align: middle;
}

.mtv2-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.mtv2-table tbody tr:hover td {
  background: #eff6ff;
}

.mtv2-cell-title {
  max-width: 100%;
  overflow: hidden;
  color: #172033;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtv2-cell-sub {
  max-width: 100%;
  overflow: hidden;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtv2-code {
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.mtv2-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.mtv2-badge-green {
  background: #dcfce7;
  color: #166534;
}

.mtv2-badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.mtv2-badge-orange {
  background: #ffedd5;
  color: #9a3412;
}

.mtv2-badge-red {
  background: #fee2e2;
  color: #991b1b;
}

.mtv2-score {
  color: #dc2626;
  font-size: 14px;
  font-weight: 700;
}

.mtv2-loading,
.mtv2-empty {
  display: flex;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 13px;
}

.mtv2-refreshing {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 7px 11px;
  border-bottom: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}

.mtv2-loading::before {
  width: 16px;
  height: 16px;
  margin-right: 9px;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: mtv2-spin .75s linear infinite;
  content: "";
}

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

.mtv2-pagination {
  justify-content: flex-end;
  gap: 9px;
  min-height: 44px;
  padding: 7px 11px;
  color: #64748b;
  font-size: 12px;
}

.mtv2-error {
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid #fecaca;
  border-radius: 5px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 12px;
}

.mtv2-dismissible-error {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mtv2-dismissible-error button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-size: 12px;
  cursor: pointer;
}

.mtv2-debug-panel {
  margin-top: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.mtv2-debug-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.mtv2-debug-title {
  color: #172033;
  font-size: 14px;
  font-weight: 760;
}

.mtv2-debug-empty {
  padding: 28px 14px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.mtv2-debug-error {
  margin: 10px 12px 0;
}

.mtv2-debug-list {
  max-height: 720px;
  overflow: auto;
}

.mtv2-debug-event {
  border-bottom: 1px solid #e2e8f0;
}

.mtv2-debug-event:last-child {
  border-bottom: 0;
}

.mtv2-debug-event summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
}

.mtv2-debug-event summary:hover {
  background: #f8fafc;
}

.mtv2-debug-event summary strong {
  color: #172033;
}

.mtv2-debug-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  border-top: 1px solid #e2e8f0;
  background: #e2e8f0;
}

.mtv2-debug-columns > div {
  min-width: 0;
  padding: 10px 12px 12px;
  background: #fff;
}

.mtv2-debug-label {
  margin-bottom: 7px;
  color: #475569;
  font-size: 11px;
  font-weight: 750;
}

.mtv2-debug-columns pre {
  max-height: 360px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  border-radius: 4px;
  background: #111827;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.mtv2-debug-event-error {
  padding: 8px 12px;
  border-top: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 12px;
}

.mtv2-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(15, 23, 42, .52);
}

.mtv2-modal {
  width: min(1580px, 96vw);
  max-height: 90vh;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  overflow: hidden;
}

.mtv2-modal-head,
.mtv2-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
}

.mtv2-modal-foot {
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
}

.mtv2-modal-title {
  font-size: 16px;
  font-weight: 750;
}

.mtv2-modal-body {
  max-height: calc(90vh - 118px);
  overflow: auto;
  padding: 14px 15px;
}

.mtv2-submission-groups {
  margin: 12px 0;
  border: 1px solid #dbe4ee;
  border-radius: 6px;
  background: #f8fafc;
  overflow: hidden;
}

.mtv2-submission-groups > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid #dbe4ee;
  background: #fff;
}

.mtv2-submission-groups > header span {
  color: #64748b;
  font-size: 12px;
}

.mtv2-submission-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 240px;
  padding: 10px;
  overflow: auto;
}

.mtv2-submission-group {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid #dbe4ee;
  border-radius: 5px;
  background: #fff;
}

.mtv2-submission-group > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mtv2-submission-group > div strong,
.mtv2-submission-group > div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtv2-submission-group > div span {
  color: #64748b;
  font-size: 11px;
}

.mtv2-submission-group-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.mtv2-submission-group-submitting {
  border-color: #60a5fa;
  background: #eff6ff;
}

.mtv2-submission-group-submitting .mtv2-submission-group-index {
  background: #2563eb;
  color: #fff;
}

.mtv2-submission-group-accepted,
.mtv2-submission-group-succeeded {
  border-color: #86efac;
  background: #f0fdf4;
}

.mtv2-submission-group-accepted .mtv2-submission-group-index,
.mtv2-submission-group-succeeded .mtv2-submission-group-index {
  background: #16a34a;
  color: #fff;
}

.mtv2-submission-group-failed {
  border-color: #fca5a5;
  background: #fef2f2;
}

.mtv2-submission-group-failed .mtv2-submission-group-index {
  background: #dc2626;
  color: #fff;
}

@media (max-width: 900px) {
  .mtv2-submission-group-grid {
    grid-template-columns: 1fr;
  }

  .mtv2-submission-groups > header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.mtv2-draft-duplicates {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 5px;
  background: #fff1f2;
  color: #991b1b;
}

.mtv2-draft-duplicates > div {
  display: grid;
  gap: 4px;
}

.mtv2-draft-duplicates span {
  font-size: 11px;
}

.mtv2-draft-batch-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid #dbeafe;
  border-radius: 5px;
  background: #eff6ff;
}

.mtv2-draft-batch-tools label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mtv2-draft-batch-tools .mtv2-input {
  width: 96px;
}

.mtv2-draft-stores {
  min-width: 120px;
}

.mtv2-draft-stores summary {
  color: #175cd3;
  cursor: pointer;
  font-weight: 750;
}

.mtv2-draft-stores > span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #eef2f7;
  color: #334155;
  font-size: 11px;
}

.mtv2-draft-stores small {
  color: #94a3b8;
  font-size: 10px;
}

.mtv2-picker-modal {
  width: min(820px, 92vw);
}

.mtv2-picker-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 150px auto auto;
  gap: 9px;
  align-items: end;
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.mtv2-picker-tools label span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.mtv2-picker-list {
  max-height: 56vh;
  overflow: auto;
}

.mtv2-picker-row {
  display: flex;
  min-height: 48px;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 15px;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
}

.mtv2-picker-row:hover {
  background: #eff6ff;
}

.mtv2-picker-row input {
  margin-top: 3px;
}

.mtv2-picker-row strong,
.mtv2-picker-row small {
  display: block;
}

.mtv2-picker-row strong {
  color: #172033;
  font-size: 12px;
}

.mtv2-picker-row small {
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
}

.mtv2-picker-empty {
  padding: 40px 15px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.mtv2-aggregate-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  align-self: end;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mtv2-store-count {
  padding: 0;
  border: 0;
  background: transparent;
  color: #175cd3;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.mtv2-store-count:hover {
  text-decoration: underline;
}

.mtv2-check-indicator {
  cursor: default;
}

.mtv2-drawer-mask {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, .38);
}

.mtv2-store-drawer {
  display: flex;
  width: min(920px, 94vw);
  height: 100%;
  flex-direction: column;
  background: #fff;
  box-shadow: -18px 0 48px rgba(15, 23, 42, .2);
}

.mtv2-store-drawer-head,
.mtv2-store-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.mtv2-store-drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #dbeafe;
  background: #eff6ff;
  color: #475569;
  font-size: 11px;
}

.mtv2-store-drawer-actions label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #172033;
  font-size: 12px;
  font-weight: 750;
}

.mtv2-store-drawer-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.mtv2-store-drawer-foot {
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
}

.mtv2-store-member {
  border-bottom: 1px solid #e8edf4;
  background: #fff;
}

.mtv2-store-member-selected {
  background: #f8fbff;
}

.mtv2-store-member-main {
  display: grid;
  grid-template-columns: 24px minmax(150px, 1.4fr) repeat(6, minmax(82px, 1fr)) 42px;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 16px;
}

.mtv2-store-member-name,
.mtv2-store-member-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.mtv2-store-member-name strong {
  overflow: hidden;
  color: #172033;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mtv2-store-member-name small,
.mtv2-store-member-metric span {
  color: #7c8aa0;
  font-size: 10px;
}

.mtv2-store-member-metric strong {
  color: #27364d;
  font-size: 11px;
}

.mtv2-store-member-overlaps {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 16px 12px 50px;
  border-top: 1px dashed #bfdbfe;
  background: #eff6ff;
  color: #475569;
  font-size: 11px;
}

.mtv2-store-overlap-row {
  display: grid;
  grid-template-columns: 68px minmax(190px, 1fr) repeat(4, minmax(86px, auto));
  align-items: center;
  gap: 9px;
}

.mtv2-action-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 12px;
  border: 1px solid #dbe4ee;
  border-radius: 5px;
  overflow: hidden;
}

.mtv2-action-progress span {
  padding: 8px;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  text-align: center;
}

.mtv2-action-progress span:last-child {
  border-right: 0;
}

.mtv2-action-progress .done {
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
}

.mtv2-action-progress .active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}

.mtv2-sidebar-group {
  margin: 3px 0 5px;
}

.mtv2-sidebar-group-title {
  display: flex;
  align-items: center;
  padding: 7px 16px 5px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 750;
}

.mtv2-sidebar-child {
  padding-left: 28px !important;
}

@media (max-width: 1200px) {
  .mtv2-step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mtv2-step,
  .mtv2-step:nth-child(5n),
  .mtv2-step:nth-child(n+6) {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
  }

  .mtv2-step:nth-child(2n) {
    border-right: 0;
  }

  .mtv2-step:nth-last-child(-n+2) {
    border-bottom: 0;
  }

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

  .mtv2-update-evidence {
    grid-template-columns: 1fr;
  }

  .mtv2-picker-tools {
    grid-template-columns: 1fr 1fr;
  }

  .mtv2-store-member-main {
    grid-template-columns: 24px minmax(150px, 1.5fr) repeat(3, minmax(80px, 1fr)) 42px;
  }

  .mtv2-store-member-metric:nth-of-type(n+5) {
    display: none;
  }
}
