#pricelistPanel .grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

#pricelistPanel .prices-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

#pricelistPanel .prices-subtab {
  border: 1px solid var(--line, #e2e2e2);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 500;
  cursor: pointer;
}

#pricelistPanel .prices-subtab.active {
  background: #f8fafc;
  border-color: #cbd5e1;
}

#pricelistPanel .pricelist-upload {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#pricelistPanel .pricelist-upload__title {
  font-weight: 700;
  margin-bottom: 4px;
}

#pricelistPanel .pricelist-upload__name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  margin-bottom: 8px;
}

#pricelistPanel .pricelist-upload__actions {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

#pricelistPanel .pricelist-import-block,
#pricelistPanel .pricelist-export-block {
  border: 0;
  padding: 0;
  background: transparent;
}

#pricelistPanel .pricelist-table-wrap {
  max-height: 360px;
  overflow: auto;
}

#pricelistPanel .special-overlap-date {
  width: 150px;
}

#pricelistPanel .dup-conflict-list {
  display: grid;
  gap: 12px;
}

#pricelistPanel .dup-conflict-card {
  border: 1px solid var(--line, #e2e2e2);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

#pricelistPanel .dup-conflict-header {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

#pricelistPanel .dup-conflict-subtitle {
  margin: 2px 0 10px;
  color: #334155;
  font-size: 13px;
}

#pricelistPanel .dup-radio-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#pricelistPanel .dup-group-row td {
  background: #e0ecff;
  color: #1e3a8a;
  font-weight: 600;
  border-top: 2px solid #bfdbfe;
}

#pricelistPanel #specialPricesDuplicateDetails table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef2ff;
}

#pricelistPanel tr[data-dup-choice-row="1"] {
  cursor: pointer;
}

#pricelistPanel tr[data-dup-choice-row="1"]:hover td {
  background: #f8fafc;
}

#pricelistPanel tr[data-dup-choice-row="1"] input.dup-choice-radio {
  cursor: pointer;
}

#pricelistPanel .tree-row--header {
  background: #eef2ff;
}

#pricelistPanel .tree-row--header td:first-child {
  font-weight: 700;
  color: #1e3a8a;
}

#pricelistPanel .tree-row--area {
  background: #f8fafc;
}

#pricelistPanel .tree-row--area td:first-child {
  color: #334155;
  font-weight: 600;
}

#pricelistPanel .tree-row--qty {
  background: #ffffff;
}

#pricelistPanel .tree-row--qty td:first-child {
  color: #64748b;
}

/* Status markers on the SAP action column for fast scanning without overriding level colors */
#pricelistPanel .tree-row--duplicate td:last-child {
  background: #fff7ed;
  color: #9a3412;
  font-weight: 600;
}

#pricelistPanel .tree-row--failed td:last-child {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 600;
}

#pricelistPanel .tree-row--would_update td:last-child {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

#pricelistPanel .tree-row--updated td:last-child {
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
}

#pricelistPanel .tree-row--already_exists td:last-child {
  background: #fff7ed;
  color: #9a3412;
  font-weight: 600;
}

#pricelistPanel .tree-row--merged_out_in_file td:last-child {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-style: italic;
}

#pricelistPanel .tree-row--overlap_warning {
  background: #fff1f2;
}

#pricelistPanel .tree-row--overlap_warning td:last-child {
  background: #ffe4e6;
  color: #be123c;
  font-weight: 700;
}

#pricelistPanel .tree-row--needs_choice td:last-child {
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}

#pricelistPanel .tree-row--not_selected td:last-child {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-style: italic;
}

#pricelistMappingFields .field {
  min-width: 240px;
}

#pricelistMappingFields .mapping-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 18px;
  align-items: start;
}

#pricelistMappingFields .mapping-left,
#pricelistMappingFields .mapping-right {
  border: 1px solid var(--line, #e2e2e2);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

#pricelistMappingFields h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

#pricelistMappingFields .mapping-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 340px;
  overflow: auto;
}

#pricelistMappingFields .mapping-file-item {
  padding: 6px 8px;
  border-radius: 8px;
  background: #f7f8fa;
  margin-bottom: 6px;
}

#pricelistMappingFields .mapping-rows {
  display: grid;
  gap: 8px;
}

#pricelistMappingFields .mapping-row {
  display: grid;
  grid-template-columns: 180px 24px 1fr;
  gap: 8px;
  align-items: center;
}

#pricelistMappingFields .mapping-template-label {
  font-weight: 600;
}

#pricelistMappingFields .mapping-arrow {
  text-align: center;
  color: var(--muted, #6b7280);
}

@media (max-width: 980px) {
  #pricelistMappingFields .mapping-layout {
    grid-template-columns: 1fr;
  }
  #pricelistMappingFields .mapping-row {
    grid-template-columns: 1fr;
  }
  #pricelistMappingFields .mapping-arrow {
    display: none;
  }
}

@media (max-width: 900px) {
  #pricelistPanel .grid {
    grid-template-columns: 1fr;
  }
}
