﻿/* TODO Panel Premium Styling */
.todo-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    max-height: 70vh;
    background: var(--chat-surface);
    backdrop-filter: blur(14px);
    border: 1px solid var(--chat-border);
    border-radius: 14px;
    box-shadow: var(--chat-shadow);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
}

.todo-panel.hidden {
    transform: translateX(100%);
    opacity: 0;
}

.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: transparent;
    color: var(--text-primary);
    border-bottom: 1px solid var(--chat-border);
}

.todo-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.todo-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.todo-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.todo-content {
    max-height: calc(70vh - 60px);
    overflow-y: auto;
    padding: 12px;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.todo-item {
    background: var(--chat-surface-alt);
    border: 1px solid var(--chat-border);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s ease;
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.todo-item.status-pending {
    border-left: 4px solid var(--warning);
}

.todo-item.status-in_progress {
    border-left: 4px solid var(--primary);
    animation: pulse 2s infinite;
}

.todo-item.status-active {
    border-left: 4px solid var(--primary);
    animation: pulse 2s infinite;
}

.todo-item.status-processing {
    border-left: 4px solid var(--primary);
    animation: pulse 2s infinite;
}

.todo-item.status-completed {
    border-left: 4px solid var(--success);
}

.todo-item.status-failed {
    border-left: 4px solid var(--error);
}

.todo-item.status-cancelled {
    border-left: 4px solid var(--warning);
}

.todo-item.status-retrying {
    border-left: 4px solid var(--warning);
    animation: spin 1s linear infinite;
}

.todo-item.status-error {
    border-left: 4px solid var(--error);
}

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

.task-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.task-status {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--chat-border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(64, 224, 208, 0.85) 0%, rgba(255, 107, 157, 0.7) 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 11px;
    min-width: 35px;
    text-align: right;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .todo-panel {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
}

.todo-content::-webkit-scrollbar {
    width: 4px;
}

.todo-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

.todo-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 2px;
}
