
/* ============================
    项目追踪管理系统 - 全局样式
    ============================ */

:root {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #edf0f5;
    --bg-input: #f5f7fa;
    --border: rgba(0, 0, 0, 0.1);
    --border-focus: rgba(99, 102, 241, 0.5);
    --text-primary: #1a1d2e;
    --text-secondary: #5c6078;
    --text-muted: #8b8fa7;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.2);
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --transition: all 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100vw;
    max-width: 100vw;
}

html {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 移动端主内容区宽度适配（兜底） */
@media (max-width: 900px) {
    body, .main-content, .projects-section, .dashboard-projects-section, .log-filters, .date-group, .user-group, .activity-list, .report-form, .tab-bar, .log-stats, .stock-list, .stock-card, .stock-card-top, .stock-card-meta, .stats-section, .stats-grid, .project-list, .fav-strip, .group-filter-bar {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    [class*="flex"], [class*="row"], [class*="col"], [class*="section"], [class*="content"] {
        min-width: 0 !important;
        box-sizing: border-box;
    }
    input, select, textarea, button {
        font-size: 16px !important;
    }
}

/* ============================
   顶部导航
   ============================ */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 28px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    font-size: 24px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
}

.nav-title {
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, #1a1d2e, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-notify-icon {
    position: relative;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    transition: var(--transition);
}

.nav-notify-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-hover);
}

.nav-notify-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    border: 2px solid var(--bg-card);
    font-size: 11px;
    font-weight: 700;
    line-height: 14px;
    display: none;
    text-align: center;
}

.user-info {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 6px 14px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

/* 页面级 Tab 导航 */
.nav-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-hover);
    border-radius: 10px;
    padding: 3px;
}
.nav-tab {
    padding: 6px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.nav-tab:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.5);
}
.nav-tab.active {
    color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    font-weight: 600;
}

/* 用户头像 & 下拉菜单 */
.user-avatar-wrap {
    position: relative;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: var(--transition);
    user-select: none;
}
.user-avatar:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 6px;
    z-index: 1000;
    animation: dropdownIn 0.15s ease;
}
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.user-dropdown.show {
    display: block;
}
.user-dropdown-info {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.user-dropdown-info .uname {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.user-dropdown-info .urole {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}
.user-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--accent);
}
.user-dropdown-item .ud-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}
.user-dropdown-item.danger {
    color: #dc2626;
}
.user-dropdown-item.danger:hover {
    background: rgba(220,38,38,0.06);
    color: #dc2626;
}

/* ============================
   主体布局
   ============================ */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 28px 40px;
}

/* ============================
   统计面板
   ============================ */
