/* ==========================================================================
   中服万邦智慧园区管理平台 — 统一组件样式
   零外部依赖：无 CDN / 无外部字体 / 无外部图片
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --primary: #2E7DF7;
  --primary-dark: #1E5FD0;
  --primary-light: #EAF1FE;
  --nav: #1F3B63;
  --nav-dark: #172F52;
  --nav-hover: #274a7a;
  --nav-text: #C7D6EC;

  --success: #16A34A;
  --success-bg: #E7F7EE;
  --warning: #F59E0B;
  --warning-bg: #FEF4E4;
  --danger: #DC2626;
  --danger-bg: #FDECEC;
  --info: #0EA5E9;
  --info-bg: #E5F5FE;
  --gray: #64748B;
  --gray-bg: #F1F5F9;
  --purple: #7C3AED;
  --purple-bg: #F1EBFE;
  --orange: #EA580C;
  --orange-bg: #FFF0E6;

  /* 房态 / 工位状态实心色（图例小方块与地图格子共用同一组变量，保证颜色对得上） */
  --st-vacant: #16A34A;
  --st-rented: #2E7DF7;
  --st-reserved: #F59E0B;
  --st-repair: #DC2626;
  --st-self-use: #7C3AED;
  --st-disabled: #94A3B8;
  --st-occupied: #2E7DF7;
  --st-occupied-soft: #F4F8FF;
  /* 对应浅底色（格子底纹，与实心色同色系） */
  --st-vacant-soft: #F4FBF7;
  --st-rented-soft: #F4F8FF;
  --st-reserved-soft: #FFFBF2;
  --st-repair-soft: #FEF6F6;
  --st-self-use-soft: #F9F6FF;
  --st-disabled-soft: #F7F9FC;

  --text: #1E293B;
  --text-2: #475569;
  --text-3: #94A3B8;
  --border: #E3E9F2;
  --border-2: #EEF2F8;
  --bg: #F4F7FC;
  --card: #FFFFFF;

  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 3px rgba(24, 45, 80, .06), 0 6px 18px -8px rgba(24, 45, 80, .12);
  --shadow-lg: 0 12px 40px -8px rgba(16, 32, 60, .30);
  --sidebar-w: 226px;
  --sidebar-w-collapsed: 62px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "Heiti SC", sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #C8D3E2; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #A9B8CC; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 2. 登录页 ---------- */
