/* ================= 基础变量与重置 ================= */
        
        .page-header {display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px;}
        .page-title h2 {margin: 0 0 5px 0; font-size: 22px; font-weight: 600;}
        .page-title p {margin: 0; color: var(--text-muted); font-size: 13px;}
        .action-buttons {display: flex; gap: 10px;}
        .layui-btn-primary {background: #fff; border-radius: 6px;}
        .layui-btn-normal {border-radius: 6px; background: var(--primary-color);}
        /* 项目视图区 */
        .project-toolbar {display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;}
        .view-switcher .layui-btn-group .layui-btn {border-radius: 6px; font-size: 13px; border-color: var(--border-color);}
        .view-switcher .layui-btn-group .layui-btn.layui-btn-normal {background: var(--primary-color); color: white; border-color: var(--primary-color);}
        .filter-group {display: flex; gap: 10px; align-items: center; font-size: 13px;}
        .filter-group select {height: 32px; border-radius: 6px; border: 1px solid var(--border-color); padding: 0 10px; outline: none; background: #fff;}
        /* 项目卡片网格 */
        .project-grid {display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 20px;
            align-content: start;}
        .project-card {background: #fff; border-radius: 10px; border: 1px solid var(--border-color);
            padding: 20px; transition: box-shadow 0.2s, border-color 0.2s;
            display: flex; flex-direction: column; cursor: pointer; position: relative;}
        .project-card:hover {box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-color: #cbd5e1;}
        /* 列表视图：单列 + 表格化展示 */
        .project-grid.list-view {grid-template-columns: 1fr; gap: 0;
            background: #fff; border-radius: 10px; border: 1px solid var(--border-color); overflow: hidden;}
        .project-grid.list-view .layui-table {margin: 0;}
        .project-grid.list-view #cardCreate {border: none; border-top: 1px dashed var(--border-color);
            min-height: 90px; flex-direction: row; gap: 10px; padding: 18px; border-radius: 0;}
        .project-grid.list-view #cardCreate .layui-icon {font-size: 22px; margin-bottom: 0;}
        .project-grid.list-view tbody tr:hover {background: #f9fafb;}
        /* AI 标注 */
        .ai-risk-badge {position: absolute; top: 15px; right: 15px;
            background: #fee2e2; color: #ef4444; font-size: 11px; padding: 2px 8px; border-radius: 12px;
            display: flex; align-items: center; gap: 4px; font-weight: 500;}
        .project-header {display: flex; align-items: center; gap: 12px; margin-bottom: 12px;}
        .project-icon {width: 40px; height: 40px; border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
            font-size: 20px; color: #fff; flex-shrink: 0;}
        .project-title {font-size: 16px; font-weight: 600; color: #1f2937;}
        .project-desc {font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1;}
        /* 进度条 */
        .progress-section {margin-bottom: 15px;}
        .progress-text {display: flex; justify-content: space-between; font-size: 12px; color: #6b7280; margin-bottom: 6px;}
        .progress-bar-bg {height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden;}
        .progress-bar-inner {height: 100%; border-radius: 3px; background: var(--primary-color);}
        .project-footer {display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed #f3f4f6; padding-top: 15px;}
        .member-avatars {display: flex;}
        .project-meta-info {font-size: 12px; color: #9ca3af; display: flex; align-items: center; gap: 5px;}
        /* --- 右侧边栏 --- */
        .sidebar-right {width: 320px; padding: 20px 20px 20px 0; overflow-y: auto; flex-shrink: 0;}
        .right-card {background: #fff; border-radius: 10px; border: 1px solid var(--border-color);
            padding: 15px; margin-bottom: 20px;}
        .right-card-header {display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; margin-bottom: 15px;}
        .right-card-header a {font-size: 12px; color: var(--text-muted); font-weight: normal; text-decoration: none; cursor: pointer;}
        /* 概览数据 */
        .overview-stats {display: flex; justify-content: space-around; text-align: center;}
        .ov-item .ov-val {font-size: 20px; font-weight: 700; color: var(--primary-color);}
        .ov-item .ov-label {font-size: 12px; color: var(--text-muted); margin-top: 4px;}
        /* 项目动态 */
        .activity-list {list-style: none; padding: 0; margin: 0;}
        .activity-item {display: flex; gap: 12px; margin-bottom: 15px; position: relative;}
        .activity-item::before {content: ''; position: absolute; left: 15px; top: 30px; bottom: -15px;
            width: 1px; background: #e5e7eb; z-index: 1;}
        .activity-item:last-child {margin-bottom: 0;}
        .activity-item:last-child::before {display: none;}
        .act-avatar {width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; z-index: 2; flex-shrink: 0;}
        .act-content {flex: 1; font-size: 13px; line-height: 1.5; color: #4b5563; padding-top: 5px;}
        .act-content b {color: #1f2937;}
        .act-time {font-size: 12px; color: #9ca3af; margin-top: 4px;}
        /* AI 风险预警 */
        .risk-card {background: linear-gradient(135deg, #fff7ed, #ffedd5); border-color: #fed7aa;}
        .risk-card .right-card-header {color: #9a3412;}
        .risk-item {background: #fff; border-radius: 6px; padding: 12px; margin-bottom: 10px; border: 1px solid #ffedd5;}
        .risk-item:last-child {margin-bottom: 0;}
        .risk-title {font-size: 13px; font-weight: 600; color: #9a3412; margin-bottom: 4px; display: flex; align-items: center; gap: 5px;}
        .risk-desc {font-size: 12px; color: #c2410c; line-height: 1.4;}
        /* 悬浮AI按钮 */
        .float-ai-btn {position: fixed; bottom: 30px; right: 30px; background: var(--primary-color); color: #fff;
            border-radius: 25px; padding: 10px 20px; box-shadow: 0 4px 12px rgba(59, 89, 152, 0.3);
            display: flex; align-items: center; gap: 8px; cursor: pointer; z-index: 1000; transition: transform 0.2s;}
        .float-ai-btn:hover {transform: translateY(-2px);}
        .bg-purple {background: #8b5cf6;}
        .bg-red {background: #ef4444;}
        .bg-green {background: #10b981;}
        .bg-orange {background: #f59e0b;}
        .bg-gray {background: #6b7280;}

        /* ==== 页面级覆盖/补遗（自 demo 原样恢复，优先于共享样式） ==== */
        .member-avatars .avatar {width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; margin-left: -8px;}
        .member-avatars .avatar:first-child {margin-left: 0;}
        .member-avatars .avatar-more {background: #f3f4f6; color: #6b7280; font-weight: 500;}

/* 页面级：内容区布局（原共享，因各页定义不同下沉到页面） */
.main-content {flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 20px;}

/* =====================================================================
 * 项目空间 · 本次增强（筛选、卡片操作、详情抽屉、操作日志）
 * 说明：颜色沿用 layout.css 的浅色主题变量，不引入深色面板
 * ===================================================================== */

/* ---- 工具栏搜索 ---- */
.filter-group .pj-search {height: 32px; width: 170px; font-size: 12px; border-radius: 6px; border-color: var(--border-color);}

/* ---- 卡片底部操作条 ---- */
.pj-card-foot {display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #f3f4f6; font-size: 12px; color: #9ca3af;}
.pj-foot-meta {display: flex; gap: 12px; align-items: center;}
.pj-foot-meta .layui-icon {font-size: 12px; margin-right: 2px;}
.pj-foot-actions {display: flex; gap: 12px;}
.pj-foot-actions a {color: #3b5998; cursor: pointer;}
.pj-foot-actions a.danger, .pj-danger-link {color: #dc2626; cursor: pointer;}
.pj-foot-actions a:hover, .pj-danger-link:hover {text-decoration: underline;}
.pj-inline-progress {display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b7280;}
.pj-empty {grid-column: 1 / -1; padding: 40px 0; text-align: center; color: #9ca3af; font-size: 13px;}

/* ---- 标签 ---- */
.tag {display: inline-flex; align-items: center; gap: 3px; font-size: 11px; line-height: 18px; padding: 0 8px; border-radius: 10px; white-space: nowrap;}
.tag-blue {background: #e0e7ff; color: #4338ca;}
.tag-green {background: #dcfce7; color: #15803d;}
.tag-gray {background: #f1f5f9; color: #64748b;}
.tag-red {background: #fee2e2; color: #b91c1c;}
.tag-orange {background: #ffedd5; color: #c2410c;}
.tag-purple {background: #ede9fe; color: #6d28d9;}
.level-1 {background: #fee2e2; color: #b91c1c;}
.level-2 {background: #fef3c7; color: #b45309;}
.level-3 {background: #dcfce7; color: #15803d;}

/* ---- 详情抽屉 ---- */
.pd-wrap {display: flex; flex-direction: column; height: 100%; background: #f8fafc;}
.pd-head {display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; background: #fff; border-bottom: 1px solid #eef2f7;}
.pd-icon {width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; flex-shrink: 0;}
.pd-title {font-size: 17px; font-weight: 600; color: #1f2937; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;}
.pd-meta {font-size: 12px; color: #6b7280; margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center;}
.pd-meta .layui-icon {font-size: 12px; margin-right: 2px;}
.pd-head-actions {margin-left: auto; display: flex; gap: 8px; flex-shrink: 0;}
.pd-tabs {display: flex; gap: 2px; padding: 0 16px; background: #fff; border-bottom: 1px solid #eef2f7;}
.pd-tab {padding: 11px 14px; font-size: 13px; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent;}
.pd-tab em {font-style: normal; color: #9ca3af; font-size: 12px;}
.pd-tab:hover {color: #3b5998;}
.pd-tab.active {color: #3b5998; border-bottom-color: #3b5998; font-weight: 600;}
.pd-tab.active em {color: #3b5998;}
.pd-body {flex: 1; overflow-y: auto; padding: 16px 20px;}
.pd-section {background: #fff; border: 1px solid #eef2f7; border-radius: 10px; padding: 16px; margin-bottom: 14px;}
.pd-section-title {font-size: 14px; font-weight: 600; color: #1f2937; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px;}
.pd-desc {font-size: 13px; color: #4b5563; line-height: 1.7;}
.pd-empty {text-align: center; color: #9ca3af; font-size: 13px; line-height: 1.9; padding: 24px 0;}
.pd-info-grid {display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; font-size: 13px;}
.pd-info-grid span {display: block; color: #9ca3af; font-size: 12px; margin-bottom: 2px;}
.pd-info-grid b {font-weight: 500; color: #1f2937;}
.pd-activity {font-size: 13px; color: #4b5563; line-height: 1.7; padding: 7px 0; border-bottom: 1px dashed #f1f5f9;}
.pd-activity:last-child {border-bottom: none;}
.pd-activity-time {float: right; color: #9ca3af; font-size: 12px;}
.pd-task-row {display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #f1f5f9; font-size: 13px;}
.pd-task-row:last-child {border-bottom: none;}
.pd-task-title {flex: 1; min-width: 0; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.pd-task-meta {font-size: 12px; color: #9ca3af;}

/* ---- 统计块 ---- */
.stat-grid {display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;}
.stat-box {background: #fff; border: 1px solid #eef2f7; border-radius: 10px; padding: 12px; text-align: center;}
.stat-box .n {font-size: 20px; font-weight: 700; color: #3b5998; line-height: 1.3;}
.stat-box .l {font-size: 12px; color: #6b7280; margin-top: 2px;}

/* ---- 成员 ---- */
.member-row {display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f1f5f9;}
.member-row:last-child {border-bottom: none;}
.avatar-sm {width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex-shrink: 0;}
.member-role {font-size: 11px; color: #6b7280; background: #f1f5f9; padding: 1px 8px; border-radius: 10px;}
.member-pick {max-height: 200px; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 6px; padding: 6px 10px; background: #fff;}
.pick-row {display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; color: #1f2937; cursor: pointer; margin: 0;}
.pick-row input {width: 14px; height: 14px; accent-color: #3b5998;}
.pick-row em {font-style: normal; font-size: 11px; color: #9ca3af; margin-left: auto;}

/* ---- 风险 ---- */
.risk-row {display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #f1f5f9; border-radius: 8px; margin-bottom: 8px; background: #fff;}
.risk-row:last-child {margin-bottom: 0;}

/* ---- 操作日志时间线 ---- */
.log-item {display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #eef2f7;}
.log-item:last-child {border-bottom: none;}
.log-dot {width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0;}
.log-main {flex: 1; min-width: 0;}
.log-head {font-size: 13px; color: #1f2937; line-height: 1.7;}
.log-sub {font-size: 12px; color: #9ca3af; margin-top: 2px;}
.log-changes {margin-top: 6px; background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 6px; padding: 6px 10px; font-size: 12px; color: #475569;}
.log-change {line-height: 1.9;}
.log-change .bf {color: #9ca3af; text-decoration: line-through;}
.log-change .af {color: #0f766e; font-weight: 500;}
.log-project {color: #3b5998; cursor: pointer; margin-right: 4px;}
.log-project:hover {text-decoration: underline;}
.act-empty {list-style: none; color: #9ca3af; font-size: 13px; text-align: center; padding: 12px 0;}

/* ---- 小屏兜底 ---- */
@media (max-width: 1400px) {
    .stat-grid {grid-template-columns: repeat(2, 1fr);}
}
