/* 价格配置表页面专用样式 */

.price-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #64748b;
}
.price-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1677ff;
  text-decoration: none;
  font-weight: 500;
}
.price-back:hover { text-decoration: underline; }
.price-crumb-sep { color: #cbd5e1; }
.price-crumb-current { color: #1e293b; font-weight: 600; }

.price-card { padding: 0; overflow: hidden; }

/* Toolbar */
.price-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eef1f6;
  flex-wrap: wrap;
  gap: 12px;
}
.price-tabs {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
}
/* 工具栏左区：表类型 Tab + 编辑/只读切换 + 视图提示 */
.price-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}
.price-toolbar-left .vv-hint {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.price-tab {
  border: none;
  background: transparent;
  padding: 7px 18px;
  font-size: 14px;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.price-tab:hover { color: #1e293b; }
.price-tab.on {
  background: #fff;
  color: #1677ff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.price-toolbar-right { display: flex; gap: 10px; }
.price-toolbar-right .btn { display: inline-flex; align-items: center; gap: 5px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Filter bar */
.price-filter {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: #fcfdff;
  border-bottom: 1px solid #eef1f6;
}
.pf-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pf-item-wide { flex: 1 1 260px; }
.pf-label { font-size: 12px; color: #94a3b8; }
.pf-select, .pf-input {
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  min-width: 150px;
  width: 100%;
}
.pf-input { min-width: 190px; }
.pf-reset {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #475569;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.pf-reset:hover:not(:disabled) { border-color: #1677ff; color: #1677ff; }
.pf-reset:disabled { opacity: 0.45; cursor: not-allowed; }
.pf-count {
  height: 32px;
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  color: #64748b;
}
.pf-count strong { color: #1677ff; margin: 0 2px; }

/* Table */
.price-table-wrapper {
  overflow: auto;
  max-height: calc(100vh - 380px);
}
.price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 1500px;
}
.price-table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-align: center;
  padding: 9px 8px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #eef1f6;
  position: sticky;
  top: 0;
  z-index: 3;
  white-space: nowrap;
}
.price-table thead tr:nth-child(2) th { top: 39px; z-index: 2; }
.price-table thead tr:nth-child(3) th { top: 78px; z-index: 2; }
.price-table thead th.th-group { background: #f1f5f9; }
.price-table thead th.th-amount-group { background: #f6f8fb; font-size: 12px; color: #64748b; }
.price-table thead th.col-amount-sub { background: #f8fafc; font-size: 12px; color: #94a3b8; font-weight: 500; }
.price-table thead th:last-child { border-right: none; }

.price-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f5f7fa;
  vertical-align: middle;
  text-align: center;
  color: #334155;
  background: #fff;
}
.price-table tbody td:last-child { border-right: none; }
.price-table tbody tr:hover td { background: #fafcff; }

.cell-type, .cell-format, .cell-qual { text-align: left !important; }
.price-table td.cell-type {
  font-weight: 600;
  color: #1e293b;
  background: #fcfdff;
  border-right: 1px solid #eef1f6;
}
.price-table td.cell-format {
  color: #334155;
  line-height: 1.5;
  min-width: 150px;
  background: #fcfdff;
  border-right: 1px solid #f1f5f9;
}
.price-table td.cell-qual { min-width: 220px; line-height: 1.5; }
.price-table .cell-point { min-width: 100px; }
.price-table .cell-amount { min-width: 86px; font-variant-numeric: tabular-nums; }
/* 单元格内联编辑输入框（编辑视图下点位收费 / 最低收费直接改数） */
.cell-input {
  width: 100%;
  min-width: 70px;
  padding: 4px 6px;
  border: 1px solid #d8e2f0;
  border-radius: 5px;
  font-size: 13px;
  text-align: center;
  color: #1e293b;
  background: #fff;
}
.cell-input:focus {
  outline: none;
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}
.cell-input::placeholder { color: #cbd5e1; }
.cell-input::-webkit-outer-spin-button,
.cell-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cell-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.price-table .cell-note {
  min-width: 180px;
  max-width: 220px;
  text-align: left !important;
}
.note-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}
.price-table .cell-surcharge { min-width: 150px; text-align: left !important; }
.surcharge-line { font-size: 12px; line-height: 1.6; color: #475569; }
.price-table .col-action { width: 96px; white-space: nowrap; }
.price-table .col-action .action-link { margin-right: 10px; }
.empty-row {
  text-align: center !important;
  color: #94a3b8;
  padding: 40px 0 !important;
}

/* Footer */
.price-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid #eef1f6;
  background: #fcfdff;
  flex-wrap: wrap;
  gap: 12px;
}
.price-tip { font-size: 12.5px; color: #94a3b8; }
.price-footer-actions { display: flex; gap: 10px; }

/* ============ 右侧抽屉 ============ */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}
.rule-drawer {
  width: 920px;
  max-width: 96vw;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.15);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #eef1f6;
}
.drawer-head h3 { margin: 0; font-size: 16px; color: #1e293b; }
.drawer-close {
  border: none;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  border-radius: 6px;
}
.drawer-close:hover { background: #f1f5f9; color: #475569; }
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 24px;
}
.drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid #eef1f6;
  background: #fcfdff;
}

.drawer-section {
  padding: 16px 0;
  border-bottom: 1px dashed #eef1f6;
}
.drawer-section:last-child { border-bottom: none; }
.drawer-section-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  padding-left: 8px;
  border-left: 3px solid #1677ff;
}
.drawer-field { margin-bottom: 12px; }
.drawer-field label {
  display: block;
  font-size: 13px;
  color: #475569;
  margin-bottom: 6px;
}
.req { color: #ef4444; margin-right: 2px; }
.drawer-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}
.drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.drawer-field-inline { display: flex; flex-direction: column; }
.input-unit {
  display: flex;
  align-items: center;
  position: relative;
}
.input-unit .form-input { padding-right: 32px; width: 100%; }
.input-unit .unit {
  position: absolute;
  right: 10px;
  font-size: 12px;
  color: #94a3b8;
  pointer-events: none;
}
.radio-row { display: flex; gap: 20px; }
.radio-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
}
.sub-block {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}
.over-noncity { margin-top: 16px; background: #fff; border: 1px solid #eef1f6; }
.sub-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.sub-block-title { font-size: 13px; font-weight: 600; color: #334155; }
.drawer-readonly {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef1f6;
  border-radius: 6px;
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
}

/* 抽屉内小表格 */
.minfee-table-wrap, .surcharge-table-wrap {
  overflow-x: auto;
  border: 1px solid #eef1f6;
  border-radius: 6px;
}
.minfee-table, .surcharge-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.minfee-table th, .surcharge-table th {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.minfee-table td, .surcharge-table td {
  padding: 6px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
}
.minfee-table .minfee-range, .surcharge-table td:first-child {
  text-align: left;
  color: #475569;
  padding-left: 10px;
  white-space: nowrap;
}
.minfee-input { width: 100%; min-width: 80px; height: 30px; padding: 0 8px; }
.surcharge-select { width: 100%; min-width: 110px; height: 30px; padding: 0 8px; }
.surcharge-input { width: 100%; min-width: 80px; height: 30px; padding: 0 8px; }
.surcharge-table input:disabled, .surcharge-table select:disabled,
.tier-row input:disabled {
  background: #f8fafc;
  color: #cbd5e1;
  cursor: not-allowed;
}

.empty-tip {
  font-size: 12.5px;
  color: #94a3b8;
  text-align: center;
  padding: 12px 0;
}
.hint-flex { margin: 0; flex: 1; padding-right: 12px; }
.tier-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  background: #f8fafc;
  border-radius: 6px;
  margin-bottom: 8px;
}
.tier-row .input-unit { flex: 0 0 auto; }
.tier-input { width: 90px !important; padding-right: 28px !important; }
.inline-range-row { gap: 6px; }
.inline-range-row .tier-input {
  width: 88px !important;
  padding: 0 8px !important;
  text-align: center;
}
.inline-range-row > .unit {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
}
.inline-range-row .p-btn-danger { margin-left: auto; }
.p-btn-danger {
  border: 1px solid #fecaca;
  background: #fff;
  color: #ef4444;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.p-btn-danger:hover { background: #fef2f2; }

/* 抽屉动画 */
.drawer-fade-enter-active, .drawer-fade-leave-active { transition: opacity 0.2s; }
.drawer-fade-enter-from, .drawer-fade-leave-to { opacity: 0; }
.drawer-fade-enter-active .rule-drawer,
.drawer-fade-leave-active .rule-drawer { transition: transform 0.25s ease; }
.drawer-fade-enter-from .rule-drawer,
.drawer-fade-leave-to .rule-drawer { transform: translateX(100%); }

/* ============ 试算验证 ============ */
.trial-section { border-bottom: none; }
.trial-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.trial-head .trial-title { margin: 0; }
.trial-toggle { font-size: 12.5px; color: #1677ff; }
.trial-body { margin-top: 12px; }
.trial-form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}
.trial-field { display: flex; flex-direction: column; gap: 6px; }
.trial-field label { font-size: 12.5px; color: #475569; }
.trial-field .input-unit { width: 130px; }
.trial-check { padding-bottom: 7px; white-space: nowrap; }
.trial-run { padding: 7px 18px; font-size: 13px; margin-left: auto; }
.trial-cases {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}
.trial-cases-label { font-size: 12px; color: #94a3b8; }
.trial-case-btn {
  border: 1px solid #dbe7fb;
  background: #f5f9ff;
  color: #1677ff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.trial-case-btn:hover { background: #e8f2ff; }

.trial-issues { margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.trial-issue {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: 6px;
  border-left: 3px solid transparent;
}
.trial-issue.lv-error { background: #fef2f2; color: #b91c1c; border-left-color: #ef4444; }
.trial-issue.lv-warn { background: #fffbeb; color: #b45309; border-left-color: #f59e0b; }
.trial-issue.lv-info { background: #f0f9ff; color: #0369a1; border-left-color: #38bdf8; }

.trial-table-wrap { border: 1px solid #eef1f6; border-radius: 6px; overflow-x: auto; }
.trial-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.trial-table th {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.trial-table td {
  padding: 9px 10px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  white-space: nowrap;
}
.trial-table tbody tr:last-child td { border-bottom: none; }
.trial-table td.tl { text-align: left; color: #475569; font-weight: 600; }
.trial-table td.strong { color: #1e293b; font-weight: 600; }
.trial-table tr.hit td { background: #f0f7ff; }
.trial-table tr.hit td.tl { color: #1677ff; }

.trial-hits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
}
.trial-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 14px;
  background: #f5f9ff;
  border: 1px solid #dbe7fb;
  border-radius: 8px;
}
.trial-final { font-size: 13px; color: #475569; }
.trial-final strong { font-size: 18px; color: #1677ff; margin: 0 2px; }
.trial-final em { font-style: normal; font-size: 12px; color: #94a3b8; }
.trial-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.trial-badge.ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.trial-badge.bad { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.trial-badge.mini { font-size: 11px; padding: 2px 8px; }

/* ============ 导入试算弹窗 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.import-modal {
  width: 860px;
  max-width: 100%;
  max-height: 100%;
  background: #fff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eef1f6;
}
.modal-head h3 { margin: 0; font-size: 16px; color: #1e293b; }
.modal-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #eef1f6;
  background: #fcfdff;
  border-radius: 0 0 10px 10px;
}
.modal-foot .btn:disabled { opacity: 0.5; cursor: not-allowed; }

.upload-box {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 28px 24px;
  text-align: center;
  background: #fcfdff;
}
.upload-tip {
  margin: 0 auto 16px;
  max-width: 600px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #64748b;
}
.upload-file { margin: 14px 0 0; font-size: 13px; color: #1677ff; }
.upload-empty { margin: 14px 0 0; font-size: 12.5px; color: #94a3b8; }

.check-bar {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.check-bar.all-pass { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.check-bar.has-fail { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.check-bar strong.pass { color: #047857; }
.check-bar strong.fail { color: #b91c1c; }

.check-row {
  border: 1px solid #eef1f6;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.check-row.bad { border-color: #fecaca; }
.check-row-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  background: #fcfdff;
}
.check-row.bad .check-row-head { background: #fffafa; }
.check-row-head:hover { background: #f8fafc; }
.check-rowno { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.check-dim {
  flex: 1;
  font-size: 13px;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.check-expand { font-size: 12px; color: #1677ff; white-space: nowrap; }
.check-row-body { padding: 12px 14px; border-top: 1px solid #f1f5f9; }
.check-trials { display: flex; flex-direction: column; gap: 8px; }
.check-trial {
  padding: 9px 12px;
  border-radius: 6px;
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
}
.check-trial.ok { border-left-color: #10b981; }
.check-trial.bad { border-left-color: #ef4444; background: #fef7f7; }
.check-trial-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}
.check-trial-label { font-size: 12.5px; font-weight: 600; color: #334155; }
.check-trial-nums { font-size: 12px; color: #475569; line-height: 1.6; }
.check-trial-nums strong { color: #1677ff; }
.check-trial-err p { margin: 0 0 4px; font-size: 12px; color: #b91c1c; line-height: 1.6; }
.check-trial-err p:last-child { margin-bottom: 0; }

/* ========== 版本状态条与视图切换（§5.8） ========== */
.version-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 16px;
  margin: 0 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f8fc 100%);
}
.vb-info { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: 1; min-width: 0; }
.vb-seg { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vb-seg-label { font-size: 12px; color: #94a3b8; }
.vb-no { font-size: 13.5px; font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; }
.vb-meta { font-size: 12px; color: #64748b; }
.vb-empty { font-size: 12.5px; color: #94a3b8; }
.vb-split { width: 1px; height: 20px; background: #e2e8f0; }
.vb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vb-actions .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-danger-ghost { color: #dc2626; background: #fff; border: 1px solid #fecaca; }
.btn-danger-ghost:hover { background: #fef2f2; border-color: #f87171; }
/* 删除草稿等不可恢复操作的确认按钮用实心危险色（§5.9） */
.btn-danger { color: #fff; background: #dc2626; border: 1px solid #dc2626; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

.version-views {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.vv-switch {
  display: inline-flex;
  padding: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f1f5f9;
}
.vv-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 12.5px;
  color: #475569;
  cursor: pointer;
}
.vv-btn.on { background: #fff; color: #1677ff; font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); }
.vv-btn:disabled { color: #cbd5e1; cursor: not-allowed; }
.vv-hint { font-size: 12px; color: #94a3b8; }

/* 草稿视图：底纹只加在 tbody 行上，整表加类会盖掉多级表头的固定背景 */
.price-table-wrapper { position: relative; }
.draft-corner {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  padding: 2px 8px;
  border-radius: 0 0 6px 0;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}
.price-table tbody tr.row-draft > td { background: #fffdf5; }
.price-table tbody tr.row-draft:hover > td { background: #fff8e6; }

.action-link.disabled { color: #cbd5e1; cursor: not-allowed; text-decoration: none; }
.action-link.disabled:hover { color: #cbd5e1; text-decoration: none; }

/* ========== 发布前校验面板（§5.11） ========== */
.publish-check { padding: 0 20px 4px; }
.publish-check .check-row { margin-top: 8px; }
.publish-check .check-row-body p { margin: 0 0 5px; font-size: 12.5px; color: #b91c1c; line-height: 1.6; }
.publish-check .check-row-body p:last-child { margin-bottom: 0; }

/* ========== 抽屉只读态（§5.10） ========== */
.drawer-readonly-bar {
  margin: 12px 0 4px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12.5px;
}
/* 只锁配置区，试算区必须留给只读查看者验算 */
.drawer-locked .drawer-section:not(.trial-section) input,
.drawer-locked .drawer-section:not(.trial-section) select,
.drawer-locked .drawer-section:not(.trial-section) textarea,
.drawer-locked .drawer-section:not(.trial-section) .btn,
.drawer-locked .drawer-section:not(.trial-section) .p-btn-danger {
  pointer-events: none;
  background: #f8fafc;
  color: #64748b;
}

/* ========== 发布弹窗（§5.12） ========== */
.publish-modal { width: 720px; }
.sm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8fafc;
}
.sm-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sm-k { font-size: 11.5px; color: #94a3b8; }
.sm-v { font-size: 13px; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-v.strong { font-weight: 600; color: #1677ff; }
.sm-section { margin-top: 16px; }
.sm-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sm-section-title { font-size: 13px; font-weight: 600; color: #334155; }
.sm-sum { font-size: 12px; color: #64748b; }
.sm-warn {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  font-size: 12px;
  color: #92400e;
  line-height: 1.6;
}
.sm-diff { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.sm-diff-rule { padding: 8px 12px; border-radius: 6px; background: #f8fafc; border-left: 3px solid #cbd5e1; }
.sm-diff-rule.added { border-left-color: #10b981; }
.sm-diff-rule.modified { border-left-color: #1677ff; }
.sm-diff-rule.removed { border-left-color: #ef4444; }
.sm-diff-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sm-kind { padding: 1px 7px; border-radius: 3px; font-size: 11px; color: #fff; }
.sm-kind.added { background: #10b981; }
.sm-kind.modified { background: #1677ff; }
.sm-kind.removed { background: #ef4444; }
.sm-diff-label { font-size: 12.5px; font-weight: 600; color: #334155; }
.sm-diff-count { font-size: 11.5px; color: #94a3b8; }
.sm-diff-table { width: 100%; margin-top: 6px; border-collapse: collapse; }
.sm-diff-table td { padding: 3px 6px; font-size: 12px; vertical-align: top; }
.sm-f { color: #64748b; width: 46%; }
.sm-old { color: #94a3b8; text-decoration: line-through; white-space: nowrap; }
.sm-arrow { width: 18px; text-align: center; color: #cbd5e1; }
.sm-new { color: #0f172a; font-weight: 600; white-space: nowrap; }
.sm-textarea { width: 100%; resize: vertical; line-height: 1.6; font-family: inherit; }
.sm-counter { margin-top: 4px; text-align: right; font-size: 11.5px; color: #94a3b8; }
.sm-counter.over { color: #ef4444; }

/* ========== 通用确认弹窗 ========== */
.confirm-modal { width: 460px; }
.cm-message { margin: 0; font-size: 13.5px; color: #334155; line-height: 1.7; }
