/* ===== 右侧建筑面板(悬浮卡片：上下留白、圆角、阴影，不再贴边贴顶贴底) ===== */
#panel { position: absolute; top: 16px; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); z-index: 22;
  background: #fff; border-radius: 14px; box-shadow: 0 12px 36px rgba(15,23,42,.24);
  transform: translateX(calc(100% + 32px)); transition: transform .25s; overflow-y: auto; }
#panel.open { transform: translateX(0); }
.panel-head { position: relative; padding: 16px 16px 12px; border-left: 6px solid #ccc;
  background: #f7faf8; border-radius: 14px 14px 0 0; }
.panel-title { font-size: 17px; font-weight: 700; padding-right: 40px; }
.panel-sub { font-size: 12px; color: #555; margin-top: 4px; padding-right: 40px; }
.badge { color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 9px; margin-left: 6px; }
.panel-close { position: absolute; top: 12px; right: 12px; border: none; background: none; font-size: 22px; cursor: pointer; color: #888; }
.panel-pad { padding: 16px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 13px; }
.kv span { color: #888; margin-right: 6px; }
.building-asset-kv > div { min-height: 34px; padding: 8px 9px; border: 1px solid #e4ebe7; border-radius: 7px; background: #f8faf9; }
.building-asset-source { display: grid; gap: 5px; margin-top: 8px; color: #77837e; font-size: 10px; line-height: 1.5; }
.building-asset-source span { min-height: 15px; }
.building-asset-source b { margin-right: 6px; color: #4c6259; font-weight: 650; }
.sec { font-size: 14px; font-weight: 700; margin: 16px 0 8px; padding-left: 8px; border-left: 4px solid var(--green); }
.tag-sim { font-size: 10px; color: #b45309; background: #fef3c7; padding: 1px 6px; border-radius: 8px; font-weight: 400; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th, .tbl td { border: 1px solid #eee; padding: 5px 6px; text-align: left; }
.tbl th { background: #f3f6f4; }
.table-empty-hint { padding: 8px 6px; border: 1px solid #e1e7ee; border-top: 0; color: #8a98a9; font-size: 11px; }
.facade-table-wrap { width: 100%; overflow: hidden; border-radius: 6px; }
.facade-metrics-table { width: 100%; table-layout: fixed; font-size: clamp(9px, 2.9vw, 12px); }
.facade-metrics-table col:nth-child(1) { width: 14%; }
.facade-metrics-table col:nth-child(2) { width: 21%; }
.facade-metrics-table col:nth-child(3) { width: 25%; }
.facade-metrics-table col:nth-child(4) { width: 17%; }
.facade-metrics-table col:nth-child(5) { width: 23%; }
.facade-metrics-table th,.facade-metrics-table td { overflow: hidden; padding-inline: clamp(2px, 1.4vw, 6px); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.muted { color: #999; font-size: 12px; }
.model-card-list { display: flex; flex-direction: column; gap: 8px; }
.model-card { display: flex; align-items: center; gap: 10px; padding: 10px;
  border: 1px solid #dfe8e3; border-radius: 9px; background: #f8faf9; }
.model-card-icon { flex: none; width: 38px; height: 38px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 800; }
.model-card-icon.is-glb { background: #6687a5; }
.model-card-icon.is-pointcloud { background: #638d79; font-size: 18px; }
.model-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.model-card-main b { overflow: hidden; color: #26332e; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.model-card-main span { color: #8a9691; font-size: 10.5px; }
.model-preview-btn { flex: none; border: 1px solid #a9c9ba; border-radius: 6px; padding: 6px 9px;
  background: #edf7f2; color: #176149; font-size: 11.5px; cursor: pointer; }
.model-preview-btn:hover { border-color: #6fa68d; background: #deeee6; }
.model-empty { padding: 14px 10px; border: 1px dashed #d8e1dd; border-radius: 8px;
  color: #98a39e; background: #fafbfa; font-size: 12px; text-align: center; }
.building-recognition-group { margin-top: 12px; overflow: hidden; border: 1px solid #dfe8e4; border-radius: 8px; background: #fff; }
.building-recognition-title { display: flex; min-height: 36px; padding: 0 10px; align-items: center; justify-content: space-between; gap: 10px; background: #f1f7f4; }
.building-recognition-title b { color: #21483a; font-size: 12.5px; }
.building-recognition-title span { flex: none; padding: 2px 7px; border-radius: 10px; background: #dceee5; color: #176149; font-size: 10px; font-weight: 700; }
.building-recognition-group.manual-recognition { border-color: #dfe8e4; }
.building-recognition-group.manual-recognition .building-recognition-title { background: #f1f7f4; }
.building-recognition-group.manual-recognition .building-recognition-title span { background: #dceee5; color: #176149; }
.building-recognition-group .tbl { margin: 0; }
.building-recognition-group .tbl td { border-right: 0; border-bottom-color: #edf1ef; border-left: 0; }
.building-recognition-group .tbl tr:last-child td { border-bottom: 0; }
.building-recognition-total { background: #eaf4ef; color: #174f3d; }
.building-recognition-group.manual-recognition .building-recognition-total { background: #eaf4ef; color: #174f3d; }
.building-recognition-empty td { color: #9aa49f; }
.manual-detail-group { margin-top: 10px; overflow: hidden; border: 1px solid #dfe8e4; border-radius: 8px; background: #fff; }
.manual-detail-title { display: flex; min-height: 36px; padding: 0 10px; align-items: center; justify-content: space-between; gap: 8px; background: #f1f7f4; }
.manual-detail-title b { color: #111827; font-size: 12.5px; }
.manual-detail-title span { flex: none; padding: 2px 7px; border-radius: 10px; background: #dceee5; color: #176149; font-size: 9.5px; font-weight: 700; text-align: right; }
.manual-detail-table { table-layout: fixed; margin: 0; color: #111827; font-size: 10.5px; }
.manual-detail-table th,.manual-detail-table td { overflow-wrap: anywhere; text-align: center; }
.manual-detail-table th { background: #f1f7f4; color: #111827; font-weight: 700; white-space: nowrap; }
.manual-detail-table th:nth-child(1) { width: 28%; text-align: left; }
.manual-detail-table th:nth-child(2) { width: 16%; }
.manual-detail-table th:nth-child(3) { width: 22%; }
.manual-detail-table th:nth-child(4) { width: 34%; }
.manual-detail-table td:first-child { color: #111827; text-align: left; }
.manual-detail-table td:not(:first-child) { color: #174f3d; font-variant-numeric: tabular-nums; font-weight: 700; }
.manual-detail-total { background: #eaf4ef; color: #174f3d; }
.manual-detail-table .manual-detail-total td { color: #174f3d; }
.net-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.net-tbl td { padding: 5px 8px; border: 0; vertical-align: top; }
.net-tbl tr:nth-child(even) { background: #f6f8f7; }
.net-tbl td.k { color: #6b7280; width: 42%; white-space: nowrap; }
.net-tbl td.v { color: #111827; word-break: break-all; }

/* ===== Potree 点云 80% 悬浮窗 ===== */
/* z-index 高于体检工作台(1600)：工作台工具栏的“预览点云”也要能盖住它弹出。 */
.pc-modal { position: fixed; inset: 0; z-index: 1700; display: flex; align-items: center; justify-content: center;
  background: rgba(3, 7, 18, .68); backdrop-filter: blur(2px); }
.pc-modal.hidden { display: none; }
.pc-shell { width: 80vw; height: 80vh;
  display: flex; flex-direction: column; overflow: hidden; border-radius: 10px;
  background: #0e1114; box-shadow: 0 20px 64px rgba(0,0,0,.46); border: 1px solid rgba(255,255,255,.12); }
.pc-head { height: 50px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px 0 16px; color: #eceff1; border-bottom: 1px solid rgba(255,255,255,.12); }
.pc-title { display: block; font-size: 15px; }
.pc-sub { display: block; margin-top: 2px; font-size: 11px; color: #91a4ad; }
.pc-close { border: none; background: transparent; color: #cfd8dc; font-size: 26px; line-height: 1; cursor: pointer; }
.pc-close:hover { color: #fff; }
.pc-body { position: relative; flex: 1; min-height: 0; }
.pc-frame { display: block; width: 100%; height: 100%; border: 0; background: #07100e; }

/* 体检卡 */
.grp2 { margin: 16px 0 4px; padding: 7px 10px; border-radius: 6px; background: #eef6f1;
  border-left: 3px solid var(--green); font-size: 13.5px; font-weight: 700; color: #14302a; }
.grp2 small { font-weight: 400; color: #6b8b7e; font-size: 11px; margin-left: 6px; }
.rpt-link { display: inline-block; margin: 8px 0 2px; padding: 6px 14px; border-radius: 6px;
  background: #e0f2fe; color: #0369a1; font-size: 12px; text-decoration: none; }
.rpt-link:hover { background: #bae6fd; }
.note { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.ai-note { font-size: 12px; color: #b45309; margin: 6px 0 2px; }
.demo-note { font-size: 11px; color: #94a3b8; margin-top: 14px; padding-top: 8px; border-top: 1px solid #eee; }
.thumbs .cap { font-size: 11px; color: #94a3b8; text-align: center; margin-top: 2px; }
.field-report-source { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px;
  padding: 8px 10px; border: 1px solid #b9d8cb; border-radius: 6px; background: #f1f8f5; }
.field-report-source b { flex: none; color: #176149; font-size: 12px; }
.field-report-source span { color: #60756c; font-size: 10px; text-align: right; }
.field-report-summary { margin: 10px 0 8px; padding: 9px 10px; border-left: 3px solid #d49b17;
  background: #fff8e7; color: #6b4c08; font-size: 12px; line-height: 1.55; }
.field-report-table { table-layout: fixed; font-size: 10.5px; }
.field-report-table th, .field-report-table td { padding: 4px; word-break: break-word; vertical-align: top; }
.field-report-table th:nth-child(1) { width: 17%; }
.field-report-table th:nth-child(2) { width: 11%; }
.field-report-table th:nth-child(3) { width: 22%; }
.field-report-table th:nth-child(4) { width: 23%; }
.field-report-table th:nth-child(5) { width: 27%; }
.field-report-images { margin-top: 9px; }
.field-report-images a { width: calc(50% - 4px); }
.field-report-images .thumb { width: 100%; height: 108px; }
.field-report-images .cap { line-height: 1.35; overflow-wrap: anywhere; }
.field-report-single a { width: 100%; }
.field-report-single .thumb { height: 168px; object-fit: contain; background: #f3f6f4; }
.field-report-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field-report-compare a { min-width: 0; text-decoration: none; }
.field-report-compare a > span { display: block; margin-bottom: 4px; color: #176149; font-size: 11px; font-weight: 700; text-align: center; }
.field-report-compare .thumb { width: 100%; height: 112px; object-fit: cover; }
.field-report-compare .cap { margin-top: 3px; color: #7c8a84; font-size: 10px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
/* 民意问卷 */
.qn-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 10px; }
.qn-context { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.qn-context span { flex: none; padding: 2px 7px; border-radius: 4px; background: #e8f3ef; color: #176149; font-size: 11px; }
.qn-context strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1f2937; }
.qn-actions { display: flex; align-items: center; }
.qn-export { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border: 1px solid #b9d8cb;
  border-radius: 6px; background: #f1f8f5; color: #176149; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.qn-export:hover:not(:disabled) { border-color: #75ad96; background: #e5f2ed; }
.qn-export:disabled { cursor: wait; opacity: .65; }
.qn-export span { font-size: 16px; line-height: 1; }
.qn-status { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; padding: 9px 10px;
  border-left: 3px solid #d69e2e; background: #fff9e8; color: #72520c; font-size: 11px; line-height: 1.5; }
.qn-status b { font-size: 12px; }
.qn-overall { padding: 12px; border: 1px solid #dce7e2; border-radius: 6px; background: #f7faf8; }
.qn-overall-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; font-size: 12px; color: #374151; }
.qn-overall-head span { line-height: 1.45; }
.qn-overall-head em { flex: none; color: #75817c; font-size: 10px; font-style: normal; }
.qn-overall-score { display: flex; align-items: baseline; gap: 4px; margin: 8px 0 6px; }
.qn-overall-score b { font-size: 27px; line-height: 1; color: #176149; }
.qn-overall-score span { color: #7b8581; font-size: 12px; }
.qn-summary { margin: 12px 0 14px; padding: 10px 0; border-top: 1px solid #edf0ef; border-bottom: 1px solid #edf0ef; }
.qn-summary h4 { margin: 0 0 5px; color: #1f4639; font-size: 13px; }
.qn-summary p { margin: 0; color: #5c6863; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.qn-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 12px 0 7px; }
.qn-section-title b { color: #1f2937; font-size: 13px; }
.qn-section-title span { color: #929b97; font-size: 9px; }
.qn-category { margin-bottom: 9px; border: 1px solid #e3e9e6; border-radius: 6px; overflow: hidden; }
.qn-category-head { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 0 10px;
  background: #f3f7f5; border-bottom: 1px solid #e8edeb; }
.qn-category-head b { color: #244c3e; font-size: 12.5px; }
.qn-category-head span, .qn-item-score b { color: #176149; font-size: 11px; font-weight: 600; }
.qn-category-head .pending, .qn-item-score .pending { color: #9aa29f; font-weight: 400; }
.qn-item { padding: 8px 10px; border-bottom: 1px solid #f0f2f1; }
.qn-item:last-child { border-bottom: 0; }
.qn-item-copy { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; color: #46514d; font-size: 11.5px; line-height: 1.5; }
.qn-item-copy span { min-width: 0; overflow-wrap: anywhere; }
.qn-item-copy em { flex: none; color: #9aa29f; font-size: 9px; font-style: normal; }
.qn-item-score { display: flex; justify-content: flex-end; margin-top: 4px; }
.qn-item-score b { text-align: right; white-space: nowrap; }
.qn-loading { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 150px; color: #65736d; font-size: 12px; }
.qn-loading i { width: 18px; height: 18px; border: 2px solid #dce7e2; border-top-color: #2f8a68; border-radius: 50%; animation: qn-spin .8s linear infinite; }
@keyframes qn-spin { to { transform: rotate(360deg); } }
/* 维度按钮条 */
.chain { font-size: 11.5px; color: #6b8b7e; margin: 8px 0 4px; }
.crumbs2 { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 11.5px; margin: 8px 0 10px; }
.crumbs2 .crumb { color: #0369a1; cursor: pointer; padding: 1px 4px; border-radius: 4px; }
.crumbs2 .crumb:hover { background: #e0f2fe; }
.crumbs2 .crumb.on { color: #14302a; font-weight: 700; cursor: default; }
.crumbs2 .crumb.on:hover { background: none; }
.crumbs2 i { color: #c0c8c4; font-style: normal; }
.dimbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; padding-bottom: 10px; border-bottom: 1px solid #eef0ee; }
.dim { padding: 6px 12px; border: 1px solid #d9e3de; background: #f7faf8; color: #2f5d4d;
  border-radius: 16px; font-size: 12.5px; cursor: pointer; }
.dim:hover { background: #eef6f1; }
.dim.on { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }
.cat-h { font-size: 12.5px; font-weight: 600; color: #14302a; margin: 10px 0 3px; }
.tbl td.todo { text-align: right; color: #b0b8b4; }
.tbl td.indi-value { min-width: 145px; text-align: right; }
.indi-value b { display: block; color: #1f4639; font-size: 12px; }
.indi-value small { display: block; margin-top: 3px; color: #8b9691; font-size: 9px; font-weight: 400; white-space: normal; }
.indi-source { display: inline-block; padding: 1px 4px; border-radius: 3px; background: #e8f3ef; color: #176149; }
.indi-source.estimated { background: #fff4d6; color: #8a5a00; }

/* 图层控制·区划子项里的"(未画范围)"暗注 */
.lc-dim { color: #b0b8b4; font-style: normal; font-size: 11px; }

/* 面板改为弹性列布局：头部多高都行，内容区自适应剩余高度并滚动到底。
   双ID选择器提高优先级，覆盖主题CSS里 overflow:hidden 与写死的 calc(100%-58px)。 */
#panel#panel { display: flex; flex-direction: column; overflow: hidden; }
#panel#panel .panel-pad { flex: 1 1 0; min-height: 0; height: auto; overflow-y: auto; }
#panel#panel .panel-pad + .panel-pad { flex: 0 1 auto; max-height: 45%; }

/* 楼栋体检完整版本编辑：直接嵌入原右侧面板，不创建第二个详情面板。 */
.kv-value { color: inherit; font-weight: 400; }
.feature-editor-actions { position: absolute; top: 12px; right: 42px; display: flex; gap: 5px; }
.feature-editor-actions button { padding: 4px 8px; border: 1px solid #b9cbe0; border-radius: 5px; background: #fff; color: #245b99; font-size: 11px; cursor: pointer; }
.is-feature-editing [data-feature-editable] { cursor: text; }
.is-feature-editing [data-feature-editable]:hover { border-radius: 4px; background: rgba(36,104,238,.06); }
.is-feature-editing [data-feature-editable].is-inline-editing { min-width: 24px; padding: 2px 4px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 2px #2468ee; outline: 0; }
.feature-editor-add { width: 100%; margin-top: 10px; padding: 8px; border: 1px dashed #6e99e5; border-radius: 6px; background: #eef4ff; color: #2468ee; cursor: pointer; }
.feature-editor-add-inspection { margin: 10px 0; }
.feature-editor-add-row { margin: 5px 0 8px; padding: 5px 8px; }
.feature-editor-savebar { position: sticky; bottom: -16px; z-index: 4; display: grid; grid-template-columns: 1fr auto auto auto; gap: 7px; align-items: center; margin: 14px -16px -16px; padding: 11px 16px; border-top: 1px solid #d7e1ee; background: #fff; box-shadow: 0 -8px 18px rgba(31,51,75,.08); }
.feature-editor-savebar span { color: #75869a; font-size: 10px; }
.feature-editor-savebar button,.feature-editor-dialog-actions button { padding: 7px 11px; border: 1px solid #bdcde0; border-radius: 6px; background: #fff; color: #315273; cursor: pointer; }
.feature-editor-savebar .is-primary,.feature-editor-dialog-actions .is-primary { border-color: #2468ee; background: #2468ee; color: #fff; }
.feature-editor-savebar .is-danger { border-color: #e3a4a4; color: #b83232; }
.feature-editor-savebar button:disabled { cursor: not-allowed; opacity: .45; }
.feature-delete-control { display: none; align-items: center; margin-right: 6px; vertical-align: middle; cursor: pointer; }
.is-feature-delete-mode .feature-delete-control { display: inline-flex; }
.feature-editor-savebar [data-delete-selected] { display: none; }
.is-feature-delete-mode .feature-editor-savebar [data-delete-selected] { display: inline-block; }
.feature-delete-control input { width: 14px; height: 14px; margin: 0; accent-color: #d33b3b; cursor: pointer; }
.is-feature-editing .feature-edit-section:has(> .sec .feature-delete-control input:checked),
.is-feature-editing .kv > div:has(> .feature-delete-control input:checked),
.is-feature-editing tr:has(.feature-delete-control input:checked),
.is-feature-editing .field-report-source:has(> .feature-delete-control input:checked),
.is-feature-editing .field-report-summary:has(> .feature-delete-control input:checked),
.is-feature-editing .ai-note:has(> .feature-delete-control input:checked),
.is-feature-editing .grp2:has(> .feature-delete-control input:checked),
.is-feature-editing .note:has(> .feature-delete-control input:checked),
.is-feature-editing .demo-note:has(> .feature-delete-control input:checked) { outline: 1px solid #dc5656; background: #fff1f1; }
.feature-editor-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(20,34,51,.42); }
.feature-editor-dialog { width: min(430px,100%); max-height: min(680px,90vh); overflow-y: auto; padding: 20px; border-radius: 12px; background: #fff; box-shadow: 0 18px 55px rgba(15,28,45,.3); }
.feature-editor-dialog h3 { margin: 0 0 15px; color: #173452; font-size: 18px; }
.feature-editor-dialog label { display: grid; gap: 6px; margin-top: 12px; color: #526b84; font-size: 12px; }
.feature-editor-dialog input { width: 100%; padding: 9px 10px; border: 1px solid #bfcde0; border-radius: 6px; color: #17243a; font: inherit; outline: none; }
.feature-editor-dialog input:focus { border-color: #2468ee; box-shadow: 0 0 0 2px rgba(36,104,238,.14); }
.feature-editor-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.feature-history-dialog { width: min(560px,100%); }
.feature-history-list { display: grid; gap: 8px; }
.feature-history-list > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid #dce5ef; border-radius: 7px; }
.feature-history-list b,.feature-history-list span { grid-column: 1; }
.feature-history-list span { color: #74869a; font-size: 11px; line-height: 1.5; }
.feature-history-list button { grid-row: 1 / span 2; padding: 5px 8px; border: 1px solid #b9cbe0; border-radius: 5px; background: #fff; color: #245b99; cursor: pointer; }
.feature-version-preview { width: min(620px,100%); }
.feature-version-preview-content { padding: 4px 2px; color: #26384d; }
