/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* P3 色域 - 米白色系（Claude/Notion inspired） */
    --bg-primary: color(display-p3 0.985 0.980 0.970);
    --bg-secondary: color(display-p3 0.970 0.965 0.955);
    --bg-card: color(display-p3 1 0.998 0.995);
    --bg-card-hover: color(display-p3 0.998 0.995 0.990);
    
    /* P3 色域 - 文字颜色 */
    --text-primary: color(display-p3 0.12 0.11 0.10);
    --text-secondary: color(display-p3 0.42 0.40 0.38);
    --text-tertiary: color(display-p3 0.62 0.60 0.58);
    
    /* P3 色域 - 边框（更柔和） */
    --border-light: color(display-p3 0.88 0.86 0.84 / 0.35);
    --border-medium: color(display-p3 0.82 0.80 0.78 / 0.50);
    
    /* P3 色域 - 强调色（琥珀/棕色系 - Claude风格） */
    --accent-primary: color(display-p3 0.72 0.52 0.38);
    --accent-hover: color(display-p3 0.65 0.45 0.32);
    --accent-light: color(display-p3 0.96 0.94 0.92);
    --accent-bg: color(display-p3 0.72 0.52 0.38 / 0.08);
    
    /* P3 色域 - 优先级颜色（极简，只用边框提示） */
    --priority-high: color(display-p3 0.88 0.42 0.38 / 0.3);
    --priority-medium: color(display-p3 0.82 0.62 0.38 / 0.3);
    --priority-low: color(display-p3 0.62 0.60 0.58 / 0.3);
    
    /* P3 色域 - 统一的标签颜色（淡雅米灰色） */
    --tag-bg: color(display-p3 0.92 0.90 0.88 / 0.6);
    --tag-text: color(display-p3 0.52 0.50 0.48);
    
    /* 阴影 - 极简设计 */
    --shadow-card: 
        0 0 0 1px var(--border-light),
        0 1px 2px color(display-p3 0.12 0.11 0.10 / 0.04);
    --shadow-card-hover:
        0 0 0 1px var(--border-medium),
        0 2px 4px color(display-p3 0.12 0.11 0.10 / 0.06),
        0 4px 8px color(display-p3 0.12 0.11 0.10 / 0.04);
    --shadow-modal:
        0 0 0 1px color(display-p3 0.82 0.80 0.78 / 0.4),
        0 8px 24px color(display-p3 0.12 0.11 0.10 / 0.08),
        0 16px 48px color(display-p3 0.12 0.11 0.10 / 0.06);
    
    /* 字体 */
    --font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==================== 导航栏 ==================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* 模态框打开时，导航栏也左移 */
body:has(.modal.active) .navbar {
    transform: translateX(-120px);
}

@media (max-width: 768px) {
    body:has(.modal.active) .navbar {
        transform: translateX(-60px);
    }
}

.nav-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    width: 24px;
    height: 24px;
    opacity: 0.85;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background-color: transparent;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-btn:hover {
    background-color: var(--bg-card);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.nav-btn svg {
    width: 15px;
    height: 15px;
}

/* 用户头像（右上角） */
.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 10px;
    background-color: transparent;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-menu:hover {
    background-color: var(--bg-card);
    border-color: var(--border-medium);
}

.user-menu-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-bg), var(--bg-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    overflow: hidden;
}

.user-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-avatar svg {
    width: 14px;
    height: 14px;
}

/* ==================== 主容器 ==================== */
.main-container {
    max-width: min(880px, calc(100vw - 64px));
    margin: 0 auto;
    padding: 0 32px 80px;
    min-height: calc(100vh - 100px);
    width: 100%;
}

/* 平板适配 */
@media (max-width: 1024px) {
    .main-container {
        max-width: calc(100vw - 48px);
        padding: 0 24px 80px;
    }
}

/* 移动端增加底部空间 */
@media (max-width: 768px) {
    .main-container {
        max-width: calc(100vw - 40px);
        padding: 0 20px 120px;
    }
}

/* ==================== 侧边栏（隐藏，改为顶部筛选） ==================== */
.sidebar {
    display: none;
}

.sidebar-content {
    display: none;
}

/* 卡片基础样式 */
.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
}

.card:hover {
    /* 移除阴影，保持极简 */
}

