/* 房产数据查询模块样式（复用 pc.css 设计令牌与布局骨架） */

/* ── 板块切换 ─────────────────────────────────────────── */
.house-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #f1f3f7;
  border-radius: 12px;
  margin-bottom: 16px;
}
.house-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft, #5b6678);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.house-tab:hover { color: #1c2433; }
.house-tab.is-active {
  background: #fff;
  color: #bd2e2e;
  box-shadow: 0 1px 4px rgba(23, 22, 20, 0.06);
}

/* ── 单栏页面骨架 ─────────────────────────────────── */
.house-page { max-width: var(--pcw-data); margin: 0 auto; }
.house-lead { font-size:13px;color:var(--ink-soft);line-height:1.7;margin:0 0 14px; }

.house-meta {
  display:flex; flex-wrap:wrap; gap:6px 18px; align-items:center;
  font-size:12.5px; color:var(--ink-soft,#5b6678);
  background:#f7f9fc; border:1px solid #e7ecf3; border-radius:10px;
  padding:9px 14px; margin-bottom:14px;
}
.house-meta b { color:#2a3650; font-weight:700; }
.house-meta__src { margin-left:auto; }

.house-dims {
  display:grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr));
  gap:10px; margin-bottom:18px;
}
.house-dim {
  background:#fff; border:1px solid #e7ecf3; border-left:3px solid #bd2e2e;
  border-radius:10px; padding:10px 13px;
}
.house-dim__k { display:block; font-size:13.5px; font-weight:700; color:#1c2433; margin-bottom:3px; }
.house-dim__d { display:block; font-size:12px; color:#5b6678; line-height:1.5; }

.house-mod__note { margin-bottom:12px; }
.house-sample {
  display:inline-block; font-size:12px; font-weight:600;
  color:#9a6b00; background:#fff5e0; border:1px solid #f3d99a;
  border-radius:999px; padding:2px 10px;
}

.house-foot {
  display:flex; flex-wrap:wrap; gap:8px; align-items:center;
  margin-top:26px; padding-top:16px; border-top:1px solid #eef1f6;
  font-size:13px; color:var(--ink-soft,#5b6678);
}
.house-foot a {
  color:#2a3650; text-decoration:none; background:#eef2f8;
  border-radius:999px; padding:4px 12px; transition:color .15s,background .15s;
}
.house-foot a:hover { color:#bd2e2e; background:#fbeee9; }

/* ── 模块容器（三个板块相互独立）────────────────────── */
.house-mod { display: block; }
.house-mod[hidden] { display: none !important; }

/* ── 筛选条 ─────────────────────────────────────────── */
.house-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
}
.house-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-soft, #5b6678);
}
.house-field select {
  appearance: none;
  min-width: 150px;
  padding: 9px 30px 9px 12px;
  border: 1px solid #d8dee8;
  border-radius: 9px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6678' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 10px center;
  font-size: 14px;
  color: #1c2433;
  cursor: pointer;
  font-family: inherit;
}
.house-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.house-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9aa6b8;
}
.house-search input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  font-size: 14px;
  color: #1c2433;
  background: #fff;
  font-family: inherit;
  box-sizing: border-box;
}
.house-search input:focus {
  outline: none;
  border-color: #bd2e2e;
  box-shadow: 0 0 0 3px rgba(222,74,61,.15);
}