.login-view { display: flex; min-height: 100vh; }
.login-brand {
  flex: 1 1 52%;
  background: linear-gradient(150deg, #1F3B63 0%, #16294a 55%, #2E7DF7 190%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  padding: 48px 40px; position: relative; overflow: hidden;
}
.login-brand::after {
  content: ""; position: absolute; right: -140px; bottom: -160px;
  width: 480px; height: 480px; border-radius: 50%;
  background: rgba(46, 125, 247, .28);
}
.login-brand-inner { position: relative; z-index: 1; max-width: 440px; }
.login-logo { color: #fff; opacity: .95; margin-bottom: 18px; }
.login-brand h1 { font-size: 34px; letter-spacing: 3px; margin-bottom: 6px; }
.login-sub { margin: 0 0 30px; color: #A9C2E6; font-size: 15px; letter-spacing: 1px; }
.login-feats { list-style: none; padding: 0; margin: 0 0 36px; }
.login-feats li {
  padding: 9px 0 9px 26px; position: relative; color: #D4E2F7; font-size: 13.5px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.login-feats li::before {
  content: ""; position: absolute; left: 4px; top: 17px;
  width: 7px; height: 7px; border-radius: 2px; background: #61A5FF;
}
.login-foot { color: #7C97BE; font-size: 12px; margin: 0; }
.login-panel {
  flex: 1 1 48%; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; background: #fff;
}
.login-form { width: 100%; max-width: 372px; }
.login-form h2 { font-size: 22px; margin-bottom: 6px; }
.login-tip { color: var(--text-3); margin: 0 0 26px; font-size: 13px; }
.login-error {
  background: var(--danger-bg); color: var(--danger); border: 1px solid #F7C9C9;
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; margin-bottom: 12px;
}
.login-form .field { margin-bottom: 16px; }
.btn-block { width: 100%; justify-content: center; padding: 11px; font-size: 15px; margin-top: 4px; }
.login-demo { margin-top: 28px; border-top: 1px dashed var(--border); padding-top: 16px; }
.login-demo-title { font-size: 12px; color: var(--text-3); margin-bottom: 9px; }
.login-demo-list { display: flex; flex-direction: column; gap: 6px; }
.demo-chip {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: #F7F9FD; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 11px; font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--text-2); cursor: pointer; text-align: left; width: 100%;
}
.demo-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.demo-chip em { font-style: normal; font-family: inherit; color: var(--text-3); font-size: 11.5px; }

/* ---------- 3. 主框架 ---------- */
.app-view { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--nav); color: var(--nav-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  transition: width .16s ease, flex-basis .16s ease; z-index: 30;
}
.sidebar-head {
  display: flex; align-items: center; gap: 10px; padding: 15px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08); min-height: var(--topbar-h);
}
.sidebar-logo { color: #7EB2FF; flex: 0 0 auto; line-height: 0; }
.sidebar-title { display: flex; flex-direction: column; overflow: hidden; white-space: nowrap; }
.sidebar-title strong { color: #fff; font-size: 15px; letter-spacing: 1.5px; }
.sidebar-title span { font-size: 10.5px; color: #7C97BE; letter-spacing: .3px; }

.nav { flex: 1; overflow-y: auto; padding: 8px 0 16px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); }
.nav-group { margin-bottom: 2px; }
.nav-group-head {
  display: flex; align-items: center; gap: 9px; width: 100%; border: 0; cursor: pointer;
  background: transparent; color: #90A9CB; font-size: 11.5px; letter-spacing: .6px;
  padding: 10px 16px 6px; font-weight: 600; text-align: left;
}
.nav-group-head .caret { margin-left: auto; transition: transform .15s; font-size: 9px; opacity: .8; }
.nav-group.collapsed .caret { transform: rotate(-90deg); }
.nav-group.collapsed .nav-items { display: none; }
.nav-group-ic { font-size: 13px; width: 15px; text-align: center; flex: 0 0 auto; }
.nav-items { display: flex; flex-direction: column; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8.5px 16px 8.5px 22px;
  color: var(--nav-text); font-size: 13px; cursor: pointer; border: 0; background: transparent;
  width: 100%; text-align: left; border-left: 3px solid transparent; position: relative;
}
.nav-item:hover { background: var(--nav-hover); color: #fff; }
.nav-item.active { background: rgba(46, 125, 247, .2); color: #fff; border-left-color: var(--primary); font-weight: 600; }
.nav-item .ni-ic { font-size: 14px; width: 16px; text-align: center; flex: 0 0 auto; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding: 8px; }
.nav-collapse {
  width: 100%; background: transparent; border: 0; color: #90A9CB; cursor: pointer;
  font-size: 12px; padding: 8px; display: flex; align-items: center; gap: 8px; border-radius: var(--radius-sm);
}
.nav-collapse:hover { background: var(--nav-hover); color: #fff; }

body.nav-collapsed .sidebar { width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed); }
body.nav-collapsed .sidebar-title,
body.nav-collapsed .nav-group-head span:not(.caret):not(.nav-group-ic),
body.nav-collapsed .nav-item span:not(.ni-ic),
body.nav-collapsed .nav-collapse-txt,
body.nav-collapsed .nav-group-head .caret { display: none; }
body.nav-collapsed .nav-group-head,
body.nav-collapsed .nav-item { justify-content: center; padding-left: 10px; padding-right: 10px; }
body.nav-collapsed .nav-collapse { justify-content: center; }
body.nav-collapsed .sidebar-head { justify-content: center; }
body.nav-collapsed .nav-group.collapsed .nav-items { display: flex; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-title { display: flex; flex-direction: column; min-width: 0; }
.topbar-title h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb { font-size: 11.5px; color: var(--text-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.park-switch {
  display: flex; align-items: center; gap: 7px; background: var(--primary-light);
  border: 1px solid #CFE0FD; border-radius: var(--radius); padding: 3px 8px 3px 10px;
}
.park-ic { color: var(--primary); flex: 0 0 auto; }
.park-switch select {
  border: 0; background: transparent; font-size: 13px; color: var(--primary-dark);
  font-weight: 600; padding: 5px 2px; outline: none; cursor: pointer; max-width: 220px;
}
.user-box { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(140deg, #2E7DF7, #1F3B63);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: 0 0 auto;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta strong { font-size: 13px; }
.user-meta span { font-size: 11px; color: var(--text-3); }
.content { padding: 16px 20px 34px; flex: 1; min-width: 0; }
.only-mobile { display: none; }

/* ---------- 4. 卡片 / 布局 ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
.card-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border-2);
}
.card-head h3 { font-size: 14px; display: flex; align-items: center; gap: 7px; }
.card-head .ch-badge {
  font-size: 11px; font-weight: 600; background: var(--primary-light); color: var(--primary-dark);
  padding: 1px 7px; border-radius: 20px;
}
.card-head .ch-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 14px 16px; }
.card-body.tight { padding: 0; }
.sub-title { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.muted { color: var(--text-3); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2); border-radius: var(--radius-sm);
  padding: 6.5px 13px; font-size: 13px; cursor: pointer; font-family: inherit;
  transition: background .12s, border-color .12s, color .12s; white-space: nowrap; line-height: 1.4;
}
.btn:hover { border-color: #C3D2E8; background: #F7FAFF; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { background: #fff; border-color: #F2C2C2; color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--gray-bg); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-xs { padding: 2px 8px; font-size: 11.5px; border-radius: 4px; }
.btn-link { border: 0; background: none; color: var(--primary); padding: 2px 5px; font-size: 12.5px; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }
.btn-icon { padding: 6px 8px; }
.icon-btn {
  border: 1px solid var(--border); background: #fff; border-radius: var(--radius-sm);
  padding: 6px; cursor: pointer; color: var(--text-2); line-height: 0;
}
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn.active { background: var(--primary); border-color: var(--primary); color: #fff; z-index: 1; }

/* ---------- 6. 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field-label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field-label .req { color: var(--danger); margin-left: 3px; }
.field-hint { font-size: 11.5px; color: var(--text-3); }
.field-error { font-size: 11.5px; color: var(--danger); }
input[type="text"], input[type="password"], input[type="number"], input[type="date"],
input[type="month"], input[type="search"], select, textarea {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6.5px 10px;
  font-size: 13px; font-family: inherit; color: var(--text); background: #fff;
  outline: none; transition: border-color .12s, box-shadow .12s; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46, 125, 247, .12); }
input:disabled, select:disabled, textarea:disabled { background: #F6F8FB; color: var(--text-3); cursor: not-allowed; }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); }
textarea { resize: vertical; min-height: 68px; line-height: 1.5; }
select { cursor: pointer; appearance: none; background-image: none; padding-right: 26px; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "▾"; position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 10px; pointer-events: none;
}
.select-wrap.multi::after { display: none; }
.select-wrap.multi select { padding-right: 10px; }
select[multiple] { min-height: 100px; padding: 5px 6px; }
.checkbox-row { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.checkbox-row input { width: auto; margin: 0; cursor: pointer; }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 9px 12px; align-items: flex-end;
  padding: 12px 16px; border-bottom: 1px solid var(--border-2); background: #FCFDFF;
  border-radius: var(--radius) var(--radius) 0 0;
}
.filter-item { display: flex; flex-direction: column; gap: 4px; }
.filter-item > label { font-size: 11.5px; color: var(--text-3); }
.filter-item input, .filter-item select { min-width: 130px; font-size: 12.5px; padding: 5.5px 9px; }
.filter-item.wide input { min-width: 200px; }
.filter-actions { display: flex; gap: 8px; margin-left: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-grid.tight { gap: 0 12px; }

/* ---------- 7. 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.tbl th {
  background: #F7F9FD; color: var(--text-2); font-weight: 600; font-size: 12.5px;
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
table.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
table.tbl tbody tr:nth-child(even) { background: #FAFCFF; }
table.tbl tbody tr:hover { background: var(--primary-light); }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.center, table.tbl th.center { text-align: center; }
table.tbl .ops { display: flex; gap: 2px; flex-wrap: wrap; white-space: nowrap; }
table.tbl.compact td, table.tbl.compact th { padding: 6px 10px; font-size: 12.5px; }
.table-empty { padding: 42px 20px; text-align: center; color: var(--text-3); }
.table-empty .te-ic { font-size: 30px; opacity: .5; display: block; margin-bottom: 8px; }
.table-loading { padding: 42px 20px; text-align: center; color: var(--text-3); }
.link-cell { color: var(--primary); cursor: pointer; font-weight: 500; }
.link-cell:hover { text-decoration: underline; }
.cell-main { font-weight: 500; }
.cell-sub { font-size: 11.5px; color: var(--text-3); }

/* ---------- 8. 分页 ---------- */
.pager {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  border-top: 1px solid var(--border-2); flex-wrap: wrap;
}
.pager .pg-info { font-size: 12.5px; color: var(--text-3); }
.pager .pg-list { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.pager .pg-btn {
  min-width: 30px; height: 29px; border: 1px solid var(--border); background: #fff; border-radius: var(--radius-sm);
  font-size: 12.5px; color: var(--text-2); cursor: pointer; padding: 0 8px; font-family: inherit;
}
.pager .pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager .pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager .pg-btn:disabled { opacity: .45; cursor: not-allowed; }
.pager select { width: auto; padding: 5px 8px; font-size: 12.5px; }

/* ---------- 9. 标签 / 胶囊 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 1.5px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; line-height: 1.7; white-space: nowrap;
}
.tag.blue { background: var(--primary-light); color: var(--primary-dark); }
.tag.green { background: var(--success-bg); color: var(--success); }
.tag.orange { background: var(--orange-bg); color: var(--orange); }
.tag.amber { background: var(--warning-bg); color: #B45309; }
.tag.red { background: var(--danger-bg); color: var(--danger); }
.tag.gray { background: var(--gray-bg); color: var(--gray); }
.tag.purple { background: var(--purple-bg); color: var(--purple); }
.tag.cyan { background: var(--info-bg); color: #0369A1; }
.tag.outline { background: #fff; border: 1px solid var(--border); color: var(--text-2); }
.tag.sm { font-size: 10.5px; padding: 0 7px; }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-list { display: inline-flex; gap: 4px; flex-wrap: wrap; }

/* ---------- 10. 指标卡 ---------- */
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary);
}
.stat-card.green::before { background: var(--success); }
.stat-card.amber::before { background: var(--warning); }
.stat-card.red::before { background: var(--danger); }
.stat-card.purple::before { background: var(--purple); }
.stat-card.cyan::before { background: var(--info); }
.stat-label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 25px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat-value.sm { font-size: 20px; }
.stat-value .unit { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat-sub { font-size: 11.5px; color: var(--text-3); }
.stat-sub .up { color: var(--success); }
.stat-sub .down { color: var(--danger); }

/* ---------- 11. 图表（纯 SVG） ---------- */
.chart-box { width: 100%; overflow: hidden; }
.chart-box svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 108px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-track { background: #EEF3FA; border-radius: 4px; height: 16px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width .3s; }
.bar-fill.green { background: var(--success); }
.bar-fill.orange { background: var(--orange); }
.bar-fill.amber { background: var(--warning); }
.bar-fill.gray { background: #B9C6D8; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.progress { height: 8px; background: #EEF3FA; border-radius: 5px; overflow: hidden; min-width: 70px; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.progress > i.warn { background: var(--warning); }
.progress > i.full { background: var(--danger); }

/* ---------- 12. 房态图 ---------- */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 9px; }
.room-cell {
  border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-sm);
  padding: 8px 10px; cursor: pointer; background: #fff; transition: box-shadow .12s, transform .12s;
  display: flex; flex-direction: column; gap: 2px; min-height: 62px; text-align: left;
}
.room-cell:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.room-cell .rc-no { font-weight: 600; font-size: 13px; }
.room-cell .rc-meta { font-size: 11px; color: var(--text-3); }
.room-cell .rc-tenant {
  font-size: 11px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 图例小方块：直接用状态实心色。
   房态图格子的左侧色带、座位图格子的底纹都取自同一组 --st-* 变量，
   因此「图例颜色 = 该状态在格子上的颜色」是同源的，不会再出现黑灰色块。 */
.legend-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2);
  padding: 2px 8px; border: 1px solid var(--border); border-radius: 20px; background: #fff;
}
.legend-chip i { width: 11px; height: 11px; border-radius: 2px; border: 1px solid rgba(15, 23, 42, .10); }
.lg-VACANT, .lg-FREE { background: var(--st-vacant); }
.lg-RENTED, .lg-OCCUPIED { background: var(--st-occupied); }
.lg-RESERVED { background: var(--st-reserved); }
.lg-REPAIR { background: var(--st-repair); }
.lg-SELF_USE { background: var(--st-self-use); }
.lg-DISABLED, .lg-FIXED { background: var(--st-disabled); }
.floor-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.floor-tab {
  border: 1px solid var(--border); background: #fff; border-radius: var(--radius-sm); padding: 4.5px 12px;
  font-size: 12.5px; cursor: pointer; color: var(--text-2); font-family: inherit;
}
.floor-tab:hover { border-color: var(--primary); color: var(--primary); }
.floor-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ---------- 13. 工位图 ---------- */
.seat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 9px; }
.seat-cell {
  border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-sm); padding: 9px 10px;
  background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 3px; text-align: left;
  transition: box-shadow .12s, transform .12s;
}
.seat-cell:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.seat-cell .sc-no { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.seat-cell .sc-ent { font-size: 11px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 状态色（房态格子 + 座位格子共用；必须放在 .room-cell/.seat-cell 之后，
   否则被两处 border 简写覆盖 —— 这正是此前座位图状态色失效的原因） */
.st-VACANT { border-left-color: var(--st-vacant); background: var(--st-vacant-soft); }
.st-RENTED { border-left-color: var(--st-rented); background: var(--st-rented-soft); }
.st-RESERVED { border-left-color: var(--st-reserved); background: var(--st-reserved-soft); }
.st-REPAIR { border-left-color: var(--st-repair); background: var(--st-repair-soft); }
.st-SELF_USE { border-left-color: var(--st-self-use); background: var(--st-self-use-soft); }
.st-DISABLED { border-left-color: var(--st-disabled); background: var(--st-disabled-soft); }
.st-OCCUPIED { border-left-color: var(--st-occupied); background: var(--st-occupied-soft); }

/* ---------- 14. Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 16px; overflow-x: auto; }
.tab {
  border: 0; background: transparent; padding: 10px 14px; font-size: 13px; cursor: pointer;
  color: var(--text-2); border-bottom: 2px solid transparent; font-family: inherit; white-space: nowrap;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ---------- 15. Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17, 30, 51, .46); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 46px 16px 30px;
  overflow-y: auto; animation: fadeIn .14s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(10px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes slideLeft { from { transform: translateX(28px); opacity: .5; } to { transform: none; opacity: 1; } }
.modal {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; animation: slideUp .16s ease; overflow: hidden;
}
.modal.w-sm { max-width: 420px; }
.modal.w-md { max-width: 620px; }
.modal.w-lg { max-width: 860px; }
.modal.w-xl { max-width: 1080px; }
.modal-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--border-2);
}
.modal-head h3 { font-size: 15px; flex: 1; min-width: 0; }
.modal-close {
  border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--text-3);
  cursor: pointer; padding: 0 4px; border-radius: 4px;
}
.modal-close:hover { color: var(--danger); background: var(--danger-bg); }
.modal-body { padding: 16px 18px; max-height: calc(100vh - 240px); overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 9px; padding: 12px 18px;
  border-top: 1px solid var(--border-2); background: #FCFDFF;
}
.modal-foot .left { margin-right: auto; }

/* ---------- 16. Drawer ---------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(17, 30, 51, .42); z-index: 110; animation: fadeIn .14s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw; background: #fff;
  z-index: 111; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slideLeft .18s ease;
}
.drawer.w-lg { width: 680px; }
.drawer.w-xl { width: 900px; }
.drawer-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border-2);
}
.drawer-head h3 { font-size: 15px; flex: 1; min-width: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.drawer-foot { padding: 12px 18px; border-top: 1px solid var(--border-2); display: flex; gap: 9px; justify-content: flex-end; background: #FCFDFF; }

/* ---------- 17. 描述列表 ---------- */
.dl { display: grid; grid-template-columns: 104px 1fr; gap: 7px 12px; font-size: 13px; }
.dl dt { color: var(--text-3); font-size: 12.5px; }
.dl dd { margin: 0; word-break: break-all; }
.dl.wide { grid-template-columns: 130px 1fr; }
.section-title {
  font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 18px 0 10px;
  padding-left: 9px; border-left: 3px solid var(--primary); line-height: 1.3;
}
.section-title:first-child { margin-top: 0; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 18px; }
.kv { display: flex; flex-direction: column; gap: 1px; }
.kv .k { font-size: 11.5px; color: var(--text-3); }
.kv .v { font-size: 13px; word-break: break-all; }

/* ---------- 18. 时间轴 ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -20px; top: 4px; width: 11px; height: 11px; border-radius: 50%;
  background: #fff; border: 2px solid var(--border);
}
.tl-item.done::before { background: var(--success); border-color: var(--success); }
.tl-item.doing::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,125,247,.2); }
.tl-item.reject::before { background: var(--danger); border-color: var(--danger); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-head strong { font-size: 13px; }
.tl-body { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.tl-time { font-size: 11.5px; color: var(--text-3); }

/* ---------- 19. Toast ---------- */
.toast-root {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 400;
  display: flex; flex-direction: column; gap: 9px; align-items: center; pointer-events: none;
}
.toast {
  background: #1E293B; color: #fff; border-radius: var(--radius); padding: 10px 17px; font-size: 13px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px; max-width: 620px;
  animation: slideUp .16s ease; pointer-events: auto;
}
.toast.success { background: #14713C; }
.toast.error { background: #A81E1E; }
.toast.warn { background: #A25C08; }
.toast .t-ic { font-size: 14px; }
.toast .t-msg { flex: 1; word-break: break-word; }
.toast.fade-out { opacity: 0; transition: opacity .3s; }

/* ---------- 20. 其它 ---------- */
.boot-error {
  position: fixed; inset: 0; background: #F4F7FC; z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.boot-error-inner {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 32px; max-width: 560px; box-shadow: var(--shadow); text-align: center;
}
.boot-error h2 { font-size: 17px; margin-bottom: 10px; color: var(--danger); }
.boot-error p { color: var(--text-2); font-size: 13px; margin: 0 0 8px; word-break: break-word; }
.notice {
  background: var(--warning-bg); border: 1px solid #F7DFB4; color: #92400E;
  border-radius: var(--radius-sm); padding: 10px 13px; font-size: 12.5px; margin-bottom: 12px;
}
.notice.info { background: var(--info-bg); border-color: #BEE4F8; color: #075985; }
.notice.danger { background: var(--danger-bg); border-color: #F5C7C7; color: #991B1B; }
.notice.success { background: var(--success-bg); border-color: #BFE9CF; color: #14532D; }
.notice ul { margin: 5px 0 0; padding-left: 19px; }
.empty-hint { padding: 34px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty-hint .eh-ic { font-size: 30px; display: block; margin-bottom: 8px; opacity: .5; }
.spinner {
  display: inline-block; width: 15px; height: 15px; border: 2px solid #D6E1F2;
  border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #EEF2F8 25%, #F7FAFF 50%, #EEF2F8 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 5px; height: 14px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.code-block {
  background: #F6F8FC; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto; color: var(--text-2);
}
.scroll-y { max-height: 380px; overflow-y: auto; }
.scroll-y-sm { max-height: 260px; overflow-y: auto; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fs12 { font-size: 12px; }
.fs115 { font-size: 11.5px; }
.mb0 { margin-bottom: 0; }
.mb8 { margin-bottom: 8px; }
.mb12 { margin-bottom: 12px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.ml8 { margin-left: 8px; }
.w100 { width: 100%; }

/* ---------- 21. 响应式 ---------- */
@media (max-width: 1360px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .g4, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-brand { display: none; }
  .login-panel { flex: 1 1 100%; }
}
@media (max-width: 860px) {
  .only-mobile { display: inline-flex; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .18s; }
  body.nav-open .sidebar { transform: none; }
  .g2, .g3, .g4, .g5, .g6 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .user-meta { display: none; }
  .content { padding: 12px; }
}

/* ==========================================================================
   22. 打印 / 套打（A4）—— 浏览器原生 window.print() + @media print，零外部依赖
   容器 #print-root 由 app.js 动态创建（不依赖 index.html 结构）；
   屏幕上 #print-root 始终隐藏，只有点击打印时才会把单据挂进去。
   ========================================================================== */
#print-root { display: none; }

@page { size: A4; margin: 12mm; }

/* ---- 单据排版（打印媒体与预览共用） ---- */
.print-page { background: #fff; color: #111; font-size: 11.5pt; line-height: 1.55; }
.print-page + .print-page { margin-top: 20px; }
.print-page .p-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  border-bottom: 2px solid #111; padding-bottom: 6px; margin-bottom: 10px;
}
.print-page .p-park-name { font-size: 15pt; font-weight: 700; letter-spacing: 1px; }
.print-page .p-park-sub { font-size: 8.5pt; color: #555; margin-top: 2px; }
.print-page .p-title { font-size: 17pt; font-weight: 700; letter-spacing: 5px; text-align: right; }
.print-page .p-title-sub { font-size: 8pt; color: #666; letter-spacing: 1.5px; text-align: right; margin-top: 2px; }
.print-page .p-meta { width: 100%; border-collapse: collapse; margin-bottom: 9px; table-layout: fixed; }
.print-page .p-meta td { border: 1px solid #8C8C8C; padding: 4px 6px; font-size: 9.8pt; word-break: break-all; }
.print-page .p-meta td.k { background: #F3F4F6; width: 84px; font-weight: 600; color: #222; }
.print-page .p-meta td.k2 { background: #F3F4F6; width: 104px; font-weight: 600; color: #222; }
.print-page .p-sec { font-size: 10.5pt; font-weight: 700; margin: 11px 0 5px; border-left: 3px solid #222; padding-left: 7px; }
.print-page .p-tbl { width: 100%; border-collapse: collapse; }
.print-page .p-tbl th, .print-page .p-tbl td { border: 1px solid #8C8C8C; padding: 4px 6px; font-size: 9.8pt; vertical-align: top; }
.print-page .p-tbl th { background: #F3F4F6; font-weight: 600; text-align: left; }
.print-page .p-tbl td.num, .print-page .p-tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.print-page .p-tbl td.ctr, .print-page .p-tbl th.ctr { text-align: center; }
.print-page .p-tbl tfoot td { font-weight: 700; background: #FAFAFB; }
.print-page .p-sums { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px; font-size: 10pt; }
.print-page .p-upper { margin-top: 6px; font-size: 10.5pt; }
.print-page .p-upper b { letter-spacing: 2px; }
.print-page .p-bank { margin-top: 8px; font-size: 9.5pt; border: 1px dashed #8C8C8C; padding: 5px 8px; }
.print-page .p-meta-line { font-size: 10pt; margin: 2px 0 8px; }
.print-page .p-amount-box { border: 1px solid #8C8C8C; padding: 6px 9px; margin-top: 8px; font-size: 10.5pt; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.print-page .p-amount-box .big { font-size: 14pt; font-weight: 700; letter-spacing: 1px; }
.print-page .p-contract-body { white-space: pre-wrap; word-break: break-word; font-size: 11pt; line-height: 1.95; margin-top: 6px; }
.print-page .p-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 14px; font-size: 10pt; }
.print-page .p-sign > * { flex: 1; }
.print-page .p-stamp { border: 1px dashed #8C8C8C; border-radius: 3px; min-height: 78px; padding: 6px 9px; font-size: 9.5pt; }
.print-page .p-note { margin-top: 9px; font-size: 8.5pt; color: #555; }
.print-page .p-tips { margin-top: 6px; font-size: 9pt; color: #333; }

/* 打印时只显示 #print-root：侧栏 / 顶栏 / 弹窗 / 按钮 / 筛选区全部隐藏 */
@media print {
  html, body { background: #fff !important; color: #000 !important; height: auto !important; overflow: visible !important; }
  body.printing > *:not(#print-root) { display: none !important; }
  #print-root { display: none; }
  body.printing #print-root { display: block !important; }
  body.printing #print-root * { box-shadow: none !important; text-shadow: none !important; }
  .print-page { margin: 0 !important; break-after: page; page-break-after: always; }
  .print-page + .print-page { margin-top: 0 !important; }
  .print-page:last-child { break-after: auto; page-break-after: auto; }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }
  tr { break-inside: avoid; page-break-inside: avoid; }
  .print-page, .print-page .p-tbl, .print-page .p-meta { break-inside: auto; page-break-inside: auto; }
  .print-page .p-sec { break-after: avoid; page-break-after: avoid; }
}

/* ---------- 13. 监管账号（GOV）只读数据门户 ---------- */
/* 顶栏：监管账号隐藏园区下拉（页面内自带「全部园区 + 各授权园区」切换） */
body.gov-mode .park-switch { display: none; }
body.gov-mode .sidebar-title span::after { content: " · 监管视图"; color: #8FB3E8; }
.progress > i.green { background: var(--success); }
.gov-num { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.3; }
.gov-num .unit { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.gov-rate { flex-wrap: nowrap; }
.gov-rate .progress { min-width: 60px; }
.gov-rate-txt { min-width: 58px; text-align: right; color: var(--text-2); }
.gov-park-card { cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.gov-park-card:hover { border-color: var(--primary); box-shadow: 0 3px 12px rgba(46, 125, 247, .14); }
.gov-park-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light) inset; }
.gov-park-card .card-head { padding-bottom: 8px; }
table.tbl tfoot th { padding: 9px 12px; text-align: left; font-size: 12.5px; color: var(--text); background: #F8FAFD; border-top: 2px solid var(--border); }
table.tbl tfoot th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl tfoot { background: #F8FAFD; }

/* ==========================================================================
   23. 移动端适配（一线人员现场使用：走访签到 / 抄表 / 审批）
   —— 以下规则**全部在媒体查询内**，桌面端（≥1081px）不受任何影响；
      卡片列表相关类（.m-*）只由 app.js 的 isMobile() 分支渲染，桌面端 DOM 中不存在。
   ========================================================================== */

@media (max-width: 860px) {
  /* ---- 23.1 侧栏抽屉 + 遮罩 ---- */
  .nav-mask {
    position: fixed; inset: 0; z-index: 65;
    background: rgba(15, 27, 46, .5);
    opacity: 0; pointer-events: none; transition: opacity .18s ease;
  }
  body.nav-open .nav-mask { opacity: 1; pointer-events: auto; }
  /* 抽屉弹出时锁定背景滚动，避免手指滑动穿透 */
  body.nav-open { overflow: hidden; }
  .sidebar { z-index: 70; width: 272px; max-width: 84vw; flex-basis: auto; box-shadow: 4px 0 26px rgba(15, 27, 46, .3); }
  .sidebar-foot { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }

  /* ---- 23.2 顶栏精简 ---- */
  .topbar { height: auto; min-height: 52px; padding: 8px 10px; gap: 8px; }
  .topbar-title { flex: 1 1 auto; }
  .topbar-title h1 { font-size: 15px; }
  .crumb { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { gap: 8px; flex: 0 0 auto; }
  .park-switch { max-width: 44vw; padding: 2px 6px 2px 8px; }
  .park-switch select { max-width: 100%; }
  .user-box { gap: 6px; }
  #btn-logout { min-height: 40px; }

  /* ---- 23.3 内容与卡片 ---- */
  .content { padding: 12px 12px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .card { border-radius: 10px; margin-bottom: 12px; }
  .card-head { padding: 11px 12px; flex-wrap: wrap; gap: 6px; }
  .card-body { padding: 12px; }
  .grid { gap: 10px; }

  /* ---- 23.4 触控目标 ≥40px（导航项 ≥44px） ---- */
  .btn, .btn-sm, .btn-xs, .link-btn, .btn-link, .icon-btn,
  .tabs .tab, .filter-actions .btn, .pager .btn, .demo-chip { min-height: 40px; }
  .btn { padding: 8px 14px; }
  .btn-sm { padding: 8px 12px; font-size: 13px; }
  .btn-link { display: inline-flex; align-items: center; padding: 6px 10px; }
  .nav-item { min-height: 44px; }
  .nav-group-head { min-height: 44px; }
  .icon-btn { min-width: 40px; justify-content: center; display: inline-flex; align-items: center; }
  .tabs { padding: 0 8px; }
  .tabs .tab { padding: 10px 12px; }

  /* ---- 23.5 iOS 防缩放：输入控件字号 ≥16px ---- */
  /* 需与基础规则 input[type=...] 同等特异性并靠后声明，才能覆盖 13px */
  input, select, textarea,
  input[type="text"], input[type="password"], input[type="number"], input[type="date"],
  input[type="month"], input[type="search"], input[type="time"], input[type="file"],
  .filter-item input, .filter-item select,
  .select-wrap select, .park-switch select { font-size: 16px; }
  textarea { line-height: 1.5; }
  .field-label { font-size: 13px; }
  .filter-item > label { font-size: 12px; }
  .filter-item { flex: 1 1 46%; }
  .filter-item.wide { flex: 1 1 100%; }
  .filter-item input, .filter-item select { min-width: 0; width: 100%; }
  .filter-item.wide input { min-width: 0; }

  /* ---- 23.6 表格（仍支持横滚 + 触控惯性 + 吸顶表头） ---- */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap thead th { position: sticky; top: 0; z-index: 2; }

  /* ---- 23.7 弹窗：整屏 + 底部按钮吸底 ---- */
  #modal-root .modal-mask { padding: 0; align-items: stretch; overflow: hidden; }
  #modal-root .modal {
    width: 100%; max-width: 100%; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh;
    border-radius: 0; display: flex; flex-direction: column; animation: none;
  }
  #modal-root .modal-head { flex: 0 0 auto; padding: 12px 14px; }
  #modal-root .modal-body {
    flex: 1 1 auto; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px;
  }
  #modal-root .modal-foot {
    flex: 0 0 auto; position: sticky; bottom: 0; z-index: 2;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px; background: #fff;
  }
  #modal-root .modal-foot .btn { flex: 1 1 0; justify-content: center; min-height: 48px; }
  #modal-root .modal-foot .btn-link { flex: 0 0 auto; }
  /* 走访签到 / 抄表：主操作按钮放大到 48px+ */
  #modal-root .modal-foot .btn.m-checkin-submit, .m-checkin-submit { min-height: 48px; }

  /* 抽屉：整屏宽 + 底部吸底 */
  #drawer-root .drawer { width: 100%; max-width: 100%; }
  #drawer-root .drawer-body { -webkit-overflow-scrolling: touch; padding: 14px; }
  #drawer-root .drawer-foot {
    position: sticky; bottom: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px; background: #fff; flex-wrap: wrap;
  }
  #drawer-root .drawer-foot .btn { flex: 1 1 0; justify-content: center; min-height: 48px; }

  /* ---- 23.8 移动端卡片列表（isMobile() 分支渲染，替代表格） ---- */
  .m-card-list {
    display: flex; flex-direction: column; gap: 10px;
    padding: 10px 12px; -webkit-overflow-scrolling: touch;
  }
  .m-card {
    border: 1px solid var(--border); border-radius: 10px; background: #fff;
    padding: 12px; box-shadow: 0 1px 2px rgba(17, 30, 51, .04);
  }
  .m-card.clickable { cursor: pointer; }
  .m-card.clickable:active { background: #F7FAFF; }
  .m-card-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; word-break: break-all; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .m-card-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; word-break: break-all; }
  .m-card-rows { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 12px; font-size: 13px; margin: 9px 0 0; }
  .m-card-rows dt { color: var(--text-3); font-size: 12.5px; }
  .m-card-rows dd { margin: 0; text-align: right; word-break: break-all; }
  .m-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
  .m-card-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
  .m-card-ops .btn { flex: 1 1 0; justify-content: center; min-height: 42px; font-size: 13.5px; }
  .m-card-ops .btn-link {
    flex: 1 1 0; justify-content: center; min-height: 42px; padding: 0 10px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13.5px;
  }
  .m-card-ops .btn-link:hover { text-decoration: none; background: #F7FAFF; }
  .m-card-ops .btn-link.danger { border-color: #F2C2C2; }
  .m-card-list .table-empty, .m-card-list .table-loading { padding: 26px 8px; }
  .m-list-note { padding: 8px 12px 0; font-size: 12px; color: var(--text-3); }

  /* ---- 23.9 走访签到（现场拍照 / 定位） ---- */
  .m-file-input {
    width: 100%; border: 1px dashed #C3D2E8; border-radius: 10px; background: #F8FBFF;
    padding: 12px; font-size: 14px; color: var(--text-2);
  }
  .m-checkin-photo { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
  .m-checkin-photo img {
    width: 92px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block;
  }
  .m-checkin-geo { display: flex; gap: 8px; margin-top: 10px; }
  .m-checkin-geo .btn { flex: 1 1 0; justify-content: center; min-height: 48px; }
  .m-checkin-submit { min-height: 48px; }
  .m-geo-status { font-size: 12.5px; color: var(--text-3); margin-top: 8px; line-height: 1.6; }
  .m-geo-status.ok { color: var(--success); }
  .m-geo-status.bad { color: var(--danger); }

  /* ---- 23.10 水电抄表：数字键盘 + 金额大字号 ---- */
  .m-amount-field input { font-size: 22px; font-weight: 700; text-align: right; height: 52px; letter-spacing: .5px; }
  .m-amount-field .field-label { font-size: 13px; color: var(--text-2); font-weight: 600; }
  .m-usage-grid .field input { height: 46px; text-align: right; font-weight: 600; }
}

@media (max-width: 640px) {
  /* 手机竖屏：统计卡单列、字号微调、隐藏非必要装饰 */
  .grid.g2, .grid.g3, .grid.g4, .grid.g5, .grid.g6 { grid-template-columns: 1fr; }
  .stat-card { padding: 12px 13px; }
  .stat-card .stat-value { font-size: 22px; }
  .stat-card .stat-sub { font-size: 11.5px; }
  .card-head h3 { font-size: 13.5px; }
  .content { padding: 10px 10px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .card-head .ch-right .fs12.muted { display: none; }
  .crumb { font-size: 11px; }
  .topbar-title h1 { font-size: 14.5px; }
  .avatar { width: 30px; height: 30px; }
  .m-card-ops .btn { flex: 1 1 44%; }
  .m-card-ops .btn-link { flex: 1 1 44%; }
  .filter-actions { width: 100%; margin-left: 0; }
  .filter-actions .btn { flex: 1 1 0; justify-content: center; }
}

/* ==========================================================================
   24. 走访证明（证据链）：三要素 + 签到流水 + 指纹校验
   仅用于新增的「✍️ 走访证明」区块，不改动任何既有组件样式。
   ========================================================================== */
.ev-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ev-verdict.ok { background: var(--success-bg); border-color: #BFE3CB; color: #1F7A45; }
.ev-verdict.bad { background: var(--danger-bg); border-color: #F7C9C9; color: #B4232A; }
.ev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ev-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #FBFDFF;
  padding: 12px 13px; display: flex; flex-direction: column; gap: 7px; min-width: 0;
}
.ev-k { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-lock { font-size: 11px; font-weight: 500; color: #7A4BB5; background: #F3EDFC; border-radius: 4px; padding: 1px 6px; }
.ev-v { font-size: 13.5px; color: var(--text); line-height: 1.65; word-break: break-word; }
.ev-content { white-space: pre-wrap; }
.ev-note { font-size: 11.5px; color: var(--text-3); line-height: 1.6; word-break: break-word; }
.ev-map-link { color: var(--primary); text-decoration: none; white-space: nowrap; }
.ev-map-link:hover { text-decoration: underline; }
.ev-photo-box { display: flex; align-items: center; gap: 9px; margin-top: 2px; }
.ev-photo {
  width: 72px; height: 72px; flex: 0 0 auto; border-radius: 6px; border: 1px solid var(--border);
  background: var(--gray-bg); display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.ev-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-photo.sm { width: 40px; height: 40px; border-radius: 4px; }
.ev-photo.sm .spinner { width: 10px; height: 10px; }
.ev-flow .tbl { font-size: 12.5px; }
.ev-flow .m-card-list { padding: 0; }
@media (max-width: 1080px) {
  .ev-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .ev-item { padding: 11px; }
  .ev-v { font-size: 14px; }
  .ev-photo { width: 84px; height: 84px; }
  #drawer-root .drawer-foot #vd-print { flex: 1 1 100%; }
}

/* ======================= 数据导入中心（四步向导） ======================= */
.iw-steps {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.iw-step {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 20px;
  border: 1px solid var(--border); background: #fff; color: var(--text-3); font-size: 13px;
  white-space: nowrap; cursor: pointer;
}
.iw-step .iw-num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--gray-bg); color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600;
}
.iw-step.active { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-light); font-weight: 600; }
.iw-step.active .iw-num { background: var(--primary); color: #fff; }
.iw-step.done { border-color: #BFE9CF; color: var(--success); }
.iw-step.done .iw-num { background: var(--success); color: #fff; }
.iw-body { padding: 16px; }
.iw-card {
  position: relative; border: 1px solid var(--border); border-radius: 8px; padding: 14px;
  background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.iw-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(46,125,247,.08); }
.iw-card.sel { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.iw-card .iw-ic { font-size: 22px; line-height: 1; }
.iw-card .iw-name { font-weight: 600; font-size: 14px; margin: 7px 0 4px; }
.iw-card .iw-dep { font-size: 12px; color: var(--text-3); min-height: 34px; line-height: 1.55; }
.iw-card .iw-ops { display: flex; gap: 8px; margin-top: 10px; }
/* 模板引导条：主色浅底 + 左侧色条，比普通 notice 更醒目 */
.iw-tplbar {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px 12px 12px;
  background: var(--primary-light); border: 1px solid #C7DCFB; border-left: 4px solid var(--primary);
  border-radius: 8px;
}
.iw-tplbar-ic { font-size: 26px; line-height: 1; flex: 0 0 auto; }
.iw-tplbar-main { flex: 1 1 auto; min-width: 0; }
.iw-tplbar-title { font-size: 14.5px; font-weight: 600; color: var(--primary-dark); }
.iw-tplbar-sub { font-size: 12.5px; color: var(--text-2, #475569); margin-top: 3px; line-height: 1.6; }
.iw-tplbar-sub b { color: var(--primary-dark); }
.iw-tplbar-ops { display: flex; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; }
.iw-drop {
  border: 1.5px dashed var(--border); border-radius: 8px; padding: 24px 16px; text-align: center;
  color: var(--text-3); background: var(--gray-bg); cursor: pointer;
}
.iw-drop.over { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.iw-stat { display: flex; gap: 10px; flex-wrap: wrap; }
.iw-chip { border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 13px; background: #fff; }
.iw-chip b { font-size: 16px; margin-left: 4px; }
.iw-chip.good { border-color: #BFE9CF; background: var(--success-bg); color: var(--success); }
.iw-chip.bad { border-color: #F5C7C7; background: var(--danger-bg); color: var(--danger); }
.iw-row-bad > td { background: #FFF7F7; }
.iw-row-warn > td { background: #FFFBF0; }
.iw-err { color: var(--danger); }
.iw-warn { color: #B45309; }
.iw-src { color: var(--text-3); font-size: 11.5px; word-break: break-all; max-width: 420px; }
.iw-txt { white-space: pre-wrap; word-break: break-all; font-size: 12.5px; line-height: 1.6; }
.iw-result { display: flex; gap: 14px; flex-wrap: wrap; }
.iw-rbox { flex: 1 1 150px; border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: #fff; }
.iw-rbox .iw-rv { font-size: 26px; font-weight: 700; line-height: 1.2; }
.iw-rbox .iw-rl { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.iw-rbox.good { border-color: #BFE9CF; } .iw-rbox.good .iw-rv { color: var(--success); }
.iw-rbox.cyan .iw-rv { color: var(--info); }
.iw-rbox.amber { border-color: #F5E3BF; } .iw-rbox.amber .iw-rv { color: #B45309; }
.iw-rbox.bad { border-color: #F5C7C7; } .iw-rbox.bad .iw-rv { color: var(--danger); }
.iw-tbl { font-size: 12.5px; }
.iw-tbl th { white-space: nowrap; }
/* 基础规则里 select 是 width:100%，这里按内容自适应宽度 */
.iw-mode { width: auto; max-width: 260px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 4px; font-size: 12.5px; }
@media (max-width: 860px) {
  .iw-body { padding: 12px; }
  .iw-step { min-height: 40px; padding: 8px 13px; }
  .iw-card { padding: 12px; }
  .iw-card .iw-ops .btn { min-height: 40px; flex: 1; }
  .iw-drop { padding: 18px 12px; }
  .iw-src { max-width: 200px; }
  .iw-rbox { flex: 1 1 44%; }
  /* 窄屏：引导条按钮换行、整行铺满，不溢出 */
  .iw-tplbar { flex-wrap: wrap; align-items: flex-start; }
  .iw-tplbar-main { flex: 1 1 100%; order: 2; }
  .iw-tplbar-ic { order: 1; }
  .iw-tplbar-ops { order: 3; flex: 1 1 100%; }
  .iw-tplbar-ops .btn { flex: 1 1 46%; min-height: 40px; }
  .iw-drop .btn { min-height: 40px; }
}

/* ======================= 招商 CRM（漏斗 / 跟进时间线） ======================= */
.crm-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.crm-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.crm-legend .dot.blue { background: #2E7DF7; }
.crm-legend .dot.green { background: #12B76A; }
.crm-fn-head, .crm-fn-row {
  display: grid; grid-template-columns: 92px 1fr 84px 84px; gap: 10px; align-items: center;
}
.crm-fn-head { font-size: 11.5px; color: var(--text-3); padding: 0 0 6px; }
.crm-fn-head span:nth-child(3), .crm-fn-head span:nth-child(4) { text-align: right; }
.crm-funnel { display: flex; flex-direction: column; gap: 9px; }
.crm-fn-row { font-size: 12.5px; }
.crm-fn-label { color: var(--text-2, #475569); white-space: nowrap; }
.crm-fn-track { background: var(--gray-bg); border-radius: 5px; height: 26px; overflow: hidden; }
.crm-fn-fill {
  height: 100%; border-radius: 5px; display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8px; color: #fff; font-size: 11.5px; min-width: 46px; transition: width .25s;
  background: linear-gradient(90deg, #2E7DF7, #5B9BFF);
}
.crm-fn-fill.s1 { background: linear-gradient(90deg, #2E7DF7, #4F93F5); }
.crm-fn-fill.s2 { background: linear-gradient(90deg, #0EA5E9, #38BDF8); }
.crm-fn-fill.s3 { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.crm-fn-fill.s4 { background: linear-gradient(90deg, #7C3AED, #A78BFA); }
.crm-fn-fill.s5 { background: linear-gradient(90deg, #12B76A, #34D399); }
.crm-fn-rate, .crm-fn-cum { text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.crm-fn-cum { color: var(--text-3); }
.crm-tl { position: relative; padding-left: 18px; }
.crm-tl::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.crm-tl-item { position: relative; padding: 0 0 14px; }
.crm-tl-dot {
  position: absolute; left: -17px; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 2px var(--primary-light);
}
.crm-tl-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 12.5px; }
.crm-tl-txt {
  font-size: 13px; line-height: 1.7; margin-top: 3px; white-space: pre-wrap; word-break: break-word;
  background: var(--gray-bg); border-radius: 6px; padding: 7px 10px;
}
@media (max-width: 860px) {
  .crm-fn-head, .crm-fn-row { grid-template-columns: 70px 1fr 60px; }
  .crm-fn-head span:nth-child(4), .crm-fn-cum { display: none; }
  .crm-tl { padding-left: 14px; }
}

/* ======================= 退租与押金结算（清算金额卡） ======================= */
.co-money { display: flex; gap: 12px; flex-wrap: wrap; }
.co-mbox {
  flex: 1 1 170px; min-width: 150px; border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; background: #fff;
}
.co-mbox .co-ml { font-size: 12.5px; color: var(--text-3); }
.co-mbox .co-mv { font-size: 22px; font-weight: 700; line-height: 1.25; margin-top: 3px; letter-spacing: -.2px; }
.co-mbox.good { border-color: #BFE9CF; background: var(--success-bg); }
.co-mbox.good .co-mv { color: var(--success); }
.co-mbox.warn { border-color: #F5E3BF; background: var(--warning-bg); }
.co-mbox.warn .co-mv { color: #B45309; }
.co-mbox.bad { border-color: #F5C7C7; background: var(--danger-bg); }
.co-mbox.bad .co-mv { color: var(--danger); }
@media (max-width: 860px) {
  .co-money { gap: 8px; }
  .co-mbox { flex: 1 1 44%; min-width: 0; padding: 10px 12px; }
  .co-mbox .co-mv { font-size: 18px; }
}

/* ======================= 第1轮界面优化：一级导航项 / 顶栏入口 ======================= */
/* 分组只有 1 个页面时，直接渲染为一级可点项（不再「分组标题 + 唯一子项」两层） */
.nav-solo .nav-item { padding-left: 16px; font-weight: 500; }
.nav-solo .nav-item .ni-ic { font-size: 13px; width: 15px; }
.topbar-entry { position: relative; }
.topbar-badge {
  position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; line-height: 16px;
  padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px;
  font-weight: 600; text-align: center; box-sizing: border-box;
}
.topbar-badge.hidden { display: none; }
@media (max-width: 860px) {
  .topbar-entry { padding: 5px; }
}

/* ======================= 空间总览（跨园区房源分布） ======================= */
.sp-park { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; background: #fff; }
.sp-park-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer;
  background: #FBFCFF; border-bottom: 1px solid transparent;
}
.sp-park.open .sp-park-head { border-bottom-color: var(--border-2); }
.sp-park-ic { font-size: 13px; color: var(--text-3); transition: transform .15s; }
.sp-park.open .sp-park-ic { transform: rotate(90deg); }
.sp-park-name { font-weight: 600; font-size: 14px; }
.sp-park-name .sp-link { color: var(--primary); }
.sp-park-sum { margin-left: auto; font-size: 12.5px; color: var(--text-2); text-align: right; }
.sp-park-body { display: none; }
.sp-park.open .sp-park-body { display: block; }
.sp-bld { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 30px; font-size: 12.5px; border-top: 1px solid var(--border-2); }
.sp-bld:first-child { border-top: 0; }
.sp-bld-name { font-weight: 600; min-width: 92px; }
.sp-bld-bar { flex: 1 1 auto; height: 8px; border-radius: 5px; background: var(--st-vacant); overflow: hidden; min-width: 60px; }
.sp-bld-bar > i { display: block; height: 100%; background: var(--st-rented); }
.sp-bld-meta { color: var(--text-2); white-space: nowrap; }
.sp-bld-meta b { color: var(--text); }
@media (max-width: 860px) {
  .sp-park-head { flex-wrap: wrap; }
  .sp-park-sum { margin-left: 0; flex: 1 1 100%; text-align: left; font-size: 12px; }
  .sp-bld { padding-left: 16px; flex-wrap: wrap; }
  .sp-bld-bar { flex: 1 1 100%; order: 3; }
}

/* ======================= 第2/3轮：栏目内园区选择器（下拉） + 功能开关 ======================= */
.park-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 14px; margin-bottom: 12px;
}
.park-bar-label { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.park-bar-select {
  width: auto; min-width: 190px; max-width: 320px; padding: 6px 10px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--text);
  cursor: pointer;
}
.park-bar-select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px var(--primary-light); }
.park-bar-cur { font-weight: 600; font-size: 13.5px; }
.park-bar-note { font-size: 12.5px; color: var(--text-2); }
.park-bar-note b { color: var(--text); }
/* 兼容旧按钮组样式（历史版本，保留避免残留类名无样式） */
.park-bar-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.park-bar-btn {
  border: 1px solid var(--border); background: #fff; border-radius: var(--radius-sm); padding: 5px 12px;
  font-size: 12.5px; cursor: pointer; color: var(--text-2); font-family: inherit;
}
.park-bar-btn:hover { border-color: var(--primary); color: var(--primary); }
.park-bar-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 开关（formHTML type=checkbox） */
.switch-row { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; padding: 2px 0; }
.switch-row input[type="checkbox"] {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.switch-ui {
  width: 38px; height: 21px; border-radius: 11px; background: #D6DEEA; position: relative;
  transition: background .15s; flex: 0 0 auto;
}
.switch-ui::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .2); transition: transform .15s;
}
.switch-row input:checked + .switch-ui { background: var(--success); }
.switch-row input:checked + .switch-ui::after { transform: translateX(17px); }
.switch-row input:focus-visible + .switch-ui { box-shadow: 0 0 0 3px var(--primary-light); }
.switch-txt { font-size: 13px; color: var(--text-2); }
.form-group-sep { margin: 4px 0 -2px; }
.fg-title {
  font-size: 12.5px; font-weight: 600; color: var(--text-2); padding-bottom: 6px;
  border-bottom: 1px solid var(--border-2);
}
@media (max-width: 860px) {
  .park-bar { padding: 8px 10px; gap: 8px; }
  .park-bar-select { min-width: 0; flex: 1 1 100%; max-width: none; font-size: 16px; }
  .park-bar-note { flex: 1 1 100%; }
}

/* ======================= 演示数据管理 ======================= */
.demo-intro { border-left: 3px solid var(--primary); }
.demo-intro-row { display: flex; align-items: flex-start; gap: 12px; }
.demo-intro-ic { font-size: 26px; line-height: 1; }
.demo-intro-t { font-weight: 600; font-size: 15px; }
.demo-intro-row > div { flex: 1 1 auto; }
.demo-safe { border-left: 3px solid var(--success); }
.demo-fold { font-size: 12.5px; color: var(--text-2); }
.demo-fold summary { cursor: pointer; color: var(--primary); }
.demo-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-tag {
  font-size: 11.5px; font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--gray-bg); color: var(--text-2); border-radius: 4px; padding: 2px 7px;
}
.demo-plan { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.demo-plan-col { flex: 1 1 300px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.demo-plan-col.del { background: var(--danger-bg); border-color: #F5C7C7; }
.demo-plan-col.keep { background: var(--success-bg); border-color: #BFE9CF; }
.demo-plan-t { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.demo-ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.75; color: var(--text-2); }
.demo-confirm-input {
  width: 100%; padding: 8px 10px; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .5px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.demo-confirm-input:focus { border-color: var(--danger); outline: none; box-shadow: 0 0 0 2px var(--danger-bg); }
@media (max-width: 860px) {
  .demo-plan-col { flex: 1 1 100%; }
  .demo-confirm-input { font-size: 16px; }
}

/* ==========================================================================
   网站底部备案信息（工信部合规要求：备案号必须链接至工信部官网首页）
   注意：登录页左深右浅，白字会在右侧白底上"隐形"，故登录页用深色文字 + 白底
   ========================================================================== */
.site-footer {
  padding: 14px 20px 18px;
  text-align: center;
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-3, #8a93a0);
  border-top: 1px solid var(--border, #e8eaed);
  background: transparent;
  flex-shrink: 0;
}
/* 登录页页脚：位于右侧白色面板底部 */
.site-footer-login {
  border-top: none;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  color: #8a93a0;
  background: transparent;
  margin-top: auto;
}
.login-panel { display: flex; flex-direction: column; }
.site-footer-login .sf-link { color: #6b7280; }
.sf-item { white-space: nowrap; }
.sf-sep { margin: 0 8px; opacity: .45; }
.sf-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.sf-link:hover,
.sf-link:focus-visible {
  color: var(--brand, #2563eb);
  border-bottom-color: currentColor;
  outline: none;
}
.sf-police-ic {
  width: 12px; height: 12px;
  vertical-align: -1px;
  margin-right: 3px;
}
/* 主界面底部：内容区撑满剩余高度，页脚自然落在底部 */
.content { flex: 1 1 auto; }
@media (max-width: 860px) {
  /* 移动端登录页只有一列（隐藏左侧品牌区），此时底色为白，深色文字同样适用 */
  .site-footer { font-size: 11px; }
  .site-footer-login { padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); }
  .sf-sep { margin: 0 5px; }
}

/* ==========================================================================
   登录页 logo 与「关于我们」企业简介（2026-10 新增）
   ========================================================================== */
.login-logo-img {
  display: block;
  width: 190px;
  max-width: 62%;
  height: auto;
  margin: 0 0 26px;
}
.login-brand-inner h1 {
  font-size: 26px;
  line-height: 1.35;
  letter-spacing: .5px;
  margin: 0 0 20px;
  font-weight: 700;
}
.login-about {
  max-width: 520px;
  font-size: 13px;
  line-height: 1.95;
  color: rgba(255, 255, 255, .74);
}
.login-about p { margin: 0 0 12px; }
.login-about p:last-child { margin-bottom: 0; }
.login-about b { color: #fff; font-weight: 600; }
/* 侧栏 logo（彩色图标，白底） */
.sidebar-logo-img {
  width: 30px;
  height: auto;
  flex: 0 0 auto;
  display: block;
}
@media (max-width: 1100px) {
  .login-logo-img { width: 160px; }
  .login-brand-inner h1 { font-size: 23px; }
  .login-about { font-size: 12.5px; line-height: 1.85; }
}

/* ======================= 栏目横向页签（第4轮栏目结构重构） ======================= */
.sec-tabs {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 12px; margin-bottom: 12px;
}
.sec-tabs-title { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.sec-tabs-list { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; }
.sec-tab {
  border: 1px solid transparent; background: transparent; border-radius: var(--radius-sm);
  padding: 5px 12px; font-size: 13px; color: var(--text-2); cursor: pointer; font-family: inherit;
  white-space: nowrap;
}
.sec-tab:hover { background: var(--gray-bg); color: var(--text); }
.sec-tab.active { background: var(--primary-light); color: var(--primary); border-color: #C7DBFB; font-weight: 600; }
@media (max-width: 860px) {
  .sec-tabs { padding: 6px 8px; gap: 6px; }
  .sec-tabs-title { font-size: 12px; }
  .sec-tabs-list { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .sec-tab { padding: 7px 12px; min-height: 36px; }
}

/* 危险/警告样式的行内按钮 + 楼层行 */
.btn-link.warn { color: #B45309; }
.btn-link.warn:hover { color: #92400E; }
.btn-link[disabled] { color: var(--text-3); cursor: not-allowed; text-decoration: none; }
.rec-floor { display: inline-flex; align-items: center; gap: 2px; margin-right: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* 多选 + 选中操作条（用户管理等批量操作） */
.sel-col { width: 40px; text-align: center; }
.sel-col input { width: 15px; height: 15px; cursor: pointer; }
.sel-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--primary-light); border: 1px solid #C7DBFB; border-radius: var(--radius-sm);
  padding: 8px 12px; margin-bottom: 10px;
}
.sel-count { font-size: 13px; color: var(--text-2); }
.sel-count b { color: var(--primary); }
.batch-res { max-height: 300px; overflow: auto; }
.batch-res h4 { margin: 10px 0 6px; font-size: 13px; }

/* 跨园区汇总页的静态说明（替代园区选择器） */
.park-sum-tip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  color: var(--text-2); background: var(--bg-2); border: 1px dashed var(--border);
  border-radius: 999px; padding: 4px 12px;
}

/* 打印件统一抬头/落款（公司全称 + 备案号 + 打印时间） */
.p-org { font-size: 11px; color: #555; margin-top: 2px; }
.p-foot {
  margin-top: 14px; padding-top: 8px; border-top: 1px dashed #bbb;
  font-size: 11px; color: #666; text-align: center;
}
.p-foot-sep { margin: 0 4px; color: #bbb; }

/* 折叠式说明块（把长清单收进「查看支持的表头」，避免页面被解释文案占满） */
.notice.fold { padding: 0; }
.notice.fold > summary {
  cursor: pointer; padding: 8px 12px; font-size: 12.5px; font-weight: 600; list-style: none;
}
.notice.fold > summary::-webkit-details-marker { display: none; }
.notice.fold > summary::before { content: '▸ '; color: var(--text-3); }
.notice.fold[open] > summary::before { content: '▾ '; }
.notice.fold .fold-body { padding: 0 12px 8px; font-size: 12.5px; line-height: 1.6; }

/* 移动端触控目标：主要操作 ≥44px、次要操作 ≥32px（只作用于窄屏，不影响桌面布局） */
@media (max-width: 860px) {
  .m-card-ops .btn, .m-card-ops .btn-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .toolbar .btn, .card-head .btn, .filter-actions .btn { min-height: 44px; }
  .modal-close, .drawer-close { min-width: 36px; min-height: 36px; }
  .tab { min-height: 40px; }
  .btn-link { min-height: 32px; display: inline-flex; align-items: center; }
}

/* 窄屏：卡片头部/操作区允许换行，避免（政府端）园区按钮组把布局撑出屏幕 */
@media (max-width: 860px) {
  .card-head { flex-wrap: wrap; row-gap: 6px; }
  .card-head .ch-right { flex-wrap: wrap; justify-content: flex-start; min-width: 0; max-width: 100%; row-gap: 6px; }
  .ch-right .btn-group { flex-wrap: wrap; justify-content: flex-start; min-width: 0; max-width: 100%; row-gap: 6px; }
  .ch-right .btn-group .btn { max-width: 100%; }
}

/* ==========================================================================
   表格批量录入（房间 / 工位 / 企业 / 水电费 共用）
   业主：批量录入不要「粘贴 CSV 文本」，直接在表格里填；房号工位号连号要能一次铺开。
   ========================================================================== */
.gb-sec-title { font-size: 12px; font-weight: 700; color: var(--text-2); margin: 12px 0 6px; }
.gb-sec-title:first-child { margin-top: 0; }
.gb-seq { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; background: #F7F9FC; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; }
.gb-seq .f { display: flex; flex-direction: column; gap: 3px; }
.gb-seq .f label { font-size: 11.5px; color: var(--text-3); }
.gb-seq .f input { height: 32px; width: 150px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 8px; font-size: 12.5px; background: #fff; color: var(--text); }
.gb-seq .f input#gb-seq-count { width: 92px; }
.gb-seq-hint { font-size: 11.5px; color: var(--text-3); padding-bottom: 7px; }
.gb-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.gb-toolbar .gb-count { margin-left: auto; font-size: 12px; color: var(--text-3); }
.gb-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); max-height: 320px; overflow: auto; background: #fff; }
.gb-empty-cell { padding: 22px 12px !important; text-align: center; color: var(--text-3); font-size: 12.5px; }
table.grid-batch { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.grid-batch th { position: sticky; top: 0; z-index: 2; background: #F7F9FC; color: var(--text-3); font-weight: 600; text-align: left; padding: 7px 8px; white-space: nowrap; border-bottom: 1px solid var(--border); }
table.grid-batch td { padding: 4px 6px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
table.grid-batch tr:last-child td { border-bottom: none; }
table.grid-batch tr:hover td { background: #FBFCFE; }
table.grid-batch .gb-idx { color: var(--text-3); text-align: center; font-size: 11.5px; }
table.grid-batch input, table.grid-batch select { width: 100%; min-width: 72px; height: 30px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 7px; font-size: 12.5px; background: #fff; color: var(--text); }
table.grid-batch input:focus, table.grid-batch select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(46, 125, 247, .12); outline: none; }
table.grid-batch input.invalid { border-color: var(--danger); }
table.grid-batch .gb-del { border: none; background: none; color: var(--danger); cursor: pointer; font-size: 12px; padding: 4px 2px; }
table.grid-batch .gb-del:hover { text-decoration: underline; }
.gb-result .code-block { max-height: 220px; overflow: auto; }
/* 窄屏：批量录入弹窗铺满宽度，表格横向滚动 */
@media (max-width: 860px) {
  .gb-seq .f input { width: 100%; }
  .gb-seq .f { flex: 1 1 120px; }
  .gb-table-wrap { max-height: 46vh; }
  table.grid-batch input, table.grid-batch select { min-height: 38px; font-size: 13px; }
}

/* 分页条吸底：列表很长时也总能看见「共 N 条 / 每页条数 / 翻页」，不用滚到最底部 */
.pager {
  position: sticky; bottom: 0; z-index: 6;
  background: var(--card);
  box-shadow: 0 -6px 12px -10px rgba(24, 45, 80, .25);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}
.pager select[data-act="size"] { cursor: pointer; }
@media (max-width: 860px) {
  .pager { flex-wrap: wrap; gap: 8px 10px; padding: 9px 12px; }
  .pager .pg-list { margin-left: 0; }
}

/* ---------- 运营总览 Hero + 2.5D 园区楼宇视图 ---------- */
.dash-hero {
  position: relative; overflow: hidden; border-radius: var(--radius);
  margin-bottom: 12px; min-height: 196px;
  background: linear-gradient(120deg, #0B2A5B 0%, #17458F 45%, #2E7DF7 100%);
  color: #fff;
}
.hero-photo {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.02); transition: opacity .5s ease;
}
.hero-photo.has-photo { opacity: 1; }
.hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(4, 16, 38, .86) 0%, rgba(4, 16, 38, .55) 55%, rgba(4, 16, 38, .28) 100%);
}
.hero-content { position: relative; padding: 20px 24px 18px; display: flex; flex-direction: column; gap: 10px; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.hero-park { font-size: 21px; font-weight: 700; letter-spacing: .5px; line-height: 1.25; }
.hero-meta { font-size: 12.5px; color: rgba(255, 255, 255, .78); margin-top: 4px; }
.hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-actions .btn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; }
.hero-actions .btn:hover { background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .5); color: #fff; }
.hero-actions .btn.active { background: #fff; border-color: #fff; color: #17458F; font-weight: 600; }
.hero-actions .btn-group { background: rgba(255, 255, 255, .10); border-radius: 8px; padding: 2px; }
.hero-chips { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 2px; }
.hero-chip { display: flex; flex-direction: column; gap: 2px; }
.hero-chip .k { font-size: 11.5px; color: rgba(255, 255, 255, .70); }
.hero-chip .v { font-size: 19px; font-weight: 700; letter-spacing: .3px; }
.hero-note { color: rgba(255, 255, 255, .74) !important; background: transparent !important; border: none !important; padding: 0 !important; }
.hero-note b { color: #fff; }

.dash3d-wrap { position: relative; width: 100%; }
.dash3d-wrap canvas { display: block; width: 100%; border-radius: var(--radius-sm); background: #F7FAFF; }
.dash3d-tip {
  position: absolute; display: none; z-index: 6; pointer-events: none;
  background: #0F172A; color: #fff; font-size: 12px; line-height: 1.55;
  padding: 8px 10px; border-radius: 8px; max-width: 230px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .28);
}
.dash3d-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.dash3d-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
@media (max-width: 860px) {
  .dash-hero { min-height: 176px; }
  .hero-content { padding: 16px 16px 14px; }
  .hero-park { font-size: 18px; }
  .hero-chips { gap: 18px; }
  .hero-chip .v { font-size: 17px; }
}

/* ---------- 看板下钻（楼宇 → 楼层 → 房间热力） ---------- */
.hidden { display: none !important; }
.drill-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.drill-crumb { font-size: 13px; color: var(--text-2); }
.drill-crumb .crumb-link { color: var(--primary); cursor: pointer; }
.drill-crumb .crumb-link:hover { text-decoration: underline; }
.drill-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 12px; }
.drill-stats .ds { display: flex; flex-direction: column; gap: 2px; }
.drill-stats .ds .k { font-size: 11.5px; color: var(--text-2); }
.drill-stats .ds .v { font-size: 18px; font-weight: 700; }
.drill-grid { display: grid; grid-template-columns: minmax(320px, 46%) 1fr; gap: 16px; align-items: start; }
.drill-left, .drill-right { min-width: 0; }
.heat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.heat-cell {
  border: 1px solid rgba(15, 23, 42, .08); border-radius: 8px; padding: 8px 6px; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  background: #fff; transition: transform .12s ease, box-shadow .12s ease;
}
.heat-cell:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15, 23, 42, .12); }
.heat-cell .hc-no { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.2; }
.heat-cell .hc-ent { font-size: 10.5px; color: var(--text-2); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.heat-rented { background: #DCFCE7; border-color: #86EFAC; }
.heat-rented .hc-no { color: #166534; }
.heat-vacant { background: #E0F2FE; border-color: #7DD3FC; }
.heat-vacant .hc-no { color: #075985; }
.heat-reserved { background: #FEF3C7; border-color: #FCD34D; }
.heat-reserved .hc-no { color: #92400E; }
.heat-repair { background: #E2E8F0; border-color: #CBD5E1; }
.heat-other { background: #F1F5F9; border-color: #E2E8F0; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.legend-dot.heat-rented { background: #86EFAC; }
.legend-dot.heat-vacant { background: #7DD3FC; }
.legend-dot.heat-reserved { background: #FCD34D; }
.legend-dot.heat-repair { background: #CBD5E1; }
@media (max-width: 1100px) {
  .drill-grid { grid-template-columns: 1fr; }
}

/* ---------- 大屏模式 ---------- */
body.screen-mode { background: #071A33; }
body.screen-mode #sidebar { display: none; }
body.screen-mode .main { margin-left: 0; }
body.screen-mode .topbar { display: none; }
body.screen-mode #page { padding-top: 72px; background: transparent; }
body.screen-mode .card { background: rgba(255, 255, 255, .96); }
body.screen-mode .hero-park { font-size: 30px; }
body.screen-mode .hero-chip .v { font-size: 26px; }
body.screen-mode .dash-hero { min-height: 240px; }
#screen-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; background: rgba(4, 16, 38, .92); color: #fff;
  backdrop-filter: blur(6px);
}
#screen-bar .sb-left { display: flex; flex-direction: column; gap: 2px; }
#screen-bar .sb-left b { font-size: 15.5px; letter-spacing: .5px; }
#screen-bar .sb-sub { font-size: 11.5px; color: rgba(255, 255, 255, .62); }
#screen-bar .sb-right { display: flex; align-items: center; gap: 14px; }
#screen-clock { font-family: ui-monospace, Menlo, monospace; font-size: 14px; color: rgba(255, 255, 255, .88); }
#screen-bar .btn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }
