.md-bind-workflow { width: min(524px, calc(100vw - 28px)); min-height: 500px; display: flex; flex-direction: column; gap: 16px; padding: 26px; }
.md-bind-workflow .md-modal-head { margin-bottom: 0; }
.md-bind-workflow .md-modal-head h2 { font-size: 20px; }
.md-bind-workflow > label, .md-bind-workflow .md-chain-flow label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; color: #5d6678; }
.md-bind-workflow select, .md-bind-workflow input, .md-bind-workflow textarea { width: 100%; min-height: 46px; border: 1px solid #d4dbe5; border-radius: 3px; background: #fff; color: #28354d; padding: 10px 12px; }
.md-bind-workflow textarea { resize: vertical; }
.md-bind-workflow > label > textarea { min-height: 142px; }
.md-bind-workflow .md-bind-method { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; margin: 0; padding: 5px; border-radius: 4px; background: #edf0f3; }
.md-bind-workflow .md-bind-method button { width: 100%; min-width: 0; min-height: 42px; padding: 6px 3px; border: 0; border-radius: 3px; background: transparent; color: #748096; font-size: 13px; white-space: nowrap; }
.md-bind-workflow .md-bind-method button.active { background: #fff; color: #304057; box-shadow: 0 1px 5px #1b29391a; font-weight: 700; }
.md-chain-flow { flex: 1; min-height: 190px; padding: 12px 8px 0; }
.md-chain-flow h3 { margin: 0 0 22px; font-size: 16px; color: #596781; }
.md-chain-steps { display: flex; align-items: center; gap: 5px; padding: 0 24px 18px; border-bottom: 1px solid #e9edf2; white-space: nowrap; }
.md-chain-steps span { display: flex; align-items: center; gap: 6px; flex: none; color: #929bad; font-size: 12px; }
.md-chain-steps b { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #9ba5b8; border-radius: 50%; font-size: 12px; }
.md-chain-steps .active, .md-chain-steps .done { color: #ee9d11; }
.md-chain-steps .active b, .md-chain-steps .done b { border-color: #f4a000; background: #f4a000; color: #fff; }
.md-chain-steps i { flex: 1; min-width: 8px; border-top: 1px dashed #a9b3c2; }
.md-chain-id-input { margin: 25px auto 0; max-width: 320px; grid-template-columns: 70px minmax(0,1fr); align-items: start; }
.md-chain-id-input textarea { min-height: 43px; max-height: 110px; }
.md-chain-account { margin: 14px 0; }
.md-chain-message { margin: 22px 0; color: #68758a; font-size: 13px; line-height: 1.7; }
.md-chain-message.warning { color: #ac5945; }
.md-chain-message button { margin-left: 6px; color: #754f95; text-decoration: underline; }
.md-chain-flow .md-chain-preview { max-height: 170px; }
.md-bind-workflow > .md-modal-actions { margin-top: auto; justify-content: flex-end; }
.md-chain-list .md-chain-row { grid-template-columns: minmax(0,1fr) auto auto; align-items: center; }
.md-chain-row > div > strong { font-size: 14px; }
.md-chain-row > div > small { font-size: 12px; }
.md-chain-name-edit { width: fit-content; padding: 0; border: 0; background: transparent; color: #35445a; font-size: 14px; font-weight: 700; text-align: left; }
.md-chain-name-edit:hover { color: #785ba1; text-decoration: underline; }
.md-chain-row .md-chain-actions { justify-content: flex-end; }
.commission-chain-row { grid-template-columns: minmax(180px,1fr) auto auto; }
.haoyu-login-dialog [data-chain] input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #d4dbe5; border-radius: 4px; }
@media (max-width: 640px) {
  .md-bind-workflow { min-height: min(560px,calc(100dvh - 28px)); padding: 20px 16px; gap: 14px; }
  .md-chain-steps { padding-inline: 0; gap: 3px; }
  .md-chain-steps span { font-size: 10px; gap: 3px; }
  .md-chain-steps b { width: 20px; height: 20px; }
  .md-chain-list .md-chain-row { grid-template-columns: 1fr; }
  .commission-chain-row { grid-template-columns: 1fr auto; }
}
