:root {
  --bg: #f5f3ef; --panel: #fff; --ink: #23272e; --muted: #6b7280; --line: #e2ddd5;
  --accent: #b5692e; --accent-2: #fbeee2; --ok: #2f7d4f; --warn: #b7791f; --err: #c0392b;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
button, select, input, textarea { font: inherit; }
button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 10px; cursor: pointer; color: var(--ink); white-space: nowrap; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { filter: brightness(1.06); }
button.wide { width: 100%; padding: 8px; margin-top: 8px; }
button.on { background: var(--accent-2); border-color: var(--accent); }
input, select, textarea { border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; background: #fff; }
textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.hidden { display: none !important; }
.small { font-size: 12px; color: var(--muted); }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 6px; }

header.top { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: #2b2420; color: #fff; position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 600; font-size: 16px; }
.tag { font-size: 11px; background: var(--accent); padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.top-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.top-actions button { background: transparent; color: #fff; border-color: #5a4f48; }

.layout { display: grid; grid-template-columns: var(--side-w, 340px) 8px 1fr; gap: 0 6px; padding: 10px; align-items: start; }
.side { background: var(--panel); border-radius: 10px; border: 1px solid var(--line); overflow: hidden; position: sticky; top: 58px; max-height: calc(100vh - 68px); overflow-y: auto; }
.side-tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.side-tabs button { flex: 1; border: 0; border-radius: 0; padding: 10px; font-weight: 600; color: var(--muted); }
.side-tabs button.active { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.block { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.block h3 { margin: 0 0 8px; font-size: 14px; }
.block h3 small { font-weight: normal; color: var(--muted); }
details.block summary { cursor: pointer; }
details.block[open] summary { margin-bottom: 8px; }
.samples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.samples button { padding: 2px; display: flex; flex-direction: column; align-items: center; font-size: 11px; }
.samples canvas { width: 100%; height: auto; background: #fff; }
label.btn.file { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; cursor: pointer; }
label.btn.file input { display: none; }
.sketch-wrap { position: relative; margin-top: 8px; border: 1px dashed #cfc6b8; border-radius: 6px; background: #fff; aspect-ratio: 1 / 1; overflow: hidden; }
.sketch-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.sketch-wrap.drawing #overlay { pointer-events: none; }
.sketch-wrap.drawing { cursor: crosshair; border-color: var(--accent); }
.sketch-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); pointer-events: none; padding: 20px; line-height: 1.6; }
.check { display: block; margin: 6px 0; font-size: 12px; color: var(--muted); }
.dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; font-size: 12px; }
.dims input { width: 100%; }
.msg { margin-top: 8px; font-size: 12px; line-height: 1.6; }
.msg.err { color: var(--err); }
.msg ul { margin: 4px 0; padding-left: 18px; }
.tpl-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-grid button { flex: 1 1 auto; }
.tpl-grid button { font-size: 12px; padding: 6px 4px; }
.form label { display: block; margin: 6px 0; font-size: 13px; }
.form label input:not([type=checkbox]), .form label select { width: 100%; margin-top: 2px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mat-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mat-table td, .mat-table th { padding: 2px; text-align: left; }
.mat-table input[type=number] { width: 60px; }

.center { min-width: 0; }
.viewer-wrap { position: relative; background: linear-gradient(#fbfaf7, #e9e4dc); border-radius: 10px; border: 1px solid var(--line); height: 58vh; min-height: 380px; overflow: hidden; }
#viewer { position: absolute; inset: 0; }
.viewer-tools { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.viewer-info { position: absolute; bottom: 10px; left: 10px; background: rgba(255,255,255,.85); padding: 6px 10px; border-radius: 6px; font-size: 12px; line-height: 1.6; }
.viewer-hint { position: absolute; bottom: 10px; right: 10px; font-size: 12px; color: var(--muted); }
.editor { position: absolute; top: 10px; right: 10px; width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); font-size: 13px; }
.editor h4 { margin: 0 0 6px; display: flex; justify-content: space-between; }
.editor .close { border: 0; padding: 0 4px; }
.editor .seg { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 8px; }
.editor .seg button { padding: 3px 7px; font-size: 12px; }
.editor .lbl { color: var(--muted); font-size: 12px; margin-top: 4px; }
.editor input[type=number] { width: 80px; }
.editor .ops { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.editor .ops button { flex: 1 1 auto; }
.editor .ops button { font-size: 12px; }

.tabs { display: flex; gap: 2px; margin-top: 10px; flex-wrap: wrap; }
.tabs button { border-radius: 6px 6px 0 0; border-bottom: 0; background: #ece7df; }
.tabs button.active { background: #fff; color: var(--accent); font-weight: 600; }
.tab-body { background: #fff; border: 1px solid var(--line); border-radius: 0 10px 10px 10px; padding: 12px; min-height: 300px; overflow-x: auto; }
.badge { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; font-size: 11px; background: var(--warn); color: #fff; }
.badge.err { background: var(--err); }
.badge:empty { display: none; }

table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
table.t th, table.t td { border-bottom: 1px solid #eee; padding: 5px 8px; text-align: left; white-space: nowrap; }
table.t th { background: #faf8f4; font-weight: 600; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr.group td { background: #f6f1ea; font-weight: 600; }
table.t tfoot td { font-weight: 600; }
.sheets { display: flex; flex-wrap: wrap; gap: 12px; }
.sheet { flex: 0 0 auto; }
.sheet svg { width: 460px; max-width: 100%; height: auto; background: #faf6ef; border: 1px solid #d8cfc2; }
.sheet .cap { font-size: 12px; color: var(--muted); margin: 2px 0; }
.summary-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card { background: #faf8f4; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.card b { display: block; font-size: 18px; }
.card span { font-size: 12px; color: var(--muted); }
#elevation svg { width: 100%; max-height: 560px; }
#elevation .cell { fill: transparent; cursor: pointer; }
#elevation .cell:hover { fill: rgba(181, 105, 46, .08); }
#elevation .cell.sel { fill: rgba(181, 105, 46, .18); stroke: var(--accent); stroke-width: 6; }
.warn-list li { margin: 4px 0; }
.warn-list li.err { color: var(--err); }
.warn-list li.w { color: var(--warn); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #2b2420; color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 100; max-width: 90vw; }
.print-only { display: none; }

/* 柜子切换 */
.cab-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.cab-bar button { font-size: 13px; }
.cab-bar button.cab.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.cab-bar .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--err); margin-right: 4px; }
/* 待处理 */
.cab-bar .dot.todo { background: #2563eb; }
.cab-bar button.cab.off { opacity: .55; text-decoration: line-through; }
.num-dot { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; border-radius: 10px; color: #fff; text-align: center; font-size: 12px; font-weight: bold; font-style: normal; margin-right: 6px; }
.warn-list li { list-style: none; margin: 6px 0; }
.warn-list { padding-left: 4px; }
.warn-list li.c { color: #1d4ed8; }
.warn-list li.note { color: var(--muted); font-size: 12px; }
.issue-msg { margin: 6px 0; line-height: 1.5; }
.editor .ops.one button { flex-basis: 100%; }
.c-err { color: var(--err); } .c-warn { color: #b45309; } .c-confirm { color: #1d4ed8; }
input.flash { animation: flash 1.2s 2; outline: 2px solid #2563eb; }
@keyframes flash { 50% { background: #dbeafe; } }
#elevation .mark { cursor: pointer; }
#overview .bad { color: var(--err); } #overview .todo { color: #1d4ed8; } #overview .good { color: var(--ok); }
#overview tr.cur td { background: #fff8ef; }
.tscroll { overflow-x: auto; }
table.matrix td.zero { color: #bbb; }
/* 问题提示条 */
.banner { position: absolute; top: 52px; left: 10px; z-index: 5; width: min(600px, calc(100% - 290px)); background: #fff7e6; border: 1px solid #f0b44c; border-radius: 8px; padding: 8px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.scope { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.scope button.on { background: var(--accent-2); border-color: var(--accent); }
.lg-box { background: #f3f8f5; border: 1px solid #cfe3d6; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.lg-box .row { margin: 6px 0; }
.warn-list .fixes { display: flex; gap: 6px; flex-wrap: wrap; margin: 3px 0 6px 18px; }
.warn-list .fix { font-size: 12px; padding: 2px 8px; background: var(--accent-2); border-color: var(--accent); }
.warn-list .link { cursor: pointer; text-decoration: underline dotted; }
button.danger { color: var(--err); }
button.link-btn { border: 0; background: none; color: var(--accent); padding: 0 0 0 6px; font-size: 12px; text-decoration: underline; }
.msg .amb { background: #fff7e6; border: 1px solid #f0b44c; border-radius: 6px; padding: 6px 8px; margin: 6px 0; }
.sketch-wrap.boxing #overlay { cursor: crosshair; }
.sketch-wrap.boxing { border-color: #1e5adc; }
/* 正视图对象 */
#elevation .obj { cursor: pointer; }
#elevation .obj.sel { stroke: #d9480f !important; stroke-width: 10 !important; fill: #ffd8a8 !important; }
#elevation line.obj.sel { stroke: #d9480f !important; }
#elevation .drag { cursor: ew-resize; }
#elevation [data-kind=fixedShelf].drag { cursor: ns-resize; }
#elevation .hit { cursor: pointer; }
#elevation { touch-action: none; }
.editor input[type=number] { width: 80px; }
.editor .grid3 input { width: 100%; }
.rec-row { display: flex; gap: 6px; margin-top: 8px; }
.rec-row button { flex: 1; padding: 8px; }
.rec-row select { max-width: 46%; font-size: 12px; }
#compare-opacity { width: 90px; align-self: center; }
.viewer-tools button.dim { opacity: .55; }
/* 分组编辑器 */
.group-status { margin-top: 8px; font-size: 12px; background: #eef4ff; border: 1px solid #bcd0fb; border-radius: 6px; padding: 6px 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.group-status button { font-size: 12px; padding: 2px 8px; }
dialog.box-editor { width: 96vw; height: 92vh; max-width: none; max-height: none; border: 0; border-radius: 12px; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
dialog.box-editor:not([open]) { display: none; }
dialog.box-editor::backdrop { background: rgba(0,0,0,.45); }
.be-head, .be-foot { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: #faf8f4; border-bottom: 1px solid var(--line); }
.be-foot { border-top: 1px solid var(--line); border-bottom: 0; }
.be-head .small { flex: 1; }
.be-foot .grow { flex: 1; }
.be-stage { flex: 1; display: flex; align-items: center; justify-content: center; background: #e9e6e0; overflow: hidden; padding: 12px; min-height: 0; }
.be-canvas { position: relative; box-shadow: 0 2px 12px rgba(0,0,0,.15); background: #fff; }
.be-canvas img { width: 100%; height: 100%; display: block; user-select: none; pointer-events: none; }
.be-layer { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.be-box { position: absolute; border: 3px solid #1e5adc; background: rgba(30,90,220,.08); cursor: move; box-sizing: border-box; }
.be-box.sel { border-color: #d9480f; background: rgba(217,72,15,.08); }
.be-label { position: absolute; left: -3px; top: -26px; background: #1e5adc; color: #fff; font-size: 13px; padding: 2px 8px; border-radius: 4px 4px 0 0; white-space: nowrap; pointer-events: none; }
.be-box.sel .be-label { background: #d9480f; }
.be-del { position: absolute; right: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; padding: 0; background: #fff; border: 2px solid #c0392b; color: #c0392b; font-size: 18px; line-height: 22px; cursor: pointer; z-index: 2; }
.be-h { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid #1e5adc; border-radius: 3px; }
.be-box.sel .be-h { border-color: #d9480f; }
.be-nw { left: -9px; top: -9px; cursor: nwse-resize; } .be-ne { right: -9px; top: -9px; cursor: nesw-resize; }
.be-sw { left: -9px; bottom: -9px; cursor: nesw-resize; } .be-se { right: -9px; bottom: -9px; cursor: nwse-resize; }
.be-n { left: calc(50% - 8px); top: -9px; cursor: ns-resize; } .be-s { left: calc(50% - 8px); bottom: -9px; cursor: ns-resize; }
.be-w { top: calc(50% - 8px); left: -9px; cursor: ew-resize; } .be-e { top: calc(50% - 8px); right: -9px; cursor: ew-resize; }
@media (pointer: coarse) { .be-h { width: 24px; height: 24px; } .be-del { width: 34px; height: 34px; } }

/* 描线修正 */
.te-body { flex: 1; display: flex; min-height: 0; }
.te-body .be-stage { flex: 1; }
.te-stage { display: block !important; overflow: auto !important; position: relative; }
.te-stage .be-canvas { margin: 12px auto; }
.te-side { width: 280px; overflow-y: auto; padding: 10px 12px; border-left: 1px solid var(--line); background: #fff; font-size: 13px; }
.te-side h4 { margin: 4px 0 6px; }
.te-side label { display: block; font-size: 12px; }
.te-side input[type=number] { width: 100%; }
.te-side .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.te-side .seg { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 8px; }
.te-side .seg button, .te-side .ops button { font-size: 12px; padding: 3px 7px; }
.te-side .ops { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.te-side .ops button { flex: 1 1 auto; }
.te-side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.te-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.te-cell { fill: rgba(30,90,220,.04); cursor: pointer; }
.te-cell:hover { fill: rgba(30,90,220,.1); }
.te-cell.on { fill: rgba(217,72,15,.16); }
.te-label { fill: #1e3a8a; font-weight: bold; paint-order: stroke; stroke: #fff; stroke-width: 3px; pointer-events: none; }
.te-dim { fill: #475569; paint-order: stroke; stroke: #fff; stroke-width: 3px; pointer-events: none; }
.te-line { stroke: #1e5adc; pointer-events: none; }
.te-line.on { stroke: #d9480f; }
.te-line.snap, .te-frame.snap { stroke: #16a34a !important; }
.te-handle.corner { rx: 50%; ry: 50%; fill: #d9480f; }
.te-snap { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.te-hit { stroke: transparent; }
.te-hit.divider { cursor: ew-resize; } .te-hit.fixedShelf { cursor: ns-resize; }
.te-hit:hover { stroke: rgba(30,90,220,.2); }
.te-frame { fill: none; stroke: #d9480f; pointer-events: none; }
.te-handle { fill: #fff; stroke: #d9480f; cursor: move; }
.te-shelf { stroke: #1e5adc; stroke-dasharray: 6 4; pointer-events: none; }
.te-rod { stroke: #555; pointer-events: none; }
.te-drawer { fill: none; stroke: #7a5c3e; pointer-events: none; }
.te-door { fill: none; stroke: #b5692e; pointer-events: none; }
.te-plinth { stroke: #d9480f; stroke-dasharray: 4 3; pointer-events: none; }

/* 手绘说明 */
dialog.guide { width: min(980px, 96vw); max-height: 92vh; border: 0; border-radius: 12px; padding: 16px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.guide::backdrop { background: rgba(0,0,0,.35); }
.guide-head { display: flex; justify-content: space-between; align-items: center; }
.guide-head h2 { margin: 0; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.legend figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; text-align: center; }
.legend canvas { max-width: 100%; height: auto; }
.legend figcaption { font-size: 12px; text-align: left; line-height: 1.5; color: #444; }
.guide .example canvas { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }

@media (max-width: 900px) {
  .banner { width: calc(100% - 20px); }
  header.top { flex-wrap: wrap; gap: 6px; padding: 6px 10px; }
  .top-actions button { padding: 3px 7px; font-size: 12px; }
  .layout { grid-template-columns: 1fr; }
  .side-resizer { display: none; }
  .side { position: static; max-height: none; }
  .viewer-wrap { height: 60vh; }
  .editor { left: 10px; right: 10px; width: auto; top: auto; bottom: 40px; max-height: 50%; overflow: auto; }
}
@media print {
  header.top, .layout { display: none !important; }
  .print-only { display: block !important; }
  body { background: #fff; }
  .print-only h2 { margin: 6px 0; }
  .print-only svg { max-height: 120mm; width: 100%; }
  table.t { font-size: 11px; }
  table.t th, table.t td { padding: 2px 4px; }
  .pb { page-break-before: always; }
}

/* 预处理窗口 */
.pe-stage { position: relative; background: #eee; display: flex !important; align-items: center; justify-content: center; }
.pe-canvas { display: block; margin: 12px auto; max-width: calc(100% - 24px); max-height: calc(100vh - 190px); width: auto; height: auto; object-fit: contain; box-shadow: 0 1px 4px rgba(0,0,0,.2); background: #fff; }
.pe-busy { position: absolute; top: 12px; right: 16px; background: rgba(0,0,0,.65); color: #fff; padding: 3px 10px; border-radius: 4px; font-size: 13px; }
.pe-steps { display: grid; grid-template-columns: 1fr; gap: 3px; }
.pe-steps button { text-align: left; font-size: 12px; padding: 4px 8px; }
.pe-steps button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pe-info { margin: 8px 0; line-height: 1.5; }
.pe-side label { margin: 8px 0; }
.pe-side input[type=range] { width: 100%; }
.pe-side .muted { color: #777; display: block; line-height: 1.35; }
.pe-check { display: flex !important; align-items: center; gap: 6px; }
#btn-pre { flex: 0 0 auto; }
.mat-table input[type=text] { width: 100%; min-width: 90px; }
.mat-table input[type=color] { width: 30px; height: 22px; padding: 0; border: 1px solid var(--line); }
.mat-pick { display: grid; grid-template-columns: auto 1fr; gap: 4px 6px; align-items: center; font-size: 12px; margin: 4px 0; }
.mat-pick select { width: 100%; font-size: 12px; }
.mat-table { table-layout: fixed; }
.mat-table th:nth-child(1), .mat-table td:nth-child(1) { width: 30%; }
.mat-table th:nth-child(3), .mat-table td:nth-child(3) { width: 24%; }
.mat-table th:nth-child(5), .mat-table td:nth-child(5) { width: 26px; }
.mat-table th:nth-child(6), .mat-table td:nth-child(6) { width: 34px; }
.mat-table th:nth-child(7), .mat-table td:nth-child(7) { width: 34px; }
.mat-table input[type=number] { width: 100%; }
.mat-table .link-btn { font-size: 11px; padding: 0; }
.pe-group { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
.pe-gh { font-size: 13px; margin-bottom: 2px; }
.pe-side label.off { opacity: .4; }
.band-form { margin-top: 8px; font-size: 12px; }
.band-form label { display: block; margin: 4px 0; }
.band-form select { width: 100%; font-size: 12px; }
.band-form input[type=number] { width: 56px; }

/* 左侧宽度可拖动 */
.side-resizer { align-self: stretch; cursor: col-resize; border-radius: 4px; position: sticky; top: 58px; height: calc(100vh - 68px); touch-action: none; }
.side-resizer::after { content: ''; display: block; width: 2px; height: 40px; margin: calc(50vh - 54px) auto 0; background: var(--line); border-radius: 2px; }
.side-resizer:hover, .side-resizer.on { background: rgba(181, 105, 46, .12); }
.side-resizer:hover::after, .side-resizer.on::after { background: var(--accent); }
body.resizing { cursor: col-resize; user-select: none; }
/* 文字不折行后，窄的地方让按钮组自己换行 */
.row.gap { flex-wrap: wrap; }
.seg { flex-wrap: wrap; }

/* 报价页单价直接改 */
.price-cell { white-space: nowrap; }
.price-in { width: 72px; text-align: right; border: 1px solid transparent; background: transparent; padding: 2px 4px; border-radius: 4px; font: inherit; }
.price-in:hover { border-color: var(--line); background: #fff; }
.price-in:focus { border-color: var(--accent); background: #fff; outline: none; }
@media print { .price-in { border: 0; } }

/* 手绘工具 */
.draw-tools { margin: 6px 0; }
.draw-tools button { font-size: 12px; padding: 4px 8px; }
.draw-tools button:disabled { opacity: .45; cursor: default; }
.sketch-wrap.erasing canvas { cursor: cell; }
/* 五金表：点一行看位置 */
.hw-t .hw-row { cursor: pointer; }
.hw-t .hw-row:hover td { background: #fff4e6; }
.hw-t .hw-row.on td { background: #ffe3c2; font-weight: 600; }
.hw-t .hw-note td { color: #b35a00; background: #fff8f0; }
.lg-stale { background: #fff4e0; border: 1px solid #f0b35a; color: #7a4a00; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; }
.lg-stale button { margin-left: 8px; }

/* 板材库、分类默认 */
.mat-badges { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.mat-badges span { font-size: 10px; background: #f3e2cf; color: #7a4a1d; border-radius: 3px; padding: 0 4px; white-space: nowrap; }
.mat-table td.sheet-in { white-space: nowrap; font-size: 11px; }
.mat-table td.sheet-in input { width: 44%; }
.cat-defaults { display: grid; grid-template-columns: 1fr; gap: 4px; font-size: 12px; }
.cat-defaults label { display: grid; grid-template-columns: 6em 1fr; align-items: center; gap: 6px; }
.cat-defaults select { width: 100%; font-size: 12px; }

.nest-note { background: #eef6ee; border: 1px solid #b9d8b9; color: #24502a; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; font-size: 13px; }
.mat-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.2); }

.collide-note { position: absolute; left: 10px; right: 10px; bottom: 78px; z-index: 6; background: #fff0f0; border: 1px solid #e08080; color: #8a1c1c; border-radius: 8px; padding: 6px 10px; font-size: 13px; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.brand-sub { font-size: 12px; font-weight: 400; opacity: .75; margin-left: 2px; }
.moved-note { background: #fff3cd; color: #6b4e00; text-align: center; font-size: 13px; padding: 4px 8px; }
.moved-note a { color: #b35c00; font-weight: 600; }