.stats-section {
    margin-bottom: 28px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.stat-total::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.stat-progress::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-done::before { background: linear-gradient(90deg, #22c55e, #4ade80); }
.stat-paused::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-nodes::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-users::before { background: linear-gradient(90deg, #ec4899, #f472b6); }

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
}

.dashboard-projects-section {
    padding-top: 16px;
}

.dashboard-stats-section {
    margin-bottom: 14px;
}

.dashboard-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-stats-grid .stat-card {
    padding: 12px 14px;
    cursor: pointer;
}

.dashboard-stats-grid .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 20px;
}

.dashboard-stats-grid .stat-value {
    font-size: 22px;
}

.stat-filter-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.stat-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-total .stat-icon { background: rgba(99, 102, 241, 0.1); }
.stat-progress .stat-icon { background: rgba(59, 130, 246, 0.1); }
.stat-done .stat-icon { background: rgba(22, 163, 74, 0.1); }
.stat-paused .stat-icon { background: rgba(245, 158, 11, 0.1); }
.stat-nodes .stat-icon { background: rgba(139, 92, 246, 0.1); }
.stat-users .stat-icon { background: rgba(236, 72, 153, 0.1); }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1d2e;
    -webkit-text-fill-color: unset;
}

.stat-total .stat-value { color: #4f46e5; }
.stat-progress .stat-value { color: #2563eb; }
.stat-done .stat-value { color: #16a34a; }
.stat-paused .stat-value { color: #d97706; }
.stat-nodes .stat-value { color: #7c3aed; }
.stat-users .stat-value { color: #db2777; }

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ============================
   项目区域
   ============================ */
.projects-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.section-left h2 {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-bar select,
.filter-bar input {
    height: 36px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.filter-bar .status-filter-select {
    width: 118px;
    padding: 0 8px;
}

.project-filter-bar {
    flex: 1 1 auto;
    width: min(720px, 100%);
}

.project-filter-bar .status-filter-select {
    flex: 0 0 112px;
    width: 112px;
    min-width: 112px;
    padding: 0 8px;
}

.project-filter-bar .search-box {
    flex: 1 1 320px;
    min-width: 220px;
}

.project-filter-bar .search-box input,
.project-filter-bar .search-box.focused input {
    width: 100% !important;
}

.filter-bar input {
    width: 200px;
}

.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* 搜索框 */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box .search-icon {
    position: absolute;
    left: 10px;
    font-size: 13px;
    pointer-events: none;
    opacity: 0.5;
    z-index: 1;
}

.search-box input {
    padding-left: 32px !important;
    padding-right: 28px !important;
    width: 260px !important;
}

.search-box.focused input {
    width: 340px !important;
}

.search-clear-btn {
    position: absolute;
    right: 6px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.search-clear-btn:hover {
    opacity: 1;
    color: var(--text-primary);
}

/* 收藏筛选按钮 */
.btn-fav-filter {
    height: 36px;
    width: 36px;
    min-width: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.btn-fav-filter:hover {
    border-color: #facc15;
    color: #facc15;
    background: rgba(250, 204, 21, 0.08);
}

.btn-fav-filter.active {
    border-color: #facc15;
    color: #facc15;
    background: rgba(250, 204, 21, 0.15);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.12);
}

/* 项目卡片收藏按钮 */
.btn-fav {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: all 0.2s;
    opacity: 0.5;
}

.btn-fav:hover {
    opacity: 1;
    color: #facc15;
    transform: scale(1.2);
}

.btn-fav.is-fav {
    color: #facc15;
    opacity: 1;
    text-shadow: 0 0 6px rgba(250, 204, 21, 0.4);
}

/* ===== 收藏快捷栏（仪表盘） ===== */
.fav-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.fav-strip-label {
    color: #facc15;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.fav-strip-items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fav-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.25);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.fav-chip:hover {
    background: rgba(250, 204, 21, 0.15);
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 2px 8px rgba(250, 204, 21, 0.15);
}

.fav-chip-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fav-chip-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.4;
    transition: all 0.15s;
}

.fav-chip-remove:hover {
    opacity: 1;
    color: #f43f5e;
}

/* ============================
   按钮
   ============================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 20px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.btn-primary.btn-sm {
    height: 32px;
    padding: 0 14px;
    font-size: 13px;
}

.btn-secondary {
    height: 38px;
    padding: 0 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: rgba(0, 0, 0, 0.2);
}

.btn-ghost {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    transition: var(--transition);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

.btn-danger-ghost {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    transition: var(--transition);
}

.btn-danger-ghost:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* ============================
   项目列表 - 瀑布流卡片
   ============================ */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.project-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    background: var(--bg-card);
}

.project-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    padding: 0;
    gap: 0;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    min-height: 140px;
}

.project-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* 卡片左侧封面区 */
.card-cover-area {
    width: 160px;
    min-height: 140px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.08));
}

.card-cover-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.3;
}

/* 卡片右侧信息区 */
.card-info-area {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    position: relative;
}

.card-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card-group-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(99,102,241,0.1);
    color: #6366f1;
    white-space: nowrap;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.card-meta-item {
    font-size: 11px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.card-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.card-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: var(--transition);
    flex-shrink: 0;
}

.card-actions .btn-ghost,
.card-actions .btn-danger-ghost {
    padding: 2px 6px;
    font-size: 14px;
    min-width: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-card-report {
    color: var(--accent) !important;
    background: rgba(99, 102, 241, 0.08) !important;
}

.btn-card-report:hover {
    background: rgba(99, 102, 241, 0.14) !important;
}

.project-item:hover .card-actions {
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    .card-actions {
        opacity: 1;
    }
}

.card-action-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: none;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.35);
}

.card-action-sheet-overlay.show {
    display: flex;
}

.card-action-sheet {
    width: 100%;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.16);
}

.card-action-sheet button {
    width: 100%;
    min-height: 46px;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
}

.card-action-sheet button.danger {
    color: var(--danger);
}

.card-action-sheet button.cancel {
    margin-top: 8px;
    border-bottom: none;
    border-radius: 10px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-weight: 600;
}

.project-name {
    font-size: 15px;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-progress {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge-done {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.badge-paused {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

/* 状态下拉选择器 */
.status-dropdown {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.status-select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 22px 0 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    font-family: inherit;
    transition: var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b8fa7' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}

.status-select:hover {
    filter: brightness(1.3);
}

.status-select.badge-progress {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.status-select.badge-done {
    background-color: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.status-select.badge-paused {
    background-color: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

.status-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px;
}

.badge-high {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.badge-mid {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.badge-low {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.project-time {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.project-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}

.project-header:hover .project-actions,
.project-item:hover .project-actions {
    opacity: 1;
}

/* 项目展开区域 */
.project-body {
    display: none;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.03);
}

.project-body.open {
    display: block;
}

.project-desc {
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
}

.node-tree {
    padding: 8px 16px;
}

.add-node-bar {
    padding: 10px 16px 14px;
    border-top: 1px solid var(--border);
}

.add-node-bar button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: var(--accent-hover);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.add-node-bar button:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent);
}

/* ============================
   节点树
   ============================ */
.node-item {
    position: relative;
    padding-left: 20px;
}

.node-item::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.node-item:last-child::before {
    bottom: 50%;
}

.node-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.node-content::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 18px;
    width: 12px;
    height: 1px;
    background: var(--border);
}

.node-content:hover {
    background: rgba(0, 0, 0, 0.02);
}

.target-highlight {
    animation: targetFlash 2.4s ease-out;
}

@keyframes targetFlash {
    0%, 45% { background: rgba(37, 99, 235, 0.16); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18); }
    100% { background: transparent; box-shadow: none; }
}

.node-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.node-dot.description { background: var(--accent); }
.node-dot.milestone { background: var(--warning); }
.node-dot.note { background: var(--info); }

.node-text {
    flex: 1;
    min-width: 0;
}

.node-text p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    word-break: break-word;
}

.node-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.node-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    opacity: 0;
    transition: var(--transition);
}

.node-content:hover .node-actions {
    opacity: 1;
}

/* 节点评论按钮 */
.node-comment-btn {
    font-size: 13px;
    padding: 2px 6px;
    cursor: pointer;
    color: var(--text-muted);
    border: none;
    background: none;
}
.node-comment-btn:hover { color: var(--accent); }
.node-comment-btn.has-comments { color: var(--accent); }

/* 节点评论区 */
.node-comments-section {
    margin: 4px 0 8px 18px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.node-comment-list { margin-bottom: 8px; }
.nc-item {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.nc-item:last-child { border-bottom: none; }
.nc-avatar {
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.nc-body { flex: 1; min-width: 0; }
.nc-header {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.nc-author { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.nc-time { font-size: 11px; color: var(--text-muted); }
.nc-del {
    background: none; border: none; cursor: pointer; font-size: 12px;
    opacity: 0; transition: opacity .2s; padding: 0 2px; color: var(--danger);
}
.nc-item:hover .nc-del { opacity: 1; }
.nc-del:hover { transform: scale(1.1); }
.nc-text { font-size: 13px; color: var(--text-primary); line-height: 1.5; margin-top: 2px; word-break: break-word; }
.node-comment-input-bar {
    display: flex; gap: 6px; align-items: center;
}
.node-comment-input-bar input {
    flex: 1; border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 5px 10px; font-size: 13px; background: var(--bg-primary);
    color: var(--text-primary); outline: none;
}
.node-comment-input-bar input:focus { border-color: var(--accent); }
.node-comment-input-bar button {
    padding: 5px 14px; border: none; border-radius: var(--radius-sm);
    background: var(--accent); color: #fff; font-size: 13px; cursor: pointer;
    white-space: nowrap;
}
.node-comment-input-bar button:hover { opacity: 0.85; }

.node-children {
    margin-left: 4px;
}

/* 节点附件缩略图 */
.node-attachments {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.node-att-thumb {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}
.node-att-thumb:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 12px rgba(99,102,241,0.25);
}
.node-att-thumb img, .node-att-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.node-att-thumb .video-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 22px;
    pointer-events: none;
}

/* 节点内容屏蔽 */
.node-masked .node-text p.node-masked-text {
    color: #999;
    font-style: italic;
}
.node-masked {
    opacity: 0.75;
}
.node-att-masked {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    border: 2px dashed #ccc;
}
.node-att-masked .masked-placeholder {
    font-size: 24px;
    opacity: 0.4;
}
.node-vis-toggle {
    font-size: 14px !important;
    padding: 2px 6px !important;
    border-radius: 4px;
}
.node-vis-toggle.vis-off {
    color: #999;
}
.node-vis-toggle.vis-on {
    color: var(--accent);
}

/* 节点 Lightbox */
.node-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.node-lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.node-lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 36px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}
.node-lightbox-close:hover { color: var(--accent); }
.node-lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
}
.node-lightbox-content video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
}

/* 评论数角标 */
.comment-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin-left: 3px;
    line-height: 1;
}

.btn-ghost.has-comments {
    color: var(--accent) !important;
}

.node-content[onclick]:not([onclick=""]) {
    cursor: pointer;
}

/* ============================
   评论区
   ============================ */
.comments-section {
    margin-left: 38px;
    margin-bottom: 6px;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
    padding-left: 14px;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
}

.comments-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 0;
}

.comment-item {
    display: flex;
    gap: 8px;
    padding: 6px 0;
}

.comment-item + .comment-item {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    margin-top: 2px;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-time {
    font-size: 11px;
    color: var(--text-muted);
}

.comment-del {
    font-size: 11px !important;
    padding: 0 4px !important;
    color: var(--text-muted) !important;
    opacity: 0;
    transition: var(--transition);
}

.comment-item:hover .comment-del {
    opacity: 1;
}

.comment-del:hover {
    color: var(--danger) !important;
}

.comment-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
    margin-top: 2px;
}

.comment-input-bar {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.comment-input {
    flex: 1;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.comment-input:focus {
    border-color: var(--border-focus);
}

/* @提及下拉框 */
.comment-input-wrapper {
    position: relative;
    flex: 1;
}

.mention-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    margin-bottom: 4px;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: var(--transition);
}

.mention-item:hover, .mention-item.active {
    background: rgba(99, 102, 241, 0.15);
}

.mention-icon {
    font-size: 14px;
}

.mention-name {
    flex: 1;
}

/* @提及高亮 */
.mention, .mention-highlight {
    color: var(--accent);
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
}

/* JRMention 通用@提及下拉框 */
.jr-mention-dropdown {
    position: fixed;
    left: 0;
    top: 0;
    right: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    max-height: 280px;
    overflow-y: auto;
    z-index: 10030;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.jr-mention-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: var(--transition);
}
.jr-mention-item:hover, .jr-mention-item.active {
    background: rgba(99, 102, 241, 0.15);
}
.jr-mention-icon { font-size: 14px; }
.jr-mention-name { flex: 1; }

@media (max-width: 768px) {
    .jr-mention-dropdown {
        border-radius: 10px;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    }
    .jr-mention-item {
        min-height: 42px;
        padding: 9px 12px;
        font-size: 14px;
    }
    .mention-dropdown {
        position: fixed;
        left: 10px !important;
        right: 10px !important;
        bottom: auto;
        top: auto;
        width: auto;
        max-height: min(280px, 50vh);
        z-index: 10030;
    }
}

/* 回复标签 */
.comment-reply-tag {
    font-size: 11px;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    padding: 1px 6px;
    border-radius: 3px;
}

.comment-reply-tag b {
    font-weight: 600;
}

/* 回复按钮 */
.comment-reply-btn {
    font-size: 11px !important;
    padding: 0 4px !important;
    color: var(--text-muted) !important;
    opacity: 0;
    transition: var(--transition);
}

.comment-item:hover .comment-reply-btn {
    opacity: 1;
}

/* 回复指示器 */
.comment-reply-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
    border-radius: 4px;
    margin-bottom: 4px;
}

.comment-reply-info b {
    font-weight: 600;
}

.comment-reply-info .btn-ghost {
    font-size: 11px !important;
    padding: 0 4px !important;
    color: var(--text-muted) !important;
}

/* ============================
   弹窗
   ============================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    width: 480px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s;
}

.modal-wide {
    width: 640px;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}
.modal-footer > button {
    flex: 1;
}

.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-row .required {
    color: var(--danger);
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row-inline {
    display: flex;
    gap: 16px;
}

.form-row-inline .form-row {
    flex: 1;
}

/* ============================
   修改历史
   ============================ */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
}

.history-meta .person {
    color: var(--accent-hover);
    font-weight: 500;
}

.history-meta .time {
    color: var(--text-muted);
}

.history-diff {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.history-old {
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid var(--danger);
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: line-through;
    line-height: 1.5;
}

.history-new {
    padding: 8px 12px;
    background: rgba(34, 197, 94, 0.08);
    border-left: 3px solid var(--success);
    border-radius: 4px;
    color: var(--text-primary);
    line-height: 1.5;
}

.history-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

/* ============================
   用户管理表格
   ============================ */
.user-table table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th,
.user-table td {
    padding: 10px 14px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.user-table th {
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--bg-card);
}

.user-table td {
    color: var(--text-primary);
}

.user-table tr:hover td {
    background: rgba(99, 102, 241, 0.04);
}

/* ============================
   Toast 消息
   ============================ */
.toast-container {
    position: fixed;
    top: 72px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    min-width: 280px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: toastIn 0.3s, toastOut 0.3s 2.7s;
    animation-fill-mode: forwards;
}

.toast-success { background: linear-gradient(135deg, #059669, #10b981); }
.toast-error { background: linear-gradient(135deg, #dc2626, #ef4444); }
.toast-info { background: linear-gradient(135deg, #2563eb, #3b82f6); }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ============================
   空状态
   ============================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* ============================
   加载动画
   ============================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================
   响应式布局
   ============================ */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* === 顶部导航 === */
    .top-nav {
        height: 52px;
        padding: 0 12px;
    }
    .nav-logo {
        width: 32px;
        height: 32px;
        font-size: 18px;
        border-radius: 8px;
    }
    .nav-left {
        gap: 6px;
        min-width: 0;
        flex: 1;
    }
    .nav-right {
        gap: 6px;
    }
    .nav-tabs {
        gap: 2px;
        padding: 2px;
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: 100%;
    }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tab {
        padding: 5px 12px;
        font-size: 12px;
        border-radius: 6px;
        min-height: 34px;
        display: inline-flex;
        align-items: center;
    }
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    .user-dropdown {
        min-width: 180px;
        right: -8px;
    }
    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
        border-radius: 8px;
        min-width: 36px;
        min-height: 36px;
    }

    /* === 主体内容 === */
    .main-content {
        padding: 12px 10px 24px;
    }

    /* === 筛选栏触控优化 === */
    .btn-fav-filter {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 20px;
    }
    .filter-bar select,
    .filter-bar input {
        min-height: 40px;
        font-size: 14px;
    }
    .btn-fav {
        min-width: 28px;
        min-height: 28px;
        font-size: 16px;
    }

    /* === 统计面板 === */
    .stats-section {
        margin-bottom: 16px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .stat-card {
        padding: 12px 10px;
        gap: 10px;
    }
    .stat-icon {
        font-size: 20px;
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
    .stat-value {
        font-size: 20px;
    }
    .stat-label {
        font-size: 11px;
    }

    /* === 项目区域 === */
    .projects-section {
        padding: 14px 10px;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .section-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .section-left h2 {
        font-size: 16px;
    }
    .filter-bar {
        width: 100%;
        flex-wrap: wrap;
    }
    .filter-bar select {
        flex: 1;
        min-width: 0;
    }
    .filter-bar input {
        width: 100%;
        flex: 1;
    }
    .search-box {
        flex: 1;
        min-width: 0;
    }
    .search-box input {
        width: 100% !important;
    }
    .search-box.focused input {
        width: 100% !important;
    }
    .project-filter-bar {
        flex-wrap: nowrap;
        gap: 8px;
    }
    .project-filter-bar .status-filter-select {
        flex: 0 0 112px;
        width: 112px;
        min-width: 112px;
        padding: 0 8px;
        font-size: 13px;
    }
    .project-filter-bar .search-box {
        flex: 1 1 auto;
        min-width: 0;
    }
    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    /* === 面包屑导航 === */
    .breadcrumb-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .breadcrumb-nav::-webkit-scrollbar { display: none; }
    .breadcrumb-item {
        flex-shrink: 0;
        padding: 6px 10px;
        font-size: 12px;
        min-height: 36px;
        touch-action: manipulation;
    }
    .group-manage-btn {
        flex-shrink: 0;
        min-height: 36px;
    }
    /* === 文件夹卡片 === */
    .folder-icon { font-size: 26px; }
    .folder-card .card-cover-area { width: 60px; min-height: 70px; }

    /* === 项目卡片 === */
    .project-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .project-header {
        min-height: 100px;
    }
    .card-cover-area {
        width: 90px;
        min-height: 100px;
    }
    .card-cover-placeholder {
        font-size: 32px;
    }
    .card-info-area {
        padding: 10px 12px;
    }
    .card-title {
        font-size: 14px;
    }
    .card-desc {
        font-size: 11px;
        -webkit-line-clamp: 1;
    }
    .card-meta-row {
        gap: 6px;
    }
    .card-meta-item {
        font-size: 10px;
    }
    .card-actions {
        display: none;
    }
    .project-item,
    .project-header {
        -webkit-touch-callout: none;
        user-select: none;
        touch-action: pan-y;
    }
    .project-meta {
        display: none;
    }
    .project-actions {
        opacity: 1;
    }

    /* === 节点树 === */
    .node-tree {
        padding: 6px 8px;
    }
    .node-item {
        padding-left: 14px;
    }
    .node-content {
        padding: 6px 8px;
        gap: 8px;
    }
    .node-text p {
        font-size: 13px;
    }
    .node-info {
        flex-wrap: wrap;
        gap: 6px;
        font-size: 11px;
    }
    .node-actions {
        opacity: 1;
    }
    .node-actions .btn-ghost,
    .node-actions .btn-danger-ghost {
        min-width: 36px;
        min-height: 36px;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .node-att-thumb {
        width: 52px;
        height: 52px;
    }
    .node-att-file {
        max-width: 160px;
        font-size: 11px;
        padding: 4px 8px;
    }

    /* === 评论区 === */
    .comments-section {
        margin-left: 12px;
        padding-left: 8px;
    }
    .comment-item {
        gap: 6px;
    }
    .comment-text {
        font-size: 12px;
    }
    .comment-input-bar {
        gap: 6px;
    }
    .comment-input-bar input {
        font-size: 16px;
        min-height: 40px;
    }
    .comment-input-bar button {
        min-height: 40px;
        min-width: 44px;
        font-size: 13px;
    }
    .comment-del,
    .comment-reply-btn {
        min-width: 32px;
        min-height: 32px;
        font-size: 13px !important;
        padding: 4px !important;
    }

    /* === 弹窗 === */
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .modal {
        width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        animation: slideUpMobile 0.3s;
    }
    .modal-wide {
        width: 100%;
    }
    .modal-header {
        padding: 16px;
    }
    .modal-body {
        padding: 16px;
    }
    .modal-footer {
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
    .form-row-inline {
        flex-direction: column;
        gap: 0;
    }
    .form-row input,
    .form-row textarea,
    .form-row select {
        font-size: 16px; /* 防止 iOS 缩放 */
    }

    /* === Toast === */
    .toast {
        min-width: auto;
        width: calc(100vw - 32px);
    }
    .toast-container {
        right: 16px;
        left: 16px;
    }

    /* === 节点上传区 === */
    .node-upload-item {
        width: 64px;
        height: 64px;
    }

    /* === 用户表格 === */
    .user-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .user-table table {
        min-width: 500px;
    }

    /* === Lightbox === */
    .node-lightbox-close {
        top: 10px;
        right: 14px;
        font-size: 28px;
    }
    .node-lightbox-content img {
        max-width: 96vw;
        max-height: 80vh;
    }
    .node-lightbox-content video {
        max-width: 96vw;
        max-height: 80vh;
    }
}

@keyframes slideUpMobile {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* === 超小屏 (< 480px) === */
@media (max-width: 480px) {
    .nav-tabs {
        gap: 1px;
        padding: 2px;
    }
    .nav-tab {
        padding: 4px 8px;
        font-size: 11px;
        min-height: 34px;
        flex: 0 0 auto;
    }
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .stat-card {
        padding: 10px 8px;
        gap: 8px;
    }
    .stat-icon {
        font-size: 18px;
        width: 32px;
        height: 32px;
    }
    .stat-value {
        font-size: 18px;
    }
    .card-cover-area {
        width: 72px;
        min-height: 88px;
    }
}

/* ============================
   滚动条美化
   ============================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ============================
   可见人员标签展示 + 成员管理弹窗
   ============================ */
.vis-users-container {
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 6px;
    min-height: 40px;
}
.vis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.vis-header label {
    font-weight: 500;
    font-size: 13px;
}
.vis-manage-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.vis-manage-btn:hover { background: #4f46e5; }

/* === 用户选择器（责任人/跟进人） === */
.user-picker-area {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    cursor: pointer;
}
.user-picker-area:hover {
    border-color: var(--accent);
}
.user-picker-placeholder {
    flex: 1;
    font-size: 13px;
    color: var(--text-muted);
    min-height: 24px;
    line-height: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.user-picker-placeholder .vis-tag {
    font-size: 12px;
    padding: 2px 8px;
}
.user-picker-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}
.user-picker-btn:hover { background: #4f46e5; }

.vis-tags-area {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
}
.vis-tag {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(99,102,241,0.1);
    color: #4f46e5;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    white-space: nowrap;
}
.vis-tag-empty {
    color: rgba(0,0,0,0.3);
    font-size: 12px;
    padding: 4px 0;
}

/* 成员管理弹窗 */
.member-mgr-modal {
    max-width: 600px;
    width: 95vw;
}
.member-mgr-body {
    display: flex;
    gap: 16px;
    min-height: 340px;
    max-height: 60vh;
}
.member-mgr-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.member-mgr-right {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(0,0,0,0.06);
    padding-left: 16px;
}
.member-mgr-right h4 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(0,0,0,0.55);
}
.member-search {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 10px;
    outline: none;
    box-sizing: border-box;
}
.member-search:focus { border-color: #6366f1; }
.member-dept-list {
    flex: 1;
    overflow-y: auto;
}
.member-dept-group {
    margin-bottom: 8px;
}
.member-dept-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(0,0,0,0.5);
    cursor: pointer;
    border-radius: 6px;
    user-select: none;
}
.member-dept-header:hover { background: rgba(0,0,0,0.03); }
.member-dept-header input[type="checkbox"] {
    accent-color: #6366f1; margin: 0;
}
.member-dept-header .dept-count {
    font-weight: 400; color: rgba(0,0,0,0.3); margin-left: auto;
}
.member-user-list {
    padding-left: 8px;
}
.member-user-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 13px;
    color: rgba(0,0,0,0.75);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s;
}
.member-user-item:hover { background: rgba(99,102,241,0.06); }
.member-user-item input[type="checkbox"] {
    accent-color: #6366f1; margin: 0; flex-shrink: 0;
}
.member-user-item.hidden { display: none; }

/* 已选列表 */
.member-selected-list {
    flex: 1;
    overflow-y: auto;
}
.member-selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    font-size: 13px;
    border-radius: 6px;
    color: rgba(0,0,0,0.75);
}
.member-selected-item:hover { background: rgba(0,0,0,0.03); }
.member-remove-btn {
    background: none;
    border: none;
    color: rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    line-height: 1;
}
.member-remove-btn:hover { color: #ef4444; }
.member-selected-empty {
    color: rgba(0,0,0,0.25);
    font-size: 12px;
    text-align: center;
    padding: 20px 0;
}
.vis-empty {
    padding: 16px;
    color: rgba(0,0,0,0.35);
    text-align: center;
    font-size: 13px;
}

/* ============================
   页面水印
   ============================ */
.watermark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}
/* 暗水印层 — 极低透明度，截图可检出 */
.watermark-dark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
    overflow: hidden;
}

/* ============================
   项目分组 - 文件夹导航
   ============================ */
.group-filter-bar {
    padding: 0 0 12px;
}

/* 面包屑导航 */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 6px 0;
}
.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 13px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.breadcrumb-item:hover {
    background: rgba(99,102,241,0.1);
    color: var(--text-primary);
}
.breadcrumb-item.current {
    background: rgba(99,102,241,0.15);
    color: var(--accent);
    font-weight: 600;
    cursor: default;
}
.breadcrumb-icon {
    font-size: 14px;
}
.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0 2px;
    user-select: none;
}

/* 文件夹卡片 */
.folder-card {
    cursor: pointer;
}
.folder-card .project-header {
    border: 1px dashed rgba(99,102,241,0.3);
    background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(99,102,241,0.02) 100%);
    min-height: 80px;
}
.folder-card .project-header:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(99,102,241,0.04) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.15);
}
.folder-card .card-cover-area {
    width: 80px;
    min-height: 80px;
}
.folder-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99,102,241,0.08) !important;
}
.folder-card .card-info-area {
    padding: 8px 12px;
    gap: 4px;
}
.folder-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.folder-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(99,102,241,0.3));
}
.folder-has-sub {
    position: absolute;
    bottom: -2px;
    right: -6px;
    font-size: 14px;
    background: var(--accent);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    line-height: 1;
}
.folder-title {
    color: var(--accent) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}
.folder-desc {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    display: flex;
    gap: 4px;
}
.folder-card .card-bottom-row {
    padding-top: 4px;
    border-top: none;
}

.group-manage-btn {
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    margin-left: 4px;
}
.group-manage-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(99,102,241,0.08);
}

.group-action-select {
    height: 30px;
    padding: 0 26px 0 9px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.group-action-select:hover,
.group-action-select:focus {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(99,102,241,0.08);
}

/* ============================
   节点附件上传区域
   ============================ */
.node-upload-area {
    border: 1px dashed rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 12px;
}

.node-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.node-upload-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-upload-item img,
.node-upload-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.node-upload-item .file-icon-lg {
    font-size: 32px;
}

.node-upload-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 9px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 4px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.node-upload-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(239,68,68,0.8);
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.node-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.node-upload-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================
   附件类型扩展图标
   ============================ */
.node-att-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    max-width: 200px;
}

.node-att-file:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent);
    color: var(--text-primary);
}

.node-att-file .file-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.node-att-file .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 封面图上传 */
.cover-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cover-preview {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg-hover);
    border: 1px solid var(--border);
}