/* 用户卡片 */
.user-card {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, 
        color(display-p3 0.88 0.93 0.97), 
        color(display-p3 0.92 0.95 0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.user-avatar svg {
    width: 20px;
    height: 20px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 快速添加按钮（顶部工具栏版本） */
.add-todo-btn {
    padding: 7px 16px;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.add-todo-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.add-todo-btn svg {
    width: 15px;
    height: 15px;
}

/* 视图选择器 */
.view-selector {
    padding: 8px;
    display: flex;
    gap: 6px;
}

.view-btn {
    flex: 1;
    padding: 8px 12px;
    background-color: transparent;
    border: none;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.view-btn.active {
    background-color: var(--accent-light);
    color: var(--accent-primary);
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

/* 筛选器 */
.filters {
    padding: 12px;
}

.filter-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    padding: 0 8px;
}

.filter-item {
    width: 100%;
    padding: 10px 12px;
    background-color: transparent;
    border: none;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-item:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.filter-item.active {
    background-color: var(--accent-light);
    color: var(--accent-primary);
}

.filter-item svg {
    width: 16px;
    height: 16px;
}

.filter-item span:first-of-type {
    flex: 1;
}

.filter-count {
    font-size: 12px;
    color: var(--text-tertiary);
    background-color: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 6px;
    min-width: 24px;
    text-align: center;
}

/* 标签 */
.tags {
    padding: 12px;
}

.tag-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tag-item {
    width: 100%;
    padding: 8px 12px;
    background-color: transparent;
    border: none;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.tag-item:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* 设置按钮 */
.settings-btn {
    width: 100%;
    padding: 10px 12px;
    background-color: transparent;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
}

.settings-btn:hover {
    background-color: var(--bg-primary);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.settings-btn svg {
    width: 16px;
    height: 16px;
}

/* ==================== 主内容区 ==================== */
.main-content {
    width: 100%;
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* 模态框打开时，主内容左移 */
body:has(.modal.active) .main-content {
    transform: translateX(-120px);
}

@media (max-width: 768px) {
    body:has(.modal.active) .main-content {
        transform: translateX(-60px);
    }
}

.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-top: 24px;
}

.view-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.view-actions {
    display: flex;
    gap: 8px;
}

/* 移动端隐藏顶部操作按钮 */
@media (max-width: 768px) {
    .view-actions {
        display: none;
    }
}

.icon-btn {
    width: 32px;
    height: 32px;
    background-color: transparent;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.icon-btn:hover {
    background-color: var(--bg-card);
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

.icon-btn svg {
    width: 16px;
    height: 16px;
}

/* ==================== TODO 列表 ==================== */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.todo-card {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background-color: var(--bg-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 新添加的卡片高亮动画 */
.todo-card.new-highlight {
    animation: slideInGently 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInGently {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.todo-card:hover {
    background-color: var(--bg-card-hover);
    /* 移除阴影，保持极简 */
}

.todo-card.completed {
    /* opacity 由动画控制，避免重复设置 */
    background-color: var(--bg-secondary);
    animation: completeTodo 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* 取消完成时的动画类 - 故意慢一点，让用户感到"不爽" */
.todo-card.uncompleting {
    animation: uncompleteTodo 1.2s ease-out;
    /* 禁用 transition，避免移除类时再次触发过渡 */
    transition: none !important;
    /* 明确设置最终状态，确保动画结束后和移除类后状态一致 */
    opacity: 1;
    background-color: var(--bg-card);
}

/* 取消完成时，文字慢慢恢复正常 */
.todo-card.uncompleting .todo-title {
    /* 不设置 color，完全由动画控制 */
    text-decoration: none;
    animation: titleRestoreFromGray 1.2s ease-out both;
}

@keyframes titleRestoreFromGray {
    0% {
        color: var(--text-tertiary);
        text-decoration: line-through;
    }
    40% {
        text-decoration: none;
    }
    50% {
        color: var(--text-secondary);
    }
    100% {
        color: var(--text-primary);
    }
}

.todo-card.completed:hover {
    /* opacity 继承动画的最终状态 0.5，hover 时稍微提亮 */
    filter: brightness(1.1);
    background-color: var(--bg-secondary);
}

/* 已完成的卡片，优先级标识消失 */
.todo-card.completed.priority-high .todo-checkbox label {
    border-color: var(--border-medium);
    border-width: 2px;
}

/* 完成时，文字颜色由动画控制，与卡片透明度同步 */
.todo-card.completed .todo-title {
    text-decoration: line-through;
    /* 动画控制颜色，both 确保第一帧和最终状态都生效 */
    animation: titleFadeToGray 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes titleFadeToGray {
    0% {
        color: var(--text-primary);
    }
    20% {
        color: var(--text-secondary);
    }
    40% {
        color: var(--text-tertiary);
    }
    100% {
        color: var(--text-tertiary);
    }
}

.todo-card.completed .todo-time {
    color: var(--text-tertiary);
}

.todo-card.completed .todo-tag {
    /* 跟随父元素的 opacity，避免叠加 */
}

/* 完成TODO时的成就感动画 */
@keyframes completeTodo {
    0% {
        transform: scale(1);
        opacity: 1;
        background-color: var(--bg-card);
    }
    20% {
        transform: scale(1.02);
        opacity: 1;
    }
    40% {
        transform: scale(0.98);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
        background-color: var(--bg-secondary);
    }
}

/* 取消完成时的恢复动画 */
@keyframes uncompleteTodo {
    0% {
        opacity: 0.5;
        background-color: var(--bg-secondary);
    }
    100% {
        opacity: 1;
        background-color: var(--bg-card);
    }
}

/* 自定义复选框 */
.todo-checkbox {
    position: relative;
}

.todo-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.todo-checkbox label {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-medium);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* 优先级：只强调高优先级，其他保持统一 */
.todo-card.priority-high .todo-checkbox label {
    border-color: color(display-p3 0.88 0.42 0.38 / 0.6);
    border-width: 2.5px;
}

.todo-checkbox label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0) rotate(-45deg);
    width: 10px;
    height: 10px;
    background-color: var(--accent-primary);
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.todo-checkbox input[type="checkbox"]:checked + label {
    background-color: var(--accent-bg);
    border-color: var(--accent-primary);
    animation: checkboxPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.todo-checkbox input[type="checkbox"]:checked + label::after {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

/* 复选框勾选时的弹性动画 */
@keyframes checkboxPop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

/* 取消勾选的复选框动画 - 慢速，没有弹性 */
.todo-card.uncompleting .todo-checkbox label {
    animation: checkboxUnpop 0.8s ease-out;
}

/* 取消勾选时，高优先级边框恢复 - 慢速 */
.todo-card.uncompleting.priority-high .todo-checkbox label {
    animation: checkboxUnpopPriority 0.8s ease-out;
}

@keyframes checkboxUnpopPriority {
    0% {
        background-color: var(--accent-bg);
        border-color: var(--accent-primary);
        border-width: 2px;
    }
    100% {
        background-color: transparent;
        border-color: color(display-p3 0.88 0.42 0.38 / 0.6);
        border-width: 2.5px;
    }
}

@keyframes checkboxUnpop {
    0% {
        background-color: var(--accent-bg);
        border-color: var(--accent-primary);
    }
    100% {
        background-color: transparent;
        border-color: var(--border-medium);
    }
}

/* 取消勾选时，内部小方块缓慢消失 - 没有弹性 */
.todo-card.uncompleting .todo-checkbox label::after {
    animation: checkMarkFadeOut 0.7s ease-out;
}

@keyframes checkMarkFadeOut {
    0% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0) rotate(45deg);
        opacity: 0;
    }
}

.todo-content {
    flex: 1;
    min-width: 0;
}

.todo-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.todo-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
    /* 取消过渡，完全由动画控制 */
}

/* 网站Favicon */
.site-favicon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.site-favicon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: contain;
    background: var(--bg-primary);
    cursor: help;
}

.site-favicon-loading {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: linear-gradient(
        90deg,
        color(display-p3 0.94 0.92 0.88) 0%,
        color(display-p3 0.96 0.94 0.90) 50%,
        color(display-p3 0.94 0.92 0.88) 100%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.site-favicon-wrapper:hover .site-tooltip,
.site-tooltip:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip */
.site-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: color(display-p3 0.15 0.12 0.10);
    color: color(display-p3 0.98 0.97 0.95);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    visibility: hidden;
    pointer-events: auto;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    transition-delay: 0s, 0s, 0.1s; /* 延迟transform变化，让用户能移动到tooltip */
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    cursor: pointer;
}

.site-tooltip:hover {
    background: color(display-p3 0.18 0.15 0.13);
}

.site-tooltip:hover::before {
    border-top-color: color(display-p3 0.18 0.15 0.13);
}

.site-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: color(display-p3 0.15 0.12 0.10);
    transition: border-top-color 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.todo-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.todo-time {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 统一的标签样式 */
.todo-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: var(--tag-bg);
    color: var(--tag-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Recurring标签 */
.todo-recurring {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: var(--accent-primary);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: default;
}

/* Tooltip样式 */
.has-tooltip {
    cursor: help;
}

.has-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 10px 14px;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 13px;
    font-weight: 400;
    border-radius: 8px;
    white-space: pre-line;
    line-height: 1.6;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    min-width: 140px;
    max-width: 280px;
    text-align: center;
}

.has-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 5px solid transparent;
    border-top-color: var(--text-primary);
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}

.has-tooltip:hover::before,
.has-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.has-tooltip:hover::after {
    transform: translateX(-50%) translateY(1px);
}

/* 优先级指示器（隐藏，改用左侧边框） */
.todo-priority {
    display: none;
}

.todo-menu-wrapper {
    position: relative;
    flex-shrink: 0;
}

.todo-menu-btn {
    width: 32px;
    height: 32px;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
}

.todo-card:hover .todo-menu-btn,
.todo-menu-btn.keep-visible {
    opacity: 1;
}

.todo-menu-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.todo-menu-btn svg {
    width: 14px;
    height: 14px;
}

/* 下拉菜单 */
.todo-menu-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transform-origin: top right;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 100;
}

.todo-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-align: left;
}

.menu-item:hover {
    background-color: var(--bg-secondary);
}

.menu-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.menu-item span {
    flex: 1;
}

.menu-item.danger {
    color: color(display-p3 0.85 0.26 0.21);
}

.menu-item.danger:hover {
    background-color: color(display-p3 0.98 0.94 0.94);
}

.menu-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 4px 0;
}

/* 删除确认 Popover */
.delete-confirm-popover {
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    width: 280px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.delete-confirm-popover.active {
    opacity: 1;
    transform: translateY(0);
}

.popover-arrow {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transform: translateX(-50%) rotate(45deg);
}

.popover-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.popover-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.popover-actions {
    display: flex;
    gap: 8px;
}

.popover-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cancel-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.cancel-btn:hover {
    background: color(display-p3 0.90 0.88 0.85);
}

.confirm-btn {
    background: color(display-p3 0.85 0.26 0.21);
    color: white;
}

.confirm-btn:hover {
    background: color(display-p3 0.78 0.22 0.18);
    box-shadow: 0 2px 8px rgba(217, 67, 54, 0.25);
}

/* ==================== 空状态 ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ==================== 日历/看板占位 ==================== */
.calendar-container,
.board-placeholder {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-placeholder,
.board-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-tertiary);
}

.calendar-placeholder svg,
.board-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

/* ==================== 模态框 - 右侧抽屉 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s 0.35s; /* 延迟到动画结束后才隐藏 */
}

.modal.active {
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0s; /* 打开时立即显示 */
}

/* 主题色遮罩 - 米白色半透明 */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: color(display-p3 0.985 0.980 0.970 / 0.7);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.modal.active .modal-overlay {
    opacity: 1;
}

/* ========== 绑定模态框专属样式 ========== */

/* 步骤指示器 */
.bind-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 20px;
}

.bind-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.bind-step-item.active {
    opacity: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.bind-step-item.active .step-circle {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

.bind-step-item.completed .step-circle {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    opacity: 0.8;
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-align: center;
    white-space: nowrap;
}

.bind-step-item.active .step-label {
    color: var(--text-primary);
}

.bind-step-divider {
    height: 2px;
    flex: 1;
    background: var(--border-light);
    margin: 0 8px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.bind-step-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    transition: width 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.bind-step-item.completed ~ .bind-step-divider::before {
    width: 100%;
}

/* 绑定步骤内容 */
.bind-step-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideIn 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.bind-step-content.active {
    display: block;
}

@keyframes fadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 指导说明 */
.bind-instruction {
    text-align: center;
    margin-bottom: 32px;
}

.instruction-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, 
        color(display-p3 0.953 0.573 0.275 / 0.1),
        color(display-p3 0.953 0.573 0.275 / 0.05)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    transition: transform 0.3s ease;
}

.instruction-icon i {
    width: 32px;
    height: 32px;
}

.instruction-icon.success {
    background: linear-gradient(135deg, 
        color(display-p3 0.953 0.573 0.275 / 0.15),
        color(display-p3 0.953 0.573 0.275 / 0.08)
    );
    color: var(--accent-primary);
}

.bind-instruction:hover .instruction-icon {
    transform: scale(1.05);
}

.bind-instruction h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.bind-instruction p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* QR码容器 */
.qq-qrcode-container {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.qrcode-wrapper {
    position: relative;
    width: 240px;
    height: 240px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 1px 3px color(display-p3 0.12 0.11 0.10 / 0.04),
        0 8px 24px color(display-p3 0.12 0.11 0.10 / 0.08);
}

.qrcode-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qrcode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: color(display-p3 0.985 0.980 0.970 / 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.qrcode-wrapper.loaded .qrcode-overlay {
    opacity: 0;
    pointer-events: none;
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* OTP 显示框 */
.otp-display-box {
    background: linear-gradient(135deg,
        color(display-p3 0.953 0.573 0.275 / 0.05),
        color(display-p3 0.953 0.573 0.275 / 0.02)
    );
    border: 2px dashed var(--accent-primary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.otp-code {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--accent-primary);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.copy-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: color(display-p3 0.93 0.53 0.23);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color(display-p3 0.953 0.573 0.275 / 0.3);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn i {
    width: 16px;
    height: 16px;
}

/* OTP 倒计时 */
.otp-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.otp-timer i {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.otp-timer strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Email 输入组 */
.email-input-group {
    margin-bottom: 24px;
}

.email-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid color(display-p3 0.12 0.11 0.10 / 0.15);
    border-radius: 12px;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.email-input:hover {
    border-color: color(display-p3 0.12 0.11 0.10 / 0.25);
}

.email-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px color(display-p3 0.953 0.573 0.275 / 0.1);
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.input-hint i {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
    opacity: 0.7;
}

/* 成功动画 */
.bind-success-animation {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        color(display-p3 0.953 0.573 0.275 / 0.15),
        color(display-p3 0.953 0.573 0.275 / 0.08)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    animation: successPulse 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.success-icon i {
    width: 40px;
    height: 40px;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bind-success-animation h4 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.bind-success-animation p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

.bind-success-animation strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* 全宽按钮 */
.full-width {
    width: 100%;
}

/* 右侧抽屉面板 */
.modal-content {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-card);
    box-shadow: 
        -1px 0 0 0 var(--border-light),
        -4px 0 16px color(display-p3 0.12 0.11 0.10 / 0.04),
        -12px 0 48px color(display-p3 0.12 0.11 0.10 / 0.06);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    border-radius: 16px 0 0 16px;
    overflow: hidden; /* 确保子元素不会溢出圆角 */
}

.modal.active .modal-content {
    transform: translateX(0);
}

/* 1400px以下全屏 */
@media (max-width: 1400px) {
    .modal-content {
        max-width: 100%;
        border-radius: 0;
    }
}

/* 抽屉头部 - 固定在顶部 */
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    background-color: var(--bg-card);
    gap: 16px;
}

.modal-header-content {
    flex: 1;
}

.modal-header h3 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.modal-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    transition: opacity 0.2s ease;
}

.modal-close {
    width: 36px;
    height: 36px;
    background-color: var(--bg-secondary);
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transform: scale(1.05);
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

/* 抽屉内容区 - 可滚动 */
.modal-body {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* 模态框步骤切换 */
.modal-step {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 只有内容区有动画 */
.modal-step .modal-body {
    animation: fadeInBody 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInBody {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 按钮加载状态 ==================== */
.primary-btn.loading {
    pointer-events: none;
}

/* 隐藏原图标（包括SVG） */
.primary-btn.loading i,
.primary-btn.loading svg:not(.spinner) {
    display: none !important;
}

/* 在图标位置显示 spinner */
.primary-btn.loading::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 生成中时禁用输入区 */
.modal-body.generating {
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* ==================== Ciallo确认对话 ==================== */
.confirmed-todos-list {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ciallo-confirmation {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ciallo-message {
    background: linear-gradient(
        135deg,
        color(display-p3 0.99 0.985 0.975) 0%,
        var(--bg-primary) 100%
    );
    border: 1.5px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
}

.ciallo-message p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
}

.ciallo-message p + p {
    margin-top: 16px;
}

.ciallo-message strong {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Ciallo 互动问题 */
.ciallo-questions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
}

.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: var(--bg-secondary);
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-option:hover {
    background-color: var(--bg-primary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.quick-option.active {
    background: linear-gradient(
        135deg,
        color(display-p3 0.72 0.52 0.38 / 0.1),
        color(display-p3 0.72 0.52 0.38 / 0.05)
    );
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.quick-option svg {
    width: 16px;
    height: 16px;
}

/* Ciallo 修改输入 */
.ciallo-refine {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.refine-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.refine-header svg {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
}

.refine-input {
    width: 100%;
    padding: 12px 14px;
    background-color: var(--bg-primary);
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    resize: vertical;
    min-height: 60px;
}

.refine-input::placeholder {
    color: color(display-p3 0.70 0.68 0.66 / 0.5);
}

.refine-input:hover {
    border-color: var(--border-medium);
}

.refine-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background-color: var(--bg-card);
    box-shadow: 
        0 0 0 3px color(display-p3 0.72 0.52 0.38 / 0.1),
        0 1px 2px color(display-p3 0.12 0.11 0.10 / 0.05);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* 抽屉底部 - 固定在底部 */
.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 24px 32px 32px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    background-color: var(--bg-card);
}

@media (max-width: 640px) {
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .modal-footer .primary-btn,
    .modal-footer .secondary-btn {
        width: 100%;
    }
}

/* ==================== AI 智能输入区 ==================== */
.ai-input-group {
    margin-bottom: 24px;
}

.ai-input {
    width: 100%;
    padding: 20px;
    background: linear-gradient(
        135deg,
        var(--bg-primary) 0%,
        color(display-p3 0.99 0.985 0.975) 100%
    );
    border: 2px solid var(--border-light);
    border-radius: 16px;
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    resize: vertical;
    min-height: 200px;
    -webkit-appearance: none;
    appearance: none;
}

.ai-input::placeholder {
    color: color(display-p3 0.70 0.68 0.66 / 0.4);
    line-height: 1.7;
}

.ai-input:hover {
    border-color: var(--border-medium);
    background: var(--bg-card);
}

.ai-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-card);
    box-shadow: 
        0 0 0 4px color(display-p3 0.72 0.52 0.38 / 0.08),
        0 8px 24px color(display-p3 0.12 0.11 0.10 / 0.05);
}

.ai-input-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(
        135deg,
        color(display-p3 0.72 0.52 0.38 / 0.05),
        color(display-p3 0.72 0.52 0.38 / 0.02)
    );
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ai-input-hint i {
    color: var(--accent-primary);
    flex-shrink: 0;
}

.ai-input-hint svg {
    width: 16px;
    height: 16px;
}

/* 快速标签 */
.quick-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 0;
    border-top: 1px solid var(--border-light);
}

.quick-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background-color: var(--bg-secondary);
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-tag:hover {
    background-color: var(--bg-primary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.quick-tag:active,
.quick-tag.active {
    background: linear-gradient(
        135deg,
        color(display-p3 0.72 0.52 0.38 / 0.1),
        color(display-p3 0.72 0.52 0.38 / 0.05)
    );
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.quick-tag svg {
    width: 14px;
    height: 14px;
}

/* ==================== 表单 - 精致设计 ==================== */
.form-group {
    margin-bottom: 28px;
}

.form-group:last-of-type {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--bg-primary);
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: color(display-p3 0.70 0.68 0.66 / 0.5);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: var(--border-medium);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background-color: var(--bg-card);
    box-shadow: 
        0 0 0 3px color(display-p3 0.72 0.52 0.38 / 0.1),
        0 1px 2px color(display-p3 0.12 0.11 0.10 / 0.05);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* 选择框自定义箭头 */
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23B3ACA3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ==================== 按钮 - 精致设计 ==================== */
.primary-btn {
    padding: 14px 28px;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    box-shadow: 0 1px 2px color(display-p3 0.12 0.11 0.10 / 0.1);
}

.primary-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px color(display-p3 0.72 0.52 0.38 / 0.15);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px color(display-p3 0.12 0.11 0.10 / 0.1);
}

.primary-btn svg {
    width: 18px;
    height: 18px;
}

.secondary-btn {
    padding: 14px 28px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
}

.secondary-btn svg {
    width: 18px;
    height: 18px;
}

.secondary-btn:hover {
    background-color: var(--bg-primary);
    border-color: var(--border-medium);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.secondary-btn:active {
    transform: translateY(0);
}

/* ==================== 底部胶囊导航栏（移动端专属） ==================== */
.bottom-nav {
    display: none; /* PC端默认隐藏 */
}

/* 移动端显示 */
@media (max-width: 768px) {
    .bottom-nav {
        display: block;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 50;
        max-width: 800px;
        width: calc(100% - 40px);
        transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    }
    
    /* 模态框打开时，底部导航栏也左移 */
    body:has(.modal.active) .bottom-nav {
        transform: translateX(calc(-50% - 60px));
    }
}

.bottom-nav-container {
    background-color: color(display-p3 0.995 0.992 0.988 / 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 
        0 0 0 1px color(display-p3 0.82 0.80 0.78 / 0.2),
        0 8px 32px color(display-p3 0.12 0.11 0.10 / 0.12),
        0 16px 64px color(display-p3 0.12 0.11 0.10 / 0.08);
}

/* 左侧：筛选器标签 */
.bottom-nav-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bottom-nav-filters::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 7px 14px;
    background-color: transparent;
    border: none;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
}

.filter-tab:hover {
    color: var(--text-secondary);
    background-color: color(display-p3 0.92 0.90 0.88 / 0.5);
}

.filter-tab.active {
    color: var(--text-primary);
    background-color: var(--accent-bg);
    font-weight: 600;
}

/* 右侧：操作按钮组 */
.bottom-nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 8px;
    border-left: 1px solid var(--border-light);
}

.bottom-action-btn {
    width: 36px;
    height: 36px;
    background-color: transparent;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-action-btn:hover {
    background-color: color(display-p3 0.92 0.90 0.88 / 0.5);
    color: var(--text-primary);
}

.bottom-action-btn.primary {
    background-color: var(--accent-primary);
    color: white;
}

.bottom-action-btn.primary:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

.bottom-action-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================== 顶部筛选工具栏（PC端） ==================== */
.filter-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.filter-toolbar-btn {
    padding: 6px 12px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.filter-toolbar-btn:hover {
    background-color: var(--bg-card);
    color: var(--text-secondary);
}

.filter-toolbar-btn.active {
    background-color: var(--accent-bg);
    color: var(--accent-primary);
    border-color: var(--border-light);
}

/* 移动端隐藏顶部工具栏 */
@media (max-width: 768px) {
    .filter-toolbar {
        display: none;
    }
}

/* ==================== 响应式 ==================== */
@media (max-width: 968px) {
    .nav-container {
        padding: 16px 20px;
    }
    
    .view-header {
        padding-top: 16px;
    }
}

@media (max-width: 768px) {
    .bottom-nav {
        bottom: 16px;
        width: calc(100% - 32px);
    }
}

@media (max-width: 640px) {
    .main-container {
        padding: 0 16px 120px;
    }
    
    .nav-container {
        padding: 12px 16px;
    }
    
    .view-title {
        font-size: 28px;
    }
    
    .todo-card {
        padding: 12px 14px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .user-menu-name {
        display: none;
    }
    
    .bottom-nav {
        bottom: 12px;
        width: calc(100% - 24px);
    }
    
    .bottom-nav-container {
        padding: 6px;
    }
    
    .filter-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .bottom-action-btn {
        width: 34px;
        height: 34px;
    }
}

/* ==================== 渠道配置模态框 ==================== */
.small-modal {
    max-width: 500px !important;
}

.channel-setup-content {
    padding: 24px 0;
}

.channel-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background-color: color(display-p3 0.98 0.98 0.99 / 0.5);
    border: 1px solid color(display-p3 0.9 0.9 0.92 / 0.5);
    border-radius: 12px;
    margin-bottom: 24px;
}

.channel-info i,
.channel-info svg {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.channel-info-text h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.channel-info-text p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.setup-step {
    margin-bottom: 24px;
}

.setup-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

.setup-step h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.setup-step p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 12px 34px;
}

.qq-qrcode {
    display: flex;
    justify-content: center;
    margin: 12px 0 12px 34px;
}

.qq-qrcode img {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    border: 2px solid color(display-p3 0.9 0.9 0.92 / 0.5);
}

.otp-input-group {
    margin: 12px 0 12px 34px;
}

.otp-input-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5em;
    border: 2px solid color(display-p3 0.9 0.9 0.92 / 0.5);
    border-radius: 10px;
    background-color: color(display-p3 0.999 0.998 0.997);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.otp-input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px color(display-p3 0.5 0.65 1 / 0.1);
}

.verify-btn {
    width: 100%;
    margin: 12px 0 0 34px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.verify-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.verify-btn i {
    width: 18px;
    height: 18px;
}

.quick-option.not-bound {
    border: 2px dashed color(display-p3 0.95 0.6 0.4 / 0.4);
    background-color: color(display-p3 1 0.96 0.94 / 0.5);
}

.quick-option .status-icon {
    width: 16px;
    height: 16px;
    color: color(display-p3 0.95 0.6 0.4);
    margin-left: auto;
}

.required-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background-color: color(display-p3 1 0.96 0.94);
    color: color(display-p3 0.95 0.6 0.4);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 8px;
}

/* ==================== Toast 通知 ==================== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%) scale(0.9);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background-color: color(display-p3 0.998 0.996 0.994 / 0.96);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid color(display-p3 0.85 0.84 0.83 / 0.3);
    border-radius: 10px;
    box-shadow: 
        0 0 0 1px color(display-p3 0.82 0.80 0.78 / 0.1),
        0 8px 32px color(display-p3 0.12 0.11 0.10 / 0.15),
        0 16px 64px color(display-p3 0.12 0.11 0.10 / 0.1);
}

.toast-content i,
.toast-content svg {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.toast-content svg {
    animation: toastSpin 0.8s linear infinite;
}

.toast-content [data-lucide="check"],
.toast-content [data-lucide="copy"],
.toast-content [data-lucide="alert-circle"] {
    animation: none;
}

@keyframes toastSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: color(display-p3 0.80 0.79 0.78 / 0.4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: color(display-p3 0.75 0.74 0.73 / 0.6);
}

/* ==================== 动画 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移除默认的进场动画，避免状态切换时重复播放 */

/* ==================== TODO详情面板 ==================== */
.todo-detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    min-width: 320px;
    max-width: 800px;
    height: 100vh;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 100;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.04);
}

/* Resize手柄 */
.panel-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
    z-index: 10;
    transition: background 0.2s ease;
}

.panel-resize-handle:hover {
    background: var(--accent-color);
}

.panel-resize-handle::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    width: 14px;
    height: 100%;
}

.todo-detail-panel.resizing {
    transition: none;
    user-select: none;
}

.todo-detail-panel.resizing .panel-resize-handle {
    background: var(--accent-color);
}

.todo-detail-panel.active {
    transform: translateX(0);
}

/* 主内容移动 - navbar、main和bottom-nav一起移动 */
.navbar,
.main-container,
.bottom-nav {
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* 大屏幕的transform由JavaScript根据面板实际宽度动态设置 */

.detail-header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.detail-header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.detail-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-close-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.detail-close-btn svg {
    width: 20px;
    height: 20px;
}

.detail-content {
    padding: 24px;
    transition: opacity 0.2s ease;
}

/* 详情面板完成动画 */
.detail-content.detail-completing {
    animation: detailComplete 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes detailComplete {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.98);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 详情面板取消完成动画 */
.detail-content.detail-uncompleting {
    animation: detailUncomplete 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes detailUncomplete {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.detail-title-section {
    margin-bottom: 32px;
}

.detail-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.detail-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-status:hover {
    opacity: 0.8;
}

.detail-status.completed {
    background: color(display-p3 0.94 0.97 0.94);
    color: color(display-p3 0.25 0.63 0.33);
}

.detail-status.completed:hover {
    background: color(display-p3 0.90 0.95 0.90);
}

.detail-status.pending {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.detail-status.pending:hover {
    background: var(--accent-primary);
    color: white;
}

/* 标签样式（与状态按钮大小对齐） */
.detail-meta-row .todo-tag {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
}

.detail-section {
    margin-bottom: 32px;
}

.detail-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.detail-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-field:last-child {
    border-bottom: none;
}

.detail-field-icon {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-field-content {
    flex: 1;
}

.detail-field-label {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.detail-field-value {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
}

.detail-field-value.empty {
    color: var(--text-tertiary);
    font-style: italic;
}

.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 15px;
    transition: opacity 0.2s ease;
}

.detail-link:hover {
    opacity: 0.7;
}

.detail-link svg {
    width: 16px;
    height: 16px;
}

.detail-priority {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.detail-priority.high {
    background: color(display-p3 0.98 0.94 0.94);
    color: color(display-p3 0.85 0.26 0.21);
}

.detail-priority.medium {
    background: color(display-p3 0.96 0.94 0.90);
    color: color(display-p3 0.72 0.52 0.38);
}

.detail-priority.low {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* 提醒渠道 */
.reminder-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reminder-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.reminder-badge.email {
    background: color(display-p3 0.94 0.96 0.98);
    color: color(display-p3 0.20 0.45 0.70);
}

.reminder-badge.qq {
    background: color(display-p3 0.95 0.97 0.99);
    color: color(display-p3 0.25 0.55 0.85);
}

.reminder-badge svg {
    width: 14px;
    height: 14px;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.detail-badge.recurring {
    background: color(display-p3 0.96 0.94 0.98);
    color: color(display-p3 0.55 0.35 0.75);
}

.detail-badge.has-tooltip {
    position: relative;
    cursor: help;
}

/* QQ图标 */
.qq-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.quick-option .qq-icon {
    width: 18px;
    height: 18px;
}

/* 详情面板底部的帮助信息 */
.ciallo-help-message {
    margin-top: 20px;
    padding: 0;
    padding-left: 14px;
    border-left: 2px solid var(--accent-color);
}

.help-message-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.ciallo-help-message p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* 提醒历史时间线 */
.reminder-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reminder-item {
    display: flex;
    gap: 12px;
}

.reminder-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reminder-avatar img {
    width: 24px;
    height: 24px;
}

.reminder-content {
    flex: 1;
    min-width: 0;
}

.reminder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.reminder-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.reminder-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.reminder-message {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.reminder-message p {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Markdown格式样式 */
.reminder-message strong,
.thinking-content strong {
    color: var(--accent-color);
    font-weight: 600;
}

.reminder-message em,
.thinking-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.reminder-message code.inline-code,
.thinking-content code.inline-code {
    background: color(display-p3 0.95 0.95 0.95);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
    color: color(display-p3 0.8 0.3 0.2);
}

.reminder-message pre.code-block,
.thinking-content pre.code-block {
    background: color(display-p3 0.97 0.97 0.97);
    border: 1px solid color(display-p3 0.9 0.9 0.9);
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.reminder-message pre.code-block code,
.thinking-content pre.code-block code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
}

.reminder-message li,
.thinking-content li {
    margin-left: 20px;
    line-height: 1.8;
}

.reminder-message .checkbox,
.thinking-content .checkbox {
    display: inline-block;
    margin-right: 4px;
    font-size: 1.1em;
}

.reminder-message .checkbox.checked,
.thinking-content .checkbox.checked {
    color: var(--accent-color);
}

.reminder-message .checkbox.unchecked,
.thinking-content .checkbox.unchecked {
    color: var(--text-tertiary);
}

/* 可折叠的思考块 */
.reminder-thinking-collapse {
    margin-bottom: 10px;
}

.thinking-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    font: inherit;
    color: inherit;
}

.thinking-toggle:hover {
    background: var(--bg-primary);
    border-color: var(--accent-color);
}

.thinking-toggle span {
    font-size: 13px;
    color: var(--text-secondary);
}

.thinking-toggle .chevron-icon {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.reminder-thinking-collapse.open .chevron-icon {
    transform: rotate(180deg);
}

/* 使用现代CSS Grid动画 */
.thinking-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.reminder-thinking-collapse.open .thinking-content {
    grid-template-rows: 1fr;
}

.thinking-content > div,
.thinking-inner {
    overflow: auto;
    padding: 0 12px;
    margin: 0;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1) 0.05s,
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.reminder-thinking-collapse.open .thinking-content > div,
.reminder-thinking-collapse.open .thinking-inner {
    padding: 16px;
    margin-top: 8px;
    opacity: 1;
}

/* Thinking 极简样式 - 带Markdown解析 */
.thinking-inner {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Thinking标题（Objective、Thought等） */
.thinking-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-top: 12px;
    margin-bottom: 6px;
}

.thinking-title:first-child {
    margin-top: 0;
}

/* 普通文本行 */
.thinking-text {
    margin-bottom: 4px;
    color: var(--text-secondary);
}

/* 列表项 */
.thinking-list-item {
    margin-bottom: 4px;
    padding-left: 4px;
    color: var(--text-secondary);
}

/* 勾选框样式 */
.thinking-check {
    display: inline-block;
    width: 18px;
    text-align: center;
    margin-right: 8px;
    color: var(--text-tertiary);
}

.thinking-check.checked {
    color: var(--accent-primary);
    font-weight: 600;
}

/* 行内标签（Action、Expectation等） */
.thinking-label {
    font-weight: 600;
    color: var(--text-primary);
}

/* 行内代码 */
.thinking-code {
    padding: 2px 6px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    color: var(--text-primary);
}

/* 粗体 */
.thinking-inner strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: color(display-p3 0.85 0.84 0.83 / 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: color(display-p3 0.75 0.73 0.72 / 0.5);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: color(display-p3 0.85 0.84 0.83 / 0.3) transparent;
}

/* 详情面板滚动条 */
.todo-detail-panel::-webkit-scrollbar-thumb {
    background: color(display-p3 0.85 0.84 0.83 / 0.4);
}

.todo-detail-panel::-webkit-scrollbar-thumb:hover {
    background: color(display-p3 0.75 0.73 0.72 / 0.6);
}

/* 响应式 */
@media (max-width: 1400px) {
    .todo-detail-panel {
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
    }
    
    .panel-resize-handle {
        display: none;
    }
    
    body.detail-open .navbar,
    body.detail-open .main-container,
    body.detail-open .bottom-nav {
        transform: translateX(-100%);
    }
}

/* ==================== 登录引导页 ==================== */
.login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
    text-align: center;
}

.login-prompt-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 32px;
    opacity: 0.9;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.login-prompt-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.login-prompt-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 420px;
    line-height: 1.6;
}

.login-prompt-btn {
    margin-bottom: 16px;
    padding: 14px 32px;
    font-size: 15px;
}

.login-prompt-hint {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0;
}

@media (max-width: 768px) {
    .login-prompt {
        min-height: calc(100vh - 160px);
    }
    
    .login-prompt-logo {
        width: 64px;
        height: 64px;
        margin-bottom: 24px;
    }
    
    .login-prompt-title {
        font-size: 24px;
    }
    
    .login-prompt-text {
        font-size: 15px;
    }
}

/* ==================== 语义化时间显示 ==================== */
.exact-time {
    font-size: 0.85em;
    color: color(display-p3 0.12 0.11 0.10 / 0.5);
    font-weight: 400;
    margin-left: 4px;
}

.reminder-time {
    cursor: help;
    position: relative;
}

.reminder-time:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
}

/* ==================== 通知渠道管理 ==================== */

/* 导航栏的铃铛按钮 */
.nav-right .settings-btn {
    padding: 8px;
    min-width: auto;
    border-radius: 50%;
}

.nav-right .settings-btn svg {
    width: 18px;
    height: 18px;
}

/* 用户菜单下拉 */
.user-menu {
    position: relative;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
}

.user-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-header {
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-menu-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.user-menu-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-info {
    flex: 1;
}

.user-menu-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-menu-login {
    font-size: 12px;
    color: var(--text-secondary);
}

.user-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-item:hover {
    background: var(--bg-secondary);
}

.user-menu-item i {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.user-menu-item span {
    font-size: 14px;
}

.user-menu-item.logout {
    color: color(display-p3 0.9 0.3 0.2);
}

.user-menu-item.logout:hover {
    background: color(display-p3 0.9 0.3 0.2 / 0.1);
}

.user-menu-item.logout i {
    color: color(display-p3 0.9 0.3 0.2);
}

/* 渠道管理卡片 */
.channel-manage-card {
    max-width: 600px;
    width: 100%;
}

.channel-item {
    text-align: center;
    padding: 32px 24px;
    margin-bottom: 24px;
}

.channel-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, 
        color(display-p3 0.953 0.573 0.275 / 0.1),
        color(display-p3 0.953 0.573 0.275 / 0.05)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    transition: transform 0.3s ease;
}

.channel-item:hover .channel-icon {
    transform: scale(1.05);
}

.channel-icon i {
    width: 28px;
    height: 28px;
}

.channel-details h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.channel-status {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.channel-status.connected {
    color: var(--accent-primary);
}

.channel-action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    background: var(--accent-primary);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.channel-action-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.channel-action-btn.disconnect {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.channel-action-btn.disconnect:hover {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

.channel-action-btn i {
    width: 16px;
    height: 16px;
}

.channel-hint {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, 
        color(display-p3 0.953 0.573 0.275 / 0.08),
        color(display-p3 0.953 0.573 0.275 / 0.04)
    );
    border-radius: 12px;
    margin-top: 16px;
}

.channel-hint i {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.channel-hint span {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 编辑任务卡片 */
.edit-todo-card {
    max-width: 800px;
    width: 100%;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 编辑区域分组 */
.edit-section {
    padding: 32px;
    border-bottom: 1px solid var(--border-light);
}

.edit-section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-header i {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.section-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-hint {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 表单字段 */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.form-input:hover {
    border-color: var(--border-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--surface-primary);
    box-shadow: 0 0 0 4px color(display-p3 0.953 0.573 0.275 / 0.08);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

/* 表单行布局 */
.form-row {
    display: flex;
    gap: 16px;
}

.form-field-half {
    flex: 1;
}

/* 标签选择器（新设计） */
.edit-tags-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.edit-tag-chip {
    cursor: pointer;
    user-select: none;
}

.edit-tag-chip input[type="checkbox"] {
    display: none;
}

.edit-tag-chip .chip-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-tag-chip .chip-content i {
    width: 16px;
    height: 16px;
}

.edit-tag-chip:hover .chip-content {
    border-color: var(--accent-primary);
    background: color(display-p3 0.953 0.573 0.275 / 0.05);
}

.edit-tag-chip input[type="checkbox"]:checked + .chip-content {
    background: linear-gradient(135deg, 
        color(display-p3 0.953 0.573 0.275 / 0.15),
        color(display-p3 0.953 0.573 0.275 / 0.08)
    );
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* 触发器网格 */
.triggers-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trigger-card {
    position: relative;
    padding: 24px;
    background: linear-gradient(135deg, 
        var(--bg-secondary), 
        color(display-p3 0.953 0.573 0.275 / 0.02)
    );
    border: 1.5px solid var(--border-light);
    border-radius: 16px;
}

.trigger-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.trigger-type-tabs {
    display: inline-flex;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    padding: 4px;
}

.trigger-type-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trigger-type-tab:hover {
    color: var(--text-primary);
}

.trigger-type-tab.active {
    background: var(--accent-primary);
    color: white;
}

.trigger-remove-btn {
    padding: 8px;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trigger-remove-btn:hover {
    color: color(display-p3 0.9 0.3 0.2);
    background: color(display-p3 0.9 0.3 0.2 / 0.1);
}

.trigger-remove-btn i {
    width: 18px;
    height: 18px;
}

.trigger-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trigger-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trigger-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trigger-input-group input,
.trigger-input-group textarea {
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.trigger-input-group input:focus,
.trigger-input-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px color(display-p3 0.953 0.573 0.275 / 0.08);
}

.trigger-input-group textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}

/* 添加触发器按钮 */
.add-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-primary);
    background: color(display-p3 0.953 0.573 0.275 / 0.05);
    border: 1.5px dashed var(--accent-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-trigger-btn:hover {
    background: color(display-p3 0.953 0.573 0.275 / 0.1);
    border-color: var(--accent-primary);
}

.add-trigger-btn i {
    width: 18px;
    height: 18px;
}
