:root {
  --red: #b91c1c; --red-d: #991b1b; --ink: #1f2937; --sub: #6b7280;
  --line: #e5e7eb; --bg: #f1f5f9; --card: #ffffff; --blue: #2563eb;
  --green: #16a34a; --radius: 12px; --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 16px;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
.btn-primary {
  background: var(--red); color: #fff; border: none; border-radius: 10px;
  padding: 0 18px; min-height: 40px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center; transition: background .15s;
}
.btn-primary:hover { background: var(--red-d); }
.btn-ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px; min-height: 40px; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; transition: background .15s;
}
.btn-ghost:hover { background: #f8fafc; }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #f1c4c4; border-radius: 10px; padding: 0 14px; min-height: 40px; font-size: 14px; }
.btn-danger:hover { background: #fef2f2; }
.btn-block { width: 100%; margin-bottom: 12px; }
.icon-btn { background: none; border: none; color: var(--sub); width: 40px; height: 40px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: #eee; }
input, select {
  font-size: 16px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; width: 100%; background: #fff; color: var(--ink); transition: border-color .15s;
}
input:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(185,28,28,.08); }
label { display: block; font-size: 12.5px; color: var(--sub); margin: 0 0 4px; }
.err { color: var(--red); font-size: 13px; margin-top: 8px; }

/* 登录 */
.login-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 30px 26px; width: 100%; max-width: 380px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brand-title { font-size: 18px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--sub); }
#loginForm label { margin-top: 14px; }
#loginForm .btn-primary { width: 100%; margin-top: 22px; }

/* 顶栏 */
.app-view { height: 100vh; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; }
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-title { font-weight: 700; font-size: 16px; }
.topbar-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.user-badge { font-size: 13px; color: var(--sub); margin-right: 4px; }

/* 布局：侧栏 + 主区 */
.layout { flex: 1; display: flex; min-height: 0; position: relative; }
.sidebar { width: 340px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; transition: width .2s, padding .2s, opacity .2s; }
.sidebar.collapsed { width: 0; padding: 0; opacity: 0; overflow: hidden; border-right: none; }
.sidebar-top { display: flex; flex-direction: column; gap: 10px; }
.sidebar-toggle {
  position: absolute; left: 340px; top: 50%; transform: translateY(-50%); z-index: 25;
  width: 22px; height: 48px; border: 1px solid var(--line); border-left: none;
  background: #fff; border-radius: 0 8px 8px 0; color: var(--sub);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: left .2s, background .15s;
  padding: 0;
}
.sidebar-toggle:hover { background: #f8fafc; color: var(--ink); }
.sidebar.collapsed ~ .sidebar-toggle { left: 0; }
.sidebar-toggle .icon-expand { display: none; }
.sidebar.collapsed ~ .sidebar-toggle .icon-collapse { display: none; }
.sidebar.collapsed ~ .sidebar-toggle .icon-expand { display: block; }
.search { margin-bottom: 4px; }
.sidebar-title { font-size: 12.5px; font-weight: 700; color: var(--sub); padding: 0 4px; letter-spacing: 1px; }

/* 高级查询筛选 */
.btn-filter-toggle {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: var(--red); border: 1px dashed #f1c4c4; border-radius: 10px;
  min-height: 40px; font-size: 14px; font-weight: 600; margin-bottom: 4px; transition: all .15s;
}
.btn-filter-toggle:hover, .btn-filter-toggle:active { background: #fef2f2; border-color: var(--red); }
.filter-panel { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 4px; }
.filter-panel.hidden { display: none; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-row { display: flex; flex-direction: column; gap: 4px; }
.filter-row > label { font-size: 12px; color: var(--sub); }
.filter-row input, .filter-row select { padding: 9px 10px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #1f2937; }
.filter-row input:focus, .filter-row select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 2px rgba(185,28,28,.12); }
.filter-range { display: flex; align-items: center; gap: 6px; }
.filter-range input { flex: 1; min-width: 0; padding: 9px 10px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; }
.filter-range input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 2px rgba(185,28,28,.12); }
.filter-range span { color: var(--sub); flex-shrink: 0; }
.filter-tip { font-size: 11.5px; color: var(--sub); background: #fef9f9; border: 1px dashed #fecaca; border-radius: 8px; padding: 6px 10px; }
.filter-actions { display: flex; gap: 8px; margin-top: 2px; }
.filter-actions .btn-primary, .filter-actions .btn-ghost { flex: 1; min-height: 40px; font-size: 14px; }
.filter-count { font-size: 11.5px; color: var(--sub); text-align: center; }
.proj-list { display: flex; flex-direction: column; gap: 8px; flex: 1; overflow-y: auto; }
/* 项目卡片：图片样式档案卡 */
.proj-item {
  position: relative; border: 1px solid #fee2e2; border-radius: 14px; padding: 11px 14px 11px 22px;
  background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
  cursor: pointer; overflow: hidden; flex-shrink: 0; min-height: 0;
  box-shadow: 0 2px 8px rgba(185,28,28,.06), 0 1px 2px rgba(0,0,0,.04);
  transition: border-color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.proj-item:hover {
  border-color: #fecaca; background: linear-gradient(135deg, #ffffff 0%, #fff0f0 100%);
  box-shadow: 0 4px 14px rgba(185,28,28,.10), 0 1px 3px rgba(0,0,0,.05);
  transform: translateY(-1px);
}
/* 左侧红色粗线 */
.proj-item::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 6px;
  background: linear-gradient(180deg, #ef4444, #b91c1c); border-radius: 0 6px 6px 0;
}
/* 选中态：嫩绿色滑动呼吸 */
.proj-item.active {
  border-color: #86efac; background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 0 0 3px rgba(74,222,128,.20), 0 6px 20px rgba(74,222,128,.18);
  transform: translateX(6px);
  animation: greenBreath 2.4s ease-in-out infinite;
}
.proj-item.active::before {
  width: 6px; background: linear-gradient(180deg, #86efac, #22c55e); border-radius: 0 6px 6px 0;
  animation: slideIn .35s ease;
}
/* 嫩绿色滑动光带 */
.proj-item.active::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(134,239,172,.38), transparent);
  transform: skewX(-20deg); pointer-events: none; border-radius: 12px;
  animation: slideShimmer 2.4s ease-in-out infinite;
}
@keyframes slideIn { from { transform: translateX(-120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideShimmer {
  0% { left: -60%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 140%; opacity: 0; }
}
@keyframes greenBreath {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,.18), 0 6px 18px rgba(74,222,128,.14); }
  50% { box-shadow: 0 0 0 6px rgba(74,222,128,.32), 0 8px 26px rgba(74,222,128,.24); }
}
.proj-item .pi-name { font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #111827; letter-spacing: .3px; }
.proj-item .pi-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 土地用途标签：横向并排、自动换行，紧凑不浪费空间 */
.pi-uses { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin-top: 7px; }
.pi-use-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pi-use-vals { font-size: 12.5px; font-weight: 600; color: #334155; }
.pi-use-idx { font-size: 12.5px; color: #94a3b8; font-weight: 600; white-space: nowrap; }
.pi-use-tag { font-size: 13.5px; font-weight: 700; color: #15803d; background: #f0fdf4; border: 1px solid #86efac; border-radius: 7px; padding: 3px 10px; line-height: 1.4; }
.proj-item.active .pi-use-tag { background: #dcfce7; box-shadow: 0 1px 4px rgba(74,222,128,.25); }
.pi-use-toggle { cursor: pointer; flex-direction: column; align-items: flex-start; gap: 3px; }
/* 展开明细时独占一整行，明细不挤压旁边的用途标签 */
.pi-use-toggle.open { flex-basis: 100%; }
.pi-use-toggle:hover .pi-use-tag { background: #dcfce7; }
.pi-caret { display: inline-block; margin-left: 6px; font-size: 11px; color: #16a34a; font-weight: 700; }
.pi-use-detail { font-size: 12.5px; font-weight: 600; color: #334155; padding: 3px 8px 1px 10px; line-height: 1.5; background: #f8fafc; border-left: 3px solid #86efac; border-radius: 0 6px 6px 0; width: 100%; box-sizing: border-box; }
.proj-item .pi-meta { font-size: 14px; font-weight: 600; color: #475569; margin-top: 6px; line-height: 1.4; word-break: break-all; }
.proj-item .pi-time { font-size: 12px; color: #94a3b8; margin-top: 4px; text-align: right; }
/* 「建筑总面积」：与普通信息项同样式（无底色），取项目级字段，不依赖逐版填写 */
.pi-build-pill { display: inline; background: none; color: inherit; border-radius: 0; padding: 0; font-size: inherit; font-weight: inherit; box-shadow: none; }
.pi-build-pill .pi-info-label { color: #64748b; font-weight: 600; }
.proj-item .pi-info { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 14px; font-weight: 600; color: #334155; }
.proj-item .pi-info span { white-space: nowrap; }
.proj-item .pi-info .pi-info-label { color: #64748b; font-weight: 600; }
.pi-tag { font-size: 11.5px; background: #fee2e2; color: var(--red); border-radius: 6px; padding: 3px 8px; border: 1px solid #fecaca; font-weight: 600; }
.proj-item.active .pi-tag { background: #dcfce7; color: #15803d; border-color: #86efac; }
.pi-actions { display: flex; align-items: center; gap: 6px; }
.pi-preview { background: none; border: none; color: #94a3b8; padding: 4px; border-radius: 6px; display: flex; align-items: center; cursor: pointer; transition: all .15s; }
.pi-preview:hover { background: #fee2e2; color: var(--red); }

.main { flex: 1; min-width: 0; overflow-y: auto; padding: 18px; }
.empty-state { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--sub); gap: 8px; text-align: center; }
.empty-state .es-title { font-size: 17px; font-weight: 700; color: #475569; margin-top: 6px; }
.empty-state .es-sub { font-size: 13px; max-width: 360px; }

/* 编辑器 */
.editor { max-width: 980px; margin: 0 auto; }
/* 冻结工具栏：录入时项目名与保存按钮始终固定在顶部，随时可点保存 */
.editor-head {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 15;
  background: rgba(241,245,249,.94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 10px 2px; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.proj-name { font-size: 19px; font-weight: 700; min-width: 220px; max-width: 360px; }
.editor-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.form-sections { display: flex; flex-direction: column; gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card-title { font-size: 16px; font-weight: 700; color: var(--red); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 4px; height: 18px; background: var(--red); border-radius: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field input, .field select { font-size: 16px; padding: 10px 12px; }
.field input[readonly] { background: #f8fafc; color: var(--sub); cursor: default; }
.field label { font-size: 13px; }
.auto-tag { font-size: 10.5px; color: var(--green); margin-left: 6px; }
.section-hint { font-size: 12.5px; color: var(--sub); margin: -4px 0 10px; }
/* 土地用途三级级联 */
.cascade { display: flex; gap: 6px; flex-wrap: wrap; }
.cascade select { flex: 1; min-width: 110px; font-size: 16px; padding: 10px 12px; }
.cascade select:disabled { background: #f1f5f9; color: #94a3b8; }

/* 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 30; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; z-index: 40; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); width: 760px; max-width: 94vw; max-height: 90vh; display: flex; flex-direction: column; }
.modal-sm { width: 420px; }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
#statsBody .stat-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
#statsBody .stat-card { flex: 1; min-width: 150px; background: #fafafa; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
#statsBody .stat-num { font-size: 24px; font-weight: 800; color: var(--red); }
#statsBody .stat-label { font-size: 12px; color: var(--sub); }
.chart-block { margin: 14px 0; }
.chart-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.bar-row .bar-label { width: 150px; flex-shrink: 0; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 16px; background: #eef2f7; border-radius: 8px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #ef4444, #b91c1c); border-radius: 8px; }
.bar-row .bar-val { width: 36px; text-align: right; color: var(--sub); }

.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 12px 20px; border-radius: 10px; z-index: 60; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.toast.ok { background: #166534; }
.toast.err { background: #991b1b; }

/* 导入 / 导出 */
.import-tip { font-size: 13px; color: var(--sub); line-height: 1.7; margin: 0 0 12px; }
.import-file-label { display: flex; align-items: center; border: 1.5px dashed var(--line); border-radius: 8px; padding: 12px; cursor: pointer; background: #fafafa; margin-bottom: 12px; }
.import-file-label input { display: none; }
.import-file-label span { font-size: 13px; color: var(--sub); }
.import-result { font-size: 13px; border-radius: 8px; padding: 10px 12px; background: #f0fdf4; color: #166534; white-space: pre-line; max-height: 180px; overflow-y: auto; }
.import-result.err { background: #fef2f2; color: #991b1b; }
.export-cond { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.export-cond .cond-row { display: flex; gap: 8px; align-items: center; }
.export-cond .cond-row input { flex: 1; }

/* 科技感全局背景增强（不影响桌面功能） */
body {
  background:
    radial-gradient(circle at 10% 20%, rgba(56, 189, 248, .06) 0%, transparent 25%),
    radial-gradient(circle at 90% 80%, rgba(34, 197, 94, .05) 0%, transparent 25%),
    var(--bg);
}
.app-view::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .04) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: .6;
}

/* 移动端顶栏菜单按钮（桌面端隐藏） */
.mobile-menu-btn {
  display: none; background: #fff; border: 1px solid var(--line);
  color: var(--ink); border-radius: 10px; width: 40px; height: 40px; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: all .2s;
}
.mobile-menu-btn:hover { background: #f8fafc; border-color: var(--red); color: var(--red); }

/* 移动端抽屉菜单（浅色高对比） */
.mobile-menu { position: fixed; inset: 0; z-index: 100; display: flex; }
.mobile-menu.hidden { display: none; }
.mobile-menu-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.mobile-menu-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: 280px; max-width: 82vw;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 40px rgba(0, 0, 0, .18);
  display: flex; flex-direction: column;
  animation: slideInRight .25s ease;
}
@keyframes slideInRight { from { transform: translateX(100%); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.mobile-menu-head {
  padding: 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
}
.mobile-menu-title { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: 1px; }
.mobile-menu-user { padding: 14px 16px; color: var(--sub); font-size: 13px; border-bottom: 1px solid var(--line); }
.mobile-menu-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; overflow-y: auto; }
.mobile-menu-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink); font-size: 15px; cursor: pointer; transition: all .15s;
}
.mobile-menu-item:hover, .mobile-menu-item:active { background: #f1f5f9; border-color: var(--red); color: var(--red); }
.mobile-menu-item-warn { color: var(--red); }
.mobile-menu-item-warn:hover, .mobile-menu-item-warn:active { background: #fef2f2; border-color: #f1c4c4; }

/* 移动端编辑器底部浮动操作栏（桌面端隐藏） */
.mobile-editor-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, .10);
  gap: 10px; justify-content: flex-end; align-items: center;
}
.mbtn-primary {
  flex: 1; background: var(--red); color: #fff; border: none; border-radius: 12px;
  min-height: 48px; font-size: 16px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 4px 12px rgba(185, 28, 28, .25); transition: transform .1s, box-shadow .2s;
}
.mbtn-primary:active { transform: scale(.97); box-shadow: 0 4px 16px rgba(185, 28, 28, .35); }
.mbtn-ghost {
  padding: 0 16px; min-height: 46px; border-radius: 12px; background: #f8fafc;
  border: 1px solid var(--line); color: var(--ink); font-size: 15px;
  display: inline-flex; align-items: center; gap: 5px;
}
.mbtn-ghost:active { background: #f1f5f9; border-color: var(--red); color: var(--red); }

/* 移动端/平板/窄窗口：浅色高对比、信息清晰 */
@media (max-width: 1100px) {
  body {
    background:
      radial-gradient(circle at 10% 0%, rgba(56, 189, 248, .10) 0%, transparent 30%),
      radial-gradient(circle at 90% 100%, rgba(34, 197, 94, .08) 0%, transparent 30%),
      #f8fafc;
  }
  .app-view::before { opacity: .35; }
  .layout { flex-direction: column; position: relative; }
  /* 窄屏筛选面板改为单列，方便手机点选 */
  .filter-grid { grid-template-columns: 1fr; }

  /* 顶栏 */
  .topbar {
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 12px; position: sticky; top: 0; z-index: 30;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  }
  .topbar-left svg { stroke: var(--red); }
  .topbar-title { font-size: 16px; color: var(--ink); font-weight: 800; }
  .topbar-right { gap: 6px; }
  .topbar-right > .btn-ghost, .topbar-right > .user-badge { display: none; }
  .mobile-menu-btn { display: inline-flex; }

  /* 侧边栏：全屏项目列表 */
  .sidebar {
    width: 100%; border-right: none; border-bottom: none; max-height: none;
    background: transparent; padding: 14px; gap: 12px; flex: 1; overflow-y: auto;
  }
  .sidebar.collapsed { display: none; }
  .sidebar-top { flex-direction: row; align-items: center; gap: 10px; }
  #btnAdd { margin-bottom: 0; flex-shrink: 0; padding: 0 18px; min-height: 46px; border-radius: 12px; font-size: 15px; }
  .search { margin-bottom: 0; background: #fff; border-color: var(--line); color: var(--ink); min-height: 46px; font-size: 15px; }
  .search::placeholder { color: #94a3b8; }
  .sidebar-title { color: #64748b; font-size: 13px; margin-top: 4px; font-weight: 700; }

  /* 项目卡片：白色背景、大字、信息清晰，与电脑端一致展示完整内容 */
  .proj-item {
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 13px 14px 13px 24px; box-shadow: 0 3px 12px rgba(0, 0, 0, .06);
    flex-shrink: 0; margin-bottom: 2px;
  }
  .proj-item:hover { background: #fff; border-color: #fecaca; box-shadow: 0 5px 16px rgba(185, 28, 28, .10); }
  .proj-item::before { width: 7px; background: linear-gradient(180deg, #ef4444, #b91c1c); box-shadow: 0 0 8px rgba(239, 68, 68, .35); }
  .proj-item.active {
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    border-color: #4ade80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, .18), 0 6px 20px rgba(34, 197, 94, .15);
    transform: translateX(4px);
  }
  .proj-item.active::before { background: linear-gradient(180deg, #86efac, #22c55e); box-shadow: 0 0 10px rgba(74, 222, 128, .55); }
  .proj-item .pi-name { color: #111827; font-size: 20px; }
  .pi-uses { gap: 7px; margin-top: 7px; }
  .pi-use-idx { font-size: 13px; }
  .pi-use-tag { font-size: 14.5px; padding: 4px 12px; }
  .pi-use-detail { font-size: 13px; padding: 4px 8px 2px 12px; }
  .proj-item .pi-meta { color: #334155; font-size: 15px; margin-top: 7px; line-height: 1.4; }
  .proj-item .pi-info { color: #1e293b; font-size: 15px; margin-top: 7px; gap: 5px 16px; }
  .proj-item .pi-info .pi-info-label { color: #64748b; }
  .proj-item .pi-time { color: #94a3b8; font-size: 12.5px; margin-top: 6px; }
  .pi-build-pill { font-size: inherit; padding: 0; }

  /* 主区：编辑器全屏覆盖 */
  .main { padding: 0; position: relative; }
  .editor { max-width: 100%; padding: 14px 14px 100px; display: none; }
  .editor.active { display: block; animation: fadeIn .25s ease; }
  @keyframes fadeIn { from { opacity: .5; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  #emptyState { background: transparent; color: #64748b; padding: 50px 20px; }
  #emptyState .es-title { color: #334155; font-size: 18px; }
  #emptyState .es-sub { color: #64748b; }

  /* 冻结工具栏 */
  .editor-head {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .96); border: 1px solid var(--line);
    border-radius: 14px; padding: 12px; margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
  }
  .proj-name {
    background: #fff; border-color: var(--line);
    color: var(--ink); font-size: 18px; max-width: 100%; width: 100%; min-width: 0; min-height: 46px;
  }
  .proj-name::placeholder { color: #94a3b8; }
  .editor-actions { width: 100%; margin-left: 0; gap: 8px; }
  .editor-actions .btn-ghost { display: none; }
  .editor-actions .btn-primary, .editor-actions .btn-danger { flex: 1; min-height: 44px; border-radius: 12px; font-size: 14px; }

  /* 表单卡片 */
  .card {
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .05); padding: 16px;
  }
  .card-title { color: var(--red); font-size: 16px; }
  .card-title::before { background: linear-gradient(180deg, #ef4444, #b91c1c); box-shadow: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; gap: 16px; }
  .field label { color: #475569; font-size: 14px; margin-bottom: 6px; font-weight: 600; }
  .field input, .field select, .cascade select {
    background: #fff; border-color: var(--line);
    color: var(--ink); font-size: 16px; padding: 14px 12px; border-radius: 12px; min-height: 50px;
  }
  .field input:focus, .field select:focus, .cascade select:focus {
    border-color: var(--red); box-shadow: 0 0 0 3px rgba(185, 28, 28, .08);
  }
  .field input[readonly] { background: #f8fafc; color: #64748b; }
  input::placeholder, select option:first-child { color: #94a3b8; }
  .opt-desc { background: #f0f9ff; border-color: #bae6fd; color: #0369a1; }
  .auto-tag { color: var(--green); }

  /* 底部浮动栏 */
  .mobile-editor-bar { display: flex; }

  /* 弹窗适配 */
  .modal { width: 96vw; max-height: 88vh; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
  .modal-head { color: var(--ink); border-bottom-color: var(--line); }
  .modal-body { color: var(--ink); }
  .modal-foot { border-top-color: var(--line); }
  .btn-primary { background: var(--red); }
  .btn-ghost { background: #f8fafc; border-color: var(--line); color: var(--ink); }

  /* 统计卡片 */
  #statsBody .stat-card { background: #f8fafc; border-color: var(--line); }
  #statsBody .stat-num { color: var(--red); }
  .bar-track { background: #eef2f7; }
  .bar-fill { background: linear-gradient(90deg, #ef4444, #b91c1c); }
  .pie-legend-item { color: var(--ink); }
  .pie-lg-val { color: var(--sub); }
}

/* 土地用途：含义提示 + 自定义年限 + 宽字段 */
.sel-landuse { font-weight: 500; }
.opt-desc { font-size: 12px; color: #475569; background: #f8fafc; border: 1px dashed var(--line); border-radius: 8px; padding: 7px 10px; margin-top: 6px; line-height: 1.5; }
.custom-input { width: 130px; margin-top: 8px; }
.field-wide { grid-column: 1 / -1; }
.sel-option { font-size: 13.5px; }
.field.has-ph input::placeholder { color: #aab2bd; }

/* 弹窗头部操作区 */
.modal-head-actions { display: flex; align-items: center; gap: 8px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* 饼图（按用途面积占比） */
.pie-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pie-svg { width: 180px; height: 180px; flex-shrink: 0; }
.pie-legend { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.pie-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pie-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.pie-lg-name { font-weight: 600; color: #334155; }
.pie-lg-val { margin-left: auto; color: var(--sub); }
.empty-chart { color: #94a3b8; font-size: 13px; padding: 8px 0; }

/* 文档预览弹窗 */
.preview-body { padding: 0; }
#previewModal { width: 900px; max-width: 96vw; }
#previewBody { max-height: 88vh; overflow-y: auto; overflow-x: hidden; background: #f8fafc; }
.docx-container { background: #fff; max-width: 820px; margin: 16px auto; box-shadow: 0 2px 12px rgba(0,0,0,.08); padding: 32px 40px; min-height: 400px; }
.docx-container p { margin: 6px 0; }
.docx-container table { border-collapse: collapse; width: 100%; }
.docx-container td, .docx-container th { border: 1px solid #ccc; padding: 4px 8px; }

/* 手机端预览：文档宽度自适应屏幕，避免横向滚动、看不清内容 */
.mobile-preview { background: #eef2f7; }
.mobile-preview .docx-wrapper { background: transparent !important; padding: 8px !important; }
.mobile-preview .docx-container { margin: 0 !important; max-width: 100% !important; width: 100% !important; box-shadow: none !important; border-radius: 10px; padding: 18px 14px !important; min-height: auto !important; }
.mobile-preview .docx-page { width: 100% !important; padding: 0 !important; box-shadow: none !important; background: #fff; }
.mobile-preview .docx-container table { table-layout: fixed; }
.mobile-preview .docx-container td, .mobile-preview .docx-container th { font-size: 11px; padding: 3px 5px; word-break: break-word; }

/* Excel 预览表格 */
.excel-preview { margin-top: 12px; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.excel-preview table { border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.excel-preview th, .excel-preview td { border: 1px solid #e2e8f0; padding: 4px 8px; text-align: left; }
.excel-preview th { background: #f1f5f9; font-weight: 600; color: #334155; position: sticky; top: 0; z-index: 1; }
.excel-preview td { color: #475569; }
.excel-preview tr:hover td { background: #f8fafc; }
.excel-preview .preview-hint { padding: 8px 12px; font-size: 12px; color: var(--sub); background: #f8fafc; border-bottom: 1px solid var(--line); }
.excel-preview .preview-empty { padding: 20px; text-align: center; color: #94a3b8; font-size: 13px; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* 可重复版面（面积与价款、规划条件） */
.card-title-with-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title-with-actions .btn-add-pane {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--red); color: #fff; border: none; border-radius: 8px;
  padding: 6px 12px; min-height: 32px; font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.card-title-with-actions .btn-add-pane:hover { background: var(--red-d); }
.card-title-with-actions .btn-add-pane svg { width: 14px; height: 14px; }
.repeater-panes { display: flex; flex-direction: column; gap: 14px; }
.repeat-pane {
  background: #fafafa; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px;
}
.repeat-pane-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.repeat-pane-title { font-size: 13px; font-weight: 700; color: #475569; }
.btn-del-pane {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; color: var(--red); border: 1px solid #f1c4c4;
  border-radius: 8px; padding: 4px 10px; min-height: 30px;
  font-size: 12px; cursor: pointer; transition: background .15s;
}
.btn-del-pane:hover { background: #fef2f2; }
.btn-del-pane svg { width: 13px; height: 13px; }
.repeat-pane-grid { gap: 12px 16px; }
/* 面积与价款 + 规划条件 按版面合并录入 */
.combo-sub { margin-top: 14px; }
.combo-sub:first-of-type { margin-top: 0; }
.combo-sub-title {
  font-size: 12px; font-weight: 700; color: var(--red);
  background: #fef2f2; border-left: 3px solid var(--red);
  padding: 5px 10px; margin-bottom: 10px; border-radius: 0 6px 6px 0;
}

@media (max-width: 1100px) {
  .card-title-with-actions { flex-wrap: wrap; gap: 8px; }
  .card-title-with-actions span { flex: 1 1 auto; }
  .repeat-pane { padding: 12px; }
  .repeat-pane-head { margin-bottom: 10px; }
  .btn-del-pane { min-height: 34px; padding: 5px 12px; font-size: 13px; }
}

/* 界址点坐标卡 */
.cc-tools { display: inline-flex; gap: 8px; }
/* 「清空坐标」整体删除按钮：红色调警示，与新增/导入区分 */
.cc-clear-btn { background: #fff; color: #b91c1c; border: 1px solid #f1c4c4; }
.cc-clear-btn:hover { background: #fef2f2; border-color: #dc2626; }
.cc-hint { font-size: 12.5px; color: #64748b; background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: 8px; padding: 7px 10px; margin: 10px 0 12px; line-height: 1.5; }
.cc-layout { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cc-table-wrap { flex: 1; min-width: 320px; overflow-x: auto; }
.cc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cc-table th { background: #f1f5f9; color: #334155; font-weight: 600; text-align: left; padding: 8px 10px; border: 1px solid #e2e8f0; white-space: nowrap; }
.cc-table td { border: 1px solid #e2e8f0; padding: 4px 6px; vertical-align: middle; }
.cc-table input { width: 100%; min-width: 60px; border: 1px solid #cbd5e1; border-radius: 7px; padding: 8px 9px; font-size: 13.5px; color: #1e293b; background: #fff; }
.cc-table input:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.12); outline: none; }
.cc-idx { color: #94a3b8; text-align: center; }
.cc-ops { text-align: center; }
.cc-del { background: #fff; border: 1px solid #f1c4c4; color: #dc2626; border-radius: 7px; padding: 5px 7px; cursor: pointer; line-height: 0; }
.cc-del:hover { background: #fef2f2; }
.cc-empty { text-align: center; color: #94a3b8; padding: 18px; font-size: 13px; }
.cc-preview { width: 240px; flex-shrink: 0; }
.cc-preview svg { display: block; }
.cc-pv-empty { width: 240px; height: 220px; border: 1px dashed #e2e8f0; border-radius: 8px; background: #f8fafc; color: #94a3b8; font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cc-pv-empty span { font-size: 11px; color: #b6c2d0; margin-top: 4px; }
.cc-pv-legend { margin-top: 6px; font-size: 12px; color: #64748b; text-align: center; }

/* 坐标点面积汇总区 */
.cc-area { margin-top: 12px; padding: 10px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; }
.cc-area-title { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.cc-area-empty { color: #94a3b8; font-size: 13px; padding: 4px 0; }
.ca-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 14px; align-items: baseline; }
.ca-label { color: #334155; flex-shrink: 0; }
.ca-val { color: #0f172a; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.ca-file { color: #0891b2; font-weight: 400; font-size: 12px; margin-left: 6px; }
.ca-total { border-top: 1px dashed #cbd5e1; margin-top: 4px; padding-top: 6px; }
.ca-total .ca-val { color: #b91c1c; }

/* 部系统属性描述元数据面板 */
.cc-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding: 8px 10px; background: #f1f5f9; border: 1px solid #dbe3ec; border-radius: 8px; }
.cc-meta:empty { display: none; }
.cc-meta-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.cc-meta-tag { display: inline-block; padding: 2px 8px; background: #e0ecff; color: #1d4ed8; border-radius: 6px; font-size: 12px; font-weight: 600; }
.cc-meta-org { color: #475569; font-size: 12px; }
.cc-meta-extra { color: #64748b; font-size: 12px; margin-left: auto; }

@media (max-width: 1100px) {
  .cc-layout { flex-direction: column; }
  .cc-table-wrap { min-width: 0; width: 100%; }
  .cc-preview, .cc-pv-empty { width: 100%; }
  .cc-table input { font-size: 16px; padding: 12px 10px; min-height: 46px; }
  .cc-del { padding: 9px 12px; }
}

/* ---------- 顶部状态条：时间 / 星期 / 日历 / 天气 ---------- */
.topbar-status {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 16px; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
  font-size: 13px; color: #334155; overflow: hidden;
}
.ts-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ts-cal-btn { border: none; background: transparent; font-size: 16px; cursor: pointer; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.ts-cal-btn:hover { background: #e2e8f0; }
.ts-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: #1d4ed8; font-size: 15px; }
.ts-date { color: #475569; }
.ts-week { color: #475569; background: #eef2ff; padding: 1px 8px; border-radius: 6px; }
.ts-marquee { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }
.ts-marquee-inner { display: inline-block; padding-left: 100%; animation: tsScroll 28s linear infinite; color: #0f766e; font-weight: 600; }
.ts-marquee-inner:hover { animation-play-state: paused; }
@keyframes tsScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.cal-pop {
  position: absolute; left: 16px; top: 96px; z-index: 60;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15,23,42,.16); padding: 12px; width: 280px;
}
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 700; color: #1e293b; }
.cal-nav { border: none; background: #f1f5f9; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; color: #334155; font-size: 16px; }
.cal-nav:hover { background: #e2e8f0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow { font-size: 12px; color: #94a3b8; padding: 4px 0; }
.cal-cell { font-size: 13px; padding: 6px 0; border-radius: 8px; color: #334155; cursor: default; }
.cal-cell.empty { visibility: hidden; }
.cal-cell.today { background: #b91c1c; color: #fff; font-weight: 700; }
.cal-cell.other { color: #cbd5e1; }
.cal-cell:not(.empty):not(.today):hover { background: #eff6ff; }

/* ---------- 会审单列表 ---------- */
.review-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.review-empty { color: #94a3b8; font-size: 13px; padding: 10px 0; }
.review-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
}
.review-icon { font-size: 20px; flex-shrink: 0; }
.review-info { flex: 1; min-width: 0; }
.review-name { font-weight: 600; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-meta { font-size: 12px; color: #64748b; }
.review-actions { display: flex; gap: 6px; flex-shrink: 0; }
.review-actions button { border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; }
.review-actions button:hover { background: #f1f5f9; }
.review-actions .rd-del { color: #b91c1c; border-color: #fecaca; }
.review-actions .rd-del:hover { background: #fef2f2; }

@media (max-width: 1100px) {
  .topbar-status { font-size: 12px; padding: 4px 10px; gap: 8px; }
  .ts-marquee { display: none; }
}