.cover-upload-btn {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.cover-upload-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* 分组管理列表 */
.group-list-manage {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 4px;
}

.group-list-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    border: 1px solid var(--border);
    min-height: 44px;
    transition: var(--transition);
}
.group-list-item:hover {
    border-color: rgba(99,102,241,0.3);
    background: rgba(99, 102, 241, 0.05);
}

.group-list-item input {
    flex: 1;
    min-width: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-size: 13px;
}

.group-list-item .btn-ghost,
.group-list-item .btn-danger-ghost {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 16px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}
.group-list-item .btn-ghost:hover {
    background: rgba(99,102,241,0.15);
}
.group-list-item .btn-danger-ghost:hover {
    background: rgba(239,68,68,0.15);
}

/* ============================
   手机端触控优化
   ============================ */
@media (max-width: 768px) {
    /* 分组管理弹窗的按钮增大触控区域 */
    .group-list-item .btn-ghost,
    .group-list-item .btn-danger-ghost {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    .group-list-item input {
        font-size: 16px;
        padding: 8px 10px;
    }
    .group-list-item {
        padding: 6px 8px;
        gap: 4px;
    }
}

/* ===== 上传进度条遮罩 ===== */
#uploadProgressOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.45);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.upload-progress-box {
    background: #fff;
    border-radius: 12px;
    padding: 28px 32px;
    min-width: 320px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    text-align: center;
}

.upload-progress-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 12px;
}

.upload-progress-filename {
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin-bottom: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 360px;
}

.upload-progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.upload-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 4px;
    transition: width 0.2s ease;
}

.upload-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 8px;
}

.upload-progress-hint {
    font-size: 12px;
    color: #9ca3af;
}
