/* --- 全局与重置 --- */
        * { box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; }
        body, html { margin: 0; padding: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; background-color: #D3DFE6; user-select: none; -webkit-user-select: none; }

        :root {
            --color-red: #ff3b30;
            --color-yellow: #ffcc00;
            --color-green: #34c759;
            --color-blue: #007AFF;
            --color-gray: #8e8e93;
            --item-height: 50px; 
            --content-font-size: 16px;
        }

        /* --- 顶部导航栏 --- */
        .home-header {
            position: fixed; top: 0; left: 0; width: 100%; height: 60px;
            background: rgba(242, 242, 247, 0.95); backdrop-filter: blur(20px);
            z-index: 50; padding: 0 16px;
            border-bottom: 0.5px solid rgba(0,0,0,0.1);
            display: flex; align-items: center; justify-content: space-between; gap: 12px;
        }
        .menu-btn { font-size: 22px; cursor: pointer; padding: 5px; flex-shrink: 0; color: var(--color-blue); }
        .search-bar { flex: 1; height: 36px; padding: 0 12px; border-radius: 10px; background: #e3e3e8; border: none; font-size: 16px; color: #1c1c1e; }
        .sort-btn { font-size: 14px; color: var(--color-blue); cursor: pointer; flex-shrink: 0; display: flex; align-items: center; font-weight: 500; }

        /* --- 主页内容区 --- */
        #home-screen { 
            padding: 75px 16px 120px;
            min-height: 100%; 
            display: flex; flex-direction: column; gap: 10px; 
        }
        
        details.home-date-section { width: 100%; margin-bottom: 8px; }
        
        /* 主页日期栏吸顶 */
        summary.home-date-title { 
            font-size: 14px; font-weight: 700; color: #1c1c1e; 
            position: sticky;
            position: -webkit-sticky;
            top: 60px; 
            z-index: 40; 
            background-color: #D3DFE6; 
            padding: 8px 4px; 
            margin: 0 0 4px 0; 
            display: flex; align-items: center;
            list-style: none; cursor: pointer;
        }
        summary.home-date-title::-webkit-details-marker { display: none; }
        summary.home-date-title::before {
            content: '▼'; font-size: 11px; color: #8e8e93; margin-right: 8px; 
            transition: transform 0.25s ease; display: inline-block;
        }
        details[open] summary.home-date-title::before { transform: rotate(0deg); }
        details:not([open]) summary.home-date-title::before { transform: rotate(-90deg); }

        .section-list { display: flex; flex-direction: column; gap: 6px; }

        /* --- 主页列表项 --- */
        .app-item { 
            display: flex; align-items: stretch;
            width: 100%; height: 47px;
            background-color: #fff;
            cursor: pointer; position: relative; 
            transition: all 0.2s ease;
            overflow: hidden;
            border-radius:10px;
            border: none;
            box-shadow: 0 2px 5px rgba(0,0,0,0.03), 0 0 1px rgba(0,0,0,0.1); 
        }
        .app-item:active { transform: scale(0.98); opacity: 0.8; }

        /* 置顶图标样式 */
        .pin-indicator {
            position: absolute; top: 0; right: 0;
            width: 0; height: 0;
            border-top: 10px solid var(--color-blue);
            border-left: 10px solid transparent;
            z-index: 4;
            opacity: 0.8;
        }

        .item-left {
            width: 95px; flex-shrink: 0;
            border-right: 0.5px solid rgba(0,0,0,0.08); 
            display: flex; align-items: center; justify-content: center;
            font-weight: 600; font-size: 15px; color: #1c1c1e;
            padding: 0 8px; z-index: 2;
        }
        
        .item-right {
            flex: 1; display: flex; align-items: center; padding: 0 12px;
            font-size: 14px; color: #666;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2;
            /* 移除可能导致重叠的背景色，或者保持透明 */
            background: rgba(255,255,255,0.6); 
        }
        .item-right span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }

        /* 编辑模式相关 - 修复模糊问题 */
        .edit-overlay { 
            position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
            display: none; align-items: center; justify-content: space-between; 
            padding: 0 12px; z-index: 10; pointer-events: none; 
            /* 修改1：移除 backdrop-filter: blur(2px); 并调整背景透明度 */
            background: rgba(255,255,255,0.1); 
        }
        .edit-btn-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 2px 6px rgba(0,0,0,0.15); font-size: 14px; color: white; pointer-events: auto; }
        .btn-select { background: white; border: 1.5px solid #c7c7cc; }
        .app-item.selected .btn-select { background: var(--color-blue); border-color: var(--color-blue); }
        .app-item.selected .btn-select::after { content: '✓'; font-weight: bold; }
        .btn-rename { background: #5ac8fa; }
        
        body.edit-mode .edit-overlay { display: flex; }
        body.edit-mode .app-item { animation: shake 0.25s infinite linear; }
        @keyframes shake { 0% { transform: rotate(0deg); } 25% { transform: rotate(0.6deg); } 75% { transform: rotate(-0.6deg); } 100% { transform: rotate(0deg); } }

        .fab-home { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); width: 56px; height: 56px; background: #1c1c1e; color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,0.25); font-size: 32px; z-index: 40; transition: transform 0.2s; }
        body.edit-mode .fab-home { transform: scale(0); }

        .batch-bar { position: fixed; bottom: 0; left: 0; width: 100%; height: 60px; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); border-top: 0.5px solid rgba(0,0,0,0.2); display: flex; justify-content: space-between; align-items: center; padding: 0 20px; z-index: 60; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1); }
        body.edit-mode .batch-bar { transform: translateY(0); }
        .batch-bar { padding-left: 8px; padding-right: 8px; gap: 1px; }
        .batch-bar .batch-btn { font-size: 14px; padding: 0 6px; }
        .batch-btn { border: none; background: none; font-size: 16px; font-weight: 500; cursor: pointer; padding: 0 10px;}
        .btn-del { color: var(--color-red); }

        /* --- 侧边栏 --- */
        .sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 100; opacity: 0; visibility: hidden; transition: all 0.3s; backdrop-filter: blur(2px); }
        .sidebar { position: absolute; top: 0; left: 0; height: 100%; width: 280px; background: #f2f2f7; transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1); display: flex; flex-direction: column; }
        .sidebar-overlay.show { opacity: 1; visibility: visible; }
        .sidebar-overlay.show .sidebar { transform: translateX(0); }
        .sidebar-header { padding: 30px 20px 15px; font-size: 24px; font-weight: 700; border-bottom: 0.5px solid #c6c6c8; background: #f2f2f7; color: #000; }
        .archive-list { flex: 1; overflow-y: auto; padding: 16px; }
        .archive-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: white; border-radius: 12px; margin-bottom: 10px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
        .archive-main { display:flex; align-items:center; min-width:0; flex:1; }
        .archive-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
        .archive-restore-btn { border:none; background:#e8f2ff; color:var(--color-blue); border-radius:8px; padding:7px 10px; font-size:13px; font-weight:600; cursor:pointer; flex-shrink:0; }
        .archive-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--color-green); color: white; display: flex; justify-content: center; align-items: center; margin-right: 12px; font-weight: bold; font-size: 16px; }

        /* --- 详情页 --- */
        #detail-page { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #D3DFE6; display: none; flex-direction: column; z-index: 100; }
        #detail-page.active { display: flex; }

        .top-bar { height: 50px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-bottom: 0.5px solid #c6c6c8; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; flex-shrink: 0; }
        .back-btn { border: none; background: none; color: var(--color-blue); font-size: 17px; font-weight: 500; cursor: pointer; padding-left: 8px; display: flex; align-items: center; }
        .page-title { font-weight: 600; font-size: 17px; color: #000; }
        .top-add-btn { font-size: 24px; color: var(--color-blue); background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 40px; height: 100%; font-weight: 400; }

        /* --- 工具栏 --- */
        .format-toolbar { height: 48px; background: white; border-bottom: 0.5px solid #eee; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; overflow-x: auto; flex-shrink: 0; white-space: nowrap; }
        .format-toolbar::-webkit-scrollbar { display: none; }
        
        .fmt-btn { border: none; background: #f2f2f7; border-radius: 6px; width: 30px; height: 28px; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; font-family: -apple-system, sans-serif; font-size: 14px; flex-shrink: 0; margin-right: 4px; color: #333; transition: background 0.1s; }
        .fmt-btn:active { background: #e5e5ea; }
        .fmt-btn-bold { font-family: serif; font-size: 16px; font-weight: 700; }
        
        .global-tags-group { display: flex; gap: 2px; flex-shrink: 0; padding: 0 6px; border-left: 0.5px solid #eee; border-right: 0.5px solid #eee; }
        .global-tag-btn { font-size: 14px; font-weight: 600; color: #c7c7cc; cursor: pointer; user-select: none; transition: color 0.2s; padding: 4px 5px; }
        .global-tag-btn.active { color: var(--color-blue); }
        .color-dots-inline { display: flex; gap: 10px; flex-shrink: 0; align-items: center; padding-left: 5px; }
        .color-dot-btn { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); cursor: pointer; position: relative; }
        .color-dot-btn.active::after { content: ''; position: absolute; top: -3px; left: -3px; right: -3px; bottom: -3px; border: 2px solid #007AFF; border-radius: 50%; }

        /* 内容区域 - 滚动容器 */
        .content-area { 
            flex: 1; overflow-y: auto; padding: 16px 8px; 
            display: flex; flex-direction: column; gap: 16px;
            padding-bottom: 60vh; 
        }

        details.date-group { 
            border: 0.5px solid #d1d1d6; 
            border-radius: 12px; 
            background: #fff; 
            flex-shrink: 0; 
            box-shadow: 0 1px 3px rgba(0,0,0,0.03); 
        }
        
        summary.date-header { 
            background: #f7f7f9; 
            padding: 10px 14px; 
            font-size: 14px; font-weight: 600; color: #333; 
            position: sticky; position: -webkit-sticky; top: 0; z-index: 20; 
            border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
            border-bottom: 0.5px solid #e0e0e0;
            cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; 
        }
        
        details:not([open]) summary.date-header {
            border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;
            border-bottom: none; transition: border-radius 0.2s;
        }

        summary.date-header:active { background: #e5e5e5; }
        
        .date-header-right { display: flex; align-items: center; gap: 10px; }
        
        .date-progress-btn { 
            position: relative; width: 26px; height: 26px; border-radius: 50%; 
            font-size: 10px; font-weight: bold; color: #333; background: #eee; 
            display: flex; justify-content: center; align-items: center; cursor: pointer;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1); flex-shrink: 0;
        }

        .header-arrow { font-size: 12px; color: #999; transition: transform 0.2s; }
        details[open] .header-arrow { transform: rotate(180deg); }

        /* 详情页行样式 */
        .row-item { 
            display: flex; 
            width: 100%; 
            border-bottom: 1px dashed rgba(0,0,0,0.15); 
            flex-shrink: 0;
            transition: background 0.2s;
            padding: 14px 14px;
            background: #fff;
            position: relative;
            z-index: 1; 
        }
        .row-item:first-of-type { border-top: none; }
        .row-item:last-child { 
            border-bottom: none; 
            border-bottom-left-radius: 12px;
            border-bottom-right-radius: 12px; 
            overflow: hidden;
        }
        
        .row-select-area {
            width: 0; overflow: hidden;
            display: flex; align-items: flex-start; 
            justify-content: center;
            padding-top: 4px;
            transition: width 0.25s cubic-bezier(0.19, 1, 0.22, 1);
        }
        body.detail-edit-mode .row-select-area { width: 40px; }
        
        .row-checkbox {
            width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #c7c7cc;
            background: white; position: relative; transition: all 0.2s;
            flex-shrink: 0;
        }
        .row-item.selected .row-checkbox {
            border-color: var(--color-blue); background: var(--color-blue);
        }
        .row-item.selected .row-checkbox::after {
            content: '✓'; color: white; position: absolute; top: 50%; left: 50%; 
            transform: translate(-50%, -50%); font-size: 14px; font-weight: bold;
        }

        .row-content-grid {
            flex: 1;
            display: flex; 
            flex-direction: column;
            gap: 8px;
        }

        .moment-header {
            display: flex;
            align-items: baseline; 
            gap: 10px;
        }

        .col-time { 
            font-size: 15px; 
            font-weight: 600; 
            color: var(--color-blue);
            white-space: nowrap;
            user-select: none;
            cursor: pointer;
            line-height: 1.4;
            min-width: 45px; 
        }

        .col-title { 
            flex: 1; 
            line-height: 1.4;
            overflow: hidden;
        }
        .col-title .editable-cell {
            font-weight: 700; 
            color: #424A8A;   
            font-size: 15px;  
            min-height: 24px;
        }

        .col-content {
            line-height: 1.5;
            word-break: break-word;
            padding-left: 0px; 
        }
        .col-content .editable-cell {
            font-size: var(--content-font-size);
            color: #333; 
            min-height: 24px;
        }

        /* 提示文字 */
        .editable-cell[contenteditable=true]:empty:before {
            content: attr(placeholder);
            color: #b0b0b5; 
            display: block; 
            pointer-events: none; 
        }
        .editable-cell[contenteditable=true]:focus:before {
            color: #d1d1d6; 
        }

        .editable-cell { 
            width: 100%; outline: none; 
            white-space: pre-wrap; word-break: break-word; cursor: text; -webkit-user-select: text; user-select: text; 
        }
        
        .fab-add-row { position: absolute; bottom: 30px; right: 30px; width: 56px; height: 56px; background: var(--color-blue); color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 32px; box-shadow: 0 4px 15px rgba(0,122,255,0.4); cursor: pointer; z-index: 10; transition: transform 0.2s; }
        body.detail-edit-mode .fab-add-row { transform: scale(0); }

        .detail-batch-bar { 
            position: fixed; bottom: 0; left: 0; width: 100%; height: 60px; 
            background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); 
            border-top: 0.5px solid rgba(0,0,0,0.2); display: flex; justify-content: space-between; 
            align-items: center; padding: 0 30px; z-index: 60; 
            transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1); 
        }
        body.detail-edit-mode .detail-batch-bar { transform: translateY(0); }

        /* 滑块 */
        #slider-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); z-index: 200; display: none; justify-content: center; align-items: center; }
        #slider-modal.show { display: flex; }
        .slider-card { background: white; width: 85%; max-width: 300px; padding: 30px 20px; border-radius: 20px; text-align: center; }
        .slider-val { font-size: 36px; font-weight: bold; color: var(--color-blue); margin-bottom: 20px; font-family: monospace; }
        input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
        input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 28px; width: 28px; border-radius: 50%; background: white; border: 0.5px solid rgba(0,0,0,0.1); box-shadow: 0 2px 6px rgba(0,0,0,0.3); margin-top: -12px; }
        input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 6px; background: #e5e5e5; border-radius: 3px; }

        /* 新建APP弹窗 */
        #new-app-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding-top: 15vh; }
        #new-app-modal.show { display: flex; }
        .new-app-card { background: white; width: 80%; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); text-align: center; }
        .new-app-input { width: 100%; padding: 12px; font-size: 17px; border: 1px solid #ddd; border-radius: 10px; margin-bottom: 15px; background: #f9f9f9; }
        .new-app-btns { display: flex; gap: 10px; }
        .new-app-btn { flex: 1; padding: 12px; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; }


        /* --- 智能跟进 V1.1 --- */
        .followup-date-badge {
            display: inline-flex; align-items: center; gap: 4px;
            margin-top: 6px; padding: 4px 8px; border-radius: 999px;
            border: 1px solid rgba(255,59,48,0.25);
            background: rgba(255,59,48,0.08); color: var(--color-red);
            font-size: 12px; font-weight: 600; cursor: pointer;
            width: fit-content; user-select: none;
        }
        .followup-actions { display: flex; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
        .followup-action-btn {
            touch-action: manipulation; -webkit-touch-callout: none;
            border: none; border-radius: 7px; padding: 6px 10px;
            font-size: 12px; font-weight: 600; cursor: pointer;
            background: #f2f2f7; color: #333;
        }
        .followup-action-btn.primary { background: var(--color-blue); color: white; }
        .followup-action-btn.done { color: var(--color-green); }
        .followup-source-note { margin-top: 5px; font-size: 11px; color: #8e8e93; }
        .followup-decision-box {
            margin-top: 7px; padding: 8px 10px; border-radius: 9px;
            background: #f7f7f9; border: 1px solid #ececf0;
        }
        .followup-decision-title { font-size: 11px; color: #8e8e93; margin-bottom: 6px; font-weight: 600; }
        .followup-decision-actions { display: flex; gap: 8px; flex-wrap: wrap; }
        .followup-action-btn.resolve { background: rgba(52,199,89,0.12); color: #248a3d; }
        .followup-action-btn.continue { background: rgba(0,122,255,0.10); color: var(--color-blue); }
        .followup-result-note { margin-top: 6px; font-size: 11px; color: #8e8e93; font-weight: 600; }
        .followup-active-note { margin-top: 7px; font-size: 12px; color: var(--color-blue); font-weight: 600; }
        .followup-date-modal {
            position: fixed; inset: 0; z-index: 260; display: none; align-items: center; justify-content: center;
            background: rgba(0,0,0,0.38); backdrop-filter: blur(4px); padding: 20px;
        }
        .followup-date-modal.show { display: flex; }
        .followup-date-card { width: min(92vw, 360px); background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 12px 36px rgba(0,0,0,0.18); }
        .followup-date-title { font-size: 18px; font-weight: 700; color: #1c1c1e; margin-bottom: 6px; }
        .followup-date-hint { font-size: 13px; line-height: 1.45; color: #8e8e93; margin-bottom: 15px; }
        .followup-date-quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 14px; }
        .followup-date-quick-btn { border: none; border-radius: 11px; padding: 12px 8px; font-size: 15px; font-weight: 600; background: #f2f2f7; color: #1c1c1e; cursor: pointer; }
        .followup-date-quick-btn:active { background: #e5e5ea; }
        .followup-date-custom-row { display: flex; gap: 8px; align-items: center; }
        .followup-date-input { flex: 1; min-width: 0; height: 42px; border: 1px solid #d1d1d6; border-radius: 10px; padding: 0 10px; font-size: 15px; background: white; }
        .followup-date-confirm { height: 42px; border: none; border-radius: 10px; padding: 0 14px; background: var(--color-blue); color: white; font-size: 15px; font-weight: 600; cursor: pointer; }
        .followup-date-extra { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
        .followup-date-extra-btn { border: none; border-radius: 9px; padding: 8px 10px; background: #f2f2f7; color: #555; font-size: 13px; cursor: pointer; }
        .followup-date-cancel { width: 100%; margin-top: 14px; border: none; background: none; color: #8e8e93; font-size: 15px; padding: 8px; cursor: pointer; }
        .date-followup-label {
            color: var(--color-red); font-size: 12px; font-weight: 700;
            margin-left: 8px; white-space: nowrap;
        }
        .home-followup-label {
            position: absolute; right: 12px; top: 5px; z-index: 5;
            font-size: 10px; font-weight: 700; color: var(--color-red);
            background: rgba(255,255,255,0.84); padding: 2px 5px; border-radius: 999px;
            pointer-events: none;
        }


        /* --- V1.4 数据安全 / 回收站 --- */
        .sidebar-tools {
            padding: 10px 12px 18px;
            border-top: 0.5px solid #c6c6c8;
            background: #f2f2f7;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }
        .sidebar-tool-btn {
            border: none;
            border-radius: 10px;
            padding: 10px 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            background: white;
            color: #1c1c1e;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }
        .sidebar-tool-btn.primary { color: var(--color-blue); }
        .sidebar-tool-btn.trash { color: var(--color-red); grid-column: 1 / -1; }
        #backupImportInput { display:none; }

        .trash-modal {
            position: fixed; inset: 0; z-index: 260;
            background: rgba(0,0,0,0.42);
            backdrop-filter: blur(5px);
            display: none; align-items: center; justify-content: center;
            padding: 18px;
        }
        .trash-modal.show { display:flex; }
        .trash-card {
            width: 100%; max-width: 520px; max-height: 82vh;
            background: #f2f2f7; border-radius: 20px;
            display:flex; flex-direction:column; overflow:hidden;
            box-shadow: 0 16px 50px rgba(0,0,0,.25);
        }
        .trash-top {
            display:flex; align-items:center; justify-content:space-between;
            padding: 16px 18px; background:white;
            border-bottom: .5px solid #d1d1d6;
        }
        .trash-title { font-size:20px; font-weight:700; }
        .trash-close {
            border:none; background:#e9e9ee; border-radius:50%;
            width:32px; height:32px; font-size:18px; cursor:pointer;
        }
        .trash-note {
            font-size:12px; color:#8e8e93; padding:10px 16px 4px;
        }
        .trash-list {
            flex:1; overflow-y:auto; padding:10px 12px 18px;
        }
        .trash-empty {
            text-align:center; color:#8e8e93; padding:36px 16px;
        }
        .trash-section-title {
            font-size:13px; font-weight:700; color:#636366;
            padding:10px 4px 6px;
        }
        .trash-item {
            background:white; border-radius:12px; padding:11px 12px;
            margin-bottom:8px; display:flex; align-items:center;
            justify-content:space-between; gap:10px;
            box-shadow:0 1px 3px rgba(0,0,0,.04);
        }
        .trash-item-main { min-width:0; flex:1; }
        .trash-item-name {
            font-size:15px; font-weight:600; color:#1c1c1e;
            white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
        }
        .trash-item-meta {
            margin-top:3px; font-size:11px; color:#8e8e93;
            white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
        }
        .trash-actions { display:flex; gap:5px; flex-shrink:0; }
        .trash-action-btn {
            border:none; border-radius:8px; padding:7px 9px;
            font-size:12px; font-weight:600; cursor:pointer;
        }
        .trash-action-btn.restore { background:#e8f2ff; color:var(--color-blue); }
        .trash-action-btn.permanent { background:#fff0ef; color:var(--color-red); }
        .trash-bottom {
            padding:10px 14px 14px; background:white;
            border-top:.5px solid #d1d1d6;
        }
        .trash-empty-btn {
            width:100%; border:none; background:#fff0ef; color:var(--color-red);
            border-radius:10px; padding:11px; font-size:14px; font-weight:600;
            cursor:pointer;
        }


/* --- V1.6 云同步 --- */
.cloud-sync-panel {
    padding: 10px 12px 2px;
    background: #f2f2f7;
}
.cloud-sync-main-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    background: white;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.cloud-sync-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8e8e93;
    flex: 0 0 auto;
}
.cloud-sync-dot.ok { background: #34c759; }
.cloud-sync-dot.busy { background: #007aff; }
.cloud-sync-dot.warn { background: #ff9500; }
.cloud-sync-dot.error { background: #ff3b30; }
.cloud-sync-text { display:flex; flex-direction:column; min-width:0; }
.cloud-sync-text strong { font-size:14px; color:#1c1c1e; }
.cloud-sync-text small {
    margin-top:2px; font-size:11px; color:#8e8e93;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

.cloud-modal {
    position:fixed; inset:0; z-index:280;
    display:none; align-items:center; justify-content:center;
    background:rgba(0,0,0,.43);
    backdrop-filter:blur(6px);
    padding:18px;
}
.cloud-modal.show { display:flex; }
.cloud-card {
    width:100%; max-width:430px; max-height:86vh;
    background:#f2f2f7; border-radius:20px;
    overflow:hidden; box-shadow:0 18px 55px rgba(0,0,0,.26);
}
.cloud-top {
    background:white; padding:16px 18px;
    display:flex; align-items:flex-start; justify-content:space-between;
    border-bottom:.5px solid #d1d1d6;
}
.cloud-title { font-size:20px; font-weight:700; color:#1c1c1e; }
.cloud-subtitle { font-size:12px; color:#8e8e93; margin-top:3px; }
.cloud-close {
    border:none; background:#e9e9ee; border-radius:50%;
    width:32px; height:32px; font-size:18px; cursor:pointer;
}
.cloud-body { padding:16px; overflow-y:auto; max-height:72vh; }
.cloud-field { margin-bottom:12px; }
.cloud-field label {
    display:block; font-size:12px; color:#636366; margin:0 0 5px 3px;
}
.cloud-field input {
    box-sizing:border-box; width:100%; border:1px solid #d1d1d6;
    background:white; border-radius:10px; padding:12px;
    font-size:16px; outline:none;
}
.cloud-field input:focus { border-color:#007aff; }
.cloud-auth-actions, .cloud-account-actions {
    display:grid; gap:9px; margin-top:14px;
}
.cloud-primary-btn, .cloud-secondary-btn, .cloud-danger-btn {
    border:none; border-radius:10px; padding:12px 14px;
    font-size:15px; font-weight:650; cursor:pointer;
}
.cloud-primary-btn { background:#007aff; color:white; }
.cloud-secondary-btn { background:white; color:#007aff; }
.cloud-danger-btn { background:#fff0ef; color:#ff3b30; }
.cloud-primary-btn:disabled, .cloud-secondary-btn:disabled {
    opacity:.45; cursor:default;
}
.cloud-message {
    min-height:18px; margin-top:10px; font-size:12px; color:#ff3b30;
    text-align:center;
}
.cloud-account-card {
    background:white; border-radius:12px; padding:14px;
    text-align:center;
}
.cloud-account-name { font-size:17px; font-weight:700; color:#1c1c1e; }
.cloud-account-status { font-size:12px; color:#8e8e93; margin-top:5px; }
.cloud-choice-warning {
    background:#fff7e6; color:#9a6400; border-radius:10px;
    padding:10px 12px; line-height:1.5; font-size:12px; margin-bottom:12px;
}
.cloud-conflict-title {
    font-size:17px; font-weight:700; color:#ff3b30; margin-bottom:9px;
}
.cloud-compare {
    display:grid; grid-template-columns:1fr 1fr;
    gap:8px; margin-bottom:12px;
}
.cloud-side {
    background:white; border-radius:10px; padding:11px 10px;
    min-width:0;
}
.cloud-side strong { display:block; font-size:13px; margin-bottom:5px; }
.cloud-side span { font-size:11px; color:#8e8e93; line-height:1.45; }
.cloud-wide-btn { width:100%; margin-top:8px; }
.cloud-link-btn {
    display:block; margin:12px auto 0; border:none; background:transparent;
    color:#8e8e93; font-size:13px; cursor:pointer; padding:6px 12px;
}


/* V1.8 设置中心 + 界面体验 */
:root { --page-max-width: 980px; }
#appGridContainer,.quick-hint{width:100%;max-width:var(--page-max-width);margin-left:auto;margin-right:auto;}
.home-header{padding-left:max(16px,calc((100vw - var(--page-max-width))/2 + 16px));padding-right:max(16px,calc((100vw - var(--page-max-width))/2 + 16px));}
.top-bar,.format-toolbar{padding-left:max(10px,calc((100vw - var(--page-max-width))/2 + 10px));padding-right:max(10px,calc((100vw - var(--page-max-width))/2 + 10px));}
.content-area{width:100%;max-width:var(--page-max-width);margin-left:auto;margin-right:auto;}
.page-title{min-width:0;max-width:min(60vw,620px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.home-cloud-btn{position:relative;width:34px;height:34px;flex:0 0 34px;border:none;border-radius:10px;background:rgba(255,255,255,.72);color:#636366;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.06);}
.home-cloud-icon{font-size:18px;line-height:1}.home-cloud-dot{position:absolute;width:8px;height:8px;right:3px;bottom:3px;border-radius:50%;background:#8e8e93;border:1.5px solid white}.home-cloud-dot.ok{background:#34c759}.home-cloud-dot.busy{background:#007aff}.home-cloud-dot.warn{background:#ff9500}.home-cloud-dot.error{background:#ff3b30}
.quick-hint{display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.72);border:.5px solid rgba(0,0,0,.08);box-shadow:0 1px 3px rgba(0,0,0,.04);border-radius:11px;padding:9px 10px 9px 12px;margin-bottom:2px;color:#636366;font-size:12px;line-height:1.45}.quick-hint.hidden{display:none}.quick-hint span{flex:1}.quick-hint button{width:26px;height:26px;flex:0 0 26px;border:none;border-radius:50%;background:#e9e9ee;color:#636366;font-size:16px;cursor:pointer}
.item-left{width:118px;min-width:0;justify-content:flex-start;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-right{min-width:0}.item-right span{padding-right:86px}
.home-followup-label,.date-followup-label{border-radius:999px;font-weight:700}.home-followup-label.future,.date-followup-label.future{color:#0a65c7;background:rgba(0,122,255,.10)}.home-followup-label.due,.date-followup-label.due{color:#7a6200;background:rgba(255,204,0,.25)}.home-followup-label.overdue,.date-followup-label.overdue{color:#a35200;background:rgba(255,149,0,.17)}.home-followup-label.critical,.date-followup-label.critical{color:#c72c24;background:rgba(255,59,48,.13)}.home-followup-label{padding:2px 6px}.date-followup-label{padding:2px 6px;margin-left:7px}
.global-tags-group{align-items:center}.toolbar-section-label{font-size:11px;font-weight:600;color:#8e8e93;padding:0 3px 0 1px}.global-tag-clear{font-size:11px;color:#8e8e93;background:#f2f2f7;border-radius:5px;padding:3px 5px;cursor:pointer;margin-left:2px}.global-tag-clear:active{background:#e5e5ea}
.sidebar-settings-entry{padding:10px 12px 18px;border-top:.5px solid #c6c6c8;background:#f2f2f7}.settings-entry-btn{width:100%;border:none;border-radius:12px;background:white;padding:11px 12px;display:flex;align-items:center;gap:10px;cursor:pointer;text-align:left;box-shadow:0 1px 3px rgba(0,0,0,.05)}.settings-entry-icon{width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:#eef4ff;color:#007aff;font-size:17px;flex:0 0 30px}.settings-entry-copy{min-width:0;flex:1;display:flex;flex-direction:column}.settings-entry-copy strong{font-size:14px;color:#1c1c1e}.settings-entry-copy small{margin-top:2px;font-size:11px;color:#8e8e93;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#backupImportInput{display:none}
.settings-modal{position:fixed;inset:0;z-index:300;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.43);backdrop-filter:blur(6px);padding:18px}.settings-modal.show{display:flex}.settings-card{width:100%;max-width:520px;max-height:88vh;display:flex;flex-direction:column;background:#f2f2f7;border-radius:21px;overflow:hidden;box-shadow:0 18px 55px rgba(0,0,0,.27)}.settings-top{background:white;display:flex;align-items:flex-start;justify-content:space-between;padding:16px 18px;border-bottom:.5px solid #d1d1d6}.settings-title{font-size:21px;font-weight:750;color:#1c1c1e}.settings-subtitle{margin-top:3px;font-size:12px;color:#8e8e93}.settings-close{border:none;background:#e9e9ee;border-radius:50%;width:32px;height:32px;font-size:18px;cursor:pointer}.settings-body{overflow-y:auto;padding:12px}.settings-section{background:white;border-radius:14px;padding:13px;margin-bottom:10px;box-shadow:0 1px 3px rgba(0,0,0,.035)}.settings-section-title{font-size:12px;font-weight:750;color:#8e8e93;margin:0 0 10px 2px}
.settings-account-card{background:#f7f7fa;border-radius:11px;padding:11px}.settings-account-head{display:flex;align-items:center;gap:9px}.settings-status-dot{width:10px;height:10px;border-radius:50%;background:#8e8e93;flex:0 0 10px}.settings-status-dot.ok{background:#34c759}.settings-status-dot.busy{background:#007aff}.settings-status-dot.warn{background:#ff9500}.settings-status-dot.error{background:#ff3b30}.settings-account-copy{display:flex;flex-direction:column;min-width:0}.settings-account-copy strong{font-size:15px;color:#1c1c1e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-account-copy small{margin-top:2px;font-size:11px;color:#8e8e93}.settings-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:11px}.settings-meta-grid>div{background:white;border-radius:9px;padding:8px 9px;display:flex;flex-direction:column}.settings-meta-grid span{font-size:10px;color:#8e8e93}.settings-meta-grid strong{margin-top:3px;font-size:12px;color:#3a3a3c}.settings-meta-wide{grid-column:1/-1}
.settings-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.settings-data-actions{grid-template-columns:1fr 1fr 1fr}.settings-primary-action,.settings-action,.settings-danger-action{border:none;border-radius:9px;min-height:39px;padding:9px 8px;font-size:13px;font-weight:650;cursor:pointer}.settings-primary-action{background:#007aff;color:white}.settings-action{background:#f2f2f7;color:#1c1c1e}.settings-danger-action{background:#fff0ef;color:#ff3b30}.settings-primary-action:disabled,.settings-action:disabled,.settings-danger-action:disabled{opacity:.45;cursor:default}
.settings-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.settings-stat-grid>div{background:#f7f7fa;border-radius:10px;padding:10px 5px;text-align:center}.settings-stat-grid strong{display:block;font-size:18px;color:#1c1c1e}.settings-stat-grid span{display:block;margin-top:3px;font-size:10px;color:#8e8e93}.settings-note{margin-top:9px;font-size:10.5px;line-height:1.45;color:#8e8e93}.settings-font-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.settings-font-row>div{min-width:0;display:flex;flex-direction:column}.settings-font-row>div strong{font-size:14px;color:#1c1c1e}.settings-font-row>div small{margin-top:3px;font-size:10.5px;color:#8e8e93}.settings-font-row>strong{font-size:14px;color:#007aff}.settings-font-slider{width:100%;margin-top:14px;accent-color:#007aff}.settings-font-scale{display:flex;justify-content:space-between;font-size:10px;color:#8e8e93}.settings-about{margin-bottom:0}.settings-about-row{display:flex;justify-content:space-between;gap:14px;padding:7px 2px;border-bottom:.5px solid #efeff4;font-size:12px}.settings-about-row:last-child{border-bottom:none}.settings-about-row span{color:#8e8e93}.settings-about-row strong{color:#3a3a3c;text-align:right}
@media(min-width:760px){#home-screen{padding-top:82px}.home-header{height:66px}summary.home-date-title{top:66px}.app-item{height:54px;border-radius:12px}.item-left{width:190px;font-size:15px}.item-right{font-size:14px}.sidebar{width:320px}.new-app-card{width:420px}.row-item{padding-left:18px;padding-right:18px}}
@media(max-width:420px){.home-header{gap:7px;padding-left:10px;padding-right:10px}.sort-btn{font-size:12px}.home-cloud-btn{width:31px;height:31px;flex-basis:31px}#home-screen{padding-left:10px;padding-right:10px}.item-left{width:105px;padding-left:7px;padding-right:7px}.item-right{padding-left:9px;padding-right:9px}.item-right span{padding-right:74px}.quick-hint{font-size:11px}.toolbar-section-label{display:none}.settings-data-actions,.settings-action-grid{grid-template-columns:1fr}}


/* =========================================================
   V1.9 跟进中心 / 搜索筛选 / 自定义标签
   ========================================================= */
.sidebar-tool-btn.settings { grid-column:1 / -1; color:#3a3a3c; }

.home-header { gap:6px; }
.home-followup-center-btn {
    position:relative; height:32px; flex:0 0 auto;
    border:none; border-radius:9px; padding:0 9px;
    background:rgba(255,255,255,.75); color:#3a3a3c;
    font-size:12px; font-weight:650; cursor:pointer;
}
.home-followup-count {
    position:absolute; right:-5px; top:-6px;
    min-width:16px; height:16px; line-height:16px;
    box-sizing:border-box; padding:0 3px; border-radius:9px;
    background:#ff3b30; color:white; font-size:9px; font-weight:750;
}
.home-followup-count.zero { display:none; }

.home-filter-wrap {
    width:100%; max-width:var(--page-max-width, 980px);
    margin:0 auto 5px; padding:0 2px;
}
.home-filter-row {
    display:flex; align-items:center; gap:6px;
    overflow-x:auto; scrollbar-width:none;
}
.home-filter-row::-webkit-scrollbar { display:none; }
.home-filter-chip, .home-tag-filter-chip {
    border:none; border-radius:999px; white-space:nowrap;
    padding:6px 9px; font-size:11px; cursor:pointer;
    background:rgba(255,255,255,.70); color:#636366;
}
.home-filter-chip.active { background:#007aff; color:white; font-weight:650; }
.home-tag-filter-chip.active { background:#e8f2ff; color:#007aff; font-weight:650; }
.home-filter-divider { width:1px; height:20px; background:rgba(0,0,0,.12); flex:0 0 1px; }
.home-tag-filter-list { display:flex; align-items:center; gap:6px; }
.home-empty-filter { padding:44px 15px; text-align:center; color:#8e8e93; font-size:13px; }

.global-tags-group { display:flex; align-items:center; gap:4px; overflow-x:auto; scrollbar-width:none; }
.global-tags-group::-webkit-scrollbar { display:none; }
.global-tag-add, .global-tag-clear {
    flex:0 0 auto; border:none; border-radius:6px;
    padding:3px 6px; font-size:11px; cursor:pointer;
}
.global-tag-add { background:#e8f2ff; color:#007aff; }
.global-tag-clear { background:#f2f2f7; color:#8e8e93; }

/* 跟进中心 */
.followup-center-modal, .tag-modal {
    position:fixed; inset:0; z-index:310; display:none;
    align-items:center; justify-content:center; padding:16px;
    background:rgba(0,0,0,.43); backdrop-filter:blur(6px);
}
.followup-center-modal.show, .tag-modal.show { display:flex; }
.followup-center-card {
    width:100%; max-width:560px; max-height:86vh;
    display:flex; flex-direction:column; overflow:hidden;
    border-radius:20px; background:#f2f2f7;
    box-shadow:0 18px 55px rgba(0,0,0,.27);
}
.followup-center-top {
    display:flex; justify-content:space-between; align-items:flex-start;
    background:white; padding:15px 17px; border-bottom:.5px solid #d1d1d6;
}
.followup-center-title { font-size:20px; font-weight:750; }
.followup-center-subtitle { font-size:11px; color:#8e8e93; margin-top:3px; }
.followup-center-close {
    border:none; background:#e9e9ee; border-radius:50%;
    width:31px; height:31px; font-size:17px; cursor:pointer;
}
.followup-center-tabs { display:flex; gap:5px; padding:9px 10px; overflow-x:auto; }
.followup-center-tab {
    border:none; border-radius:999px; padding:6px 11px;
    background:white; color:#636366; cursor:pointer; font-size:12px;
}
.followup-center-tab.active { background:#007aff; color:white; }
.followup-center-list { overflow-y:auto; padding:0 10px 14px; }
.followup-center-empty { padding:42px 15px; text-align:center; color:#8e8e93; }
.followup-center-item {
    background:white; border-radius:12px; padding:11px;
    margin-bottom:8px; box-shadow:0 1px 3px rgba(0,0,0,.035);
}
.followup-center-item-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.followup-center-project {
    min-width:0; font-size:14px; font-weight:700;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.followup-center-due {
    flex:0 0 auto; border-radius:999px; padding:3px 7px;
    font-size:10px; font-weight:700;
}
.followup-center-due.future { color:#0a65c7; background:#eaf4ff; }
.followup-center-due.due { color:#806600; background:#fff6c7; }
.followup-center-due.overdue { color:#a35200; background:#fff0db; }
.followup-center-due.critical { color:#c72c24; background:#ffe8e6; }
.followup-center-note {
    margin-top:7px; color:#636366; font-size:12px; line-height:1.45;
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
}
.followup-center-meta { margin-top:6px; font-size:10px; color:#8e8e93; }
.followup-center-actions { display:flex; gap:7px; margin-top:9px; }
.followup-center-actions button {
    flex:1; border:none; border-radius:8px; padding:8px;
    font-size:12px; font-weight:650; cursor:pointer;
}
.followup-center-open { background:#f2f2f7; color:#3a3a3c; }
.followup-center-start { background:#007aff; color:white; }
.followup-center-highlight { animation:v19highlight 1.5s ease; }
@keyframes v19highlight {
    0%,100% { box-shadow:none; }
    25%,70% { box-shadow:0 0 0 3px rgba(0,122,255,.22); }
}

/* 自定义标签 */
.tag-card {
    width:100%; max-width:330px; border-radius:17px;
    background:white; padding:18px; box-shadow:0 18px 55px rgba(0,0,0,.25);
}
.tag-title { font-size:18px; font-weight:750; }
.tag-hint { margin-top:4px; color:#8e8e93; font-size:11px; }
.tag-input {
    box-sizing:border-box; width:100%; margin-top:14px; padding:11px 12px;
    border:1px solid #d1d1d6; border-radius:10px; font-size:16px; outline:none;
}
.tag-input:focus { border-color:#007aff; }
.tag-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.tag-actions button { border:none; border-radius:9px; padding:10px; font-size:14px; cursor:pointer; }
.tag-cancel { background:#f2f2f7; color:#3a3a3c; }
.tag-confirm { background:#007aff; color:white; }

@media(max-width:480px) {
    .home-header { gap:5px; padding-left:8px; padding-right:8px; }
    .sort-btn { font-size:11px; }
    .home-followup-center-btn { padding:0 7px; font-size:11px; }
    .home-filter-wrap { padding-left:1px; padding-right:1px; }
}


/* =========================================================
   V1.9.1 UI 修正
   ========================================================= */

/* 左侧只保留一个设置入口 */
.sidebar-settings-entry {
    margin-top: auto;
    padding: 10px 10px 16px;
    border-top: .5px solid #c6c6c8;
    background: #f2f2f7;
}
.settings-entry-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    background: white;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.settings-entry-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: #eef4ff;
    color: #007aff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.settings-entry-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.settings-entry-copy strong {
    font-size: 14px;
    color: #1c1c1e;
}
.settings-entry-copy small {
    margin-top: 2px;
    font-size: 11px;
    color: #8e8e93;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-settings-entry .cloud-sync-dot {
    flex: 0 0 10px;
}

/* 0 条跟进必须彻底隐藏，不留红点 */
.home-followup-count.zero,
.home-followup-count[style*="display:none"] {
    display: none !important;
}

/* 小屏顶部进一步收紧，避免搜索 / 排序 / 跟进 / 云朵相互挤压 */
@media (max-width: 420px) {
    .home-header {
        gap: 4px !important;
        padding-left: 7px !important;
        padding-right: 7px !important;
    }
    .menu-btn {
        padding-left: 3px;
        padding-right: 3px;
    }
    .search-bar {
        min-width: 0;
        padding-left: 9px;
        padding-right: 9px;
        font-size: 14px;
    }
    .sort-btn {
        font-size: 10.5px !important;
    }
    .home-followup-center-btn {
        height: 30px;
        padding: 0 6px;
        font-size: 10.5px;
    }
    .home-cloud-btn {
        width: 29px !important;
        height: 29px !important;
        flex-basis: 29px !important;
    }
}

@media (max-width: 350px) {
    .sort-btn {
        display: none;
    }
}


/* ============================================================
   V2.0 正式 UI：功能不删数据，只隐藏复杂度
   ============================================================ */
.v2-ui {
    --v2-bg: #f6f7fb;
    --v2-card: #ffffff;
    --v2-text: #17181c;
    --v2-sub: #7b7f8a;
    --v2-line: #e8eaf0;
    --v2-blue: #246bfd;
    --v2-blue-soft: #edf3ff;
    --v2-orange: #f79009;
    --v2-red: #e5484d;
    --v2-green: #25a55f;
    --v2-radius: 16px;
    --v2-shadow: 0 8px 30px rgba(34, 43, 69, .06);
    background: var(--v2-bg) !important;
    color: var(--v2-text);
}

.v2-ui #home-screen,
.v2-ui #detail-page {
    background: var(--v2-bg) !important;
}

/* ---------- 首页 ---------- */
.v2-ui #home-screen {
    padding: 0 !important;
    overflow-y: auto;
}
.v2-home-shell {
    width: min(1040px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 0 120px;
}
.v2-appbar {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.v2-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--v2-line);
    border-radius: 12px;
    background: rgba(255,255,255,.86);
    color: #515662;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(34,43,69,.03);
}
.v2-brand {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.v2-brand strong {
    font-size: 24px;
    line-height: 1.08;
    font-weight: 760;
    letter-spacing: -.02em;
}
.v2-brand small {
    margin-top: 4px;
    font-size: 11px;
    color: var(--v2-sub);
}
.v2-appbar-actions {
    display: flex;
    gap: 8px;
}
.v2-followup-icon {
    color: var(--v2-blue);
    font-weight: 800;
}
.v2-ui .home-followup-count {
    position: absolute;
    right: -5px;
    top: -6px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 4px;
    background: var(--v2-red);
    color: white;
    border: 2px solid var(--v2-bg);
    border-radius: 999px;
    font-size: 9px;
}
.v2-ui .home-followup-count.zero { display: none !important; }

.v2-ui .home-cloud-btn {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    background: rgba(255,255,255,.86) !important;
}
.v2-ui .home-cloud-dot {
    right: 3px;
    bottom: 3px;
}

.v2-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    margin-top: 18px;
}
.v2-search-box {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--v2-line);
    border-radius: 14px;
    background: var(--v2-card);
    padding: 0 13px;
    box-shadow: 0 3px 12px rgba(34,43,69,.025);
}
.v2-search-icon {
    color: #9ca0aa;
    font-size: 18px;
}
.v2-ui .search-bar {
    width: 100%;
    min-width: 0;
    height: auto !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px;
    color: var(--v2-text);
}
.v2-ui .search-bar:focus { outline: none; }
.v2-tool-btn {
    height: 44px;
    min-width: 58px;
    padding: 0 12px;
    border: 1px solid var(--v2-line);
    border-radius: 14px;
    background: var(--v2-card);
    color: #5d616c;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}
.v2-ui .sort-btn {
    position: static !important;
    height: 44px !important;
    min-width: 58px;
    padding: 0 12px !important;
    border: 1px solid var(--v2-line) !important;
    border-radius: 14px !important;
    background: var(--v2-card) !important;
    color: #5d616c !important;
    font-size: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v2-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.v2-stat-card {
    min-height: 76px;
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-radius);
    background: var(--v2-card);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 14px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 4px 16px rgba(34,43,69,.025);
}
.v2-stat-card span {
    font-size: 24px;
    line-height: 1;
    font-weight: 780;
}
.v2-stat-card small {
    margin-top: 7px;
    color: var(--v2-sub);
    font-size: 11px;
}
.v2-stat-card.danger span { color: var(--v2-red); }
.v2-stat-card.today span { color: var(--v2-orange); }
.v2-stat-card.primary span { color: var(--v2-blue); }

.v2-ui .v2-filter-panel {
    display: none;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--v2-line);
    border-radius: 14px;
    background: rgba(255,255,255,.75);
}
.v2-ui .v2-filter-panel.show { display: block; }
.v2-ui .home-filter-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.v2-ui .home-filter-row::-webkit-scrollbar { display: none; }
.v2-ui .home-filter-chip,
.v2-ui .home-tag-filter-chip {
    border: none;
    border-radius: 999px;
    padding: 7px 10px;
    background: #f0f2f6;
    color: #6b707b;
    font-size: 11px;
    white-space: nowrap;
}
.v2-ui .home-filter-chip.active {
    background: var(--v2-blue);
    color: white;
}
.v2-ui .home-tag-filter-chip.active {
    background: var(--v2-blue-soft);
    color: var(--v2-blue);
}

.v2-ui #appGridContainer {
    width: 100% !important;
    max-width: none !important;
    margin-top: 18px;
}
.v2-section {
    margin-top: 18px;
}
.v2-section:first-child { margin-top: 0; }
.v2-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
    padding: 0 2px;
}
.v2-section-head strong {
    font-size: 13px;
    color: #4e535e;
}
.v2-section-head span {
    font-size: 10px;
    color: #9ca0aa;
}
.v2-project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}
.v2-ui .app-item.v2-project-card {
    width: auto !important;
    height: auto !important;
    min-height: 132px;
    display: block !important;
    padding: 14px !important;
    margin: 0 !important;
    border: 1px solid var(--v2-line) !important;
    border-radius: var(--v2-radius) !important;
    background: var(--v2-card) !important;
    box-shadow: var(--v2-shadow) !important;
    overflow: visible !important;
    position: relative;
    cursor: pointer;
}
.v2-ui .app-item.v2-project-card:hover {
    border-color: #dbe1ec !important;
    transform: translateY(-1px);
}
.v2-card-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.v2-card-title {
    min-width: 0;
    flex: 1;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 730;
    color: var(--v2-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.v2-card-more {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    margin: -5px -5px 0 0;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #8e929c;
    font-size: 17px;
    cursor: pointer;
}
.v2-card-more:hover { background: #f2f4f7; }
.v2-card-preview {
    min-height: 38px;
    margin-top: 8px;
    color: #6e737e;
    font-size: 12.5px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.v2-card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    min-height: 21px;
    margin-top: 10px;
}
.v2-card-tag {
    max-width: 88px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f1f3f7;
    color: #757a85;
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.v2-card-footer {
    min-height: 24px;
    margin-top: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.v2-card-meta {
    color: #a0a4ad;
    font-size: 9.5px;
}
.v2-card-followup {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 7px;
    font-size: 9.5px;
    font-weight: 700;
}
.v2-card-followup.future { background: #edf3ff; color: var(--v2-blue); }
.v2-card-followup.due { background: #fff6cc; color: #826800; }
.v2-card-followup.overdue { background: #fff0df; color: #a65a00; }
.v2-card-followup.critical { background: #ffe8e8; color: #c6373c; }
.v2-pin-mark {
    margin-right: 5px;
    color: var(--v2-blue);
}
.v2-empty {
    padding: 58px 20px;
    border: 1px dashed #dce0e8;
    border-radius: var(--v2-radius);
    text-align: center;
    color: #979ba5;
    background: rgba(255,255,255,.5);
    font-size: 13px;
}

/* 旧首页日期分组/进度 UI 在 V2 主界面不再使用 */
.v2-ui .home-date-section { display: none !important; }

/* 新建按钮 */
.v2-ui .fab-home.v2-fab {
    position: fixed !important;
    right: max(22px, calc((100vw - 1040px) / 2 + 22px)) !important;
    bottom: 26px !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 16px !important;
    background: var(--v2-blue) !important;
    font-size: 27px !important;
    box-shadow: 0 10px 28px rgba(36,107,253,.30) !important;
}

/* ---------- 详情页 ---------- */
.v2-ui #detail-page {
    overflow: hidden;
}
.v2-detail-shell {
    width: min(900px, 100%);
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}
.v2-ui .top-bar.v2-detail-topbar {
    height: 64px !important;
    padding: 0 14px !important;
    border: none !important;
    background: rgba(246,247,251,.92) !important;
    backdrop-filter: blur(16px);
}
.v2-back-btn {
    width: 36px;
    height: 36px;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 11px !important;
    background: white !important;
    border: 1px solid var(--v2-line) !important;
    color: #59606c !important;
    font-size: 28px !important;
}
.v2-detail-title-wrap {
    min-width: 0;
    flex: 1;
    margin-left: 10px;
}
.v2-ui .page-title {
    max-width: 100% !important;
    font-size: 16px !important;
    font-weight: 740 !important;
    color: var(--v2-text) !important;
    text-align: left;
}
.v2-detail-subtitle {
    margin-top: 2px;
    color: #9da1aa;
    font-size: 9.5px;
}
.v2-detail-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.v2-detail-tool,
.v2-ui .top-add-btn.v2-add-record-btn {
    width: 36px !important;
    height: 36px !important;
    border: 1px solid var(--v2-line) !important;
    border-radius: 11px !important;
    background: white !important;
    color: #59606c !important;
    font-size: 13px !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.v2-ui .top-add-btn.v2-add-record-btn {
    color: white !important;
    background: var(--v2-blue) !important;
    border-color: var(--v2-blue) !important;
    font-size: 21px !important;
}

.v2-project-meta-bar {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 4px 14px 8px;
    border-bottom: 1px solid var(--v2-line);
}
.v2-ui .global-tags-group {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 0 !important;
    border: none !important;
    scrollbar-width: none;
}
.v2-ui .global-tags-group::-webkit-scrollbar { display: none; }
.v2-ui .global-tag-btn {
    flex: 0 0 auto;
    padding: 6px 9px !important;
    border-radius: 999px;
    background: #eceff4;
    color: #737884 !important;
    font-size: 10.5px !important;
    font-weight: 650 !important;
}
.v2-ui .global-tag-btn.active {
    background: var(--v2-blue-soft);
    color: var(--v2-blue) !important;
}
.v2-ui .global-tag-add,
.v2-ui .global-tag-clear {
    flex: 0 0 auto;
    border: none;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 10.5px;
    cursor: pointer;
}
.v2-ui .global-tag-add { background: var(--v2-blue); color: white; }
.v2-ui .global-tag-clear { background: #f1f2f5; color: #8b8f98; }

.v2-ui .format-toolbar.v2-format-panel {
    display: none !important;
    height: auto !important;
    min-height: 44px;
    padding: 8px 14px !important;
    justify-content: flex-start !important;
    gap: 5px;
    background: white !important;
    border-bottom: 1px solid var(--v2-line) !important;
}
.v2-ui .format-toolbar.v2-format-panel.v2-open {
    display: flex !important;
}
.v2-format-label {
    margin-right: 4px;
    color: #9a9ea7;
    font-size: 10px;
}
.v2-ui .fmt-btn {
    width: 32px !important;
    height: 30px !important;
    border-radius: 8px !important;
    background: #f2f4f7 !important;
}
.v2-ui .color-dots-inline {
    margin-left: 4px;
    padding-left: 8px !important;
    border-left: 1px solid var(--v2-line);
}

.v2-ui .content-area {
    width: 100% !important;
    max-width: none !important;
    padding: 12px 14px 130px !important;
    gap: 14px !important;
    background: var(--v2-bg);
}
.v2-ui details.date-group {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.v2-ui summary.date-header {
    position: static !important;
    min-height: 34px;
    padding: 6px 2px 8px !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    color: #666b76 !important;
    font-size: 11px !important;
    font-weight: 650 !important;
}
.v2-date-main {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}
.v2-date-main strong {
    color: #666b76;
    font-size: 11px;
}
.v2-date-count {
    color: #a2a6af;
    font-size: 9.5px;
}
.v2-date-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.v2-date-menu {
    width: 25px;
    height: 25px;
    border: none;
    border-radius: 8px;
    background: #eceff4;
    color: #777c87;
    cursor: pointer;
}
.v2-ui .date-progress-btn { display: none !important; } /* 每日百分比降级隐藏 */
.v2-ui #slider-modal { display: none !important; }      /* 旧数据保留，不再给主 UI 入口 */

.v2-ui .date-followup-label {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 7px !important;
    margin-left: 0 !important;
    font-size: 9px;
    font-weight: 700;
}
.v2-ui .date-followup-label.future { background:#edf3ff; color:var(--v2-blue); }
.v2-ui .date-followup-label.due { background:#fff6cc; color:#826800; }
.v2-ui .date-followup-label.overdue { background:#fff0df; color:#a65a00; }
.v2-ui .date-followup-label.critical { background:#ffe8e8; color:#c6373c; }

.v2-ui .row-item {
    margin-bottom: 9px;
    padding: 13px 14px !important;
    border: 1px solid var(--v2-line) !important;
    border-radius: 14px !important;
    background: var(--v2-card) !important;
    box-shadow: 0 4px 16px rgba(34,43,69,.03);
    overflow: visible !important;
}
.v2-ui .row-item:last-child {
    border-radius: 14px !important;
}
.v2-ui .row-content-grid {
    gap: 7px !important;
}
.v2-ui .moment-header {
    align-items: center !important;
    gap: 8px !important;
}
.v2-ui .col-time {
    min-width: 42px !important;
    color: #a1a5ae !important;
    font-size: 10.5px !important;
    font-weight: 650 !important;
}
.v2-ui .col-title .editable-cell {
    color: #30343b !important;
    font-size: 14px !important;
    font-weight: 720 !important;
}
.v2-ui .col-content .editable-cell {
    color: #555b65 !important;
    line-height: 1.62 !important;
}
.v2-ui .followup-date-badge {
    display: inline-flex !important;
    width: fit-content;
    border-radius: 999px !important;
    background: var(--v2-blue-soft) !important;
    color: var(--v2-blue) !important;
    border: none !important;
    padding: 5px 8px !important;
    font-size: 10px !important;
}
.v2-ui .followup-actions {
    gap: 7px !important;
}
.v2-ui .followup-action-btn {
    border-radius: 9px !important;
    min-height: 34px;
}
.v2-ui .followup-decision-box {
    border-radius: 12px !important;
}
.v2-ui .followup-source-note,
.v2-ui .followup-result-note,
.v2-ui .followup-active-note {
    font-size: 10.5px !important;
    color: #8d919b !important;
}

.v2-ui .fab-add-row.v2-add-row-fab {
    width: auto !important;
    height: 44px !important;
    right: max(18px, calc((100vw - 900px) / 2 + 18px)) !important;
    bottom: 22px !important;
    padding: 0 17px !important;
    border-radius: 14px !important;
    background: var(--v2-blue) !important;
    color: white;
    font-size: 13px !important;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(36,107,253,.28) !important;
}

/* ---------- 项目操作 / 重命名 ---------- */
.v2-action-modal {
    position: fixed;
    inset: 0;
    z-index: 340;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 14px;
    background: rgba(20,22,28,.38);
    backdrop-filter: blur(6px);
}
.v2-action-modal.show { display: flex; }
.v2-action-sheet {
    width: min(440px, 100%);
    padding: 8px;
    border-radius: 20px;
    background: #f3f4f7;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.v2-action-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 11px 11px 10px;
}
.v2-action-head > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.v2-action-head strong {
    max-width: 320px;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.v2-action-head small {
    margin-top: 3px;
    color: #999da6;
    font-size: 10px;
}
.v2-action-head > button {
    width: 29px;
    height: 29px;
    border: none;
    border-radius: 50%;
    background: #e5e7ec;
    color: #6e737d;
}
.v2-action-sheet > button:not(.v2-action-head button) {
    width: 100%;
    min-height: 44px;
    margin-top: 6px;
    border: none;
    border-radius: 12px;
    background: white;
    color: #333841;
    font-size: 14px;
    font-weight: 620;
}
.v2-action-sheet > button.danger { color: var(--v2-red); }
.v2-action-sheet > button.cancel {
    margin-top: 9px;
    background: #e8eaf0;
    color: #646a75;
}

.v2-dialog {
    width: min(390px, 100%);
    margin: auto;
    padding: 18px;
    border-radius: 18px;
    background: white;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.v2-dialog-title {
    font-size: 17px;
    font-weight: 740;
}
.v2-dialog input {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    margin-top: 13px;
    padding: 0 12px;
    border: 1px solid var(--v2-line);
    border-radius: 11px;
    outline: none;
    font-size: 15px;
}
.v2-dialog input:focus { border-color: var(--v2-blue); }
.v2-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}
.v2-dialog-actions button {
    min-height: 40px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 650;
}
.v2-dialog-actions .secondary { background: #f0f2f6; color: #5f6570; }
.v2-dialog-actions .primary { background: var(--v2-blue); color: white; }

/* ---------- 左侧 / 设置 / 弹窗统一 ---------- */
.v2-ui .sidebar {
    background: #f5f6f9 !important;
}
.v2-ui .sidebar-header {
    min-height: 62px;
    display: flex;
    align-items: center;
    padding: 0 16px !important;
    background: transparent !important;
    border-bottom: 1px solid var(--v2-line) !important;
    font-size: 16px !important;
}
.v2-ui .archive-item {
    border: 1px solid var(--v2-line);
    box-shadow: none !important;
}
.v2-ui .settings-entry-btn,
.v2-ui .settings-card,
.v2-ui .followup-center-card,
.v2-ui .cloud-card,
.v2-ui .trash-card {
    border: 1px solid rgba(255,255,255,.75);
}
.v2-ui .settings-card,
.v2-ui .followup-center-card,
.v2-ui .cloud-card,
.v2-ui .trash-card {
    box-shadow: 0 24px 70px rgba(19,25,39,.22) !important;
}

/* 已完成的旧“每日进度”数据继续存在于 JSON，但 V2 不再主界面展示 */
.v2-ui .slider-card { display: none !important; }

/* 编辑模式仍保留 */
.v2-ui .app-item.v2-project-card .edit-overlay {
    border-radius: var(--v2-radius);
}

/* ---------- 响应式 ---------- */
@media (max-width: 680px) {
    .v2-home-shell {
        width: calc(100% - 20px);
        padding-top: 12px;
    }
    .v2-brand strong { font-size: 21px; }
    .v2-search-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px;
    }
    .v2-tool-btn,
    .v2-ui .sort-btn {
        min-width: 50px;
        padding: 0 9px !important;
    }
    .v2-overview { gap: 7px; }
    .v2-stat-card {
        min-height: 68px;
        padding: 10px;
    }
    .v2-stat-card span { font-size: 21px; }
    .v2-project-grid {
        grid-template-columns: 1fr;
    }
    .v2-ui .app-item.v2-project-card {
        min-height: 122px;
        padding: 13px !important;
    }
    .v2-ui .top-bar.v2-detail-topbar {
        padding: 0 9px !important;
    }
    .v2-detail-title-wrap { margin-left: 7px; }
    .v2-detail-subtitle { display: none; }
    .v2-detail-actions { gap: 4px; }
    .v2-detail-tool,
    .v2-ui .top-add-btn.v2-add-record-btn,
    .v2-back-btn {
        width: 34px !important;
        height: 34px !important;
    }
    .v2-project-meta-bar {
        padding-left: 10px;
        padding-right: 10px;
    }
    .v2-ui .content-area {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .v2-ui .row-item {
        padding: 12px !important;
    }
}

@media (max-width: 390px) {
    .v2-ui .sort-btn {
        min-width: 44px;
        font-size: 10px !important;
    }
    .v2-tool-btn {
        min-width: 44px;
        font-size: 10px;
    }
    .v2-stat-card small { font-size: 9.5px; }
    .v2-detail-tool:first-child { display: none; } /* 极窄屏格式按钮先隐藏，可从宽一点屏使用 */
}


/* V2.0.1：筛选状态与返回全部 */
.v2-tool-btn.active {
    border-color: rgba(36,107,253,.28) !important;
    background: var(--v2-blue-soft) !important;
    color: var(--v2-blue) !important;
}
.v2-empty-reset {
    margin-top: 14px;
    min-height: 38px;
    padding: 0 16px;
    border: none;
    border-radius: 10px;
    background: var(--v2-blue);
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}


/* ============================================================
   V2.0.2：首页更紧凑；卡片显示“标题 + 内容”；跟进直接筛选
   ============================================================ */

/* 电脑端不要铺得太宽 */
.v2-home-shell {
    width: min(900px, calc(100% - 28px)) !important;
}
.v2-ui .fab-home.v2-fab {
    right: max(22px, calc((100vw - 900px) / 2 + 22px)) !important;
}

/* 两个摘要块 */
.v2-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* 项目卡片自动保持较窄宽度：宽屏最多三列 */
.v2-project-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 10px !important;
}
.v2-ui .app-item.v2-project-card {
    min-height: 154px !important;
}

/* 最近记录：标题 + 正文同时展示 */
.v2-card-note {
    min-height: 58px;
    margin-top: 8px;
}
.v2-card-note-title {
    color: #414650;
    font-size: 12.5px;
    line-height: 1.4;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.v2-card-note-content {
    margin-top: 4px;
    color: #757a85;
    font-size: 11.5px;
    line-height: 1.48;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.v2-card-preview {
    display: none !important;
}

@media (min-width: 980px) {
    .v2-project-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 680px) {
    .v2-home-shell {
        width: calc(100% - 20px) !important;
    }
    .v2-project-grid {
        grid-template-columns: 1fr !important;
    }
    .v2-overview {
        gap: 7px !important;
    }
}


/* ============================================================
   V2.0.3：三摘要 + 紧凑项目卡片
   ============================================================ */

/* 顶部固定三块：待跟进 / 今天跟进 / 已逾期 */
.v2-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
}
.v2-stat-card {
    min-width: 0 !important;
}
.v2-stat-card.today span {
    color: var(--v2-orange) !important;
}

/* 项目卡片在电脑端不再被拉满 */
.v2-project-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 260px) !important;
    justify-content: start !important;
    gap: 10px !important;
}
.v2-ui .app-item.v2-project-card {
    width: 260px !important;
    max-width: 260px !important;
    box-sizing: border-box !important;
}

@media (max-width: 900px) and (min-width: 681px) {
    .v2-project-grid {
        grid-template-columns: repeat(auto-fill, 240px) !important;
    }
    .v2-ui .app-item.v2-project-card {
        width: 240px !important;
        max-width: 240px !important;
    }
}

/* 手机：顶部依旧只有三块摘要并排；项目卡片仍一列 */
@media (max-width: 680px) {
    .v2-overview {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }
    .v2-stat-card {
        min-height: 64px !important;
        padding: 9px 7px !important;
    }
    .v2-stat-card span {
        font-size: 20px !important;
    }
    .v2-stat-card small {
        font-size: 9.5px !important;
        white-space: nowrap;
    }
    .v2-project-grid {
        grid-template-columns: 1fr !important;
    }
    .v2-ui .app-item.v2-project-card {
        width: 100% !important;
        max-width: none !important;
    }
}


/* ============================================================
   V2.0.4：手机项目卡片改为紧凑双列
   ============================================================ */

/* 电脑仍保持紧凑小卡片 */
.v2-project-grid {
    grid-template-columns: repeat(auto-fill, 250px) !important;
    gap: 9px !important;
}
.v2-ui .app-item.v2-project-card {
    width: 250px !important;
    max-width: 250px !important;
    min-height: 142px !important;
    padding: 12px !important;
}

/* 正文最多两行 */
.v2-card-note-content {
    -webkit-line-clamp: 2 !important;
    line-clamp: 2;
}

/* 手机：项目卡片双列，不再一张占整行 */
@media (max-width: 680px) {
    .v2-home-shell {
        width: calc(100% - 14px) !important;
    }

    .v2-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
        align-items: stretch;
    }

    .v2-ui .app-item.v2-project-card {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        min-height: 126px !important;
        padding: 10px !important;
        border-radius: 13px !important;
    }

    .v2-card-head {
        gap: 4px !important;
    }

    .v2-card-title {
        font-size: 13px !important;
        line-height: 1.25 !important;
    }

    .v2-card-more {
        width: 24px !important;
        height: 24px !important;
        flex: 0 0 24px !important;
        margin: -3px -3px 0 0 !important;
        font-size: 14px !important;
    }

    .v2-card-note {
        min-height: 49px !important;
        margin-top: 6px !important;
    }

    .v2-card-note-title {
        font-size: 11px !important;
        line-height: 1.3 !important;
    }

    .v2-card-note-content {
        margin-top: 3px !important;
        font-size: 10.5px !important;
        line-height: 1.35 !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2;
    }

    /* 手机上把次要信息收掉，让卡片专注“记住内容” */
    .v2-card-tags {
        display: none !important;
    }

    .v2-card-footer {
        min-height: 20px !important;
        margin-top: 6px !important;
    }

    .v2-card-meta {
        display: none !important;
    }

    .v2-card-followup {
        margin-left: auto;
        padding: 3px 6px !important;
        font-size: 8.5px !important;
    }

    /* 三个顶部摘要继续并排，但也稍微压矮 */
    .v2-overview {
        gap: 5px !important;
    }

    .v2-stat-card {
        min-height: 58px !important;
        padding: 8px 7px !important;
        border-radius: 13px !important;
    }

    .v2-stat-card span {
        font-size: 18px !important;
    }

    .v2-stat-card small {
        margin-top: 4px !important;
        font-size: 9px !important;
    }

    #appGridContainer {
        margin-top: 12px !important;
    }

    .v2-section-head {
        margin-bottom: 7px !important;
    }
}

/* 很窄的手机仍保持双列，但进一步收紧 */
@media (max-width: 360px) {
    .v2-project-grid {
        gap: 5px !important;
    }

    .v2-ui .app-item.v2-project-card {
        padding: 8px !important;
        min-height: 120px !important;
    }

    .v2-card-title {
        font-size: 12px !important;
    }

    .v2-card-note-title {
        font-size: 10.5px !important;
    }

    .v2-card-note-content {
        font-size: 10px !important;
    }
}


/* ============================================================
   V2.1 详情页：普通记录 / 原始待办 / 跟进记录 三种层级
   ============================================================ */

/* 日期只做轻分组，不再重复提醒跟进 */
.v2-ui .v21-date-header {
    min-height: 32px !important;
    padding: 5px 2px 7px !important;
}
.v21-date-main strong {
    color: #787d87 !important;
    font-size: 10.5px !important;
    font-weight: 680 !important;
}
.v21-date-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 5px;
}

/* 基础卡片 */
.v2-ui .row-item.v21-row {
    position: relative;
    margin: 0 !important;
    padding: 12px 13px !important;
    border: 1px solid var(--v2-line) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 3px 14px rgba(34,43,69,.025) !important;
}
.v21-content-grid {
    gap: 6px !important;
}
.v21-moment-header {
    min-height: 20px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 8px !important;
}
.v21-context {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.v2-ui .v21-row .col-time {
    min-width: auto !important;
    flex: 0 0 auto;
    color: #a0a4ad !important;
    font-size: 9.5px !important;
    font-weight: 650 !important;
}
.v21-title {
    margin-top: 1px;
}
.v2-ui .v21-title .editable-cell {
    color: #2f343c !important;
    font-size: 13.5px !important;
    line-height: 1.42 !important;
    font-weight: 730 !important;
}
.v2-ui .v21-content .editable-cell {
    color: #606671 !important;
    font-size: var(--content-font-size) !important;
    line-height: 1.58 !important;
}
.v21-status-slot:empty {
    display: none;
}

/* 普通记录：最安静 */
.v2-ui .v21-normal-row {
    background: #fff !important;
}

/* 原始待跟进记录：用左侧蓝线标明它是“主线” */
.v2-ui .v21-source-row {
    border-left: 3px solid #7ba7ff !important;
    padding-left: 12px !important;
}
.v21-source-badge,
.v21-history-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 720;
    white-space: nowrap;
}
.v21-source-badge {
    background: #edf3ff;
    color: #246bfd;
}
.v21-history-badge {
    background: #f1f2f5;
    color: #7d828d;
}

/* 跟进子记录：缩进 + 时间线蓝色轨道 */
.v2-ui .v21-child-row {
    margin-left: 18px !important;
    border-left: 2px solid #c8d9ff !important;
    background: #fbfdff !important;
}
.v2-ui .v21-child-row::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 19px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #6d9cff;
    box-shadow: 0 0 0 1px #c8d9ff;
}
.v21-step-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #246bfd;
    font-size: 9px;
    font-weight: 760;
}
.v21-source-context {
    min-width: 0;
    color: #9297a1;
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 原记录底部只留下一个“下一步” */
.v21-follow-area {
    margin-top: 5px;
    border-radius: 11px;
}
.v21-follow-area.next,
.v21-follow-area.active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 9px 10px;
    background: #f4f8ff;
    border: 1px solid #e1ebff;
}
.v21-follow-area.active {
    background: #f7f8fb;
    border-color: #e6e8ee;
}
.v21-next-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.v21-next-copy small {
    color: #9499a3;
    font-size: 8.5px;
}
.v21-next-copy strong {
    margin-top: 2px;
    color: #4d535e;
    font-size: 11px;
}
.v21-next-copy span {
    margin-top: 2px;
    color: #8b909a;
    font-size: 9px;
}
.v21-next-date {
    width: fit-content;
    margin-top: 2px;
    padding: 0;
    border: none;
    background: transparent;
    color: #246bfd;
    font-size: 11.5px;
    line-height: 1.35;
    font-weight: 760;
    text-align: left;
    cursor: pointer;
}
.v21-next-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 5px;
}
.v21-primary-action {
    min-height: 32px;
    padding: 0 10px;
    border: none;
    border-radius: 9px;
    background: #246bfd;
    color: white;
    font-size: 10.5px;
    font-weight: 720;
    cursor: pointer;
    white-space: nowrap;
}
.v21-text-action {
    min-height: 32px;
    padding: 0 7px;
    border: none;
    background: transparent;
    color: #8c919b;
    font-size: 10px;
    cursor: pointer;
}

/* 跟进完成：静默收尾 */
.v21-follow-area.complete {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 7px;
    color: #35a667;
}
.v21-complete-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    background: #e9f8ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
}
.v21-complete-copy {
    display: flex;
    flex-direction: column;
}
.v21-complete-copy strong {
    font-size: 10.5px;
    font-weight: 720;
}
.v21-complete-copy small {
    margin-top: 1px;
    color: #91a69a;
    font-size: 8.5px;
}

/* 跟进子记录的“本次结果” */
.v21-result-area {
    margin-top: 6px;
}
.v21-result-area.pending {
    padding: 9px;
    border-radius: 10px;
    background: #f6f7fa;
}
.v21-result-title {
    margin-bottom: 7px;
    color: #747985;
    font-size: 9.5px;
    font-weight: 680;
}
.v21-result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.v21-result-actions button {
    min-height: 32px;
    border: none;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 720;
    cursor: pointer;
}
.v21-result-resolve {
    background: #eaf8ef;
    color: #278a50;
}
.v21-result-continue {
    background: #eaf2ff;
    color: #246bfd;
}
.v21-result-area.resolved,
.v21-result-area.continued {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 6px;
    font-size: 10px;
}
.v21-result-area.resolved {
    color: #2c9658;
}
.v21-result-area.continued {
    color: #246bfd;
}
.v21-result-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: currentColor;
    color: white;
    font-size: 9px;
    font-weight: 800;
}
.v21-result-area strong {
    font-size: 10.5px;
}

/* V2.1 不再展示旧的重复说明块 */
.v2-ui .followup-source-note,
.v2-ui .followup-active-note,
.v2-ui .followup-date-badge,
.v2-ui .followup-result-note,
.v2-ui .followup-decision-box {
    display: none !important;
}

/* 手机再紧凑一点 */
@media (max-width: 680px) {
    .v2-ui .row-item.v21-row {
        padding: 10px 11px !important;
        border-radius: 12px !important;
    }
    .v2-ui .v21-child-row {
        margin-left: 10px !important;
    }
    .v2-ui .v21-child-row::before {
        left: -6px;
        width: 9px;
        height: 9px;
    }
    .v21-source-context {
        max-width: 180px;
    }
    .v21-follow-area.next,
    .v21-follow-area.active {
        padding: 8px;
    }
    .v21-primary-action {
        min-height: 30px;
        padding: 0 9px;
        font-size: 10px;
    }
    .v21-text-action {
        min-height: 30px;
    }
}

@media (max-width: 390px) {
    .v21-source-context {
        max-width: 125px;
    }
    .v21-next-actions {
        gap: 2px;
    }
    .v21-primary-action {
        padding: 0 7px;
    }
}
