/**
 * 通用组件样式文件
 * 路径: css/components.css
 * 版本: Epsilon17 - 统一圆形按钮风格 + 优化工具栏展开
 * 包含: 工具栏、设置面板、日志面板、快捷菜单、编辑表单
 */

/* ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
   第一部分：⭐ 圆形呼吸灯按钮（统一样式）
   ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ */

.toolbar-collapsed {
    position: absolute;
    left: 20px;
    top: 20px;
    width: var(--toolbar-collapsed-size);
    height: var(--toolbar-collapsed-size);
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-slow);
    z-index: var(--z-toolbar-collapsed);
    user-select: none;
    overflow: hidden;
    will-change: transform;
}

.toolbar-collapsed::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 70%);
    border-radius: 50%;
    transform: scale(0.5);
    opacity: 0;
    animation: pulse 2s ease-out infinite;
    pointer-events: none;
}

.toolbar-collapsed::after {
    content: '';
    position: absolute;
    inset: -50%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    animation: shimmer 3s linear infinite;
    pointer-events: none;
}

.toolbar-collapsed:hover {
    background: linear-gradient(135deg, #5568d3, #6a3d8f);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.toolbar-collapsed:active {
    transform: scale(0.95);
}

.toolbar-icon {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
   第二部分：⭐ 展开工具栏（从左向右展开）
   ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ */

.floating-toolbar-expanded {
    position: absolute;
    left: 20px; /* ⭐ 与折叠按钮对齐 */
    top: 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: var(--toolbar-border-radius);
    padding: 12px 12px 12px 68px; /* ⭐ 左侧为圆形按钮预留空间 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 68px;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    z-index: var(--z-toolbar-expanded);
    pointer-events: none;
    white-space: nowrap;
    will-change: max-width, opacity;
}

.floating-toolbar-expanded.active {
    max-width: 1200px;
    opacity: 1;
    pointer-events: auto;
}

.toolbar-section {
    display: flex;
    gap: 8px;
    align-items: center;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.floating-toolbar-expanded.active .toolbar-section {
    opacity: 1;
    transform: translateX(0);
}

.floating-toolbar-expanded.active .toolbar-section:nth-child(1) { transition-delay: 0.2s; }
.floating-toolbar-expanded.active .toolbar-section:nth-child(3) { transition-delay: 0.3s; }
.floating-toolbar-expanded.active .toolbar-section:nth-child(5) { transition-delay: 0.4s; }
.floating-toolbar-expanded.active .settings-trigger { transition-delay: 0.5s; }

.toolbar-btn {
    background: transparent;
    border: none;
    padding: 10px 12px;
    border-radius: var(--button-border-radius);
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: visible;
    transition: all var(--transition-normal);
    white-space: nowrap;
    cursor: pointer;
}

.toolbar-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--button-border-radius);
    background: linear-gradient(135deg, transparent, rgba(102, 126, 234, 0.1));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.toolbar-btn:hover::before { opacity: 1; }

.toolbar-btn .btn-icon {
    font-size: 1.3rem;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 图标颜色 */
.toolbar-btn:nth-child(1) .btn-icon { color: var(--success-color); }
.toolbar-btn:nth-child(2) .btn-icon { color: var(--danger-color); }
.toolbar-section:nth-child(1) .toolbar-btn:nth-child(3) .btn-icon { color: var(--info-color); }
.toolbar-section:nth-child(1) .toolbar-btn:nth-child(4) .btn-icon { color: #8b5cf6; }
.toolbar-section:nth-child(3) .toolbar-btn:nth-child(1) .btn-icon { color: #f59e0b; }
.toolbar-section:nth-child(3) .toolbar-btn:nth-child(2) .btn-icon { color: #06b6d4; }
.toolbar-section:nth-child(3) .toolbar-btn:nth-child(3) .btn-icon { color: var(--gray-500); }
.toolbar-section:nth-child(5) .toolbar-btn .btn-icon { color: #ec4899; }

.toolbar-btn:hover .btn-icon {
    animation: breathe 2s ease-in-out infinite;
    transform: scale(1.1);
}

.toolbar-btn .btn-text {
    opacity: 0;
    transform: translateX(-10px);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all var(--transition-normal);
    pointer-events: none;
    max-width: 0;
}

.toolbar-btn:hover {
    background: rgba(102, 126, 234, 0.08);
    padding-right: 16px;
}

.toolbar-btn:hover .btn-text {
    opacity: 1;
    transform: translateX(0);
    max-width: 100px;
}

.toolbar-btn:active { transform: scale(0.95); }

.toolbar-btn.active {
    background: rgba(102, 126, 234, 0.2) !important;
    border: 1px solid rgba(102, 126, 234, 0.4);
}

.toolbar-btn.active .btn-icon { transform: scale(1.15); }

.toolbar-divider {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, transparent, rgba(102, 126, 234, 0.2) 50%, transparent);
    margin: 0 6px;
}

.settings-trigger {
    margin-left: 8px;
    position: relative;
}

.settings-trigger .btn-icon { color: var(--primary-color) !important; }

.settings-trigger:hover .btn-icon {
    animation: rotate 2s linear infinite, breathe 2s ease-in-out infinite;
}

/* ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
   第三部分：设置面板
   ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ */

.settings-panel {
    position: fixed;
    right: -320px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    border-left: 1px solid rgba(102, 126, 234, 0.2);
    transition: right var(--transition-slow);
    z-index: var(--z-settings-panel);
    padding: 24px;
    overflow-y: auto;
    will-change: right;
}

.settings-panel.active { right: 0; }

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.settings-header h6 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.settings-close {
    /* 继承基础样式逻辑，确保与文件管理器一致 */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 50%;
    color: #6c757d;
    font-size: 1.4rem; /* 稍微大一点因为通常是 × 字符 */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
}

.settings-close:hover {
    background: rgba(220, 53, 69, 0.15); /* 统一使用红色背景 */
    color: #dc3545;
    transform: rotate(90deg) scale(1.1); /* 统一旋转特效 */
}
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: var(--card-border-radius);
    background: white;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all var(--transition-normal);
}

.setting-item:hover {
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    transform: translateX(-4px);
    border-color: rgba(102, 126, 234, 0.3);
}

.switch-label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    inset: 0;
    background: #e0e0e0;
    transition: var(--transition-slow);
    border-radius: 34px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.switch-slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: var(--transition-slow);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input:checked + .switch-slider {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.4);
}

input:checked + .switch-slider:before {
    transform: translateX(24px);
}

.slider-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.slider-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--gray-200), rgba(102, 126, 234, 0.2));
    outline: none;
    appearance: none;
}

.custom-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.custom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    border: none;
}

