/* ===== 指标总览面板（右侧工具条 Σ 打开，街道 → 社区 → 小区 → 楼栋） ===== */
#indicatorPanel {
  position: absolute; left: calc(var(--sb) + clamp(8px, 1.5vw, 24px)); right: clamp(8px, 1.5vw, 24px);
  top: 58px; bottom: 46px; z-index: 24; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid rgba(31, 70, 57, .14); border-radius: 8px;
  box-shadow: 0 18px 52px rgba(15, 23, 42, .24); transition: left .25s;
}
#indicatorPanel.hidden { display: none; }

.io-head { display: flex; align-items: center; gap: 11px; min-height: 62px; padding: 0 18px;
  border-bottom: 1px solid #e6ebe8; background: #f8faf9; }
.io-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px;
  background: #176149; color: #fff; font-size: 18px; font-weight: 700; line-height: 1; }
.io-title { display: flex; flex-direction: column; gap: 2px; }
.io-title b { color: #1f2937; font-size: 16px; }
.io-title span { color: #7b8581; font-size: 11px; }
#ioClose { margin-left: auto; width: 34px; height: 34px; border: 1px solid transparent; border-radius: 5px;
  background: transparent; color: #65716c; font-size: 22px; line-height: 30px; cursor: pointer; }
#ioClose:hover { border-color: #d8e2dd; background: #edf4f1; color: #1f4639; }

.io-filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 10px 18px;
  border-bottom: 1px solid #e4e9e7; background: #fbfcfb; font-size: 12px; color: #66716c; }
.io-filters select, .io-filters input, .io-filters button { min-height: 32px; border: 1px solid #e5e7eb;
  border-radius: 6px; padding: 5px 10px; font-size: 12px; background: #fff; color: #234; outline: none; }
.io-filters button { cursor: pointer; background: #f6faf8; border-color: #d6e3dc; }
.io-filters button:hover { background: #eef6f1; }
#ioSearch { flex: 1; min-width: 200px; }
.io-meta { margin-left: auto; color: #8a938f; }

.io-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid #edf0ef; background: #fcfdfc; }
.io-card { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid #e8eeeb;
  border-radius: 7px; background: #fff; min-width: 0; }
.io-card > span { color: #7b8581; font-size: 11px; }
.io-card strong { color: #12503b; font-size: 19px; line-height: 1.2; }
.io-card small { color: #93a09a; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; }
.io-card-wide { grid-column: 1 / -1; }
.io-dims { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.io-dims i { padding: 1px 6px; border-radius: 10px; background: #eef5f1; color: #3d6553; font-size: 10.5px; font-style: normal; }
.io-dims b { color: #176149; }

/* 报告口径的综合诊断条：结论/分级/问题台账/更新成效，与实时指标分开呈现 */
.io-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 18px;
  border-bottom: 1px solid #edf0ef; background: #fbfdfc; font-size: 11px; color: #5a6b62; }
.io-verdict.hidden { display: none; }
.io-vt { padding: 2px 9px; border-radius: 11px; background: #eef5f1; color: #1c5c42; white-space: nowrap; }
.io-vt b { color: #12503b; }
.io-vt.grade-good { background: #e4f3ea; }
.io-vt.grade-mid { background: #fdf3e2; color: #8a5c14; }
.io-vt.grade-mid b { color: #8a5c14; }
.io-vt.grade-weak { background: #fdeceb; color: #8f3730; }
.io-vt.grade-weak b { color: #8f3730; }
.io-vt.ledger { background: #eef1f7; color: #3d4a63; }
.io-vt.ledger b { color: #26324a; }
.io-vt.effect { background: #f5f0fb; color: #57407c; }
.io-vt.effect b { color: #41296b; }

.io-body { flex: 1; min-height: 0; overflow: auto; }
.io-tbl { border-collapse: collapse; width: 100%; font-size: 12px; white-space: nowrap; }
.io-tbl th, .io-tbl td { padding: 8px 10px; border-bottom: 1px solid #eef2f0; text-align: left; }
.io-tbl th { position: sticky; top: 0; z-index: 2; background: #edf3f0; color: #2f4b40;
  font-weight: 600; font-size: 11.5px; }
.io-tbl th.num, .io-tbl td.num { text-align: right; }
.io-tbl tbody tr.street { background: #f4f9f6; }
.io-tbl tbody tr.street:hover { background: #e8f3ec; }
.io-tbl tbody tr.city { background: #eaf4ee; font-weight: 600; }
.io-tbl tbody tr.city:hover { background: #e0efe6; }
.io-tbl tbody tr.city td { color: #22423a; }
.io-tbl tbody tr.community:hover, .io-tbl tbody tr.building:hover { background: #f3f8f5; }
.io-tbl tbody tr.building td { color: #55605b; }

.io-name { display: flex; align-items: center; gap: 7px; min-width: 260px; }
.io-name small { color: #98a29d; font-size: 10.5px; }
.io-caret { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border: none;
  background: transparent; color: #5c6b64; cursor: pointer; font-size: 11px; transition: transform .15s; }
.io-caret.open { transform: rotate(90deg); }
.io-caret.dot { cursor: default; }
.io-caret.dot::before { content: "·"; color: #c3ccc8; }
.io-lv { flex: none; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-style: normal; }
.io-lv.lv1 { background: #cfe9d8; color: #14513a; }
.io-lv.lv2 { background: #dcefe2; color: #1c5c42; }
.io-lv.lv3 { background: #e6f0fa; color: #1e4f7a; }
.io-lv.lv4 { background: #f1f1f4; color: #5a5f6a; }
.io-title-text { font-weight: 600; color: #22322b; }
tr.community .io-title-text { font-weight: 500; }
tr.building .io-title-text { font-weight: 400; }
.io-nodata { color: #b6bfba; }

.io-ind-btn { min-width: 30px; padding: 2px 7px; border: 1px solid #cfe0d7; border-radius: 11px;
  background: #f2faf5; color: #176149; font-size: 11.5px; cursor: pointer; }
.io-ind-btn:hover { background: #e2f3e8; }
.io-ind-btn.on { background: #176149; border-color: #176149; color: #fff; }

.io-detail td { background: #fbfdfc; padding: 10px 16px 12px; white-space: normal; }
.io-detail-scroll { max-height: 180px; overflow: auto; padding-right: 4px; }
.io-detail-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.io-detail-group b { color: #4a5a52; font-size: 11px; margin-right: 4px; }
.io-detail-extra { margin-top: 6px; }
.io-detail-extra summary { cursor: pointer; color: #176149; font-size: 11.5px; font-weight: 600; margin-bottom: 5px; }
.io-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px; border-radius: 12px;
  background: #eef5f1; color: #33564a; font-size: 11px; }
.io-chip i { color: #7d8f87; font-style: normal; }
.io-chip u { color: #8aa0a8; font-size: 10px; text-decoration: none; }
.io-chip strong { color: #12503b; }

.io-dictwrap { border-top: 1px solid #edf0ef; background: #fbfcfb; max-height: 38%; overflow: auto; }
.io-dict { padding: 8px 18px 12px; font-size: 11.5px; color: #4a5a52; }
.io-dict summary { cursor: pointer; color: #176149; font-weight: 600; padding: 4px 0; }
.io-dict-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* 指标结果表：每个维度一段，指标行可点开看依据与街道分解 */
.io-dimsec { margin-top: 8px; }
.io-dimsec > b { display: block; padding: 3px 0; color: #3d6553; font-size: 11.5px; }
.io-ind { border-bottom: 1px dashed #e9efec; }
.io-ind > summary { display: flex; align-items: baseline; gap: 7px; padding: 3px 2px; cursor: pointer; list-style: none; }
.io-ind > summary::-webkit-details-marker { display: none; }
.io-ind > summary:hover { background: #f2f8f4; }
.io-ind i { min-width: 30px; color: #8b9a93; font-style: normal; }
.io-ind em { flex: 1; color: #33564a; font-style: normal; }
.io-ind strong { color: #12503b; font-weight: 600; }
.io-ind p { margin: 2px 0 7px 37px; color: #7b8581; line-height: 1.6; }
.io-ind p.io-split { color: #3f6a8a; }

/* 短板弱项 / 重点片区：紧凑表格 */
.io-mini { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 11px; }
.io-mini th, .io-mini td { padding: 5px 8px; border-bottom: 1px solid #eef2f0; text-align: left; vertical-align: top; }
.io-mini th { background: #f1f6f3; color: #2f4b40; font-weight: 600; white-space: nowrap; }
.io-mini tbody tr:hover { background: #f7fbf9; }
.io-mini td.io-metric { color: #8a5c14; }

.rail-indicator { font-weight: 700; }
body:has(#indicatorPanel:not(.hidden)) #rightRail [data-act="indicatorOverview"] {
  background: #176149; color: #fff; border-color: #176149;
}

@media (max-width: 1200px) {
  .io-cards { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
@media (max-width: 760px) {
  #indicatorPanel { left: 6px; right: 6px; top: 8px; bottom: 8px; border-radius: 6px; }
  .io-cards { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}
