:root {
  --yq-wc-ink: #103b43;
  --yq-wc-muted: #6d7f8d;
  --yq-wc-line: #dfe6ea;
  --yq-wc-soft: #f3f6f8;
  --yq-wc-white: #fff;
  --yq-wc-primary: #17515d;
  --yq-wc-primary-hover: #0f3f4a;
  --yq-wc-warn: #a05b13;
  --yq-wc-danger: #a63b32;
}

.yq-wc-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 14px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #f8fbfc, #f2f7f8);
  border: 1px solid var(--yq-wc-line);
  border-left: 4px solid #1d6b7a;
  border-radius: 10px;
  color: var(--yq-wc-ink);
  font-size: 13px;
}

.yq-wc-strip-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.yq-wc-strip-title {
  font-weight: 700;
  white-space: nowrap;
}

.yq-wc-strip-desc {
  color: var(--yq-wc-muted);
  line-height: 1.5;
}

.yq-wc-strip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.yq-wc-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8f1f2;
  color: #17515d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.yq-wc-badge.warn { background: #fff3df; color: #92540f; }
.yq-wc-badge.ok { background: #e8f5ec; color: #257a44; }
.yq-wc-badge.danger { background: #fbebea; color: #94332b; }
.yq-wc-badge.muted { background: #eef2f4; color: #5c707c; }

.yq-wc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #cfdee1;
  border-radius: 8px;
  background: var(--yq-wc-white);
  color: var(--yq-wc-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.yq-wc-btn:hover { border-color: #9bbbc1; background: #f8fbfc; }
.yq-wc-btn.primary { background: var(--yq-wc-primary); border-color: var(--yq-wc-primary); color: #fff; }
.yq-wc-btn.primary:hover { background: var(--yq-wc-primary-hover); }
.yq-wc-btn.danger { color: var(--yq-wc-danger); border-color: #e4c7c4; background: #fffafa; }
.yq-wc-btn.ghost { border-color: transparent; background: transparent; color: #17515d; }
.yq-wc-btn.small { min-height: 27px; padding: 0 9px; font-size: 12px; }
.yq-wc-btn:disabled { opacity: .45; cursor: not-allowed; }

.yq-wc-fab {
  position: fixed;
  right: 26px;
  top: 86px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid #cbdde0;
  border-radius: 999px;
  background: #fff;
  color: var(--yq-wc-ink);
  box-shadow: 0 6px 18px rgba(16, 59, 67, .13);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.yq-wc-fab:hover { border-color: #90b5bd; }
.yq-wc-fab .dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #17515d;
  color: #fff;
  font-size: 11px;
}

.yq-wc-inline {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid #d9e6e8;
  border-radius: 10px;
  background: #f8fbfc;
  color: var(--yq-wc-ink);
}

.yq-wc-inline-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.yq-wc-inline-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.yq-wc-inline-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #17515d;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.yq-wc-inline-count[hidden] {
  display: none;
}

.yq-wc-inline-desc {
  min-width: 0;
  overflow: hidden;
  color: var(--yq-wc-muted);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yq-wc-inline-head .yq-wc-btn {
  margin-left: auto;
  flex: none;
}

.yq-wc-inline-list {
  margin-top: 9px;
}

.yq-wc-inline-list:empty {
  display: none;
}

.yq-wc-inline-list .yq-wc-list-card {
  margin-bottom: 8px;
  background: #fff;
}

.yq-wc-inline-list .yq-wc-list-card:last-child {
  margin-bottom: 0;
}

.yq-wc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
  background: rgba(8, 34, 40, .34);
  backdrop-filter: blur(2px);
}

.yq-wc-drawer {
  display: flex;
  flex-direction: column;
  width: min(780px, 96vw);
  height: 100%;
  background: #fff;
  color: var(--yq-wc-ink);
  box-shadow: -12px 0 36px rgba(9, 38, 45, .2);
  font-family: ui-sans-serif, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 13px;
  animation: yq-wc-slide .24s ease-out;
}
@keyframes yq-wc-slide { from { transform: translateX(24px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }

/* 整单更正按“询单转订单页”呈现：居中大页，而不是窄抽屉 */
.yq-wc-backdrop-page {
  justify-content: center;
  align-items: center;
  padding: 18px;
}
.yq-wc-drawer.yq-wc-page {
  width: min(1180px, 97vw);
  height: min(920px, 96vh);
  border-radius: 14px;
  border: 1px solid #d3e0e3;
  box-shadow: 0 22px 70px rgba(9, 38, 45, .28);
  animation: yq-wc-page-in .2s ease-out;
}
@keyframes yq-wc-page-in { from { transform: translateY(10px) scale(.99); opacity: .75; } to { transform: translateY(0) scale(1); opacity: 1; } }
.yq-wc-drawer.yq-wc-page .yq-wc-head { padding: 18px 26px 14px; }
.yq-wc-drawer.yq-wc-page .yq-wc-body { padding: 18px 26px 26px; }
.yq-wc-drawer.yq-wc-page .yq-wc-foot { padding: 13px 26px; }

.yq-wc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--yq-wc-line);
  background: #fbfdfd;
}
.yq-wc-head h3 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: .2px; }
.yq-wc-head p { margin: 5px 0 0; color: var(--yq-wc-muted); font-size: 13px; line-height: 1.5; }
.yq-wc-close {
  width: 32px; height: 32px;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: #516a75; font-size: 23px; line-height: 1; cursor: pointer;
}
.yq-wc-close:hover { background: #eef4f5; }

.yq-wc-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 24px;
}

.yq-wc-card {
  border: 1px solid var(--yq-wc-line);
  border-radius: 11px;
  background: #fff;
  padding: 15px 16px;
  margin-bottom: 13px;
  box-shadow: rgba(16, 59, 67, .04) 0 1px 2px, rgba(16, 59, 67, .03) 0 4px 12px;
}
.yq-wc-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.yq-wc-card h4 span:last-child { color: var(--yq-wc-muted); font-weight: 400; font-size: 12px; }

.yq-wc-note {
  padding: 12px 14px;
  border: 1px solid #dbe8e9;
  border-radius: 10px;
  background: #f6fbfb;
  color: #31525d;
  line-height: 1.7;
  font-size: 13px;
}
.yq-wc-note.warn { border-color: #f0dec0; background: #fffaf2; color: #7a521c; }
.yq-wc-note.danger { border-color: #eccbc7; background: #fff8f7; color: #833830; }

.yq-wc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.yq-wc-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.yq-wc-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.yq-wc-field.full { grid-column: 1 / -1; }
.yq-wc-field label { color: var(--yq-wc-muted); font-size: 12px; }
.yq-wc-input,
.yq-wc-textarea,
.yq-wc-select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfdee1;
  border-radius: 8px;
  background: #fff;
  color: var(--yq-wc-ink);
  font: inherit;
  font-size: 13px;
  padding: 7px 9px;
  outline: none;
}
.yq-wc-input:focus,
.yq-wc-textarea:focus,
.yq-wc-select:focus { border-color: #5b9eaa; box-shadow: 0 0 0 3px rgba(45, 122, 136, .1); }
.yq-wc-textarea { min-height: 76px; resize: vertical; line-height: 1.6; }
.yq-wc-hint { color: #7a8d97; font-size: 12px; line-height: 1.5; }

.yq-wc-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.yq-wc-table th {
  padding: 7px 6px;
  border-bottom: 1px solid var(--yq-wc-line);
  color: #627783;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.yq-wc-table td { padding: 7px 6px; border-bottom: 1px solid #edf1f3; vertical-align: middle; }
.yq-wc-table tr:last-child td { border-bottom: none; }
.yq-wc-table .num { text-align: right; }
.yq-wc-table .center { text-align: center; }
.yq-wc-table input[type="number"], .yq-wc-table input[type="text"] { padding: 5px 7px; }
.yq-wc-prod { font-weight: 700; line-height: 1.3; }
.yq-wc-prod small { display: block; margin-top: 3px; color: var(--yq-wc-muted); font-weight: 400; font-size: 11px; }
.yq-wc-money { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.yq-wc-check { width: 16px; height: 16px; accent-color: #17515d; }

.yq-wc-item-actions { display: flex; align-items: center; gap: 6px; }
.yq-wc-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  padding: 11px 13px;
  border-radius: 9px;
  background: #f3f8f8;
  color: #284c56;
  line-height: 1.5;
}
.yq-wc-summary b { font-variant-numeric: tabular-nums; color: #103b43; }
.yq-wc-summary .red { color: #a33b32; }

.yq-wc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 22px;
  border-top: 1px solid var(--yq-wc-line);
  background: #fbfdfd;
}
.yq-wc-foot-note { color: var(--yq-wc-muted); font-size: 12px; line-height: 1.4; }
.yq-wc-foot-actions { display: flex; gap: 9px; }

.yq-wc-picker {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.yq-wc-picker-head { padding: 16px 22px; border-bottom: 1px solid var(--yq-wc-line); }
.yq-wc-picker-head h4 { margin: 0 0 10px; font-size: 16px; }
.yq-wc-picker-list { flex: 1; overflow: auto; padding: 8px 22px 22px; }
.yq-wc-pick-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) 100px 100px;
  gap: 10px;
  align-items: center;
  padding: 9px 4px;
  border-bottom: 1px solid #eef2f4;
  cursor: pointer;
}
.yq-wc-pick-row:hover { background: #f5fafb; }
.yq-wc-pick-row .name { font-weight: 700; }
.yq-wc-pick-row .meta { color: var(--yq-wc-muted); font-size: 12px; }

.yq-wc-list-card {
  padding: 13px 14px;
  border: 1px solid var(--yq-wc-line);
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fff;
}
.yq-wc-list-card .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.yq-wc-list-card .no { font-weight: 800; font-size: 14px; }
.yq-wc-list-card .meta { margin-top: 6px; color: var(--yq-wc-muted); font-size: 12px; line-height: 1.6; }
.yq-wc-list-card .reason { margin-top: 8px; color: #31525d; background: #f5fafb; border-radius: 8px; padding: 8px 10px; line-height: 1.55; }
.yq-wc-list-card .actions { margin-top: 10px; display: flex; gap: 8px; align-items: flex-end; }
.yq-wc-list-card .actions .yq-wc-input { flex: 1; }

.yq-wc-kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 7px 12px; line-height: 1.55; }
.yq-wc-kv .k { color: var(--yq-wc-muted); }
.yq-wc-kv .v { color: var(--yq-wc-ink); word-break: break-word; }

.yq-wc-snap {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
  background: #f4f7f8;
  border: 1px solid #e1e9eb;
  border-radius: 8px;
  padding: 12px;
  max-height: 360px;
  overflow: auto;
}

.yq-wc-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 1600;
  max-width: min(560px, 88vw);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 16px;
  border: 1px solid #cfe0e2;
  border-radius: 9px;
  background: #fff;
  color: #17444e;
  box-shadow: 0 8px 26px rgba(9, 38, 45, .16);
  font-size: 13px;
  line-height: 1.5;
  transition: opacity .18s, transform .18s;
}
.yq-wc-toast.show { opacity: 1; transform: translate(-50%, 0); }
.yq-wc-toast[data-kind="danger"] { border-color: #e8c6c2; color: #8e332b; background: #fff9f8; }

@media (max-width: 860px) {
  .yq-wc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yq-wc-drawer { width: 100%; }
  .yq-wc-strip { align-items: flex-start; flex-direction: column; }
  .yq-wc-strip-actions { width: 100%; }
  .yq-wc-pick-row { grid-template-columns: minmax(0, 1.4fr) 80px 80px; }
  .yq-wc-pick-row .meta { display: none; }
  .yq-wc-inline-head { flex-wrap: wrap; }
  .yq-wc-inline-desc { flex: 1 1 100%; white-space: normal; }
}
