/* heritage.css —— 文物历史建筑模块（房源管理 › 文物历史建筑）
 * Apple 风格：浅蓝底、浅色填充、1px 发丝线、#0071e3、胶囊圆角、轻阴影、SF/PingFang 字体栈。
 */
.ht-filterbar { background: #f5f8fc; border: 1px solid #e3e9f0; border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.ht-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ht-fb-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; width: 100%; }
.ht-fb-row label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #6b7280; font-weight: 600; }
.ht-fb-row input, .ht-fb-row select {
  min-width: 150px; height: 34px; padding: 0 11px; font-size: 13px; color: #1d2939;
  background: #fff; border: 1px solid #dce3ec; border-radius: 9px; outline: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.ht-fb-row input:focus, .ht-fb-row select:focus { border-color: #0071e3; box-shadow: 0 0 0 3px rgba(0,113,227,.12); }
.ht-fb-row input[type="search"] { min-width: 240px; }
/* 服务管家 63 项姓名长短不一，原生 select 会被最长名撑到 ~370px 把查询/重置挤到下一行；固定宽度收小 */
.ht-fb-row .ht-fb-manager select { width: 140px; min-width: 0; }
/* 查询/重置与筛选项同处一行（flex-wrap 下不独占新行） */
.ht-fb-row > .btn-primary, .ht-fb-row > .btn-secondary { flex: 0 0 auto; }
.ht-total { margin-left: auto; align-self: center; font-size: 13px; color: #6b7280; font-weight: 600; }
.ht-filter .btn-primary, .ht-filter .btn-secondary { height: 34px; padding: 0 16px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ht-filter .btn-primary { background: #0071e3; color: #fff; border: 1px solid #0071e3; }
.ht-filter .btn-primary:hover { background: #0062c4; }
.ht-filter .btn-secondary { background: #fff; color: #1d2939; border: 1px solid #dce3ec; }

.ht-table-wrap { overflow-x: auto; border: 1px solid #e3e9f0; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.ht-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ht-table th { background: #f0f5fb; color: #33475b; font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid #dce3ec; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.ht-table td { padding: 9px 12px; border-bottom: 1px solid #eef2f7; color: #1d2939; vertical-align: top; }
.ht-table tbody tr:last-child td { border-bottom: none; }
.ht-table tbody tr { cursor: pointer; transition: background .12s; }
.ht-table tbody tr:hover { background: rgba(0,113,227,.05); }
.ht-code { font-variant-numeric: tabular-nums; color: #33475b; font-weight: 600; white-space: nowrap; }
.ht-lv { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(0,113,227,.1); color: #0071e3; }
.ht-muted { color: #98a2b3; }
.btn-link { background: none; border: none; color: #0071e3; font-size: 13px; font-weight: 600; cursor: pointer; padding: 2px 4px; }
.btn-link:hover { text-decoration: underline; }
.ht-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; font-size: 13px; color: #6b7280; }
.ht-pager .btn-secondary { padding: 6px 14px; border-radius: 9px; border: 1px solid #dce3ec; background: #fff; cursor: pointer; color: #1d2939; }
.ht-pager .btn-secondary:disabled { opacity: .45; cursor: default; }
.ht-empty { padding: 40px 16px; text-align: center; color: #98a2b3; font-size: 14px; }
.ht-loading { padding: 40px 16px; text-align: center; color: #98a2b3; font-size: 13px; }
.ht-flash { padding: 10px 14px; margin-bottom: 12px; border-radius: 10px; background: rgba(0,113,227,.08); color: #0071e3; font-size: 13px; }
.ht-flash-err { background: rgba(216,57,51,.08); color: #d83a34; }

/* 详情窗口三块 */
.ht-d-sec-title { font-size: 15px; font-weight: 600; color: #1f3a5f; margin: 6px 0 12px; }
.ht-d-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 14px; margin-bottom: 14px; background: #f5f8fc; border: 1px solid #e3e9f0; border-radius: 10px; font-size: 13px; color: #475467; }
.ht-d-meta b { color: #1d2939; font-weight: 600; }
.ht-d-hint { margin: -4px 0 12px; font-size: 12px; color: #0071e3; }
/* 两级巡查照片：栋级条 + 套级双按钮 */
.ht-photo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin: -2px 0 14px; background: #f5f8fc; border: 1px solid #e3e9f0; border-radius: 10px; }
.ht-photo-bar-label { font-size: 13px; font-weight: 600; color: #33475b; }
.ht-photo-btn { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid #dce3ec; background: #fff; color: #0071e3; }
.ht-photo-btn.has { background: rgba(0,113,227,.1); border-color: #b9d6f7; }
.ht-photo-upl { padding: 6px 12px; border-radius: 999px; font-size: 12px; cursor: pointer; border: 1px dashed #b9d6f7; background: transparent; color: #0071e3; }
.ht-photo-cell { white-space: nowrap; }
.ht-photo-mini { display: inline-block; margin: 2px 4px 2px 0; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid #dce3ec; background: #fff; color: #667085; }
.ht-photo-mini.has { color: #0071e3; border-color: #b9d6f7; background: rgba(0,113,227,.07); }
.ht-photo-mini:disabled { opacity: .4; cursor: default; }
/* 台账房屋状态=空置：安全二协议入口不出，原位仅显示不可点的“空置”占位 */
.ht-photo-mini.is-vacant { cursor: default; color: #98a2b3; border-color: #e4e9f0; background: #f5f7fa; }
.ht-up { display: flex; flex-direction: column; gap: 12px; }
.ht-up-file { font-size: 13px; }
.ht-up-list { min-height: 20px; }
.ht-up-tip { font-size: 12px; color: #98a2b3; }
.ht-up-msg { font-size: 13px; color: #0071e3; line-height: 1.6; }
/* 同窗口照片弹层：拍照 / 上传 / 缩略图（参照管家服务危险房屋现场照片区）
 * ★ 宽度减半且自适应：桌面封顶 600px（原 .modal--wide 1200px 的一半），窄屏按视口收窄、
 *   300px 为可读性下限；用 .modal.modal--htphoto 提高特异性，压过 v44.css 的手机端 .modal--wide 满屏规则。 */
.modal.modal--htphoto { width: clamp(300px, 50vw, 600px); }
.modal.modal--htphoto .ht-pm-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.ht-pm { display: flex; flex-direction: column; gap: 12px; min-height: 180px; }
.ht-pm-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ht-pm-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 7px 14px; border-radius: 999px; border: 1px solid #dce3ec; background: #fff; color: #0071e3; font-size: 13px; font-weight: 600; cursor: pointer; }
.ht-pm-btn input { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ht-pm-cam { background: #0071e3; color: #fff; border-color: #0071e3; }
.ht-pm-count { margin-left: auto; font-size: 12px; color: #667085; font-weight: 600; }
.ht-pm-tip { font-size: 12px; color: #98a2b3; line-height: 1.6; }
.ht-pm-msg { min-height: 18px; font-size: 12px; color: #0071e3; line-height: 1.6; }
.ht-pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ht-pm-card { background: #fff; border: 1px solid #e3e9f0; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.ht-pm-thumb { display: block; width: 100%; height: 110px; object-fit: cover; background: #eef2f7; cursor: zoom-in; }
.ht-pm-doc { display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; letter-spacing: .5px; color: #0071e3; background: linear-gradient(135deg,#f5f8fc,#e8f1fc); border-bottom: 1px solid #dce8f7; }
.ht-pm-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; font-size: 12px; color: #475467; }
.ht-pm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-pm-del { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; border: 1px solid #f0c4c1; background: #fff; color: #d83a34; font-size: 12px; cursor: pointer; }
/* 下载：勾选打包 + 单张保存（四类弹层共用） */
.ht-pm-btn-mini { padding: 6px 10px; font-size: 12px; }
.ht-pm-btn[disabled] { opacity: .45; cursor: not-allowed; }
.ht-pm-dl { background: #f5f8fc; }
.ht-pm-thumbwrap { position: relative; }
.ht-pm-sel { position: absolute; top: 6px; left: 6px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.94); box-shadow: 0 1px 3px rgba(0,0,0,.14); cursor: pointer; }
.ht-pm-cb { width: 15px; height: 15px; margin: 0; accent-color: #0071e3; cursor: pointer; }
.ht-pm-dlone { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; border: 1px solid #d8e6fa; background: #f5f8fc; color: #0071e3; font-size: 12px; cursor: pointer; }
.ht-pm-dlone:hover { background: #e8f1fc; }
/* 说明：按钮展开的录入区 + 弹层上方只读回显 */
.ht-pm-note { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #f5f8fc; border: 1px solid #e3e9f0; border-radius: 10px; }
.ht-pm-note label { font-size: 12px; font-weight: 600; color: #344054; }
.ht-pm-note textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #dce3ec; border-radius: 8px; font: inherit; font-size: 13px; color: #1d2939; resize: vertical; background: #fff; }
.ht-pm-note-btns { display: flex; align-items: center; gap: 10px; }
.ht-pm-note-status { font-size: 12px; color: #0071e3; }
.ht-pm-note-view { padding: 10px 12px; font-size: 12px; line-height: 1.6; color: #344054; background: #eef4fd; border: 1px solid #d8e6fa; border-radius: 10px; white-space: pre-wrap; word-break: break-word; }
.ht-pm-empty { grid-column: 1 / -1; padding: 36px 12px; text-align: center; color: #98a2b3; background: #f5f8fc; border: 1px dashed #dce3ec; border-radius: 10px; }
/* 历史巡查照片按日期折叠：默认只展开最新一天，其余点标题展开；Apple 风浅蓝+发丝线 */
.ht-pm-days { display: flex; flex-direction: column; gap: 10px; }
.ht-pm-day { border: 1px solid #e3e9f0; border-radius: 12px; overflow: hidden; background: #fff; }
.ht-pm-day-hd { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 14px; border: 0; background: #f5f8fc; color: #344054; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.ht-pm-day-hd:hover { background: #eaf2fc; }
.ht-pm-day-label { color: #0071e3; }
.ht-pm-day-arrow { color: #98a2b3; transition: transform .16s ease; }
.ht-pm-day.collapsed .ht-pm-day-arrow { transform: rotate(-90deg); }
.ht-pm-day.collapsed .ht-pm-day-body { display: none; }
.ht-pm-day-body { padding: 10px; border-top: 1px solid #e3e9f0; }
/* 点房屋行 → 复用信息查询右侧面板；从文物详情窗口内弹出时临时抬到窗口之上 */
#detailOverlay.ht-above { z-index: 9200; }
#detailPanel.ht-above { z-index: 9201; }
.ht-d-notes { padding: 8px 14px; margin-bottom: 14px; font-size: 12px; color: #6b7280; line-height: 1.6; }
.ht-houses .ht-merge { text-align: center; vertical-align: middle; background: #fafdff; font-weight: 600; }
.ht-d-pdfmeta { font-size: 12px; color: #6b7280; margin-bottom: 10px; line-height: 1.6; }
.ht-d-pdfstage { border: 1px solid #e3e9f0; border-radius: 10px; overflow: hidden; background: #fff; }
.ht-d-frame { display: block; width: 100%; height: 60vh; min-height: 400px; border: none; }
.ht-d-pdftip, .ht-d-fallback { padding: 10px 14px; font-size: 12px; color: #6b7280; background: #f5f8fc; line-height: 1.6; }
.ht-d-fallback { color: #475467; }
.ht-d-noplan { padding: 40px 16px; text-align: center; color: #98a2b3; background: #f5f8fc; border: 1px dashed #dce3ec; border-radius: 10px; font-size: 14px; }
/* 文物详情顶栏：全屏左侧常驻「在新窗口打开 / 下载原件」 */
.ht-top-tools { display: inline-flex; gap: 8px; margin-right: 8px; }
.ht-top-tools .btn-secondary { padding: 7px 12px; border-radius: 9px; border: 1px solid #dce3ec; background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; color: #1d2939; }
.ht-top-tools .btn-secondary:hover { border-color: #0071e3; color: #0071e3; }
.ht-top-tools .btn-secondary:disabled { opacity: .55; cursor: wait; }

.ht-houses .ht-col-mh { display: table-cell; }

/* ── 三段式布局（2026-11-29）：筛选折叠 / 统计显示 / 列表与统计视图 ────────── */
:root{
  --ht-blue:#0071e3; --ht-ink:#1d2939; --ht-sub:#6b7280; --ht-mute:#98a2b3;
  --ht-line:#e3e9f0; --ht-line2:#eef2f7; --ht-card:#fff;
}
[hidden]{display:none!important}
.ht-panel { background:var(--ht-card); border:1px solid var(--ht-line); border-radius:14px; box-shadow:0 1px 3px rgba(0,0,0,.04); overflow:hidden; margin-bottom:14px; }
.ht-phd { display:flex; align-items:center; justify-content:space-between; padding:11px 16px; border-bottom:1px solid var(--ht-line2); background:#fbfcfe; min-height:48px; }
.ht-phd-l { display:flex; align-items:center; gap:9px; min-width:0; }
.ht-stage { display:inline-flex; align-items:center; justify-content:center; width:19px; height:19px; border-radius:6px; background:#eef2f7; color:var(--ht-sub); font-size:11px; font-weight:600; flex:none; }
.ht-pttl { font-size:14px; font-weight:600; white-space:nowrap; color:var(--ht-ink); }
.ht-psm { font-size:12px; color:var(--ht-mute); font-weight:400; margin-left:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ht-fold { height:30px; padding:0 11px; border-radius:8px; border:1px solid #dce3ec; background:#fff; color:var(--ht-sub); font-size:12px; font-weight:600; cursor:pointer; font-family:inherit; display:inline-flex; align-items:center; gap:6px; flex:none; }
.ht-fold .ht-chev { display:inline-block; font-size:13px; line-height:1; transition:transform .18s; }
.ht-fold.up .ht-chev { transform:rotate(180deg); }
.ht-subbar { display:flex; justify-content:flex-end; padding:0 16px 12px; }
.ht-kpis { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; padding:13px 16px 16px; }
.ht-kpi { background:#fff; border:1px solid var(--ht-line); border-radius:12px; padding:12px 14px; box-shadow:0 1px 2px rgba(0,0,0,.03); }
.ht-kpi-t { font-size:12px; color:var(--ht-sub); font-weight:600; display:flex; align-items:center; gap:7px; }
.ht-kpi-t i { width:8px; height:8px; border-radius:3px; display:inline-block; flex:none; }
.ht-kpi-v { font-size:25px; font-weight:600; letter-spacing:-.5px; margin-top:5px; font-variant-numeric:tabular-nums; color:var(--ht-ink); }
.ht-kpi-s { font-size:11px; color:var(--ht-mute); margin-top:1px; }
.ht-seg { display:inline-flex; background:#eaf0f7; border:1px solid #dce3ec; border-radius:10px; padding:3px; gap:2px; flex:none; }
.ht-seg button { border:0; background:transparent; color:var(--ht-sub); font-size:12px; font-weight:600; padding:6px 15px; border-radius:8px; cursor:pointer; font-family:inherit; }
.ht-seg button.on { background:#fff; color:var(--ht-blue); box-shadow:0 1px 3px rgba(0,0,0,.08); }
.ht-seg .ht-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--ht-blue); margin-right:6px; vertical-align:middle; }
.ht-dimbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:10px 16px; border-bottom:1px solid var(--ht-line2); background:#fbfcfe; }
.ht-dimcap { font-size:12px; font-weight:600; color:var(--ht-sub); display:flex; align-items:center; gap:6px; }
.ht-dimhint { margin-left:auto; font-size:12px; color:var(--ht-mute); }
.ht-chd { padding:12px 16px; border-bottom:1px solid var(--ht-line2); }
.ht-cttl { font-size:14px; font-weight:600; color:var(--ht-ink); }
.ht-cdesc { font-size:12px; color:var(--ht-mute); margin-top:2px; }
.ht-tw { overflow-x:auto; }
.ht-stat-tbl { width:100%; border-collapse:collapse; font-size:13px; }
.ht-stat-tbl th { background:#f0f5fb; color:#33475b; font-weight:600; text-align:left; padding:10px 12px; border-bottom:1px solid var(--ht-line); white-space:nowrap; }
.ht-stat-tbl th.num, .ht-stat-tbl td.num { text-align:right; font-variant-numeric:tabular-nums; }
.ht-stat-tbl th.ht-grp { text-align:center; border-left:1px solid var(--ht-line); }
.ht-stat-tbl td { padding:9px 12px; border-bottom:1px solid var(--ht-line2); color:var(--ht-ink); white-space:nowrap; }
.ht-stat-tbl tbody tr:hover { background:rgba(0,113,227,.04); }
.ht-stat-tbl tr.ht-sum td { background:#f7faff; font-weight:600; border-top:1px solid var(--ht-line); }
.ht-dist { font-weight:600; color:var(--ht-blue); cursor:pointer; }
.ht-bar { display:inline-flex; align-items:center; gap:7px; }
.ht-bar .ht-track { width:56px; height:6px; border-radius:99px; background:#edf1f6; overflow:hidden; display:inline-block; }
.ht-bar .ht-fill { height:100%; border-radius:99px; display:block; }
.ht-bar .ht-pct { font-size:12px; color:var(--ht-sub); min-width:38px; text-align:right; font-variant-numeric:tabular-nums; }
.ht-zero { color:var(--ht-mute); }
.ht-legend { display:flex; gap:16px; flex-wrap:wrap; padding:10px 16px; border-top:1px solid var(--ht-line2); background:#fbfcfe; font-size:12px; color:var(--ht-sub); }
.ht-legend i { width:8px; height:8px; border-radius:3px; display:inline-block; margin-right:6px; vertical-align:middle; }
.ht-footnote { padding:10px 16px; font-size:12px; color:var(--ht-mute); background:#fbfcfe; border-top:1px solid var(--ht-line2); line-height:1.7; }

@media (max-width: 1100px) { .ht-kpis { grid-template-columns:repeat(3,1fr); } }
@media (max-width: 760px) {
  .ht-kpis { grid-template-columns:repeat(2,1fr); }
  .ht-dimhint, .ht-psm { display:none; }
  .ht-phd { flex-wrap:wrap; gap:8px; }
}

@media (max-width: 760px) {
  .ht-fb-row label { min-width: 45%; }
  .ht-fb-row input[type="search"] { min-width: 100%; }
  .ht-total { margin-left: 0; }
  .ht-d-frame { height: 52vh; }
  .ht-top-tools .btn-secondary { padding: 6px 8px; font-size: 12px; }
  .ht-pm-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .ht-pm-thumb { height: 100px; }
  /* 手机端收起行政区/所属街道/公布编号三列，腾出宽度操作两级巡查照片按钮 */
  .ht-houses .ht-col-mh { display: none; }
}