/* ── KPI 汇总条 ─────────────────────────────────────── */
.house-mod__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.house-stat {
  background: var(--surface);
  border: 1px solid #f0d9d4;
  border-radius: 12px;
  padding: 12px 14px;
}
.house-stat__v {
  font-size: 20px;
  font-weight: 800;
  color: #bd2e2e;
  line-height: 1.2;
}
.house-stat__l {
  font-size: 12px;
  color: var(--ink-soft, #5b6678);
  margin-top: 3px;
}

/* ── 图表区 ─────────────────────────────────────────── */
.house-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.chart-card {
  background: #fff;
  border: 1px solid #e7ecf3;
  border-radius: 12px;
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
}
.chart-card__h {
  font-size: 13px;
  font-weight: 700;
  color: #354056;
  margin-bottom: 6px;
  padding-left: 2px;
}
.chart-card__canvas {
  width: 100%;
  min-height: 280px;
}
.chart-card__canvas[data-chart="pie"] { min-height: 300px; }

/* SVG 图表内部样式 */
.chart-svg { display: block; width: 100%; height: auto; }
.chart-grid { stroke: #eef1f6; stroke-width: 1; }
.chart-axis { fill: #8a94a6; font-size: 11px; }
.chart-cat { fill: #5b6678; font-size: 11px; }
.chart-axis-line { stroke: #d8dee8; stroke-width: 1; }
.chart-legend { fill: #5b6678; font-size: 11px; }
.chart-donut-v { fill: #bd2e2e; font-size: 16px; font-weight: 800; }
.chart-donut-l { fill: #8a94a6; font-size: 11px; }
.chart-empty {
  display: flex; align-items: center; justify-content: center;
  height: 200px; color: #9aa6b8; font-size: 13px;
}
.chart-tip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  background: rgba(28,36,51,.94);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(23, 22, 20, 0.08);
  max-width: 220px;
}
.chart-legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 6px;
  padding: 0 4px 4px;
}
.chart-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #5b6678; }
.chart-legend-item .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-legend-item .val { color: #2a3650; font-weight: 600; }
.chart-bar-val { fill: #354056; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── 数据卡片网格 ───────────────────────────────────── */
.house-mod__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.hcard {
  background: #fff;
  border: 1px solid #e7ecf3;
  border-radius: 12px;
  padding: 14px;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.hcard:hover {
  box-shadow: 0 4px 12px rgba(23, 22, 20, 0.08);
  border-color: #f0d9d4;
  transform: translateY(-2px);
}
.hcard__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.hcard__title {
  font-size: 15px;
  font-weight: 700;
  color: #15233b;
  line-height: 1.35;
}
.hcard__loc {
  flex: none;
  font-size: 11.5px;
  color: #bd2e2e;
  background: #fbeee9;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.hcard__date {
  font-size: 12px;
  color: #9aa6b8;
  margin: 5px 0 10px;
}
.hcard__metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.hmetric {
  background: #fafbfe;
  border: 1px solid #eef1f6;
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}
.hmetric__v {
  font-size: 16px;
  font-weight: 800;
  color: #1c2433;
  font-variant-numeric: tabular-nums;
}
.hmetric__l {
  font-size: 11.5px;
  color: #8a94a6;
  margin-top: 2px;
}
.hcard__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.hchip {
  font-size: 12px;
  color: #4a5b75;
  background: #eef2f8;
  border-radius: 999px;
  padding: 3px 10px;
}

/* ── 空态 ───────────────────────────────────────────── */
.house-empty {
  grid-column: 1 / -1;
  padding: 48px 20px;
  text-align: center;
  color: var(--ink-soft, #5b6678);
}
.house-empty svg { width: 40px; height: 40px; opacity: .35; margin-bottom: 8px; }
.house-empty p { margin: 6px 0 2px; font-weight: 600; color: #2a3650; }
.house-empty span { font-size: 12.5px; }

/* ── 分页 ───────────────────────────────────────────── */
.house-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-soft, #5b6678);
}
.house-pager button {
  appearance: none;
  border: 1px solid #d8dee8;
  background: #fff;
  border-radius: 8px;
  padding: 6px 11px;
  cursor: pointer;
  font-family: inherit;
  color: #2a3650;
}
.house-pager button:hover:not(:disabled) { border-color: #bd2e2e; color: #bd2e2e; }
.house-pager button:disabled { opacity: .45; cursor: not-allowed; }
.house-pager .is-active {
  background: #bd2e2e;
  border-color: #bd2e2e;
  color: #fff;
}
.house-pager .ell { padding: 0 4px; }
.house-pager .pager__info { margin-left: auto; }

/* ── 响应式 ─────────────────────────────────────────── */
@media (max-width: 980px) {
  .house-charts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .house-charts { grid-template-columns: 1fr; }
  .house-mod__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .house-filters { flex-direction: column; align-items: stretch; }
  .house-field select { width: 100%; }
  .house-search { min-width: 0; }
  .hcard__metrics { grid-template-columns: 1fr 1fr; }
}
