/* population_dash.css — 인구·가구현황 대시보드 (population_dash.js) 전용. 2026-09-15.
   반응형: 720px 이하(휴대폰)에서 필터·카드·그래프가 한 열로 쌓인다. */
#pop-dash { --dash-sel: #2a78d6; --dash-sel-soft: #dbe7f8; --dash-bar: #b9bcc2; --dash-prev: #e3e5e9; --dash-good: #1f8a5b; --dash-bad: #c9403f; }
.dash-filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 12px 0 14px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.dash-filter { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.dash-label { font-size: 11.5px; color: var(--ink-3); font-weight: 700; letter-spacing: .02em; }
.dash-radio { font-size: 13px; margin-right: 4px; white-space: nowrap; }
.dash-reset { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12px; font-family: inherit; cursor: pointer; color: var(--ink-2); }
.dash-ms { position: relative; }
.dash-ms-btn { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-family: inherit; cursor: pointer; display: flex; gap: 6px; align-items: center; max-width: 260px; }
.dash-ms-btn b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-caret { color: var(--ink-3); font-size: 11px; }
.dash-ms-panel { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px; min-width: 220px; max-width: 320px; }
.dash-ms-search { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 13px; font-family: inherit; margin-bottom: 6px; }
.dash-ms-tools { display: flex; gap: 6px; margin-bottom: 6px; }
.dash-ms-tools button { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 11.5px; font-family: inherit; cursor: pointer; }
.dash-ms-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; }
.dash-ms-item { display: flex; align-items: center; gap: 4px; padding: 4px 4px; font-size: 13px; cursor: pointer; border-radius: 6px; }
.dash-ms-item:hover { background: var(--surface); }
.dash-cards { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }
.dash-card-group { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.dash-card-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.dash-card-period { font-weight: 400; color: var(--ink-3); font-size: 12px; margin-left: 6px; }
.dash-card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.dash-card { background: #fff; border-radius: 8px; padding: 10px 12px; border: 1px solid var(--line); }
.dash-card .l { font-size: 12px; color: var(--ink-3); }
.dash-card .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.dash-card .s { font-size: 11.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.dash-unit { font-size: .6em; color: var(--ink-3); margin-left: 2px; font-weight: 500; }
.dash-rank { background: var(--surface); border-radius: 99px; padding: 0 7px; }
.dash-delta.good { color: var(--dash-good); } .dash-delta.bad { color: var(--dash-bad); }
.dash-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 10px; }
.dash-views { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dash-views button { background: #fff; border: none; padding: 7px 16px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; color: var(--ink-2); }
.dash-views button.active { background: var(--dash-sel); color: #fff; }
.dash-subviews { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dash-subviews button { background: none; border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 12.5px; font-family: inherit; cursor: pointer; color: var(--ink-2); }
.dash-subviews button.active { border-color: var(--dash-sel); color: var(--dash-sel); font-weight: 700; background: var(--dash-sel-soft); }
.dash-check { font-size: 12.5px; color: var(--ink-2); margin-left: 6px; }
.dash-status { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.dash-table th, .dash-table td { white-space: nowrap; }
.dash-table .dash-th-metric { text-align: center; border-bottom: 1px solid var(--line); }
.dash-table .dash-th-sort { cursor: pointer; }
.dash-table tr.dash-hl td { font-weight: 700; }
.dash-table tbody tr { cursor: pointer; }
.dash-table td.dash-primary { font-weight: 600; }
.dash-table .dash-td-region { font-weight: 700; vertical-align: top; }
.dash-sub { font-size: 11px; color: var(--ink-3); margin-left: 4px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; }
.dash-fig { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 8px; min-width: 0; }
.dash-fig-wide { grid-column: 1 / -1; }
.dash-fig .t { font-weight: 700; font-size: 14px; }
.dash-fig .st { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.dash-fig svg { width: 100%; height: auto; display: block; font-family: inherit; }
.dash-fig .axis { stroke: var(--line); stroke-width: 1; }
.dash-fig .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.dash-fig .lbl { fill: var(--ink-2); font-size: 11.5px; } .dash-fig .lbl.sel { fill: var(--ink); font-weight: 700; }
.dash-fig .val { fill: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.dash-fig .bar { fill: var(--dash-bar); } .dash-fig .bar-sel { fill: var(--dash-sel); } .dash-fig .bar-prev { fill: var(--dash-prev); }
.dash-fig .dot { fill: var(--dash-bar); fill-opacity: .8; stroke: #fff; stroke-width: 1.5; } .dash-fig .dot-sel { fill: var(--dash-sel); fill-opacity: .9; stroke: #fff; stroke-width: 1.5; }
.dash-legend, .dash-map-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-2); margin-top: 6px; align-items: center; }
.dash-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--sw); }
.dash-scatter-ctl { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.dash-scatter-ctl select { border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 13px; font-family: inherit; }
/* 지도: 5단계 단일 색상(청색) — 진할수록 큼 */
.map-area { stroke: #6b7280; stroke-width: .7; }   /* 경계는 모두 같은 선·굵기(2026-09-17) */
.map-q0 { fill: #dbe7f8; } .map-q1 { fill: #b3cdf0; } .map-q2 { fill: #7fa9e3; } .map-q3 { fill: #4a85d6; } .map-q4 { fill: #1f5fb8; } .map-na { fill: #e8e8e8; }
.map-labelbox { fill-opacity: .3; stroke: #fff; stroke-width: .5; }
.dash-total td { background: #f3f6fb; }
.map-label { fill: #1d2126; font-size: 10.5px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.dash-map-legend span { display: inline-block; width: 22px; height: 12px; border-radius: 2px; }
.dash-map-legend em { font-style: normal; font-size: 11px; font-variant-numeric: tabular-nums; }
.tip { position: fixed; pointer-events: none; background: #1d2126; color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 6px; z-index: 50; white-space: pre; font-variant-numeric: tabular-nums; }
.dash-h3 { font-size: 14px; font-weight: 700; margin: 16px 0 8px; }
/* 지표설명 탭 */
.glossary-table td { white-space: normal; vertical-align: top; }
.glossary-table td:first-child { white-space: nowrap; font-weight: 700; }
.glossary-table code { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 12px; }
.glossary-q { color: var(--ink-2); font-size: 12.5px; }
@media (max-width: 720px) {
  .dash-filters { gap: 6px; padding: 8px; }
  .dash-ms-btn { max-width: 100%; font-size: 12.5px; padding: 6px 8px; }
  .dash-ms-panel { position: fixed; left: 12px; right: 12px; top: auto; max-width: none; }
  .dash-reset { margin-left: 0; }
  .dash-card-row { grid-template-columns: repeat(2, 1fr); }
  .dash-card .v { font-size: 19px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-views button { padding: 7px 12px; }
  .dash-status { margin-left: 0; width: 100%; }
  .pop-tabs { overflow-x: auto; white-space: nowrap; }
}

/* 2026-09-16 — 필터는 고르기만 하고 [조회]를 눌러야 반영(사용자 요청). 바뀐 뒤 아직 조회 전이면 버튼이 강조된다. */
.dash-apply { margin-left: auto; background: var(--brand, #2a78d6); color: #fff; border: 1px solid transparent; border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; }
.dash-apply.pending { box-shadow: 0 0 0 3px rgba(42, 120, 214, 0.25); animation: dash-pulse 1.2s ease-in-out infinite; }
@keyframes dash-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(42, 120, 214, 0.25); } 50% { box-shadow: 0 0 0 6px rgba(42, 120, 214, 0.08); } }
.dash-apply + .dash-reset { margin-left: 0; }
.dash-table th.dash-th-metric, .dash-table th.dash-th-sort, .pop-table th.dash-sortable { cursor: pointer; }
.dash-table th.dash-th-metric:hover, .pop-table th.dash-sortable:hover { text-decoration: underline; }

/* 2026-09-16 — "경북 경제지표" 탭(biz_econ.js): 보고서 장·절 제목, 개조식 본문, 3막대 카드, 목차 */
.econ-bar { align-items: center; gap: 12px; flex-wrap: wrap; }
.econ-bar select { font-family: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
.econ-bar .dash-apply { text-decoration: none; }
.econ-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 14px; font-size: 13px; }
.econ-toc a { color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.econ-chapter { margin: 28px 0 10px; padding: 8px 14px; background: #dce6f2; border-bottom: 3px solid #1f3864; color: #1f3864; font-size: 18px; border-radius: 6px 6px 0 0; }
.econ-section { margin: 18px 0 8px; font-size: 15px; border-bottom: 1px solid #bfbfbf; padding-bottom: 4px; }
.econ-secno { display: inline-block; min-width: 22px; text-align: center; background: #1f3864; color: #fff; border-radius: 4px; font-size: 13px; padding: 1px 6px; margin-right: 6px; }
.econ-bullets p { margin: 4px 0; line-height: 1.55; }
.econ-bullets .econ-b1 { font-weight: 700; padding-left: 1.2em; text-indent: -1.2em; }
.econ-bullets .econ-b2 { padding-left: 2.6em; text-indent: -1.2em; }
.econ-bullets .econ-b3 { padding-left: 3.8em; text-indent: -1em; }
.econ-bullets .econ-note { padding-left: 4.4em; text-indent: -0.9em; font-size: 12.5px; color: var(--ink-2); }
.econ-bullets .econ-arrow { padding-left: 1.2em; text-indent: -1.2em; color: #1f3864; font-weight: 700; }
.econ-cap { font-weight: 700; font-size: 13px; margin: 12px 0 4px; }
.econ-cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.econ-c3 { border: 1px solid #d7ebeb; background: #f5fafa; border-radius: 10px; padding: 10px 12px; }
.econ-c3 .l { font-size: 13px; font-weight: 700; } .econ-c3 .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; } .econ-c3 .s { font-size: 12px; color: var(--ink-2); }
.econ-c3 .up { color: #e15f1e; } .econ-c3 .down { color: #286edc; }
.econ-chap { margin-top: 18px; }
.econ-chap > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.econ-chap > summary::-webkit-details-marker { display: none; }
.econ-toggle { font-size: 12px; font-weight: 400; color: var(--ink-2); }
.econ-chap-body { padding: 4px 0 8px; }
.econ-cap { font-weight: 400; }
.dash-fig .map-label { font-size: 10px; paint-order: stroke; stroke: #fff; stroke-width: 3px; fill: var(--ink); }
.dash-fig .map-label.sel { font-weight: 700; }
.dash-fig .map-value { font-size: 9.5px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }

/* 2026-09-17 — 표·차트·지도를 보기 전환 없이 세로로 이어 붙임 */
.dash-block { margin: 18px 0 6px; }
.dash-block-title { margin: 14px 0 8px; padding-bottom: 4px; border-bottom: 2px solid #1f3864; color: #1f3864; font-size: 15px; }

.map-inset { fill: #fff; stroke: #1f3864; stroke-width: 1.2; stroke-dasharray: 4 3; }
.map-inset-cap { font-size: 10px; fill: #555; }
.dash-block > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.dash-block > summary::-webkit-details-marker { display: none; }

.map-far-dot { fill: #1f3864; }

.bar.map-q0, .bar.map-q1, .bar.map-q2, .bar.map-q3, .bar.map-q4 { stroke: none; }

.bar-nation { fill: #8c9096; }

.dash-pct td { font-size: 11.5px; color: var(--ink-2); border-top: none; padding-top: 0; }

.dash-selection { margin: 2px 0 8px; font-size: 12.5px; color: #1f3864; background: #eef3fb; border-left: 3px solid #1f3864; padding: 4px 8px; }

/* 지도 범례 색 상자(HTML span 은 fill 이 아니라 background) — 2026-09-18 */
.dash-map-legend span.map-q0 { background: #dbe7f8; } .dash-map-legend span.map-q1 { background: #b3cdf0; } .dash-map-legend span.map-q2 { background: #7fa9e3; } .dash-map-legend span.map-q3 { background: #4a85d6; } .dash-map-legend span.map-q4 { background: #1f5fb8; }
.dash-map-legend { align-items: center; } .dash-map-legend em { margin-right: 6px; }

/* 지역 비교 막대: 값 5분위 색이 .bar 기본색에 덮이지 않게(2026-09-18) */
.dash-fig rect.bar.map-q0 { fill: #dbe7f8; } .dash-fig rect.bar.map-q1 { fill: #b3cdf0; } .dash-fig rect.bar.map-q2 { fill: #7fa9e3; } .dash-fig rect.bar.map-q3 { fill: #4a85d6; } .dash-fig rect.bar.map-q4 { fill: #1f5fb8; }
.dash-fig rect.bar-prev { fill: #e4e8ee; }