.custom-slider::-webkit-slider-thumb:hover,
.custom-slider::-moz-range-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.6);
}

.slider-value {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    min-width: 45px;
    text-align: right;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.setting-text {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
   第四部分：日志面板
   ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ */

.log-panel {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--gray-200);
    border-radius: var(--card-border-radius);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.log-panel.hidden { display: none !important; }

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    user-select: none;
}

.log-header span {
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 500;
}

.log-toggle {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--gray-500);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 4px;
}

.log-toggle:hover { background: var(--gray-200); }

.log-panel.collapsed .log-toggle { transform: rotate(180deg); }
.log-panel.collapsed .log-body {
    max-height: 0;
    padding: 0;
    border: none;
}

.log-body {
    max-height: 180px;
    padding: 10px 14px;
    overflow-y: auto;
    transition: all var(--transition-normal);
}

.log-entry {
    padding: 5px 0;
    border-bottom: 1px solid var(--gray-50);
    font-size: 0.75rem;
    color: var(--gray-500);
}

.log-entry:last-child { border-bottom: none; }

.log-time {
    color: var(--gray-400);
    font-size: 0.7rem;
}

/* ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
   第五部分：快捷操作菜单
   ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ */

.quick-menu {
    position: fixed;
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.2);
    z-index: var(--z-quick-menu);
    opacity: 0;
    transform: translateX(-10px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.quick-menu.show {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.quick-menu-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quick-menu-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, transparent, rgba(102, 126, 234, 0.1));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.quick-menu-btn:hover::before { opacity: 1; }

.quick-menu-icon {
    font-size: 1.2rem;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.quick-menu-add .quick-menu-icon { color: var(--success-color); }
.quick-menu-add:hover {
    background: rgba(16, 185, 129, 0.15);
}
.quick-menu-add:hover .quick-menu-icon {
    transform: scale(1.25) rotate(90deg);
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
}

.quick-menu-edit .quick-menu-icon { color: var(--info-color); }
.quick-menu-edit:hover {
    background: rgba(59, 130, 246, 0.15);
}
.quick-menu-edit:hover .quick-menu-icon {
    transform: scale(1.25);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

.quick-menu-delete .quick-menu-icon { color: var(--danger-color); }
.quick-menu-delete:hover {
    background: rgba(239, 68, 68, 0.15);
}
.quick-menu-delete:hover .quick-menu-icon {
    transform: scale(1.25) rotate(10deg);
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
}
/* ⭐ 新增：复制按钮 (紫色) */
.quick-menu-copy .quick-menu-icon { color: #8b5cf6; }
.quick-menu-copy:hover {
    background: rgba(139, 92, 246, 0.15);
}
.quick-menu-copy:hover .quick-menu-icon {
    transform: scale(1.25);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
}
/* ⭐ 新增：上移/下移按钮 (灰色/橙色) */
.quick-menu-move .quick-menu-icon { color: var(--gray-600); font-size: 1rem; }
.quick-menu-move:hover {
    background: rgba(245, 158, 11, 0.15);
}
.quick-menu-move:hover .quick-menu-icon {
    color: #f59e0b;
    transform: translateY(-2px);
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}
.quick-menu-move[data-action="down"]:hover .quick-menu-icon {
    transform: translateY(2px); /* 下移按钮向下动 */
}
/* ⭐ 新增：全部展开按钮 (绿色 - 象征打开/生长) */
.quick-menu-expand .quick-menu-icon { color: #10b981; }
.quick-menu-expand:hover {
    background: rgba(16, 185, 129, 0.15);
}
.quick-menu-expand:hover .quick-menu-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
}

/* ⭐ 新增：全部折叠按钮 (橙色 - 象征收纳/归档) */
.quick-menu-collapse .quick-menu-icon { color: #f59e0b; }
.quick-menu-collapse:hover {
    background: rgba(245, 158, 11, 0.15);
}
.quick-menu-collapse:hover .quick-menu-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}
.quick-menu-btn:active { transform: scale(0.9); }

/* ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
   第六部分：编辑任务表单
   ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ */

.inline-task-form {
    animation: fadeInUp 0.2s ease-out;
    pointer-events: auto;
    will-change: transform, opacity;
}

.inline-task-form::-webkit-scrollbar { width: 6px; }
.inline-task-form::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.inline-task-form::-webkit-scrollbar-thumb:hover { background: #999; }

/* 表单工具栏 */
.form-toolbar {
    margin: -14px -14px 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 2px solid #dee2e6;
    border-radius: 12px 12px 0 0;
}

.form-toolbar .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-toolbar .btn:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-toolbar .btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.form-toolbar h6 {
    font-size: 0.9rem;
    color: #6c757d;
}

/* 紧凑标签 */
.form-label-compact {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    display: block;
}

/* 紧凑行布局 */
.form-row-compact {
    display: flex;
    align-items: flex-end;
    gap: 0;
}

/* 自动信息显示 */
.auto-info-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.05));
    border-radius: 6px;
    font-size: 0.75rem;
    color: #495057;
    flex-wrap: wrap;
}

.auto-info-compact strong {
    font-weight: 600;
    color: #667eea;
}

.auto-info-compact code {
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #667eea;
    font-weight: 600;
}

.auto-info-compact .separator {
    color: #dee2e6;
    font-weight: bold;
}

/* 结束日期显示 */
.end-date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.8rem;
}

.end-date-display strong {
    font-size: 0.9rem;
    font-weight: 600;
}

/* 表单元素样式（合并优化） */
#editDuration,
#editDurationType,
#editPriority {
    font-size: 0.85rem;
    font-weight: 500;
}

