/* ============================================================
   PDS 前端自定义样式（前端拆分 T-12，2026-08-02 从 index.html 内联 <style> 抽出）
   纯搬移：内容与原内联一致，勿改样式逻辑
   ============================================================ */
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; background: #F5F7FA; color: #1D2129; font-size: 14px; }
        :root { --primary: #165DFF; --primary-hover: #0E42D2; --success: #00B42A; --success-hover: #009A24; --success-deep: #007D1D; --warning: #FF7D00; --warning-deep: #9E5300; --danger: #F53F3F; --text-1: #1D2129; --text-2: #4E5969; --text-3: #86909C; --border: #E5E6EB; }

        #login-container { width: 100vw; min-height: 100vh; background: linear-gradient(135deg, #e8f0ff 0%, #f5f7fa 100%); align-items: center; justify-content: center; position: fixed; top: 0; left: 0; z-index: 999; padding: 20px; }
        /* 3-7 功能开关：默认隐藏所有容器，避免刷新时闪烁登录页；登录成功后由 app-login.js 显示管理后台/外部视图
           注：display 控制已外置为 idx-disp-* 类 + d-none（B 批次 M3，D-8 收尾），不再由 ID 选择器定义，
           避免 ID 特异性压制 classList 切 d-none（特异性 100 > .d-none!important 10） */
        #login-container .login-footer { position: fixed; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--text-3); z-index: 1000; }
        .login-wrapper { display: flex; gap: 30px; max-width: 900px; width: 100%; align-items: stretch; }
        .login-card { background: #fff; border-radius: 12px; box-shadow: 0 8px 32px rgba(22,93,255,0.08); padding: 40px 36px; flex: 1; min-width: 260px; }
        .login-card.admin-card { border-top: 4px solid var(--primary); }
        .login-card.external-card { border-top: 4px solid var(--success); }
        .login-title { font-size: 20px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
        .login-subtitle { color: var(--text-2); font-size: 13px; margin-bottom: 20px; }
        .login-divider { display: flex; align-items: center; color: var(--text-3); font-size: 13px; padding: 0 6px; }
        .login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
        .login-divider::before { margin-right: 12px; }
        .login-divider::after { margin-left: 12px; }
        .btn-primary { background-color: var(--primary); border-color: var(--primary); border-radius: 6px; padding: 10px; font-weight: 500; }
        .btn-primary:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); }
        .btn-success-custom { background-color: var(--success-deep); border-color: var(--success-deep); color: #fff; border-radius: 6px; padding: 10px; font-weight: 500; }
        .btn-success-custom:hover { background-color: var(--success-hover); border-color: var(--success-hover); color: #fff; }
        .form-control, .form-select { border-radius: 6px; border: 1px solid var(--border); padding: 10px 12px; font-size: 14px; }
        .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,93,255,0.1); }
        .brand-icon { font-size: 38px; color: var(--primary); margin-bottom: 4px; }
        .brand-icon.external { color: var(--success); }
        .project-id-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }

        /* 3-7 功能开关：外部视图默认隐藏，分享链接 /v2/s/<pid> 进入时由 app-login.js 显示
           display 已外置 idx-disp-block + d-none（B 批次 M3 D-8 收尾） */
        #external-view { min-height: 100vh; background: #F5F7FA; }
        /* UX 自适应（2026-08-10）：目录树高度填满页面剩余空间（覆盖共用 .tree-container 固定 max-height:520px）。
           height: calc(100vh - 预留) 为确定性方案：100vh - 顶部header(约60px) - 项目信息卡(约70px) - 卡片头(约45px) - body padding(48px) ≈ 240px，
           留白余量保证任何屏幕"树底贴近页面底部"；内容超过该高度时 .tree-container 已设 overflow-y:auto 自动滚动。
           仅作用于外部视图（#external-view 前缀），不影响管理员树。 */
        #external-view .tree-container { height: calc(100vh - 240px); max-height: none; overflow-y: auto; }
        /* 管理员项目详情页：目录树填满 main-content 内容区（2026-09-02，与外部视图对称）
           ——沿用 #page-project-stat.active 成熟模式（index-inline.css）：height = main-content
           内容区（108 = 顶栏 60 + .main-content padding 上下 24×2，为 CSS 定义值非估算）；
           row/col/card/card-body 逐层 flex 传递，目录树容器 flex:1 + 内部滚动
           （原共用 .tree-container 的 max-height:520px 封顶导致底部大片空白）。
           ★.active 限定（项目统计页 2026-08-24 教训）：缺 .active 时该页会常显叠加在
             其他页面底部（id 选择器优先级高于 .admin-page 的 display:none 隐藏机制）。
           ★仅 md 及以上：窄屏 col 堆叠，填满高度反而异常。 */
        @media (min-width: 768px) {
            #page-project-detail.active { height: calc(100vh - 108px); display: flex; flex-direction: column; }
            #page-project-detail.active > .row { flex: 1; min-height: 0; }
            /* 左 col：目录树——calc(100vh - 280px) = 520 硬高度 + 内部 overflow-y 滚（v2 flex:1 收缩实测无滚条 80 节点全展开，
               v3 回到硬 calc 但缩 40px 给底部 p 留位置）。card/card-body 加 overflow:hidden + card-body padding-bottom:8px
               防 .tree-container 溢出 card-body 推底部 p 出去（v1 回归不再发生）。 */
            #page-project-detail.active .col-md-3 { display: flex; flex-direction: column; min-height: 0; }
            #page-project-detail.active .col-md-3 > .card { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
            #page-project-detail.active .col-md-3 > .card > .card-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 1rem 1rem 8px; }
            #page-project-detail.active .tree-container { height: calc(100vh - 280px); max-height: none; overflow-y: auto; flex: 0 0 calc(100vh - 280px); }
            /* 右 col：上传 card 自然高度（v2 给所有 .col-md-9 > .card 加 flex:1 把上传 card 拉伸到 ~316，
               .upload-area.h-100 继承后上传区变大；改用 :last-of-type 只让文件列表 card 内部滚）。
               :last-of-type 匹配 HTML 中最后一个 .card（line ~520 文件列表 card，adminRootGuide 是隐藏的 :first-of-type 不影响） */
            #page-project-detail.active .col-md-9 { display: flex; flex-direction: column; min-height: 0; }
            #page-project-detail.active .col-md-9 > .card:last-of-type { flex: 1; min-height: 0; display: flex; flex-direction: column; }
            #page-project-detail.active .col-md-9 > .card:last-of-type > .card-body { flex: 1; min-height: 0; overflow-y: auto; }
        }
        .external-header { background: #fff; border-bottom: 1px solid var(--border); padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; flex-wrap: wrap; gap: 8px; }
        .external-header .project-tag { background: #E8F3FF; color: var(--primary); padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; }
        /* UX 自适应（2026-08-10）：外部视图任意屏宽自适配——≤1920px 占满全宽无留白；
           超宽屏（>1920px）按 94% 适度放大并居中，防内容拉伸过度（CSS 变量统一维护） */
        .external-body { padding: 24px; width: 100%; max-width: var(--ux-max-body, 100%); margin: 0 auto; }
        @media (min-width: 1921px) {
            .external-body { max-width: 94%; }
        }

        .external-file-list .file-item { background: #fff; border-radius: 8px; padding: 12px 16px; border: 1px solid var(--border); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; transition: all 0.2s; }
        .external-file-list .file-item:hover { border-color: var(--primary); }

        /* 3-7 功能开关：管理后台容器默认隐藏，管理员登录成功后由 app-login.js 显示
           display 已外置 idx-disp-block + d-none（B 批次 M3 D-8 收尾） */
        #admin-container { min-height: 100vh; overflow: hidden; }
        .top-navbar { height: 60px; background: #fff; border-bottom: 1px solid var(--border); position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; padding: 0 24px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
        .navbar-logo { font-size: 18px; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 8px; }
        .navbar-right { margin-left: auto; display: flex; align-items: center; gap: 24px; }
        .user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; }
        .sidebar { width: 220px; background: #fff; border-right: 1px solid var(--border); position: fixed; top: 60px; bottom: 0; left: 0; padding-top: 12px; overflow-y: auto; }
        .menu-item { display: flex; align-items: center; gap: 12px; padding: 12px 24px; color: var(--text-2); cursor: pointer; border-left: 3px solid transparent; font-size: 14px; transition: all 0.2s; }
        .menu-item:hover { background: #F2F3F5; color: var(--primary); }
        .menu-item.active { background: #E8F3FF; color: var(--primary); border-left-color: var(--primary); font-weight: 500; }
        .main-content { margin-left: 220px; margin-top: 60px; padding: 24px; height: calc(100vh - 60px); overflow-y: auto; }
        .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
        .page-title { font-size: 20px; font-weight: 600; color: var(--text-1); margin: 0; }
        .card { border: none; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); margin-bottom: 20px; }
        .card-header { background: #fff; border-bottom: 1px solid var(--border); padding: 14px 20px; font-weight: 600; border-radius: 8px 8px 0 0 !important; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
        .stat-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); display: flex; align-items: center; gap: 16px; }
        .stat-icon { width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; flex-shrink: 0; }
        .stat-icon.blue { background: linear-gradient(135deg, #165DFF, #4080FF); }
        .stat-icon.green { background: linear-gradient(135deg, #00B42A, #23C343); }
        .stat-icon.orange { background: linear-gradient(135deg, #FF7D00, #FF9A2E); }
        .stat-icon.red { background: linear-gradient(135deg, #F53F3F, #FF7B7B); }
        .stat-icon.gray { background: linear-gradient(135deg, #86909C, #A9AEB8); }
        /* 驾驶舱 M1（方案 00-驾驶舱 v1.2）：工作台指标卡 7 列栅格（覆盖 Bootstrap row flex，grid 7 列，响应式降级） */
        .cockpit-stat-row { display: grid; grid-template-columns: repeat(7, 1fr); }
        .cockpit-stat-row .col { max-width: none; }
        @media (max-width: 1200px) { .cockpit-stat-row { grid-template-columns: repeat(3, 1fr); } }
        @media (max-width: 768px) { .cockpit-stat-row { grid-template-columns: repeat(2, 1fr); } }
        /* 驾驶舱 M2：图表区（纯 CSS 条形，零新增依赖；chart-title 左侧蓝条；lg 2×2 / md 以下单列由 col-md-6 栅格承担） */
        .chart-card .card-body { padding: 16px; }
        .chart-title { font-size: 13px; color: var(--text-2); font-weight: 600; margin-bottom: 12px; padding-left: 10px; border-left: 3px solid var(--primary); line-height: 1.3; }
        .chart-body { min-height: 120px; }
        .chart-note { font-size: 12px; color: var(--text-3); margin-top: 8px; }
        .bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
        .bar-label { width: 118px; font-size: 12px; color: var(--text-2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
        .bar-track { flex: 1; height: 20px; background: #F2F3F5; border-radius: 6px; overflow: hidden; cursor: pointer; transition: background .2s; }
        .bar-track:hover { background: #E8EBF0; }
        .bar-fill { height: 100%; background: var(--primary); border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding-right: 7px; color: #fff; font-size: 11px; min-width: 26px; transition: width .5s, opacity .2s; }
        .bar-track:hover .bar-fill { opacity: .85; }
        /* 修复 2026-08-26 生产实测：原 var(--orange) 未在 :root 定义 → 橙色条形背景无效变透明
           （截图左上金额区间/右下待审核 TOP 条形浅灰隐约）；改用项目既有 --warning（#FF7D00） */
        .bar-fill.orange { background: var(--warning); }
        .chart-empty { padding: 30px 0; text-align: center; color: var(--text-3); font-size: 12px; }
        .chart-loading { padding: 30px 0; text-align: center; color: var(--text-3); font-size: 12px; }
        /* 驾驶舱 M3：项目统计外部过滤条（显隐走 .show 类，禁内联 display——T2 测试） */
        .cockpit-filter-bar { display: none; background: #E8F3FF; color: #165DFF; font-size: 12px; align-items: center; justify-content: space-between; }
        .cockpit-filter-bar.show { display: flex; }
        .cockpit-filter-clear { cursor: pointer; color: #165DFF; font-weight: 600; }
        .stat-number { font-size: 24px; font-weight: 600; }
        .stat-label { font-size: 13px; color: var(--text-2); }
        .tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; line-height: 18px; }
        .tag-success { background: #E8FFEA; color: var(--success); }
        .tag-warning { background: #FFF7E8; color: var(--warning-deep); }
        .tag-danger { background: #FFECE8; color: var(--danger); }
        .tag-info { background: #E8F3FF; color: var(--primary); }
        .tag-default { background: #F2F3F5; color: var(--text-2); }
        .project-card { border: 1px solid var(--border); border-radius: 8px; padding: 16px; background: #fff; height: 100%; cursor: pointer; transition: all 0.3s; }
        .project-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(22,93,255,0.1); transform: translateY(-2px); }
        .upload-area { border: 2px dashed var(--border); border-radius: 8px; padding: 40px 20px; text-align: center; cursor: pointer; background: #FAFBFC; transition: all 0.3s; }
        .upload-area:hover { border-color: var(--primary); background: #F2F7FF; }
        .upload-area.drag-over { border-color: var(--primary); background: #E8F4FF; box-shadow: 0 0 0 3px rgba(79,110,247,0.15); }
        /* 2026-08-10 上传区左右分栏：叶子节点备注面板（评审 v1.1 P1-3：浅色卡片/正文色/禁加粗/限高滚动） */
        .note-panel { background: #F7F8FA; border: 1px solid #e5e7eb; border-radius: 0.375rem; padding: 1rem; }
        .note-panel-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
        /* 2026-08-10 用户决策：备注正文红色（覆盖评审 v1.1 P1-3 正文色约定） */
        .note-panel-body { margin: 0; font-size: 14px; color: #dc3545; line-height: 1.5; white-space: pre-wrap; word-break: break-all; max-height: 180px; overflow-y: auto; }
        /* 3-7 功能开关：SPA 各 admin-page 默认隐藏，switchPage（app-login.js）切到对应页时加 .active 显示 */
        .admin-page { display: none; }
        .admin-page.active { display: block; }
        .btn-sm { padding: 4px 10px; font-size: 12px; }
        .table { margin-bottom: 0; }
        .table thead th { background: #F7F8FA; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--border); padding: 12px 16px; font-size: 14px; }
        .table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
        .tree-container { padding: 8px 4px; max-height: 520px; overflow-y: auto; }
        .tree-node { padding: 6px 8px; cursor: pointer; border-radius: 4px; display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; user-select: none; transition: background 0.15s; }
        .tree-node:hover { background: #F2F3F5; }
        .tree-node.active { background: var(--primary); color: #fff; font-weight: 500; }
        .tree-node .toggle-icon { width: 16px; text-align: center; font-size: 10px; color: var(--text-3); flex-shrink: 0; transition: transform 0.2s; }
        .tree-node .toggle-icon.expanded { transform: rotate(90deg); }
        .tree-node .node-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .tree-node .node-pending { font-size: 10px; background: #FFFDE7; color: #F57F17; padding: 0 6px; border-radius: 8px; flex-shrink: 0; margin-left: 4px; font-weight: 500; line-height: 16px; }
        .tree-node .node-approved { font-size: 10px; background: #E8FFEA; color: #00B42A; padding: 0 6px; border-radius: 8px; flex-shrink: 0; margin-left: 4px; font-weight: 500; line-height: 16px; }
        .tree-node .node-rejected { font-size: 10px; background: #FFEBEE; color: #D32F2F; padding: 0 6px; border-radius: 8px; flex-shrink: 0; margin-left: 4px; font-weight: 500; line-height: 16px; }
        /* 🔴 缺漏方案（2026-08-03）：目录缺漏徽标（橙底） */
        .tree-node .node-missing { font-size: 10px; background: #FFF3E0; color: #E65100; padding: 0 6px; border-radius: 8px; flex-shrink: 0; margin-left: 4px; font-weight: 500; line-height: 16px; }
        /* T-162（2026-08-28 批次 E/E3）：原 .edit-dir-modal * 25 条规则整块删除——
           容器类全仓零命中（编辑目录弹窗实际由 edit_dir_modal.html 自带
           static/css/edit_dir_modal.css 自包含样式，iframe 隔离），原型残留死代码 */
                .tree-node .node-total { font-size: 10px; background: #F0F0F0; color: #333; padding: 0 6px; border-radius: 8px; flex-shrink: 0; margin-left: 4px; font-weight: 500; line-height: 16px; }
        /* 3-7 功能开关：目录树子节点默认折叠，点击父节点展开（加 .open） */
        .tree-children { padding-left: 20px; display: none; overflow: hidden; }
        .tree-children.open { display: block; }
        .tree-loading { padding: 12px 8px; color: var(--text-3); font-size: 13px; text-align: center; }
        .tree-empty { padding: 12px 8px; color: var(--text-3); font-size: 13px; text-align: center; }
        .file-icon { font-size: 24px; margin-right: 6px; }
        .pds-file-dragging { opacity: 0.5; }
        .project-list-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
        /* 文件列表：固定列宽 + 文字省略号 + 悬停显示全称
           2026-08-06 批量操作方案：新增 checkbox 列（第1列），所有索引 +1
           M3'（2026-08-14）：删"操作"列 → 5 列（checkbox/文件名/大小/修改时间/审核状态） */
        .file-table-fixed { table-layout: fixed; }
        .file-table-fixed th:nth-child(1) { width: 36px; }
        .file-table-fixed th:nth-child(2) { width: auto; }
        .file-table-fixed th:nth-child(3) { width: 100px; }
        .file-table-fixed th:nth-child(4) { width: 170px; }
        .file-table-fixed th:nth-child(5) { width: 100px; }
        .file-table-fixed th:nth-child(6) { width: 360px; }  /* M-审核意见列（2026-09-02）：宽度翻倍，超长省略 */
        .file-table-fixed td:nth-child(6) { color: #F5222D; }  /* M-审核意见列：文本红色（已驳回理由） */
        .file-table-fixed td { white-space: nowrap; }
        .file-table-fixed th { white-space: nowrap; }   /* 2026-08-15：表头含操作提示文字，禁止换行 */
        .file-table-fixed td:nth-child(1),
        .file-table-fixed td:nth-child(2),
        .file-table-fixed td:nth-child(3),
        .file-table-fixed td:nth-child(4),
        .file-table-fixed td:nth-child(5),
        .file-table-fixed td:nth-child(6) { overflow: hidden; }
        .file-table-fixed .cell-ellipsis { display: inline-block; max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
        /* 2026-08-06：文件列表整行点击选中高亮（参照项目列表交互），覆盖 Bootstrap table-active 弱色
           管理员 #fileTable + 外部 #externalFileList（外部 2026-08-06 起支持批量删除多选） */
        #fileTable tr.table-active,
        #externalFileList tr.table-active { background-color: #E8F3FF !important; }
        #fileTable tr.table-active td,
        #externalFileList tr.table-active td { background-color: transparent; }
        /* 3-7 功能开关：项目列表"查看"按钮默认隐藏，列表项选中（.active）时显示 */
        .review-btn { display: none; }
        .list-group-item.active .review-btn { display: inline-block; background:#fff; border-color:var(--primary); color:var(--primary); }
        /* 树形目录编辑器 */
        .dir-editor-container { display:flex; min-height:520px; }
        .dir-siderbar { width:300px; border-right:1px solid var(--border); padding:12px 0; flex-shrink:0; overflow-y:auto; background:#FAFBFC; }
        .dir-siderbar .sidebar-title { padding:0 16px 10px; font-size:13px; font-weight:600; color:var(--text-2); }
        .dir-siderbar .sidebar-add { padding:0 12px 10px; }
        .dir-siderbar .dir-parent-item { display:flex; align-items:center; gap:6px; padding:8px 16px; cursor:pointer; border-left:3px solid transparent; transition:all 0.15s; }
        .dir-siderbar .dir-parent-item:hover { background:#F0F2F5; }
        .dir-siderbar .dir-parent-item.active { background:#E8F4FF; border-left-color:var(--primary); font-weight:600; }
        .dir-siderbar .dir-parent-item .parent-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:default; }
        .dir-siderbar .dir-parent-item .parent-del { opacity:0.3; cursor:pointer; color:#dc3545; padding:0 2px; }
        .dir-siderbar .dir-parent-item .parent-del:hover { opacity:1; }
        .dir-siderbar .dir-parent-item .parent-sort { opacity:0.25; cursor:pointer; padding:0 2px; color:#666; }
        .dir-siderbar .dir-parent-item .parent-sort:hover { opacity:0.8; }
        .dir-siderbar .dir-parent-item .parent-edit { opacity:0.25; cursor:pointer; padding:0 2px; color:var(--primary); }
        .dir-siderbar .dir-parent-item .parent-edit:hover { opacity:0.8; }
        .dir-editor { flex:1; padding:16px; overflow-y:auto; }
        .dir-editor .editor-empty { display:flex; align-items:center; justify-content:center; height:300px; font-size:15px; }
        .dir-editor .editor-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid var(--border); }
        .dir-editor .dir-editor-table { margin-bottom:0; }
        .dir-editor .dir-editor-table td { vertical-align:middle; }
        .dir-editor .dir-editor-table input { width:100%; border:1px solid var(--border); border-radius:4px; padding:4px 8px; font-size:13px; }
        .dir-editor .dir-editor-table input:focus { border-color:var(--primary); outline:none; box-shadow:0 0 0 2px rgba(22,93,255,0.15); }
        /* 2026-08-10 备注支持换行：textarea 多行输入 */
        .dir-editor .dir-editor-table textarea.note-input { width:100%; min-height:42px; resize:vertical; line-height:1.5; border:1px solid var(--border); border-radius:4px; padding:4px 8px; font-size:13px; }
        .dir-editor .dir-editor-table textarea.note-input:focus { border-color:var(--primary); outline:none; box-shadow:0 0 0 2px rgba(22,93,255,0.15); }
        .dir-editor .dir-editor-table .seq-input { width:60px; text-align:center; }
        .dir-editor .dir-editor-table .name-input { width:100%; }
        .dir-editor .dir-editor-table .ref-cell { display:flex; align-items:center; gap:6px; }
        .dir-editor .child-actions { display:flex; gap:4px; }
        .dir-editor .child-actions .action-btn { padding:2px 6px; font-size:12px; cursor:pointer; border:none; background:none; border-radius:3px; }
        .dir-editor .child-actions .action-btn:hover { background:#F0F2F5; }
        .dir-editor .child-actions .action-del:hover { color:#dc3545; }
        .dir-editor .dir-editor-table tr.dragging { opacity:0.4; }
        .dir-editor .dir-editor-table tr.drag-over td { border-bottom:2px solid var(--primary); }
        #page-dir-config .page-header .btn-success { background:#1F8B4C; border-color:#1F8B4C; }
        #page-dir-config .page-header .btn-success:hover { background:#167B3E; }
        .project-tab { padding:6px 14px; cursor:pointer; font-size:13px; color:var(--text-3); border-bottom:2px solid transparent; transition:all 0.2s; }
        .project-tab:hover { color:var(--text-1); }
        .project-tab.active { border-bottom-color:var(--primary); color:var(--primary); font-weight:500; }
        #nodeDefTableBody code { font-size: 12px; word-break: break-all; }
        .pds-move-item { padding: 6px 10px; cursor: pointer; border-radius: 4px; display: flex; align-items: center; gap: 6px; font-size: 14px; transition: background 0.12s; }
        .pds-move-item:hover { background: #F2F3F5; }
        .pds-move-item.selected { background: #E8F3FF; font-weight: 600; color: var(--primary); }
        /* 侧边栏可收缩（方案 00-侧边栏可收缩改造方案 v1.1，2026-08-22 M1）：
           规则组必须保持在下方 ≤768px 媒体查询之前（P1-01 层叠警告：后置会覆盖窄屏恒定 60px） */
        .sidebar, .main-content { transition: width .2s ease, margin-left .2s ease; }
        body.sidebar-collapsed .sidebar { width: 60px; }
        body.sidebar-collapsed .main-content { margin-left: 60px; }
        body.sidebar-collapsed .menu-item { padding: 12px 0; justify-content: center; gap: 0; }
        body.sidebar-collapsed .menu-item span { display: none; }
        .sidebar-toggle { border: 1px solid var(--border); border-radius: 6px; background: transparent; color: #666; width: 32px; height: 32px; margin-right: 10px; cursor: pointer; }
        .sidebar-toggle:hover { color: var(--primary, #1E6DF2); border-color: var(--primary, #1E6DF2); }
        @media (max-width: 768px) {
            .login-wrapper { flex-direction: column; gap: 20px; }
            .sidebar { width: 60px; }
            /* 3-7 功能开关：窄屏响应式，侧边栏收起时隐藏菜单文字只留图标 */
            .sidebar .menu-item span { display: none; }
            .main-content { margin-left: 60px; }
        }
        /* M6'（方案 00-文件列表交互升级方案，2026-08-14）：移动端文件列表——文件名优先。
           独立 max-width:767.98px 精确界定 <768px（与上方既有 768px 查询共存不互扰）：
           隐藏 大小/修改时间 列（表头+单元格同步），文件名列占满剩余宽度；
           批量操作栏 flex-wrap 防溢出（JS 显示态已为 flex，窄屏只加 wrap，不覆盖隐藏态 none） */
        @media (max-width: 767.98px) {
            .file-table-fixed th:nth-child(3),
            .file-table-fixed th:nth-child(4),
            .file-table-fixed th:nth-child(6),
            .file-table-fixed td:nth-child(3),
            .file-table-fixed td:nth-child(4),
            .file-table-fixed td:nth-child(6) { display: none; }
            .file-table-fixed th:nth-child(2),
            .file-table-fixed td:nth-child(2) { width: auto !important; max-width: none; }
            .file-table-fixed td:nth-child(2) .cell-ellipsis { max-width: none; }
            #batchBar, #extBatchBar { flex-wrap: wrap; gap: 4px; align-items: center; }
        }
        /* M6'：批量栏基态 inline-flex（2026-08-15 修复：flex 块级导致批量栏独占一行，
           把筛选/回收站挤到下一行——用户实测反馈；inline-flex 保持与表头同行，
           窄屏 flex-wrap 仍生效；JS 显示态同为 inline-flex，隐藏态 none 由 style 覆盖） */
        /* M3（2026-08-17）：batchBar/extBatchBar 显示态改由 HTML idx-disp-inline-flex 提供，删除 ID display（ID 特异性 100 会压制 classList 切 d-none） */
        .toast-top-right { top: 70px !important; }
        /* 目录可见性设置弹窗样式 */
        .vis-tree-node { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 4px; transition: background 0.12s; }
        .vis-tree-node:hover { background: #F2F3F5; }
        .vis-tree-node .form-switch { padding-left: 2.5em; margin-bottom: 0; }
        .vis-tree-node .form-switch .form-check-input { cursor: pointer; }
        .vis-tree-node .node-label { flex: 1; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .vis-tree-children { padding-left: 24px; }
        .vis-tree-toggle { width: 16px; text-align: center; font-size: 10px; color: var(--text-3); flex-shrink: 0; cursor: pointer; transition: transform 0.2s; }
        .vis-tree-toggle.expanded { transform: rotate(90deg); }
        .vis-badge-internal { font-size: 10px; background: #FFF0F0; color: #F53F3F; padding: 0 8px; border-radius: 10px; flex-shrink: 0; }
        .vis-badge-public { font-size: 10px; background: #E8FFEA; color: #00B42A; padding: 0 8px; border-radius: 10px; flex-shrink: 0; }
        .vis-badge-partial { font-size: 10px; background: #FFF7E8; color: #FF7D00; padding: 0 8px; border-radius: 10px; flex-shrink: 0; }
        /* 半选态开关：滑块居中 + 橙色，直观区分 全开(右)/半开(中)/全关(左) */
        .vis-switch-partial .form-check-input { background-position: center !important; background-color: #FFB54D !important; border-color: #FFB54D !important; }
        /* ===== 外部「已驳回汇总」弹窗（2026-08-03 方案实施） ===== */
        /* 表头固定：滚动时列名不消失 */
        .reject-table { table-layout: fixed; }
        .reject-table thead th { position: sticky; top: 0; background: #F7F8FA; z-index: 1; border-bottom: 1px solid #E5E6EB; }
        /* 文件名称列（文件名主显示 + 目录灰字） */
        .reject-dir { font-size: 12px; color: #86909C; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        /* 驳回原因列：多行原样渲染（pre-wrap）+ 超长省略
           🔴 特异性必须高于 .file-table-fixed td{nowrap}（弹窗表格同时用了两个 class） */
        .reject-table td.reject-reason { white-space: pre-wrap; word-break: break-all; color: #4E5969; }
        .reject-table td.reject-reason br, .reject-table td.reject-reason .reject-line { display: block; }
        /* 文件高亮（跳转定位后闪烁提示） */
        .file-highlight { background: #FFF1E8 !important; animation: reject-flash 1.5s ease; }
        @keyframes reject-flash { 0% { background: #FFE3C8; } 50% { background: #FFD0A0; } 100% { background: #FFF1E8; } }
        /* 提醒中心 Tab（缺漏方案 2026-08-03） */
        .remind-tabs .nav-link { font-size: 13px; padding: 6px 14px; }
        .remind-tabs .nav-link.active { font-weight: 600; }
        /* ===== UX-F6（2026-08-07，AUD-126）无障碍修复 ===== */
        /* P2-R3：标准 visually-hidden 片段（h1 仅供屏幕阅读器，防肉眼外露破坏布局） */
        .visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
        /* P2-R2：定向对比度修复——downloadAll 按钮已随 T-252（批次 E/E3）确认死规则删除
           （HTML 无 onclick="downloadAll()" 元素），markMissingBtn 已于 v0.3 随底部按钮移除 */

/* M1' 选择模型（方案 00-文件列表交互升级方案 2026-08-14）：单元格点击=单选当前文档高亮 */
.file-list tbody tr.row-single, #fileTable tbody tr.row-single, #externalFileList tbody tr.row-single { background: #e3edff; outline: 1px solid #1a73e8; outline-offset: -1px; }

/* ===== M2' 右键菜单（方案 00-文件列表交互升级方案 2026-08-14） =====
   桌面 contextmenu + 触屏长按共用；role=menu/menuitem/aria-disabled；视口翻转由 JS 定位 */
.ctx-menu {
    min-width: 148px;
    padding: 4px 0;
    margin: 0;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    font-size: 13px;
    user-select: none;
    -webkit-user-select: none;
}
.ctx-menu-item {
    display: block;
    width: 100%;
    padding: 7px 16px;
    margin: 0;
    border: 0;
    background: transparent;
    text-align: left;
    color: #1d2129;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
}
.ctx-menu-item:hover:not(:disabled) { background: #f2f3f5; }
.ctx-menu-item:focus-visible { outline: 2px solid #1a73e8; outline-offset: -2px; background: #eef4ff; }
.ctx-menu-item:disabled, .ctx-menu-item.ctx-menu-disabled {
    color: #a9aeb8;
    cursor: not-allowed;
    background: transparent;
}
.ctx-menu-sep { height: 1px; margin: 4px 0; background: #e5e6eb; }

/* ===== M2：项目详情页项目切换下拉（方案《00-项目详情入口与项目切换优化方案》v1.2，2026-08-23 评审通过） =====
   纯 DOM 渲染、与右键菜单同风格（复用 ctx-menu 色板/圆角/悬停态），不引入新依赖 */
.detail-title-wrap { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.detail-switch-btn { padding: 0 4px 0 2px; font-size: 14px; color: #5f6b7a; text-decoration: none; line-height: 1; }
.detail-switch-btn:hover { color: #1a73e8; }
/* 2026-08-24 [1.9.78]：标题整体可点——hover 时标题变蓝+下划线提示可点击（用户反馈箭头太小易忽略） */
.detail-title-wrap:hover #detailProjectName { color: #1a73e8; text-decoration: underline; text-underline-offset: 4px; }
.detail-title-wrap:active #detailProjectName { color: #1a73e8; }
.detail-project-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 2050;
    width: 320px; max-width: 90vw; padding: 8px;
    background: #fff; border: 1px solid #e5e6eb; border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}
.detail-project-search { margin-bottom: 6px; }
.detail-project-list { max-height: 280px; overflow-y: auto; }
.detail-project-item {
    display: block; width: 100%; text-align: left; padding: 6px 10px;
    border: 0; border-radius: 6px; background: transparent;
    font-size: 14px; color: #1f2329; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.detail-project-item:hover, .detail-project-item:focus-visible { background: #f2f3f5; }
.detail-project-item.current { color: #1a73e8; font-weight: 500; }
.detail-project-empty { padding: 8px 10px; color: #a9aeb8; font-size: 13px; }
.tree-empty .detail-project-item { padding: 8px 10px; font-size: 13px; }
