

/* Lista de tarefas */
.lista-tarefas {
    margin-bottom: 20px;
}

.tarefas {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Item de tarefa (li) */
.tarefas li {
    background: white;
    border: 2px solid #f1f3f4;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #2c3e50;
    transition: all 0.3s ease;
    word-wrap: break-word;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.tarefas li:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.tarefas li:before {
    content: "✓";
    position: absolute;
    left: -5px;
    top: -5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
}

.tarefas li:hover:before {
    opacity: 1;
}

/* Estado vazio */
.sem-tarefas {
    text-align: center;
    padding: 50px 20px;
    color: #7f8c8d;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

.sem-tarefas i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
    color: #667eea;
}

.sem-tarefas h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 500;
}

.sem-tarefas p {
    font-size: 1rem;
    opacity: 0.8;
}

.sem-tarefas.escondido {
    display: none;
}

/* Loading spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading.escondido {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading p {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 500;
}

/* Seção de adicionar tarefa */
.adicionar-tarefa {
    margin-bottom: 25px;
}

.campo-entrada {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.entrada-texto {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e8ecf4;
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
    background: #fafbfc;
}

.entrada-texto:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
    transform: translateY(-1px);
}

.botao-adicionar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.botao-adicionar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

/* Contador de tarefas */
.contador {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 18px 20px;
    background: #f8f9fa;
    border-radius: 18px;
    border: 1px solid #e9ecef;
}

.info-tarefas {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #495057;
}

.total, .feitas {
    font-weight: 500;
}

.total span, .feitas span {
    font-weight: 600;
    color: #667eea;
}

.limpar-feitas {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.limpar-feitas:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .pagina {
        border-radius: 15px;
    }
    
    .cabecalho {
        padding: 30px 20px;
    }
    
    .titulo {
        font-size: 2rem;
    }
    
    .conteudo {
        padding: 20px;
    }
    
    .campo-entrada {
        flex-direction: column;
        gap: 10px;
    }
    
    .botao-adicionar {
        justify-content: center;
    }
    
    .contador {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .info-tarefas {
        justify-content: center;
    }
    
    .tarefas li {
        padding: 15px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .titulo {
        font-size: 1.75rem;
    }
    
    .descricao {
        font-size: 1rem;
    }
    
    .tarefas li {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* Animações */
@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tarefas li {
    animation: aparecer 0.4s ease;
}

/* Scrollbar personalizada */
.tarefas::-webkit-scrollbar {
    width: 6px;
}

.tarefas::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tarefas::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.tarefas::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Estados de erro e carregamento */
.erro {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.carregando {
    opacity: 0.6;
    pointer-events: none;
}

/* Esconder elementos não utilizados */
.janela-confirmar,
.notificacao,
#modeloTarefa {
    display: none;
}