#editDuration {
    text-align: center;
    font-weight: 600;
}

#editNotes {
    font-size: 0.8rem;
    resize: vertical;
    min-height: 50px;
    line-height: 1.4;
}

#editNotes:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#notesCounter {
    font-size: 0.7rem;
    transition: color 0.2s ease;
}

#editParent {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

#durationTypeHint {
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 里程碑开关 */
.form-check-input {
    width: 2rem;
    height: 1rem;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #ffc107;
    border-color: #ffc107;
}

.form-check-input:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
   第七部分：依赖标签容器
   ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ */

.deps-tags-container {
    min-height: 40px;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.dep-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    color: #667eea;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dep-tag:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.25));
    transform: translateY(-1px);
}

.dep-tag-remove {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.dep-tag-remove:hover {
    background: rgba(220, 53, 69, 0.2);
    transform: scale(1.2);
}

/* ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
   第八部分：响应式设计
   ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ */

@media (max-width: 768px) {
    .floating-toolbar-expanded {
        left: 20px;
        top: 90px;
        flex-wrap: wrap;
        max-width: calc(100% - 40px);
    }

    h1 {
        margin-left: 0 !important;
        text-align: center;
        font-size: 1.3rem;
    }

    .toolbar-collapsed {
        left: 50%;
        transform: translateX(-50%);
    }

    .settings-panel {
        width: 100%;
        right: -100%;
    }
    
    .quick-menu {
        gap: 4px;
        padding: 6px;
    }
    
    .quick-menu-btn {
        width: 32px;
        height: 32px;
    }
    
    .inline-task-form { width: 340px !important; }
    
    .form-row-compact {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-row-compact > div {
        width: 100% !important;
        padding-left: 0 !important;
        margin-bottom: 8px;
    }
    
    .auto-info-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .auto-info-compact .separator { display: none; }
    
    .deps-tags-container { font-size: 0.7rem; }
    
    .dep-tag {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

/* ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
   第九部分：打印样式
   ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ */

@media print {
    .toolbar-collapsed,
    .floating-toolbar-expanded,
    .settings-panel,
    .log-panel,
    .quick-menu,
    .inline-task-form,
    .sidebar-resize-handle {
        display: none !important;
    }
}

/* ⭐ 新增：任务状态颜色 */
.gantt-task-name.task-ready .task-name-content {
    color: #059669; /*以此深绿色标识“就绪/可执行”状态 */
    font-weight: 600;
}
/* 配合深色模式 */
@media (prefers-color-scheme: dark) {
    .gantt-task-name.task-ready .task-name-content {
        color: #34d399;
    }
}

/* ⭐ 优化：快捷菜单按钮文字悬停滑出效果 (统一界面逻辑) */
.quick-menu-btn {
    width: auto; /* 允许宽度自适应 */
    min-width: 36px;
    padding: 0 8px;
    justify-content: center; /* 默认居中 */
    overflow: hidden;
}

.quick-menu-btn .btn-text {
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    margin-left: 0;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    vertical-align: middle;
}

.quick-menu-btn:hover {
    padding-right: 12px; /* 悬停时右侧增加一点内边距 */
    justify-content: flex-start; /* 文字出现后左对齐 */
}

.quick-menu-btn:hover .btn-text {
    max-width: 80px; /* 展开文字 */
    opacity: 1;
    margin-left: 6px;
}

/* 隐藏已完成任务按钮样式 */
.quick-menu-hide-completed .quick-menu-icon { color: #6c757d; }
.quick-menu-hide-completed:hover { background: rgba(108, 117, 125, 0.15); }

/* 激活状态（例如正在隐藏已完成） */
.quick-menu-btn.active {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
}