/* ============================================================
 * 伯朗克门窗 · 智能报价设计系统 样式
 * ============================================================ */
:root {
  --brand: #1c4e80;
  --brand-dark: #143a5f;
  --accent: #e65100;
  --bg: #eef2f7;
  --card-bg: #ffffff;
  --line: #dde5ee;
  --text: #1f2d3d;
  --text-sub: #5b6b7f;
  --ok: #2e7d32;
  --warn: #e65100;
  --mandatory: #c62828;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 400px at 80% -100px, rgba(28,78,128,0.08), transparent),
    linear-gradient(180deg, #f7fafd, var(--bg));
  color: var(--text);
  min-height: 100vh;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand) 55%, #2a6aa5);
  color: #fff;
  box-shadow: 0 2px 12px rgba(20, 58, 95, 0.35);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 10px;
  background: linear-gradient(135deg, #f6a623, #e65100);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,0.2);
}
.topbar h1 { font-size: 19px; letter-spacing: 1px; }
.topbar .sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
/* 门店平板实测：顶栏按钮仅 32.4px 高，触摸偏小，统一抬到 44px */
.top-actions .btn { min-height: 44px; }
.badge-rule {
  font-size: 12px; padding: 4px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
}

/* ---------- 按钮 ---------- */
.btn {
  padding: 8px 16px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #d84a00; color: #fff; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; }

/* ---------- 三栏布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 290px 1fr 400px;
  gap: 14px;
  padding: 14px 18px;
  max-width: 1800px;
  margin: 0 auto;
  align-items: start;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(31,45,61,0.06);
}
.card h3 {
  font-size: 14px; color: var(--brand);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
  display: flex; align-items: center; gap: 6px;
}
.card h3::before { content: ""; width: 4px; height: 16px; background: var(--accent); border-radius: 2px; }

label { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 8px; }
input, select {
  width: 100%; padding: 7px 9px; margin-top: 3px;
  border: 1px solid var(--line); border-radius: 5px;
  font-size: 13px; color: var(--text); background: #fbfcfe;
  transition: border-color .15s;
}
input:focus, select:focus { outline: none; border-color: var(--brand); background: #fff; }
.grid1 { display: grid; grid-template-columns: 1fr; gap: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }

/* 产品信息 */
.product-info {
  margin-top: 8px; padding: 8px 10px;
  background: #f2f6fb; border-radius: 6px;
  font-size: 12px; color: var(--text-sub); line-height: 1.7;
  border: 1px dashed #b8c9dc;
}
.product-info b { color: var(--brand); }

/* 复选 */
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 12.5px; color: var(--text); }
.checks input[type=checkbox] { width: auto; margin: 0; accent-color: var(--brand); }
.hint { font-size: 12px; color: #9aa8b8; }

/* 选配分组 */
.opt-group-title {
  font-size: 11.5px; color: var(--brand); font-weight: 700;
  margin: 8px 0 4px; padding: 2px 0; border-bottom: 1px dashed #d5e0ec;
}
.opt-group-title:first-child { margin-top: 0; }
.opt-group hr { border: none; border-top: 1px dashed #dde5ee; margin: 6px 0; }
.opt-row { display: flex; align-items: center; gap: 5px; margin: 3px 0; }
.opt-row input[type=checkbox] { width: auto; margin: 0; accent-color: var(--brand); }
.opt-row label { margin: 0; font-size: 12.5px; color: var(--text); cursor: pointer; flex: 1; }
.opt-row input[type=number] { width: 64px !important; margin: 0 0 0 6px; padding: 3px 5px; font-size: 12px; }

/* ---------- 中间预览 ---------- */
.panel-mid { min-width: 0; }
.view-tabs {
  display: flex; align-items: center; gap: 6px;
  background: #e3eaf2; padding: 5px; border-radius: 9px; margin-bottom: 10px;
}
.tab {
  padding: 7px 18px; border: none; border-radius: 6px;
  background: transparent; font-size: 13px; cursor: pointer; color: var(--text-sub);
}
.tab.active { background: var(--brand); color: #fff; font-weight: 600; }
.view-hint { margin-left: auto; font-size: 11.5px; color: #8a99a9; padding-right: 8px; }
.view {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  min-height: 560px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 8px;
  box-shadow: 0 2px 10px rgba(31,45,61,0.08);
}
.view svg { width: 100%; height: auto; max-height: 640px; }
#view3d canvas { width: 100%; height: 560px; cursor: grab; border-radius: 8px; }
#view3d canvas:active { cursor: grabbing; }

/* ---------- 右侧结果 ---------- */
.panel-right { min-width: 0; }

/* 警告 */
.warn-card { border-color: #f0b27a; background: #fff8f0; }
.warn-card h3 { color: var(--warn); border-bottom-color: var(--warn); }
#warnList { list-style: none; }
#warnList li {
  font-size: 12.5px; color: #9a3e00; padding: 5px 0 5px 18px;
  position: relative; border-bottom: 1px dashed #f2d3b0;
}
#warnList li:last-child { border-bottom: none; }
#warnList li::before { content: "⚠"; position: absolute; left: 0; }

/* 设计要求追踪 */
.trace-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.trace-table th {
  background: #f2f6fb; color: var(--brand); text-align: left;
  padding: 6px 6px; border-bottom: 2px solid var(--brand);
  font-weight: 600; white-space: nowrap;
}
.trace-table td {
  padding: 6px; border-bottom: 1px solid #eef2f7;
  vertical-align: top; color: var(--text-sub); line-height: 1.5;
}
.trace-table td:first-child { font-weight: 600; color: var(--text); white-space: nowrap; }
.st { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; white-space: nowrap; }
.st-pass { background: #e8f5e9; color: var(--ok); }
.st-upgrade { background: #fff3e0; color: var(--warn); }
.st-warn { background: #ffebee; color: var(--mandatory); }
.st-mandatory { background: #ffcdd2; color: var(--mandatory); font-weight: 600; }

/* 报价单 */
.quote-card { border-color: #b8c9dc; }
.quote-summary {
  font-size: 12.5px; color: var(--text-sub); margin-bottom: 8px;
  padding: 8px 10px; background: #f2f6fb; border-radius: 6px; line-height: 1.8;
}
.quote-summary b { color: var(--brand); }
.quote-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.quote-table th {
  background: var(--brand); color: #fff; text-align: left;
  padding: 6px 8px; font-weight: 600;
}
.quote-table td { padding: 6px 8px; border-bottom: 1px solid #eef2f7; color: var(--text); }
.quote-table tr:nth-child(even) td { background: #f8fafc; }
.quote-table td:last-child, .quote-table th:last-child { text-align: right; }
.quote-total {
  margin-top: 10px; text-align: right;
  font-size: 15px; font-weight: 700; color: var(--brand);
  padding: 10px 12px; background: linear-gradient(90deg, #eef4fb, #dce8f4);
  border-radius: 6px;
}
.quote-total b { font-size: 24px; color: var(--accent); }
.quote-note { font-size: 11px; color: #9aa8b8; margin-top: 8px; line-height: 1.6; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .layout { grid-template-columns: 260px 1fr; }
  .panel-right { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; gap: 8px; }
  .top-actions { flex-wrap: wrap; justify-content: center; }
  .view { min-height: 380px; }
}

/* ---------- 打印 ---------- */
@media print {
  .topbar, .panel-left, .view-tabs, .top-actions, #view3d { display: none !important; }
  .layout { display: block; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .panel-right { width: 100%; }
  body { background: #fff; }
}


/* ================= 整单清单 ================= */
.order-card { border-color:#b8c9dc; }
.order-badge { font-size:11px; background:#e65100; color:#fff; padding:2px 8px; border-radius:10px; margin-left:auto; font-weight:400; }
.order-table { width:100%; border-collapse:collapse; font-size:12px; }
.order-table th { background:#f2f6fb; color:#1c4e80; text-align:left; padding:5px 6px; border-bottom:2px solid #1c4e80; }
.order-table td { padding:5px 6px; border-bottom:1px solid #eef2f7; vertical-align:middle; }
.order-table .sub { font-size:11px; color:#8a99a8; }
.order-table .amt { text-align:right; font-weight:600; color:#1c4e80; }
.del-btn { border:none; background:#ffe9e6; color:#c62828; width:22px; height:22px; border-radius:4px; cursor:pointer; font-size:14px; line-height:1; }
.del-btn:hover { background:#ffcdd2; }
.fee-note { font-size:11px; color:#8a99a8; margin-top:10px; line-height:1.5; }
.fee-note b { color:#1c4e80; }
.fee-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:4px 8px; margin-top:6px; }
.fee-grid label { font-size:11px; margin:0; }
.fee-grid input { padding:4px 6px; font-size:12px; }
.fee-grid-b { margin-top:4px; }
.fee-grid .span2 { grid-column: span 2; }
.fee-grid .fee-pair { display:flex; gap:4px; align-items:center; margin-top:3px; }
.fee-grid .fee-pair select { flex:0 0 88px; padding:4px 3px; font-size:11.5px; margin-top:0; }
.fee-grid .fee-pair input { flex:1 1 auto; min-width:0; margin-top:0; }
.fee-detail { margin-top:8px; padding:8px 10px; background:#f7fafd; border:1px dashed #d5e0ec; border-radius:6px; font-size:11.5px; color:#5b6b7f; }
.fee-detail:empty { display:none; }
.fee-detail-title { font-weight:700; color:#1c4e80; margin-bottom:4px; }
.fee-detail .fee-line { display:flex; justify-content:space-between; gap:8px; padding:1px 0; }
.fee-detail .fee-line .amt { color:#1c4e80; font-weight:600; }
.fee-detail .fee-line .muted { color:#e65100; }
.order-total { margin-top:10px; padding:10px; background:linear-gradient(90deg,#eef4fb,#dce8f4); border-radius:6px; font-size:12px; color:#5b6b7f; text-align:right; }
.order-total .big { font-size:19px; font-weight:800; color:#e65100; }
.order-total .sub { font-size:11.5px; color:#5b6b7f; }
.order-actions { display:flex; gap:8px; margin-top:10px; }
.order-actions .btn { flex:1; }

/* ================= 场景合成（客户代入感） ================= */
.scene-wrap { width:100%; padding:10px 2px 4px; }
.scene-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; justify-content:center; }
.scene-wrap .chip { border:1px solid #d3dee9; background:#fff; color:#41505f; font-size:12px;
  padding:5px 10px; border-radius:14px; cursor:pointer; transition:.15s; }
.scene-wrap .chip:hover { border-color:#8fb4d6; color:#1c4e80; }
.scene-wrap .chip.on { background:#1c4e80; border-color:#1c4e80; color:#fff; font-weight:600; }
.scene-stage { text-align:center; }
.scene-svg, .scene-photo { width:96%; max-width:960px; height:auto; border-radius:10px;
  box-shadow:0 6px 22px rgba(20,35,55,0.20); display:block; margin:0 auto; }
.scene-note { font-size:12px; color:#5b6b7f; margin-top:9px; line-height:1.6; }
.scene-adj { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px;
  margin-top:10px; padding:8px 10px; background:#f7fafd; border:1px dashed #dbe6f1; border-radius:8px; }
.scene-adj label { font-size:11.5px; color:#5b6b7f; display:flex; align-items:center; gap:5px; margin:0; }
.scene-adj input[type=range] { width:104px; }
.scene-upload { display:flex; flex-wrap:wrap; align-items:center; gap:8px; justify-content:center; margin-top:10px; }
.scene-hint { font-size:11px; color:#8a99a8; }
.scene-foot { font-size:11px; color:#9aa8b8; margin-top:8px; line-height:1.6; }
@media (max-width: 860px) {
  .scene-svg, .scene-photo { width:100%; }
  .scene-adj input[type=range] { width:80px; }
}

/* ================= 定制自由设计：自由分格 ================= */
/* 自由分格开着的时候，图标式分格/上亮要让位（两套入口会互相覆盖） */
body.fs-on #gridPickCols, body.fs-on #gridPickTransom { display: none !important; }
.fs-block { margin: 10px 0 2px; }
.btn.fs-on { background: #eaf3fc; border-color: #1c4e80; color: #1c4e80; font-weight: 700; }
.fs-line { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 6px 0; }
.fs-line .fs-lab { flex: 0 0 100%; font-size: 11.5px; color: #5b6b7f; margin-bottom: 2px; }
.fs-line .fs-in {
  width: 74px; min-height: 36px; margin: 0; padding: 5px 6px; font-size: 12px; text-align: center;
}
.fs-line .fs-acts { display: flex; gap: 4px; margin-left: 4px; }
.fs-line .fs-acts .btn-mini { margin-left: 0; padding: 3px 8px; min-height: 36px; }
.fs-tip { font-size: 11px; color: #8a99a8; line-height: 1.6; margin-top: 4px; }

/* ================= 定制自由设计：逐格开启设置 ================= */
.pane-editor {
  margin-bottom: 8px; padding: 9px 11px;
  background: #fff8f0; border: 1px solid #f0b27a; border-radius: 8px;
}
.pane-editor .pe-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.pane-editor .pe-head b { font-size: 12.5px; color: #9a3e00; }
.pane-editor .pe-size { font-size: 11.5px; color: #5b6b7f; }
.pane-editor .pe-state {
  font-size: 10.5px; padding: 1px 8px; border-radius: 9px;
  background: #eef2f7; color: #5b6b7f; border: 1px solid #d3dee9;
}
.pane-editor .pe-state.on { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.pane-editor .pe-head .btn-mini { margin-left: auto; }
.pane-editor .pe-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 6px 10px; }
.pane-editor .pe-body label { margin: 0; font-size: 11.5px; }
.pane-editor .pe-body input, .pane-editor .pe-body select { min-height: 40px; margin-top: 2px; }
.pane-editor .pe-body .btn-mini { grid-column: 1 / -1; margin-left: 0; min-height: 40px; }
.pane-editor .pe-tip { font-size: 11px; color: #9a3e00; margin-top: 6px; }
@media (max-width: 860px) {
  .pane-editor .pe-body { grid-template-columns: 1fr; }
}

/* ================= 小白模式 + 步骤条 ================= */
/* 专业项一律留在 DOM 里，只靠 body 上的 class 控制显隐——
 * 这样标签改名、按类别隐藏、回归测试全都不受影响。 */
body.rookie:not(.adv-open) .rookie-hide { display: none !important; }
body.rookie:not(.adv-open) .row-gl { display: none !important; }
.adv-toggle {
  width: 100%; min-height: 44px; margin-bottom: 12px; font-size: 12px;
  border-style: dashed; color: #5b6b7f;
}
.adv-toggle:hover { border-style: solid; }
body:not(.rookie) .adv-toggle { display: none; }

.step-bar {
  display: flex; align-items: stretch; gap: 6px;
  max-width: 1800px; margin: 12px auto 0; padding: 0 18px;
}
.step-bar .stp {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; min-height: 44px;   /* 触摸目标不低于 44px（门店平板实测过偏小） */
  border-radius: 9px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); transition: .15s;
}
.step-bar .stp:hover { border-color: #8fb4d6; }
.step-bar .stp i {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 12px; font-weight: 700;
  background: #dce8f4; color: #1c4e80;
}
.step-bar .stp b { font-size: 12.5px; color: #1f2d3d; white-space: nowrap; }
.step-bar .stp .stp-state {
  font-size: 11.5px; color: #8a99a8; margin-left: auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.step-bar .stp.done { background: #f2faf4; border-color: #a9cdb8; }
.step-bar .stp.done i { background: #2e7d32; color: #fff; }
.step-bar .stp.done .stp-state { color: #2e7d32; }
.step-bar .stp.active { border-color: #e65100; box-shadow: 0 0 0 1px #e65100 inset; }
.step-bar .stp.active i { background: #e65100; color: #fff; }
.step-bar .stp-arrow { display: flex; align-items: center; color: #b9c7d4; font-size: 16px; }
.pulse { animation: blkPulse 1.6s ease-in-out; }
@keyframes blkPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 4px rgba(230, 81, 0, 0.35); }
}
@media (max-width: 860px) {
  .step-bar { flex-direction: column; gap: 5px; padding: 0 12px; }
  .step-bar .stp-arrow { display: none; }
  .step-bar .stp .stp-state { margin-left: 8px; }
}

/* ================= 玻璃样式可视化 ================= */
.gs-row { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; }
.gs-row .gs-label { flex: 0 0 auto; font-size: 11.5px; color: #5b6b7f; padding-top: 5px; min-width: 52px; }
.gs-row .gs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid #d3dee9; background: #fff; border-radius: 7px;
  padding: 4px 6px 3px; cursor: pointer; transition: .15s; max-width: 92px;
}
.gs-item span {
  font-size: 10px; color: #5b6b7f; max-width: 84px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gs-item:hover { border-color: #8fb4d6; background: #f7fbff; }
.gs-item.on { border-color: #1c4e80; background: #eaf3fc; box-shadow: 0 0 0 1px #1c4e80 inset; }
.gs-item.on span { color: #1c4e80; font-weight: 600; }
.gs-item svg { display: block; }
.gs-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.gs-upload .up-btn {
  display: inline-block; margin: 0; cursor: pointer;
  font-size: 11.5px; color: #1c4e80; padding: 4px 10px;
  border: 1px dashed #b8cde0; border-radius: 13px; background: #f7fafd;
}
.gs-upload .up-btn:hover { background: #eaf3fc; border-style: solid; }
.gs-upload .up-note { font-size: 11px; color: #2e7d32; }
.gs-upload .btn-mini { margin-left: 0; }
@media (max-width: 860px) {
  .gs-row { flex-direction: column; gap: 4px; }
  .gs-row .gs-label { padding-top: 0; }
}

/* ================= 小白友好层：图示化点选 / 色卡 / 报价方案 ================= */

/* 分格与上亮的图标点选：不读文字也能看懂"这个窗分成几格" */
.gp-row { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 2px; }
.gp-row .gp-label {
  flex: 0 0 auto; font-size: 11.5px; color: #5b6b7f;
  padding-top: 5px; min-width: 52px;
}
.gp-row .gp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gp-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid #d3dee9; background: #fff; border-radius: 7px;
  padding: 4px 6px 3px; cursor: pointer; transition: .15s;
}
.gp-item span { font-size: 10.5px; color: #5b6b7f; white-space: nowrap; }
.gp-item:hover { border-color: #8fb4d6; background: #f7fbff; }
.gp-item.on { border-color: #1c4e80; background: #eaf3fc; box-shadow: 0 0 0 1px #1c4e80 inset; }
.gp-item.on span { color: #1c4e80; font-weight: 600; }
.gp-item svg { display: block; }

/* 颜色色卡 */
.sw-row { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 2px; }
.sw-row .sw-label { flex: 0 0 auto; font-size: 11.5px; color: #5b6b7f; padding-top: 6px; min-width: 52px; }
.sw-row .sw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid #d3dee9; background: #fff; border-radius: 7px;
  padding: 3px 5px; min-height: 44px; cursor: pointer; transition: .15s; max-width: 74px;
}
.sw-item i {
  display: block; width: 34px; height: 18px; border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.18);
}
.sw-item span {
  font-size: 10px; color: #5b6b7f; max-width: 68px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sw-item:hover { border-color: #8fb4d6; }
.sw-item.on { border-color: #1c4e80; box-shadow: 0 0 0 1px #1c4e80 inset; }
.sw-item.on span { color: #1c4e80; font-weight: 600; }

/* 报价方案预设 */
.plan-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.plan-row select {
  flex: 1 1 180px; min-width: 0; margin-top: 0; padding: 5px 7px; font-size: 12px;
  min-height: 44px;   /* 实测原高 27.3px，触摸目标明显偏小 */
}
.plan-row .btn-mini { margin-left: 0; flex: 0 0 auto; }
.plan-hint { font-size: 11px; color: #7a8899; line-height: 1.6; margin-top: 6px; }
.plan-hint:empty { display: none; }
.plan-hint b { color: #1c4e80; }
.plan-sample {
  font-size: 10px; background: #fff3e0; color: #b45309;
  border: 1px solid #f0c48a; border-radius: 9px; padding: 1px 7px; margin: 0 2px;
}
@media (max-width: 860px) {
  .gp-row, .sw-row { flex-direction: column; gap: 4px; }
  .gp-row .gp-label, .sw-row .sw-label { padding-top: 0; }
  .gp-item svg { width: 30px; height: 23px; }
  .sw-item i { width: 28px; }
}

/* ================= 阳光房快速造型（3D 视图） ================= */
.shape-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 8px 10px; margin-top: 8px;
  background: linear-gradient(90deg, #f2f9f4, #e9f4ee);
  border: 1px dashed #a9cdb8; border-radius: 8px;
}
.shape-bar .sb-title {
  font-size: 12px; font-weight: 700; color: #1f6b46;
  padding: 2px 8px; border-radius: 10px; background: #d9efe2;
}
.shape-bar .sb-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.shape-bar .chip {
  border: 1px solid #bcd9c8; background: #fff; color: #34594a; font-size: 12px;
  padding: 4px 10px; border-radius: 13px; cursor: pointer; transition: .15s;
}
.shape-bar .chip:hover { border-color: #6bb08c; color: #1f6b46; }
.shape-bar .chip.on { background: #1f6b46; border-color: #1f6b46; color: #fff; font-weight: 600; }
.shape-bar .sb-range {
  display: inline-flex; align-items: center; gap: 5px; margin: 0;
  font-size: 11.5px; color: #34594a; white-space: nowrap;
}
.shape-bar .sb-range input[type=range] { width: 104px; margin: 0; }
.shape-bar .sb-range b { color: #1f6b46; font-weight: 600; min-width: 56px; }
.shape-bar .sb-hint { font-size: 11px; color: #7d9a8b; margin-left: auto; }
@media (max-width: 860px) {
  .shape-bar .sb-range input[type=range] { width: 76px; }
  .shape-bar .sb-hint { margin-left: 0; }
}

/* ================= 客户方案单（促单物料） ================= */
.prop-wrap { max-width: 920px; }
.prop { background:#fff; padding:30px 34px 26px; border-radius:6px; box-shadow:0 8px 40px rgba(0,0,0,0.3);
  font-size:12.5px; color:#1f2d3d; line-height:1.7; }
.prop h2 { font-size:14.5px; color:#1c4e80; margin:20px 0 10px; padding-bottom:6px; border-bottom:2px solid #1c4e80; }
.prop h2:first-child { margin-top:0; }
.prop-head { display:flex; justify-content:space-between; align-items:flex-start;
  border-bottom:3px solid #1c4e80; padding-bottom:12px; }
.ph-brand { display:flex; align-items:center; gap:12px; }
.ph-logo { width:44px; height:44px; border-radius:10px; flex:0 0 auto;
  background:linear-gradient(135deg,#f6a623,#e65100); color:#fff; font-size:24px; font-weight:800;
  display:flex; align-items:center; justify-content:center; }
.prop-head h1 { font-size:20px; color:#1c4e80; letter-spacing:1px; }
.prop-head p { font-size:11.5px; color:#5b6b7f; margin-top:3px; }
.ph-no { text-align:right; font-size:11.5px; color:#5b6b7f; line-height:1.7; }
.prop-info { width:100%; margin:12px 0; border-collapse:collapse; }
.prop-info td { padding:5px 8px; border:1px solid #d8e0e9; font-size:12px; background:#f8fafc; }
.prop-info td:nth-child(odd) { width:12%; color:#5b6b7f; background:#f2f6fb; white-space:nowrap; }
.prop-figure { text-align:center; }
.prop-figure svg, .prop-cell svg { width:100%; height:auto; border-radius:8px;
  box-shadow:0 4px 18px rgba(20,35,55,0.16); }
.prop-cap { font-size:11px; color:#7a8899; margin-top:8px; line-height:1.6; }
.prop-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:start; }
.prop-cell h3 { font-size:12px; color:#5b6b7f; font-weight:600; margin-bottom:6px; }
.prop-table { width:100%; border-collapse:collapse; margin-top:6px; }
.prop-table th { background:#1c4e80; color:#fff; padding:6px 5px; font-size:11px; border:1px solid #1c4e80; }
.prop-table td { padding:5px; border:1px solid #d8e0e9; font-size:11.5px; text-align:center; }
.prop-table td.l { text-align:left; }
.prop-table tfoot td { background:#f7fafd; font-size:11.5px; }
.prop-table .r { text-align:right; }
.prop-price { width:100%; border-collapse:collapse; margin-top:6px; }
.prop-price td { padding:7px 9px; border:1px solid #d8e0e9; font-size:12px; }
.prop-price td:nth-child(odd) { width:22%; color:#5b6b7f; background:#f7fafd; }
.prop-price td.amt { text-align:right; font-weight:600; color:#1c4e80; }
.prop-price tr.big td { background:#eef4fb; font-size:15px; font-weight:800; color:#1c4e80; }
.prop-price tr.big td.amt { font-size:19px; color:#e65100; }
.prop-terms { margin:6px 0 12px 18px; }
.prop-terms li { font-size:12px; color:#31404f; margin-bottom:4px; }
.prop-terms b { color:#1c4e80; }
.prop-flow { display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  padding:10px; background:#f7fafd; border:1px dashed #dbe6f1; border-radius:8px; }
.pf-step { display:inline-flex; align-items:center; gap:5px; font-size:11.5px; color:#31404f; }
.pf-step i { display:inline-flex; align-items:center; justify-content:center; width:17px; height:17px;
  border-radius:50%; background:#1c4e80; color:#fff; font-size:10px; font-style:normal; }
.pf-arrow { color:#a9bccf; font-size:12px; }
.prop-sign { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  margin-top:22px; padding-top:14px; border-top:1px dashed #cfdbe6; font-size:12px; color:#31404f; }
.prop-foot { font-size:10.5px; color:#8a99a8; margin-top:14px; text-align:center; }
.prop .tag-safe { font-size:10px; color:#c62828; margin-left:3px; }
.prop .tag-sub { font-size:10px; color:#1c4e80; margin-left:3px; }
@media (max-width: 860px) {
  .prop { padding:18px 16px; }
  .prop-grid { grid-template-columns:1fr; }
  .prop-head { flex-direction:column; gap:8px; }
  .ph-no { text-align:left; }
  .prop-sign { flex-direction:column; gap:6px; }
}
/* 打印：方案单单独成页，1:1 不裁切 */
@page { size: A4; margin: 12mm; }
@media print {
  .prop-wrap { max-width:none; }
  .prop { box-shadow:none; border-radius:0; padding:0; font-size:10.5px; }
  .prop h2 { page-break-after:avoid; }
  .prop-figure, .prop-cell, .prop-table, .prop-price { page-break-inside:avoid; }
  .prop-table th, .prop-table td { font-size:9.5px; padding:3px; }
  .prop-price td { font-size:10px; padding:4px 6px; }
}

/* ================= 点选分格（免CAD快速改） ================= */
.panel-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 7px 10px; margin-bottom: 8px;
  background: linear-gradient(90deg, #f2f7fc, #eaf2fa);
  border: 1px dashed #b8cde0; border-radius: 8px;
}
.panel-bar .pb-title {
  font-size: 12px; font-weight: 700; color: #1c4e80;
  padding: 2px 8px; border-radius: 10px; background: #dce8f4;
}
.panel-bar .pb-hint { font-size: 11.5px; color: #5b6b7f; }
.panel-bar .pb-count { font-size: 11.5px; color: #e65100; font-weight: 600; margin-left: auto; }
.panel-bar .btn-mini { margin-left: 0; }

/* 图纸上的点选热区：透明但可命中，悬停高亮，点击后整格描边 */
.panel-hit { fill: transparent; stroke: none; cursor: pointer; }
.panel-hit:hover { fill: rgba(230, 81, 0, 0.10); stroke: rgba(230, 81, 0, 0.55); stroke-width: 5; }
.panel-hit[data-open="1"] { stroke: rgba(28, 78, 128, 0.30); stroke-width: 3; stroke-dasharray: 14 10; }
.panel-hit[data-open="1"]:hover { fill: rgba(28, 78, 128, 0.10); stroke: rgba(28, 78, 128, 0.8); }
@media print { .panel-bar { display: none !important; } .panel-hit { display: none; } }

/* 窄屏横向滚动容器（设计要求追踪表等含 nowrap 列，避免撑破页面） */
.table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.export-note { font-size:11px; color:#8a99a8; margin:8px 0 2px; line-height:1.5; }

/* ================= 录入项设置 ================= */
.btn-mini { margin-left:auto; padding:3px 9px; font-size:11.5px; border-radius:5px; font-weight:400; }
.cfg-wrap { max-width:1080px; }
.cfg-body { background:#fff; padding:22px 24px 30px; border-radius:6px; box-shadow:0 8px 40px rgba(0,0,0,0.3); font-size:12.5px; color:#1f2d3d; }
.cfg-tip { font-size:12px; color:#5b6b7f; line-height:1.75; background:#f2f7fc; border-left:3px solid #1c4e80; padding:10px 12px; border-radius:4px; margin-bottom:16px; }
.cfg-tip code { background:#e6eef7; padding:1px 5px; border-radius:3px; font-size:11.5px; }
.cfg-group { margin-bottom:20px; }
.cfg-group h4 { font-size:13.5px; color:#1c4e80; margin-bottom:8px; padding-bottom:6px; border-bottom:1px solid #dce8f4; }
.cfg-table { width:100%; border-collapse:collapse; }
.cfg-table th { font-size:11.5px; color:#8a99a8; font-weight:600; text-align:left; padding:4px 6px; border-bottom:1px solid #e7eef6; }
.cfg-table td { padding:5px 6px; border-bottom:1px solid #f1f5fa; vertical-align:top; }
.cfg-table tr:hover td { background:#fafcfe; }
.cfg-in { width:100%; padding:5px 7px; font-size:12px; margin-top:0; }
.cfg-mini { display:inline-block; width:76px; margin-right:4px; }
.cfg-opt { width:100%; padding:5px 7px; font-size:11.5px; border:1px solid var(--line); border-radius:5px; background:#fbfcfe; font-family:Consolas,Menlo,monospace; resize:vertical; }
.cfg-idname { font-size:10.5px; color:#9aa8b6; font-family:Consolas,Menlo,monospace; }
.cfg-table td:first-child { width:24%; }
@media (max-width: 860px) {
  .cfg-body { padding:14px; }
  .cfg-table th:nth-child(3), .cfg-table td:nth-child(3) { width:22%; }
  .cfg-mini { width:60px; }
}

/* ================= 正式报价单 ================= */
.sheet-mask { position:fixed; inset:0; background:rgba(20,30,45,0.55); z-index:200; overflow:auto; padding:20px; }
.sheet-wrap { max-width:880px; margin:0 auto; }
.sheet-bar { display:flex; gap:8px; justify-content:flex-end; margin-bottom:10px; }
.sheet { background:#fff; padding:30px 34px; border-radius:6px; box-shadow:0 8px 40px rgba(0,0,0,0.3); font-size:12.5px; color:#1f2d3d; }
.sheet-head { display:flex; justify-content:space-between; align-items:flex-start; border-bottom:3px solid #1c4e80; padding-bottom:12px; }
.sheet-head h1 { font-size:22px; color:#1c4e80; letter-spacing:1px; }
.sheet-head p { font-size:11.5px; color:#5b6b7f; margin-top:4px; }
.sheet-no { text-align:right; font-size:11.5px; color:#5b6b7f; line-height:1.7; }
.sheet-info { width:100%; margin:12px 0; border-collapse:collapse; }
.sheet-info td { padding:5px 8px; border:1px solid #d8e0e9; font-size:12px; background:#f8fafc; }
.sheet-table { width:100%; border-collapse:collapse; margin-top:8px; }
.sheet-table th { background:#1c4e80; color:#fff; padding:7px 6px; font-size:11.5px; border:1px solid #1c4e80; }
.sheet-table td { padding:6px; border:1px solid #d8e0e9; font-size:11.5px; text-align:center; }
.sheet-table td:nth-child(3) { text-align:left; }
.sheet-table .amt { text-align:right; font-weight:600; }
.tag-safe { font-size:10px; color:#c62828; }
.tag-sub { font-size:10px; color:#1c4e80; }
.sheet-sum { width:100%; border-collapse:collapse; margin-top:10px; }
.sheet-sum td { padding:6px 8px; border:1px solid #d8e0e9; font-size:12px; }
.sheet-sum td:nth-child(2) { text-align:right; width:150px; font-weight:600; }
.sheet-sum .total-row td { background:#eef4fb; font-size:14px; font-weight:800; color:#1c4e80; }
.sheet-terms { margin-top:14px; }
.sheet-terms h3 { font-size:13px; color:#1c4e80; margin-bottom:6px; }
.sheet-terms ol { margin-left:18px; font-size:11px; color:#4b5866; line-height:1.8; }
.sheet-sign { display:flex; justify-content:space-between; margin-top:26px; font-size:12px; color:#31404f; }
.sheet-sum .sub-row td { background:#f7fafd; }
.sheet-sum .sub-row td:nth-child(2) { font-weight:700; }

/* 报价单附页：逐樘大样图 */
.sheet-dwg { margin-top:22px; page-break-before:always; }
.sheet-dwg h2 { font-size:14px; color:#1c4e80; border-bottom:2px solid #1c4e80; padding-bottom:5px; margin-bottom:10px; }
.dwg-item { margin-bottom:14px; page-break-inside:avoid; }
.dwg-item + .dwg-item { page-break-before:always; }
.dwg-cap { font-size:12px; color:#31404f; background:#f2f6fb; padding:5px 8px; border-radius:4px; margin-bottom:4px; }
.dwg-item svg { width:100%; height:auto; max-height:none; display:block; }
.dwg-note { font-size:10.5px; color:#7a8899; margin-top:6px; }

/* CAD 图纸容器（图纸含立面图 + 尺寸链 + 俯视图 + 图例 + 技术要求 + 标题栏，故允许更高） */
.cad-svg { width:100%; height:auto; max-height:660px; background:#fff; }
.view svg.cad-svg { max-height:820px; }
@media (max-width: 860px) { .view svg.cad-svg { max-height:none; } }

@media print {
  body.printing-sheet > *:not(.sheet-mask) { display:none !important; }
  body.printing-sheet .sheet-mask { position:static; background:#fff; padding:0; overflow:visible; }
  body.printing-sheet .sheet-bar { display:none; }
  body.printing-sheet .sheet { box-shadow:none; padding:0; }
  @page { size:A4; margin:12mm; }
}
