/* 鸿祈文物工程可视化平台 - 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "Microsoft YaHei", "Segoe UI", sans-serif; font-size: 14px; color: #2C2C2A; background: #F5F5F0; }

/* 顶部导航 - 锁定不随页面滚动（需求1） */
.topbar { height: 52px; background: #2C2C2A; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-left .logo { font-size: 16px; font-weight: 500; white-space: nowrap; }
/* 返回总界面（入口页 l2.html）—— 03 窗口契约，2026-09-12
   顶栏为深色 #2C2C2A，故用青色（与驾驶舱保持一致）；登录页为浅色，见下方 .login-back-link */
.topbar-back-btn { background: rgba(0,212,255,.08); border: 1px solid rgba(0,212,255,.35); color: #00d4ff; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s; }
.topbar-back-btn:hover { background: rgba(0,212,255,.18); border-color: rgba(0,212,255,.6); }
/* 登录页（浅底）：用平台主色紫，固定右上角，不影响登录卡居中 */
.login-back-link { position: fixed; top: 16px; right: 20px; z-index: 10; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1; padding: 7px 14px; color: #534AB7; background: #fff; border: 1px solid #D9D6F0; border-radius: 8px; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: all .2s; }
.login-back-link:hover { background: #EEEDFE; border-color: #534AB7; }
/* ?noback=1 → 隐藏返回按钮（html 上加类，与 Vue 异步渲染时序无关） */
html.hq-noback #hq-entry-back { display: none !important; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-right .date-display { font-size: 12px; color: #aaa; }

/* 布局 - 左列导航不随页面滚动，主内容区滚动（需求1）
   2026-09-12：侧边栏改「自动回缩」——常驻 56px 图标条，鼠标移入展开为 168px。
   关键：侧边栏 position:absolute 脱离文档流 → 展开时只「覆盖」不「挤压」内容区，
   表格宽度恒定不变（无重排跳动）；内容区用 margin-left 固定留出收起的 56px。 */
.main-layout { display: flex; height: calc(100vh - 52px); overflow: hidden; position: relative; }
.sidebar { position: absolute; left: 0; top: 0; bottom: 0; width: 56px; z-index: 90; background: #fff; border-right: 1px solid #E0DED8; padding: 10px 0; overflow-y: auto; overflow-x: hidden; transition: width .18s ease; }
.sidebar:hover { width: 168px; box-shadow: 4px 0 18px rgba(0,0,0,.14); }
.sidebar.pinned { width: 168px; }
/* 2026-09-18：padding-bottom 加大到 42px，为底部常驻的备案页脚（.app-footer）留出等高空白，
   视图滚动区（.view / .table-area，高度按 content box 算）因此不会被页脚压住。 */
.content { flex: 1; margin-left: 56px; padding: 20px 24px 42px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; position: relative; transition: margin-left .18s ease; }
/* 固定展开时内容区让位：否则浮层侧边栏会盖住左侧一列内容（鼠标划过展开仍不挤压，避免表格抖动） */
.main-layout.sb-pinned .content { margin-left: 168px; }

/* 页脚·备案信息（2026-09-18 老板要求「页脚统一挂 ICP 备案号」）。
   常驻内容区底部、随左右边界自适应，不随视图滚动；内容区已用 padding-bottom 留出等高空白。
   .app-footer:empty 兜底：ICP 号与公司主体名都没配时整块不渲染（连分隔线都不出现）。 */
.app-footer { position: absolute; left: 24px; right: 24px; bottom: 8px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 14px; padding-top: 7px; border-top: 1px solid #F1EFE8; font-size: 12px; line-height: 18px; color: #8A8780; }
.app-footer:empty { display: none; }
.app-footer a { color: #8A8780; text-decoration: none; }
.app-footer a:hover { color: #534AB7; text-decoration: underline; }
/* 登录页页脚：底色是深色渐变，文字改用浅色（否则 #8A8780 压在 #2C2C2A 上几乎看不见） */
.app-footer-auth { left: 0; right: 0; bottom: 16px; border-top: 0; padding-top: 0; color: rgba(255,255,255,.55); }
.app-footer-auth a { color: rgba(255,255,255,.55); }
.app-footer-auth a:hover { color: #fff; text-decoration: underline; }

/* 视图默认滚动（非管理类视图：看板、聊天等） */
.view { height: 100%; overflow-y: auto; }
/* 管理类视图：工具栏冻结 + 表格区独立滚动（需求1） */
.view.view-sticky { overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.sticky-bar { flex-shrink: 0; position: relative; z-index: 20; background: #F5F5F0; }
.sticky-bar .view-title { margin-top: 0; }
.table-area { flex: 1; overflow: auto; min-height: 0; }
/* 表头冻结：粘附在表格滚动区顶部 */
.data-table thead th { position: sticky; top: 0; z-index: 5; background: #EEEDFE; box-shadow: inset 0 -2px 0 #534AB7; }
.data-table thead th:first-child { box-shadow: inset 0 -2px 0 #534AB7; }

/* 侧边导航 */
/* P0-A/B：7 分组导航——分组标题 + 组内条目；组间留白分隔，条目更紧凑以容纳分组 */
.nav-group-title { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 3px; font-size: 11px; color: #888780; letter-spacing: .5px; cursor: pointer; user-select: none; }
.nav-group-title:hover { color: #534AB7; }
.nav-group-title.has-active { color: #534AB7; font-weight: 500; }
.nav-group-title i { font-size: 9px; transition: transform .15s; }
.nav-group-title.collapsed i { transform: rotate(-90deg); }
.nav-group-body { padding-bottom: 2px; }
/* 组间分隔线：非首组的分组标题上方加细线 */
.nav-group-title:not(:first-child) { border-top: 1px solid #F1EFE8; margin-top: 4px; }
.nav-item { padding: 7px 12px 7px 18px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; transition: all .15s; }
.nav-item:hover { background: #F1EFE8; color: #2C2C2A; }
.nav-item.active { background: #EEEDFE; color: #534AB7; font-weight: 500; border-left: 3px solid #534AB7; padding-left: 15px; }
.nav-item i { width: 16px; text-align: center; }
/* P1：我的常用——nav-item 右侧图钉（悬停显现，已钉常亮）；收起态整颗隐藏（56px 放不下） */
.nav-fav-btn { margin-left: auto; flex: 0 0 auto; width: 18px; height: 18px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: none; background: none; color: #B8B5AE; font-size: 10px; cursor: pointer; border-radius: 3px; opacity: 0; transition: opacity .15s, color .15s, transform .15s; }
.nav-item:hover .nav-fav-btn { opacity: 1; }
.nav-fav-btn:hover { color: #534AB7; background: #EEEDFE; }
.nav-fav-btn.on { opacity: 1; color: #534AB7; }
.nav-fav-btn.on:hover { transform: rotate(-35deg); }
.sidebar:not(:hover):not(.pinned) .nav-fav-btn { display: none; }
.nav-group-title.fav-title { color: #534AB7; font-weight: 500; cursor: default; }
.nav-group-title.fav-title:hover { color: #534AB7; }

/* ===== 侧边栏「自动回缩」（2026-09-12）=====
   收起态 = 56px 图标条；展开态 = 鼠标移入(:hover) 或 已固定(.pinned)。 */
.sidebar-head { padding: 0 6px 8px; }
.sidebar-pin { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 0; font-size: 12px; color: #888780; background: transparent; border: 1px solid #E0DED8; border-radius: 6px; cursor: pointer; font-family: inherit; transition: all .15s; }
.sidebar-pin:hover { color: #534AB7; border-color: #C9C4EE; background: #F7F6FE; }
.sidebar-pin.on { color: #534AB7; border-color: #C9C4EE; background: #EEEDFE; }

/* 收起态：隐藏文字与分组标题，只留图标 */
.sidebar .nav-item span,
.sidebar .nav-group-title,
.sidebar .avatar-entry .avatar-name,
.sidebar .avatar-entry .fa-chevron-up,
.sidebar .sidebar-pin span { display: none; }
/* 展开态：显示文字与分组标题 */
.sidebar:hover .nav-item span, .sidebar.pinned .nav-item span { display: inline; }
.sidebar:hover .nav-group-title, .sidebar.pinned .nav-group-title { display: flex; }
.sidebar:hover .avatar-entry .avatar-name, .sidebar.pinned .avatar-entry .avatar-name { display: inline; }
.sidebar:hover .avatar-entry .fa-chevron-up, .sidebar.pinned .avatar-entry .fa-chevron-up { display: block; }
.sidebar:hover .sidebar-pin span, .sidebar.pinned .sidebar-pin span { display: inline; }

/* 收起态：条目图标居中；头像入口居中 */
.sidebar:not(:hover):not(.pinned) .nav-item { padding-left: 0; padding-right: 0; justify-content: center; gap: 0; }
.sidebar:not(:hover):not(.pinned) .nav-item.active { padding-left: 0; }
.sidebar:not(:hover):not(.pinned) .avatar-entry { justify-content: center; padding: 8px 0; }
/* 收起态：忽略分组折叠状态（否则「基础资料」等折叠组里的图标根本点不到） */
.sidebar:not(:hover):not(.pinned) .nav-group-body { display: block !important; }
/* 收起态：组标题已隐藏，改用组间细线做分隔 */
.sidebar:not(:hover):not(.pinned) .nav-group-body ~ .nav-group-body { border-top: 1px solid #F1EFE8; margin-top: 4px; padding-top: 4px; }

/* ===== 侧边栏底部头像入口 + 对话框 ===== */
.sidebar-footer { margin-top: auto; padding: 10px 8px; border-top: 1px solid #E0DED8; position: sticky; bottom: 0; background: #fff; }
.avatar-entry { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background .15s; }
.avatar-entry:hover { background: #F1EFE8; }
.avatar-entry .fa-chevron-up { margin-left: auto; font-size: 11px; color: #888780; transition: transform .2s; }
.avatar-entry .fa-chevron-up.rotated { transform: rotate(180deg); }
.avatar-circle { width: 28px; height: 28px; border-radius: 50%; background: #534AB7; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; flex-shrink: 0; }
.avatar-name { font-size: 12px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.avatar-menu { position: absolute; left: 8px; right: 8px; bottom: 56px; background: #fff; border: 1px solid #E0DED8; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 200; max-height: calc(100vh - 200px); overflow-y: auto; }
.avatar-menu-header { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid #F1EFE8; }
.avatar-circle-lg { width: 40px; height: 40px; border-radius: 50%; background: #534AB7; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 500; flex-shrink: 0; }
.avatar-menu-name { font-size: 14px; font-weight: 500; color: #2C2C2A; }
.avatar-menu-dept { font-size: 12px; color: #888780; margin-top: 2px; }
.avatar-menu-group { padding: 8px 0; }
.avatar-menu-group-title { font-size: 11px; color: #888780; padding: 4px 14px; text-transform: uppercase; letter-spacing: .5px; }
.avatar-menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 24px; cursor: pointer; font-size: 13px; color: #555; transition: background .15s; }
.avatar-menu-item:hover { background: #F1EFE8; color: #2C2C2A; }
.avatar-menu-item.active { color: #534AB7; font-weight: 500; }
.avatar-menu-item i { width: 16px; text-align: center; }
.avatar-menu-footer { padding: 10px 14px; border-top: 1px solid #F1EFE8; }
.avatar-logout { width: 100%; justify-content: center; }

/* 视图标题 */
.view-title { font-size: 18px; font-weight: 500; margin-bottom: 16px; }
.section-title { font-size: 15px; font-weight: 500; margin: 24px 0 12px; padding-left: 8px; border-left: 3px solid #534AB7; }

/* 指标卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 8px; padding: 16px; border: 1px solid #E0DED8; }
.stat-num { font-size: 22px; font-weight: 500; color: #2C2C2A; line-height: 1.2; }
.stat-num.warn { color: #D85A30; }
.stat-label { font-size: 12px; color: #888780; margin-top: 4px; }

/* 图表行 */
.chart-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }
.chart-card { background: #fff; border-radius: 8px; padding: 16px; border: 1px solid #E0DED8; }
.chart-card h3 { font-size: 13px; font-weight: 500; margin-bottom: 12px; color: #555; }
.chart-card h4 { font-size: 12px; font-weight: 500; margin-bottom: 8px; color: #666; }

/* 看板重构样式 */
.chart-filter-bar { display: flex; align-items: center; gap: 10px; padding: 10px 0; margin-bottom: 12px; flex-wrap: wrap; }
.province-tag-group { display: flex; flex-wrap: wrap; gap: 6px; }
.province-tag { padding: 3px 10px; border-radius: 12px; font-size: 12px; background: #e9e9e4; color: #555; cursor: pointer; border: 1px solid transparent; transition: .15s; user-select: none; }
.province-tag:hover { background: #d4d4ce; }
.province-tag.active { background: #1E40AF; color: #fff; border-color: #1E40AF; }
.dash-section { margin-bottom: 20px; }
.dash-section-title { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 2px solid #1E40AF; display: inline-block; }
.dash-chart-row { display: flex; gap: 16px; }
.dash-main-chart { flex: 3; min-width: 0; }
.dash-sub-charts { flex: 4; min-width: 0; }
.dash-rose-container { width: 100%; height: 260px; }
.dash-sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dash-sub-item { }
.dash-sub-rose { width: 100%; height: 110px; }
.dash-sub-label { text-align: center; font-size: 11px; color: #666; margin-top: 2px; }
.dash-sub-empty { color: #999; font-size: 13px; padding: 40px 0; text-align: center; }
.dash-bar-container { width: 100%; height: 260px; }
.chart-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: #999; font-size: 13px; }
/* 筛选分隔线 */
.filter-sep { display: inline-block; width: 1px; height: 20px; background: #D0CEC8; margin: 0 6px; flex-shrink: 0; }
/* 紧凑按钮组 */
.flat-btn-group.compact { gap: 2px; }
.flat-btn-group.compact .flat-btn { padding: 2px 8px; font-size: 12px; }

/* 条形图 */
.bar-list { display: flex; flex-direction: column; gap: 8px; }
.bar-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.bar-label { width: 60px; text-align: right; color: #555; flex-shrink: 0; }
.bar-track { flex: 1; height: 18px; background: #F1EFE8; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: #7F77DD; border-radius: 4px; transition: width .3s; }
.bar-fill.green { background: #1D9E75; }
.bar-fill.amber { background: #EF9F27; }
.bar-val { width: 28px; font-weight: 500; }

/* 过滤栏 */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.input { padding: 6px 10px; border: 1px solid #D3D1C7; border-radius: 6px; font-size: 13px; outline: none; background: #fff; min-width: 80px; }
.input:focus { border-color: #7F77DD; }
select.input { cursor: pointer; }

/* 按钮 */
.btn { padding: 6px 14px; border: 1px solid #D3D1C7; border-radius: 6px; font-size: 13px; cursor: pointer; background: #fff; color: #555; transition: all .15s; display: inline-flex; align-items: center; gap: 4px; }
.btn:hover { background: #F1EFE8; }
.btn.primary { background: #534AB7; color: #fff; border-color: #534AB7; }
.btn.primary:hover { background: #3C3489; }
.btn.green { background: #1D9E75; color: #fff; border-color: #1D9E75; }
.btn.green:hover { background: #0F6E56; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.btn-green { background: #1D9E75; color: #fff; border-color: #1D9E75; }
.btn.btn-green:hover { background: #0F6E56; }
.btn.btn-gray { background: #D3D1C7; color: #555; border-color: #D3D1C7; }
.btn.btn-gray:hover { background: #B4B2A9; color: #fff; }

/* 徽章（计提状态等） */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.badge-green { background: #E1F5EE; color: #0F6E56; border: 1px solid #9FE1CB; }
.badge-gray { background: #F1EFE8; color: #888780; border: 1px solid #D3D1C7; }
.row-commission { background: #F7FBF8; }

/* 数据表 */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
/* 表头冻结：必须移除 table 的 overflow:hidden，否则 position:sticky 失效 */
.data-table thead th:first-child { border-top-left-radius: 8px; }
.data-table thead th:last-child { border-top-right-radius: 8px; }
.data-table tbody tr:last-child td:first-child { border-bottom-left-radius: 8px; }
.data-table tbody tr:last-child td:last-child { border-bottom-right-radius: 8px; }
.data-table th { background: #EEEDFE; padding: 6px 8px; text-align: left; font-weight: 500; color: #3F3A8C; white-space: normal; word-break: break-all; border-right: 1px solid #DDD9F0; border-bottom: 2px solid #534AB7; position: relative; overflow: visible; line-height: 1.3; }
.data-table th .col-resizer { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 10; user-select: none; background: transparent; border-right: 2px solid transparent; }
.data-table th .col-resizer:hover, .data-table th .col-resizer.active { background: rgba(83,74,183,.35); border-right: 2px solid #534AB7; }
.data-table th.col-check .col-resizer { display: none; }
.data-table th { min-width: 0; }
.data-table th:last-child { border-right: none; }
.data-table td { padding: 5px 8px; border-bottom: 1px solid #E8E7E0; border-right: 1px solid #EEEDE6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; height: 32px; max-width: none; }
.data-table td.num { max-width: none; }
.data-table td.name-cell { max-width: none; }
.data-table td.actions, .data-table td.col-check { max-width: none; overflow: visible; white-space: nowrap; cursor: default; }
/* 悬停1秒高亮提示可点击 */
.data-table td:not(.actions):not(.col-check):hover { background: #f0f7ff; }
/* 点击展开 */
.data-table td.expanded { overflow: visible; white-space: normal; word-break: break-all; background: #fffbeb; box-shadow: 0 2px 10px rgba(0,0,0,.18); position: relative; z-index: 5; border-radius: 2px; max-width: 500px; user-select: text !important; -webkit-user-select: text !important; cursor: text; }
.data-table tr:hover td { background: #f9fafb; }
.data-table tr:hover td.expanded { background: #fffbeb; }
.data-table td:last-child { border-right: none; }
.data-table tbody tr:nth-child(even) { background: #FAFAF6; }
.data-table tbody tr:hover { background: #E8E7F8; }
.data-table .clickable-row { cursor: pointer; }
.data-table .clickable-row:hover { background: #DDD9F0; }
.data-table .name-cell { max-width: none; word-wrap: break-word; word-break: break-word; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.data-table .name-cell:hover { color: #534AB7; text-decoration: underline; }
.data-table .remark-cell { max-width: none; word-wrap: break-word; word-break: break-word; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .income { color: #D85A30; font-weight: 500; }
.data-table .expense { color: #1D9E75; font-weight: 500; }
.data-table .empty { text-align: center; color: #aaa; padding: 20px; }
.data-table .clickable { cursor: pointer; color: #534AB7; }
.data-table .clickable:hover { text-decoration: underline; }
.data-table .warn-text { color: #D85A30; }
.table-wrap { overflow-x: auto; }
.data-table.wide { font-size: 12px; }
.data-table.wide th, .data-table.wide td { padding: 5px 8px; }
.table-footer { text-align: center; color: #888780; font-size: 12px; padding: 8px; }

/* ============ 可筛选表格（Excel式列筛选弹窗） ============ */
.filterable-table .th-content { display: flex; align-items: center; gap: 2px; }
.filterable-table .th-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.col-filter-btn { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: none; background: transparent; cursor: pointer; color: #AAA; border-radius: 3px; font-size: 11px; flex-shrink: 0; padding: 0; }
.col-filter-btn:hover { background: #DDD9F0; color: #534AB7; }
.col-filter-btn.active { color: #534AB7; background: #DDD9F0; }
.col-filter-popup { position: fixed; z-index: 99999; background: #fff; border: 1px solid #C9C5E0; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.18); min-width: 180px; max-width: 280px; max-height: 320px; display: flex; flex-direction: column; }
.col-filter-popup .popup-search { padding: 6px 8px; border-bottom: 1px solid #EEE; position: relative; }
.col-filter-popup .popup-search input { width: 100%; padding: 4px 8px 4px 24px; border: 1px solid #D3D1C7; border-radius: 4px; font-size: 12px; outline: none; box-sizing: border-box; }
.col-filter-popup .popup-search input:focus { border-color: #7F77DD; }
.col-filter-popup .popup-search .fa { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #bbb; font-size: 11px; }
.col-filter-popup .popup-list { overflow-y: auto; max-height: 200px; padding: 2px 0; }
.col-filter-popup .popup-item { padding: 5px 12px; font-size: 12px; cursor: pointer; color: #444; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-filter-popup .popup-item:hover { background: #F4F3FD; }
.col-filter-popup .popup-item.selected { background: #EEEDFE; color: #534AB7; font-weight: 500; }
.col-filter-popup .popup-item .item-text { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.col-filter-popup .popup-footer { display: flex; gap: 6px; padding: 6px 8px; border-top: 1px solid #EEE; }
.col-filter-popup .popup-footer button { flex: 1; padding: 4px 8px; font-size: 12px; border: 1px solid #D3D1C7; border-radius: 4px; background: #fff; cursor: pointer; }
.col-filter-popup .popup-footer button.primary { background: #534AB7; color: #fff; border-color: #534AB7; }
.col-filter-popup .popup-footer button:hover { opacity: .85; }
.col-filter-popup .popup-count { font-size: 11px; color: #999; padding: 2px 12px; }
.col-filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 6px 12px; background: #FFF8E8; border: 1px solid #FFE8B5; border-radius: 6px; font-size: 12px; }
.col-filter-info { color: #856404; }
.col-filter-info i { margin-right: 4px; }
.stage-tag { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 11px; background: #EEEDFE; color: #534AB7; white-space: nowrap; }
.text-muted { color: #aaa; }
.region-select { min-width: 100px; max-width: 160px; }
.stage-tag { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 11px; background: #EEEDFE; color: #534AB7; white-space: nowrap; }
.text-muted { color: #aaa; }
.region-select { min-width: 100px; max-width: 160px; }

/* 标签 */
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 11px; }
.tag.cat-fire { background: #FAECE7; color: #993C1D; }
.tag.cat-security { background: #E1F5EE; color: #0F6E56; }
.tag.cat-lightning { background: #FAEEDA; color: #854F0B; }
.tag.cat-repair { background: #EEEDFE; color: #534AB7; }
.tag.cat-protective { background: #E3F2FD; color: #1565C0; }
.tag.cat-maintenance { background: #F3E5F5; color: #7B1FA2; }
.tag.cat-emergency { background: #FBE9E7; color: #C62828; }
.tag.cat-migration { background: #E0F7FA; color: #00838F; }
.tag.cat-environment { background: #F1F8E9; color: #558B2F; }
.tag.cat-display { background: #FFF8E1; color: #F57C00; }
.tag.cat-default { background: #F1EFE8; color: #5F5E5A; }

/* 合同类别标签 */
.tag.contract-income { background: #FAECE7; color: #993C1D; }
.tag.contract-expense { background: #E1F5EE; color: #0F6E56; }
.tag.contract-transfer { background: #FAEEDA; color: #854F0B; }

/* 状态徽章 */
.status-badge { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 11px; }
.status-active { background: #E1F5EE; color: #0F6E56; }
.status-done { background: #F1EFE8; color: #888780; }
.status-default { background: #F1EFE8; color: #555; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }
.page-info { font-size: 13px; color: #888780; }
.page-nav { display: inline-flex; align-items: center; gap: 8px; }
.page-num { font-size: 13px; color: #534AB7; font-weight: 500; }
.page-size { width: 90px; padding: 3px 6px; font-size: 12px; }

/* 行勾选列 */
.col-check { width: 32px; min-width: 32px; max-width: 32px; text-align: center; padding: 4px 0 !important; box-sizing: border-box; }
.col-check input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }

/* 列管理弹窗 */
.col-manage-head { display: flex; align-items: center; justify-content: space-between; cursor: move; user-select: none; }
.col-manage-head h3 { cursor: move; }
.col-manage-head h3 { font-size: 16px; color: #3a3656; }
.col-manage-add { display: flex; gap: 8px; }
.col-manage-add .input { flex: 1; }
.col-manage-hint { font-size: 12px; color: #999; line-height: 1.5; }
.col-manage-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; border: 1px solid #EEE; border-radius: 8px; padding: 8px; background: #fafaff; }
.col-manage-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #fff; border: 1px solid #ECEAF7; border-radius: 6px; }
.col-manage-item .drag-handle { color: #C2BEE0; cursor: default; font-size: 16px; }
.col-manage-item .col-label { flex: 1; font-size: 13px; color: #333; cursor: text; padding: 2px 4px; border-radius: 4px; }
.col-manage-item .col-label:hover { background: #F0EEFB; }
.col-rename-input { flex: 1; }
.col-manage-empty { text-align: center; color: #aaa; font-size: 13px; padding: 20px 0; }

/* 项目详情 */
.detail-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.detail-info { background: #fff; border-radius: 8px; padding: 16px; border: 1px solid #E0DED8; margin-bottom: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.info-item { display: flex; flex-direction: column; gap: 2px; }
.info-label { font-size: 11px; color: #888780; }
.info-val { font-size: 14px; }
/* 2026-09-15：.model-embed / .model-embed-header 已随三维查看器一并删除 */

/* 阶段时间轴 */
.stage-timeline { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 24px; }
.stage-timeline::before { content: ''; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; background: #E0DED8; }
.stage-node { position: relative; margin-bottom: 8px; }
.stage-dot { position: absolute; left: -24px; top: 12px; width: 14px; height: 14px; border-radius: 50%; background: #D3D1C7; border: 2px solid #fff; z-index: 1; }
.stage-node.completed .stage-dot { background: #1D9E75; }
.stage-node.in_progress .stage-dot { background: #EF9F27; }
.stage-node.blocked .stage-dot { background: #D85A30; }
.stage-node.not_started .stage-dot { background: #D3D1C7; }
.stage-card { background: #fff; border-radius: 8px; padding: 12px 16px; border: 1px solid #E0DED8; cursor: pointer; transition: all .15s; }
.stage-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); border-color: #AFA9EC; }
.stage-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.stage-name { font-weight: 500; font-size: 14px; }
.stage-status-badge { font-size: 11px; padding: 1px 8px; border-radius: 4px; }
.stage-status-badge.completed { background: #E1F5EE; color: #0F6E56; }
.stage-status-badge.in_progress { background: #FAEEDA; color: #854F0B; }
.stage-status-badge.not_started { background: #F1EFE8; color: #888780; }
.stage-status-badge.blocked { background: #FAECE7; color: #993C1D; }
.stage-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.stage-field { display: flex; gap: 8px; font-size: 12px; }
.stage-field span:first-child { color: #888780; min-width: 60px; }
.stage-field .editable { color: #2C2C2A; }
.stage-log { margin-top: 8px; padding: 6px 10px; background: #FAFAF8; border-radius: 4px; font-size: 12px; color: #555; }

/* 弹窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: 600px; max-width: 90vw; max-height: 85vh; overflow-y: auto; box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.modal-box { background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.15); overflow: hidden; }
.modal h3 { font-size: 16px; margin-bottom: 16px; }
.modal-body { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; align-items: center; gap: 8px; }
.form-row label { width: 80px; font-size: 13px; color: #888780; flex-shrink: 0; }
.form-row .input { flex: 1; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* 账户卡片 */
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.account-card { background: #fff; border-radius: 8px; padding: 16px; border: 1px solid #E0DED8; }
.account-name { font-size: 13px; color: #888780; margin-bottom: 8px; }
.account-bal { font-size: 20px; font-weight: 500; }
.account-bal.neg { color: #D85A30; }
.account-detail { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: #888780; }

/* 移动端 */
@media (max-width: 768px) {
  /* 触屏没有 hover：禁止自动展开，避免误触挡表；仍可用图钉手动固定展开 */
  .sidebar { width: 56px; }
  .sidebar:hover { width: 56px; box-shadow: none; }
  .sidebar.pinned { width: 168px; box-shadow: 4px 0 18px rgba(0,0,0,.14); }
  .content { margin-left: 56px; padding: 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-row { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar .input { width: 100%; }
  .chat-view { padding: 0; }
  .chat-messages { height: calc(100vh - 200px) !important; }
}

/* ============ 聊天界面 ============ */
.chat-view { display: flex; flex-direction: column; height: calc(100vh - 100px); max-width: 800px; margin: 0 auto; }
.chat-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.chat-hint { font-size: 12px; color: #888780; }
.chat-messages { flex: 1; overflow-y: auto; background: #fff; border: 1px solid #E0DED8; border-radius: 8px; padding: 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { display: flex; gap: 10px; max-width: 85%; }
.chat-bubble.chat-user { flex-direction: row-reverse; margin-left: auto; }
.chat-bubble.chat-ai { flex-direction: row; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; flex-shrink: 0; }
.chat-user .chat-avatar { background: #534AB7; color: #fff; }
.chat-ai .chat-avatar { background: #E0DED8; color: #555; }
.chat-content { display: flex; flex-direction: column; gap: 4px; }
.chat-user .chat-content { align-items: flex-end; }
.chat-ai .chat-content { align-items: flex-start; }
.chat-text { padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.chat-user .chat-text { background: #534AB7; color: #fff; border-bottom-right-radius: 4px; }
.chat-ai .chat-text { background: #F1EFE8; color: #2C2C2A; border-bottom-left-radius: 4px; }
.chat-time { font-size: 11px; color: #aaa; }
.chat-empty { text-align: center; color: #aaa; padding: 40px 0; font-size: 14px; }
.chat-typing { display: flex; align-items: center; gap: 8px; color: #888780; font-size: 13px; padding: 4px 0; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: #aaa; animation: blink 1.4s infinite both; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
.chat-input-area { display: flex; gap: 8px; align-items: flex-end; }
.chat-input { flex: 1; border: 1px solid #E0DED8; border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; resize: none; min-height: 42px; max-height: 120px; outline: none; transition: border-color .15s; }
.chat-input:focus { border-color: #534AB7; }
.chat-send-btn { width: 42px; height: 42px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ 加载/隐藏 ============ */
[v-cloak] { display: none; }
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; gap: 16px; color: #888780; }
.loading-spinner { width: 40px; height: 40px; border: 3px solid #E0DED8; border-top-color: #534AB7; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 登录/注册页 ============ */
/* position: relative —— 让登录页的备案页脚（.app-footer-auth）能绝对定位到页面底部 */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2C2C2A 0%, #3a3a36 100%); padding: 20px; position: relative; }
.auth-card { background: #fff; border-radius: 12px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo i { font-size: 36px; color: #534AB7; margin-bottom: 12px; display: block; }
.auth-logo h1 { font-size: 18px; color: #2C2C2A; font-weight: 500; }
.auth-title { font-size: 16px; font-weight: 500; color: #2C2C2A; margin-bottom: 20px; border-left: 3px solid #534AB7; padding-left: 10px; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 12px; color: #888780; margin-bottom: 4px; }
.auth-field .input { width: 100%; }
.auth-error { background: #FFF0ED; color: #D85A30; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.auth-success { background: #E8F5E9; color: #2E7D32; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.auth-btn { width: 100%; height: 42px; font-size: 14px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: #888780; }
.auth-switch a { color: #534AB7; cursor: pointer; text-decoration: underline; }
.auth-hint { text-align: center; margin-top: 12px; font-size: 11px; color: #bbb; }

/* ============ 顶部栏用户信息 ============ */
.topbar-right { display: flex; align-items: center; gap: 16px; }
.user-info { font-size: 13px; color: #ddd; }
.user-info i { margin-right: 4px; }
.user-dept { font-size: 11px; color: #999; margin-left: 4px; }
.btn-logout { background: transparent; border: 1px solid #555; color: #ccc; font-size: 12px; padding: 4px 12px; height: 28px; border-radius: 4px; cursor: pointer; transition: all .15s; }
.btn-logout:hover { border-color: #D85A30; color: #D85A30; }

/* ============ 用户管理 ============ */
.info-text { font-size: 13px; color: #888780; }
.btn-sm { font-size: 11px; padding: 3px 8px; height: 24px; margin-right: 4px; }
.btn-danger { background: #D85A30; color: #fff; border: none; }
.btn-danger:hover { background: #C04D26; }
.action-cell { white-space: nowrap; }

/* 用户状态徽章 */
.user-pending { background: #FFF3CD; color: #856404; }
.user-approved { background: #D4EDDA; color: #155724; }
.user-rejected { background: #F8D7DA; color: #721C24; }
.user-disabled { background: #E0DED8; color: #6C757D; }

/* ============ 可见模块编辑 ============ */
.module-tag { font-size: 11px; color: #534AB7; background: #EEEDFE; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }

.module-perm-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid #E0DED8; }
.module-perm-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.module-perm-header label { font-size: 14px; font-weight: 500; }
.module-perm-actions { display: flex; gap: 8px; }

.module-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.module-checkbox { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid #D5D3CC; border-radius: 6px; cursor: pointer; font-size: 13px; transition: all .15s; user-select: none; }
.module-checkbox:hover { border-color: #534AB7; background: #F6F5FD; }
.module-checkbox.checked { border-color: #534AB7; background: #EEEDFE; color: #534AB7; }
.module-checkbox.locked { opacity: 0.6; }
.module-checkbox input { width: 16px; height: 16px; accent-color: #534AB7; cursor: pointer; }
.module-checkbox i { width: 16px; text-align: center; font-size: 13px; }
.module-checkbox.locked input { cursor: not-allowed; }

.module-perm-hint { font-size: 12px; color: #999; margin-top: 8px; }

/* ============ 玫瑰图（ECharts 南丁格尔玫瑰图） ============ */
.rose-card { display: flex; flex-direction: column; }
/* 要求2.1：页面背景 #F0F4F8 浅灰蓝；要求2.2：图表居中，占页面宽度75% */
.rose-container {
  display: block;
  width: 100%;
  height: 360px;
  padding: 8px 4px;
  background: #F0F4F8;
  border-radius: 10px;
  min-height: 360px;
  margin: 0 auto;
}
.rose-empty { text-align: center; color: #94a3b8; padding: 60px 0; font-size: 13px; }

/* ============ 平铺筛选按钮 ============ */
.filter-section { background: #fff; border-radius: 8px; padding: 12px 16px; border: 1px solid #E0DED8; margin-bottom: 16px; }
.filter-section.filter-section-compact { padding: 10px 12px; margin-bottom: 12px; }
.filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.filter-row.filter-row-condensed { margin-bottom: 6px; gap: 6px; }
.filter-row.filter-row-actions { margin-bottom: 0; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #E0DED8; gap: 12px; align-items: center; }
.filter-label { font-size: 12px; color: #888780; min-width: 56px; flex-shrink: 0; text-align: right; }
.filter-action-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.input-keyword { width: 200px; padding: 4px 28px 4px 8px; font-size: 13px; }
/* 搜索框 X 清除按钮 */
.search-input-wrap { position: relative; display: inline-flex; align-items: center; }
.search-clear-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border: none; background: #ccc; color: #fff; border-radius: 50%; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.search-clear-btn:hover { background: #999; }
/* 多选下拉 */
.multi-select { position: relative; display: inline-block; }
.multi-select-trigger { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid #D3D1C7; border-radius: 4px; background: #fff; color: #555; font-size: 12px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.multi-select-trigger:hover { border-color: #7F77DD; background: #F6F5FD; }
.multi-select.open .multi-select-trigger { border-color: #534AB7; background: #F6F5FD; }
.multi-select-trigger .fa-chevron-down { font-size: 10px; color: #888; }
.multi-select-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #534AB7; color: #fff; font-size: 10px; font-weight: 600; }
.multi-select-panel { display: none; position: absolute; top: 100%; left: 0; margin-top: 3px; min-width: 140px; max-width: 260px; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid #D3D1C7; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.12); padding: 6px; z-index: 100; }
.multi-select.open .multi-select-panel { display: block; }
.multi-select-panel label { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 3px; cursor: pointer; font-size: 12px; color: #444; white-space: nowrap; }
.multi-select-panel label:hover { background: #F6F5FD; }
.multi-select-panel input[type="checkbox"] { margin: 0; }
.multi-select-clear { display: block; width: 100%; margin-top: 4px; padding: 4px 6px; border: none; background: #f5f5f5; color: #888; font-size: 11px; border-radius: 3px; cursor: pointer; text-align: center; }
.multi-select-clear:hover { background: #eee; color: #e74c3c; }
.multi-select-group { margin-bottom: 6px; }
.multi-select-group:last-child { margin-bottom: 0; }
.multi-select-group-title { font-size: 11px; font-weight: 600; color: #534AB7; padding: 4px 6px; background: #F6F5FD; border-radius: 3px; margin-bottom: 2px; }
.multi-select-wide .multi-select-panel { min-width: 180px; max-width: 320px; }
.flat-btn-group { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.flat-btn-group-label { font-size: 12px; font-weight: 700; color: #fff; background: #7F77DD; margin: 0 3px 0 6px; border: none; padding: 3px 9px; border-radius: 4px; white-space: nowrap; box-shadow: 0 1px 3px rgba(127,119,221,.35); }
.flat-btn { padding: 3px 10px; border: 1px solid #D3D1C7; border-radius: 4px; font-size: 12px; cursor: pointer; background: #fff; color: #555; transition: all .15s; white-space: nowrap; }
.flat-btn:hover { border-color: #7F77DD; background: #F6F5FD; }
.flat-btn.active { background: #534AB7; color: #fff; border-color: #534AB7; }
.flat-btn-add { padding: 3px 8px; border: 1px dashed #B0AEAA; border-radius: 4px; font-size: 12px; cursor: pointer; background: #FAFAF8; color: #888; transition: all .15s; white-space: nowrap; }
.flat-btn-add:hover { border-color: #7F77DD; color: #534AB7; background: #F6F5FD; border-style: solid; }
/* 阶段卡片筛选 */
.stage-cards-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.stage-cards { display: flex; gap: 5px; overflow-x: auto; padding: 4px 2px; flex: 1; }
/* 紧凑横向阶段分布条（截图样式） */
.stage-cards.stage-cards-compact { display: flex; gap: 3px; overflow-x: auto; padding: 2px; flex: 1; align-items: center; }
.stage-cards.stage-cards-compact .stage-card { flex: 0 0 auto; padding: 3px 8px; border: 1px solid #e2e8f0; border-radius: 4px; background: #f8fafc; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: all .15s; white-space: nowrap; }
.stage-cards.stage-cards-compact .stage-card:hover { border-color: var(--c, #534ab7); background: #fff; box-shadow: 0 1px 3px rgba(83,74,183,.12); }
.stage-cards.stage-cards-compact .stage-card.active { border-color: #534ab7; background: #534ab7; color: #fff; box-shadow: 0 1px 3px rgba(83,74,183,.25); }
.stage-cards.stage-cards-compact .stage-card-name { font-size: 12px; color: #334155; font-weight: 500; line-height: 1.2; }
.stage-cards.stage-cards-compact .stage-card.active .stage-card-name { color: #fff; font-weight: 600; }
.stage-cards.stage-cards-compact .stage-card-count { font-size: 11px; color: #64748b; font-weight: 600; background: #fff; padding: 0 4px; border-radius: 8px; border: 1px solid #e2e8f0; line-height: 14px; }
.stage-cards.stage-cards-compact .stage-card.active .stage-card-count { color: #534ab7; border-color: #fff; }
/* 兼容旧 stage-card 样式（详情页等） */
.stage-cards:not(.stage-cards-compact) .stage-card { flex: 0 0 auto; min-width: 76px; width: auto; padding: 4px 7px; border: 1px solid #e2e8f0; border-radius: 5px; background: #f8fafc; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: all .15s; }
.stage-cards:not(.stage-cards-compact) .stage-card:hover { border-color: var(--c, #534ab7); box-shadow: 0 2px 6px rgba(83,74,183,.12); }
.stage-cards:not(.stage-cards-compact) .stage-card.active { border-color: #534ab7; background: #fff; box-shadow: inset 0 0 0 2px #534ab7; }
.stage-cards:not(.stage-cards-compact) .stage-card-name { font-size: 12px; color: #334155; font-weight: 500; white-space: nowrap; line-height: 1.2; }
.stage-cards:not(.stage-cards-compact) .stage-card.active .stage-card-name { color: #534ab7; font-weight: 600; }
.stage-cards:not(.stage-cards-compact) .stage-card-bar { height: 3px; background: #e2e8f0; border-radius: 2px; overflow: hidden; }

/* ===== P0-C1：更多筛选抽屉 + 更多操作下拉（项目管理工具行收纳）===== */
.more-filter-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid #E0DED8; border-radius: 5px; background: #fff; color: #555; font-size: 12px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.more-filter-btn:hover { border-color: #7F77DD; color: #534AB7; }
.more-filter-btn.active { border-color: #534AB7; color: #534AB7; background: #F6F5FD; font-weight: 500; }
.more-filter-badge { background: #534AB7; color: #fff; font-size: 10px; line-height: 14px; padding: 0 5px; border-radius: 8px; font-weight: 600; }
.more-filter-clear { padding: 3px 7px !important; }
/* P1：更多筛选「向右铺开」——不再另起一行，高级项内联在同一筛选行内横向流动。
   · .more-filter-sep  : 与常显项之间的竖向分隔线，视觉上区分"基础/高级"
   · .more-filter-inline: 内联展开的单个高级项，带轻微淡入（右→左 8px）
   · .more-filter-close : 行尾收起按钮 */
.more-filter-sep { display: inline-block; width: 1px; height: 18px; background: #D3D1C7; margin: 0 4px; flex: 0 0 auto; }
.more-filter-inline { animation: hqMfIn .18s ease both; }
@keyframes hqMfIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
.more-filter-close { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid #E0DED8; border-radius: 5px; background: #fff; color: #999; font-size: 11px; cursor: pointer; transition: all .15s; flex: 0 0 auto; }
.more-filter-close:hover { border-color: #534AB7; color: #534AB7; background: #F6F5FD; }
/* 兼容：旧抽屉类名保留为空壳，避免历史引用报样式缺失 */
.more-filter-drawer { display: contents; }
.filter-action-more { position: relative; }
.tool-menu { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #E0DED8; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); z-index: 300; min-width: 190px; padding: 4px; }
.tool-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 10px; border: none; background: none; font-size: 13px; color: #444; cursor: pointer; border-radius: 5px; }
.tool-menu-item:hover { background: #F1EFE8; color: #2C2C2A; }
.tool-menu-item.danger:hover { background: #FEF2F2; color: #DC2626; }
.tool-menu-item i { width: 14px; text-align: center; font-size: 12px; }
.flat-btn-more { padding: 3px 8px; border: 1px dashed #B0AEAA; border-radius: 4px; font-size: 12px; cursor: pointer; background: #FAFAF8; color: #888; transition: all .15s; white-space: nowrap; }
.flat-btn-more:hover { border-color: #7F77DD; color: #534AB7; background: #F6F5FD; border-style: solid; }

/* ===== P0-C3：项目健康度色标（红=超期 / 黄=待收款 / 灰=正常）===== */
.health-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; flex-shrink: 0; }
.health-dot.health-ok { background: #D6D3CD; }
.health-dot.health-warn { background: #F0A020; }
.health-dot.health-danger { background: #E5484D; box-shadow: 0 0 0 2px rgba(229,72,77,.15); }

/* ===== P0-C4/C5：看板告警横幅 + 卡片趋势小字 ===== */
.alert-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; border-radius: 8px; background: #FFF9F0; border: 1px solid #FADFB0; margin-bottom: 12px; }
.alert-banner-title { font-size: 13px; font-weight: 600; color: #8A5A00; display: inline-flex; align-items: center; gap: 6px; }
.alert-banner-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #8A5A00; cursor: pointer; padding: 3px 9px; border-radius: 6px; background: #fff; border: 1px solid #F3E2C0; transition: all .15s; }
.alert-banner-item:hover { border-color: #E0A93B; box-shadow: 0 1px 4px rgba(224,169,59,.25); }
.alert-banner-item.danger { color: #A8262A; background: #FFF1F1; border-color: #F6C7C9; }
.alert-banner-item.danger:hover { border-color: #E5484D; }
.alert-banner-item.info { color: #4A4A8A; background: #F3F3FE; border-color: #D8D6F5; }
.alert-banner-ok { font-size: 13px; color: #2F7A4F; display: inline-flex; align-items: center; gap: 6px; }
.stat-trend { font-size: 11px; color: #888780; margin-top: 3px; }
.stage-cards:not(.stage-cards-compact) .stage-card-bar-inner { height: 100%; border-radius: 2px; transition: width .3s; min-width: 2px; }
.stage-cards:not(.stage-cards-compact) .stage-card-count { font-size: 11px; color: #64748b; font-weight: 500; }
.stage-cards:not(.stage-cards-compact) .stage-card.active .stage-card-count { color: #534ab7; }
/* 阶段扩展列 */
.stage-exth { font-size: 11px; font-weight: 500; min-width: 90px; }
.data-missing { color: #cbd5e1; font-style: italic; }
/* 阶段进度条 */
.project-stage-bar { min-width: 200px; }
.stage-dots { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.stage-dot { width: 14px; height: 14px; border-radius: 3px; background: #e2e8f0; display: inline-block; transition: all .2s; cursor: default; }
.stage-dot.active { background: #534ab7; box-shadow: 0 0 4px rgba(83,74,183,.4); }
.stage-dot.done { background: #a7f3d0; border: 1px solid #34d399; }
.stage-dot.blocked { background: #fbbf24; border: 1px solid #f59e0b; }
/* 列拖拽排序 */
.data-table th { cursor: grab; }
.data-table th:active { cursor: grabbing; }
/* 筛选偏好弹窗 */
.filter-pref-add { display: flex; gap: 8px; margin-bottom: 12px; }
.filter-pref-add .input { flex: 1; }
.filter-pref-list { max-height: 300px; overflow-y: auto; border: 1px solid #EEE; border-radius: 6px; padding: 4px; }
.filter-pref-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-bottom: 1px solid #F5F4F0; }
.filter-pref-item:last-child { border-bottom: none; }
.filter-pref-check { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; flex: 1; }
.filter-pref-check input { margin: 0; }
.filter-pref-custom { color: #EF9F27; font-size: 10px; }
.filter-pref-hint { font-size: 11px; color: #999; margin-top: 8px; padding: 8px; background: #FAFAF8; border-radius: 4px; }
.filter-pref-hint i { margin-right: 4px; }
.hint-text { font-size: 11px; color: #aaa; }

/* ============ 阶段资料管理 ============ */
.stage-docs-section { margin-top: 8px; padding: 10px 12px; background: #FAFAF8; border-radius: 6px; border: 1px solid #F0EEE8; }
.stage-docs-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stage-docs-title { font-size: 12px; color: #888780; font-weight: 500; }
.stage-docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.doc-type-group { display: flex; flex-direction: column; gap: 4px; }
.doc-type-label { font-size: 11px; color: #534AB7; font-weight: 500; border-bottom: 1px solid #EEEDFE; padding-bottom: 2px; }
.doc-count { color: #aaa; font-weight: normal; }
.doc-item { display: flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 6px; border-radius: 4px; background: #fff; border: 1px solid #F0EEE8; }
.doc-item:hover { border-color: #D3D1C7; }
.doc-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-date { font-size: 10px; color: #aaa; }

/* 阶段提醒 */
.stage-reminders { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.reminder-item { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 8px; background: #FFF8E8; border: 1px solid #FFE8B5; border-radius: 4px; }
.reminder-item .fa-bell { color: #EF9F27; }
.reminder-handler { color: #534AB7; font-weight: 500; }
.reminder-date { font-size: 11px; color: #888780; }
.reminder-interval { font-size: 10px; color: #D85A30; background: #FAECE7; padding: 1px 6px; border-radius: 8px; }

/* ============ 账户分组（内部/外部分区+拖拽） ============ */
.account-sections { display: flex; gap: 20px; flex-wrap: wrap; }
.account-section { flex: 1; min-width: 360px; background: #FAFAF8; border-radius: 10px; padding: 16px; border: 2px dashed #D3D1C7; transition: border-color .2s; }
.account-section.internal { border-color: #B8B4E8; }
.account-section.external { border-color: #E8C5B8; }
.account-section.drag-over { border-color: #534AB7; background: #F4F3FD; }
.account-section-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #E0DED8; display: flex; align-items: center; gap: 8px; }
.account-section.internal .account-section-title { color: #534AB7; }
.account-section.external .account-section-title { color: #D85A30; }
.account-card.draggable { cursor: grab; position: relative; transition: all .15s; }
.account-card.draggable:hover { border-color: #7F77DD; box-shadow: 0 2px 8px rgba(127,119,221,.15); }
.account-card.dragging { opacity: 0.4; }
.account-drag-handle { position: absolute; top: 6px; right: 6px; color: #CCC; font-size: 12px; }
.account-empty { color: #BBB; text-align: center; padding: 30px; font-size: 13px; grid-column: 1 / -1; }
.account-category-section { margin-bottom: 24px; }
.account-category-title { font-size: 15px; font-weight: 500; color: #2C2C2A; margin-bottom: 12px; padding-left: 8px; border-left: 3px solid #534AB7; }
.account-group { margin-bottom: 16px; }
.account-group-label { font-size: 12px; color: #888780; margin-bottom: 8px; padding: 4px 10px; background: #F1EFE8; border-radius: 4px; display: inline-block; }

/* ============ 人员状态面板 ============ */
.personnel-panel { background: #fff; border-radius: 8px; padding: 16px; border: 1px solid #E0DED8; margin-bottom: 20px; }
.personnel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.personnel-card { background: #FAFAF8; border-radius: 8px; padding: 12px; border: 1px solid #F0EEE8; }
.personnel-name { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.personnel-dot { font-size: 8px; }
.personnel-dot.ps-out { color: #D85A30; }
.personnel-dot.ps-survey { color: #EF9F27; }
.personnel-dot.ps-idle { color: #1D9E75; }
.personnel-dept { font-size: 11px; color: #aaa; font-weight: normal; }
.personnel-status { font-size: 12px; font-weight: 500; margin-top: 4px; }
.personnel-status.ps-out { color: #D85A30; }
.personnel-status.ps-survey { color: #EF9F27; }
.personnel-status.ps-idle { color: #1D9E75; }
.personnel-info { font-size: 11px; color: #888780; margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.personnel-actions { display: flex; gap: 4px; margin-top: 8px; }
.personnel-actions .btn-sm.active { background: #534AB7; color: #fff; border-color: #534AB7; }

/* ============ 需求3：项目状态内联编辑 ============ */
.status-edit-btn { font-size: 11px; padding: 2px 6px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #64748b; cursor: pointer; margin-left: 4px; }
.status-select { font-size: 12px; padding: 2px 6px; border: 1px solid #534AB7; border-radius: 4px; background: #fff; }
.btn-icon-sm { background: none; border: none; color: #64748b; cursor: pointer; padding: 2px 4px; font-size: 12px; }
.btn-icon-sm:hover { color: #534AB7; }
.status-pending { color: #64748b; }
.status-in_progress { color: #2563eb; }
.status-blocked { color: #dc2626; }
.status-paused { color: #f59e0b; }
.status-completed { color: #16a34a; }
.status-abandoned { color: #94a3b8; text-decoration: line-through; }

/* ============ 需求2③：阶段版本管理 ============ */
.version-add-section { background: #f8fafc; padding: 12px; border-radius: 8px; margin-bottom: 16px; }
.version-add-section h4 { margin: 0 0 10px; font-size: 14px; color: #334155; }
.version-list-section h4 { margin: 0 0 10px; font-size: 14px; color: #334155; }
.version-item { border-left: 3px solid #534AB7; padding: 10px 12px; margin-bottom: 10px; background: #fff; border-radius: 0 6px 6px 0; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.version-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.version-no { font-weight: 700; color: #534AB7; font-size: 14px; }
.version-date { font-size: 12px; color: #94a3b8; }
.version-uploader { font-size: 12px; color: #64748b; }
.version-reason, .version-content { font-size: 13px; color: #475569; margin: 4px 0; line-height: 1.5; }
.version-file { margin: 6px 0; font-size: 13px; }
.version-file a { color: #2563eb; text-decoration: underline; }
.version-actions { display: flex; gap: 8px; margin-top: 8px; }
.empty-text { text-align: center; color: #94a3b8; padding: 20px; font-size: 13px; }
.btn.purple { background: #534AB7; color: #fff; border-color: #534AB7; }
.btn.purple:hover { background: #6D62D6; }

/* ============ 需求5：录入按钮区 + OCR拖拽区 ============ */
.view-actions-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.view-actions { display: flex; gap: 8px; }
.ocr-drop-zone { border: 2px dashed #cbd5e1; border-radius: 8px; padding: 16px; text-align: center; color: #64748b; font-size: 13px; margin-bottom: 12px; transition: all .2s; background: #f8fafc; }
.ocr-drop-zone.active { border-color: #534AB7; background: #ede9fe; color: #534AB7; }
.ocr-drop-zone .btn-sm { margin: 0 4px; }
.form-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.form-grid-2col .form-row { margin-bottom: 6px; }
.form-grid-2col .form-row label { display: block; font-size: 12px; color: #64748b; margin-bottom: 3px; }

/* ============ 第三批改进需求样式 ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 12px 0; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #555; }
.form-grid label input, .form-grid label select, .form-grid label textarea { padding: 6px 8px; border: 1px solid #d0cde5; border-radius: 4px; font-size: 13px; }
.form-grid label textarea { grid-column: span 2; resize: vertical; }
.form-grid label:nth-last-child(1):nth-child(odd) { grid-column: span 2; }
.view-actions { display: flex; gap: 8px; margin: 8px 0 12px; align-items: center; }
.ocr-drop-zone { border: 2px dashed #b0a8c9; border-radius: 8px; padding: 14px; text-align: center; margin: 10px 0; color: #7c7591; font-size: 13px; transition: border-color .2s, background .2s; cursor: pointer; }
.ocr-drop-zone:hover, .ocr-drop-zone.dragover { border-color: #534AB7; background: #f4f2fb; }
.ocr-drop-zone .ocr-file-label { color: #534AB7; text-decoration: underline; cursor: pointer; }
.ocr-drop-zone .ocr-loading { color: #EA580C; margin-left: 8px; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.btn-icon { background: none; border: none; cursor: pointer; color: #534AB7; padding: 2px 4px; font-size: 14px; transition: color .2s; }
.btn-icon:hover { color: #3B82F6; }
.btn-icon.danger { color: #DC2626; }
.btn-icon.danger:hover { color: #B91C1C; }
.text-green { color: #16A34A; font-weight: 600; }
.text-red { color: #DC2626; font-weight: 600; }
.amount { text-align: right; font-variant-numeric: tabular-nums; }
.version-file-info { margin: 8px 0; padding: 8px 12px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 4px; font-size: 13px; color: #16A34A; }
.flat-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 10px 0; padding: 10px 12px; background: #fafaf6; border-radius: 6px; }
.flat-filter-bar .filter-input { padding: 4px 8px; border: 1px solid #d0cde5; border-radius: 4px; font-size: 13px; min-width: 200px; }
/* 列宽拖拽手柄（JS注入），z-index 高于粘性表头 */
.data-table th .col-resizer { z-index: 10; }
/* 项目状态徽章 */
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.status-badge.s-pending { background: #e0e7ff; color: #4338ca; }
.status-badge.s-progress { background: #dcfce7; color: #16a34a; }
.status-badge.s-blocked { background: #fee2e2; color: #dc2626; }
.status-badge.s-paused { background: #fef3c7; color: #d97706; }
.status-badge.s-completed { background: #dbeafe; color: #1d4ed8; }
.status-badge.s-abandoned { background: #f3f4f6; color: #6b7280; }

/* "所处阶段"列样式（全部视图下显示当前阶段+状态） */
.cur-stage-col { min-width: 110px; }
.cur-stage-cell { padding: 4px 8px; }
.cur-stage-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.cur-stage-badge.active { background: #e0e7ff; color: #4338ca; }
.cur-stage-badge.done { background: #dbeafe; color: #1d4ed8; }
.cur-stage-badge.blocked { background: #fee2e2; color: #dc2626; }

/* 字段管理——上下箭头按钮 */
.fm-arrow-btn { background: none; border: 1px solid #d0d0d0; border-radius: 3px; padding: 1px 4px; cursor: pointer; font-size: 10px; color: #666; line-height: 1; display: block; margin: 0 auto; }
.fm-arrow-btn:hover { background: #534ab7; color: #fff; border-color: #534ab7; }
.fm-arrow-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.fm-tab-btn { padding: 5px 14px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #64748b; cursor: pointer; font-size: 13px; font-weight: 500; transition: all .15s; }
.fm-tab-btn:hover { border-color: #534ab7; color: #534ab7; }
.fm-tab-btn.active { background: #534ab7; color: #fff; border-color: #534ab7; box-shadow: 0 1px 3px rgba(83,74,183,.35); }
.fm-tab-btn i { margin-right: 4px; }

/* 字段管理——项目列与阶段字段分隔 */
.field-mgr-table tr.fm-project-col-row { background: #f8f8fc; }
.field-mgr-table tr.fm-stage-col-row { background: #fffdf5; }

/* ============ 第四批改进需求 ============ */

/* 账户余额区改造——可拖拽放置+全选+实时合计+精确3位小数 */
.account-sections { gap: 24px; }
.account-section { resize: vertical; overflow: auto; min-height: 200px; max-height: 80vh; }
.account-section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #E0DED8; flex-wrap: wrap; }
.account-section-header .account-section-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.account-section.internal .account-section-title { color: #534AB7; }
.account-section.external .account-section-title { color: #D85A30; }
.account-section-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.acct-cols-label { font-size: 12px; color: #888780; }
.acct-cols-select { padding: 3px 8px; border: 1px solid #D3D1C7; border-radius: 4px; font-size: 12px; background: #fff; cursor: pointer; }
.acct-area-btn { white-space: nowrap; }
.acct-area-btn:hover { background: #EEEDFE; border-color: #534AB7; color: #534AB7; }
.acct-section-total { font-size: 12px; color: #534AB7; background: #F4F3FD; padding: 3px 10px; border-radius: 4px; font-variant-numeric: tabular-nums; }

/* 行列头按钮 */
.acct-grid-wrap { display: flex; flex-direction: column; gap: 4px; }
.acct-col-headers { display: flex; align-items: center; gap: 6px; padding-left: 32px; }
.acct-corner { display: inline-block; }
.acct-col-btn { min-width: 28px; height: 24px; border: 1px solid #D3D1C7; border-radius: 4px; background: #FAFAF8; color: #888780; font-size: 12px; font-weight: 500; cursor: pointer; transition: all .12s; flex: 1; }
.acct-col-btn:hover { border-color: #534AB7; color: #534AB7; background: #F4F3FD; }
.acct-col-btn.active { background: #534AB7; color: #fff; border-color: #534AB7; }
.acct-grid-body { display: flex; gap: 6px; align-items: flex-start; }
.acct-row-headers { display: flex; flex-direction: column; gap: 6px; width: 26px; flex-shrink: 0; padding-top: 0; }
.acct-row-btn { width: 26px; height: 28px; border: 1px solid #D3D1C7; border-radius: 4px; background: #FAFAF8; color: #888780; font-size: 12px; font-weight: 500; cursor: pointer; transition: all .12s; }
.acct-row-btn:hover { border-color: #534AB7; color: #534AB7; background: #F4F3FD; }
.acct-row-btn.active { background: #534AB7; color: #fff; border-color: #534AB7; }

/* 账户网格：CSS变量控制列数，不强制填满每行 */
.acct-flex-grid { display: flex; flex-wrap: wrap; gap: 12px; flex: 1; }
.acct-flex-grid .account-card { flex: 0 0 calc((100% - 12px * (var(--acct-cols, 3) - 1)) / var(--acct-cols, 3)); min-width: 0; max-width: none; padding: 16px; cursor: pointer; transition: all .15s; user-select: none; position: relative; }
.acct-flex-grid .account-card:hover { border-color: #7F77DD; box-shadow: 0 4px 14px rgba(127,119,221,.18); transform: translateY(-1px); }
.acct-flex-grid .account-card.selected { border-color: #16a34a; background: #f0fdf4; box-shadow: 0 0 0 2px rgba(22,163,74,.25); }
.acct-flex-grid .account-card.selected .account-bal { color: #16a34a; }

/* 卡片内容：余额精确+万单位简读 */
.account-bal-main { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.account-bal-main .account-bal { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.account-bal-main .account-bal-wan { font-size: 13px; color: #888780; font-variant-numeric: tabular-nums; }
.account-bal-main .account-bal-wan.neg { color: #D85A30; }
.account-name { font-size: 14px; margin-bottom: 10px; font-weight: 500; }

/* 卡片收支放大显示 */
.account-detail { display: flex; gap: 8px; margin-top: 8px; }
.acct-ie { flex: 1; padding: 6px 8px; border-radius: 6px; display: flex; flex-direction: column; gap: 2px; }
.acct-ie.income-ie { background: #f0fdf4; border: 1px solid #bbf7d0; }
.acct-ie.expense-ie { background: #fef2f0; border: 1px solid #fecaca; }
.acct-ie-label { font-size: 11px; color: #888780; }
.acct-ie.income-ie .acct-ie-label { color: #16a34a; }
.acct-ie.expense-ie .acct-ie-label { color: #D85A30; }
.acct-ie-val { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; word-break: break-all; }
.acct-ie.income-ie .acct-ie-val { color: #16a34a; }
.acct-ie.expense-ie .acct-ie-val { color: #D85A30; }

.account-card .account-check { position: absolute; top: 8px; right: 10px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd5e1; background: #fff; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.account-card.selected .account-check { border-color: #16a34a; background: #16a34a; }
.account-card.selected .account-check::after { content: '\2713'; color: #fff; font-size: 12px; font-weight: 700; }

/* 选中账户总余额浮动栏：精确+万+收入+支出 */
.account-total-bar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; margin-bottom: 16px; background: linear-gradient(90deg, #EEEDFE 0%, #E8F5E9 100%); border: 1px solid #B8B4E8; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.06); flex-wrap: wrap; }
.account-total-bar .atb-left { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #555; flex-wrap: wrap; }
.account-total-bar .atb-count { background: #534AB7; color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.account-total-bar .atb-amount-group { display: flex; flex-direction: column; gap: 2px; }
.account-total-bar .atb-label-row { font-size: 11px; }
.account-total-bar .atb-val-row { display: flex; align-items: baseline; gap: 8px; }
.account-total-bar .atb-amount { font-size: 20px; font-weight: 600; color: #534AB7; font-variant-numeric: tabular-nums; }
.account-total-bar .atb-amount.neg { color: #D85A30; }
.account-total-bar .atb-amount.income-color { color: #16a34a; }
.account-total-bar .atb-amount.expense-color { color: #D85A30; }
.account-total-bar .atb-amount-wan { font-size: 13px; color: #888780; font-variant-numeric: tabular-nums; }
.account-total-bar .atb-actions { display: flex; gap: 8px; }

@media (max-width: 768px) {
  .acct-flex-grid .account-card { flex: 0 0 100% !important; }
  .account-section-header { flex-direction: column; align-items: flex-start; }
  .account-total-bar .atb-left { gap: 8px; }
}
.account-total-bar .atb-hint { font-size: 12px; color: #888780; }

/* 需求4：盈亏查询模块 */
.pl-section { background: #fff; border-radius: 8px; padding: 16px; border: 1px solid #E0DED8; margin-bottom: 16px; }
.pl-section h3 { font-size: 15px; font-weight: 500; margin-bottom: 12px; padding-left: 8px; border-left: 3px solid #534AB7; }
.pl-query-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pl-query-row label { font-size: 13px; color: #555; font-weight: 500; }
.pl-query-row select { min-width: 200px; }
.pl-summary-row { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.pl-summary-card { flex: 1; min-width: 160px; padding: 12px 16px; border-radius: 8px; border: 1px solid #E0DED8; background: #FAFAF8; }
.pl-summary-card.income { border-left: 4px solid #16a34a; }
.pl-summary-card.expense { border-left: 4px solid #D85A30; }
.pl-summary-card.balance { border-left: 4px solid #534AB7; }
.pl-summary-card .plsc-label { font-size: 12px; color: #888780; margin-bottom: 4px; }
.pl-summary-card .plsc-val { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-summary-card.income .plsc-val { color: #16a34a; }
.pl-summary-card.expense .plsc-val { color: #D85A30; }
.pl-summary-card.balance .plsc-val { color: #534AB7; }
.pl-empty { text-align: center; color: #aaa; padding: 24px; font-size: 13px; }

/* 盈亏查询：三部分布局 */
.pl-three-parts { padding: 0 4px 16px 0; display: flex; flex-direction: column; gap: 16px; }
.pl-three-parts .pl-section { margin-bottom: 0; }
.pl-overview-table, .pl-detail-table { width: 100%; min-width: 720px; }
.pl-overview-table thead th, .pl-detail-table thead th { text-align: center; background: #EEEDFE; }
.pl-overview-table thead th[rowspan], .pl-detail-table thead th[rowspan] { vertical-align: middle; }
/* 盈亏表格收支颜色统一：收入绿、支出橙红（与汇总卡片一致） */
.pl-overview-table .income, .pl-detail-table .income { color: #16a34a; font-weight: 500; }
.pl-overview-table .expense, .pl-detail-table .expense { color: #D85A30; font-weight: 500; }
.pl-overview-table .grand-total, .pl-detail-table .grand-total { background: #EEEDFE; font-weight: 600; }
.pl-overview-table .grand-total td, .pl-detail-table .grand-total td { border-top: 2px solid #534AB7; }

/* 第一部分：总收支总盈亏查询（左右布局） */
.pl-overview-layout { display: flex; gap: 16px; align-items: flex-start; }
.pl-overview-left { flex: 1; min-width: 0; overflow: auto; }
.pl-overview-right { width: 280px; flex-shrink: 0; background: #FAFAF8; border: 1px solid #E0DED8; border-radius: 8px; padding: 14px; position: sticky; top: 0; }
.pl-overview-table tbody tr { cursor: pointer; transition: background .12s; }
.pl-overview-table tbody tr.checked { background: #EEEDFE; }
.pl-overview-table tbody tr.checked td { font-weight: 500; }
.pl-overview-table .check-cell { text-align: center; width: 36px; }
.pl-overview-table .check-cell input { width: 16px; height: 16px; cursor: pointer; vertical-align: middle; }
.pl-summary-row.vertical { flex-direction: column; gap: 10px; margin-bottom: 14px; }
.pl-summary-row.vertical .pl-summary-card { flex: none; min-width: 0; }
.pl-summary-row.vertical .pl-summary-card .plsc-val { font-size: 18px; }
/* 已选列表 */
.pl-checked-list { border-top: 1px dashed #D9D6CF; padding-top: 10px; }
.pl-checked-head { font-size: 12px; color: #888780; margin-bottom: 8px; }
.pl-checked-item { display: flex; align-items: center; justify-content: space-between; padding: 5px 10px; margin-bottom: 4px; background: #fff; border: 1px solid #E0DED8; border-radius: 6px; font-size: 13px; }
.pl-checked-remove { border: none; background: transparent; color: #aaa; cursor: pointer; padding: 2px 4px; }
.pl-checked-remove:hover { color: #D85A30; }

/* 第二三部分：双查询框并排 */
.pl-dual-query { display: flex; gap: 16px; align-items: flex-start; }
.pl-query-box { flex: 1; min-width: 0; background: #FAFAF8; border: 1px solid #E0DED8; border-radius: 8px; padding: 12px; overflow: auto; }
.pl-query-select { min-width: 180px; }
.pl-project-select { min-width: 260px; max-width: 420px; }
/* 迷你汇总条 */
.pl-mini-summary { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; padding: 8px 10px; background: #fff; border: 1px solid #E0DED8; border-radius: 6px; font-size: 13px; }
.pl-mini { font-weight: 500; font-variant-numeric: tabular-nums; }
.pl-mini.income { color: #16a34a; }
.pl-mini.expense { color: #D85A30; }

@media (max-width: 1100px) {
  .pl-overview-layout { flex-direction: column; }
  .pl-overview-right { width: 100%; position: static; }
  .pl-dual-query { flex-direction: column; }
  .pl-query-box { width: 100%; }
}
@media (max-width: 900px) {
  .pl-overview-table, .pl-detail-table { min-width: 560px; }
  .pl-project-select { min-width: 0; width: 100%; }
  .pl-query-select { min-width: 0; flex: 1; }
}

/* 需求1：项目详情页——锁定标题行+基本信息，时间轴滚动 */
.detail-sticky { flex-shrink: 0; position: relative; z-index: 20; background: #F5F5F0; }
.detail-scroll { flex: 1; overflow: auto; min-height: 0; padding-right: 4px; }

/* 需求1：返回按钮内联于详情头部 */
.detail-header .btn-back-detail { margin-left: 12px; }

/* ==================== 基础信息管理弹窗 ==================== */
.base-opt-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 2px solid #e0e0e0; }
.base-opt-tab { padding: 8px 18px; border: none; background: transparent; cursor: pointer; font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.base-opt-tab:hover { color: #333; }
.base-opt-tab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }
.base-opt-add-row { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.base-opt-list { max-height: 320px; overflow-y: auto; border: 1px solid #e8e8e8; border-radius: 6px; padding: 6px; }
.base-opt-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid #f0f0f0; }
.base-opt-item:last-child { border-bottom: none; }
.base-opt-item:hover { background: #f8f9ff; }
.base-opt-name { flex: 1; font-size: 14px; }
.base-opt-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #e0e7ff; color: #3730a3; }
.base-opt-empty { text-align: center; padding: 24px; color: #999; font-size: 14px; }
.btn-danger { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.btn-danger:hover { background: #fee2e2; }

/* === 动态扩展列 === */
.ext-col { background: #f0fdf4; min-width: 80px; }
.ext-cell { background: #f0fdf4; cursor: text; min-width: 80px; }
.ext-cell:hover { background: #dcfce7; }
.ext-cell.editing { padding: 0; }
.cell-edit-input {
  width: 100%; box-sizing: border-box; border: 2px solid #2563eb;
  border-radius: 3px; padding: 4px 6px; font-size: 14px; outline: none;
  background: #fff; min-height: 28px;
}
.stage-cell-edit-input {
  width: 100%; box-sizing: border-box; border: 2px solid #2563eb;
  border-radius: 3px; padding: 4px 6px; font-size: 14px; outline: none;
  background: #fff; min-height: 28px;
}
/* 双击编辑提示：核心列也可双击（后续可扩展） */
.data-table td { user-select: text; -webkit-user-select: text; }

/* === 右键行菜单 === */
.row-context-menu {
  position: fixed; z-index: 9999; min-width: 140px;
  background: #fff; border: 1px solid #d1d5db; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15); overflow: hidden; padding: 4px 0;
}
.row-menu-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  cursor: pointer; font-size: 14px; color: #374151; transition: background .15s;
}
.row-menu-item:hover { background: #f3f4f6; }
.row-menu-item.danger { color: #dc2626; }
.row-menu-item.danger:hover { background: #fef2f2; }

/* === 回收站 / 审计日志 / 数据备份 === */
.empty-cell { text-align: center; color: #999; padding: 28px; font-size: 14px; }
.audit-action {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 600; background: #eef2ff; color: #3730a3;
}
.audit-change {
  max-width: 480px; word-break: break-word; font-size: 12px; color: #555;
  font-family: 'Consolas', 'Menlo', monospace;
}
/* 列管理弹窗 */
.col-manage-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; cursor: move; user-select: none; border-radius: 12px 12px 0 0; }
.col-manage-head h3 { margin: 0; font-size: 15px; color: #1e293b; }
.col-manage-head .drag-hint { font-size: 11px; color: #94a3b8; margin-left: 8px; }
.col-manage-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid #f0f0f0; background: #fff; cursor: default; transition: background .15s; }
.col-manage-item[draggable="true"] { cursor: grab; }
.col-manage-item[draggable="true"]:active { cursor: grabbing; }
.col-manage-item.core { background: #f8fafc; }
.col-manage-item:hover { background: #f1f5f9; }
.col-manage-item.drag-over { background: #e0f2fe; border-color: #2563eb; }
.cm-drag-handle { color: #cbd5e1; font-size: 16px; cursor: default; padding: 0 2px; line-height: 1; }
.cm-drag-handle.active { color: #94a3b8; cursor: grab; }
.cm-drag-handle.active:hover { color: #475569; }
.cm-core-badge { display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center; font-size: 11px; font-weight: 700; border-radius: 4px; flex-shrink: 0; }
.cm-core-badge:not(.ext) { background: #e2e8f0; color: #64748b; }
.cm-core-badge.ext { background: #dbeafe; color: #2563eb; }
.cm-core-badge.virt { background: #fef3c7; color: #92400e; }
.col-virtual .col-label { color: #9ca3af; font-style: italic; }
.col-manage-item[draggable="true"] { cursor: grab; }
.col-label { flex: 1; font-size: 13px; color: #1e293b; cursor: default; }
.col-manage-item.core .col-label { color: #64748b; }
.cm-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.cm-insert-row { padding: 5px 16px; font-size: 12px; color: #2563eb; cursor: pointer; background: #f0f7ff; text-align: center; border-bottom: 1px dashed #bfdbfe; }
.cm-insert-row:hover { background: #dbeafe; }
.cm-rename-input { flex: 1; padding: 2px 6px; font-size: 13px; }
.col-manage-add-inline { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fefce8; border: 1px solid #fde68a; border-radius: 6px; }
.cm-insert-pos { font-size: 12px; color: #92400e; white-space: nowrap; font-weight: 600; }
/* 字段管理弹窗拖拽头部 */
.fm-drag-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; cursor: move; user-select: none; }
.fm-drag-head h3 { margin: 0; font-size: 15px; color: #1e293b; }
.fm-drag-head .drag-hint { font-size: 11px; color: #94a3b8; margin-left: 8px; }
/* 字段管理表格（统一类名 field-mgr-table） */
.field-mgr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.field-mgr-table thead th { background: #f5f5f5; text-align: left; padding: 8px 10px; border-bottom: 2px solid #e2e8f0; font-weight: 600; color: #475569; }
.field-mgr-table tbody tr { border-bottom: 1px solid #f0f0f0; transition: background .15s; }
.field-mgr-table tbody tr:hover { background: #f8fafc; }
.field-mgr-table tbody tr[draggable="true"] { cursor: grab; }
.field-mgr-table tbody tr[draggable="true"]:active { cursor: grabbing; }
.field-mgr-table td { padding: 8px 10px; }
.field-mgr-table .fa-grip-vertical { cursor: grab; font-size: 14px; color: #aaa; }
.field-mgr-table .fa-grip-vertical:hover { color: #534ab7; }
.stage-field-mgr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stage-field-mgr-table thead th { background: #f5f5f5; text-align: left; padding: 8px 10px; border-bottom: 2px solid #e2e8f0; font-weight: 600; color: #475569; }
.stage-field-mgr-table tbody tr { border-bottom: 1px solid #f0f0f0; transition: background .15s; }
.stage-field-mgr-table tbody tr:hover { background: #f8fafc; }
.stage-field-mgr-table tbody tr[draggable="true"] { cursor: grab; }
.stage-field-mgr-table tbody tr[draggable="true"]:active { cursor: grabbing; }
.stage-field-mgr-table td { padding: 8px 10px; }
.field-type-badge { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 3px; margin-left: 4px; }
.field-type-badge.common { background: #fef3c7; color: #92400e; }
.field-type-badge:not(.common) { background: #dbeafe; color: #2563eb; }
.stage-selector-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fff; border-bottom: 1px solid #f0f0f0; }
.stage-selector-bar select { padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
/* 上传下载进度条 */
.progress-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 9000; display: flex; align-items: center; justify-content: center; }
.progress-box { background: #fff; border-radius: 12px; padding: 32px 48px; min-width: 340px; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.progress-box h4 { margin: 0 0 16px; font-size: 16px; color: #1e293b; }
.progress-bar-out { height: 10px; background: #e2e8f0; border-radius: 5px; overflow: hidden; }
.progress-bar-in { height: 100%; background: linear-gradient(90deg, #2563eb, #16a34a); border-radius: 5px; transition: width .3s; }
.progress-text { margin-top: 10px; font-size: 13px; color: #64748b; }
/* 三栏表单网格（新建/编辑条目） */
.form-grid-3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
.form-grid-3col .form-row { display: flex; flex-direction: column; gap: 2px; }
.form-grid-3col .form-row label { font-size: 11px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-grid-3col .form-row input, .form-grid-3col .form-row select { font-size: 12px; padding: 4px 6px; }
.form-field-dl input { background: #f0f7ff; border-color: #93c5fd; }
/* 入库表延误天数高亮 */
.delay-warn { color: #dc2626; font-weight: 600; }

/* ==================== 质保金到期预警颜色 ==================== */
.warranty-overdue { background: rgba(220,38,38,0.08); }
.warranty-soon { background: rgba(245,158,11,0.08); }
.warranty-overdue-text { color: #dc2626; font-weight: 600; }
.warranty-soon-text { color: #d97706; font-weight: 600; }
.warranty-normal-text { color: #64748b; }

/* ==================== 财务汇总+进度面板 ==================== */
.finance-progress-panel { display: flex; gap: 16px; padding: 12px 20px; flex-wrap: wrap; }
.finance-card, .progress-card {
  flex: 1; min-width: 380px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px;
}
.panel-title { margin: 0 0 10px; font-size: 14px; color: #1e293b; font-weight: 600; }
.finance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
.finance-item { display: flex; flex-direction: column; gap: 2px; }
.finance-label { font-size: 11px; color: #64748b; }
.finance-val { font-size: 16px; font-weight: 600; color: #1e293b; }
.finance-sub { font-size: 11px; color: #94a3b8; }
.profit-positive { color: #16a34a; }
.profit-negative { color: #dc2626; }
.warranty-mini-warn { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e2e8f0; font-size: 12px; color: #d97706; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.warranty-mini-item { display: inline-flex; align-items: center; gap: 2px; }
/* 进度环 */
.progress-display { display: flex; align-items: center; gap: 20px; }
.progress-ring {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(#16a34a calc(var(--pct) * 1%), #e2e8f0 0);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.progress-ring::before {
  content: ''; position: absolute; width: 64px; height: 64px; border-radius: 50%; background: #f8fafc;
}
.progress-ring-text { position: relative; z-index: 1; text-align: center; }
.progress-pct-num { font-size: 18px; font-weight: 700; color: #1e293b; display: block; }
.progress-pct-label { font-size: 10px; color: #94a3b8; }
.progress-detail { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.progress-stat { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; }
.stat-label { color: #64748b; white-space: nowrap; }
.stat-val { color: #1e293b; font-weight: 500; }
.delayed-stage-list { display: flex; flex-wrap: wrap; gap: 4px; }
.delayed-stage-item { background: rgba(220,38,38,0.08); color: #dc2626; padding: 1px 6px; border-radius: 4px; font-size: 11px; }

/* ==================== 项目详情页：新版Tab布局 ==================== */
/* 顶部信息条 */
.detail-info-bar {
  display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 10px 20px 14px;
  background: #fff; border-bottom: 1px solid #E0DED8;
}
.info-bar-item { display: flex; flex-direction: column; gap: 2px; min-width: 80px; }
.info-bar-label { font-size: 11px; color: #94a3b8; font-weight: 400; }
.info-bar-val { font-size: 14px; color: #1e293b; font-weight: 500; }

/* 状态标签 */
.status-tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-进行中 { background: #e0f2fe; color: #0284c7; }
.status-已完工 { background: #dcfce7; color: #16a34a; }
.status-已暂停 { background: #fef3c7; color: #d97706; }
.status-已终止 { background: #fee2e2; color: #dc2626; }
.status-待启动 { background: #f1f5f9; color: #64748b; }

/* 迷你进度条 */
.progress-mini-bar {
  display: inline-flex; align-items: center; position: relative;
  width: 80px; height: 18px; background: #e2e8f0; border-radius: 9px; overflow: hidden;
}
.progress-mini-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: linear-gradient(90deg, #534AB7, #7c6ff0); border-radius: 9px;
  transition: width 0.4s ease;
}
.progress-mini-text {
  position: relative; z-index: 1; width: 100%; text-align: center;
  font-size: 11px; font-weight: 600; color: #1e293b;
}

/* Tab导航 */
.detail-tabs {
  display: flex; gap: 0; padding: 0 20px; background: #fff;
  border-bottom: 1px solid #E0DED8; flex-shrink: 0; overflow-x: auto;
}
.detail-tabs button {
  padding: 10px 18px; border: none; background: none; cursor: pointer;
  font-size: 13px; color: #64748b; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all 0.2s;
}
.detail-tabs button:hover { color: #534AB7; background: rgba(83,74,183,0.04); }
.detail-tabs button.active { color: #534AB7; border-bottom-color: #534AB7; font-weight: 600; }

/* Tab内容面板 */
.detail-tab-panel { padding: 4px 0 16px; }

/* 标题计数 */
.title-count { font-size: 12px; color: #94a3b8; font-weight: 400; }

/* 简报/单位/对象 信息网格 */
.brief-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px; background: #E0DED8; border: 1px solid #E0DED8; border-radius: 8px; overflow: hidden;
  margin-top: 8px;
}
.brief-item {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; background: #fff;
}
.brief-full { grid-column: 1 / -1; }
.brief-label { font-size: 11px; color: #94a3b8; font-weight: 400; }
.brief-val { font-size: 14px; color: #1e293b; font-weight: 500; word-break: break-all; }

/* 单位信息卡片 */
.unit-info-card { margin-top: 4px; }

/* 项目档案 - 文件卡片网格 */
.files-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px; margin-top: 8px;
}
.file-card {
  display: flex; gap: 12px; padding: 14px; background: #fff;
  border: 1px solid #E0DED8; border-radius: 8px; transition: box-shadow 0.2s;
}
.file-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.file-card-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.file-card-icon i { font-size: 18px; color: #534AB7; }
.file-card-body { flex: 1; min-width: 0; }
.file-card-title { font-size: 14px; font-weight: 500; color: #1e293b; margin-bottom: 4px; word-break: break-all; }
.file-card-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-bottom: 6px; }
.file-meta-tag { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #f1f5f9; color: #64748b; }
.file-meta-date { font-size: 11px; color: #94a3b8; }
.file-card-content { font-size: 12px; color: #64748b; margin-bottom: 6px; word-break: break-all; max-height: 60px; overflow: hidden; }
.file-card-actions { display: flex; gap: 8px; }

/* 空状态 */
.empty-state {
  text-align: center; padding: 60px 20px; color: #94a3b8;
}
.empty-state i { font-size: 48px; margin-bottom: 12px; display: block; color: #cbd5e1; }
.empty-state p { margin: 4px 0; font-size: 14px; }
.empty-state .empty-hint { font-size: 12px; color: #cbd5e1; }

/* ===== T17-T20 项目详情页升级 ===== */
.detail-subtitle { font-size: 13px; color: #888; font-weight: normal; margin-left: 8px; }
.detail-subtabs { display: flex; gap: 6px; padding: 6px 16px; background: #f5f7fa; border-bottom: 1px solid #e8e8e8; }
.detail-subtabs button { padding: 5px 14px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.detail-subtabs button.active { background: #1677ff; color: #fff; border-color: #1677ff; }

/* 建筑单体 */
.acct-opening-btn { padding: 0 5px; font-size: 10px; margin-left: 4px; vertical-align: middle; }
.opening-ie { border-top: 1px dashed #eee; margin-top: 4px; padding-top: 4px; }

/* 项目日志 */
.project-log-list { display: flex; flex-direction: column; gap: 10px; }
.project-log-item { border: 1px solid #e8e8e8; border-left: 4px solid #1677ff; border-radius: 6px; padding: 10px 14px; background: #fff; }
.project-log-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.project-log-date { color: #888; font-size: 12px; }
.project-log-type { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.log-type-manual { background: #e6f4ff; color: #1677ff; }
.log-type-sys { background: #f6ffed; color: #52c41a; }
.project-log-title { font-weight: 600; }
.project-log-op { color: #888; font-size: 12px; margin-left: auto; }
.project-log-content { margin-top: 6px; color: #555; font-size: 13px; white-space: pre-wrap; }
.project-log-actions { margin-top: 6px; text-align: right; }

/* 档案分类 */
.archive-group { margin-bottom: 18px; }
.archive-group-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f5f7fa; border-radius: 6px; margin-bottom: 8px; font-weight: 600; color: #333; }
.archive-group-header .btn { margin-left: auto; }
.ok-hint { color: #52c41a; padding: 6px 0; }

/* ===== T30 移动端适配增强 ===== */
@media (max-width: 768px) {
  /* 表格容器强制横向滚动 */
  .table-area { -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 720px; } /* 表格保持可读宽度，容器滚动 */
  /* sticky-bar 换行，控件可点 */
  .sticky-bar { flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
  .sticky-bar .view-title { width: 100%; }
  .sticky-bar .btn { margin: 2px 0; }
  /* 筛选区压缩 */
  .filter-section { overflow-x: auto; }
  .filter-row { flex-wrap: wrap; }
  /* 模态框适配小屏 */
  .modal { max-width: 96vw !important; max-height: 92vh; overflow-y: auto; }
  .form-grid-3col, .form-grid-2col { grid-template-columns: 1fr !important; }
  /* 详情页 Tab 横向滑动 */
  .detail-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .detail-tabs button { white-space: nowrap; flex-shrink: 0; }
  .detail-info-bar { overflow-x: auto; flex-wrap: nowrap; }
  /* 顶部用户信息换行 */
  .topbar { flex-wrap: wrap; }
  /* 账户卡片网格 */
  .account-grid { grid-template-columns: repeat(2, 1fr) !important; }
  /* 看板统计卡 1 列 */
  .dash-stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  /* 表格内按钮不换行 */
  .data-table .btn { white-space: nowrap; }
}
@media (max-width: 480px) {
  .account-grid { grid-template-columns: 1fr !important; }
  .dash-stat-grid { grid-template-columns: 1fr !important; }
  .finance-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ===== 成本利润核算（新） ===== */
.finance-item.highlight { background: #f5f7fa; border-radius: 6px; padding: 8px; }
.finance-item.profit-cell { border: 2px solid #e8e8e8; }
.finance-grid { grid-template-columns: repeat(3, 1fr); }
.cost-breakdown { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e8e8e8; }
.cost-breakdown-title { font-size: 12px; color: #666; margin-bottom: 6px; }
.cost-breakdown-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.cost-breakdown-item { display: flex; justify-content: space-between; padding: 4px 8px; background: #fafafa; border-radius: 4px; font-size: 12px; }
.cost-subj { color: #555; }
.cost-amt { font-weight: 600; }
.through-note { margin-top: 10px; padding: 6px 10px; background: #f0f5ff; border-radius: 4px; color: #1e40af; font-size: 12px; }

/* ===== 8月7日 招投标/审核/采购 样式 ===== */
.tag-blue { background: #E3F2FD; color: #1565C0; }
.tag-green { background: #E8F5E9; color: #2E7D32; }
.tag-red { background: #FFEBEE; color: #C62828; }
.tag-orange { background: #FFF3E0; color: #E65100; }
.tag-gray { background: #F5F5F5; color: #616161; }
.review-action-bar { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: #FAFAFA; border-radius: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.green { background: #52c41a !important; border-color: #52c41a !important; color: #fff !important; }

/* ==========================================================================
   P1 批次（2026-09-12）：全局搜索 / 我的常用 / 双视图 / 阶段进度条 / 看板行动动线
   ========================================================================== */

/* ---- P1-③ 顶栏「搜索」入口（深浅色顶栏均可读）---- */
.topbar-search-btn { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); color: #E8E6E1; font-size: 12px; font-family: inherit; cursor: pointer; transition: all .15s; }
.topbar-search-btn:hover { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.3); }
.topbar-search-btn kbd { font-family: inherit; font-size: 10px; padding: 1px 5px; border-radius: 3px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.16); color: #CFCCC5; }

/* ---- P1-③ Ctrl+K 命令面板 ---- */
.gs-overlay { position: fixed; inset: 0; background: rgba(20,20,18,.42); z-index: 4000; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.gs-panel { width: min(680px, 92vw); background: #fff; border-radius: 12px; box-shadow: 0 24px 64px rgba(0,0,0,.28); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; animation: hqGsIn .16s ease both; }
@keyframes hqGsIn { from { opacity: 0; transform: translateY(-10px) scale(.985); } to { opacity: 1; transform: none; } }
.gs-input-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #EFEDE8; }
.gs-input-row > i.fa-search { color: #9A968E; font-size: 15px; }
.gs-input { flex: 1; border: none; outline: none; font-size: 16px; font-family: inherit; color: #2C2C2A; background: transparent; min-width: 0; }
.gs-input::placeholder { color: #B5B1A9; }
.gs-loading { color: #534AB7; font-size: 13px; }
.gs-esc { font-size: 11px; color: #8A867E; border: 1px solid #E0DED8; border-radius: 4px; padding: 2px 6px; cursor: pointer; flex: 0 0 auto; }
.gs-esc:hover { color: #534AB7; border-color: #C9C4EE; }
.gs-results { overflow-y: auto; padding: 6px 0 8px; }
.gs-group-title { display: flex; align-items: center; gap: 6px; padding: 8px 16px 4px; font-size: 11px; color: #8A867E; letter-spacing: .5px; }
.gs-group-count { background: #F1EFE8; color: #8A867E; border-radius: 8px; font-size: 10px; padding: 0 5px; line-height: 14px; }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; border-left: 3px solid transparent; }
.gs-item > i:first-child { width: 16px; text-align: center; color: #8A867E; font-size: 13px; }
.gs-item-label { font-size: 13.5px; color: #2C2C2A; }
.gs-item-sub { font-size: 12px; color: #A8A49C; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }
.gs-item-go { color: #C9C4EE; font-size: 10px; }
.gs-item.active { background: #F6F5FD; border-left-color: #534AB7; }
.gs-item.active .gs-item-label { color: #534AB7; font-weight: 600; }
.gs-item.active > i:first-child { color: #534AB7; }
.gs-empty { padding: 34px 16px; text-align: center; color: #A8A49C; font-size: 13px; }
.gs-empty i { margin-right: 6px; }
.gs-foot { display: flex; align-items: center; gap: 14px; padding: 8px 16px; border-top: 1px solid #EFEDE8; background: #FBFAF8; font-size: 11px; color: #8A867E; }
.gs-foot b { color: #534AB7; font-weight: 600; }
.gs-foot-tip { margin-left: auto; }

/* ---- P1-④ 项目管理「卡片视图」---- */
.project-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; padding: 12px 2px; }
.project-card { background: #fff; border: 1px solid #E6E4DE; border-radius: 9px; padding: 12px 14px; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; gap: 8px; }
.project-card:hover { border-color: #AFA9EC; box-shadow: 0 4px 14px rgba(83,74,183,.12); transform: translateY(-1px); }
.project-card-top { display: flex; align-items: flex-start; gap: 7px; }
.project-card-name { font-size: 14px; font-weight: 600; color: #2C2C2A; line-height: 1.35; }
.project-card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.project-card-meta { display: flex; flex-wrap: wrap; gap: 3px 14px; font-size: 12px; color: #8A867E; }
.project-card-meta b { color: #55524C; font-weight: 500; }
.project-card-progress { height: 5px; background: #F1EFE8; border-radius: 3px; overflow: hidden; }
.project-card-progress > i { display: block; height: 100%; background: linear-gradient(90deg, #7F77DD, #534AB7); border-radius: 3px; }
.project-card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #8A867E; }
.view-switch { display: inline-flex; border: 1px solid #D3D1C7; border-radius: 6px; overflow: hidden; }
.view-switch button { border: none; background: #fff; color: #77736C; font-size: 12px; font-family: inherit; padding: 4px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.view-switch button + button { border-left: 1px solid #E6E4DE; }
.view-switch button.active { background: #534AB7; color: #fff; }

/* ---- P1-⑤ 项目详情 12 阶段可视化进度条 ---- */
.stage-pipeline { display: flex; gap: 3px; padding: 10px 16px 6px; overflow-x: auto; background: #fff; border-bottom: 1px solid #EFEDE8; }
.sp-seg { flex: 1 1 0; min-width: 46px; cursor: pointer; }
.sp-bar { height: 6px; border-radius: 3px; background: #E6E4DE; transition: all .15s; }
.sp-seg:hover .sp-bar { transform: scaleY(1.8); }
.sp-code { font-size: 10px; color: #A8A49C; text-align: center; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-seg.done .sp-bar { background: #3FA76B; }
.sp-seg.doing .sp-bar { background: #534AB7; box-shadow: 0 0 0 2px rgba(83,74,183,.16); }
.sp-seg.blocked .sp-bar { background: #E5484D; }
.sp-seg.done .sp-code, .sp-seg.doing .sp-code, .sp-seg.blocked .sp-code { color: #55524C; font-weight: 600; }

/* ---- P1-⑥ 看板「今日行动」三栏 ---- */
.action-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 4px; }
.action-col { background: #fff; border: 1px solid #E6E4DE; border-radius: 9px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 118px; }
.action-col-title { font-size: 12.5px; font-weight: 600; color: #2C2C2A; display: flex; align-items: center; gap: 6px; }
.action-col-title i { color: #534AB7; }
.action-col-n { margin-left: auto; font-size: 11px; color: #8A867E; font-weight: 400; }
.action-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: #4A473F; background: #FBFAF8; }
.action-row:hover { background: #F6F5FD; color: #534AB7; }
.action-row .ar-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.action-row .ar-main, .action-row .ar-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-row .ar-name small { color: #A8A49C; font-size: 11px; }
.action-row .ar-val { color: #A8A49C; font-size: 11.5px; white-space: nowrap; }
.action-row.ar-danger { background: #FEF5F5; }
.action-row.ar-danger .ar-val { color: #E5484D; font-weight: 600; }
.action-empty { font-size: 12px; color: #B5B1A9; padding: 16px 0; text-align: center; }

@media (max-width: 1100px) {
  .action-board { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .gs-panel { max-height: 84vh; }
  .gs-item-sub { display: none; }
  .topbar-search-btn kbd { display: none; }
  .project-card-grid { grid-template-columns: 1fr; }
  /* 窄屏固定展开也不让位：小屏宽度禁不起 168px 常驻 */
  .main-layout.sb-pinned .content { margin-left: 56px; }
}

