/* 一键分销 */
.distribute-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.distribute-query-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}

.distribute-query-form .el-form-item {
  margin-bottom: 0;
  margin-right: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}

.distribute-query-form .el-form-item__label {
  flex-shrink: 0;
}

.distribute-query-form .el-form-item__content {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.distribute-query-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}

.distribute-query-row .el-input {
  flex: 1;
  min-width: 180px;
  max-width: 420px;
}

.distribute-query-row .el-button {
  flex-shrink: 0;
}

.distribute-detail-body {
  max-height: 70vh;
  overflow: auto;
}

.distribute-step-insert {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #dcdfe6;
}

.distribute-step-insert-label {
  color: #909399;
  font-size: 12px;
  margin-right: 4px;
}

.distribute-steps-body {
  max-height: 48vh;
  overflow: auto;
  padding-right: 4px;
}

.distribute-script-action {
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}

.distribute-script-action-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.distribute-run-result {
  max-height: 28vh;
  overflow: auto;
}

.distribute-run-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.distribute-run-action-item {
  padding: 8px 10px;
  border-radius: 6px;
  background: #f5f7fa;
  border: 1px solid #ebeef5;
}

.distribute-run-action-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.distribute-run-log {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.distribute-channels-editor {
  width: 100%;
}

.distribute-saved-tag,
.distribute-unsaved-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.distribute-saved-tag {
  color: #67c23a;
  background: #f0f9eb;
}

.distribute-unsaved-tag {
  color: #e6a23c;
  background: #fdf6ec;
}

.distribute-sql-pre {
  margin: 0;
  padding: 12px 14px;
  background: #f5f7fa;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: #606266;
}

.distribute-channel-grid .el-col {
  display: flex;
}

.distribute-channel-card {
  border: 1px solid #e4e7ed;
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  margin-bottom: 16px;
  width: 100%;
  height: 260px;
  min-height: 260px;
  max-height: 260px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.distribute-channel-card:hover {
  border-color: #c0c4cc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.distribute-channel-card.is-distributed {
  border-color: #b3e19d;
  background: #f0f9eb;
}

.distribute-channel-card.is-undistributed {
  border-color: #e4e7ed;
}

.distribute-channel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.distribute-channel-name {
  font-size: 15px;
  font-weight: 600;
  color: #303133;
}

.distribute-channel-code {
  margin-top: 2px;
  font-size: 12px;
  color: #909399;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.distribute-channel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.distribute-detail-section {
  margin-bottom: 20px;
}

.distribute-detail-section:last-child {
  margin-bottom: 0;
}

.distribute-detail-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #303133;
}

.distribute-kv {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 6px;
  color: #909399;
}

.distribute-kv code {
  max-width: 60%;
  text-align: right;
  color: #606266;
  background: transparent;
  font-size: 12px;
  word-break: break-all;
}

.distribute-channel-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e4e7ed;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ml-8 {
  margin-left: 8px;
}

